fix: 修复了一些东西,新增了方法
This commit is contained in:
8
.idea/inspectionProfiles/Project_Default.xml
generated
8
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -14,7 +14,7 @@
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="10">
|
||||
<list size="16">
|
||||
<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" />
|
||||
@@ -25,6 +25,12 @@
|
||||
<item index="7" class="java.lang.String" itemvalue="u-radio-group" />
|
||||
<item index="8" class="java.lang.String" itemvalue="u-radio" />
|
||||
<item index="9" class="java.lang.String" itemvalue="u-icon" />
|
||||
<item index="10" class="java.lang.String" itemvalue="u-button" />
|
||||
<item index="11" class="java.lang.String" itemvalue="u-picker" />
|
||||
<item index="12" class="java.lang.String" itemvalue="u-form" />
|
||||
<item index="13" class="java.lang.String" itemvalue="u-form-item" />
|
||||
<item index="14" class="java.lang.String" itemvalue="u-checkbox-group" />
|
||||
<item index="15" class="java.lang.String" itemvalue="u-checkbox" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
|
||||
32
App.vue
32
App.vue
@@ -4,6 +4,7 @@
|
||||
} from './request/api/api'
|
||||
import { webSocketManager } from '@/utils/ws/websocket.js';
|
||||
import {checkDev} from "@/utils/utils";
|
||||
import {bindUserApi} from "@/request/api/salesperson";
|
||||
export default {
|
||||
// //初始化状态-如果登录过,保持登录状态
|
||||
onLaunch: async function() {
|
||||
@@ -100,14 +101,41 @@
|
||||
return {};
|
||||
|
||||
const scene = decodeURIComponent(e.query.scene)
|
||||
// 这里接收扫码参数
|
||||
if (scene) {
|
||||
// 判断scene中是否包含sal_id
|
||||
let isSalespersonId = decodeURIComponent(e.query.scene).includes('sal_id');
|
||||
const scene = decodeURIComponent(e.query.scene).split('STORE_QR_CODE_')
|
||||
uni.setStorageSync('stores_id', scene[1])
|
||||
if (scene[1]) {
|
||||
uni.setStorageSync('stores_id', scene[1])
|
||||
uni.setStorageSync('store_id', scene[1])
|
||||
}
|
||||
// uni.setStorageSync('stores_id', scene[1])
|
||||
const st_id = decodeURIComponent(e.query.scene).split('&')
|
||||
let store_id = decodeURIComponent(e.query.scene).split('STORE_QR_CODE_')
|
||||
store_id = decodeURIComponent(store_id[1]).split('&')
|
||||
const doctors_id = decodeURIComponent(e.query.scene).split('=')
|
||||
if (store_id[0] !== 'undefined') {
|
||||
uni.setStorageSync('stores_id', store_id[0])
|
||||
uni.setStorageSync('store_id', store_id[0])
|
||||
}
|
||||
uni.setStorageSync('doctors_id', st_id[0].split('su_id=')[1])
|
||||
if (isSalespersonId) {
|
||||
uni.setStorageSync('sal_id', st_id[1].split('sal_id=')[1])
|
||||
}
|
||||
uni.setStorageSync('st_id', doctors_id[2])
|
||||
// console.log(scene[1], '4444');
|
||||
|
||||
let userId = uni.getStorageSync('user_id')
|
||||
if (isSalespersonId && userId) {
|
||||
bindUserApi({
|
||||
user_id: userId,
|
||||
salesperson_id: st_id[1].split('sal_id=')[1],
|
||||
}).then((res) => {
|
||||
console.log('userId', userId, st_id[0].split('su_id=')[1], res);
|
||||
})
|
||||
}
|
||||
// console.log(st_id, '4444111111111');
|
||||
// console.log(scene, '4444');
|
||||
}
|
||||
// const scene = decodeURIComponent(e.query.scene).split('STORE_QR_CODE_')
|
||||
// console.log(scene, '11111');
|
||||
|
||||
986
pages.json
986
pages.json
@@ -1,488 +1,502 @@
|
||||
{
|
||||
"easycom": {
|
||||
// 下载安装方式
|
||||
// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
|
||||
// npm安装方式
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||
},
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/home/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康互联网医院",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#298DFF",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"needLogin": false
|
||||
},
|
||||
{
|
||||
"path": "pages/home/home",
|
||||
"style": {
|
||||
// "navigationBarTitleText": "custom"
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor": "#298DFF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/index-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康互联网医院"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/home-banner",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康互联网医院"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "授权登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#EAF2FF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cate/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康资讯"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/cate/info-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文章详情"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "消息"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/system",
|
||||
"style": {
|
||||
"navigationBarTitleText": "系统消息"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/order-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/doctor-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生消息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/mine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的",
|
||||
"navigationBarBackgroundColor": "#4175EE",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/login/logon",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/Inquiries/Inquiries",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
// "needLogin": true
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "doctor/doctor-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生简介",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-evaluation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "患者评价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-picture",
|
||||
"style": {
|
||||
"navigationBarTitleText": "图文问诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/appraise",
|
||||
"style": {
|
||||
"navigationBarTitleText": "评价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-userinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择就诊人",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor_newsinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生消息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "my/myinfo-add",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加就诊人",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myrecord-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "处方详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/record-pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约购药",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/unpaid-order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myreport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "检查报告",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "就诊人管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my_online",
|
||||
"style": {
|
||||
"navigationBarTitleText": "线上复诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/mystore",
|
||||
"style": {
|
||||
"navigationStyle": "default",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/mycollection",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myabout",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myorder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "问诊记录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myrecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "处方记录",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myappiont",
|
||||
"style": {
|
||||
"navigationBarTitleText": "挂号记录",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myinfo-edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/drug-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品订单",
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/drug-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/to-next",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "register/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认挂号信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "register/register-success",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认挂号信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "register/register-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "挂号详情",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "shop/orders",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商城订单",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/search-home",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康诊所门店"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/search-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康诊所门店"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/orders-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/shop-cate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/shop-pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/paied",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认付款信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/paied-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/written",
|
||||
"style": {
|
||||
"navigationBarTitleText": "买家留言"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/after-sales",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请售后"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/logistics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "物流详情"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "setup/filed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/choose-area",
|
||||
"style": {
|
||||
"navigationBarTitleText": "管理地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/area-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/fw-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "服务协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/ys-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/zz-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "资质证照"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/customer-service",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客服中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "chat/chat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "在线问诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"fontSize": "18px",
|
||||
"height": "60px",
|
||||
"spacing": "4px",
|
||||
"backgroundColor": "#fff",
|
||||
"selectedColor": "#1575FC",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "static/home/02.png",
|
||||
"selectedIconPath": "static/home/01.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cate/index",
|
||||
"text": "资讯",
|
||||
"iconPath": "static/home/03.png",
|
||||
"selectedIconPath": "static/home/04.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "消息",
|
||||
"iconPath": "static/home/05.png",
|
||||
"selectedIconPath": "static/home/06.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/mine",
|
||||
"text": "我的",
|
||||
"iconPath": "static/home/07.png",
|
||||
"selectedIconPath": "static/home/08.png"
|
||||
}
|
||||
],
|
||||
"color": ""
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
// "navigationBarTitleText": "萧康互联网医院",
|
||||
"navigationBarBackgroundColor": "#F8FAFC",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
"easycom": {
|
||||
// 下载安装方式
|
||||
// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
|
||||
// npm安装方式
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||
},
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/home/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "惠佑康",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#298DFF",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"needLogin": false
|
||||
},
|
||||
{
|
||||
"path": "pages/home/home",
|
||||
"style": {
|
||||
// "navigationBarTitleText": "custom"
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor": "#298DFF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/index-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "惠佑康"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/home-banner",
|
||||
"style": {
|
||||
"navigationBarTitleText": "惠佑康"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "授权登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#EAF2FF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cate/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "健康资讯"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/cate/info-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文章详情"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "消息"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/system",
|
||||
"style": {
|
||||
"navigationBarTitleText": "系统消息"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/index/order-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/doctor-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生消息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/mine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的",
|
||||
"navigationBarBackgroundColor": "#4175EE",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
// "needLogin": true
|
||||
},
|
||||
{
|
||||
"path": "pages/login/logon",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/Inquiries/Inquiries",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生列表",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
// "needLogin": true
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "doctor/doctor-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生简介",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-evaluation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "患者评价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-picture",
|
||||
"style": {
|
||||
"navigationBarTitleText": "图文问诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/appraise",
|
||||
"style": {
|
||||
"navigationBarTitleText": "评价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor-userinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择就诊人",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "doctor/doctor_newsinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "医生消息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product/product",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购药",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product/symptoms",
|
||||
"style": {
|
||||
"navigationBarTitleText": "填写病症",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "my/myinfo-add",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加就诊人",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myrecord-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "处方详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/record-pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约购药",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/unpaid-order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myreport",
|
||||
"style": {
|
||||
"navigationBarTitleText": "检查报告",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "就诊人管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my_online",
|
||||
"style": {
|
||||
"navigationBarTitleText": "线上复诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/mystore",
|
||||
"style": {
|
||||
"navigationStyle": "default",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#1777FF",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/mycollection",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人资料",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myabout",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myorder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "问诊记录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myrecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "处方记录",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myappiont",
|
||||
"style": {
|
||||
"navigationBarTitleText": "挂号记录",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/myinfo-edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑信息",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/drug-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品订单",
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/drug-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "my/my-drug/to-next",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "register/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认挂号信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "register/register-success",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认挂号信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "register/register-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "挂号详情",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "shop/orders",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商城订单",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/search-home",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康诊所门店"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/search-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "萧康诊所门店"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/orders-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/shop-cate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/shop-pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/paied",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认付款信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/paied-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/written",
|
||||
"style": {
|
||||
"navigationBarTitleText": "买家留言"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/after-sales",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请售后"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shop/logistics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "物流详情"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "subPackages",
|
||||
"pages": [
|
||||
{
|
||||
"path": "setup/filed",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/choose-area",
|
||||
"style": {
|
||||
"navigationBarTitleText": "管理地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/area-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/fw-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "服务协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/ys-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/zz-serve",
|
||||
"style": {
|
||||
"navigationBarTitleText": "资质证照"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "setup/customer-service",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客服中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "chat/chat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "在线问诊",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"fontSize": "18px",
|
||||
"height": "60px",
|
||||
"spacing": "4px",
|
||||
"backgroundColor": "#fff",
|
||||
"selectedColor": "#1575FC",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "static/home/02.png",
|
||||
"selectedIconPath": "static/home/01.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cate/index",
|
||||
"text": "资讯",
|
||||
"iconPath": "static/home/03.png",
|
||||
"selectedIconPath": "static/home/04.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "消息",
|
||||
"iconPath": "static/home/05.png",
|
||||
"selectedIconPath": "static/home/06.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/mine",
|
||||
"text": "我的",
|
||||
"iconPath": "static/home/07.png",
|
||||
"selectedIconPath": "static/home/08.png"
|
||||
}
|
||||
],
|
||||
"color": ""
|
||||
},
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
// "navigationBarTitleText": "萧康互联网医院",
|
||||
"navigationBarBackgroundColor": "#F8FAFC",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list_right">挂号</view>
|
||||
<view class="list_right">{{ typeMap[type] }}</view>
|
||||
</view>
|
||||
<!-- 文字部分 -->
|
||||
<view class="card">
|
||||
@@ -134,6 +134,12 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeMap: {
|
||||
0: '挂号',
|
||||
1: '咨询',
|
||||
2: '复诊',
|
||||
3: '购药',
|
||||
},
|
||||
dropdownMask: true,
|
||||
show: false,
|
||||
keyword: "",
|
||||
@@ -228,11 +234,27 @@
|
||||
},
|
||||
// 医生id
|
||||
goLookDoctor(id) {
|
||||
if (this.type === '2') {
|
||||
return uni.navigateTo({
|
||||
url: '/subPackages/product/product?doctor_id=' + id + '®ister_type=2'
|
||||
})
|
||||
} else if (this.type === '3') {
|
||||
console.log(this.type, 'sssssssssssssssssssss')
|
||||
return uni.navigateTo({
|
||||
url: '/subPackages/product/product?doctor_id=' + id + '®ister_type=3'
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/doctor/doctor-detail?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
goProduct() {
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/product/product?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
// 医生列表
|
||||
getList() {
|
||||
doctorList({
|
||||
|
||||
@@ -35,28 +35,61 @@
|
||||
</view>
|
||||
|
||||
<!-- 导航栏 -->
|
||||
<view class="nav">
|
||||
<view class="nav_service" @click="goYard">
|
||||
<view class="nav" v-if="storeType === '0'">
|
||||
<view class="nav_service" @click="goYard(1)">
|
||||
<view class="nav_service_img">
|
||||
<image src="../../static/home/bg1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
挂号咨询
|
||||
</view>
|
||||
<!-- 挂号咨询-->
|
||||
到店挂号
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nav_service" @click="golist">
|
||||
<view class="nav_service_img">
|
||||
<image src="../../static/home/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
线上复诊
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="nav_service" @click="golist(2)">-->
|
||||
<!-- <view class="nav_service_img">-->
|
||||
<!-- <image src="../../static/home/bg2.png" mode=""></image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="nav_service_title">-->
|
||||
<!-- 线上复诊-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="nav_service" @click="golist(3)">
|
||||
<view class="nav_service_img">
|
||||
<image src="../../static/home/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
预约购药
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <!– 导航栏第二行 –>-->
|
||||
<!-- <view class="nav">-->
|
||||
<!-- <view class="nav_service" @click="golist(3)">-->
|
||||
<!-- <view class="nav_service_img">-->
|
||||
<!-- <image src="../../static/home/bg2.png" mode=""></image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="nav_service_title">-->
|
||||
<!-- 预约购药-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- 导航栏第二行 -->
|
||||
<view class="nav" v-if="storeType === '1'">
|
||||
<view class="nav_service" @click="golist(3)">
|
||||
<view class="nav_service_img">
|
||||
<image src="../../static/home/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
预约购药
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="doctor_list" @click="goYard">
|
||||
<view v-if="storeType === '0'" class="doctor_list" @click="goYard(1)">
|
||||
医生列表
|
||||
<view class="info">
|
||||
更多 <text class="iconfont icon-jiantou1"></text>
|
||||
@@ -64,7 +97,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 医生列表 -->
|
||||
<view class="doctor-card" @click="goLookDoctor(item.id)" v-for="(item,index) in doctorList" :key="item.id">
|
||||
<view v-if="storeType === '0'" class="doctor-card" @click="goLookDoctor(item.id)" v-for="(item,index) in doctorList" :key="item.id">
|
||||
<view class="card-content">
|
||||
<!-- 医生头像 -->
|
||||
<image :src="item.avatar || '/static/mine/avatar_1.png'" mode="aspectFill" class="doctor-avatar"></image>
|
||||
@@ -108,6 +141,43 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 药店版本-->
|
||||
<!-- <view v-if="storeType === '1'" class="doctor_list" @click="golist(3)">-->
|
||||
<!-- 药品列表-->
|
||||
<!-- <view class="info">-->
|
||||
<!-- 更多 <text class="iconfont icon-jiantou1"></text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <!– 医生列表 –>-->
|
||||
<!-- <view v-if="storeType === '1'" class="doctor-card" @click="goLookDoctor(item.id)" v-for="(item,index) in doctorList" :key="item.id">-->
|
||||
<!-- <view class="card-content">-->
|
||||
<!-- <!– 医生头像 –>-->
|
||||
<!-- <image :src="item.avatar || '/static/mine/avatar_1.png'" mode="aspectFill" class="doctor-avatar"></image>-->
|
||||
|
||||
<!-- <!– 医生信息 –>-->
|
||||
<!-- <view class="doctor-info">-->
|
||||
<!-- <!– 姓名和职称 –>-->
|
||||
<!-- <view class="name-section">-->
|
||||
<!-- <text class="doctor-name">{{item.name}}</text>-->
|
||||
<!-- <view class="title-badge">{{item.title}}</view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- <!– 科室和医院 –>-->
|
||||
<!-- <view class="department-section">-->
|
||||
<!-- <text class="iconfont icon-location"></text>-->
|
||||
<!-- <text class="department">{{item.depart}} | {{item.store}}</text>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- <!– 擅长领域 –>-->
|
||||
<!-- <view class="expertise">-->
|
||||
<!-- <text class="expertise-label">擅长:</text>-->
|
||||
<!-- <text class="expertise-content">{{item.good_at}}</text>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
|
||||
<!-- 遮罩层 -->
|
||||
<view class="bg-" v-if="bgShow" @click="bgShow=false">
|
||||
@@ -129,6 +199,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeId: 0,
|
||||
storeType: 0,
|
||||
storeinfo: [],
|
||||
doctorList: [],
|
||||
show: true,
|
||||
@@ -178,7 +250,8 @@
|
||||
|
||||
},
|
||||
onReady() {
|
||||
if (uni.getStorageSync('stores_id')) {
|
||||
console.log(uni.getStorageSync('store_id'), '3')
|
||||
if (uni.getStorageSync('store_id')) {
|
||||
this.getStore();
|
||||
} else {
|
||||
this.goNewlist()
|
||||
@@ -193,11 +266,11 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goYard() {
|
||||
goYard(type) {
|
||||
//订阅消息
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/Inquiries/Inquiries?type=' + 1
|
||||
url: '/pages/Inquiries/Inquiries?type=' + type
|
||||
})
|
||||
// uni.requestSubscribeMessage({
|
||||
// tmplIds: ['JdSs08cMSiL17xwwHZ8fZ5UBUqeY0eKAuvyW7n4Fl20',
|
||||
@@ -213,44 +286,53 @@
|
||||
// })
|
||||
},
|
||||
// 线上复诊
|
||||
golist() {
|
||||
// 提醒用户正在开发
|
||||
uni.showToast({
|
||||
title: '正在开发中',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
golist(type) {
|
||||
if (type === 3) {
|
||||
return uni.navigateTo({
|
||||
url: '/subPackages/product/product?doctor_id=' + 39 + '®ister_type=3'
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
// url: '/subPackages/product/product'
|
||||
url: '/pages/Inquiries/Inquiries?type=' + type
|
||||
})
|
||||
return;
|
||||
// this.bgShow = true
|
||||
let that = this
|
||||
if (!this.flag) {
|
||||
this.getH5()
|
||||
this.flag = true
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
if (uni.getStorageSync('token_platform_id')) {
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/my/my_online',
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
that.flag = false;
|
||||
}, 200)
|
||||
uni.hideLoading();
|
||||
},
|
||||
fail: () => {
|
||||
setTimeout(() => {
|
||||
that.flag = false;
|
||||
}, 200)
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
}, 600)
|
||||
}
|
||||
// // 提醒用户正在开发
|
||||
// uni.showToast({
|
||||
// title: '正在开发中',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return;
|
||||
// // this.bgShow = true
|
||||
// let that = this
|
||||
// if (!this.flag) {
|
||||
// this.getH5()
|
||||
// this.flag = true
|
||||
// uni.showLoading({
|
||||
// title: "加载中"
|
||||
// });
|
||||
//
|
||||
// setTimeout(() => {
|
||||
// uni.hideLoading();
|
||||
// if (uni.getStorageSync('token_platform_id')) {
|
||||
// uni.navigateTo({
|
||||
// url: '/subPackages/my/my_online',
|
||||
// success: () => {
|
||||
// setTimeout(() => {
|
||||
// that.flag = false;
|
||||
// }, 200)
|
||||
// uni.hideLoading();
|
||||
// },
|
||||
// fail: () => {
|
||||
// setTimeout(() => {
|
||||
// that.flag = false;
|
||||
// }, 200)
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }, 600)
|
||||
// }
|
||||
},
|
||||
getH5() {
|
||||
// 进入token
|
||||
@@ -263,7 +345,7 @@
|
||||
nickname: uni.getStorageSync('userinfo')['nickname'],
|
||||
openid: uni.getStorageSync('userinfo')['openid'],
|
||||
session_key: uni.getStorageSync('userinfo')['session_key'],
|
||||
store_id: uni.getStorageSync('stores_id') || '11001',
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
},
|
||||
}).then((res) => {
|
||||
if (res.data.errcode == 0) {
|
||||
@@ -290,7 +372,7 @@
|
||||
},
|
||||
goLookDoctor(id, sts_id) {
|
||||
if (!sts_id) {
|
||||
let sts_id = uni.getStorageSync('stores_id') || uni.getStorageSync('store_id')
|
||||
let sts_id = uni.getStorageSync('store_id')
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -328,16 +410,17 @@
|
||||
|
||||
// 门店
|
||||
getStore() {
|
||||
if (uni.getStorageSync('stores_id')) {
|
||||
if (uni.getStorageSync('store_id')) {
|
||||
this.show = false
|
||||
storeInfo({
|
||||
method: "post",
|
||||
data: {
|
||||
store_id: uni.getStorageSync('stores_id') || '11001',
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}
|
||||
}).then((res) => {
|
||||
// console.log(res, 'info');
|
||||
if (res.data.errcode == 0) {
|
||||
this.storeType = res.data.data.store['type']
|
||||
this.infoList = res.data.data
|
||||
this.headerTitle = res.data.data.store['name']
|
||||
uni.setNavigationBarTitle({
|
||||
@@ -356,10 +439,14 @@
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(uni.getStorageSync('store_id'))
|
||||
this.goNewlist()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取绑定的用户诊所,选择最后登录的
|
||||
*/
|
||||
goNewlist() {
|
||||
storeList({
|
||||
method: "post",
|
||||
@@ -376,8 +463,10 @@
|
||||
this.getBannered();
|
||||
} else {
|
||||
this.storeinfo = res.data.data.list.filter((item) => item.is_online == 1)
|
||||
console.log(this.storeinfo, 'storeinfo')
|
||||
uni.setStorageSync('store_id', this.storeinfo[0].store.id)
|
||||
this.headerTitle = this.storeinfo[0].store['name']
|
||||
// this.storeType = this.storeinfo[0].store['type']
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.headerTitle,
|
||||
success() {
|
||||
@@ -418,12 +507,12 @@
|
||||
doctorList({
|
||||
method: "post",
|
||||
data: {
|
||||
store_id: uni.getStorageSync('stores_id') || uni.getStorageSync('store_id') || '11001',
|
||||
store_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)
|
||||
this.doctorList = (res.data.data.list).slice(0, 5)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -440,11 +529,11 @@
|
||||
if (res.data.errcode == 0) {
|
||||
this.getStore()
|
||||
this.getList();
|
||||
uni.showToast({
|
||||
title: '切换成功',
|
||||
duration: 2000,
|
||||
icon: "success"
|
||||
});
|
||||
// uni.showToast({
|
||||
// title: '切换成功',
|
||||
// duration: 2000,
|
||||
// icon: "success"
|
||||
// });
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -454,13 +543,15 @@
|
||||
getBanner({
|
||||
method: "post",
|
||||
data: {
|
||||
store_id: uni.getStorageSync('stores_id') || uni.getStorageSync('store_id') || '11001',
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}
|
||||
}).then((res) => {
|
||||
console.log(res, 'info');
|
||||
if (res.data.errcode == 0) {
|
||||
this.info = res.data.data
|
||||
this.urlInfo = res.data.data.nav
|
||||
this.storeType = res.data.data.type
|
||||
console.log(this.storeType)
|
||||
this.list = (res.data.data.nav).map((item) => {
|
||||
return item.pic
|
||||
})
|
||||
@@ -491,12 +582,14 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
console.log('加载js')
|
||||
const token = uni.getStorageSync('token')
|
||||
const id = uni.getStorageSync('stores_id')
|
||||
const id = uni.getStorageSync('store_id')
|
||||
const d_id = uni.getStorageSync('doctors_id')
|
||||
const d_store = uni.getStorageSync('st_id')
|
||||
if (token && id) {
|
||||
console.log('门店码');
|
||||
console.log(id, 'ssssss')
|
||||
this.toChang(id)
|
||||
}
|
||||
if (d_id && token && d_store) {
|
||||
@@ -504,8 +597,14 @@
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
console.log('显示')
|
||||
this.storeId = uni.getStorageSync('store_id');
|
||||
this.infoList = ""
|
||||
this.goNewlist()
|
||||
// this.goNewlist()
|
||||
// 获取门店信息
|
||||
this.getStore();
|
||||
// 获取医生列表
|
||||
this.getList();
|
||||
},
|
||||
// onUnload() {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<image src="../../static/home/bg1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
挂号咨询
|
||||
到店挂号
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<image src="../../static/home/bg2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="nav_service_title">
|
||||
线上复诊
|
||||
预约购药
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -218,7 +218,7 @@
|
||||
getBanner({
|
||||
method: "post",
|
||||
data: {
|
||||
store_id: uni.getStorageSync('stores_id') || '11001',
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.data.errcode == 0) {
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<!-- 在线问诊 - 用户-->
|
||||
<view v-if="checkDev('open-im')" v-for="item in imChat" :key="item.id" class="list" @click="goChat(item)">
|
||||
<view v-if="checkDev('open-im')" v-for="(item, index) in imChat" :key="item.id" class="list" @click="goChat(item, index)">
|
||||
<!-- 头像 -->
|
||||
<view class="avator">
|
||||
<view class="img">
|
||||
@@ -207,7 +207,10 @@ export default {
|
||||
// console.log(res, 'res');
|
||||
})
|
||||
},
|
||||
goChat(item) {
|
||||
goChat(item, index) {
|
||||
console.log(this.imChat, 'ssssssssss')
|
||||
console.log(item, 'ssssssssss')
|
||||
console.log(index, 'ssssssssss')
|
||||
uni.navigateTo({
|
||||
url: `/subPackages/chat/chat?room_id=${item.room_id}&nick_name=${item.nick_name}&user_id=${item.id}&avatar=${item.avatar}`
|
||||
})
|
||||
|
||||
@@ -45,15 +45,16 @@
|
||||
import {
|
||||
getAgreem,
|
||||
getLogin,
|
||||
getsLogin
|
||||
getsLogin, storeChange
|
||||
} from '../../request/api/api.js'
|
||||
import {bindUserApi} from "@/request/api/salesperson";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: "",
|
||||
form: {
|
||||
check: false
|
||||
check: true
|
||||
},
|
||||
encryptedData: "",
|
||||
iv: "",
|
||||
@@ -88,10 +89,15 @@ export default {
|
||||
// uni.navigateBack({ delta: 1 })
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
uni.showLoading({
|
||||
uni.loading({
|
||||
title: "加载中"
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
|
||||
uni.hideLoading();
|
||||
}, 800)
|
||||
return;
|
||||
if (!this.form['check']) {
|
||||
uni.showToast({
|
||||
icon: "error",
|
||||
@@ -205,6 +211,11 @@ export default {
|
||||
},
|
||||
|
||||
getToLogin(e) {
|
||||
|
||||
uni.showLoading({
|
||||
title: "登录中"
|
||||
});
|
||||
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
@@ -217,14 +228,34 @@ export default {
|
||||
status: 1
|
||||
}
|
||||
}).then((res) => {
|
||||
|
||||
uni.hideLoading();
|
||||
// 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 (uni.getStorageSync('salesperson_id')) {
|
||||
bindUserApi({
|
||||
user_id: res.data.data.data.user.id,
|
||||
salesperson_id: uni.getStorageSync('salesperson_id'),
|
||||
}).then((res) => {
|
||||
console.log(res, 'bindUserApi', res);
|
||||
})
|
||||
}
|
||||
if (uni.getStorageSync('store_id')) {
|
||||
|
||||
storeChange({
|
||||
method: "post",
|
||||
data: {
|
||||
store_id: uni.getStorageSync('store_id')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.setStorageSync('store_id', res.data.data.data.store_id)
|
||||
}
|
||||
if (res.data.data.data.user.mobile != '') {
|
||||
setTimeout(function () {
|
||||
uni.reLaunch({
|
||||
|
||||
20
request/api/order.js
Normal file
20
request/api/order.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import http from './request'
|
||||
import {get, post, uploadFile} from './http'
|
||||
|
||||
const prefix = '/order';
|
||||
/**
|
||||
* 获取扫码诊所的商品详情
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function genOrderApi(params) {
|
||||
return await post(`${prefix}/gen-order`, params, 3)
|
||||
}
|
||||
/**
|
||||
* 保存购药、复诊状态下的挂号信息
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function saveRegisterInfoApi(params) {
|
||||
return await post(`${prefix}/save-register-info`, params, 3)
|
||||
}
|
||||
@@ -25,11 +25,11 @@ function request(url, params, method = 0) {
|
||||
let baseURL = isDev === true? 'http://127.0.0.1:18000/member': "https://app.xiaokang88.com/member"
|
||||
// let baseURL = "http://127.0.0.1:18000/member"
|
||||
if (url.split('/').indexOf('imApi') !== -1) {
|
||||
baseURL = "http://127.0.0.1:12080/api"
|
||||
let baseURL = isDev === true? 'http://127.0.0.1:12080/api': "https://app.xiaokang88.com/member"
|
||||
// baseURL = "http://127.0.0.1:12080/api"
|
||||
baseURL = isDev === true? 'http://127.0.0.1:12080/api': "http://im.xiaokang88.com/api"
|
||||
}
|
||||
if (url.split('/').indexOf('newApi') !== -1) {
|
||||
baseURL = isDev === true? 'https://shop.xiaokang88.com/member': "https://shop.xiaokang88.com/member"
|
||||
baseURL = isDev === true? 'http://127.0.0.1:18018/member': "https://shop.xiaokang88.com/member"
|
||||
}
|
||||
if (url.split('/').indexOf('xkApi') !== -1) {
|
||||
baseURL = isDev === true? 'http://127.0.0.1:18001/api/mobile': "https://api.xiaokang88.com/api/mobile"
|
||||
|
||||
10
request/api/salesperson.js
Normal file
10
request/api/salesperson.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import http from './request'
|
||||
import {get, post, uploadFile} from './http'
|
||||
/**
|
||||
* 绑定推广员
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function bindUserApi(params) {
|
||||
return await post('/salesperson/bind-user', params, 3)
|
||||
}
|
||||
18
request/api/store.js
Normal file
18
request/api/store.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import http from './request'
|
||||
import {get, post, uploadFile} from './http'
|
||||
/**
|
||||
* 获取扫码诊所的商品列表
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getStoreDrugListBySalespersonApi(params) {
|
||||
return await get('/store/drug-list-by-salesperson', params, 3)
|
||||
}
|
||||
/**
|
||||
* 获取扫码诊所的商品详情
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getStoreDrugDetailApi(params) {
|
||||
return await get('/store/product-detail', params, 3)
|
||||
}
|
||||
10
request/api/tmp.js
Normal file
10
request/api/tmp.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import http from './request'
|
||||
import {get, post, uploadFile} from './http'
|
||||
/**
|
||||
* 绑定推广员
|
||||
* @param params
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function bindUserApi(params) {
|
||||
return await post('/salesperson/bind-user', params, 3)
|
||||
}
|
||||
@@ -153,7 +153,7 @@
|
||||
} else {
|
||||
// 点击详情
|
||||
this.doctorID = e.id
|
||||
const id = e.sts_id || uni.getStorageSync('stores_id')
|
||||
const id = e.sts_id || uni.getStorageSync('store_id')
|
||||
if (id!='undefined' && id) {
|
||||
console.log('idddd');
|
||||
this.toChang(id)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="container safe-area-inset-bottom">
|
||||
<!-- 标题 -->
|
||||
<view class="title">
|
||||
您需要为谁挂号
|
||||
您需要为谁{{ registerType === '3'? '购药' : '挂号' }}
|
||||
<text>请选择患者信息,以便医生给出更准确的诊疗建议,患者信息仅医生可见</text>
|
||||
</view>
|
||||
<!-- 就诊人 -->
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 新增:挂号类型选择 -->
|
||||
<view class="card" style="padding-bottom: 0">
|
||||
<view class="card" style="padding-bottom: 0" v-if="registerType !== '3'">
|
||||
<view class="card_title">
|
||||
挂号类型
|
||||
</view>
|
||||
@@ -37,8 +37,10 @@
|
||||
active-color="#2979FF"
|
||||
@change="handleTypeChange"
|
||||
>
|
||||
<u-radio name="0" label="线下问诊">线下问诊</u-radio>
|
||||
<u-radio v-if="registerType === '0'" name="0" label="线下问诊">线下问诊</u-radio>
|
||||
<u-radio v-if="checkDev('open-im')" name="1" label="线上咨询">线上咨询</u-radio>
|
||||
<u-radio v-if="checkDev('open-im')" name="2" label="线上咨询">在线复诊</u-radio>
|
||||
<u-radio v-if="checkDev('open-im')" name="3" label="线上咨询">预约购药</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
@@ -131,6 +133,7 @@ import {
|
||||
registe
|
||||
} from '@/request/api/api.js'
|
||||
import {checkDev} from "@/utils/utils";
|
||||
import {genOrderApi, saveRegisterInfoApi} from "@/request/api/order";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -182,11 +185,20 @@ export default {
|
||||
avator: "",
|
||||
name: "",
|
||||
heathList: [], // 健康信息
|
||||
rInfo: [], // 健康信息
|
||||
registerType: "0", // 新增:挂号类型(0线下/1线上)
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.Did = e.id
|
||||
if (e.r_type) {
|
||||
|
||||
this.registerType = e.r_type
|
||||
// this.registerType = '1'
|
||||
this.rInfo = e.r_info
|
||||
}
|
||||
|
||||
console.log(e)
|
||||
},
|
||||
computed: {
|
||||
setInfoList() {
|
||||
@@ -322,11 +334,41 @@ export default {
|
||||
|
||||
if (res.data.errcode == 0) {
|
||||
this.register_id = res.data.data.register_id
|
||||
// if (this.registerType === "3" || this.registerType === "2") {
|
||||
if (this.registerType === "3") {
|
||||
let params = JSON.parse(this.rInfo);
|
||||
|
||||
// 保存病患信息
|
||||
saveRegisterInfoApi({
|
||||
register_id: this.register_id,
|
||||
doctor_id: params.doctor_id,
|
||||
drug_id: params.id,
|
||||
has_visited: params.hasVisited,
|
||||
has_used_drug: params.hasUsedDrug,
|
||||
illnessInfo: params.illnessInfo,
|
||||
type: params.type,
|
||||
number: params.number,
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}).then(() => {
|
||||
|
||||
// 直接跳转到付款页面
|
||||
genOrderApi({
|
||||
register_id: this.register_id,
|
||||
register_info: this.rInfo,
|
||||
}).then((resOrder) => {
|
||||
console.log(resOrder);
|
||||
uni.navigateTo({
|
||||
url: `/subPackages/my/my-drug/drug-info?id=${resOrder.data.result.id}&order_type=${resOrder.data.result.order_type}`
|
||||
})
|
||||
})
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.setStorageSync('register_id', this.register_id)
|
||||
|
||||
if (res.data.data.isHas == 0) {
|
||||
uni.navigateTo({
|
||||
url: "/subPackages/register/register?id=" + this.register_id + "&doctor_id=" + this.Did,
|
||||
url: `/subPackages/register/register?id=${this.register_id}&doctor_id=${this.Did}&r_info=${this.rInfo}`,
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
@@ -336,7 +378,7 @@ export default {
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/subPackages/register/register?id=" + this.register_id + "&doctor_id=" + this.Did,
|
||||
url: `/subPackages/register/register?id=${this.register_id}&doctor_id=${this.Did}&r_info=${this.rInfo}`,
|
||||
})
|
||||
}, 900)
|
||||
}
|
||||
|
||||
@@ -173,7 +173,6 @@
|
||||
isshow: true,
|
||||
isshowed: false,
|
||||
show: false,
|
||||
order_no: '',
|
||||
form: {
|
||||
check: false
|
||||
},
|
||||
@@ -187,6 +186,7 @@
|
||||
order_id: "", // 订单id
|
||||
order_no: "", // 订单编号
|
||||
p_id: "", // 处方id
|
||||
orderType: 0, // 处方id
|
||||
list: [{
|
||||
text: '快递到家'
|
||||
}, {
|
||||
@@ -211,6 +211,7 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.p_id = e.id
|
||||
this.orderType = e.order_type
|
||||
},
|
||||
methods: {
|
||||
// 不需要代煎-代煎费
|
||||
@@ -316,6 +317,14 @@
|
||||
uni.setStorageSync('delivery_method', res.data.data.ProductOrder.delivery_method)
|
||||
// this.order_no = res.data.data.ProductOrder.order_no
|
||||
// console.log(this.west.content);
|
||||
|
||||
if (res.data.data.ProductOrder.delivery_method == 1) {
|
||||
this.isshowed = true
|
||||
this.isshow = false
|
||||
} else {
|
||||
this.isshowed = false
|
||||
this.isshow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -369,6 +378,9 @@
|
||||
},
|
||||
// 地址
|
||||
toChoose() {
|
||||
// if (this.orderType === 2) {
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/setup/area-list?id=' + this.p_id + '&order_id=' + this.order_id
|
||||
})
|
||||
@@ -400,6 +412,16 @@
|
||||
});
|
||||
|
||||
if (res.data.errcode == 0) {
|
||||
if (!res.data.data.appId) {
|
||||
setTimeout(() => {
|
||||
that.flag = false
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/my/my-drug/drug-list'
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 300)
|
||||
return;
|
||||
}
|
||||
|
||||
uni.requestPayment({
|
||||
provider: res.data.data.appId,
|
||||
|
||||
@@ -304,6 +304,16 @@
|
||||
// console.log(res, 'pay');
|
||||
|
||||
if (res.data.errcode == 0) {
|
||||
if (!res.data.data.appId) {
|
||||
setTimeout(() => {
|
||||
that.flag = false
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/my/my-drug/drug-list'
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 300)
|
||||
return;
|
||||
}
|
||||
uni.requestPayment({
|
||||
provider: res.data.data.appId,
|
||||
timeStamp: res.data.data.timestamp,
|
||||
|
||||
@@ -21,8 +21,13 @@
|
||||
<!-- 性别 -->
|
||||
<view class="card_name">
|
||||
<text>性别</text>
|
||||
<u-input v-model="form.sex" input-align="right" placeholder="-"
|
||||
placeholder-style="text-align:right;color: #94A3B8;" :type="type" />
|
||||
|
||||
<u-radio-group v-model="form.sex">
|
||||
<u-radio name="1" style="margin-right: 60rpx;">男</u-radio>
|
||||
<u-radio name="2">女</u-radio>
|
||||
</u-radio-group>
|
||||
<!-- <u-input v-model="form.sex" input-align="right" placeholder="-"-->
|
||||
<!-- placeholder-style="text-align:right;color: #94A3B8;" :type="type" />-->
|
||||
</view>
|
||||
<!-- 年龄 -->
|
||||
<view class="card_name">
|
||||
@@ -49,6 +54,13 @@
|
||||
@click="actionSheetCallback">
|
||||
</u-action-sheet>
|
||||
</view>
|
||||
<view class="card_relation">
|
||||
<view class="set">
|
||||
设为默认就诊人
|
||||
<text>(非必填)</text>
|
||||
</view>
|
||||
<u-switch v-model="checked" :loading="loading" inactive-color="#C4C7CC" size="40"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 健康信息 -->
|
||||
@@ -183,13 +195,13 @@
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
<!-- 设为默认就诊人 -->
|
||||
<view class="default">
|
||||
<view class="set">
|
||||
设为默认就诊人
|
||||
<text>(非必填)</text>
|
||||
</view>
|
||||
<u-switch v-model="checked" :loading="loading" inactive-color="#C4C7CC" size="40"></u-switch>
|
||||
</view>
|
||||
<!-- <view class="default">-->
|
||||
<!-- <view class="set">-->
|
||||
<!-- 设为默认就诊人-->
|
||||
<!-- <text>(非必填)</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <u-switch v-model="checked" :loading="loading" inactive-color="#C4C7CC" size="40"></u-switch>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- 保存 -->
|
||||
<view class="footer">
|
||||
@@ -227,7 +239,7 @@
|
||||
text: "", // 添加病情
|
||||
form: {
|
||||
identityCardNo: "",
|
||||
sex: "",
|
||||
sex: "男",
|
||||
age: "",
|
||||
}, // 身份证
|
||||
sex: "",
|
||||
@@ -436,7 +448,7 @@
|
||||
id: this.addid,
|
||||
name: this.names,
|
||||
id_card: this.form.identityCardNo,
|
||||
sex: (this.sex) ,
|
||||
sex: (this.form.sex) ,
|
||||
age: this.form.age,
|
||||
mobile: this.phone,
|
||||
relation: this.relation,
|
||||
|
||||
@@ -98,18 +98,23 @@
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.data.errcode == 0) {
|
||||
uni.setStorageSync('store_id', e)
|
||||
uni.setStorageSync('stores_id', e)
|
||||
uni.showToast({
|
||||
title: '切换成功',
|
||||
duration: 2000,
|
||||
icon: "success"
|
||||
});
|
||||
uni.setStorageSync('store_id', e)
|
||||
// uni.removeStorageSync('stores_id')
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
}, 2000)
|
||||
// setTimeout(() => {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/home/home'
|
||||
// })
|
||||
// }, 2000)
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -163,7 +168,7 @@
|
||||
// this.getStore();
|
||||
},
|
||||
onUnload() {
|
||||
uni.removeStorageSync('stores_id')
|
||||
// uni.removeStorageSync('store_id')
|
||||
},
|
||||
filters: {
|
||||
//过滤器 用于格式化时间
|
||||
|
||||
221
subPackages/product/product.vue
Normal file
221
subPackages/product/product.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 顶部搜索栏 -->
|
||||
<view class="search-section">
|
||||
<u-search
|
||||
v-model="searchKeyword"
|
||||
placeholder="搜索药品名称"
|
||||
:show-action="false"
|
||||
bg-color="#ffffff"
|
||||
shape="square"
|
||||
height="70"
|
||||
@input="handleSearch"
|
||||
@search="handleSearch"
|
||||
@clear="clearSearch"
|
||||
:action-style="{ color: '#4A90E2' }"
|
||||
>
|
||||
<template v-slot:icon>
|
||||
<u-icon name="search" color="#4A90E2" size="32"></u-icon>
|
||||
</template>
|
||||
</u-search>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="list-section">
|
||||
<view
|
||||
v-for="(item, index) in filteredProducts"
|
||||
:key="item.id"
|
||||
class="list-item"
|
||||
@click="handClickProduct(item)"
|
||||
:style="index % 2 === 0 ? 'background-color: #f9faff;' : ''"
|
||||
>
|
||||
<image
|
||||
class="item-image"
|
||||
:src="item.drug.image"
|
||||
mode="aspectFill"
|
||||
lazy-load
|
||||
style="width: 200rpx; height: 200rpx; border-radius: 12rpx;"
|
||||
/>
|
||||
<view class="item-content">
|
||||
<view class="item-title">{{ item.drug.drug_name }}</view>
|
||||
<view class="item-spec">
|
||||
<text class="spec-label">功效:</text>
|
||||
<text class="spec-value">{{ item.drug.function }}</text>
|
||||
</view>
|
||||
<view class="item-spec">
|
||||
<text class="spec-label">规格:</text>
|
||||
<text class="spec-value">{{ item.drug.specification }}</text>
|
||||
</view>
|
||||
<view class="item-price">
|
||||
<text class="price-tag">¥{{ item.price }}</text>
|
||||
<!-- <text class="stock-tag">库存:{{ item.stock }}盒</text>-->
|
||||
<text class="stock-tag">库存:999盒</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStoreDrugListBySalespersonApi} from "@/request/api/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
products: [],
|
||||
filteredProducts: [],
|
||||
searchKeyword: "",
|
||||
scrollViewHeight: 0,
|
||||
doctorId: 0,
|
||||
r_type: 0,
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.doctorId = e.doctor_id;
|
||||
this.r_type = e.register_type
|
||||
console.log(e, 'e');
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
getStoreDrugListBySalespersonApi({
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
page: 1,
|
||||
limit: 100
|
||||
}).then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.products = res.data.result.records;
|
||||
this.filteredProducts = [...this.products];
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.filteredProducts = this.products.filter(item =>
|
||||
item.drug.drug_name.includes(this.searchKeyword) ||
|
||||
(item.drug.pinyin_simple && item.drug.pinyin_simple.includes(this.searchKeyword.toLowerCase()))
|
||||
);
|
||||
},
|
||||
clearSearch() {
|
||||
this.searchKeyword = "";
|
||||
this.filteredProducts = [...this.products];
|
||||
},
|
||||
calculateScrollViewHeight() {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
this.scrollViewHeight = systemInfo.windowHeight - 160;
|
||||
},
|
||||
handClickProduct(item) {
|
||||
|
||||
uni.navigateTo({
|
||||
// url: `/subPackages/product/symptoms?id=${item.drug.id}&drug_name=${item.drug.drug_name}&doctor_id=${this.doctorId}&type=${this.r_type}&is_otc=${item.drug.is_otc}&image=${item.drug.image}&price=${item.price}`
|
||||
url: `/subPackages/product/symptoms?id=${item.drug.id}&drug_name=${item.drug.drug_name}&is_otc=${item.drug.is_otc}&image=${item.drug.image}&price=${item.price}`
|
||||
// url: `/subPackages/shop/search-list`
|
||||
});
|
||||
// console.log(`/subPackages/product/symptoms?id=${item.drug.id}&drug_name=${item.drug.drug_name}&doctor_id=${this.doctorId}&type=${this.r_type}`, 'ssssssss')
|
||||
// if (item.drug.is_otc === 0) {
|
||||
// uni.navigateTo({
|
||||
// url: `/subPackages/shop/orders-detail?id=${item.drug.id}&drug_name=${item.drug.drug_name}&doctor_id=${this.doctorId}&type=${this.r_type}`
|
||||
// });
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: `/subPackages/product/symptoms?id=${item.drug.id}&drug_name=${item.drug.drug_name}&doctor_id=${this.doctorId}&type=${this.r_type}`
|
||||
// // url: `/subPackages/shop/search-list`
|
||||
// });
|
||||
// }
|
||||
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getList();
|
||||
this.calculateScrollViewHeight();
|
||||
},
|
||||
onReady() {
|
||||
uni.onWindowResize(() => this.calculateScrollViewHeight());
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
background: #f0f5ff;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.search-section {
|
||||
padding: 20rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(74,144,226,0.1);
|
||||
}
|
||||
|
||||
.list-section {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05);
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:active {
|
||||
transform: translateY(4rpx);
|
||||
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.03);
|
||||
}
|
||||
}
|
||||
|
||||
.item-image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.item-spec {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.spec-label {
|
||||
background: rgba(74,144,226,0.1);
|
||||
padding: 2rpx 6rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.item-price {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.price-tag {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #3A86FF;
|
||||
}
|
||||
|
||||
.stock-tag {
|
||||
font-size: 24rpx;
|
||||
color: #95a5a6;
|
||||
}
|
||||
</style>
|
||||
447
subPackages/product/symptoms.vue
Normal file
447
subPackages/product/symptoms.vue
Normal file
@@ -0,0 +1,447 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- <view class="header">-->
|
||||
<!-- <h1>信息填写</h1>-->
|
||||
<!-- <p>您正在购买【{{ formData.drug_name }}】请提供您的医疗历史信息,帮助我们更好地为您服务</p>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- 药品信息卡片 -->
|
||||
<view class="drug-card">
|
||||
<view class="drug-image-wrapper">
|
||||
<image class="drug-image" :src="formData.image" mode="aspectFill" v-if="formData.image"></image>
|
||||
<view class="drug-image-placeholder" v-else>药品图片</view>
|
||||
</view>
|
||||
<view class="drug-info">
|
||||
<view class="drug-name">{{ formData.drug_name }}</view>
|
||||
<view class="drug-indications" v-if="indicationsText">
|
||||
功效:{{ indicationsText }}
|
||||
</view>
|
||||
<view class="price-section">
|
||||
<view class="unit-price">单价:¥{{ formData.price }}</view>
|
||||
<view class="total-price">总价:¥{{ totalPrice.toFixed(2) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-form :model="formData" ref="uForm">
|
||||
<!-- 购买数量 -->
|
||||
<view class="form-item-wrapper">
|
||||
<u-form-item label="购买数量" prop="hasVisited" label-width="200">
|
||||
<u-number-box v-model="formData.number" :min="1" :max="100" @change="updateTotalPrice"></u-number-box>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<!-- 是否就诊过 -->
|
||||
<view v-if="!isOtc" class="form-item-wrapper">
|
||||
<u-form-item label="是否就诊过" prop="hasVisited" label-width="200">
|
||||
<u-radio-group v-model="formData.hasVisited">
|
||||
<u-radio name="1" style="margin-right: 60rpx;">是</u-radio>
|
||||
<u-radio name="0">否</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<!-- 是否用过此药 -->
|
||||
<view v-if="!isOtc" class="form-item-wrapper">
|
||||
<u-form-item label="是否用过此药" prop="hasUsedDrug" label-width="200">
|
||||
<u-radio-group v-model="formData.hasUsedDrug">
|
||||
<u-radio name="1" style="margin-right: 60rpx;">是</u-radio>
|
||||
<u-radio name="0">否</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<!-- 患病信息 -->
|
||||
<view v-if="!isOtc" class="form-item-wrapper">
|
||||
<u-form-item label="患病信息" prop="illnessInfo" label-width="200">
|
||||
<u-input
|
||||
v-model="formData.illnessInfo"
|
||||
type="select"
|
||||
placeholder="请选择患病信息"
|
||||
@click="showIllnessPicker = true"
|
||||
disabled
|
||||
/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
|
||||
<!-- 患病信息选择器 -->
|
||||
<u-picker
|
||||
v-model="showIllnessPicker"
|
||||
mode="selector"
|
||||
:range="illnessOptions"
|
||||
range-key="label"
|
||||
@confirm="onIllnessConfirm"
|
||||
></u-picker>
|
||||
|
||||
<!-- <u-button-->
|
||||
<!-- class="submit-btn"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="submitForm"-->
|
||||
<!-- >-->
|
||||
<!-- {{ isOtc? '立即下单': '提交信息'}}-->
|
||||
<!-- </u-button>-->
|
||||
|
||||
<!-- 底部 -->
|
||||
<view class="footer">
|
||||
<button class="to_pay" @click="submitForm">
|
||||
{{ isOtc? '立即下单': '提交信息'}}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStoreDrugDetailApi} from "@/request/api/store";
|
||||
import {genOrderApi, saveRegisterInfoApi} from "@/request/api/order";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
id: '',
|
||||
drug_name: '',
|
||||
image: '',
|
||||
hasVisited: '1',
|
||||
hasUsedDrug: '1',
|
||||
number: 1,
|
||||
illnessInfo: '',
|
||||
doctor_id: '',
|
||||
price: 0
|
||||
},
|
||||
illnessOptions: [
|
||||
{ value: '感冒', label: '感冒' },
|
||||
{ value: '发烧', label: '发烧' },
|
||||
{ value: '头痛', label: '头痛' },
|
||||
{ value: '过敏', label: '过敏' },
|
||||
{ value: '其他', label: '其他' }
|
||||
],
|
||||
showIllnessPicker: false,
|
||||
submitted: false,
|
||||
isOtc: true,
|
||||
totalPrice: 0,
|
||||
indicationsText: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.formData.id = options.id;
|
||||
this.formData.type = options.type;
|
||||
this.formData.image = options.image;
|
||||
this.formData.price = options.price;
|
||||
this.formData.doctor_id = options.doctor_id;
|
||||
this.formData.drug_name = options.drug_name;
|
||||
this.isOtc = options.is_otc === '0';
|
||||
|
||||
// 初始化总价
|
||||
this.totalPrice = parseFloat(options.price || 0) * this.formData.number;
|
||||
} else {
|
||||
const savedId = uni.getStorageSync('symptoms_id');
|
||||
if (savedId) {
|
||||
this.formData.id = savedId;
|
||||
}
|
||||
}
|
||||
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
let that = this;
|
||||
getStoreDrugDetailApi({
|
||||
id: this.formData.id,
|
||||
}).then((res) => {
|
||||
that.illnessOptions = res.data.result.indications_array;
|
||||
|
||||
// 获取药品功效信息
|
||||
if (res.data.result.indications_array && res.data.result.indications_array.length > 0) {
|
||||
// 将功效数组转换为逗号分隔的字符串
|
||||
that.indicationsText = res.data.result.indications_array.map(item => item.label || item.value).join(',');
|
||||
}
|
||||
|
||||
console.log('11zzz', res);
|
||||
console.log('11zzz', that.illnessOptions);
|
||||
})
|
||||
},
|
||||
onIllnessConfirm(e) {
|
||||
const index = e[0];
|
||||
this.formData.illnessInfo = this.illnessOptions[index].value;
|
||||
this.showIllnessPicker = false;
|
||||
},
|
||||
// 更新总价
|
||||
updateTotalPrice() {
|
||||
// 把price转换为数字
|
||||
console.log(parseFloat(this.formData.price || 0), typeof parseFloat(this.formData.price || 0), 'ssss')
|
||||
|
||||
this.totalPrice = parseFloat(this.formData.price || 0) * this.formData.number;
|
||||
},
|
||||
submitForm() {
|
||||
if (!this.formData.hasVisited && this.isOtc === false) {
|
||||
uni.showToast({
|
||||
title: '请选择是否就诊过',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.formData.hasUsedDrug && this.isOtc === false) {
|
||||
uni.showToast({
|
||||
title: '请选择是否用过此药',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.formData.illnessInfo && this.isOtc === false) {
|
||||
uni.showToast({
|
||||
title: '请选择患病信息',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
title: '信息提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
if (this.isOtc === true) {
|
||||
// 直接跳转到付款页面
|
||||
genOrderApi({
|
||||
drug_id: this.formData.id,
|
||||
number: this.formData.number,
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
}).then((resOrder) => {
|
||||
uni.navigateTo({
|
||||
url: `/subPackages/my/my-drug/drug-info?id=${resOrder.data.result.id}&order_type=${resOrder.data.result.order_type}`
|
||||
})
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/subPackages/doctor/doctor-userinfo?id=${this.formData.doctor_id}&r_info=${JSON.stringify(this.formData)}&r_type=${this.formData.type}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding: 24rpx;
|
||||
background-color: #f5f8ff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 60rpx;
|
||||
padding: 40rpx 0;
|
||||
border-bottom: 1px solid #eaeefb;
|
||||
|
||||
h1 {
|
||||
color: #2979ff;
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 16rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 药品卡片样式 */
|
||||
.drug-card {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(64, 158, 255, 0.1);
|
||||
padding: 30rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.drug-image-wrapper {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
margin-right: 30rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.drug-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.drug-image-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
background: #f0f5ff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.drug-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.drug-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.drug-indications {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.price-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.unit-price {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.total-price {
|
||||
font-size: 32rpx;
|
||||
color: #ff4d4f;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.form-item-wrapper {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(64, 158, 255, 0.1);
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
// 自定义uView表单样式
|
||||
::v-deep .u-form-item {
|
||||
margin-bottom: 0;
|
||||
|
||||
.u-form-item__body {
|
||||
padding: 0;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.u-form-item__body__left__content__label {
|
||||
font-size: 32rpx;
|
||||
color: #2979ff;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 8rpx;
|
||||
height: 32rpx;
|
||||
background: #2979ff;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 单选组样式
|
||||
::v-deep .u-radio-group {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.u-radio__icon-wrap {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.u-radio__label {
|
||||
font-size: 30rpx;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(135deg, #2979ff, #448aff);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 45rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 60rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(41, 121, 255, 0.25);
|
||||
}
|
||||
|
||||
.data-display {
|
||||
margin-top: 60rpx;
|
||||
padding: 40rpx;
|
||||
background: #f5f8ff;
|
||||
border-radius: 16rpx;
|
||||
border-left: 8rpx solid #2979ff;
|
||||
|
||||
h3 {
|
||||
color: #2979ff;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.data-content {
|
||||
background: white;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
font-family: monospace;
|
||||
white-space: pre-wrap;
|
||||
font-size: 26rpx;
|
||||
max-height: 400rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
.footer {
|
||||
width: 750rpx;
|
||||
height: 114rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
||||
.to_pay {
|
||||
width: 690rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
background: #536DFE;
|
||||
border-radius: 64rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -137,6 +137,7 @@
|
||||
} from '../../request/api/api';
|
||||
import {createRoomByDoctorIdApi, sendToUserApi} from "@/request/api/im";
|
||||
import {checkDev} from "@/utils/utils";
|
||||
import {genOrderApi} from "@/request/api/order";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -153,14 +154,18 @@
|
||||
flag: true,
|
||||
registerType: '线下就诊',
|
||||
registerMap: {
|
||||
0: '线下就诊',
|
||||
1: '线上咨询'
|
||||
}
|
||||
0: '挂号',
|
||||
1: '咨询',
|
||||
2: '复诊',
|
||||
3: '购药',
|
||||
},
|
||||
rInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// console.log(e, 'role');
|
||||
this.register_id = e.id
|
||||
this.rInfo = e.r_info
|
||||
this.currentUserId = 'user-' + uni.getStorageSync('user_id') || 'user-2512';
|
||||
this.currentDoctorId = 'doctor-' + e.doctor_id;
|
||||
// if (this.currentDoctorId == null) {
|
||||
@@ -188,6 +193,7 @@
|
||||
},
|
||||
// 确认挂号
|
||||
next() {
|
||||
|
||||
let that = this
|
||||
if (this.flag) {
|
||||
this.flag = false
|
||||
@@ -203,9 +209,9 @@
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
});
|
||||
console.log(checkDev('open-im') && that.registList.register_type === 1, 'sssssssssssss')
|
||||
|
||||
|
||||
if (checkDev('open-im') && that.registList.register_type === 1) {
|
||||
if (checkDev('open-im') && (that.registList.register_type === 1 || that.registList.register_type === 2)) {
|
||||
createRoomByDoctorIdApi({
|
||||
doctor_id: that.currentDoctorId
|
||||
}).then(result => {
|
||||
@@ -219,14 +225,38 @@
|
||||
}),
|
||||
duration: 0
|
||||
})
|
||||
// 发送在线复诊信息
|
||||
if (that.registList.register_type === 2) {
|
||||
that.rInfo.register_id = that.register_id;
|
||||
sendToUserApi({
|
||||
room_id: result.data.result.room_id,
|
||||
sender_user_id: that.currentUserId,
|
||||
receiver_user_id: that.currentDoctorId,
|
||||
message_type: 11,
|
||||
message_content: that.rInfo,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (res.data.data.is_paid == 1) {
|
||||
|
||||
if (that.registList.register_type === 3) {
|
||||
genOrderApi({
|
||||
register_id: that.register_id,
|
||||
register_info: that.rInfo,
|
||||
}).then((resOrder) => {
|
||||
console.log(res);
|
||||
uni.navigateTo({
|
||||
url: `/subPackages/my/my-drug/drug-info?id=${resOrder.data.result.id}&order_type=${resOrder.data.result.order_type}`
|
||||
})
|
||||
})
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/register/register-success?id=' + this
|
||||
.register_id,
|
||||
url: `/subPackages/register/register-success?id=${that.register_id}®ister_type=${that.registList.register_type}`,
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 800)
|
||||
|
||||
@@ -6,7 +6,8 @@ export function checkDev(key = '') {
|
||||
// 判断某些模块是否开启
|
||||
switch (key) {
|
||||
case 'dev':
|
||||
return true;
|
||||
return false;
|
||||
// return true;
|
||||
case 'open-im':
|
||||
return false;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user