diff --git a/Pages/yaoshi/home/home.js b/Pages/yaoshi/home/home.js
index c86eab1..30226a9 100644
--- a/Pages/yaoshi/home/home.js
+++ b/Pages/yaoshi/home/home.js
@@ -25,7 +25,7 @@ Page({
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
- currentTab: 0 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
+ active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
})
}
}
diff --git a/Pages/yaoshi/my/my.js b/Pages/yaoshi/my/my.js
index 6284fd5..3d1a988 100644
--- a/Pages/yaoshi/my/my.js
+++ b/Pages/yaoshi/my/my.js
@@ -24,7 +24,7 @@ Page({
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
- currentTab: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
+ active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
})
}
}
diff --git a/Pages/yishi/appraise/index.js b/Pages/yishi/appraise/index.js
index 9e058c1..a52f6c5 100644
--- a/Pages/yishi/appraise/index.js
+++ b/Pages/yishi/appraise/index.js
@@ -51,7 +51,7 @@ Page({
},
onTabsChange(e){
console.log(e);
- let list_name = "appraise_list_" + this.data.evaluation_type;
+ let list_name = "appraise_list_" + e.detail.value;
this.setData({
evaluation_type: e.detail.value,
current_page: 0,
diff --git a/Pages/yishi/appraise/index.json b/Pages/yishi/appraise/index.json
index d2a16c5..32a4098 100644
--- a/Pages/yishi/appraise/index.json
+++ b/Pages/yishi/appraise/index.json
@@ -4,7 +4,8 @@
"te-nav-bar": "/commpents/te_navbar",
"appraise-data": "/commpents/appraise_data/index",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
- "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
+ "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
+ "van-empty": "@vant/weapp/empty/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
diff --git a/Pages/yishi/appraise/index.wxml b/Pages/yishi/appraise/index.wxml
index 6a5cb41..80226b2 100644
--- a/Pages/yishi/appraise/index.wxml
+++ b/Pages/yishi/appraise/index.wxml
@@ -20,8 +20,9 @@
date="{{item.created_at}}"
wx:for="{{appraise_list_1}}"
/>
-
+
+
@@ -33,6 +34,7 @@
wx:for="{{appraise_list_2}}"
/>
+
@@ -45,6 +47,7 @@
wx:for="{{appraise_list_3}}"
/>
+
\ No newline at end of file
diff --git a/Pages/yishi/appraise/index.wxss b/Pages/yishi/appraise/index.wxss
index 9316094..87cec88 100644
--- a/Pages/yishi/appraise/index.wxss
+++ b/Pages/yishi/appraise/index.wxss
@@ -1,7 +1,8 @@
+page{
+ background-color: #F6F6F6;
+}
.container{
width: 100vw;
- height: 100vh;
- background-color: #F6F6F6;
}
.t-tab-panel,.t-tabs__content {
background-color: #F6F6F6;
diff --git a/Pages/yishi/bankcard/index.wxml b/Pages/yishi/bankcard/index.wxml
index bcde031..8931661 100644
--- a/Pages/yishi/bankcard/index.wxml
+++ b/Pages/yishi/bankcard/index.wxml
@@ -5,7 +5,7 @@
我的银行卡
-
+
操作手册-银行卡
diff --git a/Pages/yishi/case/index.js b/Pages/yishi/case/index.js
index 49cc377..e73cfb4 100644
--- a/Pages/yishi/case/index.js
+++ b/Pages/yishi/case/index.js
@@ -1,3 +1,5 @@
+import { API } from './../../../utils/network/api'
+let api = new API()
const app = getApp()
Page({
data: {
@@ -6,5 +8,21 @@ Page({
title: '病历信息', //导航栏 中间的标题
},
height: app.globalData.height,
+ order_inquiry_id: "",
+ case_detail: {}
+ },
+ onLoad(options){
+ this.setData({
+ order_inquiry_id: options.order_inquiry_id
+ })
+ },
+ onShow(){
+ //获取患者问诊病例
+ api.getDoctorInquiryCase({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
+ console.log(response);
+ this.setData({
+ case_detail: response.data
+ })
+ }).catch(errors => {console.error(errors);})
}
})
\ No newline at end of file
diff --git a/Pages/yishi/case/index.wxml b/Pages/yishi/case/index.wxml
index 187c8ff..b8790ce 100644
--- a/Pages/yishi/case/index.wxml
+++ b/Pages/yishi/case/index.wxml
@@ -1,56 +1,58 @@
-
+
基础信息
- 张三三
- 男|30岁
+ {{case_detail.name}}
+ {{case_detail.sex==1?'男':case_detail.sex==2?'女':'未知'}}|{{case_detail.age}}岁
- 身高:182cm
- 体重:98KG
- 民族:汉族
- 职业:学生
- 婚姻:已婚
+ 身高:{{case_detail.height}}cm
+ 体重:{{case_detail.weight}}KG
+ 民族:{{case_detail.nation_name}}
+ 职业:{{case_detail.job_name}}
+ 婚姻:{{case_detail.nation_name}}
所患疾病:
- 肝炎
+ {{case_detail.disease_class_name}}
确诊日期:
- 2022年8月29日 10:23
+ {{case_detail.diagnosis_date}}
-
+
确诊医院:
- 首都医科大学附属北京佑安医院
+ {{case_detail.diagnosis_hospital}}
正在服用的药品信息:
- 无/有
+ {{case_detail.disease_class_name}}
详细描述:阿托伐他汀钙片8片 (用法用量:常用的起始剂量为10mg每日一次
病情描述:
- 过度劳累,失眠不足导致可以多休息几天,没有好转的话可以去医院看看先吧...
+ {{case_detail.disease_desc}}
- 用药意向::
- 阿托伐他汀钙片8片(用法用量:常用的起始剂量为10mg每日一次剂量调整时间为4周或更长。阿托伐他汀每日用量可在一天内的任何时间一次服用,并不受进餐影响。)
+ 用药意向:
+
+ {{item}};
+
问诊本人复诊凭证(病例/处方单/检查报告/住院单可任选其一):
无
-
+
@@ -59,35 +61,38 @@
过敏史:
- 无/有(显示内容)
+ {{case_detail.is_allergy_history==0?'否':case_detail.allergy_history}}
家族史:
- 无/有(显示内容)
+ {{case_detail.is_family_history==0?'否':case_detail.family_history}}
是否备孕、妊娠或者哺乳期:
- 不是/是(显示内容)
+ {{case_detail.is_pregnant==0?'否':case_detail.pregnant}}
饮酒史:
- 从不、偶尔、经常、每天、已解酒
+ {{case_detail.drink_wine_status==1?'从不':case_detail.drink_wine_status==2?'偶尔':case_detail.drink_wine_status==3?'经常':case_detail.drink_wine_status==4?'每天':case_detail.drink_wine_status==5?'已戒酒':'其他'}}
吸烟史:
- 从不、偶尔、经常、每天、已解酒
+ {{case_detail.smoke_status==1?'从不':case_detail.smoke_status==2?'偶尔':case_detail.smoke_status==3?'经常':case_detail.smoke_status==4?'每天':case_detail.smoke_status==5?'已戒烟':'其他'}}
手术史:
- 无/有(手术名称)
+ {{case_detail.is_operation==0?'否':case_detail.operation}}
接触化学物:
- 从不、偶尔、经常、每天
+ {{case_detail.chemical_compound_status==1?'从不':case_detail.chemical_compound_status==2?'偶尔':case_detail.chemical_compound_status==3?'经常':case_detail.chemical_compound_status==4?'每天':'其他'}}
-
- 详细描述:如经常染发、接触油漆或者甲醛等
+
+ 详细描述:{{case_detail.chemical_compound_describe}}
+
+
+
\ No newline at end of file
diff --git a/Pages/yishi/case/index.wxss b/Pages/yishi/case/index.wxss
index 566f2a5..e04e7a1 100644
--- a/Pages/yishi/case/index.wxss
+++ b/Pages/yishi/case/index.wxss
@@ -1,6 +1,8 @@
+page{
+ background-color: #F6F6F6;
+}
.container{
width: 100vw;
- background-color: #F6F6F6;
padding: 0 4vw;
}
.main_title{
diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js
index dcc5f22..467c097 100644
--- a/Pages/yishi/cash/index.js
+++ b/Pages/yishi/cash/index.js
@@ -18,8 +18,6 @@ Page({
income_tax: "12"
},
onLoad(options){
-
-
//获取提现数据
api.getDoctorWithdrawal().then(response => {
console.log(response);
diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml
index c920702..937eb7c 100644
--- a/Pages/yishi/cash/index.wxml
+++ b/Pages/yishi/cash/index.wxml
@@ -1,6 +1,6 @@
-
+
结算银行卡
提现规则
diff --git a/Pages/yishi/cash/index.wxss b/Pages/yishi/cash/index.wxss
index cce587b..44d5df4 100644
--- a/Pages/yishi/cash/index.wxss
+++ b/Pages/yishi/cash/index.wxss
@@ -1,12 +1,14 @@
-.container{
+page{
background-color: #F4F4F4;
+}
+.container{
+ margin-top: 20rpx;
width: 100vw;
- height: 100vh;
}
.top{
display: flex;
width: 92vw;
- margin: 30rpx auto;
+ margin: 0 auto 20rpx auto;
justify-content: space-between;
}
.txt_title{
diff --git a/Pages/yishi/cashrecord/index.wxml b/Pages/yishi/cashrecord/index.wxml
index 5e3234d..9e42712 100644
--- a/Pages/yishi/cashrecord/index.wxml
+++ b/Pages/yishi/cashrecord/index.wxml
@@ -1,6 +1,6 @@
-
+
2022年
diff --git a/Pages/yishi/cashrecord/index.wxss b/Pages/yishi/cashrecord/index.wxss
index 1bd1276..6147fb6 100644
--- a/Pages/yishi/cashrecord/index.wxss
+++ b/Pages/yishi/cashrecord/index.wxss
@@ -1,11 +1,12 @@
-.container{
+page{
background-color: #F4F4F4;
+}
+.container{
width: 100vw;
- height: 100vh;
}
.top{
width: 92vw;
- margin: 50rpx auto 0 auto;
+ margin: 20rpx auto 0 auto;
background-color: #3CC7C0;
height: 150rpx;
border-radius: 20rpx;
diff --git a/Pages/yishi/chat/index.js b/Pages/yishi/chat/index.js
index 37dc475..c278fca 100644
--- a/Pages/yishi/chat/index.js
+++ b/Pages/yishi/chat/index.js
@@ -1,63 +1,38 @@
-// index.js
-import TIM from '../../../TUIKit/lib/tim-wx-sdk';
-import { genTestUserSig } from '../../../TUIKit/debug/GenerateTestUserSig';
-import TIMUploadPlugin from '../../../TUIKit/lib/tim-upload-plugin';
const app = getApp()
Page({
data: {
- config: {
- userID: "xiaobeibei", //User ID
- SDKAPPID: 1400793692, // Your SDKAppID
- SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
- EXPIRETIME: 604800,
- },
- patient_account: "ayu",
+ patient_account: "10000",
title: '患者姓名',
- height: app.globalData.height,
+ height: app.globalData.height,
+ order_inquiry_id: ""
},
- onLoad() {
+ onLoad(option) {
console.log("chat onload");
- let sign = genTestUserSig(this.data.config);
- console.log("sign: ", sign);
- const userSig = sign.userSig;
- console.log("userSig: ", userSig);
- wx.$TUIKit = TIM.create({
- SDKAppID: this.data.config.SDKAPPID
- });
-
- wx.$chat_SDKAppID = this.data.config.SDKAPPID;
- wx.$chat_userID = this.data.config.userID;
- wx.$chat_userSig = userSig;
- wx.$TUIKitTIM = TIM;
- wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
- wx.$TUIKit.login({
- userID: this.data.config.userID,
- userSig
- });
- wx.$TUIKit.setLogLevel(3);//设置日志级别
- wx.setStorage({
- key: 'currentUserID',
- data: [],
- });
- wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
+ let from_account = option.from_account;
+ let order_inquiry_id = option.order_inquiry_id;
+ this.setData({
+ patient_account: from_account,
+ order_inquiry_id: order_inquiry_id,
+ })
},
onUnload() {
console.log("chat onUnload");
- wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
},
onShow(){
let _this = this;
let interval = setInterval(() => {
+ console.log("chat init ,");
+ console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
if(app.globalData.chat_sdk_ready){
- _this.onSDKReady();
+ const TUIChat = _this.selectComponent('#TUIChat');
+ TUIChat.init();
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
clearInterval(interval);
}
- }, 100);
+ }, 1000);
},
- onSDKReady() {
- console.error("chat js: onSDKReady")
- const TUIChat = this.selectComponent('#TUIChat');
- TUIChat.init();
- app.globalData.chat_sdk_ready = true
+ $onMessageReceived(value) {
+ const message = value.data[0];
+ console.log("message from chat: ",message)
}
})
diff --git a/Pages/yishi/chat/index.wxml b/Pages/yishi/chat/index.wxml
index 43ee0d6..a441fac 100644
--- a/Pages/yishi/chat/index.wxml
+++ b/Pages/yishi/chat/index.wxml
@@ -1,7 +1,5 @@
-
+
-
-
\ No newline at end of file
+
+
diff --git a/Pages/yishi/chat_session/index.js b/Pages/yishi/chat_session/index.js
index 86de744..250c643 100644
--- a/Pages/yishi/chat_session/index.js
+++ b/Pages/yishi/chat_session/index.js
@@ -1,50 +1,24 @@
// index.js
-import TIM from '../../../TUIKit/lib/tim-wx-sdk';
-import { genTestUserSig } from '../../../TUIKit/debug/GenerateTestUserSig';
-import TIMUploadPlugin from '../../../TUIKit/lib/tim-upload-plugin';
const app = getApp()
Page({
data: {
- config: {
- userID: "xiaobeibei", //User ID
- SDKAPPID: 1400793692, // Your SDKAppID
- SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
- EXPIRETIME: 604800,
- },
title: '患者姓名',
height: app.globalData.height,
},
onLoad() {
- let sign = genTestUserSig(this.data.config);
- console.log("sign: ", sign);
- const userSig = sign.userSig;
- console.log("userSig: ", userSig);
- wx.$TUIKit = TIM.create({
- SDKAppID: this.data.config.SDKAPPID
- });
-
- wx.$chat_SDKAppID = this.data.config.SDKAPPID;
- wx.$chat_userID = this.data.config.userID;
- wx.$chat_userSig = userSig;
- wx.$TUIKitTIM = TIM;
- wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
- wx.$TUIKit.login({
- userID: this.data.config.userID,
- userSig
- });
- wx.$TUIKit.setLogLevel(3);//设置日志级别
- wx.setStorage({
- key: 'currentUserID',
- data: [],
- });
- wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
+ console.log("onLoad chat_session")
},
onUnload() {
- wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
+
},
- onSDKReady() {
- console.warn("chat js: onSDKReady")
- const TUIKit = this.selectComponent('#TUIKit');
- TUIKit.init();
+ onShow(){
+ let _this = this;
+ let interval = setInterval(() => {
+ if(app.globalData.chat_sdk_ready){
+ const TUIKit = _this.selectComponent('#TUIKit');
+ TUIKit.init();
+ clearInterval(interval);
+ }
+ }, 100);
}
})
diff --git a/Pages/yishi/chufangsetup/index.js b/Pages/yishi/chufangsetup/index.js
index 9e70719..351f298 100644
--- a/Pages/yishi/chufangsetup/index.js
+++ b/Pages/yishi/chufangsetup/index.js
@@ -61,7 +61,7 @@ Page({
getList(){
//获取处方列表
let params = {};
- params.prescription_status = this.data.prescription_status;//处方审核状态(0:审核中 2:审核驳回)
+ params.pharmacist_audit_status = this.data.prescription_status;//处方审核状态(0:审核中 2:审核驳回)
params.page = this.data.current_page + 1;
api.getDoctorPrescription(params).then(response => {
console.log(response);
diff --git a/Pages/yishi/chufangsetup/index.json b/Pages/yishi/chufangsetup/index.json
index 3bfe750..203ffc8 100644
--- a/Pages/yishi/chufangsetup/index.json
+++ b/Pages/yishi/chufangsetup/index.json
@@ -3,6 +3,7 @@
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
- "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
+ "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
+ "van-empty": "@vant/weapp/empty/index"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/chufangsetup/index.wxml b/Pages/yishi/chufangsetup/index.wxml
index ff2804c..00f5fb3 100644
--- a/Pages/yishi/chufangsetup/index.wxml
+++ b/Pages/yishi/chufangsetup/index.wxml
@@ -1,5 +1,5 @@
-
+
+
diff --git a/Pages/yishi/chufangsetup/index.wxss b/Pages/yishi/chufangsetup/index.wxss
index 1713f28..cb38bfb 100644
--- a/Pages/yishi/chufangsetup/index.wxss
+++ b/Pages/yishi/chufangsetup/index.wxss
@@ -1,7 +1,8 @@
+page{
+ background-color: #F6F6F6;
+}
.container{
width: 100vw;
- height: 100vh;
- background-color: #F6F6F6;
}
.t-tabs__content{
background-color: #F6F6F6;
@@ -14,7 +15,7 @@
}
.item_list{
width: 90vw;
- margin: 0 auto;
+ margin: 20rpx auto;
}
.item{
width: 100%;
diff --git a/Pages/yishi/identity/index.js b/Pages/yishi/identity/index.js
index 52443e9..18fe3d1 100644
--- a/Pages/yishi/identity/index.js
+++ b/Pages/yishi/identity/index.js
@@ -1,5 +1,4 @@
// Pages/yishi/identity/index.js
-import Toast from '@vant/weapp/toast/toast';
import { API } from './../../../utils/network/api'
import { FileUtil } from './../../../utils/fileutil'
@@ -16,70 +15,7 @@ Page({
stickyProps: {
zIndex: 2,
},
- realname:"",
- idcard:"",
- avatar: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/default_photo.png",
- is_avatar: false,
- city_show: false,
- keshi_show: false,
- yiyuan_show: false,
- zhuanchang_show: false,
- zhiye_show: false,
- zige_show: false,
- zhicheng_show: false,
- zhicheng_img_show: false,
- next_btn_txt: "下一步",
- next_btn_disabled: false,
- office_phone: "",
- keshi_note: "请选择科室",
- keshi_columns: [],
- select_keshi_id: "",
- select_keshi_index: "",
- custom_keshi: "",
- zhicheng_note: "请选择职称",
- zhicheng_columns: [
- {
- text: "执业医师",
- value: 1
- },
- {
- text: "主治医师",
- value: 2
- },
- {
- text: "副主任医师",
- value: 3
- },
- {
- text: "主任医师",
- value: 4
- }
- ],
- select_zhicheng_id: "",
- select_zhicheng_index: "",
- select_yiyuan_index: "",
- yiyuan_columns: [],
- zhuanchang_columns: [],
- zhuanchang_selected_columns: [],
- select_province_id: "",
- select_city_id: "",
- select_county_id: "",
- city_note: "请选择城市",
- yiyuan_note: "请选择医院",
- select_yiyuan_id: "",
- area_sub_titles: ["省份","市区","区县"],
- areaList: [],
- textarea_jianjie: "",
- textarea_shanchang: "",
- zhiye_file_list:[],
- zige_file_list:[],
- zhicheng_file_list:[],
- doctorauthiden_data_ready: false,
- basicdepartment_data_ready: false,
- areaprovince_data_ready: false,
- iden_auth_status: 0,
- iden_auth_disabled: 0,
- iden_auth_status_txt: "未认证",
+
},
onLoad(){
let _this = this;
diff --git a/Pages/yishi/identity/index.wxss b/Pages/yishi/identity/index.wxss
index 1569fc4..1a9fd97 100644
--- a/Pages/yishi/identity/index.wxss
+++ b/Pages/yishi/identity/index.wxss
@@ -1,27 +1,7 @@
.required{
color: #e34d59;
}
-.photo{
- position: relative;
- padding: 32rpx;
- display: flex;
- justify-content: space-between;
- font-size: 32rpx;
- font-weight: 400;
- align-items: center;
-}
-.photo::after {
- position: absolute;
- box-sizing: border-box;
- content: ' ';
- pointer-events: none;
- right: 0;
- left: 32rpx;
- bottom: 0;
- border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
- transform: scaleY(0.5);
- left: 32rpx;
-}
+
.title{
font-size: 30rpx;
color: #1C2023;
diff --git a/Pages/yishi/index/index.js b/Pages/yishi/index/index.js
index 8c40bef..f4b1b4d 100644
--- a/Pages/yishi/index/index.js
+++ b/Pages/yishi/index/index.js
@@ -110,6 +110,17 @@ Page({
},
onLoad(){
+
+ },
+
+ onShow: function () {
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
+ })
+ }
+ this.getMenuButtonBound();
+
api.yiShiIndex().then(response => {
console.log(response);
let avatar = response.data.info.avatar;
@@ -180,15 +191,6 @@ Page({
})
},
- onShow: function () {
- if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- this.getTabBar().setData({
- currentTab: 0 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
- })
- }
- this.getMenuButtonBound();
- },
-
onADChange(){
// console.log("onADChange");
},
diff --git a/Pages/yishi/manual/index.wxml b/Pages/yishi/manual/index.wxml
index 1125938..a325693 100644
--- a/Pages/yishi/manual/index.wxml
+++ b/Pages/yishi/manual/index.wxml
@@ -1,6 +1,6 @@
-
+
diff --git a/Pages/yishi/manual/index.wxss b/Pages/yishi/manual/index.wxss
index fd15078..7787fa6 100644
--- a/Pages/yishi/manual/index.wxss
+++ b/Pages/yishi/manual/index.wxss
@@ -1,9 +1,11 @@
-.container{
- width: 100vw;
- height: 100vh;
+page{
background-color: #F6F6F6;
}
+.container{
+ margin-top: 20rpx;
+ width: 100vw;
+}
.item_list{
width: 92vw;
- margin: 20rpx auto;
+ margin: 0 auto;
}
\ No newline at end of file
diff --git a/Pages/yishi/manual_detail/index.json b/Pages/yishi/manual_detail/index.json
index c977da1..3b3b8cc 100644
--- a/Pages/yishi/manual_detail/index.json
+++ b/Pages/yishi/manual_detail/index.json
@@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
- "m-nav-bar": "/commpents/mynavbar/index"
+ "te-nav-bar": "/commpents/te_navbar"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/manual_detail/index.wxml b/Pages/yishi/manual_detail/index.wxml
index 9bed7f9..2ee6c78 100644
--- a/Pages/yishi/manual_detail/index.wxml
+++ b/Pages/yishi/manual_detail/index.wxml
@@ -1,4 +1,5 @@
-
+
+
-
+
diff --git a/Pages/yishi/manual_detail/index.wxss b/Pages/yishi/manual_detail/index.wxss
index d4dbc33..893b247 100644
--- a/Pages/yishi/manual_detail/index.wxss
+++ b/Pages/yishi/manual_detail/index.wxss
@@ -1 +1,8 @@
-/* Pages/yishi/manual_detail/index.wxss */
\ No newline at end of file
+/* Pages/yishi/manual_detail/index.wxss */
+page{
+ background-color: #F6F6F6;
+}
+.container{
+ width: 92vw;
+ margin: 20rpx auto;
+}
\ No newline at end of file
diff --git a/Pages/yishi/my/index.wxml b/Pages/yishi/my/index.wxml
index 6e85b58..1b373d3 100644
--- a/Pages/yishi/my/index.wxml
+++ b/Pages/yishi/my/index.wxml
@@ -9,8 +9,8 @@
{{user_name}}
- 已医师认证>
- 未多点执业认证>
+ {{iden_auth_status==1?'已医师认证':'未医师认证'}}>
+ {{multi_point_status==1?'已多点执业认证':'未多点执业认证'}}>
diff --git a/Pages/yishi/myaccount/index.json b/Pages/yishi/myaccount/index.json
index da4c903..dba4393 100644
--- a/Pages/yishi/myaccount/index.json
+++ b/Pages/yishi/myaccount/index.json
@@ -7,6 +7,7 @@
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"van-icon": "@vant/weapp/icon/index",
"van-cell": "@vant/weapp/cell/index",
- "van-cell-group": "@vant/weapp/cell-group/index"
+ "van-cell-group": "@vant/weapp/cell-group/index",
+ "van-empty": "@vant/weapp/empty/index"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml
index e5df2b9..065be45 100644
--- a/Pages/yishi/myaccount/index.wxml
+++ b/Pages/yishi/myaccount/index.wxml
@@ -1,5 +1,5 @@
-
+
@@ -20,6 +20,7 @@
账单
+
diff --git a/Pages/yishi/myaccount/index.wxss b/Pages/yishi/myaccount/index.wxss
index 3360f3c..569ce52 100644
--- a/Pages/yishi/myaccount/index.wxss
+++ b/Pages/yishi/myaccount/index.wxss
@@ -1,11 +1,12 @@
-.container{
+page{
background-color: #F4F4F4;
+}
+.container{
width: 100vw;
- height: 100vh;
}
.top{
width: 92vw;
- margin: 50rpx auto 0 auto;
+ margin: 20rpx auto 0 auto;
background-color: #3CC7C0;
height: 150rpx;
border-radius: 20rpx;
diff --git a/Pages/yishi/myinfo/index.js b/Pages/yishi/myinfo/index.js
index b31a021..438aabc 100644
--- a/Pages/yishi/myinfo/index.js
+++ b/Pages/yishi/myinfo/index.js
@@ -14,7 +14,7 @@ Page({
idcard_status: 0,
iden_auth_status: 0,
user_name: "",
- brief_introduction: "点击编辑"
+ brief_introduction: "我的简介"
},
onLoad(){
//获取医生我的账户数据
diff --git a/Pages/yishi/quickreply/index.js b/Pages/yishi/quickreply/index.js
index 98a2dcc..bec4627 100644
--- a/Pages/yishi/quickreply/index.js
+++ b/Pages/yishi/quickreply/index.js
@@ -17,7 +17,8 @@ Page({
list_2: [],
show: false,
add_message: "",
- current_words_type: 1
+ current_words_type: 1,
+ focus: true
},
onTabChange(e){
this.setData({
@@ -68,5 +69,9 @@ Page({
show: false,
});
},
-
+ onInput(){
+ this.setData({
+ focus: true
+ })
+ }
})
\ No newline at end of file
diff --git a/Pages/yishi/quickreply/index.wxml b/Pages/yishi/quickreply/index.wxml
index 0cf49fe..7f39966 100644
--- a/Pages/yishi/quickreply/index.wxml
+++ b/Pages/yishi/quickreply/index.wxml
@@ -1,5 +1,5 @@
-
+
diff --git a/Pages/yishi/quickreply/index.wxss b/Pages/yishi/quickreply/index.wxss
index 9477ccb..08c4d3f 100644
--- a/Pages/yishi/quickreply/index.wxss
+++ b/Pages/yishi/quickreply/index.wxss
@@ -1,7 +1,8 @@
+page{
+ background-color: #F6F6F6;
+}
.container{
width: 100vw;
- height: 100vh;
- background-color: #F6F6F6;
}
.item_list{
width: 92vw;
diff --git a/Pages/yishi/service_notice/index.wxml b/Pages/yishi/service_notice/index.wxml
index a811f45..bf81a96 100644
--- a/Pages/yishi/service_notice/index.wxml
+++ b/Pages/yishi/service_notice/index.wxml
@@ -1,5 +1,5 @@
-
+
diff --git a/Pages/yishi/service_notice/index.wxss b/Pages/yishi/service_notice/index.wxss
index 466c0e7..47c4885 100644
--- a/Pages/yishi/service_notice/index.wxss
+++ b/Pages/yishi/service_notice/index.wxss
@@ -1,11 +1,13 @@
-.container{
+page{
background-color: #F4F4F4;
- height: 100vh;
+}
+.container{
width: 100vw;
+ padding-top: 20rpx;
}
.list{
width: 92vw;
- margin: 20rpx auto;
+ margin: 0 auto;
}
.item{
display: flex;
diff --git a/Pages/yishi/system_notice/index.wxml b/Pages/yishi/system_notice/index.wxml
index 2702ba0..eabc117 100644
--- a/Pages/yishi/system_notice/index.wxml
+++ b/Pages/yishi/system_notice/index.wxml
@@ -1,5 +1,5 @@
-
+
diff --git a/Pages/yishi/system_notice/index.wxss b/Pages/yishi/system_notice/index.wxss
index 4b11f53..4547adb 100644
--- a/Pages/yishi/system_notice/index.wxss
+++ b/Pages/yishi/system_notice/index.wxss
@@ -1,11 +1,13 @@
-.container{
+page{
background-color: #F4F4F4;
- height: 100vh;
+}
+.container{
width: 100vw;
+ padding-top: 20rpx;
}
.list{
width: 92vw;
- margin: 20rpx auto;
+ margin: 0 auto;
}
.item{
display: flex;
diff --git a/Pages/yishi/wenzhen/wenzhen.js b/Pages/yishi/wenzhen/wenzhen.js
index 9585f20..f53123c 100644
--- a/Pages/yishi/wenzhen/wenzhen.js
+++ b/Pages/yishi/wenzhen/wenzhen.js
@@ -1,3 +1,7 @@
+import { API } from './../../../utils/network/api'
+import { getTimeAgo } from './../../../utils/util'
+import TIM from '../../../TUIKit/lib/tim-wx-sdk';
+const api = new API()
const app = getApp()
Page({
data: {
@@ -6,17 +10,46 @@ Page({
title: '问诊消息', //导航栏 中间的标题
},
height: app.globalData.height,
- has_data: true
+ has_data: true,
+ data_list_1: [],
+ data_list_2: [],
+ data_list_3: [],
+ data_list_4: [],
+ data_list_5: [],
+ message_inquiry_type: 2,
+ },
+ onLoad() {
+ console.log("wenzhen onload");
+
},
-
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
})
}
- },
+ let session_data_list_1 = wx.getStorageSync('session_data_list_1');
+ let session_data_list_2 = wx.getStorageSync('session_data_list_2');
+ let session_data_list_3 = wx.getStorageSync('session_data_list_3');
+ let session_data_list_4 = wx.getStorageSync('session_data_list_4');
+ if(!session_data_list_1) wx.setStorageSync('session_data_list_1', []);
+ if(!session_data_list_2) wx.setStorageSync('session_data_list_2', []);
+ if(!session_data_list_3) wx.setStorageSync('session_data_list_3', []);
+ if(!session_data_list_4) wx.setStorageSync('session_data_list_4', []);
+ this.setData({"data_list_1": session_data_list_1});
+ this.setData({"data_list_2": session_data_list_2});
+ this.setData({"data_list_3": session_data_list_3});
+ this.setData({"data_list_4": session_data_list_4});
+ if(session_data_list_1.length == 0) this.getDoctorInquiryMessage(1);
+ if(session_data_list_2.length == 0) this.getDoctorInquiryMessage(2);
+ if(session_data_list_3.length == 0) this.getDoctorInquiryMessage(3);
+ if(session_data_list_4.length == 0) this.getDoctorInquiryMessage(4);
+
+
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
+
+ },
go(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
@@ -34,5 +67,129 @@ Page({
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
}
})
+ },
+
+ $onMessageReceived(value) {
+ const message = value.data[0];
+ console.log("message from wenzhen: ",message)
+ let cloudCustomData = JSON.parse(message.cloudCustomData);
+ let inquiry_type = cloudCustomData.inquiry_type;
+ let order_inquiry_id = cloudCustomData.order_inquiry_id;
+ let type = message.type;
+ let message_txt = "新消息";
+ console.log(type)
+ switch (type) {
+ case TIM.TYPES.MSG_TEXT:
+ console.log("文本消息");
+ message_txt = message.payload.text;
+ break;
+ case TIM.TYPES.MSG_IMAGE:
+ console.log("图片消息");
+ message_txt = "[图片]";
+ break;
+ case TIM.TYPES.MSG_AUDIO:
+ console.log("音频消息")
+ message_txt = "[语言]";
+ break;
+ case TIM.TYPES.MSG_VIDEO:
+ console.log("视频消息");
+ message_txt = "[视频]";
+ break;
+ case TIM.TYPES.MSG_FILE:
+ console.log("文件消息")
+ message_txt = "[文件]";
+ break;
+ case TIM.TYPES.MSG_CUSTOM:
+ console.log("自定义消息")
+ break;
+ case TIM.TYPES.MSG_MERGER:
+ console.log("合并消息")
+ break;
+ case TIM.TYPES.MSG_LOCATION:
+ console.log("位置消息")
+ message_txt = "[位置]";
+ break;
+ case TIM.TYPES.MSG_FACE:
+ console.log("表情消息")
+ message_txt = "[表情]";
+ break;
+ default:
+ break;
+ }
+ let list_name = "data_list_" + inquiry_type;
+ let _index = this.data[list_name].findIndex(item => {
+ return item.order_inquiry_id == order_inquiry_id;
+ })
+
+ let new_list = [];
+ //没有当前会话
+ if(_index > -1){
+ let target = list_name + "[" + _index + "].last_message_content.Text";
+ let target_dot = list_name + "[" + _index + "].message_dot";
+ console.log("target: ",target);
+ this.setData({
+ [target]: message_txt,
+ [target_dot]: true
+ })
+ new_list.push(this.data[list_name][_index]);//先放入目标
+ }else{
+ let item = {};
+ item.inquiry_status = message.inquiry_status;
+ let txt = {};
+ txt.Text= message_txt;
+ item.last_message_content = txt;
+ item.message_send_time = message.message_send_time;
+ item.message_seq = message.message_seq;
+ item.message_type = message.message_type;
+ item.order_inquiry_id = message.order_inquiry_id;
+ item.patient_age = message.patient_age;
+ item.patient_name = message.patient_name;
+ item.patient_sex = message.patient_sex;
+ item.to_user_id = message.to_user_id;
+ item.message_dot = true;
+ new_list.push(item);
+ }
+
+ //置顶
+ this.data[list_name].forEach((item, index) => {
+ if(index != _index){
+ new_list.push(item)
+ }
+ })
+
+ this.setData({
+ [list_name]: new_list
+ })
+
+ wx.setStorageSync('session_'+list_name, new_list);
+ },
+ getDoctorInquiryMessage(message_inquiry_type){
+ let list_name = "data_list_" + message_inquiry_type;
+ this.setData({
+ [list_name]: []
+ })
+ //获取医生问诊消息列表
+ api.getDoctorInquiryMessage({message_inquiry_type: message_inquiry_type}).then(response => {
+ console.log(response);
+ if(response.data){
+ console.log(list_name);
+ let data_list = this.data[list_name];
+ response.data.forEach((item) => {
+ item.message_send_time = getTimeAgo(item.message_send_time);
+ data_list.push(item);
+ })
+ this.setData({
+ [list_name]: data_list,
+ })
+ wx.setStorageSync('session_'+list_name, data_list);
+ }
+ }).catch(errors => {console.error(errors);})
+ },
+ onTabsChange(e){
+ console.log(e);
+ this.setData({
+ message_inquiry_type: e.detail.value,
+ })
+ this.getDoctorInquiryMessage(e.detail.value)
}
})
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen/wenzhen.json b/Pages/yishi/wenzhen/wenzhen.json
index 53dfaec..b988581 100644
--- a/Pages/yishi/wenzhen/wenzhen.json
+++ b/Pages/yishi/wenzhen/wenzhen.json
@@ -6,6 +6,8 @@
"t-image": "tdesign-miniprogram/image/image",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
- "van-button": "@vant/weapp/button/index"
+ "t-badge": "tdesign-miniprogram/badge/badge",
+ "van-button": "@vant/weapp/button/index",
+ "van-empty": "@vant/weapp/empty/index"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen/wenzhen.wxml b/Pages/yishi/wenzhen/wenzhen.wxml
index 1b273e4..c2f0b92 100644
--- a/Pages/yishi/wenzhen/wenzhen.wxml
+++ b/Pages/yishi/wenzhen/wenzhen.wxml
@@ -3,11 +3,16 @@
-
+
+
+
+
服务通知
-
+
+
+
系统公告
@@ -20,21 +25,20 @@
-
+
+
+
+
+
-
+
+
+
+
+
-
-
+
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
diff --git a/Pages/yishi/wenzhen/wenzhen.wxss b/Pages/yishi/wenzhen/wenzhen.wxss
index 95dbf9b..933153a 100644
--- a/Pages/yishi/wenzhen/wenzhen.wxss
+++ b/Pages/yishi/wenzhen/wenzhen.wxss
@@ -1,10 +1,12 @@
-.container{
+page{
background-color: #F4F4F4;
+}
+.container{
width: 100vw;
- height: 100vh;
+ padding-top: 20rpx;
}
.top{
- margin: 30rpx auto;
+ margin: 0 auto 30rpx auto;
display: flex;
padding: 20rpx 20rpx;
background-color: rgb(255, 255, 255);
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.js b/Pages/yishi/wenzhen_v2/wenzhen.js
new file mode 100644
index 0000000..128b573
--- /dev/null
+++ b/Pages/yishi/wenzhen_v2/wenzhen.js
@@ -0,0 +1,270 @@
+import { API } from './../../../utils/network/api'
+import { getTimeAgo } from './../../../utils/util'
+// import TIM from '../../../TUIKit/lib/tim-wx-sdk';
+const api = new API()
+const app = getApp()
+Page({
+ data: {
+ navbarData: {
+ showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
+ title: '问诊消息', //导航栏 中间的标题
+ },
+ height: app.globalData.height,
+ has_data: true,
+ data_list_1: [],
+ data_list_2: [],
+ data_list_3: [],
+ data_list_4: [],
+ data_list_5: [],
+ conversationList: [],
+ message_inquiry_type: 2,
+ },
+ onLoad() {
+ console.log("wenzhen onload");
+
+ },
+ onShow: function () {
+ console.log("onShow from wenzhen V2")
+ if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+ this.getTabBar().setData({
+ active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
+ })
+ }
+ this.getConversationList();
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
+ },
+ getConversationList(){
+ wx.$TUIKit.getConversationList().then((imResponse) => {
+ console.log("imResponse.data.conversationList from wenzhen_v2: ", imResponse.data.conversationList);
+ this.setData({
+ conversationList: imResponse.data.conversationList,
+ });
+ }).then(() => {
+ console.log("开始查询订单状态")
+ this.formatStatus();
+ });
+ },
+ go(e){
+ wx.navigateTo({
+ url: e.currentTarget.dataset.url,
+ events: {
+ // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
+ acceptDataFromOpenedPage: function(data) {
+ console.log(data)
+ },
+ someEvent: function(data) {
+ console.log(data)
+ }
+ },
+ success: function(res) {
+ // 通过 eventChannel 向被打开页面传送数据
+ res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
+ }
+ })
+ },
+ $onMessageReceived(value) {
+ const message = value.data[0];
+ console.log("message from wenzhen: ",message)
+ this.getConversationList();
+ // let cloudCustomData = JSON.parse(message.cloudCustomData);
+ // let inquiry_type = cloudCustomData.inquiry_type;
+ // let order_inquiry_id = cloudCustomData.order_inquiry_id;
+ // let type = message.type;
+ // let message_txt = "新消息";
+ // console.log(type)
+ // switch (type) {
+ // case TIM.TYPES.MSG_TEXT:
+ // console.log("文本消息");
+ // message_txt = message.payload.text;
+ // break;
+ // case TIM.TYPES.MSG_IMAGE:
+ // console.log("图片消息");
+ // message_txt = "[图片]";
+ // break;
+ // case TIM.TYPES.MSG_AUDIO:
+ // console.log("音频消息")
+ // message_txt = "[语言]";
+ // break;
+ // case TIM.TYPES.MSG_VIDEO:
+ // console.log("视频消息");
+ // message_txt = "[视频]";
+ // break;
+ // case TIM.TYPES.MSG_FILE:
+ // console.log("文件消息")
+ // message_txt = "[文件]";
+ // break;
+ // case TIM.TYPES.MSG_CUSTOM:
+ // console.log("自定义消息")
+ // break;
+ // case TIM.TYPES.MSG_MERGER:
+ // console.log("合并消息")
+ // break;
+ // case TIM.TYPES.MSG_LOCATION:
+ // console.log("位置消息")
+ // message_txt = "[位置]";
+ // break;
+ // case TIM.TYPES.MSG_FACE:
+ // console.log("表情消息")
+ // message_txt = "[表情]";
+ // break;
+ // default:
+ // break;
+ // }
+ // let list_name = "data_list_" + inquiry_type;
+ // let _index = this.data[list_name].findIndex(item => {
+ // return item.order_inquiry_id == order_inquiry_id;
+ // })
+
+ // let new_list = [];
+ // //没有当前会话
+ // if(_index > -1){
+ // let target = list_name + "[" + _index + "].last_message_content.Text";
+ // let target_dot = list_name + "[" + _index + "].message_dot";
+ // console.log("target: ",target);
+ // this.setData({
+ // [target]: message_txt,
+ // [target_dot]: true
+ // })
+ // new_list.push(this.data[list_name][_index]);//先放入目标
+ // }else{
+ // let item = {};
+ // item.inquiry_status = message.inquiry_status;
+ // let txt = {};
+ // txt.Text= message_txt;
+ // item.last_message_content = txt;
+ // item.message_send_time = message.message_send_time;
+ // item.message_seq = message.message_seq;
+ // item.message_type = message.message_type;
+ // item.order_inquiry_id = message.order_inquiry_id;
+ // item.patient_age = message.patient_age;
+ // item.patient_name = message.patient_name;
+ // item.patient_sex = message.patient_sex;
+ // item.to_user_id = message.to_user_id;
+ // item.message_dot = true;
+ // new_list.push(item);
+ // }
+
+ // //置顶
+ // this.data[list_name].forEach((item, index) => {
+ // if(index != _index){
+ // new_list.push(item)
+ // }
+ // })
+
+ // this.setData({
+ // [list_name]: new_list
+ // })
+
+ },
+ formatStatus(){
+
+
+ let order_inquiry_id_list = [];
+
+ this.data.conversationList.forEach(item => {
+ let conversationID = item.conversationID;
+ if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
+ let lastMessage = item.lastMessage;
+ if(!lastMessage) return;
+ let cloudCustomData = lastMessage.cloudCustomData;
+ if(!cloudCustomData) return;
+ let cloudCustomDataJson = JSON.parse(cloudCustomData);
+ let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
+ order_inquiry_id_list.push(order_inquiry_id);//准备去请求后端那订单状态
+ })
+
+ let conversationList = this.data.conversationList;
+ //获取医生问诊消息用户属性
+ api.getDoctorInquiryMessageAttr({order_inquiry_ids: order_inquiry_id_list.join(",")}).then(response => {
+ if(response.data.length > 0){
+ let new_conversationList = [];
+ conversationList.forEach(item => {
+ let conversationID = item.conversationID;
+ if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
+ let lastMessage = item.lastMessage;
+ if(!lastMessage) return;
+ let cloudCustomData = lastMessage.cloudCustomData;
+ if(!cloudCustomData) return;
+ let cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
+ let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
+ let order = response.data.find(attr_item => {
+ return attr_item.order_inquiry_id == order_inquiry_id;
+ })
+ if(!order) return;
+
+ item.inquiry_status = order.inquiry_status;
+ item.patient_age = order.patient_age;
+ item.patient_name = order.patient_name;
+ item.patient_sex = order.patient_sex;
+
+ new_conversationList.push(item);
+ })
+
+ this.setData({
+ conversationList: new_conversationList
+ })
+
+ }
+ }).then(() => {
+ console.log("开始格式化formatConversationList")
+ this.formatConversationList();
+ }).catch(errors => {console.error(errors);})
+ },
+ formatConversationList(){
+ let session_list = [];
+ let session_data_list_1 = [];
+ let session_data_list_2 = [];
+ let session_data_list_3 = [];
+ let session_data_list_4 = [];
+ session_list.push(session_data_list_1);
+ session_list.push(session_data_list_2);
+ session_list.push(session_data_list_3);
+ session_list.push(session_data_list_4);
+
+ this.data.conversationList.forEach(item => {
+ let conversationID = item.conversationID;
+ if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
+ let type = item.type;
+ let lastMessage = item.lastMessage;
+ let userProfile = item.userProfile;
+ if(!lastMessage) return;
+ let cloudCustomData = lastMessage.cloudCustomData;
+ if(!cloudCustomData) return;
+ let cloudCustomDataJson = JSON.parse(cloudCustomData);
+ let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
+ if(!order_inquiry_id) return;
+ let inquiry_type = cloudCustomDataJson.inquiry_type;
+ let session_item = {};
+ session_item.inquiry_status = item.inquiry_status;//订单状态暂无
+ let txt = {};
+ txt.Text= lastMessage.messageForShow;
+ session_item.last_message_content = txt;
+ session_item.message_send_time = getTimeAgo(lastMessage.lastTime);
+ session_item.message_type = type;
+ session_item.order_inquiry_id = order_inquiry_id;
+ session_item.patient_age = item.patient_age;//暂无
+ session_item.patient_name = userProfile.nick;
+ session_item.from_account = userProfile.userID;
+ session_item.patient_sex = item.patient_sex;//暂无
+ let unreadCount = item.unreadCount;
+ if(unreadCount > 0){
+ session_item.message_dot = true;
+ }else{
+ session_item.message_dot = false;
+ }
+ session_list[inquiry_type - 1].push(session_item);
+ })
+
+
+
+ this.setData({
+ data_list_1: session_data_list_1,
+ data_list_2: session_data_list_2,
+ data_list_3: session_data_list_3,
+ data_list_4: session_data_list_4,
+ })
+ },
+ onTabsChange(e){
+ console.log(e);
+ }
+})
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.json b/Pages/yishi/wenzhen_v2/wenzhen.json
new file mode 100644
index 0000000..b988581
--- /dev/null
+++ b/Pages/yishi/wenzhen_v2/wenzhen.json
@@ -0,0 +1,13 @@
+{
+ "component": true,
+ "usingComponents": {
+ "te-nav-bar": "/commpents/te_navbar",
+ "wenzhen-data": "/commpents/wenzhen_data/index",
+ "t-image": "tdesign-miniprogram/image/image",
+ "t-tabs": "tdesign-miniprogram/tabs/tabs",
+ "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
+ "t-badge": "tdesign-miniprogram/badge/badge",
+ "van-button": "@vant/weapp/button/index",
+ "van-empty": "@vant/weapp/empty/index"
+ }
+}
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxml b/Pages/yishi/wenzhen_v2/wenzhen.wxml
new file mode 100644
index 0000000..38f81c4
--- /dev/null
+++ b/Pages/yishi/wenzhen_v2/wenzhen.wxml
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+ 服务通知
+
+
+
+
+
+ 系统公告
+
+
+
+
+
+ 您还未设置在线问诊价格
+
+ 开通图文问诊
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxss b/Pages/yishi/wenzhen_v2/wenzhen.wxss
new file mode 100644
index 0000000..d418242
--- /dev/null
+++ b/Pages/yishi/wenzhen_v2/wenzhen.wxss
@@ -0,0 +1,51 @@
+page{
+ background-color: #F4F4F4;
+}
+.container{
+ width: 100vw;
+ padding-top: 20rpx;
+}
+.top{
+ margin: 0 auto 30rpx auto;
+ display: flex;
+ padding: 20rpx 20rpx;
+ background-color: rgb(255, 255, 255);
+}
+.top_left, .top_right{
+ flex: 1;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ color: #666666;
+ font-size: 20rpx;
+}
+.top_left{
+ border-right: 1px solid #F4F4F4;
+}
+.t-tab-panel,.t-tabs__content {
+ background-color: #F4F4F4 !important;
+}
+.t-tabs__item--active{
+ color: #49B9AD !important;
+ font-size: 32rpx !important;
+}
+.t-tabs__item-inner--line{
+ font-size: 28rpx !important;
+}
+.t-tabs__track{
+ background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
+}
+.empty{
+ width: 92vw;
+ margin: 0 auto;
+ height: 500rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+}
+.empty_note{
+ font-size: 24rpx;
+ color: #999999;
+ margin-top: 30rpx;
+}
\ No newline at end of file
diff --git a/Pages/yishi/zhiye_identity/index.wxml b/Pages/yishi/zhiye_identity/index.wxml
index ad5240b..3d986e1 100644
--- a/Pages/yishi/zhiye_identity/index.wxml
+++ b/Pages/yishi/zhiye_identity/index.wxml
@@ -32,6 +32,7 @@
+
{{item.text}}
diff --git a/TUIKit/components/TUIChat/components/MessageElements/TextMessage/index.wxss b/TUIKit/components/TUIChat/components/MessageElements/TextMessage/index.wxss
index 5809238..3bb26d7 100644
--- a/TUIKit/components/TUIChat/components/MessageElements/TextMessage/index.wxss
+++ b/TUIKit/components/TUIChat/components/MessageElements/TextMessage/index.wxss
@@ -29,6 +29,24 @@
border: 1rpx solid #1ACAD3;
border-style: none none solid solid
}
+.your-text {
+ position: relative;
+ border-radius: 10px 10px 10px 10px;
+ background: rgb(255, 255, 255);
+ border: 1rpx solid #D8D8D8;
+}
+.your-text::after{
+ content:'';
+ position: absolute;
+ top: 45rpx;
+ left: 0;
+ transform: translate(-50%,-50%) rotate(45deg);
+ width: 16rpx;
+ height: 16rpx;
+ background: rgb(255, 255, 255);
+ border: 1rpx solid #D8D8D8;
+ border-style: none none solid solid
+}
.message-body-span {
display: flex;
justify-content: center;
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIKit/components/TUIChat/components/MessageInput/index.js
index e3ce880..6c50b87 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.js
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.js
@@ -16,6 +16,10 @@ Component({
});
},
},
+ order_inquiry_id: {
+ type: String,
+ value: {},
+ },
hasCallKit: {
type: Boolean,
value: false,
@@ -331,7 +335,7 @@ Component({
});
break;
case '10'://查看完整病历
- app.go("/Pages/yishi/case/index")
+ app.go("/Pages/yishi/case/index?order_inquiry_id="+this.data.order_inquiry_id)
break;
case '11'://在线开方
app.go("/Pages/yishi/onlinechufang/index")
@@ -483,16 +487,16 @@ Component({
const text = flag ? msg : this.data.message;
const { FEAT_NATIVE_CODE } = constant;
const message = wx.$TUIKit.createTextMessage({
- to,
+ to,
conversationType: this.data.conversation.type,
payload: {
text,
},
- cloudCustomData: JSON.stringify({ messageFeature:
- {
- needTyping: FEAT_NATIVE_CODE.FEAT_TYPING,
- version: FEAT_NATIVE_CODE.NATIVE_VERSION,
- },
+ cloudCustomData: JSON.stringify({
+ order_inquiry_id: "AA",
+ inquiry_type: "BB",
+ message_type: 0,
+ is_system: 0
}),
});
this.setData({
@@ -519,6 +523,7 @@ Component({
// 发送正在输入状态消息
sendTypingStatusMessage() {
+
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
// 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束
const typingMessage = wx.$TUIKit.createCustomMessage({
@@ -668,9 +673,9 @@ Component({
},
// 发送正在输入消息
$sendTypingMessage(message) {
- wx.$TUIKit.sendMessage(message, {
- onlineUserOnly: true,
- });
+ // wx.$TUIKit.sendMessage(message, {
+ // onlineUserOnly: true,
+ // });
},
$sendTIMMessage(message) {
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxml b/TUIKit/components/TUIChat/components/MessageInput/index.wxml
index 0d03825..7ecbbb1 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.wxml
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxml
@@ -25,12 +25,12 @@
-
-
-
-
- 发送
-
+
+
+
+
+ 发送
+
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxss b/TUIKit/components/TUIChat/components/MessageInput/index.wxss
index ea5471c..16393b2 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.wxss
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxss
@@ -6,9 +6,9 @@
display: flex;
padding-bottom: 16rpx;
background-color: #fff;
- width: calc(100vw - 38rpx);
+ width: 95vw;
overflow: scroll;
- padding-left: 38rpx;
+ margin: 0 auto;
}
.TUI-commom-function {
background-color: blueviolet;
@@ -37,25 +37,27 @@
margin-left: 48rpx;
}
.TUI-message-input-functions {
- display: flex;
+ flex: 2;
+ display: flex;
+ justify-content: center;
}
.TUI-message-input-main {
- height: 30px;
+ min-height: 78rpx;
background-color: #F1F1F1;
- flex: 1;
+ flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
- border-radius: 5rpx;
+ border-radius: 10rpx;
display: flex;
align-items: center;
}
.TUI-message-input-main-focus {
- height: auto;
+ min-height: 78rpx;
background-color: #F1F1F1;
- flex: 1;
+ flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
- border-radius: 5rpx;
+ border-radius: 10rpx;
display: flex;
align-items: center;
}
@@ -66,6 +68,7 @@
/* 最多显示10行 */
line-height: 30rpx;
overflow: scroll;
+ padding: 20rpx 20rpx;
}
.TUI-icon {
width: 56rpx;
@@ -96,9 +99,16 @@
}
.TUI-sendMessage-btn {
- display: flex;
- align-items: center;
- margin: 0 10rpx;
+ display: flex;
+ align-items: center;
+ width: 90%;
+ text-align: center;
+ justify-content: center;
+ border-radius: 10rpx;
+ color: #fff;
+}
+.TUI-sendMessage-btn-input{
+ background-color: #3CC7C0;
}
.TUI-Emoji-area {
diff --git a/TUIKit/components/TUIChat/components/MessageList/index.js b/TUIKit/components/TUIChat/components/MessageList/index.js
index 0c7a134..11834d0 100644
--- a/TUIKit/components/TUIChat/components/MessageList/index.js
+++ b/TUIKit/components/TUIChat/components/MessageList/index.js
@@ -208,6 +208,8 @@ Component({
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
logger.log('| MessageList | setMessageRead | ok');
});
+ console.log('| MessageList | setMessageRead | ok');
+ console.log('message cloudCustomData:', message.cloudCustomData);
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
this.messageTimeForShow(message);
this.setData({
diff --git a/TUIKit/components/TUIChat/index.js b/TUIKit/components/TUIChat/index.js
index 3cd4945..aedd762 100644
--- a/TUIKit/components/TUIChat/index.js
+++ b/TUIKit/components/TUIChat/index.js
@@ -31,6 +31,10 @@ Component({
});
},
},
+ order_inquiry_id: {
+ type: String,
+ value: ''
+ },
unreadCount: {
type: Number,
value: '',
diff --git a/TUIKit/components/TUIChat/index.wxml b/TUIKit/components/TUIChat/index.wxml
index e558cea..f28a852 100644
--- a/TUIKit/components/TUIChat/index.wxml
+++ b/TUIKit/components/TUIChat/index.wxml
@@ -2,7 +2,7 @@
- {{conversationName}}-患者姓名
+ {{conversationName}}
@@ -20,7 +20,7 @@
-
diff --git a/TUIKit/components/TUIConversation/index.js b/TUIKit/components/TUIConversation/index.js
index c8584b4..e3f7d26 100644
--- a/TUIKit/components/TUIConversation/index.js
+++ b/TUIKit/components/TUIConversation/index.js
@@ -116,6 +116,7 @@ Component({
},
getConversationList() {
wx.$TUIKit.getConversationList().then((imResponse) => {
+ console.log("imResponse.data.conversationList: ", imResponse.data.conversationList);
this.setData({
conversationList: imResponse.data.conversationList,
});
diff --git a/app.js b/app.js
index 4300824..34010e1 100644
--- a/app.js
+++ b/app.js
@@ -1,4 +1,7 @@
import Aegis from './TUIKit/lib/aegis';
+import TIM from './TUIKit/lib/tim-wx-sdk';
+import { genTestUserSig } from './TUIKit/debug/GenerateTestUserSig';
+import TIMUploadPlugin from './TUIKit/lib/tim-upload-plugin';
App({
onLaunch: function (options) {
// 判断是否由分享进入小程序
@@ -17,29 +20,88 @@ App({
}
})
- // console.log("download fonts from oss ");
- // let loadStatus = false;
- // if (!loadStatus) {
- // wx.loadFontFace({
- // global: true,
- // family: 'AlibabaPuHuiTi',
- // source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/STXINGKA.TTF")',
- // // source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/AlibabaPuHuiTi-2-65-Medium.ttf")',
- // success() {
- // loadStatus = true;
- // console.log("download fonts from oss success");
- // },
- // fail(){
- // console.log("download fonts from oss error");
- // },
- // complete(){
- // console.log("download fonts from oss complete");
- // }
- // });
- // }
- this.aegisInit()
+ console.log("download fonts from oss ");
+ let loadStatus = false;
+ if (!loadStatus) {
+ wx.loadFontFace({
+ global: true,
+ family: 'AlibabaPuHuiTi',
+ // source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/STXINGKA.TTF")',
+ source: 'url("https://docwebsite.oss-cn-beijing.aliyuncs.com/app/fonts/AlibabaPuHuiTi/AlibabaPuHuiTi-2-65-Medium/AlibabaPuHuiTi-2-65-Medium.ttf")',
+ success() {
+ loadStatus = true;
+ console.log("download fonts from oss success");
+ },
+ fail(){
+ console.log("download fonts from oss error");
+ },
+ complete(){
+ console.log("download fonts from oss complete");
+ }
+ });
+ }
+ this.aegisInit()
console.warn("app.js wx.aegis: ", wx.aegis);
+
+ //初始化tab-bar角标
+ let index_info = wx.getStorageSync('index_info');
+ let wenzhen_info = wx.getStorageSync('wenzhen_info');
+ let my_info = wx.getStorageSync('my_info');
+ if(!index_info) wx.setStorageSync('index_info',"");
+ if(!wenzhen_info) wx.setStorageSync('wenzhen_info', "");
+ if(!my_info) wx.setStorageSync('my_info', "");
+ },
+ onShow(){
+ this.imInit(this.onSDKReady, this);
+ },
+ imInit(onSDKReady, obj){
+ let sign = genTestUserSig(this.globalData.config);
+ console.log("sign: ", sign);
+ const userSig = sign.userSig;
+ console.log("userSig: ", userSig);
+ wx.$TUIKit = TIM.create({
+ SDKAppID: this.globalData.config.SDKAPPID
+ });
+
+ wx.$chat_SDKAppID = this.globalData.config.SDKAPPID;
+ wx.$chat_userID = this.globalData.config.userID;
+ wx.$chat_userSig = userSig;
+ wx.$TUIKitTIM = TIM;
+ wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
+ wx.$TUIKit.login({
+ userID: this.globalData.config.userID,
+ userSig
+ });
+ wx.$TUIKit.setLogLevel(3);//设置日志级别
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, onSDKReady, obj);
+ },
+ onSDKReady(){
+ console.log("onSDKReady from app.js");
+ this.globalData.chat_sdk_ready = true;
+
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived, this);
+ },
+ $onSystemPushReceived(e){
+ console.log("onSystemPushReceived from app.js");
+ console.log(e)
+ let message = e.data[0];
+ console.log(message)
+
+ let type = message.type;
+ console.log(type);
+
+
+ this.formatTabBarNum("wenzhen_info");
+
+ },
+ formatTabBarNum(name){
+ let val = wx.getStorageSync(name);
+ if(val == "") val = 0;
+ if(val == "+99") val = 100;
+ val = val + 1;
+ if(val > 99) val = '+99';
+ wx.setStorageSync(name, val);
},
aegisInit() {
wx.aegis = new Aegis({
@@ -53,7 +115,13 @@ App({
share: false, // 分享默认为false
height: 0,
login_url: "/Pages/login/index",
- chat_sdk_ready: false
+ chat_sdk_ready: false,
+ config: {
+ userID: "123456", //User ID
+ SDKAPPID: 1400796919, // Your SDKAppID
+ SECRETKEY: "a5bcd8c583181cf004e9d91a47687d719d4b5d2a10ce33fbee95d587889447d8", // Your secretKey
+ EXPIRETIME: 604800,
+ },
},
go(url, ...params){
wx.navigateTo({
diff --git a/app.json b/app.json
index 86cc64f..fff176f 100644
--- a/app.json
+++ b/app.json
@@ -48,7 +48,8 @@
"Pages/login/index",
"Pages/mobile_login/index",
"Pages/yishi/manual_detail/index",
- "Pages/yishi/addzhenduan/index"
+ "Pages/yishi/addzhenduan/index",
+ "Pages/yishi/wenzhen_v2/wenzhen"
],
"window": {
"navigationBarBackgroundColor": "#ffffff",
@@ -81,8 +82,8 @@
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
},
{
- "pagePath": "Pages/yishi/wenzhen/wenzhen",
- "text": "问诊(Y)",
+ "pagePath": "Pages/yishi/wenzhen_v2/wenzhen",
+ "text": "问诊(Z)",
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
"selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png"
},
diff --git a/commpents/myprofile/index.js b/commpents/myprofile/index.js
index 5d8544b..53fac75 100644
--- a/commpents/myprofile/index.js
+++ b/commpents/myprofile/index.js
@@ -1,6 +1,7 @@
// commpents/myprofile/index.js
import Toast from '@vant/weapp/toast/toast';
import { API } from './../../utils/network/api'
+import { FileUtil } from './../../utils/fileutil'
const api = new API()
const app = getApp()
@@ -88,6 +89,13 @@ Component({
iden_auth_status: 0,
iden_auth_disabled: 0,
iden_auth_status_txt: "未认证",
+ avatar_reason: "",
+ department_custom_mobile_reason: "",
+ brief_introduction_reason: "",
+ be_good_at_reason: "",
+ license_cert_reason: "",
+ qualification_cert_reason: "",
+ work_cert_reason: "",
},
options: {
@@ -97,6 +105,11 @@ Component({
lifetimes: {
attached(){
let _this = this;
+ console.log(_this.data.zhicheng_columns);
+ _this.setData({
+ "zhicheng_columns[0].text": "AAA"
+ })
+ console.log(_this.data.zhicheng_columns);
//获得医师身份认证
api.getDoctorAuthIden().then(response => {
console.log("getDoctorAuthIden: ",response);
@@ -115,6 +128,13 @@ Component({
select_yiyuan_id: response.data.hospital.hospital_id,
hospital: response.data.hospital,
iden_auth_status: response.data.iden_auth_status,
+ avatar_reason: response.data.avatar_reason,
+ department_custom_mobile_reason: response.data.department_custom_mobile_reason,
+ brief_introduction_reason: response.data.brief_introduction_reason,
+ be_good_at_reason: response.data.be_good_at_reason,
+ license_cert_reason: response.data.license_cert_reason,
+ qualification_cert_reason: response.data.qualification_cert_reason,
+ work_cert_reason: response.data.work_cert_reason,
});
let iden_auth_status = response.data.iden_auth_status;
console.log("iden_auth_status: ",iden_auth_status)
@@ -200,18 +220,24 @@ Component({
let zhicheng_huixian = false;
let area_huixian = false;
//执行回显
+ let huixian_try_count = 0;
let data_replay = setInterval(() => {
- console.log("执行回显。。。")
+ try {
+ console.log("执行回显。。。", huixian_try_count);
//回显科室
if(_this.data.doctorauthiden_data_ready && _this.data.basicdepartment_data_ready){
let index = _this.data.keshi_columns.findIndex(item => {
+ console.log("value: ",item.value);
+ console.log("select_keshi_id: ", _this.data.select_keshi_id);
return item.value == _this.data.select_keshi_id
})
- _this.setData({
- select_keshi_index: index,
- keshi_note: _this.data.keshi_columns[index].text
- })
+ if(index){
+ _this.setData({
+ select_keshi_index: index,
+ keshi_note: _this.data.keshi_columns[index].text
+ })
+ }
keshi_huixian = true;
}
//回显职称
@@ -283,16 +309,19 @@ Component({
area_huixian = true;
}
-
+ } catch (error) {
+ console.error(error)
+ }
+ huixian_try_count = huixian_try_count + 1;
//都回显成功后,清除计时器
console.log("keshi_huixian: ", keshi_huixian)
console.log("zhicheng_huixian: ", zhicheng_huixian)
console.log("area_huixian: ", area_huixian)
- if(keshi_huixian && zhicheng_huixian && area_huixian){
+ if((keshi_huixian && zhicheng_huixian && area_huixian) || huixian_try_count > 100){
clearInterval(data_replay);
}
- console.log("计时器")
- }, 1000);
+ console.log("计时器");
+ }, 100);
},
},
@@ -558,12 +587,21 @@ Component({
},
select_zhuanchang(e){
console.log(e);
- let expertise_name = e.currentTarget.dataset.expertise_name;
- let expertise_id = e.currentTarget.dataset.expertise_id;
- let is_selected = e.currentTarget.dataset.is_selected;
- let index = e.currentTarget.dataset.index;
- let data = "zhuanchang_columns["+index+"].is_selected";
- this.setData({[data]: is_selected==1?0:1})
+ let count = 0
+ this.data.zhuanchang_columns.forEach(item => {
+ count = count + 1;
+ })
+ if(count < 10){
+ let is_selected = e.currentTarget.dataset.is_selected;
+ let index = e.currentTarget.dataset.index;
+ let data = "zhuanchang_columns["+index+"].is_selected";
+ this.setData({[data]: is_selected==1?0:1})
+ }else{
+ wx.showToast({
+ title: '最多10个专长',
+ icon: "error"
+ })
+ }
},
zhuanchangConfirm(e){
this.setData({ zhuanchang_show: false });
@@ -617,6 +655,80 @@ Component({
})
}).catch(errors => {console.error(errors);})
- }
+ },
+ doUploadFile(event) {
+ console.log("index douploadFIle: ", event);
+ const scene = event.currentTarget.dataset.scene;
+ const field_name = event.currentTarget.dataset.field_name;
+ const file_multiple = event.currentTarget.dataset.file_multiple;//是否为多张图
+ console.log("scene: ", scene);
+ console.log("field_name: ", field_name);
+ console.log("file_multiple: ", file_multiple);
+ let _this = this;
+ api.getOssSign({user_type:2,scene:scene}).then(response => {
+ console.log(response);
+ const { file } = event.detail;
+ console.log("file: ", file);
+ const filename = FileUtil.getFileName(file);
+ const host = response.data.host;
+ const signature = response.data.signature;
+ const ossAccessKeyId = response.data.accessid;
+ const policy = response.data.policy;
+ const key = response.data.dir+filename;
+ const filePath = file.url; // 待上传文件的文件路径。
+ wx.uploadFile({
+ url: host, // 开发者服务器的URL。
+ filePath: filePath,
+ name: 'file', // 必须填file。
+ formData: {
+ key,
+ policy,
+ OSSAccessKeyId: ossAccessKeyId,
+ signature,
+ },
+ success: (res) => {
+ console.log("upload: ", res);
+ if (res.statusCode === 204) {
+ if(scene == 1){
+ this.setData({
+ is_avatar: true
+ })
+ }
+ wx.showToast({title: '上传成功'})
+ if(file_multiple == "true"){//多张图
+ let img = {}
+ img.url = host+"/"+key;
+ img.isImg = true;
+
+ let img_list = _this.data[field_name];
+ console.log("img_list: ", img_list);
+ img_list.push(img);
+ console.log("img_list: ", img_list);
+
+ this.setData({
+ [field_name]: img_list
+ });
+ }else{
+ this.setData({[field_name]: host+"/"+key});
+ }
+ }
+ },
+ fail: err => {
+ console.log(err);
+ }
+ });
+ }).catch(errors => {
+ console.error(errors);
+ })
+ },
+ doDeleteFile(event){
+ console.log(event);
+ let url = event.detail.file.url;
+ let file_name = event.currentTarget.dataset.field_name;
+ let img_list = this.data[file_name].filter(item => item.url != url);
+ this.setData({
+ [file_name]: img_list
+ })
+ },
}
})
diff --git a/commpents/myprofile/index.wxml b/commpents/myprofile/index.wxml
index 88252a7..f417f7f 100644
--- a/commpents/myprofile/index.wxml
+++ b/commpents/myprofile/index.wxml
@@ -1,4 +1,4 @@
-
+
头像 *
@@ -11,6 +11,13 @@
+
+
+
+ {{ avatar_reason }}
+
+
+
@@ -127,7 +134,7 @@
-
+
+
+
+ {{ department_custom_mobile_reason }}
+
+
+
专长 *
@@ -185,6 +200,7 @@
bind:showNote="onshowJianJieNote"
textarea_cell_content_placeholder="您的从业经历,职称,所获荣誉等信息(10~1000字)"
textarea_val="{{textarea_jianjie}}"
+ has_error_content="{{ be_good_at_reason }}"
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
@@ -208,6 +225,7 @@
bindDeleteFile="doDeleteFile"
upload_cell_desc="请提供清晰的职业证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、执业范围、最新执业医院,最少上传2张。"
upload_cell_note="查看示例"
+ has_error_content="{{ license_cert_reason }}"
wx:if="{{indentity}}"
/>
@@ -224,6 +242,7 @@
bind:showNote="onshowZiGeNote"
upload_cell_desc="请提供清晰的资格证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、职称等,最少上传1张。"
upload_cell_note="查看示例"
+ has_error_content="{{ qualification_cert_reason }}"
wx:if="{{indentity}}"
/>
@@ -240,6 +259,7 @@
bindDeleteFile="doDeleteFile"
upload_cell_desc="请提供清晰的职称证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名等,最少上传1张。"
upload_cell_note="查看示例"
+ has_error_content="{{ work_cert_reason }}"
wx:if="{{indentity}}"
/>
diff --git a/commpents/myprofile/index.wxss b/commpents/myprofile/index.wxss
index 1569fc4..ff80501 100644
--- a/commpents/myprofile/index.wxss
+++ b/commpents/myprofile/index.wxss
@@ -3,25 +3,15 @@
}
.photo{
position: relative;
- padding: 32rpx;
+ padding: 32rpx 32rpx 32rpx 0;
+ margin-left: 32rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: 400;
align-items: center;
}
-.photo::after {
- position: absolute;
- box-sizing: border-box;
- content: ' ';
- pointer-events: none;
- right: 0;
- left: 32rpx;
- bottom: 0;
- border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
- transform: scaleY(0.5);
- left: 32rpx;
-}
+
.title{
font-size: 30rpx;
color: #1C2023;
@@ -187,4 +177,39 @@
.zhuanchang_btn--confirm {
color: #3cc7c0;
+}
+.error_box{
+ position: relative;
+ display: flex;
+ background-color: #FEF1F1;
+ width: calc(95vw - 64rpx);
+ height: 100rpx;
+ margin: 30rpx auto 0 auto;
+ align-items: center;
+ padding-left: 32rpx;
+ border-radius: 10rpx;
+}
+.error_box::after{
+ border-radius: 5rpx;
+ position: absolute;
+ width: 0px;
+ height: 0px;
+ border-width: 16rpx;
+ border-style: solid;
+ border-color: transparent transparent #FEF1F1 transparent;
+ content: ' ';
+ left: 50rpx;
+ top: -30rpx;
+}
+.error_msg{
+ position: relative;
+ margin-left: 10rpx;
+ color: #FF0000;
+ letter-spacing: 3rpx;
+ font-weight: 600;
+}
+.has_error{
+ margin-left: 32rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #e7e7e7;
}
\ No newline at end of file
diff --git a/commpents/textarea-cell/index.js b/commpents/textarea-cell/index.js
index ec83398..0ab622b 100644
--- a/commpents/textarea-cell/index.js
+++ b/commpents/textarea-cell/index.js
@@ -31,7 +31,11 @@ Component({
textarea_val: {
type: String,
value: '',
- }
+ },
+ has_error_content: {
+ type: String,
+ value: "",
+ },
},
/**
diff --git a/commpents/textarea-cell/index.wxml b/commpents/textarea-cell/index.wxml
index 3dc485d..dbc67b3 100644
--- a/commpents/textarea-cell/index.wxml
+++ b/commpents/textarea-cell/index.wxml
@@ -9,4 +9,8 @@
+
+
+ {{ has_error_content }}
+
\ No newline at end of file
diff --git a/commpents/textarea-cell/index.wxss b/commpents/textarea-cell/index.wxss
index 701f799..2883557 100644
--- a/commpents/textarea-cell/index.wxss
+++ b/commpents/textarea-cell/index.wxss
@@ -43,4 +43,34 @@
}
.textarea-cell-name{
font-size: 30rpx;
+}
+.error_box{
+ position: relative;
+ display: flex;
+ background-color: #FEF1F1;
+ width: calc(95vw - 64rpx);
+ height: 100rpx;
+ margin: 30rpx auto 0 auto;
+ align-items: center;
+ padding-left: 32rpx;
+ border-radius: 10rpx;
+}
+.error_box::after{
+ border-radius: 5rpx;
+ position: absolute;
+ width: 0px;
+ height: 0px;
+ border-width: 16rpx;
+ border-style: solid;
+ border-color: transparent transparent #FEF1F1 transparent;
+ content: ' ';
+ left: 50rpx;
+ top: -30rpx;
+}
+.error_msg{
+ position: relative;
+ margin-left: 10rpx;
+ color: #FF0000;
+ letter-spacing: 3rpx;
+ font-weight: 600;
}
\ No newline at end of file
diff --git a/commpents/upload-cell/index.js b/commpents/upload-cell/index.js
index 72c9b16..afdf91e 100644
--- a/commpents/upload-cell/index.js
+++ b/commpents/upload-cell/index.js
@@ -28,9 +28,9 @@ Component({
type: String,
value: '32rpx',
},
- has_error: {
- type: Boolean,
- value: false,
+ has_error_content: {
+ type: String,
+ value: "",
},
fileList:{
type: Array,
diff --git a/commpents/upload-cell/index.wxml b/commpents/upload-cell/index.wxml
index 113b69f..a423d5c 100644
--- a/commpents/upload-cell/index.wxml
+++ b/commpents/upload-cell/index.wxml
@@ -14,8 +14,8 @@
-
+
- 拒绝原因照片不清晰
+ {{ has_error_content }}
\ No newline at end of file
diff --git a/commpents/wenzhen_data/index.js b/commpents/wenzhen_data/index.js
index 5e23a8e..2df19bd 100644
--- a/commpents/wenzhen_data/index.js
+++ b/commpents/wenzhen_data/index.js
@@ -4,6 +4,10 @@ Component({
* 组件的属性列表
*/
properties: {
+ from_account: {
+ type: String,
+ value: '10000',
+ },
name: {
type: String,
value: '张三三',
@@ -23,6 +27,11 @@ Component({
desc: {
type: String,
value: '这是示例备注desc',
+ observer(desc) {
+ this.setData({
+ desc: desc,
+ });
+ },
},
status_text: {
type: String,
@@ -35,10 +44,23 @@ Component({
status_class: {
type: String,
},
+ order_inquiry_id: {
+ type: String,
+ value: '',
+ },
note: {
type: String,
value: '不接诊24小时后自动取消',
},
+ message_dot:{
+ type: Boolean,
+ value: false,
+ observer(dot) {
+ this.setData({
+ message_dot: dot,
+ });
+ },
+ }
},
/**
@@ -54,20 +76,14 @@ Component({
methods: {
go(e){
wx.navigateTo({
- url: e.currentTarget.dataset.url,
- events: {
- // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
- acceptDataFromOpenedPage: function(data) {
- console.log(data)
- },
- someEvent: function(data) {
- console.log(data)
- }
- },
- success: function(res) {
- // 通过 eventChannel 向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
- }
+ url: e.currentTarget.dataset.url
+ })
+ },
+ goChat(e){
+ let from_account = e.currentTarget.dataset.from_account;
+ let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
+ wx.navigateTo({
+ url: e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id
})
},
tabShow(){
diff --git a/commpents/wenzhen_data/index.json b/commpents/wenzhen_data/index.json
index 4c7316e..107984d 100644
--- a/commpents/wenzhen_data/index.json
+++ b/commpents/wenzhen_data/index.json
@@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"van-button": "@vant/weapp/button/index",
- "van-popup": "@vant/weapp/popup/index"
+ "van-popup": "@vant/weapp/popup/index",
+ "t-badge": "tdesign-miniprogram/badge/badge"
}
}
\ No newline at end of file
diff --git a/commpents/wenzhen_data/index.wxml b/commpents/wenzhen_data/index.wxml
index 513d8cb..6347815 100644
--- a/commpents/wenzhen_data/index.wxml
+++ b/commpents/wenzhen_data/index.wxml
@@ -1,20 +1,24 @@
- 就诊人:{{name}} {{sex}}|{{age}}岁
+
+ 就诊人:
+ {{name}} {{sex}}|{{age}}
+
{{date}}
{{desc}}
- {{status_text}}
-
- 查看病历
- 去接诊
+ {{ status_text }}
+
+ 查看病历
+ 去接诊
-
- 问诊详情
+
+ 问诊详情
+
- {{note}}
+ {{note}}
@@ -22,8 +26,8 @@
温馨提示
为保障服务质量,请您查看患者病历信息在选择是否接诊。
- 去查看
- 去接诊
+ 去查看
+ 去接诊
\ No newline at end of file
diff --git a/commpents/wenzhen_data/index.wxss b/commpents/wenzhen_data/index.wxss
index 72f6b37..1fad6c2 100644
--- a/commpents/wenzhen_data/index.wxss
+++ b/commpents/wenzhen_data/index.wxss
@@ -2,7 +2,7 @@
background-color: #fff;
display: flex;
flex-direction: column;
- margin-bottom: 20rpx;
+ margin-top: 20rpx;
}
.content_1,.content_3,.content_2{
display: flex;
@@ -39,8 +39,7 @@
.btn{
flex: 2;
display: flex;
- justify-content: space-around;
-
+ justify-content: flex-end;
}
.content_4{
flex: 5;
diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js
index 3ad8a0b..720aaa5 100644
--- a/custom-tab-bar/index.js
+++ b/custom-tab-bar/index.js
@@ -1,4 +1,5 @@
// custom-tab-bar/index.js
+const app = getApp()
Component({
/**
@@ -10,55 +11,77 @@ Component({
"backgroundColor": "#ffffff",
"selectedColor": "#fff",
"listAll": {
- "list2":[
+ "list1":[
{
"pagePath": "/Pages/yaoshi/home/home",
"text": "首页",
"iconPath": "/static/images/yaoshi/tabbar_icon/home.png",
- "selectedIconPath": "/static/images/yaoshi/tabbar_icon/home_select.png"
+ "selectedIconPath": "/static/images/yaoshi/tabbar_icon/home_select.png",
+ "info": ""
},
{
"pagePath": "/Pages/yaoshi/my/my",
"text": "我的",
"iconPath": "/static/images/yaoshi/tabbar_icon/my.png",
- "selectedIconPath": "/static/images/yaoshi/tabbar_icon/my_select.png"
+ "selectedIconPath": "/static/images/yaoshi/tabbar_icon/my_select.png",
+ "info": ""
}],
- "list1":[
+ "list2":[
{
"pagePath": "/Pages/yishi/index/index",
"text": "首页(Y)",
"iconPath": "/static/images/yishi/tabbar_icon/index.png",
- "selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
+ "selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png",
+ "info": ""
},
{
- "pagePath": "/Pages/yishi/wenzhen/wenzhen",
- "text": "问诊(Y)",
+ "pagePath": "/Pages/yishi/wenzhen_v2/wenzhen",
+ "text": "问诊(Z)",
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
- "selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png"
+ "selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png",
+ "info": "99"
},
{
"pagePath": "/Pages/yishi/my/index",
"text": "我的(Y)",
"iconPath": "/static/images/yishi/tabbar_icon/my.png",
- "selectedIconPath": "/static/images/yishi/tabbar_icon/my_select.png"
+ "selectedIconPath": "/static/images/yishi/tabbar_icon/my_select.png",
+ "info": ""
}]
},
items: [ ],
dialog_visible: false,
- dialog_content: ""
+ dialog_content: "",
+ usertype: "",
+ index_info: "",
+ wenzhen_info: "",
+ my_info: "",
},
attached() {
const usertype = wx.getStorageSync('usertype')
console.log("usertype: " ,usertype);
if (usertype == 2) {
this.setData({
- items: this.data.listAll.list1
+ usertype: usertype,
+ items: this.data.listAll.list2
})
}else{
this.setData({
- items: this.data.listAll.list2
+ usertype: usertype,
+ items: this.data.listAll.list1
})
}
+ let _this = this;
+ setInterval(() => {
+ let index_info = wx.getStorageSync('index_info');
+ let wenzhen_info = wx.getStorageSync('wenzhen_info');
+ let my_info = wx.getStorageSync('my_info');
+ _this.setData({
+ index_info: index_info,
+ wenzhen_info: wenzhen_info,
+ my_info: my_info,
+ })
+ }, 500);
},
methods: {
// swichNav: function (e) {
@@ -83,7 +106,8 @@ Component({
// })
console.log("custom tab bar onChange");
// return;
- let url = this.data.items[e.detail].pagePath
+ let url = this.data.items[e.detail].pagePath;
+ console.log(url);
wx.switchTab({
url: url,
})
diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml
index 6fee57f..3576289 100644
--- a/custom-tab-bar/index.wxml
+++ b/custom-tab-bar/index.wxml
@@ -1,26 +1,97 @@
-
-
-
+
+
+
+
- {{item.text}}
+ {{listAll.list2[0].text}}
+
+
+
+
+
+ {{listAll.list2[1].text}}
+
+
+
+
+
+ {{listAll.list2[2].text}}
+
+
+
+
+
+
+
+ {{listAll.list1[0].text}}
+
+
+
+
+ {{listAll.list1[1].text}}
{
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
+const formatChatTime = date => {
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ const hour = date.getHours()
+ const minute = date.getMinutes()
+ const second = date.getSeconds()
+
+ return `${[year, month, day].map(formatNumber).join('-')} ${[hour, minute].map(formatNumber).join(':')}`
+}
+
const getDateArr = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
@@ -25,8 +36,37 @@ const formatNumber = n => {
return n[1] ? n : `0${n}`
}
+const getTimeAgo = stringTime =>{
+ var minute = 1000 * 60;
+ var hour = minute *60;
+ var day = hour *24;
+ var week = day * 7;
+ var month = day * 30;
+ var time1 = new Date().getTime();//当前的时间戳
+ var time2 = stringTime*1000;//指定时间的时间戳
+ var time = time1 - time2;
+ var result = null;
+ if(time < 0){
+ return '刚刚';
+ }else if(time/month >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/week >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/day >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/hour >= 1){
+ result = parseInt(time/hour) + "小时前";
+ }else if(time/minute >= 1){
+ result = parseInt(time/minute) + "分钟前";
+ }else {
+ result = "刚刚";
+ }
+ return result;
+}
+
module.exports = {
formatTime,
getDateArr,
formatNumber,
+ getTimeAgo,
}