修复了部分bug

This commit is contained in:
2025-02-13 10:39:12 +08:00
parent a35ad49431
commit ea0d35007a
24 changed files with 827 additions and 588 deletions

14
.idea/UniappTool.xml generated Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
<option name="basePath" value="$PROJECT_DIR$" />
<option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
<option name="scanNum" value="1" />
<option name="type" value="store" />
<option name="uniapp" value="true" />
<option name="uniappHx" value="true" />
<option name="vueVersion" value="2" />
</component>
</project>

View File

@@ -0,0 +1,31 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="class" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
<item index="6" class="java.lang.String" itemvalue="u-swiper" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
</profile>
</component>

6
.idea/jsLibraryMappings.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<excludedPredefinedLibrary name="uni-api" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -5,7 +5,6 @@
export default {
// //初始化状态-如果登录过,保持登录状态
onLaunch: async function() {
// console.log('App Launch')
const version = 4 // 如果当前版本和后台返回的版本一致,那就是审核中,审核通过后 后台设置加1如果后台的比本地的大 那就是生产版本
const res = await getVersion()
const val = Number(res.data.data.value)
@@ -30,7 +29,7 @@
// 获取小程序更新机制兼容
// 获取小程序更新机制兼容
if (uni.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
// 检查是否有新版本发布
@@ -52,7 +51,7 @@
content: '我们已经做了新的优化,请及时更新哦~',
showCancel: false, //隐藏取消按钮也可显示取消会走res.cancel然后从新开始提示
success: function(res) {
//第二次提示后,强制更新
//第二次提示后,强制更新
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
@@ -99,7 +98,6 @@
const doctors_id = decodeURIComponent(e.query.scene).split('=')
uni.setStorageSync('doctors_id', st_id[0].split('su_id=')[1])
uni.setStorageSync('st_id', doctors_id[2])
console.log(scene, '2222');
// console.log(scene[1], '4444');
}
// const scene = decodeURIComponent(e.query.scene).split('STORE_QR_CODE_')
@@ -120,4 +118,4 @@
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
@import url("static/iconfont/index.css");
</style>
</style>

18
package-lock.json generated
View File

@@ -1,8 +1,20 @@
{
"name": "xk-client-wx",
"lockfileVersion": 3,
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"uview-ui": {
"packages": {
"": {
"dependencies": {
"js-base64": "^3.7.7",
"uview-ui": "^1.8.8"
}
},
"node_modules/js-base64": {
"version": "3.7.7",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.7.tgz",
"integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw=="
},
"node_modules/uview-ui": {
"version": "1.8.8",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz",
"integrity": "sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg=="

View File

@@ -1,5 +1,6 @@
{
"dependencies": {
"js-base64": "^3.7.7",
"uview-ui": "^1.8.8"
}
}

View File

@@ -7,14 +7,6 @@
},
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/home/home",
"style": {
// "navigationBarTitleText": "custom"
"navigationStyle": "default",
"navigationBarBackgroundColor": "#298DFF",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "萧康互联网医院",
@@ -24,6 +16,15 @@
},
"needLogin": false
},
{
"path": "pages/home/home",
"style": {
// "navigationBarTitleText": "custom"
"navigationStyle": "default",
"navigationBarBackgroundColor": "#298DFF",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/home/index-list",
"style": {
@@ -457,4 +458,4 @@
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}
}

View File

@@ -169,7 +169,6 @@
this.show = true
}
console.log(e, 666);
},
// 立即购买
tocartPay() {
@@ -180,7 +179,6 @@
},
//点击药品一级分类
handleCategory1(e, index) {
console.log('handleCategory1')
this.num = e
this.category_first = e - 1
this.selectIndex = index
@@ -190,17 +188,12 @@
this.category_second = 7
}
this.getDrugList()
console.log(e);
},
//点击药品二级分类
handleCategory2(e) {
console.log('handleCategory2', this.selectIndex, this.current)
this.current = e
this.category_second = e - 3
this.getDrugList()
console.log(e);
},
//获取药品分类
@@ -213,7 +206,6 @@
}).then((res) => {
// console.log(res, 'list');
if (res.data.code == 0) {
console.log(res.data.data[0]);
this.drugCategoryLists = res.data.data
this.category_first = res.data.data.map(x => x.id)
this.num = res.data.data[0].id //初始选中
@@ -234,9 +226,6 @@
// console.log(res, 'list');
if (res.data.code == 0) {
this.drugLists = res.data.data
console.log(res.data)
}
})

View File

@@ -11,11 +11,10 @@ export default {
},
onLoad(e) {
this.url = decodeURIComponent(e.id)
console.log(this.url,'aaaaaaaaaaaa')
// 传入需要跳转的链接 使用web-view标签进行跳转
}
}
</script>
<style>
</style>
</style>

View File

@@ -150,45 +150,35 @@
],
info: [],
bgShow: false,
isShow_envVersion: false
isShow_envVersion: true
}
},
onLoad() {
setInterval(() => {
this.isShow_envVersion = uni.getStorageSync('isShow_envVersion')
if (this.isShow_envVersion == false) {
if (this.doctorList.length == 0) {
this.getList();
}
const token = uni.getStorageSync('token')
const userInfo = uni.getStorageSync('userinfo')
if (!token || !userInfo) {
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/home/index'
})
}
this.isShow_envVersion = uni.getStorageSync('isShow_envVersion')
if (this.isShow_envVersion === false) {
if (this.doctorList.length === 0) {
this.getList();
}
}, 500)
}
},
created() {
const token = uni.getStorageSync('token')
const userInfo = uni.getStorageSync('userinfo')
setTimeout(function () {
if (!token || !userInfo) {
// console.log('token');
// if (this.isShow_envVersion) {
// uni.navigateTo({
// url: '/pages/home/index'
// })
// } else {
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }
// uni.navigateTo({
// url: '/pages/home/index'
// })
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/login/login'
})
}
}, 300)
if (!token || !userInfo) {
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/home/index'
})
}
},
onReady() {
@@ -228,6 +218,13 @@
},
// 线上复诊
golist() {
// 提醒用户正在开发
uni.showToast({
title: '正在开发中',
icon: 'none',
duration: 2000
})
return;
// this.bgShow = true
let that = this
if (!this.flag) {
@@ -274,7 +271,6 @@
},
}).then((res) => {
if (res.data.errcode == 0) {
console.log(res.data.data.token, 'h5-token');
// uni.setStorageSync('platform_id', res.data.data.platform_id)
uni.setStorageSync('token_platform_id', res.data.data.token)
} else {
@@ -351,17 +347,15 @@
uni.setNavigationBarTitle({
title: this.headerTitle,
success() {
console.log(7777);
},
fail() {
console.log(77888);
this.getStore()
}
});
uni.setNavigationBarColor({
frontColor: '#000000', //前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
})
this.getList();
// this.getList();
this.getBannered();
}
})
@@ -391,13 +385,12 @@
uni.setNavigationBarTitle({
title: this.headerTitle,
success() {
console.log(3333);
}
});
uni.setNavigationBarColor({
frontColor: '#000000', //前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
})
this.getList();
// this.getList();
this.getBannered();
}
@@ -408,9 +401,9 @@
url: '/pages/home/index'
})
} else {
uni.navigateTo({
url: '/pages/login/login'
})
uni.navigateTo({
url: '/pages/home/index'
})
}
}
})
@@ -425,17 +418,19 @@
// 医生列表
getList() {
doctorList({
method: "post",
data: {
store_id: uni.getStorageSync('stores_id') || uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
// console.log(res, 'list');
if (res.data.errcode == 0) {
this.doctorList = (res.data.data.list).slice(0, 3)
}
})
if (this.doctorList?.length <= 0) {
doctorList({
method: "post",
data: {
store_id: uni.getStorageSync('stores_id') || uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
// console.log(res, 'list');
if (res.data.errcode === 0) {
this.doctorList = (res.data.data.list).slice(0, 3)
}
})
}
},
// 切换门店
@@ -984,4 +979,4 @@
}
}
}
</style>
</style>

View File

@@ -56,34 +56,33 @@
</view>
<view class="doctor_list" v-if="isShow_envVersion" @click="gologin">
商品列表
<view class="info">
更多 <text class="iconfont icon-jiantou1"></text>
</view>
</view>
<!-- <view class="doctor_list" v-if="isShow_envVersion" @click="gologin">-->
<!-- 商品列表-->
<!-- <view class="info">-->
<!-- 更多 <text class="iconfont icon-jiantou1"></text>-->
<!-- </view>-->
<!-- </view>-->
<!-- 医生列表 -->
<view class="list" @click="gologin" v-if="isShow_envVersion">
<!-- 图片部分 -->
<view class="list_info">
<view class="list_left">
<image src="https://p3.maiyaole.com/img/971/971752/org_org.jpg?v=1" mode=""></image>
<view class="it">
<view class="it_name">日康对乙酰氨基酚片0.3g*12*2/</view>
<view class="it_info">清热解毒,咽喉肿痛,牙痛</view>
<view class="it_price">
<text>34.00</text>
<text class="num">x1</text>
</view>
</view>
</view>
</view>
<!-- <view class="list" @click="gologin" v-if="isShow_envVersion">-->
<!-- &lt;!&ndash; 图片部分 &ndash;&gt;-->
<!-- <view class="list_info">-->
<!-- <view class="list_left">-->
<!-- <image src="https://p3.maiyaole.com/img/971/971752/org_org.jpg?v=1" mode=""></image>-->
<!-- <view class="it">-->
<!-- <view class="it_name">日康对乙酰氨基酚片0.3g*12*2/</view>-->
<!-- <view class="it_info">清热解毒,咽喉肿痛,牙痛</view>-->
<!-- <view class="it_price">-->
<!-- <text>34.00</text>-->
<!-- <text class="num">x1</text>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<view class="list" @click="gologin" v-if="isShow_envVersion">
<!-- 图片部分 -->
<!-- <view class="list" @click="gologin" v-if="isShow_envVersion">
&lt;!&ndash; 图片部分 &ndash;&gt;
<view class="list_info">
<view class="list_left">
<image src="https://p2.maiyaole.com/img/item/202210/24/202210241042513.jpg" mode=""></image>
@@ -98,7 +97,7 @@
</view>
</view>
</view>
</view>-->
<view class="" v-if="isShow_envVersion==false">
<view class="lists" @click="gologin" v-for="(item,index) in doctorList" :key="item.id">
@@ -163,10 +162,20 @@
onLoad() {
setInterval(() => {
this.isShow_envVersion = uni.getStorageSync('isShow_envVersion')
}, 500)
})
},
created() {
// 如果有token存着就跳转到home
if (uni.getStorageSync('token')) {
// 如果有token存着就跳转到home
uni.reLaunch({
url: "/pages/home/home",
success() {
uni.hideLoading();
}
})
}
},
methods: {
gologin() {
@@ -212,7 +221,6 @@
store_id: uni.getStorageSync('stores_id') || '11001',
}
}).then((res) => {
console.log(res, 'info');
if (res.data.errcode == 0) {
this.info = res.data.data
this.list = (res.data.data.nav).map((item) => {
@@ -616,4 +624,4 @@
}
}
}
</style>
</style>

View File

@@ -1,397 +1,379 @@
<template>
<view class="container safe-area-inset-bottom">
<view class="none">
<!-- 授权登录 -->
<view class="conter">
<view class="title">
欢迎登录
</view>
<image src="@/static/empty/login.png" mode="aspectFit"></image>
<button class="btn" :class="form['check']?'':'bg'" :disabled="!form['check']" open-type="getPhoneNumber"
@getphonenumber="getToLogin">手机号一键登录</button>
<view class="container safe-area-inset-bottom">
<view class="none">
<!-- 授权登录 -->
<view class="conter">
<view class="title">
欢迎登录
</view>
<image src="@/static/empty/login.png" mode="aspectFit"></image>
<!-- <button class="btn" :class="form['check']?'':'bg'" :disabled="!form['check']" open-type="getPhoneNumber"-->
<!-- @getphonenumber="getToLogin">手机号一键登录</button>-->
<button class="btn" :class="form['check']?'':'bg'" :disabled="!form['check']"
@click="getToLogin">一键登录</button>
<view class="word">
<u-icon size="35" :color="form['check']?'#2979FF':'#E5E5E5'" name="checkmark-circle-fill"
@click="form['check']=!form['check']"></u-icon>
<view class="agreement">
我已阅读并同意
<text @click="getInfo(1)">用户服务协议</text>
<text @click="getInfo(2)">隐私政策</text>
</view>
</view>
<view class="text" @click="back">取消登录</view>
<view class="word">
<u-icon size="35" :color="form['check']?'#2979FF':'#E5E5E5'" name="checkmark-circle-fill"
@click="form['check']=!form['check']"></u-icon>
<view class="agreement">
我已阅读并同意
<text @click="getInfo(1)">用户服务协议</text>
<text @click="getInfo(2)">隐私政策</text>
</view>
</view>
<view class="text" @click="back">取消登录</view>
<!-- <view class="footer" @click="toLogon">
输入其他手机号码注册
</view> -->
</view>
</view>
<!-- <view class="footer" @click="toLogon">
输入其他手机号码注册
</view> -->
</view>
</view>
<u-popup v-model="show" :safe-area-inset-bottom="true" mode="bottom" height="88%" border-radius="20"
:closeable="true">
<view class="agreen">
<u-parse :html="content"></u-parse>
</view>
</u-popup>
<u-popup v-model="show" :safe-area-inset-bottom="true" mode="bottom" height="88%" border-radius="20"
:closeable="true">
<view class="agreen">
<u-parse :html="content"></u-parse>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getAgreem,
getLogin,
getsLogin
} from '../../request/api/api.js'
import {
getAgreem,
getLogin,
getsLogin
} from '../../request/api/api.js'
export default {
data() {
return {
code: "",
form: {
check: false
},
encryptedData: "",
iv: "",
session_key: "",
show: false,
content: ``,
type: 1,
id: 1,
isShow_envVersion: uni.getStorageSync('isShow_envVersion')
}
},
onLoad(e) {
this.type = e.type
this.id = e.id
uni.removeStorageSync('token')
uni.removeStorageSync('userinfo')
},
created() {
},
methods: {
back() {
uni.navigateBack({ delta: 1 })
},
getPhoneNumber(e) {
uni.showLoading({
title: "加载中"
});
export default {
data() {
return {
code: "",
form: {
check: false
},
encryptedData: "",
iv: "",
session_key: "",
show: false,
content: ``,
type: 1,
id: 1,
isShow_envVersion: uni.getStorageSync('isShow_envVersion')
}
},
onLoad(e) {
this.type = e.type
this.id = e.id
uni.removeStorageSync('token')
uni.removeStorageSync('userinfo')
},
created() {
if (!this.form['check']) {
uni.showToast({
icon: "error",
title: '请勾选协议'
})
return
}
},
methods: {
back() {
if (e.detail.errMsg && e.detail.errMsg == 'getPhoneNumber:fail user deny') {
// uni.showToast({
// icon: "error",
// title: '未获取手机号码'
// })
this.$refs.uToast.show({
title: '未获取手机号码',
type: 'default',
icon: false
})
return
}
uni.navigateTo({
url: "/pages/home/index",
fail: (e) => {
// console.log(e);
},
success() {
}
})
// uni.navigateBack({ delta: 1 })
},
getPhoneNumber(e) {
uni.showLoading({
title: "加载中"
});
this.encryptedData = e.detail.encryptedData; //需要解密的内容
this.iv = e.detail.iv; //偏移量
this.code = e.detail.code
// console.log(e);
if (!this.form['check']) {
uni.showToast({
icon: "error",
title: '请勾选协议'
})
return
}
let data = {
iv: this.iv,
encryptedData: this.encryptedData,
code: this.code,
store_id: '11001'
}
getLogin({
method: 'post',
data: data
}).then((res) => {
// console.log(res, 'login');
if (res.data.errcode == 0) {
if (this.type == 1) {
uni.navigateTo({
url: "/pages/home/index-list?id=" + this.id,
fail: (e) => {
// console.log(e);
},
success() {
uni.showToast({
title: '登陆成功',
duration: 2000
});
uni.hideLoading();
}
})
return
}
// 进入h5 token是登录返回的platform_token user_id是萧康的用户id
uni.setStorageSync('token_h5', res.data.data.plate_token)
if (e.detail.errMsg && e.detail.errMsg == 'getPhoneNumber:fail user deny') {
// uni.showToast({
// icon: "error",
// title: '未获取手机号码'
// })
this.$refs.uToast.show({
title: '未获取手机号码',
type: 'default',
icon: false
})
return
}
// setTimeout(() => {
// this.getH5();
// }, 100)
uni.reLaunch({
url: "/pages/home/home",
fail: (e) => {
// console.log(e);
},
success() {
uni.showToast({
title: '登陆成功',
duration: 2000
});
uni.hideLoading();
}
})
} else {
uni.showToast({
icon: "error",
title: res.data.msg
})
}
})
},
this.encryptedData = e.detail.encryptedData; //需要解密的内容
this.iv = e.detail.iv; //偏移量
this.code = e.detail.code
// console.log(e);
toLogon() {
uni.navigateTo({
url: '/pages/login/logon',
fail: function(res) {
// console.log(res);
}
})
},
let data = {
iv: this.iv,
encryptedData: this.encryptedData,
code: this.code,
store_id: '11001'
}
getLogin({
method: 'post',
data: data
}).then((res) => {
// console.log(res, 'login');
if (res.data.errcode == 0) {
if (this.type == 1) {
uni.navigateTo({
url: "/pages/home/index-list?id=" + this.id,
fail: (e) => {
// console.log(e);
},
success() {
uni.showToast({
title: '登陆成功',
duration: 2000
});
uni.hideLoading();
}
})
return
}
// 进入h5 token是登录返回的platform_token user_id是萧康的用户id
uni.setStorageSync('token_h5', res.data.data.plate_token)
// 协议
getInfo(e) {
this.show = true
// setTimeout(() => {
// this.getH5();
// }, 100)
uni.reLaunch({
url: "/pages/home/home",
fail: (e) => {
// console.log(e);
},
success() {
uni.showToast({
title: '登陆成功',
duration: 2000
});
uni.hideLoading();
}
})
} else {
uni.showToast({
icon: "error",
title: res.data.msg
})
}
})
},
getAgreem({
method: "post",
data: {
end: 1,
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
// console.log(res);
toLogon() {
uni.navigateTo({
url: '/pages/login/logon',
fail: function(res) {
// console.log(res);
}
})
},
if (e == 1) {
this.content = res.data.data[0].content
} else {
this.content = res.data.data[1].content
}
})
},
// 协议
getInfo(e) {
this.show = true
getToLogin(e) {
uni.login({
provider: 'weixin',
success: (loginRes) => {
this.code = loginRes.code
// console.log(loginRes.code);
getsLogin({
method: "post",
data: {
code: this.code,
status: 1
}
}).then((res) => {
// console.log(res, "res");
if (res.data.errcode == 0) {
uni.setStorageSync('token', res.data.data.token) //存储token
uni.setStorageSync('user_id', res.data.data.data.user.id)
uni.setStorageSync('userinfo', res.data.data.data['user'])
uni.setStorageSync('store_id', res.data.data.data.store_id)
getAgreem({
method: "post",
data: {
end: 1,
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
// console.log(res);
if (e == 1) {
this.content = res.data.data[0].content
} else {
this.content = res.data.data[1].content
}
})
},
getToLogin(e) {
uni.login({
provider: 'weixin',
success: (loginRes) => {
this.code = loginRes.code
// console.log(loginRes.code);
getsLogin({
method: "post",
data: {
code: this.code,
status: 1
}
}).then((res) => {
// console.log(res, "res");
if (res.data.errcode == 0) {
uni.setStorageSync('token', res.data.data.token) //存储token
uni.setStorageSync('user_id', res.data.data.data.user.id)
uni.setStorageSync('userinfo', res.data.data.data['user'])
uni.setStorageSync('store_id', res.data.data.data.store_id)
if (res.data.data.data.user.mobile != '') {
setTimeout(function () {
uni.reLaunch({
url: '/pages/home/home'
})
}, 500)
} else {
this.getPhoneNumber(e);
}
if (res.data.data.data.user.mobile != '') {
setTimeout(function () {
uni.reLaunch({
url: '/pages/home/home'
})
}, 500)
} else {
// this.getPhoneNumber(e);
}
} else if (res.data.errcode != 0) {
// uni.showToast({
// icon: "error",
// title: res.data.msg
// })
this.$refs.uToast.show({
title: res.data.msg,
type: 'default',
icon: false
})
}
})
}
})
},
// subScriptionMessage() {
// },
// getH5() {
// // 进入token
// uni.request({
// url: 'https://hy.api.ctkj88.com/platform/v1/user/login',
// header: {
// "authorization": uni.getStorageSync(
// "token_h5"),
// "Content-Type": "application/x-www-form-urlencoded"
// },
// method: 'POST',
// timeout: 10000,
// data: {
// user_id: uni.getStorageSync('user_id')
// },
// success: (res) => {
// // console.log(res, 'h5-token');
// // uni.setStorageSync('platform_id', res.data.data.platform_id)
// uni.setStorageSync('token_platform_id', res.data.data.token)
// },
// fail(res) {
// // console.log(res, 'fail-h5');
// }
// })
// }
},
mounted() {
const token = uni.getStorageSync('token')
const user_id = uni.getStorageSync('user_id')
const userInfo = uni.getStorageSync('userinfo')
const token_h5 = uni.getStorageSync('token_h5')
if (token && user_id && userInfo && token_h5) {
uni.reLaunch({
url: "/pages/home/home",
})
} else {
uni.removeStorageSync('token')
uni.removeStorageSync('user_id')
}
}
}
} else if (res.data.errcode != 0) {
// uni.showToast({
// icon: "error",
// title: res.data.msg
// })
this.$refs.uToast.show({
title: res.data.msg,
type: 'default',
icon: false
})
}
})
}
})
},
},
mounted() {
const token = uni.getStorageSync('token')
const user_id = uni.getStorageSync('user_id')
const userInfo = uni.getStorageSync('userinfo')
const token_h5 = uni.getStorageSync('token_h5')
if (token && user_id && userInfo && token_h5) {
uni.reLaunch({
url: "/pages/home/home",
})
} else {
uni.removeStorageSync('token')
uni.removeStorageSync('user_id')
}
}
}
</script>
<style lang="scss" scoped>
.text {
margin-top: 20rpx;
color: #666;
margin-top: 20rpx;
color: #666;
}
.container {
width: 100vw;
height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
.container {
width: 100vw;
height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
.none {
width: 750rpx;
padding-top: 100rpx;
background: linear-gradient(180deg, #EAF2FF 0%, #FFFFFF 100%);
.none {
width: 750rpx;
padding-top: 100rpx;
background: linear-gradient(180deg, #EAF2FF 0%, #FFFFFF 100%);
.conter {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0rpx auto 380rpx;
.conter {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0rpx auto 380rpx;
image {
width: 431rpx;
height: 339rpx;
vertical-align: middle;
margin-bottom: 110rpx;
}
image {
width: 431rpx;
height: 339rpx;
vertical-align: middle;
margin-bottom: 110rpx;
}
.title {
font-size: 48rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
margin-bottom: 114rpx;
}
.title {
font-size: 48rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
margin-bottom: 114rpx;
}
.word {
display: flex;
flex-direction: row;
color: #475569;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-top: 34rpx;
.word {
display: flex;
flex-direction: row;
color: #475569;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-top: 34rpx;
.agreement {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6C7380;
margin-left: 16rpx;
.agreement {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #6C7380;
margin-left: 16rpx;
text {
color: #2979FF;
size: 24rpx;
}
}
}
text {
color: #2979FF;
size: 24rpx;
}
}
}
.footer {
width: 710rpx;
height: 90rpx;
line-height: 90rpx;
position: fixed;
bottom: 60rpx;
left: 0;
text-align: center;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
margin: 0 auto;
}
.footer {
width: 710rpx;
height: 90rpx;
line-height: 90rpx;
position: fixed;
bottom: 60rpx;
left: 0;
text-align: center;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
margin: 0 auto;
}
.btn {
width: 648rpx;
height: 88rpx;
background: #4175EE;
line-height: 88rpx;
font-size: 32rpx;
text-align: center;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 400;
color: #FFFFFF;
border-radius: 64rpx;
}
.btn {
width: 648rpx;
height: 88rpx;
background: #4175EE;
line-height: 88rpx;
font-size: 32rpx;
text-align: center;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 400;
color: #FFFFFF;
border-radius: 64rpx;
}
.bg {
width: 648rpx;
height: 88rpx;
background: #8ABAFF;
line-height: 88rpx;
font-size: 32rpx;
text-align: center;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 400;
color: #FFFFFF;
border-radius: 64rpx;
}
}
.bg {
width: 648rpx;
height: 88rpx;
background: #8ABAFF;
line-height: 88rpx;
font-size: 32rpx;
text-align: center;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 400;
color: #FFFFFF;
border-radius: 64rpx;
}
}
}
}
.agreen {
padding: 60rpx 50rpx 20rpx;
}
}
</style>
.agreen {
padding: 60rpx 50rpx 20rpx;
}
}
</style>

22
pnpm-lock.yaml generated Normal file
View File

@@ -0,0 +1,22 @@
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
uview-ui:
specifier: ^1.8.8
version: 1.8.8
packages:
uview-ui@1.8.8:
resolution: {integrity: sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg==, tarball: https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz}
snapshots:
uview-ui@1.8.8: {}

View File

@@ -1,6 +1,6 @@
import http from './request'
// 登录 授权 其他手机号授权
// 登录 授权 其他手机号授权
export async function getsLogin(params) {
let data = await http('/oldApi/v1/user/login', params)
return data
@@ -19,7 +19,7 @@ export async function getCodes(params) {
return data
}
// 登录
// 登录
export async function getLogon(params) {
let data = await http('/oldApi/v1/user/phone-number', params)
return data
@@ -281,7 +281,7 @@ export async function getseesionRead(params) {
return data
}
// 消息-医生信息列表
// 消息-医生信息列表
export async function getseesionDoctorList(params) {
let data = await http('/oldApi/v1/system-notice/doctor-news', params)
return data
@@ -412,7 +412,7 @@ export async function PayList(params) {
let data = await http('/newApi/order/submit', params)
return data
}
//获取支付配置
//获取支付配置
// export async function getPayConfig(params) {
// let data = await http('/newApi/order/getPay', params)
// return data
@@ -428,7 +428,7 @@ export async function getPayConfig(params) {
// return data
// }
// 取消订单 https://app.xiaokang88.com/member/v1/product-order/cancel
// 取消订单 https://app.xiaokang88.com/member/v1/product-order/cancel
export async function getCancle(params) {
let data = await http('/oldApi/v1/product-order/cancel', params)
return data
@@ -480,13 +480,11 @@ export async function getLogistics(params) {
export async function confirmAccept(params) {
let data = await http('/newApi/order/confirm', params)
return data
}
//清空购物车
export async function clearAll(params) {
let data = await http('/newApi/cart/clearAll', params)
return data
}
export async function getVersion(params) {

View File

@@ -1,51 +1,183 @@
import {Base64} from "js-base64";
const arr = [
'mobile',
'express_mobile',
'doctor',
'accept_tel',
'patient_mobile',
'id_card',
'idcard',
'password'
]
// 敏感数据
const sensitiveData = [
'id_card',
'idcard'
]
function request(url, params) {
let baseURL = "https://app.xiaokang88.com/member"
if (url.split('/').indexOf('newApi') !== -1) {
baseURL = "https://shop.xiaokang88.com/member"
let baseURL = "https://app.xiaokang88.com/member"
// let baseURL = "http://www.xk888.com/member"
if (url.split('/').indexOf('newApi') !== -1) {
baseURL = "https://shop.xiaokang88.com/member"
}
url = url.replace('/oldApi', '');
url = url.replace('/newApi', '');
}
url = url.replace('/oldApi', '');
url = url.replace('/newApi', '');
// 加密
if (params != null) {
params.data = getRes(params.data, false)
}
let num = 0;
// promise导出
return new Promise((resolve, reject) => {
uni.request({
// 基地址 + 传过来的地址
url: baseURL + url,
timeout: 8000, // 8秒超时时间单位ms
// 展开传过来的数据 请求方式 所需数据 wxfc279dcf921a38f7
// store_id: '11001'
...params,
// 请求头
header: {
"authorization": 'Bearer ' + uni.getStorageSync("token"),
"Content-Type": "application/x-www-form-urlencoded"
},
// promise导出
return new Promise((resolve, reject) => {
uni.request({
// 基地址 + 传过来的地址
url: baseURL + url,
timeout: 8000, // 8秒超时时间单位ms
// 展开传过来的数据 请求方式 所需数据 wxfc279dcf921a38f7
// store_id: '11001'
...params,
// 请求头
header: {
"authorization": 'Bearer ' + uni.getStorageSync("token"),
"Content-Type": "application/x-www-form-urlencoded"
},
// 成功钩子
success(res) {
if (res.data.errcode === 401) {
// 获取当前页面,如果不是 /pages/home/index
if (getCurrentPages()[getCurrentPages().length - 1].route !== 'pages/home/index') {
uni.removeStorageSync('token')
uni.removeStorageSync('userinfo')
uni.removeStorageSync('token_h5')
uni.removeStorageSync('user_id')
uni.reLaunch({url: '/pages/home/index'})
}
}
if (res.data?.data != null) {
res.data.data = getRes(res.data.data)
}
resolve(res)
},
// 失败钩子
fail(err) {
reject(err)
uni.showToast({
title: "请求失败",
duration: 1500,
mask: false,
icon: "error"
})
},
// 成功失败都会执行的钩子
complete() {
// 成功或者失败停止下拉刷新
uni.stopPullDownRefresh()
}
})
})
}
// 成功钩子
success(res) {
if (res.data.errcode === 401) {
uni.reLaunch({ url: '/pages/login/login' })
}
resolve(res)
},
// 失败钩子
fail(err) {
reject(err)
uni.showToast({
title: "请求失败",
duration: 1500,
mask: false,
icon:"error"
})
},
// 成功失败都会执行的钩子
complete() {
// 成功或者失败停止下拉刷新
uni.stopPullDownRefresh()
}
})
})
function getRes(obj, isDecode = true) {
try {
for (const key in obj) {
if (Array.isArray(obj[key])) {
obj[key] = getRes(obj[key])
} else if (typeof obj[key] === 'object') {
obj[key] = getRes(obj[key])
} else {
// 判断obj[key]是否在arr中
if (arr.indexOf(key) !== -1) {
let aseFile = ''
if (isDecode === true) {
aseFile = customBase64Decode(obj[key])
} else {
aseFile = customBase64Encode(obj[key])
}
const isGarbled = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\xFF]|[\u{E000}-\u{F8FF}]/u.test(
typeof aseFile === 'string' ? aseFile : ''
)
if (isGarbled) {
aseFile = obj[key]
}
// 为了修改,暂时不脱敏
if (isDecode === true) {
if (sensitiveData.indexOf(key) !== -1) {
// 数据脱敏,自动匹配姓名、手机号、身份证
switch (key) {
case 'express_name':
case 'express_region':
case 'accept_name':
case 'patient':
// 保留前两个字符,其余用星号代替
aseFile = aseFile.slice(0, 1).padEnd(aseFile.length, '*');
break;
case 'mobile':
case 'express_mobile':
// 保留前三位和后四位,中间用星号代替
aseFile = aseFile.slice(0, 3).padEnd(aseFile.length - 4, '*') + aseFile.slice(-4);
break;
case 'id_card':
case 'idcard':
// 保留前六位和后四位,中间用星号代替
aseFile = aseFile.slice(0, 6).padEnd(aseFile.length - 4, '*') + aseFile.slice(-4);
break;
default:
// 默认情况下,全部用星号代替
break;
}
}
}
obj[key] = aseFile
}
}
}
return obj
} catch (error) {
console.error('错误:', error)
return obj
}
}
function customBase64Decode(data) {
// return data
try {
// 第一次Base64解码
const decodedFirst = Base64.decode(data)
// 截取从第30个字符开始往后的内容
const subStr = decodedFirst.slice(30)
// 第二次Base64解码
return Base64.decode(subStr) != '' ? Base64.decode(subStr) : data
} catch (error) {
console.error(`解码Base64字符串【${data}】时发生错误`, error)
return data
}
}
// 加密
function customBase64Encode(data) {
if (data == null || data === '') return data
// return data
try {
// 和加密方法差不多但是是要生成30个随机字符
let randomString = ''
for (let i = 0; i < 30; i++) {
const randomChar = String.fromCharCode(Math.floor(Math.random() * (126 - 32 + 1)) + 32)
randomString += randomChar
}
const encoded = Base64.encode(data)
return Base64.encode(randomString + encoded)
} catch (error) {
console.error(`加密字符串【${data}】时发生错误`, error)
return data
}
}
// 导出

View File

@@ -66,7 +66,7 @@
</u-radio>
</u-radio-group>
</view>
<view class="tabs" v-if="allergicList[0]!=''">
<view class="tabs" v-if="allergicList[0]!='' && allergic === '有'">
<u-tag bg-color="#2979FF" color="#FFFFFF" v-for="(item,index) in allergicList" :key="index"
:text="item" mode="dark" />
</view>
@@ -81,7 +81,7 @@
</u-radio>
</u-radio-group>
</view>
<view class="tabs" v-if="personList[0]!=''">
<view class="tabs" v-if="personList[0]!='' && person === '有'">
<u-tag bg-color="#2979FF" color="#FFFFFF" v-for="(item,index) in personList" :key="index"
:text="item" mode="dark" />
</view>
@@ -96,7 +96,7 @@
</d-radio>
</u-radio-group>
</view>
<view class="tabs" v-if="familyList[0]!=''">
<view class="tabs" v-if="familyList[0]!='' && family === '有'">
<u-tag bg-color="#2979FF" color="#FFFFFF" v-for="(item,index) in familyList" :key="index"
:text="item" mode="dark" />
</view>
@@ -182,7 +182,7 @@
return {
...item,
age: this.getAge(item.id_card),
// age: this.getAge(item.id_card),
}
})
return list
@@ -345,15 +345,15 @@
this.allergic = (this.heathList.allergic_status) % 2 == 0 ? '无' : '有'
this.allergicList = (this.heathList.allergic_history) == 'Array' ? [] : (this.heathList
.allergic_history).split(',')
.allergic_history)
this.person = (this.heathList.person_status) % 2 == 0 ? '无' : '有'
this.personList = (this.heathList.person_history) == 'Array' ? [] : (this.heathList
.person_history).split(',')
.person_history)
this.family = (this.heathList.family_status) % 2 == 0 ? '无' : '有'
this.familyList = (this.heathList.family_history) == 'Array' ? [] : (this.heathList
.family_history).split(',')
.family_history)
}
})
},
@@ -737,4 +737,4 @@
}
}
}
</style>
</style>

View File

@@ -65,10 +65,11 @@
<!-- 西药 -->
<view class="item_info" v-if="item.prescription_type==2">
<view class="item_info" v-if="item.prescription_type==2||item.prescription_type==5">
<view class="new_store">
<text class="iconfont icon-mendian"></text>{{item.store.name}} &nbsp;&nbsp;&nbsp;
<u-tag text="西(中成)药" :type="item.prescription_type==2&&'primary'" size="mini"
<text class="iconfont icon-mendian"></text>
<text style="width: 70%;overflow-x: hidden">{{item.store.name}}</text>
<u-tag :text="item.prescription_type == 2? '西(中成)药': '产品服务包'" :type="(item.prescription_type==2||item.prescription_type==5)&&'primary'" size="mini"
style="margin-left: 20rpx;" />
</view>
<view class="info" v-for="it in (item.items).slice(0,3)" :key="it.id">
@@ -104,33 +105,36 @@
@tap.stop="toCancel(item.id,item.status,refundType)">
退款
</view>
<view class="order_info active" v-if="item.status==6||item.status==7 && item.forbiddenRefund==0"
<view class="order_info active" v-else-if="item.status==6||item.status==7 && item.forbiddenRefund==0"
@tap.stop="toCancel(item.id,item.status,refundType)">
申请售后
</view>
<view class="order_info active" v-if="item.status==0 && item.is_pay==0 && item.cancel_status==0"
<view class="order_info active" v-else-if="item.status==0 && item.is_pay==0 && item.cancel_status==0"
@tap.stop="next(item.id)">
支付
</view>
<view class="order_info active" v-if="item.status==2 && item.is_pay==1" @tap.stop="getReceive(item.id)">
<view class="order_info active" v-else-if="item.status==2 && item.is_pay==1" @tap.stop="getReceive(item.id)">
签收
</view>
<view class="order_info active" v-if="item.is_pay==0 && item.status==0 && item.cancel_status==0"
<view class="order_info active" v-else-if="item.is_pay==0 && item.status==0 && item.cancel_status==0"
@tap.stop="goCancel(item.id)">
取消
</view>
<view class="order_info" v-if="item.status==9 || item.cancel_status==1">
<view class="order_info" v-else-if="item.status==9 || item.cancel_status==1">
已取消
</view>
<view class="order_info" v-else-if="item.status==4">
已退款
</view>
<view class="order_info color_red"
v-if="item.refund_status==4 && item.cancel_status==0 && item.is_pay==1">
v-else-if="item.refund_status==4 && item.cancel_status==0 && item.is_pay==1">
退款被拒
</view>
<view class="order_info" v-if="item.status>=4&& item.is_pay==1&&item.status<=5 && item.prescription_type==2">
<view class="order_info" v-else-if="item.status>=4&& item.is_pay==1&&item.status<=5 && item.prescription_type==2">
{{item.status==5&&'退款中' || item.status==4&&'已退款' }}
</view>
<!-- -->
<view class="order_info active" v-if="item.status>=1 && item.is_pay==1 && item.cancel_status==0" @tap.stop="toDevilty(item.id)">
<view class="order_info active" v-else-if="(item.status===1||item.status===2||item.status===6||item.status===7) && item.is_pay==1 && item.cancel_status==0" @tap.stop="toDevilty(item.id)">
查看物流
</view>
</view>
@@ -172,7 +176,7 @@
keyword: "",
status: -1,
current: 0, // 状态
orderList: [], // 订单列表
orderList: [], // 订单列表
id: "", // 订单id
page: 1, // 当前页数
total: "", // 总条数
@@ -732,4 +736,4 @@
}
}
}
</style>
</style>

View File

@@ -6,8 +6,8 @@
头像
</view>
<view class="images">
<u-avatar class="img" :src="avatar" shape="circle" @click="changeUserPhoto"></u-avatar>
<text class="iconfont icon-jiantou1" @click="changeUserPhoto"></text>
<u-avatar class="img" :src="avatar" shape="circle" @click="changeUserPhoto()"></u-avatar>
<text class="iconfont icon-jiantou1" @click="changeUserPhoto()"></text>
</view>
</view>
<!-- 卡片 -->
@@ -92,11 +92,13 @@
// 点击头像触发click事件 changeUserPhoto
changeUserPhoto() {
console.log('进入更新头像的功能')
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'],
success: (res) => {
console.log('图片选择成功')
uni.showLoading({
title: '请稍后...'
})
@@ -115,7 +117,7 @@
type: 'default',
icon: false
})
return
}
uni.uploadFile({
@@ -143,7 +145,13 @@
})
}
});
}
},
fail: (err) => {
console.error('选择图片失败:', err);
},
complete: () => {
console.log('选择图片完成');
}
})
},
@@ -186,7 +194,7 @@
})
this.getInfo()
}, 1000)
setTimeout(() => {
uni.navigateBack({
delta: 1
@@ -296,4 +304,4 @@
margin: 80rpx auto;
}
}
</style>
</style>

View File

@@ -9,26 +9,26 @@
<!-- 姓名 -->
<view class="card_name">
<text>姓名</text>
<u-input v-model="names" input-align="right" placeholder="请输入真实姓名"
<u-input disabled v-model="names" input-align="right" placeholder="请输入真实姓名"
placeholder-style="text-align:right;color: #94A3B8;" :type="type" />
</view>
<!-- 身份证号 -->
<view class="card_name">
<text>身份证号</text>
<u-input v-model="form.identityCardNo" maxlength="18" input-align="right" placeholder="已经填写无法修改,请慎重填写"
<u-input disabled v-model="form.identityCardNo" maxlength="18" input-align="right" placeholder="已经填写无法修改,请慎重填写"
placeholder-style="text-align:right;color: #94A3B8;padding-right:5px;" @input="inputChange"
:type="type" />
</view>
<!-- 性别 -->
<view class="card_name">
<text>性别</text>
<u-input v-model="form.sex" input-align="right" placeholder="-"
<u-input disabled v-model="form.sex" input-align="right" placeholder="-"
placeholder-style="text-align:right;color: #94A3B8;" :type="type" />
</view>
<!-- 年龄 -->
<view class="card_name">
<text>年龄</text>
<u-input v-model="form.age" input-align="right" placeholder="-"
<u-input disabled v-model="form.age" input-align="right" placeholder="-"
placeholder-style="text-align:right;color: #94A3B8;" :type="type" />
</view>
@@ -403,16 +403,19 @@
},
// 过敏史
addAller() {
this.addtext = ''
this.show = true
this.addNum = 1
},
// 个人病史
addPer() {
this.addtext = ''
this.show = true
this.addNum = 2
},
// 家庭病史
addFmaily() {
this.addtext = ''
this.show = true
this.addNum = 3
},
@@ -424,20 +427,18 @@
name: this.addtext
}
this.$set(this.familyList.push(obj))
this.addtext = ""
} else if (this.addNum == 1 && this.addtext != "") {
let obj = {
name: this.addtext
}
this.$set(this.allergicList.push(obj))
this.addtext = ""
} else if (this.addNum == 2 && this.addtext != "") {
let obj = {
name: this.addtext
}
this.$set(this.personList.push(obj))
this.addtext = ""
}
this.addtext = ""
},
// 过敏史
tapInfo(e, item) {
@@ -1133,4 +1134,4 @@
}
}
}
</style>
</style>

View File

@@ -1,7 +1,6 @@
<template>
<view class="container safe-area-inset-bottom">
<view class="all" v-if="status==1">
<view class="all" v-if="status==1||status==4">
<!-- 处方 -->
<view class="head">
<view class="head_record_top">
@@ -114,7 +113,7 @@
</view>
</block>
<block v-if="data.prescription_type==2">
<block v-if="data.prescription_type==2||data.prescription_type == 5">
<view class="item" v-for="(it,index) in infoList.repice" :key="item.id">
<!-- v-for="(it,index) in item.content" :key="it.id" -->
<view class="name" style="justify-content: space-between;">
@@ -125,7 +124,7 @@
</view>
<text>x{{ it.number}}</text>
</view>
<view class="details">
<view class="details" v-if="data.prescription_type==2">
<text>用法{{ it.instruction }}</text>
</view>
</view>
@@ -199,14 +198,14 @@
<!-- 温馨提示 -->
<view class="my_prompt">
<view class="titles">
{{status==1&&'温馨提示,请遵医嘱服药!处方'+data.valid_hours+'小时内有效!'|| status==3&&'温馨提示请遵医嘱服药你的处方已过48小时'}}
{{status==1&&'温馨提示,请遵医嘱服药!处方'+data.valid_hours+'小时内有效!'|| status==3&&'温馨提示请遵医嘱服药你的处方已过48小时' || status==4&&'本处方为产品服务包'}}
</view>
<image src="/static/group/sx.png" class="image" mode="" v-if="status==3"></image>
<image src="/static/group/sx.png" class="image" v-if="status==3"></image>
</view>
<!-- 状态 -->
<view class="my_state" v-if="status==1&&data.is_pay==0&&data.cancel_status==0">
<view class="my_state" v-if="(status==1||status==4)&&data.is_pay==0&&data.cancel_status==0">
<view class="btn" @click="toAppion">
预约购药
</view>
@@ -278,7 +277,7 @@
</view>
<!-- 状态 -->
<view class="my_state" v-if="status==0&&data.is_pay==0&&data.cancel_status==0">
<view class="my_state" v-if="(status==0||status==4)&&data.is_pay==0&&data.cancel_status==0">
<view class="btn" @click="toAppions">
预约购药
</view>
@@ -302,7 +301,8 @@
1: '已通过',
2: '未通过',
3: '待使用',
4: '已使用',
// 4: '已使用',
4: '无需审核',
5: '未使用',
6: '已失效',
7: '已初审'
@@ -385,7 +385,7 @@
}).then((res) => {
// console.log(res, 'deta');
if (res.data.errcode == 0) {
if (res.data.errcode === 0) {
this.infoList = res.data.data.content
this.rpList = res.data.data.pharmacistInfo
this.status = res.data.data.status
@@ -1023,4 +1023,4 @@
}
}
}
</style>
</style>

View File

@@ -20,8 +20,9 @@
<text>{{item.created_at}}</text>
<text class="text" v-if="item.status==1">已通过</text>
<text class="text" v-if="item.status==4">无需审核</text>
<text class="txt"
v-if="item.status!=1">{{item.status==0&&'待审核'||item.status==2&&'未通过'|| item.status==3&&'已失效'}}</text>
v-if="item.status!=1&& item.status!==4">{{item.status==0&&'待审核'||item.status==2&&'未通过'|| item.status==3&&'已失效'}}</text>
</view>
<view class="info">
<view class="list_name">
@@ -135,7 +136,7 @@
// this.infoList = res.data.data.list
this.totalPage = res.data.data.pagination.totalPage
this.total = res.data.data.pagination.total
if (this.page > 1) {
this.infoList = [...this.infoList, ...res.data.data.list]
} else {
@@ -355,4 +356,4 @@
}
}
</style>
</style>

View File

@@ -161,7 +161,8 @@
<text @click="toShow">知情同意书</text>
</view>
</view>
<button class="to_pay" @click="toPay">立即支付</button>
<button v-if="flag === true" class="to_pay" @click="toPay">立即支付</button>
<button v-else class="to_pay_disabled" :disabled="true">立即支付</button>
</view>
<u-toast ref="uToast" />
</view>
@@ -376,7 +377,7 @@
url: '/subPackages/setup/area-list?id=' + this.p_id + '&order_id=' + this.order_id
})
},
getKnow() {
service({
method: "get",
@@ -399,17 +400,18 @@
icon: "error",
title: '请勾选协议'
})
that.flag = false
return
}
let that = this
if (this.flag) {
this.flag = false
if (that.flag) {
that.flag = false
// 获取支付配置
getPayConfig({
method: "post",
data: {
order_id: this.order_id,
order_id: that.order_id,
store_id: uni.getStorageSync('store_id'),
}
}).then((res) => {
@@ -418,7 +420,7 @@
title: "加载中"
});
if (res.data.errcode == 0) {
if (res.data.errcode === 0) {
uni.requestPayment({
provider: res.data.data.appId,
@@ -434,6 +436,7 @@
uni.navigateTo({
url: '/subPackages/my/my-drug/drug-list'
})
uni.hideLoading();
}, 300)
},
@@ -454,24 +457,22 @@
mask: false,
icon: 'error'
})
that.flag = false
return
}
uni.navigateTo({
url: '/subPackages/my/my-drug/drug-list'
})
uni.hideLoading();
}, 1000)
that.flag = true
}, 500)
}
})
}else{
uni.hideLoading();
this.$refs.uToast.show({
that.$refs.uToast.show({
title: res.data.msg,
type: 'default',
icon: false
})
that.flag = false
that.flag = true
}
if (res.data.code == 1) {
@@ -483,11 +484,12 @@
// mask: false,
// icon: 'error'
// })
this.$refs.uToast.show({
that.$refs.uToast.show({
title: res.data.msg,
type: 'default',
icon: false
})
that.flag = true
}
})
@@ -664,10 +666,16 @@
}
.choose_area {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
font-size: 24rpx;
font-family: 'PingFang SC', sans-serif; /* 确保字体兼容性 */
font-weight: 400;
color: #232323;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 设置最大行数为2 */
overflow: hidden;
line-height: 1.5; /* 根据需要调整行高 */
word-break: break-all; /* 确保长单词或URL地址换行 */
}
}
@@ -920,7 +928,17 @@
color: #FFFFFF;
text-align: center;
}
.to_pay_disabled {
width: 690rpx;
height: 84rpx;
line-height: 84rpx;
background: #8a9bf8;
border-radius: 64rpx;
color: #FFFFFF;
text-align: center;
}
}
}
</style>
</style>

13
yarn.lock Normal file
View File

@@ -0,0 +1,13 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
js-base64@^3.7.7:
version "3.7.7"
resolved "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.7.tgz"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==
uview-ui@^1.8.8:
version "1.8.8"
resolved "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz"
integrity sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg==