This commit is contained in:
2023-09-28 09:59:16 +08:00
parent ca6260e543
commit 59ce5204fc
3 changed files with 287 additions and 455 deletions

View File

@ -303,44 +303,32 @@
"navigationBarTitleText": "问诊平台", "navigationBarTitleText": "问诊平台",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{ "path": "doctordetails/doctordetails",
"path" : "doctordetails/doctordetails", "style": {
"style" :
{
"navigationBarTitleText": "医生详情", "navigationBarTitleText": "医生详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{ "path": "ExpertlookOrder/ExpertlookOrder",
"path" : "ExpertlookOrder/ExpertlookOrder", "style": {
"style" :
{
"navigationBarTitleText": "专家咨询订单", "navigationBarTitleText": "专家咨询订单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
} "path": "consulted/consulted",
,{ "style": {
"path" : "consulted/consulted",
"style" :
{
"navigationBarTitleText": "待咨询", "navigationBarTitleText": "待咨询",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{ "path": "cancel/cancel",
"path" : "cancel/cancel", "style": {
"style" :
{
"navigationBarTitleText": "取消订单", "navigationBarTitleText": "取消订单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}
]
}, },
{ {
"path": "PointsMall/PointsMall", "path": "PointsMall/PointsMall",
@ -357,17 +345,9 @@
} }
} }
] ]
}, }, {
{
"root": "pagesC", "root": "pagesC",
"pages": [{ "pages": [{
"path": "login/login",
"style": {
"navigationBarTitleText": "问诊平台",
"enablePullDownRefresh": false
}
},
{
"path": "ServiceAppointmenttime/ServiceAppointmenttime", "path": "ServiceAppointmenttime/ServiceAppointmenttime",
"style": { "style": {
"navigationBarTitleText": "服务预约", "navigationBarTitleText": "服务预约",
@ -382,9 +362,9 @@
"onReachBottomDistance": 40, // px "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true "enablePullDownRefresh": true //true
} }
}]
} }
], ]
}],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "", "navigationBarTitleText": "",

View File

@ -1,36 +0,0 @@
.app {
font-family: DengXian;
color: #C3C1C1;
font-weight: 400;
height:100vh;
background-color: #ffffff;
.text{
position: absolute;
top:37%;
left:50%;
transform: translateX(-50%);
padding-top: 30rpx;
font-size: 32rpx;
color: #000000;
font-weight: 600;
}
image{
position: absolute;
top:20%;
left:50%;
transform: translateX(-50%);
display: block;
margin: 0 auto;
width: 240rpx;
height: 240rpx;
}
.loginbtn{
width: 90%;
position: absolute;
top:55%;
left:5%;
background-color: #26A888;
color: #ffffff;
}
}

View File

@ -1,112 +0,0 @@
<template>
<view class="app">
<image src="../../static/logo.png" mode=""></image>
<!-- <view class="text">
新医路健康服务平台
</view> -->
<button class="loginbtn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">手机号快捷登录</button>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
appLoginpwd,
getWeChatUser,
} from '../../api/pages/login/index.js'
import {
createMobileToken
} from '@/api/pages/login/index.js'
export default {
data() {
return {
phonecode: undefined,
logincode: undefined,
timer: undefined,
scenenurseStationId: undefined
};
},
onShow() {
this.phonecode = undefined
this.logincode = undefined
this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
},
methods: {
getPhoneNumberp(val) {
let that = this;
if (val.detail.code) {
that.phonecode = val.detail.code
wx.login({
provider: 'weixin',
success: function(loginRes) {
that.logincode = loginRes.code
that.pwdlogin();
}
});
}
},
login() {
getWeChatUser(this.logincode, this.phonecode).then(res => {
if (res.code == 200) {
uni.setStorageSync("openid", res.data.openid)
uni.setStorageSync("patientId", res.data.id)
uni.setStorageSync("phone", res.data.phone)
this.$refs.uToast.show({
title: '登录成功',
type: 'success',
duration: '1500'
})
this.phonecode = undefined
this.logincode = undefined
uni.setStorageSync("Refresh", 'Refresh')
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 500)
} else {
this.$refs.uToast.show({
title: '登录失败',
type: 'error',
duration: '1500'
})
}
})
},
pwdlogin() {
var that = this
uni.clearStorageSync();
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
if (this.scenenurseStationId) {
uni.setStorageSync("scenenurseStationId", this.scenenurseStationId)
}
that.login()
})
},
}, //1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '新医路健康服务平台',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '新医路健康服务平台',
path: url,
}
},
}
</script>
<style lang="scss">
@import "./login.scss";
</style>