This commit is contained in:
haomingming
2023-03-06 17:57:39 +08:00
parent 3794faceae
commit 1066e37c96
4230 changed files with 193453 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
// Pages/index/index.js
const app = getApp()
Page({
data: {
loading: true
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
tabBarShow:false, //true/false
})
}
this.setData({ loading: false });
},
goCheck(e){
console.log(e);
let usertype = e.currentTarget.dataset.usertype;
let url = e.currentTarget.dataset.url;
wx.setStorageSync('usertype', usertype);
wx.setStorageSync('next_url', url);
let user_uuid = wx.getStorageSync('user_id');
console.log(user_uuid);
if(user_uuid){
wx.switchTab({
url: url
})
}else{
app.go(app.globalData.login_url);
}
},
bindGetUserInfo(){
wx.getUserInfo({
success: function(res) {
var userInfo = res.userInfo
var nickName = userInfo.nickName
var avatarUrl = userInfo.avatarUrl
var gender = userInfo.gender //性别 0:未知、1:男、2:女
var province = userInfo.province
var city = userInfo.city
var country = userInfo.country
console.log(res.userInfo)
}
})
},
shenfang(){
wx.requestSubscribeMessage({
tmplIds: [
"5Tl-xmaWXrKP5BB8E6b3oTdPHbHa7WYWbmvZiuz4TLs",
"kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40"
],
success(res){
console.log(res)
},
fail(res){
console.log(res)
},
complete(res){
console.log(res)
}
})
},
yici(){
wx.requestSubscribeMessage({
tmplIds: [
"jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM",
"JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc"
],
success(res){
console.log(res)
},
fail(res){
console.log(res)
},
complete(res){
console.log(res)
}
})
},
check(){
wx.getSetting({
withSubscriptions: true,
success (res) {
console.log(res.authSetting)
console.log(res.subscriptionsSetting)
}
})
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image"
}
}
+34
View File
@@ -0,0 +1,34 @@
<!--
此文件为开发者工具生成,生成时间: 2023/2/2 下午6:54:52
使用方法:
在 E:\WeChatProjects\test_miniprogram\Pages\index\index.wxml 引入模板
```
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{loading}}" />
```
在 E:\WeChatProjects\test_miniprogram\Pages\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
-->
<template name="skeleton">
<view class="sk-container">
<view class="title sk-transparent sk-text-14-2857-913 sk-text">请选择您的身份</view>
<view>
<view class="item">
<view is="miniprogram_npm/tdesign-miniprogram/image/image" class="item_img" data-url="/Pages/yishi/index/index">
<image class="t-image image--t-image t-image--shape-square image--t-image--shape-square sk-image" id="f1e69958--image" mode="heightFix" style="height: 121px; width: 386.074px;"></image>
</view>
</view>
<view class="item">
<view is="miniprogram_npm/tdesign-miniprogram/image/image" class="item_img" data-url="/Pages/yaoshi/home/home">
<image class="t-image image--t-image t-image--shape-square image--t-image--shape-square sk-image" id="16b3517e--image" mode="heightFix" style="height: 121px; width: 386.074px;"></image>
</view>
</view>
</view>
</view>
</template>
+37
View File
@@ -0,0 +1,37 @@
/*
此文件为开发者工具生成,生成时间: 2023/2/2 下午6:54:52
在 E:\WeChatProjects\test_miniprogram\Pages\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
*/
.sk-transparent {
color: transparent !important;
}
.sk-text-14-2857-913 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 68.4783rpx;
position: relative !important;
}
.sk-text {
background-origin: content-box !important;
background-clip: content-box !important;
background-color: transparent !important;
color: transparent !important;
background-repeat: repeat-y !important;
}
.sk-image {
background: #EFEFEF !important;
}
.sk-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: transparent;
}
+37
View File
@@ -0,0 +1,37 @@
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{loading}}" />
<view class="title">请选择您的身份</view>
<view>
<view class="item" data-usertype="2"
data-url="/Pages/yishi/index/index" bindtap="goCheck" >
<t-image
class="item_img"
src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yi.png"
mode="heightFix"
height="220rpx"
aria-label="医师端"
loading="slot"
>
<t-loading slot="loading" theme="circular" size="40rpx" loading />
</t-image>
</view>
<view class="item"
data-url="/Pages/yaoshi/home/home"
data-usertype="3" bindtap="goCheck">
<t-image
class="item_img"
src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yao.png"
mode="heightFix"
height="220rpx"
aria-label="药师端"
loading="slot">
<t-loading slot="loading" theme="circular" size="40rpx" loading />
</t-image>
</view>
<button bindtap="shenfang">审方提醒(长期)</button>
<button bindtap="yici">患者回复通知(一次)</button>
<button bindtap="check">获取订阅状态</button>
</view>
+21
View File
@@ -0,0 +1,21 @@
@import "./index.skeleton.wxss";
.title{
margin-top: 250rpx ;
margin-left: 50rpx;
margin-bottom: 100rpx;
font-size: 50rpx;
font-family: "AlibabaPuHuiTi-2-75-SemiBold";
color: #333;
}
.item{
display: flex;
flex-direction: row;
margin-bottom: 100rpx;
justify-content: center;
align-content: center;
}
.item_img{
flex: 1;
display: flex;
justify-content: center;
}