diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml
new file mode 100644
index 0000000..13fa6e3
--- /dev/null
+++ b/.idea/UniappTool.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..93b1467
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..c27af06
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.vue b/App.vue
index a6cde5c..4614aae 100644
--- a/App.vue
+++ b/App.vue
@@ -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");
-
\ No newline at end of file
+
diff --git a/package-lock.json b/package-lock.json
index 70d798e..79da191 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -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=="
diff --git a/package.json b/package.json
index 09c8670..f0f1b34 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"dependencies": {
+ "js-base64": "^3.7.7",
"uview-ui": "^1.8.8"
}
}
diff --git a/pages.json b/pages.json
index 7129925..be6ebf1 100644
--- a/pages.json
+++ b/pages.json
@@ -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": {}
-}
\ No newline at end of file
+}
diff --git a/pages/cate/cate.vue b/pages/cate/cate.vue
index cf06267..9dcd042 100644
--- a/pages/cate/cate.vue
+++ b/pages/cate/cate.vue
@@ -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)
}
})
diff --git a/pages/home/home-banner.vue b/pages/home/home-banner.vue
index f33d34e..dba5d55 100644
--- a/pages/home/home-banner.vue
+++ b/pages/home/home-banner.vue
@@ -11,11 +11,10 @@ export default {
},
onLoad(e) {
this.url = decodeURIComponent(e.id)
- console.log(this.url,'aaaaaaaaaaaa')
// 传入需要跳转的链接 使用web-view标签进行跳转
}
}
\ No newline at end of file
+
diff --git a/pages/home/home.vue b/pages/home/home.vue
index e345a6e..0f0ab48 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -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 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/home/index.vue b/pages/home/index.vue
index a78f971..2f9e669 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -56,34 +56,33 @@
-
- 商品列表
-
- 更多
-
-
+
+
+
+
+
+
-
-
-
-
-
-
- 【日康】对乙酰氨基酚片0.3g*12片*2板/盒
- 清热解毒,咽喉肿痛,牙痛
-
- ¥34.00
- x1
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
@@ -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 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 605e399..da29a1f 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -1,397 +1,379 @@
-
-
-
-
-
- 欢迎登录
-
-
-
+
+
+
+
+
+ 欢迎登录
+
+
+
+
+
-
-
-
- 我已阅读并同意
- 《用户服务协议》
- 和
- 《隐私政策》
-
-
- 取消登录
+
+
+
+ 我已阅读并同意
+ 《用户服务协议》
+ 和
+ 《隐私政策》
+
+
+ 取消登录
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
\ No newline at end of file
+ .agreen {
+ padding: 60rpx 50rpx 20rpx;
+ }
+}
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
new file mode 100644
index 0000000..7052cd7
--- /dev/null
+++ b/pnpm-lock.yaml
@@ -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: {}
diff --git a/request/api/api.js b/request/api/api.js
index a8753d7..fd1c6ce 100644
--- a/request/api/api.js
+++ b/request/api/api.js
@@ -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) {
diff --git a/request/api/request.js b/request/api/request.js
index 130ffe5..6f73f2d 100644
--- a/request/api/request.js
+++ b/request/api/request.js
@@ -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
+ }
}
// 导出
diff --git a/subPackages/doctor/doctor-userinfo.vue b/subPackages/doctor/doctor-userinfo.vue
index 2fe7ff1..a207445 100644
--- a/subPackages/doctor/doctor-userinfo.vue
+++ b/subPackages/doctor/doctor-userinfo.vue
@@ -66,7 +66,7 @@
-
+
@@ -81,7 +81,7 @@
-
+
@@ -96,7 +96,7 @@
-
+
@@ -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 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/my-drug/drug-list.vue b/subPackages/my/my-drug/drug-list.vue
index 70787ee..a661cd8 100644
--- a/subPackages/my/my-drug/drug-list.vue
+++ b/subPackages/my/my-drug/drug-list.vue
@@ -65,10 +65,11 @@
-
+
- {{item.store.name}}
-
+ {{item.store.name}}
+
@@ -104,33 +105,36 @@
@tap.stop="toCancel(item.id,item.status,refundType)">
退款
-
申请售后
-
支付
-
+
签收
-
取消
-
+
已取消
+
+ 已退款
+
+ v-else-if="item.refund_status==4 && item.cancel_status==0 && item.is_pay==1">
退款被拒
-
+
{{item.status==5&&'退款中' || item.status==4&&'已退款' }}
-
+
查看物流
@@ -172,7 +176,7 @@
keyword: "",
status: -1,
current: 0, // 状态
- orderList: [], // 订单列表
+ orderList: [], // 订单列表
id: "", // 订单id
page: 1, // 当前页数
total: "", // 总条数
@@ -732,4 +736,4 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/mycollection.vue b/subPackages/my/mycollection.vue
index 24e09e6..c67ef8a 100644
--- a/subPackages/my/mycollection.vue
+++ b/subPackages/my/mycollection.vue
@@ -6,8 +6,8 @@
头像
-
-
+
+
@@ -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;
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/myinfo-edit.vue b/subPackages/my/myinfo-edit.vue
index 0210626..bc72e74 100644
--- a/subPackages/my/myinfo-edit.vue
+++ b/subPackages/my/myinfo-edit.vue
@@ -9,26 +9,26 @@
姓名
-
身份证号
-
性别
-
年龄
-
@@ -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 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/myrecord-detail.vue b/subPackages/my/myrecord-detail.vue
index 02e12fc..e8ff7e6 100644
--- a/subPackages/my/myrecord-detail.vue
+++ b/subPackages/my/myrecord-detail.vue
@@ -1,7 +1,6 @@
-
-
+
@@ -114,7 +113,7 @@
-
+
@@ -125,7 +124,7 @@
x{{ it.number}}
-
+
用法:{{ it.instruction }}
@@ -199,14 +198,14 @@
- {{status==1&&'温馨提示,请遵医嘱服药!处方'+data.valid_hours+'小时内有效!'|| status==3&&'温馨提示,请遵医嘱服药!你的处方已过48小时'}}
+ {{status==1&&'温馨提示,请遵医嘱服药!处方'+data.valid_hours+'小时内有效!'|| status==3&&'温馨提示,请遵医嘱服药!你的处方已过48小时' || status==4&&'本处方为产品服务包'}}
-
+
-
+
预约购药
@@ -278,7 +277,7 @@
-
+
预约购药
@@ -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 @@
}
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/myrecord.vue b/subPackages/my/myrecord.vue
index 78dfdb0..01ef377 100644
--- a/subPackages/my/myrecord.vue
+++ b/subPackages/my/myrecord.vue
@@ -20,8 +20,9 @@
{{item.created_at}}
已通过
+ 无需审核
{{item.status==0&&'待审核'||item.status==2&&'未通过'|| item.status==3&&'已失效'}}
+ v-if="item.status!=1&& item.status!==4">{{item.status==0&&'待审核'||item.status==2&&'未通过'|| item.status==3&&'已失效'}}
@@ -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 @@
}
}
-
\ No newline at end of file
+
diff --git a/subPackages/my/record-pay.vue b/subPackages/my/record-pay.vue
index 89c1c00..df729d8 100644
--- a/subPackages/my/record-pay.vue
+++ b/subPackages/my/record-pay.vue
@@ -161,7 +161,8 @@
《知情同意书》
-
+
+
@@ -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;
+ }
}
}
-
\ No newline at end of file
+
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..327cd1e
--- /dev/null
+++ b/yarn.lock
@@ -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==