This commit is contained in:
2023-09-26 16:42:18 +08:00
parent 5078dda627
commit cbeeea455f
9 changed files with 536 additions and 248 deletions

View File

@ -1,3 +1,3 @@
// var baseurl = "https://quanyidaojia.xinelu.cn";
var baseurl = "http://192.168.16.76:8080";
var baseurl = "http://192.168.16.48:8081";
export default baseurl

View File

@ -9,7 +9,7 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
}, {
"path": "pages/startup/startup",
"style": {
"navigationStyle": "custom",
@ -303,10 +303,26 @@
"navigationBarTitleText": "家庭成员详情",
"enablePullDownRefresh": false
}
}, {
"path": "consultationplatform/consultationplatform",
"style": {
"navigationBarTitleText": "问诊平台",
"enablePullDownRefresh": false
}
}
]
}],
},
{
"root": "pagesC",
"pages": [{
"path": "login/login",
"style": {
"navigationBarTitleText": "问诊平台",
"enablePullDownRefresh": false
}
}]
}
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",

View File

@ -7,7 +7,7 @@
</text>
</view>
<view class="topbar">
<image src="../../static/pages/wenzhenpingtai.png" mode=""></image>
<image src="../../static/pages/wenzhenpingtai.png" mode="" @tap="goconsultationplatform"></image>
<image src="../../static/pages/hulifuwu.png" mode="" @tap="gosite"></image>
</view>
<view class="title">
@ -119,6 +119,12 @@
})
}, 0)
},
//
goconsultationplatform() {
uni.navigateTo({
url: '/pagesB/consultationplatform/consultationplatform',
})
},
},
//1.
onShareAppMessage(res) {

View File

@ -0,0 +1,118 @@
<template>
<view class="app">
<image src="../../static/pages/wenzhenbanner.png" mode="" class="banner"></image>
<view class="card">
<view class="topbar">
<view class="item">
<image src="../../static/pagesB/tuwen.png" mode=""></image>
<view class="text">
图文问诊
</view>
</view>
<view class="item">
<image src="../../static/pagesB/zhuanjia.png" mode=""></image>
<view class="text">
专家问诊
</view>
</view>
</view>
<view class="title">
专家信息栏
</view>
<u-tabs :list="tabList" :current="tabcurrent" @change="tabchange" active-color='#26A888'></u-tabs>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabcurrent: 0,
tabList: [{
name: '健康常识'
}],
};
},
methods: {
tabchange() {},
}
}
</script>
<style lang="scss">
page {
background-color: #F4F5F7;
}
.app {
.card {
background-color: #fff;
width: 94%;
margin: 0 auto;
padding-top: 35rpx;
::v-deep .u-tabs {
padding-top: 30rpx;
}
.title {
width: 94%;
margin: 0 auto;
border-bottom: 2rpx solid #CDC9C9;
font-size: 34rpx;
font-weight: 500;
color: #000000;
margin-top: 40rpx;
padding-bottom: 30rpx;
}
.topbar {
width: 100%;
display: flex;
justify-content: space-around;
color: #fff;
.item {
width: 46%;
height: 180rpx;
background: #26A888;
border-radius: 5rpx;
position: relative;
.text {
position: absolute;
top: 50%;
left: 40%;
transform: translateY(-50%);
display: inline-block;
font-size: 34rpx;
font-weight: 500;
}
image {
position: absolute;
top: 50%;
left: 20%;
transform: translateY(-50%);
width: 48rpx;
height: 41rpx;
}
}
.item:nth-child(2) {
background: #FFA115;
}
}
}
.banner {
display: block;
width: 94%;
height: 350rpx;
margin: 20rpx auto 0;
}
}
</style>

36
pagesC/login/login.scss Normal file
View File

@ -0,0 +1,36 @@
.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;
}
}

112
pagesC/login/login.vue Normal file
View File

@ -0,0 +1,112 @@
<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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
static/pagesB/tuwen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/pagesB/zhuanjia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB