Commit e67a3ba6 by liuquan

合并分支 'liuquan' 到 'XDJK-master'

Liuquan

查看合并请求 !5
parents b8623474 285a4fa8
......@@ -13,7 +13,8 @@
"pages/dati03/dati03",
"pages/dati04/dati04",
"pages/info/info",
"pages/info1/info1"
"pages/info1/info1",
"pages/dati05/dati05"
],
"subpackages": [
{
......@@ -39,7 +40,8 @@
"logistics/logistics",
"patientList/patientList",
"chattingRecords/chattingRecords",
"beBeingService/beBeingService"
"beBeingService/beBeingService",
"productOrderInfo/productOrderInfo"
]
},
{
......
......@@ -50,6 +50,7 @@ Component({
if (e.detail.userInfo) {
wx.showLoading({
title: '正在登录',
mask:true,
})
app.getUserInfo(function (cb) {
if (!Util.isEmpty(cb)) {
......
......@@ -179,7 +179,9 @@ Page({
},
//知情同意书
zqtys: function (e) {
wx.showLoading();
wx.showLoading({
mask:true,
});
wx.navigateTo({
url: '/packageA/consent/consent'
})
......@@ -195,7 +197,7 @@ Page({
},
//更换用户
changeUser: function () {
wx.showLoading();
wx.showLoading({mask:true,});
if (this.data.ServicePay_datas.counsel == 20) {
wx.navigateTo({
url: '/packageA/selectUser/selectUser?type=1'
......
......@@ -26,7 +26,7 @@ Page({
nav: true, //控制头部医师显示
scrollHeight: "100%", //聊天内容显示
adjust: true,
keyHeight: 0,//输入框高度
keyHeight: 0, //输入框高度
scrollTop: 0,
reportShow: true, //发送报告内容框
iPhoneX: false,
......@@ -50,7 +50,7 @@ Page({
msgContent: '', //默认消息文字
isRecord: false, //录音显示
isRecording: false, //是否正在录音
isTouch:false, //防止录音单次点击出现bug
isTouch: false, //防止录音单次点击出现bug
canSend: true,
title: "正在录音",
audioSave: '', //当前播放音频路径
......@@ -218,7 +218,7 @@ Page({
wx.setStorageSync('user', res)
return Service.getUserData(res.openid)
}).then((res) => {
console.log("res",res)
console.log("res", res)
let timers = setInterval(() => {
console.log("App.globalData.isLogin", App.globalData.isLogin);
if (App.globalData.isLogin) {
......@@ -226,8 +226,8 @@ Page({
that.getMessageList(that.data.groupID); //打开某个会话时,第一次拉取消息列表和获取群信息
}
}, 500)
wx.setStorageSync('data', res)
that.setMessageRead();
wx.setStorageSync('data', res)
that.setMessageRead();
}).catch(error => {
console.error("我的服务登录", error)
})
......@@ -797,15 +797,15 @@ Page({
/**
* 医生更多服务
*/
moreService:Util.debouce(function() {
moreService: Util.debouce(function () {
var that = this;
if(!that.data.t_unionid||!that.data.doctorunitid||!that.data.t_openid){
if (!that.data.t_unionid || !that.data.doctorunitid || !that.data.t_openid) {
return;
}
wx.navigateTo({
url: '/pages/docuterInfo/docuterInfo?t_unionid=' + that.data.t_unionid + '&t_unitid=' + that.data.doctorunitid + '&t_openid=' + that.data.t_openid,
})
},1000,true),
}, 1000, true),
//input获取焦点
inputFoucus: function (e) {
var that = this;
......@@ -875,14 +875,14 @@ Page({
/**
* 聊天记录
*/
chatLog:Util.debouce(function () {
wx.showLoading();
chatLog: Util.debouce(function () {
wx.showLoading({mask:true,});
wx.navigateTo({
url: '/packageA/chattingRecords/chattingRecords?id=' + this.data.orderId + '&doctorimage=' + this.data.doctorimage,
})
wx.setStorageSync('list', this.data.messageList);
wx.hideLoading();
},1000,true),
}, 1000, true),
scroll: function () {},
// ______ __ __ ______ __ __
// | \| \ / \ | \ | \ | \
......@@ -944,10 +944,10 @@ Page({
let msgList = Util.deepClone(imResponse.data.messageList);
let messageList = that.messageListParser(msgList);
let length = Number(messageList.length - 1);
console.log("length",length)
console.log("length", length)
if (length >= 0) {
that.data.lastShowTimeStamp = messageList[length].time;
console.log("messageList[length].payload.data",messageList[length].payload.data)
console.log("messageList[length].payload.data", messageList[length].payload.data)
if (messageList[length].payload.data == "InitiateEndService") {
wx.showModal({
title: '提示',
......@@ -1082,6 +1082,7 @@ Page({
*
* *********JSON解析两次的**********
* Prescription 处方药方
* RecommendedProducts 推荐产品
* UserDrug 医生推荐
* Checkup 心理体检
* report 量表报告
......@@ -1091,10 +1092,10 @@ Page({
if (item.type == "TIMCustomElem") {
item.payload.data = JSON.parse(item.payload.data)
let type = item.payload.data.type;
if (type == 'InitiateEndService' || type == 'NeverEndService' || type == 'EndOfService' || type == 'reminder'||type=='reminder2' || type == 'followUp' || type == 'UserInfo' || type == 'LaunchVideo' || type == 'closeVideo' || type == 'hangUpVideo' || type == 'groupTips') {
if (type == 'InitiateEndService' || type == 'NeverEndService' || type == 'EndOfService' || type == 'reminder' || type == 'reminder2' || type == 'followUp' || type == 'UserInfo' || type == 'LaunchVideo' || type == 'closeVideo' || type == 'hangUpVideo' || type == 'groupTips') {
item.payload.description = item.payload.data.content;
item.payload.data = item.payload.data.type;
} else if (type == 'Prescription' || type == 'UserDrug' || type == 'Checkup' || type == 'report') {
} else if (type == 'Prescription' || type == 'UserDrug' || type == 'Checkup' || type == 'report'||type=='RecommendedProducts') {
item.payload.description = JSON.parse(item.payload.data.content);
item.payload.data = item.payload.data.type;
}
......@@ -1220,7 +1221,7 @@ Page({
to: that.data.groupID,
conversationType: TIM.TYPES.CONV_GROUP,
payload: {
file: res
file: res//文件对象
},
//临时图片路径
path: res.tempFilePaths[0],
......@@ -1248,7 +1249,7 @@ Page({
handleLongPress(e) {
var that = this;
//当前是按下状态
that.data.isTouch=true;
that.data.isTouch = true;
console.log("手指按下")
that.data.startPoint = e.touches[0];
if (!this.data.payFlag) {
......@@ -1286,7 +1287,7 @@ Page({
handleTouchEnd() {
console.log("手指离开")
//当前是手指离开状态
this.data.isTouch=false;
this.data.isTouch = false;
wx.hideLoading()
recorderManager.stop()
this.setData({
......@@ -1321,14 +1322,14 @@ Page({
} else if (auth === true) { // 用户已经同意授权
// console.log('this.data.isTouch',this.data.isTouch)
//判断当前按压状态,是按下就执行录音
if(this.data.isTouch){
if (this.data.isTouch) {
that.setData({
canSend: true,
isRecording: true,
title: "正在录音"
})
recorderManager.start(recordOptions)
}else{
} else {
//否则提示"说话时间短"
that.setData({
errorToptips: '说话时间太短'
......@@ -1422,7 +1423,7 @@ Page({
let that = this
let id = e.currentTarget.dataset.id; //量表id
let res_id = e.currentTarget.dataset.id; //量表id
let lbname = e.currentTarget.dataset.lbname; //量表id
let lbname = e.currentTarget.dataset.lbname; //量表名称
let time = e.currentTarget.dataset.time; //量表时间
let is_type = e.currentTarget.dataset.istype; //量表是否允许查看
wx.showModal({
......@@ -1445,11 +1446,11 @@ Page({
data: JSON.stringify({
type: 'report',
content: JSON.stringify({
id,
res_id,
lbname,
time,
is_type
id, //量表id
res_id, //量表id
lbname, //量表名称
time, //量表时间
is_type //量表是否允许查看
})
}),
description: "",
......@@ -1482,7 +1483,7 @@ Page({
* 查看报告
*/
lookReport: Util.debouce(function (e) {
wx.showLoading();
wx.showLoading({mask:true});
let that = this;
let src = e.currentTarget.dataset.src;
let is_type = e.currentTarget.dataset.istype;
......@@ -1509,25 +1510,54 @@ Page({
}, 1000, true),
/**心理体检 */
getCheckup: Util.debouce(function (e) {
wx.showLoading();
wx.showLoading({mask:true});
let that = this;
let data = {}
let code=1;
data.inquiry_id = e.currentTarget.dataset.id;
Service.getTestInfo(data).then((res) => {
console.log("getCheckup", res)
if (res.code == 1) {
var data = {
t_openid: res.data.openid,
g_time: res.data.time,
marketstatus: res.data.marketstatus,
unitid: res.data.unitid,
let status= e.currentTarget.dataset.status?e.currentTarget.dataset.status:1;
Service.getIsAnswer({inquiryid:data.inquiry_id,groupID: that.data.groupID}).then((res)=>{
if(res.code==0){
code=res.code;
that.setData({
errorToptips: res.msg
})
}else{
/**
* @todo 修改im发生量表收费
*/
let url;
let roomService={
t_unionid: that.data.t_unionid,
groupID: that.data.groupID,
orderId:that.data.orderId
}
wx.setStorageSync('roomService', roomService);
if (status == 0) {
url=`/pages/info/info?inquiry=2&inquiry_id=${e.currentTarget.dataset.id}`;
wx.reLaunch({
url: url,
})
} else {
url= `/pages/info/info?otype=1&inquiry=2&inquiry_id=${e.currentTarget.dataset.id}`;
Service.getTestInfo(data).then((res) => {
if (res.code == 1) {
var data = {
t_openid: res.data.openid,
g_time: res.data.time,
marketstatus: res.data.marketstatus,
unitid: res.data.unitid,
}
wx.setStorageSync('weiLb', data);
console.log("info", data)
}
wx.setStorageSync('weiLb', data);
console.log("info", data)
})
wx.navigateTo({
url: url,
})
}
}
})
wx.navigateTo({
url: '/pages/info/info?otype=1&inquiry=2&inquiry_id=' + e.currentTarget.dataset.id,
})
wx.hideLoading();
}, 1000, true),
//微信获取手机号
......@@ -1585,15 +1615,15 @@ Page({
* type 0 处方 1 用药建议
* @param {} e
*/
viewRecipe: Util.debouce(function(e) {
wx.showLoading();
viewRecipe: Util.debouce(function (e) {
wx.showLoading({mask:true});
let item = e.currentTarget.dataset.item;
console.log("item", item)
wx.navigateTo({
url: '/packageA/recipeDetails/recipeDetails?id=' + item.payid + '&type=' + item.type,
})
wx.hideLoading();
},1000,true),
}, 1000, true),
/**
* 购买药品 buyDrug()
* isQuick 开药方式0-正常开药,1-二维码,2-快速开药
......@@ -1606,8 +1636,8 @@ Page({
* type 0-处方药,1-保健品
* payid 支付ID
*/
buyDrug:Util.debouce(function(e) {
wx.showLoading();
buyDrug: Util.debouce(function (e) {
wx.showLoading({mask:true});
let that = this;
let item = e.currentTarget.dataset.item;
// isQuick 开药方式 0-正常开药,1-二维码,2-快速开药
......@@ -1628,14 +1658,14 @@ Page({
url: '/packageA/drugOrderInfo/drugOrderInfo?scene=' + id + '&isQuick=' + item.isQuick + '&orderId=' + this.data.orderId + '&groupID=' + that.data.groupID,
})
wx.hideLoading();
}else{
} else {
wx.hideLoading();
that.setData({
errorToptips: res.msg
})
}
})
},1000,true),
}, 1000, true),
//客服电话
dial(e) {
let tel = e.currentTarget.dataset.tel;
......@@ -1643,7 +1673,7 @@ Page({
phoneNumber: tel,
})
},
/**
/**
* 图片加载失败函数
* type 0 医生头像 1 患者头像
* @param {any} e
......@@ -1655,12 +1685,12 @@ Page({
let img;
if (type == 0) {
up = "doctorimage";
img="/images/doctor_img.png";
} else if(type == 1) {
img = "/images/doctor_img.png";
} else if (type == 1) {
up = "avatarUrl";
img="/images/head-img.png";
img = "/images/head-img.png";
}
console.log('img',img)
console.log('img', img)
this.setData({
[up]: img
})
......
......@@ -36,7 +36,10 @@
</button>
</view>
</view>
<scroll-view scroll-y style='height:{{scrollHeight}};overflow-anchor:auto;' scroll-top='{{scrollTop}}' scroll-with-animation enhanced fast-deceleration scroll-anchoring='true' refresher-enabled="{{true}}" refresher-threshold="{{25}}" refresher-default-style="none" refresher-background="white" refresher-triggered="{{scrollloading}}" bindrefresherpulling="scrollPullDownRefresh" scroll-into-view="{{toView}}">
<scroll-view scroll-y style='height:{{scrollHeight}};overflow-anchor:auto;' scroll-top='{{scrollTop}}'
scroll-with-animation enhanced fast-deceleration scroll-anchoring='true' refresher-enabled="{{true}}"
refresher-threshold="{{25}}" refresher-default-style="none" refresher-background="white"
refresher-triggered="{{scrollloading}}" bindrefresherpulling="scrollPullDownRefresh" scroll-into-view="{{toView}}">
<!-- 下拉加载 -->
<view slot="refresher" class="scrollloading"><i class="weui-loading"></i></view>
<view class='warp-info'>
......@@ -107,7 +110,8 @@
<!-- 白方消息 -->
<view class='left' wx:if="{{item.flow=='in'}}" id='d{{index}}'>
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0"></image>
<view class='msg' style='width:{{80+item.payload.second*6}}rpx;text-align: right;' bindtap='openAudio' data-payload='{{item.payload}}'>
<view class='msg' style='width:{{80+item.payload.second*6}}rpx;text-align: right;' bindtap='openAudio'
data-payload='{{item.payload}}'>
<image class="ico" wx:if="{{item.payload.uuid==audioSave}}" src="/images/yuyin-gif.gif"></image>
<image class="ico" wx:else src="/images/yuyin-ico.png"></image>
{{item.payload.second}}"
......@@ -116,7 +120,8 @@
<!-- 蓝方消息 -->
<view class='right' wx:if="{{item.flow=='out'}}" id='d{{index}}'>
<image class='head' src='{{avatarUrl || noSrc}}' binderror="binderrorimg" data-type="1"></image>
<view class='msg' style='width:{{80+item.payload.second*6}}rpx;' bindtap='openAudio' data-payload='{{item.payload}}'>
<view class='msg' style='width:{{80+item.payload.second*6}}rpx;' bindtap='openAudio'
data-payload='{{item.payload}}'>
<image class="ico" wx:if="{{item.payload.uuid==audioSave}}" src="/images/yuyin-gif1.gif"></image>
<image class="ico" wx:else src="/images/yuyin-ico1.png"></image>
{{item.payload.second}}"
......@@ -130,7 +135,8 @@
<view class="systemReport-title">检测报告</view>
<view class="systemReport-text">{{doctorname}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-view">
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.res_id}}" data-istype='{{item.payload.description.is_type}}'>查看报告</view>
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.res_id}}"
data-istype='{{item.payload.description.is_type}}'>查看报告</view>
</view>
</view>
<!-- 蓝方消息 -->
......@@ -138,7 +144,8 @@
<view class="systemReport-title">检测报告</view>
<view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-view">
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.res_id}}" data-istype='{{item.payload.description.is_type}}'>查看报告</view>
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.res_id}}"
data-istype='{{item.payload.description.is_type}}'>查看报告</view>
</view>
</view>
</block>
......@@ -149,7 +156,8 @@
<view class="reserve-time">预约时间 <text class="reserve-text">{{item.payload.description}}</text></view>
<view class="reserve-server">预约服务 <text class="reserve-text">在线复诊/咨询</text></view>
<view class="btn-view">
<button class='msg_btn1' style="margin:0;line-height: 48rpx;" open-type='getPhoneNumber' bindgetphonenumber='goSetTel'>添加到提醒</button>
<button class='msg_btn1' style="margin:0;line-height: 48rpx;" open-type='getPhoneNumber'
bindgetphonenumber='goSetTel'>添加到提醒</button>
</view>
</view>
</block>
......@@ -157,14 +165,16 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Checkup"}}'>
<view class='Report'>
<view class="Report-doctor">
<image class='head' src='{{avatarUrl || noSrc}}' binderror="binderrorimg" data-type="1"></image>
<image class='head' src='{{doctorimage || noSrc}}' binderror="binderrorimg" data-type="1"></image>
<view class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.nickname}}</text><text
class="doctor-title">{{doctortitle}}</text></view>
<view class="doctor-unit">{{item.payload.description.work_unit}}</view>
</view>
</view>
<view class="Report-text">我已为您开具量表,请点击下方按钮或在我的-我的报告,开始检测</view>
<view wx:if="{{item.payload.description.status==0}}" class="Report-text">
该检测可以帮助医生更全面的了解您的情况,需要另行收费。您可以根据自身情况自由选择是否使用该项检测。</view>
<view wx:else class="Report-text">我已为您开具量表,请点击下方按钮或在我的-我的报告,开始检测</view>
<view class="scale">
<view class="scale-title">量表名称:</view>
<view>
......@@ -174,7 +184,7 @@
</view>
</view>
<view class="btn-view">
<view class="msg_btn1" bindtap='getCheckup' data-id="{{item.payload.description.id}}">开始检测</view>
<view class="msg_btn1" bindtap='getCheckup' data-id="{{item.payload.description.id}}" data-status="{{item.payload.description.status}}">开始检测</view>
</view>
</view>
</block>
......@@ -182,7 +192,7 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="UserDrug"}}'>
<view class='recipe'>
<view class="recipe-doctor">
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0" ></image>
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0"></image>
<view class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.name}}</text><text
class="doctor-title">{{doctortitle}}</text></view>
......@@ -210,7 +220,7 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Prescription"}}'>
<view class='recipe'>
<view class="recipe-doctor">
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0" ></image>
<image class='head' src='{{doctorimage|| noSrc}}' binderror="binderrorimg" data-type="0"></image>
<view class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.name}}</text><text
class="doctor-title">{{doctortitle}}</text></view>
......@@ -236,21 +246,23 @@
<!-- 视频消息 -->
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="LaunchVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'>
<image class='head' src="{{doctorimage || noSrc}}" binderror="binderrorimg" data-type="0" ></image>
<image class='head' src="{{doctorimage || noSrc}}" binderror="binderrorimg" data-type="0"></image>
<view class='msg' data-c="{{item.payload.text}}">视频通话请求</view>
</view>
<!-- <view class="LaunchVideo">视频通话请求</view> -->
</block>
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="closeVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'>
<image class='head' src="{{item.flow=='in'?doctorimage:avatarUrl|| noSrc}}" binderror="binderrorimg" data-type="{{item.flow=='in'?'0':'1'}}"></image>
<image class='head' src="{{item.flow=='in'?doctorimage:avatarUrl|| noSrc}}" binderror="binderrorimg"
data-type="{{item.flow=='in'?'0':'1'}}"></image>
<view class='msg' data-c="{{item.payload.text}}">已挂断</view>
</view>
<!-- <view class="LaunchVideo">已挂断</view> -->
</block>
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="hangUpVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'>
<image class='head' src="{{item.flow=='in'?doctorimage:avatarUrl|| noSrc}}" binderror="binderrorimg" data-type="{{item.flow=='in'?'0':'1'}}"></image>
<image class='head' src="{{item.flow=='in'?doctorimage:avatarUrl|| noSrc}}" binderror="binderrorimg"
data-type="{{item.flow=='in'?'0':'1'}}"></image>
<view class='msg' data-c="{{item.payload.text}}">已拒接</view>
</view>
<!-- <view class="LaunchVideo">已挂断</view> -->
......@@ -260,8 +272,10 @@
<view class='userInfo'>
<view class="userInfo-title">患者信息</view>
<view class="basicInfo">基本信息<text class="userInfo-text">{{item.payload.description.name}}</text></view>
<view class="userInfo-GSGN">肝肾功能<text class="userInfo-text">{{item.payload.description.disease}}</text></view>
<view class="userInfo-BYQK">备孕情况<text class="userInfo-text">{{item.payload.description.beiyun}}</text></view>
<view class="userInfo-GSGN">肝肾功能<text class="userInfo-text">{{item.payload.description.disease}}</text>
</view>
<view class="userInfo-BYQK">备孕情况<text class="userInfo-text">{{item.payload.description.beiyun}}</text>
</view>
<view class="userInfo-GWBS">
<view>过往病史</view>
<view class="gwbs-text">{{item.payload.description.past_desc}}</view>
......@@ -281,7 +295,7 @@
<block wx:if='{{item.type == "TIMTextElem"}}'>
<!-- 蓝方消息 -->
<view class='right' id='d{{index}}'>
<image class='head' src='{{avatarUrl || noSrc}}' binderror="binderrorimg" data-type="1"></image>
<image class='head' src='{{avatarUrl || noSrc}}' binderror="binderrorimg" data-type="1"></image>
<view class='msg' data-c="{{item.payload.text}}" bind:longpress='cope'>{{item.payload.text}}</view>
<view class="unsentloading"><i class="weui-loading"></i></view>
</view>
......@@ -313,7 +327,8 @@
<view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-view">
<view><i class="weui-loading"></i></view>
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.id}}" data-istype='{{item.payload.description.is_type}}'>查看报告</view>
<view class="msg_btn1" bindtap='lookReport' id='d{{index}}' data-src="{{item.payload.description.id}}"
data-istype='{{item.payload.description.is_type}}'>查看报告</view>
</view>
</view>
</block>
......@@ -360,13 +375,16 @@
<image class='send-btn-img' src='{{isRecord?"/images/record.png":"/images/audio.png"}}'></image>
</view>
<block wx:if="{{isRecord}}">
<view class="record" catchtouchstart="handleLongPress" catchtouchmove="handleTouchMove" catchtouchend="handleTouchEnd">
<view class="record" catchtouchstart="handleLongPress" catchtouchmove="handleTouchMove"
catchtouchend="handleTouchEnd">
<block wx:if="{{!isRecording}}">按住 说话</block>
<block wx:if="{{isRecording}}">抬起 停止</block>
</view>
</block>
<block wx:else>
<input value='{{msgContent}}' placeholder="{{isSendText}}" placeholder-class="send-inp1" bindinput='inputMessage' class='send-inp' cursor-spacing="20" confirm-hold='{{true}}' confirm-type='send' bindconfirm='bindconfirm' adjust-position='{{false}}' bindfocus="inputFoucus" bindblur="inputBlur" type='text' maxlength="-1"></input>
<input value='{{msgContent}}' placeholder="{{isSendText}}" placeholder-class="send-inp1" bindinput='inputMessage'
class='send-inp' cursor-spacing="20" confirm-hold='{{true}}' confirm-type='send' bindconfirm='bindconfirm'
adjust-position='{{false}}' bindfocus="inputFoucus" bindblur="inputBlur" type='text' maxlength="-1"></input>
<button class='send-btn' bindtap="createTextMessage">发送</button>
</block>
</view>
......@@ -409,7 +427,8 @@
<view class="{{estimateIssue.issue4?'issue-active':''}}" bindtap="issue" data-issue="4">服务价格太高</view>
</view>
</view>
<textarea fixed='true' class="estimate-textarea" cursor-spacing='{{cursor}}' maxlength="200" wx:if="{{graded>0}}" bindlinechange='textareaChange' placeholder="补充评价,帮助医生改善服务" placeholder-style="color:#b7b7b7">
<textarea fixed='true' class="estimate-textarea" cursor-spacing='{{cursor}}' maxlength="200" wx:if="{{graded>0}}"
bindlinechange='textareaChange' placeholder="补充评价,帮助医生改善服务" placeholder-style="color:#b7b7b7">
</textarea>
<button class="estimate-btn" wx:if="{{graded>0}}">匿名提交</button>
</view>
......@@ -417,12 +436,14 @@
<view class="cu-modal bottom-modal {{reportShow?'':'show'}} warp-up" bindtap="openReport">
<!-- style='height:{{winH - 100}}px;bottom:-{{winH}}px;' -->
<!-- <view class='cu-dialog' catchtap style='margin-bottom:{{iPhoneX?267:217}}rpx;width:710rpx!important;border-radius:20rpx 20rpx 0rpx 0rpx !important;'> -->
<view class='cu-dialog' catchtap style='margin-bottom:{{0}}rpx;width:710rpx!important;border-radius:20rpx 20rpx 0rpx 0rpx !important;'>
<view class='cu-dialog' catchtap
style='margin-bottom:{{0}}rpx;width:710rpx!important;border-radius:20rpx 20rpx 0rpx 0rpx !important;'>
<view class='list-title'>发送报告</view>
<text class="cuIcon-close close" catchtap="openReport"></text>
<view class="animate" style='height:{{winH - 168}}px;'>
<block wx:for="{{result}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class='item-up' bindtap='createReportMessage' data-id="{{item.res_id}}" data-lbname="{{item.measure_name}}" data-time='{{item.createtime}}' data-istype='{{item.is_type}}'>
<view class='item-up' bindtap='createReportMessage' data-id="{{item.res_id}}"
data-lbname="{{item.measure_name}}" data-time='{{item.createtime}}' data-istype='{{item.is_type}}'>
<view class='pho'>
<image src="{{item.headimgurl?item.headimgurl:noSrc}}"></image>
</view>
......
const Service = require('../../utils/service.js');
const {
debouce
} = require('../../utils/util.js'); //防抖函数
const { debouce } = require('../../utils/util.js'); //防抖函数
const Util = require('../../utils/util.js');
Page({
......@@ -93,7 +91,7 @@ Page({
var that = this
var data = {
page: page,
// unionid:'oHhp80XTpjf-JKvU94VEztv3aLhc',
// unionid:'oHhp80QCN2WjClijvSyhkEFQcUwY',
unionid: wx.getStorageSync('data').unionid,
status: status
};
......@@ -188,7 +186,7 @@ Page({
wx.navigateTo({
url: '/packageA/addsite/addsite?item=' + JSON.stringify(e.currentTarget.dataset.address) + '&ordernumber=' + e.currentTarget.dataset.ordernumber + '&type=1',
})
}else{
} else {
wx.showToast({
title: res.msg,
icon: 'success',
......
......@@ -17,12 +17,13 @@
<block>
<view class="num flex">
<text>订单编号:{{item.ordernumber}}</text>
<!-- <text wx-if="{{item.status==1}}">已退款</text> -->
<text wx-if="{{item.status==1}}">待付款</text>
<text wx-if="{{item.status==2}}">待发货</text>
<text wx-if="{{item.status==3}}">待收货</text>
<text wx-if="{{item.status==4}}">已完成</text>
<text wx-if="{{item.status==5}}">订单过期</text>
<text wx-if="{{item.status==7}}">订单作废</text>
<text wx-if="{{item.status==2}}">待发货</text>
<text wx-if="{{item.status==3}}">待收货</text>
<text wx-if="{{item.status==4}}">已完成</text>
<text wx-if="{{item.status==5}}">订单过期</text>
<text wx-if="{{item.status==7}}">订单作废</text>
</view>
<block wx:for="{{item.prescription}}" wx:key="index" wx:for-item="itemName">
<view class="list ">
......@@ -50,14 +51,27 @@
<text>(含运费¥{{item.freight}})</text>
</view>
<view class="dele flex">
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}" wx:if="{{item.status==1 || item.status==4 || item.status==5||item.status==7}}">删除订单</view>
<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}"
wx:if="{{item.status==1 || item.status==4 || item.status==5||item.status==7}}">删除订单</view>
<view class="btns flex">
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}" data-address="{{item.address}}">修改地址</view>
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="goLogistics" data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}" data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流</view>
<view class="ckwl" wx:if="{{item.status==3 || item.status==4}}" bindtap="goLogistics" data-status="{{item.status}}" data-img="{{item.prescription[0].picture}}" data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流</view>
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货</view>
<view class="ljzf" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goOrderDetail" data-id="{{item.id}}">订单详情</view>
<view class="ljzf" wx:if="{{item.status==1}}" bindtap="goPay" data-id="{{item.yfid}}" data-isquick="{{item.modular}}">立即支付</view>
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}"
data-address="{{item.address}}">修改地址</view>
<view class="ckwl" wx:if="{{item.status==2}}" bindtap="goLogistics"
data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ckwl" wx:if="{{item.status==3 || item.status==4}}" bindtap="goLogistics"
data-status="{{item.status}}" data-img="{{item.prescription[0].picture}}"
data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">
查看物流</view>
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货
</view>
<view class="ljzf" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goOrderDetail"
data-id="{{item.id}}">订单详情</view>
<view class="ljzf" wx:if="{{item.status==1}}" bindtap="goPay" data-id="{{item.yfid}}"
data-isquick="{{item.modular}}">立即支付</view>
<view class="ljzf1" wx:if="{{item.status==5}}">订单过期</view>
<view class="ljzf1" wx:if="{{item.status==7}}">订单作废</view>
</view>
......
......@@ -119,7 +119,7 @@
<view class="issue-title row" bindtap="issue" data-index="1">1.关于发货时间以及物流配送<text
class="{{index==1?'cuIcon-fold':'cuIcon-unfold'}} lg text-gray"></text></view>
<view class="{{index==1?'issue-content':'hide'}}">
<view>①药品当天16点前支付药费,当天即可发货,下午16点后支付一般在第二天发货;</view>
<view>①药品当天16点前支付药费,当天即可发货,下午19点后支付一般在第二天发货;</view>
<view>②快递采用顺丰配送, 1-3天即可到达。具体派送时间,请自行留意或联系派件员;</view>
<view>③您可以在“小懂健康”公众号【我的医生-药品订单】或 “小懂健康”小程序【我的-药品订单】查询物流信息;</view>
<view>④请确保预留的联系方式通话畅通,以免因派送失败耽误用药。</view>
......
......@@ -92,7 +92,7 @@ Page({
},
// 处方笺
getPrescribe: function (id, patient_unionid) {
wx.showLoading();
wx.showLoading({mask:true});
let that = this
if (that.data.paySuccess) {
wx.hideLoading();
......@@ -137,7 +137,7 @@ Page({
},
// 快速开药
getQuick: function (quickid, patient_unionid) {
wx.showLoading();
wx.showLoading({mask:true});
var that = this
if (that.data.paySuccess) {
wx.hideLoading();
......@@ -227,7 +227,7 @@ Page({
* @param {Object} e 事件绑定值
*/
myDetails: function (e) {
wx.showLoading();
wx.showLoading({mask:true});
var that = this;
if (wx.getStorageSync('data').unionid == undefined) {
that.login.showLogin();
......@@ -267,7 +267,7 @@ Page({
* 知情同意书
*/
goConsent: function () {
wx.showLoading()
wx.showLoading({mask:true})
wx.navigateTo({
url: '/packageA/consent/consent'
})
......@@ -277,7 +277,7 @@ Page({
* 同意知情同意书
*/
agree: function () {
wx.showLoading();
wx.showLoading({mask:true});
var that = this;
var agree = that.data.agree ? false : true;
that.setData({
......@@ -289,7 +289,7 @@ Page({
*选择地址
*/
gosite() {
wx.showLoading()
wx.showLoading({mask:true})
wx.navigateTo({
url: '/packageA/site/site',
})
......
......@@ -25,7 +25,7 @@
<view class="sf-top">
<view class="sf-title">
<image class="sf-img" src="/images/sf.png"></image>
<text class="size-0 ml-15">顺丰配送 16:00前下单当日发货。平台承诺100%正品,假一罚十。</text>
<text class="size-0 ml-15">顺丰配送 19:00前下单当日发货。平台承诺100%正品,假一罚十。</text>
</view>
</view>
</view>
......
......@@ -276,6 +276,16 @@ Page({
showCancel: false,
})
return;
}else if (that.data.phone== '') {
wx.showModal({
title: '提示',
content: '请填写手机号',
showCancel: false,
})
that.setData({
sava: true
})
return;
} else if (that.data.phone != '' && that.data.phone.length != 11) {
wx.showModal({
title: '提示',
......
......@@ -8,7 +8,7 @@
<view class="flex-xm4">
<view class="tname">手机号</view>
<view class="phoneinput">
<input type="number" placeholder="填" value="{{phone}}" bindinput='bindPhone' maxlength="11"></input>
<input type="number" placeholder="填" value="{{phone}}" bindinput='bindPhone' maxlength="11"></input>
<view wx:if="{{!phoneYes}}" class="line"></view>
<button wx:if='{{!phoneYes}}' class="wxhq" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">微信获取</button>
<button wx:if="{{time==0&&phoneYes}}" class="getcode" bindtap="getPhoneCode">获取验证码</button>
......
......@@ -280,6 +280,16 @@ Page({
showCancel: false,
})
return;
} else if (that.data.phone == "") {
wx.showModal({
title: '提示',
content: '请填写手机号',
showCancel: false,
})
that.setData({
sava: true
})
return;
} else if (that.data.phone != '' && that.data.phone.length != 11) {
wx.showModal({
title: '提示',
......
......@@ -8,7 +8,7 @@
<view class="flex-xm4">
<view class="tname">手机号</view>
<view class="phoneinput">
<input type="number" placeholder="填" value="{{phone}}" bindinput='bindPhone' maxlength="11"></input>
<input type="number" placeholder="填" value="{{phone}}" bindinput='bindPhone' maxlength="11"></input>
<view wx:if="{{!phoneYes}}" class="line"></view>
<button wx:if='{{!phoneYes}}' class="wxhq" open-type="getPhoneNumber"
bindgetphonenumber="getPhoneNumber">微信获取</button>
......
const Service = require('../../utils/service.js');
const Util = require('../../utils/util.js');
Page({
/**
* 页面的初始数据
*/
data: {
showClose: true,
name: '',
phone: '',
list: [],
receiveAddress: '',
tel: '',
agree: true, //同意知情书
iPhoneX: false,
item: '',
id: '',
ishow: true,
paySuccess: false,
errshow: false,
items: [{
name: '不需要',
value: '0'
}, {
name: '需要',
value: '1'
}, ],
isInvoice: 0, //是否开具发票
isBtnAsh: true, //支付按钮置灰
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this
that.checkModal();
if (Util.isEmpty(options)) {
wx.showModal({
title: '提示',
content: '网络故障,请重新扫码。错误码:4002',
showCancel: false,
success(res) {
if (res.confirm) {
console.log('用户点击确定')
}
}
})
return;
}
console.log("options", options)
that.data.options = options
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
var that = this
that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal");
that.answer = that.selectComponent("#answer");
if (wx.getStorageSync('data').unionid == undefined || wx.getStorageSync('data').unionid == '') {
wx.login({
success: function (msg) {
Service.getOpenId(msg.code).then((res) => {
wx.setStorageSync('user', res)
return Service.getUserData(res.openid)
}).then((res) => {
if (Util.isEmpty(res.unionid)) {
that.login.showLogin();
} else {
wx.setStorageSync('data', res)
if (that.data.options.isQuick == 0) {
// 正常开药
that.getPrescribe(that.data.options.scene, res.unionid)
} else {
that.getQuick(that.data.options.scene, res.unionid)
}
}
})
}
})
} else {
if (that.data.options.isQuick == 0) {
// 正常开药
that.getPrescribe(that.data.options.scene, wx.getStorageSync('data').unionid)
} else {
that.getQuick(that.data.options.scene, wx.getStorageSync('data').unionid)
}
}
},
// 处方笺
getPrescribe: function (id, patient_unionid) {
let that = this
if (that.data.paySuccess) {
return;
}
let data = {};
data.prescription = id;
data.patient_unionid = patient_unionid;
Service.getRecipeDetails(data).then((res) => {
console.log("getDetail", res);
if (res.code == 2 || res.code == 3) {
wx.showModal({
content: res.msg,
showCancel: false,
success(res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
}
}
})
}
if (res.data != null) {
that.setData({
list: res.data,
receiveAddress: res.data.address ? res.data.address : '',
tel: res.data.address != null ? res.data.address.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : ""
})
if (that.data.item == "") {
that.setData({
item: res.data.user,
})
}
if (res.data.healthcare.length > 0) {
that.isChecked(res.data.healthcare);
}
}
})
},
// 快速开药
getQuick: function (quickid, patient_unionid) {
var that = this
if (that.data.paySuccess) {
return;
}
let data = {};
data.prescription = quickid;
data.patient_unionid = patient_unionid;
Service.getQuick(data).then((res) => {
if (res.code == 2 || res.code == 3) {
wx.showModal({
content: res.msg,
showCancel: false,
success(res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
}
}
})
}
if (res.data != null) {
that.setData({
list: res.data,
receiveAddress: res.data.address ? res.data.address : '',
tel: res.data.address != null ? res.data.address.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : ""
})
if (that.data.item == "") {
that.setData({
item: res.data.user,
})
}
if (res.data.healthcare.length > 0) {
that.isChecked(res.data.healthcare);
}
}
})
},
//如果有医生推荐药品加上选中状态
isChecked(healthcare) {
var list = new Array();
var healthcareArr = new Array();
for (var i = 0; i < healthcare.length; i++) {
healthcare[i].checked = true;
list.push(healthcare[i]);
healthcareArr.push(healthcare[i].id)
}
this.setData({
'list.healthcare': list,
healthcare: healthcareArr
})
},
updataRadio(e) {
var that = this;
var list = that.data.list;
var index = e.currentTarget.dataset.index;
if (list.healthcare[index].checked) {
list.healthcare[index].checked = false;
list.drug_money = (Number(list.drug_money) - Number(list.healthcare[index].drugPrice)).toFixed(2);
list.money = (Number(list.money) - Number(list.healthcare[index].drugPrice)).toFixed(2);
} else {
list.healthcare[index].checked = true;
list.drug_money = (Number(list.drug_money) + Number(list.healthcare[index].drugPrice)).toFixed(2);
list.money = (Number(list.money) + Number(list.healthcare[index].drugPrice)).toFixed(2);
}
var agree = that.data.agree;
if (Number(list.drug_money) == 0) {
agree = false
} else {
agree = true
}
that.setData({
list: list,
agree: agree
})
},
myDetails: function (e) {
var that = this;
if (wx.getStorageSync('data').unionid == undefined) {
that.login.showLogin();
return
}
if (that.data.item == null) {
wx.navigateTo({
url: e.currentTarget.dataset.src + "?type=2&iShow=undefined",
})
} else {
wx.navigateTo({
url: e.currentTarget.dataset.src + "?type=2&iShow=" + that.data.item.id + "&item=" + JSON.stringify(that.data.item),
})
}
},
/**
* 是否需要开具纸质发票
* @param {*} e
*/
radioChange: function (e) {
this.setData({
isInvoice: e.detail.value,
})
},
/**
* 拨打电话
*/
tel: function () {
wx.makePhoneCall({
phoneNumber: '95338'
})
},
//知情同意书
goConsent: function (e) {
wx.navigateTo({
url: '/packageA/consent/consent'
})
},
//同意知情同意书
agree: function (e) {
var that = this;
var agree = that.data.agree ? false : true;
that.setData({
agree: agree
})
},
//选择地址
gosite() {
wx.navigateTo({
url: '/packageA/site/site',
})
},
//判断是否是iPhonex
checkModal: function () {
let that = this;
wx.getSystemInfo({
success: (res) => {
// iPhone X iPhone XR iPhone XS Max iPhone XS
if (/^iPhone X.*/i.test(res.model) || /^iPhone XR.*/i.test(res.model) || /^iPhone XS.*/i.test(res.model) || /^iPhone 11*/i.test(res.model) || /^iPhone 11 Pro Max*/i.test(res.model)) {
that.setData({
iPhoneX: true,
})
} else {
that.setData({
iPhoneX: false,
})
}
}
});
},
/**
* applyPay 立即支付
*/
applyPay: Util.debouce(function () {
let that = this;
that.setData({
isBtnAsh: false
})
if (that.data.receiveAddress.id == undefined) {
wx.showToast({
title: '请填写收货地址',
icon: 'none'
})
that.setData({
isBtnAsh: true
})
return
}
if (that.data.ishow == true) {
if (that.data.item == null) {
wx.showToast({
title: '请补充患者信息',
icon: 'none'
})
that.setData({
isBtnAsh: true
})
return
}
if (Util.isEmpty(that.data.item.card)) {
wx.showModal({
title: '提示',
content: '根据互联网医院管理规定,请您填写患者身份证号码。',
confirmText: '去填写',
success(res) {
if (res.confirm) {
that.setData({
isBtnAsh: true
})
wx.navigateTo({
url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1",
})
}
}
})
that.setData({
isBtnAsh: true
})
return;
}
}
if (that.data.receiveAddress == '') {
wx.showModal({
title: '提示',
showCancel: false,
content: '请选择收货地址!',
})
} else {
wx.showLoading({
title: '正在拉起支付',
mask: true
})
that.prescriptionPay();
}
}, 1000, true),
prescriptionPay: function () {
let that = this;
let hstr = new Array();
let healthcare = that.data.list.healthcare;
for (let i = 0; i < healthcare.length; i++) {
if (healthcare[i].checked) {
hstr.push(healthcare[i].id);
}
}
let data = {
payid: that.data.list.payid,
patient_unionid: that.data.item.unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
isywlx: that.data.list.isywlx,
money: that.data.list.money,
hstr: hstr.toString(),
isgd: 1,
// rise_need:that.data.isInvoice
}
Service.prescriptionPay(data).then((res) => {
console.log('res1', res);
switch (res.code) {
case 1:
var orderNumber = res.data.dealarr.out_trade_no;
wx.hideLoading();
that.data.main = false;
wx.requestPayment({
timeStamp: res.data.parameter.timeStamp,
nonceStr: res.data.parameter.nonceStr,
package: res.data.parameter.package,
signType: 'MD5',
paySign: res.data.parameter.paySign,
success(res) {
console.log('res')
if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok")
wx.reLaunch({
url: '/packageA/drugOrder/drugOrder'
})
that.data.paySuccess = true;
return;
} else {
wx.showLoading({
title: '支付中',
mask: true
})
that.paySuccess(orderNumber);
}
},
fail(res) {
wx.showToast({
title: '支付失败',
icon: 'none'
})
that.setData({
isBtnAsh: true
})
that.data.main = true;
that.onShow();
},
complete: function (res) {
if (res.errMsg == "requestPayment:ok") {
console.log('支付成功')
that.data.paySuccess = true;
}
}
})
wx.hideToast();
return;
case -1: //参数异常
case 2: //药方过期
case 3: //二维码无法使用
case 4: //请选择需要购买的药物
case 6:
case 10001: //参数异常
case 10032: //请选择患者
case 10036: //请选择药方
case 30008: //请选择地址
wx.hideLoading();
wx.showModal({
title: '提示',
showCancel: false,
content: res.msg,
})
that.setData({
isBtnAsh: true
})
return;
case 5:
case 7: //药方作废、下架提示
wx.hideLoading();
this.setData({
errshow: true,
errmsg: res.msg,
errList: res.data
})
that.setData({
isBtnAsh: true
})
return;
}
})
},
//支付成功回调
paySuccess(ordernumber) {
var that = this;
var data = {
ordernumber: ordernumber,
fromwhere: 3,
inquiry_id: 0
}
Service.paySucceedCallback(data).then((res) => {
if (res.code == 1) {
setTimeout(function () {
wx.hideLoading();
wx.showToast({
title: '购买成功',
})
wx.reLaunch({
url: '/packageA/drugOrder/drugOrder'
})
}, 500)
} else {
setTimeout(function () {
that.paySuccess(ordernumber);
}, 200)
}
})
},
/**
*
*/
hideModal() {
this.setData({
errshow: false,
})
},
//登陆后组件回调方法刷新当前页面
_refreshEvent() {
console.log("刷新");
this.onShow();
},
//客服电话
dial(e) {
let tel = e.currentTarget.dataset.tel;
wx.makePhoneCall({
phoneNumber: tel,
})
},
})
\ No newline at end of file
{
"navigationBarTitleText": "确认订单",
"usingComponents": {
"modal": "/components/modal/modal",
"login": "/components/login/login",
"answer":"/components/answer/answer"
}
}
\ No newline at end of file
<view class="wrap">
<view class="header" bindtap="gosite" wx:if='{{receiveAddress==""}}'>
<view class="dz">请选择收货地址</view>
<image src="/images/arrow@2x.png"></image>
</view>
<view class="header" bindtap="gosite" wx:else>
<view class="dz">
<view class="po-re">
<text class="uname">收货人:</text>
<text class="usname">{{receiveAddress.name}}</text>
<view>{{tel}}</view>
</view>
<view class="site-dz">
<text class="shouhdz">收货地址:</text>
<text class="site">{{receiveAddress.take_over}}{{receiveAddress.detail_address}}</text>
</view>
</view>
<image src="/images/arrow@2x.png"></image>
</view>
<image class="fengexian" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAGCAYAAACclRsMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjM5NDEyRTJFMzBBNTExRTc4NkZEOEFCRjFBNDU5NTE4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjM5NDEyRTJGMzBBNTExRTc4NkZEOEFCRjFBNDU5NTE4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Mzk0MTJFMkMzMEE1MTFFNzg2RkQ4QUJGMUE0NTk1MTgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Mzk0MTJFMkQzMEE1MTFFNzg2RkQ4QUJGMUE0NTk1MTgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4gFPAsAAACi0lEQVR42uyaWytEURiG97hAOeR061CIO5G/gZSEUE7JIYr8CMKNHKJBIZSSH+AvkJTIhcNfQGbc8K5mJ5q99l4z3/j2NvOtem9m1to91ve9b2vtEYqchz8t87EH9f/8IHIedZpXAl1AldbfjzgmNYrKGgPJ9b1vDTde6xXrJVThO6tzjX+OUpu1nIF1FxrQfamp+68pNmsVA+sh1EPogWKblaNfD6BeQg9wsu5DfYQekByQHJAckByQHEjDHNDU3Xe/a2qclF+yEph7B40bzAtB20xmcGTSFM53rgSGYt1hMuktNJYC1nIm1kniM7aYzHsPjRKfEWbq1/sU9ECY0VtUVskByQHJAckByYHMyYGg+j0pv5ge3CNQN/RqcPOagNoYNsiRyWUEhsvgdj0FtTKxdkFvhNv1NNTCwPoOdbqxGrxhUeHZwcD6Ye/rC6EHFGt7IFi9e2CCiTXq5S2DHpAckByQHJAckBxIwxzQ1N13v2tqnLS3TQ/us1bsdb5XAZugJYtnxDG5FM53rgRMqlgXmFhnoCuCSZuheUbWa0JQNzD2wJwV+wk22R5Qf8wyY79eEHpAsS4GwVsGPSA5IDkgOSA5IDmQhjmgqbvvftfUmORtk4P7KbRmMK8AOoKyGTbIkUlTON+5EhiF0DET6wm0TmQ9YmTdIKzPs1lzGVjPoBXC+nwr9j9yOUysq4T1BYyspylglRyQHJAckByQHMiMHPDd75pDO9nbXgf3R2jI8OalNrKWYYMcmVxGYLgMbteKtYaJdcSV1ft2vQlVM7A+QMNuEwzesKhAqmdgfYYGoU/CM1TQ1/0T1nUm1icvbxn0gOSA5IDkgOSA5EAa5oCm7kH1O9nbXwIMALoZYR4r6iuTAAAAAElFTkSuQmCC"></image>
<view class="sf">
<view class="sf-top">
<view class="sf-title">
<image class="sf-img" src="/images/sf.png"></image>
<text class="size-0 ml-15">顺丰配送 19:00前下单当日发货。平台承诺100%正品,假一罚十。</text>
</view>
</view>
</view>
<view class="hzxx" wx:if="{{ishow}}" bindtap='myDetails' data-src="/packageA/selectUser/selectUser">
<text>患者信息</text>
<view class="hz-info">
<text>{{item==""||item==null?'请补充患者信息':item.name}}</text>
<image class="more" src="/images/more.png"></image>
</view>
</view>
<view class="line" wx:if='{{list.prescription.length>0}}'>
<text>推荐产品</text>
</view>
<block wx:for="{{list.prescription}}" wx:key="index">
<view class="list">
<view class="list-item">
<view class="image">
<image src="{{item.picture}}"></image>
</view>
<view class="item-name">
<view class="name">{{item.name}}</view>
<view class="firm">{{item.firm}}</view>
<view class="norms">{{item.norms}}</view>
<view class="pirce">
<text>¥</text>
<text>{{item.drugPrice}}</text>
</view>
</view>
<view class="number">x {{item.num}}</view>
</view>
</view>
</block>
<view wx:if='{{list.healthcare.length>0}}' class="line">
<text>医生推荐</text>
</view>
<block wx:for="{{list.healthcare}}" wx:key="index" wx:for-index="index">
<view class="list">
<checkbox data-index="{{index}}" checked="{{item.checked}}" bindtap="updataRadio" color='#1384ff' />
<view class="list-item1">
<view class="image">
<image src="{{item.picture}}"></image>
</view>
<view class="item-name">
<view class="name" style="width:395rpx;">{{item.name}}</view>
<view class="firm" style="width:395rpx;">{{item.firm}}</view>
<view class="norms" style="width:395rpx;">{{item.norms}}</view>
<view class="pirce">
<text>¥</text>
<text>{{item.price}}</text>
</view>
</view>
<view class="number">x {{item.num}}</view>
</view>
</view>
</block>
<!-- 订单编号 -->
<view class="order-list">
<!-- <view class="order-num">
<text>下单时间</text>
<text style="font-size:28rpx;">{{list.create_time}}</text>
</view> -->
<view class="order-num">
<text>商品价格</text>
<view>
<text style="color:#EC5B68; font-size: 28rpx;">¥ </text>
<text style="color:#EC5B68;font-weight: 700;font-size: 28rpx;">{{list.drug_money}}</text>
</view>
</view>
<view class="order-num">
<text>服务诊金</text>
<view>
<text style="color:#999999;font-size: 28rpx;">¥ </text>
<text style="color:#999999;font-size: 28rpx;">{{list.zj}}</text>
</view>
</view>
<view class="order-num">
<text>顺丰运费</text>
<view>
<text style=" color:#999999; font-size: 28rpx;">¥ </text>
<text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text>
</view>
</view>
<!-- <view class="order-num">
<text>纸质发票</text>
<radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for="{{items}}" wx:key="key">
<radio value="{{item.value}}" checked="{{item.value==0?true : false}}" color='#1384ff' />{{item.name}}
</label>
</radio-group>
</view> -->
<view class="tys" bindtap="agree">
<view wx:if='{{!agree}}' class="unselected">
</view>
<view wx:if='{{agree}}' class="selected">
<image src="/images/on2x.png"></image>
</view>
<text class="tys-text">我已阅读并接受</text>
<text class="zqtys" catchtap="goConsent">《知情同意书》</text>
</view>
<view class="tsy">根据药品实际仓储位置,您的订单可能分开发货</view>
<view class="tsy">遇到任何问题请拨打客服电话:<text bindtap='dial' data-tel='4001199218' style="color:#2684ff;">4001199218</text></view>
<view class="user-logo">
<image src="/images/xdjklogo.png"></image>
</view>
<view wx:if="{{iPhoneX}}" class="height"></view>
</view>
<!-- 微信支付 -->
<view class="three-wrap" style="height:{{iPhoneX?160:100}}rpx;">
<view class="flex-zf">
<view class="jg">
<text>合计:</text>
<text class="text">¥ </text>
<text>{{list.money}}</text>
</view>
<view wx:if='{{!agree||!isBtnAsh}}' class="qzf1">立即支付</view>
<view wx:if='{{agree&&isBtnAsh}}' class="qzf" bindtap="applyPay">立即支付</view>
</view>
</view>
<!-- <view class="btn" bindtap="applyPay">微信支付</view> -->
</view>
<view class="cu-modal {{errshow?'show':''}} shade" bindtap='hideModal' catchtouchmove="true">
<view class='cu-dialog' catchtap style="width:650rpx;border-radius: 20rpx !important;">
<view class='modal-top'>
<view class='modal-title'>{{errmsg}}</view>
</view>
<view class='modal-body' style="margin:0">
<block wx:for="{{errList}}" wx:key='key'>
<view class="list1">
<view class="list-item" style="padding-top:0;">
<view class="image">
<image src="{{item.picture}}"></image>
</view>
<view class="item-name">
<view class="name">{{item.name}}</view>
<!-- <view class="firm">{{item.firm}}</view> -->
<view class="norms">{{item.norms}}</view>
<view class="err_msg">
{{item.msg}}
</view>
</view>
<!-- <view class="number">x {{item.num}}</view> -->
</view>
</view>
</block>
</view>
<view class='modal-footer'>
<text class='sure width-100' catchtap='hideModal'>返回</text>
</view>
</view>
</view>
<login id='login' showClose='{{showClose}}' bind:refreshEvent="_refreshEvent">
</login>
<answer id='answer'></answer>
\ No newline at end of file
@import '/components/modal/modal.wxss';
@import '/components/cu-modal.wxss';
page {
width: 750rpx;
padding-bottom: env(safe-area-inset-bottom);
background: rgb(242, 242, 242)
}
checkbox {
padding-top: 90rpx;
transform: scale(.8);
}
radio {
transform: scale(.7);
color: #1384ff;
}
.radio {
font-size: 28rpx;
}
/*checkbox未选中时样式 */
checkbox .wx-checkbox-input {
/* 自定义样式.... */
border-radius: 50%;
}
/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
/* border: none; */
border-radius: 50%;
background-color: #2684ff;
}
/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
font-size: 36rpx;
color: #fff;
}
.wrap {
position: absolute;
width: 100%;
top: 0;
left: 0;
background: #fff;
}
.header {
display: flex;
align-items: center;
height: 140rpx;
padding: 0 30rpx;
}
.header image:first-child {
width: 22rpx;
height: 28rpx;
}
.dz {
margin-left: 16rpx;
font-weight: 700;
font-size: 34rpx;
letter-spacing: 2rpx;
}
.po-re {
position: relative;
}
.po-re view {
position: absolute;
right: 0;
top: 0;
font-size: 26rpx;
color: #000;
font-weight: 400;
margin-top: 7rpx;
}
.site {
display: block;
width: 479rpx;
color: #000;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
font-size: 26rpx;
font-weight: 400;
}
.sf {
margin-top: 30rpx;
padding: 0 30rpx 25rpx 30rpx;
font-size: 28rpx;
border-bottom: 1rpx solid #F5F8FB;
}
.sf-top {
display: flex;
justify-content: space-between;
}
.sf-title {
display: flex;
flex-direction: row;
/* align-items: center; */
}
.ml-15 {
font-size: 28rpx;
margin-left: 15rpx;
}
.size-0 {
color: #777;
max-width: 638rpx;
}
.size-1 {
color: #569efc;
}
.sf-img {
margin-top: 8rpx;
width: 32rpx;
height: 32rpx;
}
.tel-img {
width: 38rpx;
height: 38rpx;
}
.hzxx {
display: flex;
justify-content: space-between;
padding: 35rpx 30rpx;
font-size: 34rpx;
}
.line {
border-top: 20rpx solid rgb(242, 242, 242);
border-bottom: 1rpx solid rgb(242, 242, 242);
padding: 30rpx 0;
}
.line text {
margin-left: 30rpx;
font-size: 30rpx;
color: #666;
}
.hz-info {
display: flex;
align-items: center;
}
.hz-info text {
margin-right: 15rpx;
font-size: 30rpx;
color: #999999;
width: 400rpx;
text-align: right;
}
.more {
width: 15rpx;
height: 25rpx;
}
.shouhdz {
font-size: 26rpx;
color: #666666;
font-weight: 400;
width: 145rpx;
display: inline-block;
}
.site-dz {
display: flex;
align-items: center;
margin-top: 15rpx;
}
.user {
padding-top: 10rpx;
}
.uname {
width: 145rpx;
font-size: 26rpx;
font-weight: 400;
color: #666666;
display: inline-block;
}
.usname {
font-size: 26rpx;
font-weight: 400;
color: #000;
}
.uphone {
font-size: 26rpx;
color: #666666;
padding-left: 32rpx;
}
.header image:last-child {
width: 10rpx;
height: 20rpx;
position: absolute;
right: 0;
margin-right: 30rpx;
}
.list {
padding: 0 30rpx;
display: flex;
flex-direction: row;
}
.list1{
padding: 0;
display: flex;
flex-direction: row;
}
.list-item,
.list-item1 {
display: flex;
width: 100%;
border-bottom: 2rpx solid #F5F8FB;
padding-bottom: 42rpx;
padding-top: 42rpx;
}
.list-item2
{
display: flex;
width: 100%;
}
.br{
margin: 30rpx;
background-color:#F5F8FB;
height: 2rpx;
width: 530rpx;
}
.list-item image,
.list-item1 image {
width: 155rpx;
height: 155rpx;
}
.list-item1 {
margin-left: 20rpx;
width: 630rpx;
}
.image {
padding: 2.5rpx;
border: 1rpx solid rgb(241, 241, 241);
}
.item-name {
display: flex;
flex-direction: column;
justify-content: space-between;
padding-left: 18rpx;
width: 455rpx;
overflow: hidden;
/*超出部分隐藏*/
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.name {
font-size: 32rpx;
color: #333333;
font-weight: 600;
}
.errname{
width: 400rpx;
font-size: 24rpx;
color: #333333;
font-weight: 400;
text-align: left;
overflow: hidden;
/*超出部分隐藏*/
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.firm {
font-size: 24rpx;
color: #666666;
overflow: hidden;
/*超出部分隐藏*/
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.norms {
font-size: 24rpx;
color: #666666;
overflow: hidden;
/*超出部分隐藏*/
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.pirce {
color: #EC5B68;
}
.err_msg{
color: #EC5B68;
font-weight: 700;
}
.pirce text:first-child {
font-size: 24rpx;
}
.pirce text:last-child {
font-size: 32rpx;
font-weight: 700;
}
.number {
display: flex;
margin-top: 5rpx;
font-size: 28rpx;
}
.errnumber{
display: flex;
margin-top: 5rpx;
font-size: 20rpx;
}
.order-list {
border-top: 20rpx solid rgb(242, 242, 242);
}
.order-num {
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #F5F8FB;
padding: 35rpx 30rpx;
font-size: 34rpx;
}
.orders-num {
display: flex;
justify-content: space-between;
padding: 35rpx 30rpx;
font-size: 34rpx;
}
.order-num text:first-child {
color: #000;
}
.fonw-400 {
font-weight: 400;
}
.order-num text:last-child {
color: #999999;
}
.red {
color: #EC5B68;
}
.btn {
width: 690rpx;
height: 90rpx;
background: #2684FF;
line-height: 90rpx;
text-align: center;
color: #fff;
font-size: 32rpx;
margin-bottom: 30rpx;
margin-left: 30rpx;
letter-spacing: 2rpx;
border-radius: 4rpx;
position: absolute;
bottom: 30rpx;
}
.three-wrap {
width: 100%;
background: #fff;
z-index: 1000;
position: fixed;
bottom: 0;
left: 0;
}
.tys {
font-size: 26rpx;
line-height: 42rpx;
padding: 30rpx 0 20rpx 30rpx;
flex-direction: row;
/* background: rgb(242, 242, 242); */
}
.tsy {
font-size: 26rpx;
line-height: 42rpx;
padding-left: 30rpx;
/* padding-bottom: 150rpx; */
flex-direction: row;
/* background: rgb(242, 242, 242); */
color: rgb(177, 177, 177);
}
.unselected {
border-radius: 50%;
height: 30rpx;
width: 30rpx;
border: 1rpx solid #ccc;
margin: 5rpx;
margin-right: 10rpx;
display: block;
float: left;
/* 自定义样式.... */
}
.selected image {
border-radius: 50%;
height: 32rpx;
width: 32rpx;
margin: 5rpx;
margin-right: 10rpx;
display: block;
float: left;
/* 自定义样式.... */
}
.tys-text {
color: #999;
font-size: 26rpx;
}
.zqtys {
color: #2684FF;
z-index: 100;
}
.flex-zf {
display: flex;
justify-content: space-between;
border-top: 1rpx solid #F5F8FB;
}
.jg {
width: 50%;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
padding-left: 30rpx;
color: #999;
}
.text {
margin-left: 20rpx;
color: #EC5B68;
}
.jg text:last-child {
color: #EC5B68;
font-weight: 700;
font-size: 36rpx;
}
.qzf {
width: 50%;
height: 100rpx;
background: #2684ff;
color: #fff;
line-height: 100rpx;
text-align: center;
font-size: 34rpx;
font-weight: 700;
}
.qzf1 {
width: 50%;
height: 100rpx;
background: #ccc;
color: #fff;
line-height: 100rpx;
text-align: center;
font-size: 34rpx;
font-weight: 700;
}
.height {
width: 100%;
height: 50rpx;
background: rgb(242, 242, 242);
}
.fengexian {
width: 100%;
height: 6rpx;
display: block;
border-bottom: 20rpx solid rgb(242, 242, 242);
}
/* 登录 */
/* 登录 */
.login-wrap {
width: 100%;
height: 100%;
position: fixed;
z-index: 9999;
background: rgba(0, 0, 0, .4);
bottom: 0;
}
.cu-modal {
width: 100%;
background: #fff;
position: absolute;
border-radius: 15rpx 15rpx 0 0;
bottom: 0;
left: 0;
z-index: 10000;
text-align: center;
height: 540rpx;
}
.login-content {
width: 100%;
height: 480rpx;
background: #ffffff;
position: absolute;
bottom: 0;
left: 0;
text-align: center;
}
.login-close {
position: absolute;
right: 15rpx;
top: 15rpx;
width: 40rpx;
height: 40rpx;
padding: 10rpx;
font-size: 40rpx;
color: #000000;
font-weight: 800;
}
.login-title {
font-size: 50rpx;
font-weight: bold;
color: #000000;
letter-spacing: 2rpx;
margin-top: 84rpx;
margin-bottom: 50rpx;
}
.login-text {
width: 620rpx;
font-size: 32rpx;
margin: 0 auto;
font-weight: 400;
text-align: left;
color: #555;
line-height: 46rpx;
letter-spacing: 2rpx;
}
.login-btn {
width: 620rpx;
height: 88rpx;
line-height: 88rpx;
background: #2684ff;
border-radius: 10rpx;
margin: 0 auto;
margin-top: 50rpx;
}
.cu-dialog {
min-height: 480rpx;
border-radius: 10rpx 10rpx 0 0 !important;
}
.user-logo {
display: flex;
justify-content: center;
width: 100%;
padding-bottom: 220rpx;
margin-top: 100rpx;
}
.user-logo image {
width: 650rpx;
height: 104rpx;
}
.err-title{
font-size: 32rpx;
font-weight: 700;
text-align: center;
color: #333333;
margin-bottom: 50rpx;
}
.err-image{
height: 120rpx!important;
width: 120rpx!important;
}
.err-btn{
margin:0rpx auto;
margin-top: 30rpx;
width: 510rpx;
height: 66rpx;
line-height: 66rpx;
background-color: #2684ff;
font-size: 26rpx;
border-radius: 33rpx;
}
/* 弹框 */
.shade {
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 1001;
}
.modal-title{
font-size: 32rpx;
font-weight: bold;
}
\ No newline at end of file
......@@ -155,12 +155,12 @@
</view>
<view class="yishi">
<text>审核:</text>
<text>栾文娟</text>
<text>欧兆智</text>
</view>
<view class="yishi">
<!-- <view class="yishi">
<text>复审:</text>
<text>傅美来</text>
</view>
</view> -->
<image class="img" src="/images/zhang.png"></image>
</view>
<view class="specialTips">
......
......@@ -132,7 +132,10 @@ Page({
});
},
next:Util.debouce(function (e){
wx.showLoading();
wx.showLoading({
mask:true,
title:'加载中'
});
var that = this;
if (Util.isEmpty(that.data.item)) {
wx.showModal({
......
......@@ -53,7 +53,7 @@ Page({
}, 1000, true),
//重新购买
repurchase: function () {
wx.showLoading();
wx.showLoading({mask:true});
var op_openid = '';
var data = {};
data.unionid = this.data.info.consultant_unionid;
......
......@@ -18,7 +18,7 @@ Page({
},
goback(e){
wx.showLoading();
wx.showLoading({mask:true});
console.log(e)
var data={
addressId:e.currentTarget.dataset.item.id,
......@@ -32,7 +32,7 @@ Page({
wx.hideLoading();
},
addsite(e){
wx.showLoading();
wx.showLoading({mask:true});
let item = JSON.stringify(e.currentTarget.dataset.item);
if (e.currentTarget.dataset.num == 0){
wx.navigateTo({
......
......@@ -51,6 +51,7 @@ Page({
data.g_id = this.data.gid;
wx.showLoading({
title: '正在提交',
mask:true
})
data.email = this.data.email;
if (this.data.gid.length < 1 || this.data.email.length < 1){
......
......@@ -21,6 +21,7 @@ Page({
onLoad: function (options) {
wx.showLoading({
title: '加载中',
mask:true
})
let that = this;
let gid = options.gid;
......@@ -109,8 +110,9 @@ Page({
/* 查看发票 */
vieTicket() {
let that = this;
wx: wx.showLoading({
wx.showLoading({
title: '加载中',
mask:true
})
let gid = this.data.gid;
Service.seeInvoice(gid).then((res)=>{
......
......@@ -68,6 +68,7 @@ Page({
let gid = that.data.gid
wx.showLoading({
title: '正在提交',
mask:true
})
Service.sendEmail(gid).then(()=>{
wx.navigateTo({
......
......@@ -61,6 +61,7 @@ Page({
*/
getScale(e) {
let that = this;
wx.removeStorageSync('roomService');
if (this.data.repeatClick) {
this.setData({
repeatClick: false
......@@ -190,7 +191,7 @@ Page({
let that = this;
var json = [];
for (let j in e) {
if (e[j].measure_id_z != '') {
if (!Util.isEmpty(e[j].measure_id_z)) {
var len = e[j].measure_id_z.split(',').length;
e[j].time01 = Util.timeMethod(e[j].time);
e[j].lb_num = len;
......
......@@ -33,7 +33,7 @@ Page({
}).then((res) => {
if (Util.isEmpty(res.unionid)) {
that.login.showLogin();
console.log(1)
// console.log(1)
that.setData({
showview: true,
})
......@@ -115,7 +115,7 @@ Page({
},
//菜单栏红点提示
resultNot(openid) {
console.log("resultNot")
// console.log("resultNot")
//未做量表提醒
var data = {
openid: openid
......@@ -131,20 +131,20 @@ Page({
})
}
}).catch(error => {
console.error("菜单栏红点提示", error)
// console.error("菜单栏红点提示", error)
})
},
//获取im会话列表
sessionList: function () {
let that = this;
console.log("Tim.data.sessionList", Tim.data.sessionList)
// console.log("Tim.data.sessionList", Tim.data.sessionList)
that.data.sessionList = Tim.data.sessionList.filter(item => {
return item.type == "GROUP"
});
Tim.tim.getGroupList().then(function (imResponse) {
console.log("群组列表", imResponse.data.groupList); // 群组列表
// console.log("群组列表", imResponse.data.groupList); // 群组列表
}).catch(function (imError) {
console.warn('getGroupList error:', imError); // 获取群组列表失败的相关信息
// console.warn('getGroupList error:', imError); // 获取群组列表失败的相关信息
});
//取消在Tim.js监听的会话列表避免重复监听
// Tim.tim.off(TIM.EVENT.CONVERSATION_LIST_UPDATED, Tim.onConversationListUpdated);
......@@ -158,7 +158,7 @@ Page({
*/
onConversationListUpdated: function (event) {
let that = this;
console.log("%c收到会话列表更新通知", "color:#2684ff", event)
// console.log("%c收到会话列表更新通知", "color:#2684ff", event)
that.data.sessionList = event.data.filter(item => {
return item.type == "GROUP"
});
......@@ -172,7 +172,7 @@ Page({
//去聊天页面
goChat: Util.debouce(function (e) {
// console.log(e);
wx.showLoading();
wx.showLoading({mask:true});
let item = e.currentTarget.dataset.item;
var datas = {};
var user = wx.getStorageSync('user');
......
......@@ -261,6 +261,7 @@ Page({
console.log("次数")
wx.showLoading({
title: '正在上传',
mask:true
})
var startTime = wx.getStorageSync('startTime');
var timeArr = wx.getStorageSync('timeArr');
......@@ -402,8 +403,21 @@ Page({
})
}
} else if (res == 0) {
wx.removeStorageSync('tplbDetail')
wx.removeStorageSync('weiLb')
wx.removeStorageSync('tplbDetail');
wx.removeStorageSync('weiLb');
let roomService =wx.getStorageSync('roomService');
//判断是否从IM跳入
if(roomService){
wx.reLaunch({
url: `/packageA/chat/chat?t_unionid=${roomService.t_unionid}&groupID=${roomService.groupID}&orderId=${roomService.orderId}`,
success: function() {
that.setData({
flag: true
})
wx.removeStorageSync('roomService');
}
})
}else{
wx.reLaunch({
url: '/pages/my/my',
success: function() {
......@@ -413,6 +427,7 @@ Page({
wx.removeStorageSync('lb_descript')
}
})
}
}
})
},
......
......@@ -230,6 +230,7 @@ Page({
}, 5000)
wx.showLoading({
title: '上传中...',
mask:true
})
wx.request({
method: 'POST',
......@@ -320,15 +321,29 @@ Page({
} else if (res == 0) {
wx.removeStorageSync('tplbDetail')
wx.removeStorageSync('weiLb')
wx.reLaunch({
url: '/pages/my/my',
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('lb_descript')
}
})
let roomService =wx.getStorageSync('roomService');
//判断是否从IM跳入
if (roomService) {
wx.reLaunch({
url: `/packageA/chat/chat?t_unionid=${roomService.t_unionid}&groupID=${roomService.groupID}&orderId=${roomService.orderId}`,
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('roomService');
}
})
} else {
wx.reLaunch({
url: '/pages/my/my',
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('lb_descript')
}
})
}
}
})
},
......
......@@ -91,11 +91,11 @@ Page({
})
} else {
console.log("loadData",2);
console.log("loadData", 2);
this.loadData();
}
} else {
console.log("loadData",1);
console.log("loadData", 1);
this.loadData();
}
}
......@@ -419,7 +419,7 @@ Page({
wx.setStorageSync("timeArr", arr);
}
},
tijiao:Util.debouce(function () {
tijiao: Util.debouce(function () {
let that = this;
this.setData({
sc: false
......@@ -488,6 +488,7 @@ Page({
// }, 7000)
wx.showLoading({
title: '上传中...',
mask:true
})
wx.request({
method: 'POST',
......@@ -612,15 +613,29 @@ Page({
setTimeout(function () {
wx.removeStorageSync('tplbDetail')
wx.removeStorageSync('weiLb')
wx.reLaunch({
url: '/pages/my/my',
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('lb_descript')
}
})
let roomService =wx.getStorageSync('roomService');
//判断是否从IM跳入
if (roomService) {
wx.reLaunch({
url: `/packageA/chat/chat?t_unionid=${roomService.t_unionid}&groupID=${roomService.groupID}&orderId=${roomService.orderId}`,
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('roomService');
}
})
} else {
wx.reLaunch({
url: '/pages/my/my',
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('lb_descript')
}
})
}
}, 2000)
}
})
......@@ -631,7 +646,7 @@ Page({
complete: function (e) {}
})
}
},1000,true),
}, 1000, true),
onReady: function () {
let that = this;
// setTimeout(function () {
......
// pages/demo/demo.js
var Api = require('../../utils/api');
var util = require('../../utils/util');
const lifeEvent = require('../../utils/lifeEvent.js');
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id: 0,
winH: '',
winW: '',
disab: true,
current: 1,
flag: true,
animationData: {},
item: {
answer: [],
con: '',
active: -1,
num: '',
add: '',
lb_id: '',
time: '',
},
nextFalg: {},
lifeName: lifeEvent.lifeName,
eName: lifeEvent.lifeEventName[0],
lifeNum: 0,
lifeArr: lifeEvent.lifeArr,
track: [], //答题轨迹
},
onLoad: function(options) {
let that = this;
var otype = options.otype;
var answer_swiper = wx.getStorageSync('answer_swiper');
var swiper_arr = wx.getStorageSync('swiper_arr');
var lb_descript = wx.getStorageSync('lb_descript');
var yanzhengid = wx.getStorageSync('yanzhengid');
let len = answer_swiper != '' ? (answer_swiper.answer.length < swiper_arr[1].length ? answer_swiper.answer.length : swiper_arr[1].length - 1) : 0;
if (false) {} else {
if (lb_descript.desc.record_id == -1) {
this.loadData();
} else if (yanzhengid == lb_descript.desc.record_id) {
if (len > 0) {
var item = swiper_arr[1][len];
var nextFalg = this.data.nextFalg;
// 处理最后一题的选择问题
if (swiper_arr[1].length == answer_swiper.answer.length) {
var last_len = swiper_arr[1].length - 1; // 最后一题序号
var ind_len = answer_swiper.answer[last_len].split('-'); // 最后答案
var con_len = swiper_arr[1][last_len].score; // 最后问题的答案
for (let i = 0; i < con_len.length; i++) {
(function(j) {
if (ind_len[0] == j) {
that.setData({
active: j,
disab: false,
nextFalg: nextFalg
})
}
})(i)
}
}
this.setData({
item: item,
current: len,
all: swiper_arr[1].length,
nextFalg: nextFalg,
})
} else {
this.loadData();
}
} else {
this.loadData();
}
}
},
loadData: function() {
var lb_swiper_con = wx.getStorageSync('lb_swiper_con');
var lb = lb_swiper_con[1];
var arr = [];
var an = ['A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.'];
let zimu = [];
for (let j in lb) {
let le = lb[j].quesion_answer.split(',').length;
var obj = {
con: lb[j].quesion_title,
answer: lb[j].quesion_answer.split(','),
score: lb[j].quesion_score.split(','),
check: [],
zimu: an,
type: lb[j].type
}
obj.check.length = obj.answer.length;
for (let i = 0; i < obj.answer.length; i++) {
obj.check[i] = 0;
}
arr.push(obj)
}
var swiper_arr = [lb_swiper_con[0], arr];
wx.setStorageSync('swiper_arr', swiper_arr);
var lb_swiper_con = wx.getStorageSync('lb_swiper_con');
var answerData = {
score: [],
answer: [],
id: lb_swiper_con[0].measure_id
}
var yanzhengid = -1;
wx.setStorageSync('answer_swiper', answerData);
let answerPer = {
score: [],
answer: [],
}
wx.setStorageSync('answerPer', answerPer);
wx.setStorageSync('yanzhengid', yanzhengid);
var timeArr = [];
wx.setStorageSync("timeArr", timeArr);
// wx.removeStorageSync('lb_swiper_con')
var item = swiper_arr[1][0];
var nextFalg = {
0: false
}
this.setData({
all: arr.length,
current: 0,
item: item,
nextFalg: nextFalg
});
wx.setNavigationBarTitle({
title: swiper_arr[0].measure_name
});
},
selectData: function(e) {
let that = this;
var qufentime = wx.getStorageSync('qufentime');
var lb_descript = wx.getStorageSync('lb_descript');
wx.setStorageSync('yanzhengid', lb_descript.desc.record_id);
// var lb_swiper_con = wx.getStorageSync('lb_swiper_con');
var swiper_arr = wx.getStorageSync('swiper_arr');
var answer_swiper = wx.getStorageSync('answer_swiper');
let len = swiper_arr[1].length;
var record = e.currentTarget.dataset.record;
var index = e.currentTarget.dataset.index; // 序号,
// var answer = e.currentTarget.dataset.answer;
var score = e.currentTarget.dataset.score; // 分数
var nextFalg = this.data.nextFalg;
nextFalg[record] = true;
this.setData({
nextFalg: nextFalg,
})
// 判断题长度
if (record < Number(len) - 1) {
// 多选判断
this.setData({
active: index,
all: len,
current: Number(record)
})
this.checkAnswer(score, index, function(checkA) {
if (checkA.type == 0) {
that.cacheAnser(checkA.obj, record);
setTimeout(() => {
that.next(record);
}, 300)
}
});
} else {
let anCurArr = wx.getStorageSync('answer_swiper').answer[that.data.current];
if (!anCurArr) anCurArr = '';
anCurArr = anCurArr.split('-');
if (anCurArr.length == 5 || anCurArr[3] == 0) {
wx.showToast({
title: '量表已做完,请提交',
icon: 'none',
duration: 1000
})
if (anCurArr.length == 5){
this.setData({
eName: lifeEvent.lifeArr.impactConTimeArr.title,
})
}
if (anCurArr[3] == 0){
this.setData({
eName: lifeEvent.lifeArr.spiritDegreeArr.title,
})
}
return;
} else {
this.setData({
active: index,
all: len,
current: Number(record)
})
this.checkAnswer(score, index, function(checkA) {
if (checkA.type == 0) {
that.cacheAnser(checkA.obj, record);
let _len = checkA.obj.s.split('-');
if (_len.length == 5) {
that.setData({
eName: lifeEvent.lifeArr.impactConTimeArr.title,
})
}
if (_len.length == 3) {
that.setData({
eName: lifeEvent.lifeArr.spiritDegreeArr.title,
})
}
wx.showToast({
title: '量表已做完,请提交',
icon: 'none',
duration: 1000
})
that.setData({
active: index,
// active: -1,
all: len,
current: Number(record),
disab: false,
})
}
});
}
}
},
checkAnswer(score, index, back) {
console.log("score",score,"index",index,"back",back);
let answerPer = wx.getStorageSync('answerPer');
let lifeNum = this.data.lifeNum;
let answerArr = answerPer.answer;
let scoreArr = answerPer.score;
let track = this.data.track;
answerArr.push(index);
scoreArr.push(score);
let jsonArr = {};
if (score == 0) { // 未发生|| 一年前
this.setData({
lifeNum: 0,
track: [],
})
answerPer.answer = answerPer.score = [];
wx.setStorageSync('answerPer', answerPer);
jsonArr = lifeEvent.lifeArr.happenTimeArr;
this.changeCon(jsonArr, 1);
let obj = {
'type': 0,
'obj': {
a: answerArr.join('-'),
s: scoreArr.join('-')
}
}
back(obj)
return;
} else { // 一年内
track.push(index);
lifeNum++;
this.setData({
track: track
})
if (track.length == 1) { // 第一次点击 区分一年内和长期性
if (score == 1) {
jsonArr = lifeEvent.lifeArr.happenNumArr;
} else if (score == 2) {
jsonArr = lifeEvent.lifeArr.continusTimeArr;
}
} else
if (track.length == 2) {
jsonArr = lifeEvent.lifeArr.natureArr;
}
if (track.length == 3) {
jsonArr = lifeEvent.lifeArr.spiritDegreeArr;
}
if (track.length == 4) {
jsonArr = lifeEvent.lifeArr.impactConTimeArr;
}
if (track.length == 5) {
this.setData({
lifeNum: 0,
track: [],
})
answerPer.answer = answerPer.score = [];
wx.setStorageSync('answerPer', answerPer);
jsonArr = lifeEvent.lifeArr.happenTimeArr;
lifeEvent.lifeArr
this.changeCon(jsonArr, 1);
let obj = {
'type': 0,
'obj': {
a: answerArr.join('-'),
s: scoreArr.join('-')
}
}
back(obj)
return;
}
this.setData({
lifeNum: lifeNum,
})
setTimeout(() => {
if (!jsonArr.title) return;
this.changeCon(jsonArr);
}, 200)
answerPer.answer = answerArr;
answerPer.score = scoreArr;
wx.setStorageSync('answerPer', answerPer);
let obj = {
'type': 1,
'obj': {
a: answerArr.join('-'),
s: scoreArr.join('-')
}
}
back(obj)
return;
}
},
//
changeCon(j, n) {
let item = this.data.item;
item.answer = j.name;
item.score = j.score;
if (n && n == 1) {
this.setData({
eName: j.title,
// active: -1
})
} else {
let anCurArr = wx.getStorageSync('answer_swiper').answer[this.data.current];
if (!anCurArr) anCurArr = '';
anCurArr = anCurArr.split('-');
if (anCurArr[this.data.lifeNum]) {
this.setData({
item: item,
eName: j.title,
active: anCurArr[this.data.lifeNum]
})
} else {
this.setData({
item: item,
eName: j.title,
active: -1
})
}
}
},
// 存储答案 n
cacheAnser(n, record) {
var answer_swiper = wx.getStorageSync('answer_swiper');
if (answer_swiper.score.length <= record) {
answer_swiper.score.push(n.s);
answer_swiper.answer.push(n.a);
} else {
answer_swiper.score[record] = n.s;
answer_swiper.answer[record] = n.a;
}
wx.setStorageSync('answer_swiper', answer_swiper);
},
prev: function(e) {
if (this.data.current > 0) {
var record = this.data.current - 1;
this.prevAnimation();
var swiper_arr = wx.getStorageSync('swiper_arr');
let len = swiper_arr[1].length;
var answer_swiper = wx.getStorageSync('answer_swiper');
var item = swiper_arr[1][record];
var nextFalg = this.data.nextFalg;
nextFalg[record] = true;
let anserCacheArr = answer_swiper.answer[Number(record)].split('-');
// 多选题 的数据状态
this.setData({
active: anserCacheArr[0],
current: record,
item: item,
nextFalg: nextFalg,
eName: lifeEvent.lifeArr.happenTimeArr.title,
lifeNum: 0,
track: [],
})
}
},
next: function(n) {
var answer_swiper = wx.getStorageSync('answer_swiper');
if (answer_swiper.answer[n].length <= 0) {
wx.showToast({
title: '请选择',
icon: 'none',
duration: 1000
});
return;
}
var swiper_arr = wx.getStorageSync('swiper_arr');
let len = swiper_arr[1].length;
if (n < len) {
// this.nextAnimation();
var item = swiper_arr[1][n + 1]
var answer_swiper = wx.getStorageSync('answer_swiper');
var an_len = answer_swiper.answer ? answer_swiper.answer.length : -1;
if (an_len - n > 1) {
let anserCacheArr = answer_swiper.answer[n + 1].split('-');
this.setData({
active: anserCacheArr[0],
// active: -1,
item: item,
all: len,
current: n + 1
})
} else {
this.setData({
active: -1,
item: item,
all: len,
current: n + 1
})
}
} else if (n == len) {} else {
}
},
nextAnimation: function() {
var that = this;
var _thisWidth = Number(this.data.winW);
var animation = wx.createAnimation({
duration: 400,
timingFunction: 'linear',
})
this.animation = animation
animation.left(-_thisWidth).opacity(0).step();
this.setData({
animationData: animation.export()
})
setTimeout(function() {
var animation1 = wx.createAnimation({
duration: 0,
timingFunction: 'step-start',
})
that.animation = animation1
animation1.left(_thisWidth / 2).opacity(1).step();
that.setData({
animationData: animation1.export()
})
}, 410)
},
prevAnimation: function() {
var that = this;
var _thisWidth = Number(this.data.winW);
var animation = wx.createAnimation({
duration: 300,
timingFunction: 'linear',
})
this.animation = animation
animation.left(_thisWidth * 2).opacity(1).step();
this.setData({
animationData: animation.export()
})
setTimeout(function() {
var animation1 = wx.createAnimation({
duration: 0,
timingFunction: 'step-start',
})
that.animation = animation1
animation1.left(_thisWidth / 2).opacity(1).step();
that.setData({
animationData: animation1.export()
})
}, 310)
},
dealPho(str, host) {
return str.replace("./", host);
},
onShow: function() {
let that = this;
var lb_descript = wx.getStorageSync('lb_descript');
var swiper_arr = wx.getStorageSync('swiper_arr');
if (swiper_arr) {
wx.setNavigationBarTitle({
title: swiper_arr[0].measure_name
});
}
wx.getSystemInfo({
success: (res) => {
that.setData({
winW: res.windowWidth,
})
}
});
var startTime = Date.parse(new Date());
var cha = wx.getStorageSync('chaTime') ? wx.getStorageSync('chaTime') : 0;
wx.setStorageSync('startTime', Number(startTime));
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
var endtTime = Date.parse(new Date());
var startTime = wx.getStorageSync('startTime');
var cha = endtTime - startTime;
var arr = wx.getStorageSync("timeArr");
if (Number(cha) < 1000000040000) {
arr.push(Number(cha))
wx.setStorageSync("timeArr", arr);
}
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
var endtTime = Date.parse(new Date());
var startTime = wx.getStorageSync('startTime');
var cha = endtTime - startTime;
var arr = wx.getStorageSync("timeArr");
if (Number(cha) < 1000000040000) {
arr.push(Number(cha))
wx.setStorageSync("timeArr", arr);
}
},
tijiao: function() {
let that = this;
var lb_descript = wx.getStorageSync('lb_descript');
let userInfo = wx.getStorageSync('userInfoName');
if (lb_descript.id[0] == 523) {
var ans = wx.getStorageSync('answer_swiper')
if (ans.answer[ans.answer.length - 1].length <= 0) {
wx.showToast({
title: '请选择',
icon: 'none',
duration: 1000
});
return;
}
}
if (this.data.flag && !this.disab) {
this.setData({
flag: false
})
wx.showLoading({
title: '上传中...',
mask:true
})
var startTime = wx.getStorageSync('startTime');
var timeArr = wx.getStorageSync('timeArr');
var chaTime = 0;
for (let i = 0; i < timeArr.length; i++) {
if (Number(timeArr) > 1000000040000) {
timeArr[i] = 0;
}
chaTime += timeArr[i]
}
var thisTime = Date.parse(new Date());
var cha = thisTime - startTime + chaTime;
var time = Api.reversalTime(cha)
var user = wx.getStorageSync('user');
var answer = wx.getStorageSync('answer_swiper');
// for (let i = 0; i < answer.score.length; i++) {
// answer.score[i] = answer.score[i].replace(/[\r\n]/g, '');
// }
answer.score = answer.score.join('|');
answer.score = answer.score.replace(/-/g, ',');
var lb_descript = wx.getStorageSync('lb_descript');
var swiper_arr = wx.getStorageSync('swiper_arr');
var lb_tp = wx.getStorageSync('lb_tz')
if (lb_tp == '1') {
var data = {
user_stime: time,
user_answer: answer.score,
answer: answer.score,
user_number: lb_descript.desc.z_openid,
measure_id: lb_descript.id[0],
};
var url = Api.HOST_xinli + 'xinli/index.php/Api/add_res';
} else {
var data = {
user_stime: time,
user_answer: answer.score,
answer: answer.score,
openid: user.openid,
user_number: userInfo.user_number,
user_id: userInfo.user_id,
qrcode: userInfo.qrcode,
measure_id: lb_descript.id[0],
};
var url = Api.HOST_xinli + 'jswszx/index.php/Api/add_res';
}
console.log(data)
data.unitid = lb_descript.desc.unitid;
var uploadData = setTimeout(function() {
wx.hideLoading()
wx.showToast({
icon: 'none',
title: '您当前的网络不稳定,请检查网络重新提交',
duration: 2000
})
that.setData({
flag: true
})
}, 5000)
Api.fetchPostN(url, data, (err, res) => {
clearTimeout(uploadData)
if (Number(res) == 0) {
Api.alert("提交失败,请重新提交。")
return;
}
var swiper_arr = wx.getStorageSync('swiper_arr');
var data1 = {};
var urls = Api.HOST + 'index.php?s=Home/del_vip';
var ti_title = swiper_arr[0].measure_name;
var lb_descript = wx.getStorageSync("lb_descript");
data1.user_id = userInfo.user_id;
data1.g_id = userInfo.qrcode;
data1.g_time = lb_descript.desc.g_time || lb_descript.desc.time;
data1.measure_name = ti_title;
data1.res_id = res;
data1.user_stime = time;
var lb_tz = wx.getStorageSync('lb_tz');
if (lb_tz == '1') {
var unitid = wx.getStorageSync("unitid");
data1.unitid = unitid;
data1.z_openid = lb_descript.desc.z_openid;
data1.t_openid = lb_descript.desc.t_openid;
data1.openid = lb_descript.desc.z_openid;
data1.is_type = 0;
data1.measure_id = lb_descript.id[0];
} else {
data1.z_openid = user.openid;
data1.t_openid = lb_descript.desc.t_openid;
data1.openid = user.openid;
data1.is_type = 1;
data1.unitid = lb_descript.desc.unitid;
data1.measure_id = lb_descript.id[0];
}
Api.fetchPost(urls, data1, (err, res) => {
if (err) {
that.setData({
flag: true
})
}
that.setData({
flag: true
})
if (res.key == 1 || res.key == 0) {
wx.removeStorageSync('answer_swiper')
wx.removeStorageSync('swiper_arr')
wx.removeStorageSync('chaTime')
wx.removeStorageSync('endTime')
wx.removeStorageSync('startTime')
wx.removeStorageSync('timeArr')
wx.removeStorageSync('lb_swiper_con')
wx.hideLoading()
}
// var timer = setTimeout(function () {
// wx.showLoading({
// title: '连接超时',
// })
// }, 8000)
if (res.key == 1) {
// clearTimeout(timer)
wx.showToast({
title: '还剩' + res.val + '个量表',
icon: 'success',
duration: 2000
})
setTimeout(function() {
var lb_tz = wx.getStorageSync('lb_tz');
if (lb_tz == '1') {
wx.reLaunch({
url: '/pages/info1/info1?otype=1&otype1=1&g_id=' + userInfo.qrcode,
success: function() {
that.setData({
flag: true
})
}
})
} else {
wx.reLaunch({
url: '/pages/info/info?otype=1&otype1=1&g_id=' + userInfo.qrcode,
success: function() {
that.setData({
flag: true
})
}
})
}
}, 2000)
} else if (res.key == 0) {
// clearTimeout(timer)
wx.showToast({
title: '上传成功',
icon: 'success',
duration: 2000
})
setTimeout(function() {
wx.removeStorageSync('tplbDetail')
wx.removeStorageSync('weiLb')
// wx.reLaunch({
// // url: '/pages/end/end?lbtype=-1',
// url: '/pages/record/record',
// success: function() {
// that.setData({
// flag: true
// })
// wx.removeStorageSync('lb_descript')
// }
// })
wx.reLaunch({
url: '/pages/index/index',
success: function () {
that.setData({
flag: true
})
wx.removeStorageSync('lb_descript')
}
})
}, 2000)
}
})
})
}
},
onReady: function() {
let that = this;
// setTimeout(function () {
wx.getSystemInfo({
success: (res) => {
if (/^iPhone X.*/i.test(res.model)) {
that.setData({
iPhoneX: true,
winH: res.windowHeight - 118
})
} else {
that.setData({
iPhoneX: false,
winH: res.windowHeight - 118
})
}
}
});
// }, 600)
},
})
\ No newline at end of file
{
"enablePullDownRefresh": false
}
\ No newline at end of file
<view class="warp" style="height:{{winH}}px;">
<view class="con">
<text class='con-first'>{{lifeName[item.type - 1]}}</text>
<text style='margin-top: 10rpx;'>{{item.con}}({{eName}})</text>
</view>
<block wx:for="{{item.answer}}" wx:for-item="itemName" wx:for-index="index1" wx:key="*this">
<block wx:if='{{true}}'>
<view class=" answer {{active == index1?'s-active':''}}" bindtap='selectData' data-index="{{index1}}"
data-answer="{{itemName}}" data-score="{{item.score[index1]}}" data-record="{{current}}" data-btnflag='0'>
<text>{{itemName}}</text>
</view>
</block>
</block>
</view>
<block wx:if='{{true}}'>
<view class="btn {{current<all-1?'show':'hid'}}">
<view class="menuebtn1 {{current>0?'menuebtn-active':''}}" bindtap='prev'>上一题</view>
</view>
<view class="btn {{all==current+1?'show':'hid'}}">
<view class="menuebtn {{current>0?'menuebtn-active':''}}" bindtap='prev'>上一题</view>
<view class="menuebtn {{disab?'show':'hid'}} " style='margin-left:40rpx;'>提交</view>
<view class="menuebtn menuebtn-active {{disab?'hid':'show'}} " style='margin-left:40rpx;' bindtap='tijiao'>提交</view>
</view>
</block>
<view class='all-item'>
<text>{{current+1}}/{{all}}</text>
</view>
\ No newline at end of file
page {
background-image: url(https://static.xiaodongai.com/xiaodong_yiyuan/kongtian/Uploads/Picture/uid2/member/20180129/5a6ee68692cd8.png);
background-size: 36rpx 36rpx;
}
.line_top {
background: #cecece;
}
.warp {
width: 690rpx;
margin: 29rpx auto;
/* height: 500rpx; */
border: 0.5px solid #e3e3e3;
/* border-bottom: *//* border-radius: 18rpx; */
background: #fff;
overflow: hidden;
}
.con {
padding: 40rpx 30rpx;
border-bottom: 0.5px solid #e3e3e3;
}
/* .con text:nth-child(1){
color: #2684ff;
display: block;
font-family: "PingFang-SC-Medium";
font-size: 28rpx;
letter-spacing: 5rpx;
} */
.con text {
color: #179259;
display: block;
/* margin-top: 30rpx; */
font-family: "PingFang-SC-Bold";
font-size: 36rpx;
letter-spacing: 5rpx;
font-weight: bold;
}
.answer {
min-height: 30rpx;
width: 630rpx;
border-bottom: 0.5px solid #e3e3e3;
padding: 30rpx 30rpx;
font-family: "PingFang-SC-Bold";
font-size: 32rpx;
color: #666;
font-weight: bold;
display: table;
}
.shehui{
width: 345rpx;
/* border-left: 0.5px solid #e3e3e3; */
/* box-sizing: border-box; */
float: left;
}
.answer1 {
min-height: 30rpx;
width: 285rpx;
border-bottom: 0.5px solid #e3e3e3;
padding: 30rpx 30rpx;
font-family: "PingFang-SC-Bold";
font-size: 32rpx;
color: #666;
font-weight: bold;
display: table;
text-align: center;
/* border-left: 0.5px solid #e3e3e3; */
/* box-sizing: border-box; */
float: left;
}
.warp .answer:last-child {
/* border-bottom: none; */
}
.answer text {
vertical-align: middle;
display: table-cell;
}
.answer1 text {
vertical-align: middle;
display: table-cell;
}
.s-active {
background: #179259;
color: #fff;
}
.btn {
height: 88rpx;
width: 690rpx;
/* margin: 30rpx auto; *//* margin-top: 30rpx; */
position: fixed;
left: 50%;
margin-left: -345rpx;
bottom: 80rpx;
}
.menuebtn {
width: 325rpx;
/* width: 295rpx; */
height: 88rpx;
line-height: 88rpx;
text-align: center;
float: left;
background: #eaeaea;
border: 1px solid #e3e3e3;
/* border-radius: 18rpx; */
box-sizing: border-box;
font-family: "PingFang-SC-Medium";
font-size: 34rpx;
color: #999;
/* opacity: 0.9; */
}
.menuebtn1 {
height: 88rpx;
width: 690rpx;
line-height: 88rpx;
text-align: center;
background: #eaeaea;
border: 1px solid #e3e3e3;
box-sizing: border-box;
font-family: "PingFang-SC-Medium";
font-size: 34rpx;
color: #999;
}
.menuebtn-active {
background: #2684ff;
color: #fff;
border: none;
opacity: 1;
}
.all-item {
position: fixed;
bottom: 20rpx;
width: 100%;
text-align: center;
font-size: 30rpx;
color: #333;
}
.pizibao {
width: 582rpx;
height: 90rpx;
margin: 300rpx auto;
}
.p_time {
width: 220rpx;
height: 88rpx;
float: left;
}
.p_time input {
display: block;
width: 150rpx;
height: 88rpx;
text-align: center;
font-size: 34rpx;
float: left;
border: 0.5px solid #cecece;
border-radius: 8rpx;
outline: none;
}
.p_time text {
display: block;
font-size: 30rpx;
height: 88rpx;
width: 30rpx;
margin-left: 20rpx;
float: left;
line-height: 88rpx;
color: #666;
}
.p_btn {
height: 88rpx;
width: 120rpx;
text-align: center;
line-height: 88rpx;
float: left;
margin-left: 20rpx;
background: #2684ff;
color: #fff;
border-radius: 8rpx;
font-size: 30rpx;
}
.con .con-first{
/* text-align: center; */
font-size: 28rpx;
color: #666;
/* line-height: 46rpx; */
}
.con-title{
text-align: right;
}
\ No newline at end of file
......@@ -207,7 +207,7 @@ Page({
})
},
goIntro() {
wx.showLoading();
wx.showLoading({mask:true});
var that = this;
wx.navigateTo({
url: '/pages/doctorIntro/doctorIntro?t_unionid=' + that.data.t_unionid + '&t_unitid=' + that.data.t_unitid + '&t_openid=' + that.data.t_openid,
......
......@@ -75,7 +75,7 @@ Page({
},
///特色门诊
site: function (e) {
wx.showLoading()
wx.showLoading({mask:true})
var that = this
if (e.currentTarget.dataset.door) {
that.nav('door', e.currentTarget.dataset.door)
......@@ -104,7 +104,7 @@ Page({
},
//医生详情
doctorInfo: function (e) {
wx.showLoading()
wx.showLoading({mask:true})
//医生详情页
wx.navigateTo({
url: '/pages/docuterInfo/docuterInfo?t_unionid=' + e.currentTarget.dataset.unionid + '&t_unitid=' + e.currentTarget.dataset.unitid + '&t_openid=' + e.currentTarget.dataset.openid,
......
......@@ -265,16 +265,15 @@ Page({
inquiry: '', //1二维码,2聊天页面心理体检
inquiry_id: '', //心理体检量表ID
viewrice: true, //判断是否显示量表价格
dropDown:8,//多少条显示展开折叠数
animDropDown:{},//动效
dropDown: 8, //多少条显示展开折叠数
animDropDown: {}, //动效
},
onLoad: function (options) {
var that = this;
console.log('options',options);
/** otype=1 第一次未答完题进行第二题 || 从报告列表跳转 else 扫码过来 */
that.data.otype = options.otype ? options.otype : -1;
if (options.otype == 1) {
wx.setStorageSync('qrcode_id', options.g_id);
wx.setStorageSync('qrcode_id', options.g_id ? options.g_id : 0);
} else if (options.otype != 0) {
var scene = decodeURIComponent(options.scene)
wx.setStorageSync('qrcode_id', scene)
......@@ -292,7 +291,8 @@ Page({
});
wx.showLoading({
title: '正在加载',
})
mask:true
});
},
onShow: function () {
let that = this;
......@@ -348,12 +348,17 @@ Page({
}
wx.setStorageSync('user', res)
if (otype == 1) {
var info = wx.getStorageSync('weiLb');
//不需要支付的量表
let info = wx.getStorageSync('weiLb');
that.loadItem(info);
} else {
var scene = decodeURIComponent(that.data.scene)
//需要支付的量表 inquiry:2 im开具的量表 :1 二维码扫码
let scene = that.data.inquiry == 2 ? decodeURIComponent(that.data.inquiry_id) : decodeURIComponent(that.data.scene);
wx.setStorageSync('qrcode_id', scene)
that.loadScene(scene); // 加载二维码场景
if (that.data.inquiry == 2)
that.loadIMScene(scene); // 加载二维码场景
else
that.loadScene(scene); // 加载二维码场景
}
that.loadData(); // 获取个人信息
wx.setNavigationBarTitle({
......@@ -421,6 +426,7 @@ Page({
*/
loadScene(scene) {
let that = this;
wx.removeStorageSync('roomService');
var user = wx.getStorageSync('user');
var data = {
z_openid: user.openid,
......@@ -464,7 +470,7 @@ Page({
up_money: res.money,
uo_price: res.price
})
} else if (res.unitid == '4725' || res.unitid == '5') {
} else if (res.unitid == '4725') {
wx.hideLoading()
that.setData({
show: 2,
......@@ -489,14 +495,13 @@ Page({
})
}
wx.setStorageSync('weiLb', res)
// 是否有未做完的题 res.characters_id 为null 时表示没有扫码后未做的量表
// 是否有未做完的题 res.characters_id 为null 时表示没有扫码后未做的量表;
// res.record_id = res.characters_id ?res.characters_id:-1;
if (res.characters_id) {
res.record_id = res.characters_id
} else {
res.record_id = -1;
}
if (Number(res.type) == 3) {
// 二维码已失效
Util.alert('您扫的二维码已经失效!', function () {
......@@ -538,7 +543,6 @@ Page({
title: '支付检测费' //修改title
})
wx.setStorageSync('payInfo', json)
} else { // 不需要免费、体验金
var user = wx.getStorageSync('user');
var data1 = {};
......@@ -572,6 +576,82 @@ Page({
}
})
},
/**加载IM量表场景 */
loadIMScene(scene) {
let that = this;
var user = wx.getStorageSync('user');
var data = {
z_openid: user.openid,
g_id: scene
};
//加载二维码
Service.loadIMScene(data).then((res) => {
let data = res.data;
that.setData({
t_openid: data.t_openid,
t_unionid: data.t_unionid,
viewrice: false, //不显示单个量表价格
})
/**
* 0 需要支付
* 1 已支付
* -1 已做完
*/
switch (res.code) {
case 0:
//0 需要支付
wx.hideLoading()
that.setData({
show: 0,
marketstatus: data.marketstatus,
showLoading: true,
// zhifu
measure_name: data.measure_name,
up_money: data.money,
uo_price: data.price
})
wx.setStorageSync('weiLb', data)
let json = {
res: data,
e: scene,
otype: 0
}
// that.upPayBtn(json);
that.setData({
payModal: true
})
wx.setNavigationBarTitle({
title: '支付检测费' //修改title
})
wx.setStorageSync('payInfo', json)
break;
case 1:
// 1 已支付
wx.hideLoading()
that.setData({
show: 0,
marketstatus: data.marketstatus,
showLoading: true,
// zhifu
measure_name: data.measure_name,
up_money: data.money,
uo_price: data.price
})
wx.setStorageSync('weiLb', data)
that.loadItem(data, scene);
break;
case -1:
// -1 已做完
wx.hideLoading()
Util.alert(res.msg, function () {
wx.switchTab({
url: '/pages/index/index',
})
});
return;
}
})
},
getUnitid: function (e) {
let that = this
var allData = wx.getStorageSync('data');
......@@ -592,20 +672,20 @@ Page({
* 量表数量超过dropdown数量显示'展开'/'收起'
* @param {*} e
*/
dropdown(e){
dropdown(e) {
console.log(e.currentTarget.dataset.dropdown);
let dropDown= e.currentTarget.dataset.dropdown;
let dropDown = e.currentTarget.dataset.dropdown;
this.setData({
dropDown:dropDown
dropDown: dropDown
})
// //点击弹出
// if (dropDown==8) {
// //缩回动画
// this.popp();
// } else {
// //弹出动画
// this.takeback();
// }
// //点击弹出
// if (dropDown==8) {
// //缩回动画
// this.popp();
// } else {
// //弹出动画
// this.takeback();
// }
},
positionNational: function (a, e) {
var arr = a;
......@@ -624,7 +704,7 @@ Page({
upPayBtn: Util.debouce(function () {
var payInfo = wx.getStorageSync('payInfo')
wx.showLoading({
title: '',
mask:true
})
var that = this;
if (that.data.btnFlag) {
......@@ -788,7 +868,6 @@ Page({
time: e.time,
}
that.payCsX(_json)
} else {
Util.alert('支付失败', function () {
wx.reLaunch({
......@@ -818,7 +897,7 @@ Page({
data.gold = e.money;
// data.gold = 0.01;
data.g_id = g_id;
data.type = '1'; //量表1 服务2 药方3
data.type = that.data.inquiry == 1 ? '1' : '4'; //量表1 服务2 药方3 im检测4
// 添加参数
var url = Api.HOST + 'wechatIteration.php?s=Home/payrecord';
Api.fetchPost(url, data, (err, res) => {
......@@ -1003,7 +1082,7 @@ Page({
marketstatus: 4,
showLoading: true
})
} else if (weiLb.unitid == '4725' || weiLb.unitid == '5') {
} else if (weiLb.unitid == '4725') {
this.setData({
show: 2,
marketstatus: 4,
......@@ -1030,9 +1109,9 @@ Page({
if (res[0]) {
that.setData({
lb_id: res[0]
})
// 保存 信息 用于判断是不是同一个量表
var lb_descript = {
})
// 保存 信息 用于判断是不是同一个量表
var lb_descript = {
id: res,
desc: e
}
......@@ -1168,6 +1247,7 @@ Page({
}, 5000)
wx.showLoading({
title: '请稍后',
mask:true
})
// 改变按钮状态
this.setData({
......@@ -1184,6 +1264,7 @@ Page({
clearTimeout(timer1)
// 个人信息提交成功 返回ret== 1
if (res.code == 1) {
console.log("that.data.lb_id",that.data.lb_id)
// otype = 0 从首页进入需要支付 现在已移除
// otype = 1 从报告页面进入 不需要支付
// otype 不存在 = -1 扫码进入
......@@ -1203,7 +1284,7 @@ Page({
}, 500)
}
})
} else if (that.data.lb_tz == '3') {
} else if (Number(that.data.lb_id) == 60) {
// 瑞文
wx.navigateTo({
url: '/pages/dati03/dati03',
......@@ -1216,6 +1297,19 @@ Page({
}, 500)
}
})
} else if (Number(that.data.lb_id) == 145) {
// 生活事件量表
wx.navigateTo({
url: '/pages/dati05/dati05',
success: function () {
wx.hideLoading()
setTimeout(function () {
that.setData({
payInfo: true
})
}, 500)
}
})
} else {
// 进入普通的答题页面
if (that.data.monitor == 1) {
......@@ -1802,6 +1896,7 @@ Page({
var urlt = Api.HOST + 'appIteration.php?s=Home/stinfo';
wx.showLoading({
title: '正在上传',
mask:true
})
var uploadData = setTimeout(function () {
wx.hideLoading()
......@@ -1923,6 +2018,7 @@ Page({
var urlt = Api.HOST + 'appIteration.php?s=Home/stinfo';
wx.showLoading({
title: '正在上传',
mask:true
})
var uploadData = setTimeout(function () {
wx.hideLoading()
......
......@@ -45,6 +45,7 @@ Page({
var loadPhoto = setTimeout(function(){
wx.showLoading({
title: '加载中...',
mask:true
})
},1000)
// 咨询师的openID 和时间
......@@ -234,6 +235,7 @@ Page({
}, 5000)
wx.showLoading({
title: '请稍后',
mask:true
})
this.setData({ payInfo: false })
Api.fetchPost(urlt, data, (err, res) => {
......@@ -249,6 +251,16 @@ Page({
}, 500)
}
})
} else if (that.data.lb_tz == '145') {
// 生活事件量表
wx.navigateTo({
url: '/pages/dati05/dati05?tplb=1',
success: function(){
setTimeout(function(){
that.setData({payInfo:true})
},500)
}
})
} else if (that.data.lb_tz == '0') {
wx.navigateTo({
url: '/pages/dati04/dati04?tplb=1',
......
......@@ -475,6 +475,14 @@ Page({
}
})
},
/**
*
*/
hideModal() {
this.setData({
errshow: false,
})
},
//登陆后组件回调方法刷新当前页面
_refreshEvent() {
console.log("刷新");
......
......@@ -22,7 +22,7 @@
<view class="sf-top">
<view class="sf-title">
<image class="sf-img" src="/images/sf.png"></image>
<text class="size-0 ml-15">顺丰配送 16:00前下单当日发货。平台承诺100%正品,假一罚十。</text>
<text class="size-0 ml-15">顺丰配送 19:00前下单当日发货。平台承诺100%正品,假一罚十。</text>
</view>
</view>
</view>
......
......@@ -167,8 +167,8 @@ Page({
//搜素确认
search (page) {
let that = this
wx.showLoading({
title: '加载中',
that.setData({
showview: false
})
let data = {}
data.page = page // 页数
......@@ -198,7 +198,6 @@ Page({
showview: true
})
}
wx.hideLoading({})
})
},
//头部筛选 add by lq datetime 2020-4-21
......@@ -501,7 +500,7 @@ Page({
},
//详情
doctorInfo: function (e) {
wx.showLoading();
wx.showLoading({mask:true});
wx.navigateTo({
url: '/pages/docuterInfo/docuterInfo?t_unionid=' + e.currentTarget.dataset.unionid + '&t_unitid=' + e.currentTarget.dataset.unitid + '&t_openid=' + e.currentTarget.dataset.openid,
})
......
......@@ -34,8 +34,7 @@
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"skeletonGenerateFilesWithoutConfirm": true
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.12.2",
......@@ -125,6 +124,12 @@
"pathName": "packageA/logistics/logistics",
"query": "id=978&num=SF1334982552976&tel=17801017172&ordernumber=20210106215421&img=https://www.xiaodongai.com/xiaodongai/ceshi/Uploads/Drug/2020-04-11/5e916ffe83129.jpg&status=3&address={\"id\":7343,\"openid\":\"oYQX40BtoLUP4sbDt8iKxO-CcQ74\",\"unionid\":\"oHhp80YULOSNxEltQNTTkRqjzNrI\",\"name\":\"小孔5\",\"phone\":\"17801017172\",\"take_over\":\"北京市北京市通州区\",\"detail_address\":\"北京市北京市通州区小懂科技\",\"create_time\":\"1610531672\",\"update_time\":null,\"status\":0,\"is_default\":0,\"province\":\"北京市\",\"city\":\"北京市\",\"area\":\"通州区\"}&com=",
"scene": 1014
},
{
"name": "packageA/productOrderInfo/productOrderInfo",
"pathName": "packageA/productOrderInfo/productOrderInfo",
"query": "scene=33610",
"scene": null
}
]
}
......
......@@ -2,6 +2,8 @@
var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli';
// var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';
var HOST_xinli_lb = 'https://static.xiaodongai.com/';
// const HOST= "https://test-wechat.xiaodongai.com/";
var HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// var HOST = 'https://www.xiaodongai.com/xiaodongai/ceshi/';//测试库
var HOST_P = "http://static.xiaodongai.com/xiaodongai/";
......
'use strict';
var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli';
const HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli';
// var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';
var HOST_xinli_lb = 'https://static.xiaodongai.com/';
var HOST_P = "https://static.xiaodongai.com/xiaodongai/";
var HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/";
const HOST_xinli_lb = 'https://static.xiaodongai.com/';
const HOST_P = "https://static.xiaodongai.com/xiaodongai/";
const HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/";
var HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// const HOST= "https://test-wechat.xiaodongai.com/";
const HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
// var HOST = 'https://www.xiaodongai.com/xiaodongai/ceshi/';//测试库
// var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/';//本地
// var HOST = 'http://localhost/xiaodongai/kongtian/';//本地
var HOST_info = 'https://vivshi.com/xiaodongai/kongtian/'; // 弃用
const HOST_info = 'https://vivshi.com/xiaodongai/kongtian/'; // 弃用
var HOST_yiyuan="https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/apitest/";//互联网医院测试
const HOST_yiyuan="https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/apitest/";//互联网医院测试
// var HOST_yiyuan="https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/api/";//互联网医院正式
const url = {
getUserSig: HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID
......@@ -36,6 +38,7 @@ const url = {
acceptFollowUp:HOST+ "wechatIteration.php?s=/Inquisition/jieshou",//接受预约
getPayStatus:HOST+"wechatIteration.php?s=/Prescription/drug_order_list_payresult",//获取药方支付状态
getChatMsgLog:HOST+"wechatIteration.php?s=/Im/chat_message_logging",//获取历史记录
getIsAnswer:HOST+"wechatIteration.php?s=home/testing_gauge",//获取当前量表是否已答
/**end */
/**服务设置 begin*/
myServerList:HOST+"wechatIteration.php?s=/InquiryUser/inquiryImList",//我的服务记录
......@@ -71,14 +74,15 @@ const url = {
drogOrderDetail:HOST + "wechatIteration.php?s=/Drugorder/prescription_order_detail",//药品订单详情
/**end */
/**公共 begin*/
isReport: HOST + "wechatIteration.php?s=/Inquisition/check_istype", //检测是否允许查看报告
forcedUpdate: HOST + 'wechatIteration.php?s=/Public/wechatVer', //强制更新
getWxUserPhone: HOST + "wechatIteration.php?s=/InquiryUser/getUserPhone", //微信授权获取用户手机号
getCode: HOST + "wechatIteration.php?s=/Home/getCode", //获取验证码
isReport:HOST + "wechatIteration.php?s=/Inquisition/check_istype", //检测是否允许查看报告
forcedUpdate:HOST + 'wechatIteration.php?s=/Public/wechatVer', //强制更新
getWxUserPhone:HOST + "wechatIteration.php?s=/InquiryUser/getUserPhone", //微信授权获取用户手机号
getCode:HOST + "wechatIteration.php?s=/Home/getCode", //获取验证码
checkCard:HOST_yiyuan+'Idcard/checkCard',//验证身份证与姓名
/**end */
/**量表 */
loadScene:HOST+"wechatIteration.php?s=/Measure/is_price",//判断量表二维码场景
loadIMScene:HOST+"wechatIteration.php?s=/Measure/is_price_to",//判断IM量表支付场景
getTestInfo:HOST+"wechatIteration.php?s=/InquiryUser/findInquiry",//获取检测信息
/**end */
/**用户购买问诊信息 begin*/
......@@ -113,7 +117,7 @@ const url = {
screenDoctor: HOST + "wechatIteration.php?s=/personal/screenDoctor", //查询医生数据
/**end */
getChatDoctor: HOST + "wechatIteration.php?s=/Inquisition/aptitude",
getDealDetails: HOST + "wechatIteration.php?s=/Inquisition/patient_details",
getDealDetails: HOST + "wechatIteration.php?s=/Inquisition/patient_details",//支付记录
getReportList: HOST + "wechatIteration.php?s=/Home/testresult",
goSetTel: HOST + "wechatIteration.php?s=/Index/getPhone",
getServiceList: HOST + "wechatIteration.php?s=/InquiryUser/chat_inquiry",//服务记录集合
......
let lifeEventName = [
'事件发生时间',
'该事件发生次数为',
'该事件持续时间为',
'性质',
'精神影响程度',
'影响持续时间',
];
let lifeArr = {
happenTimeArr: {
title: '事件发生时间',
name: ['未发生', '一年前', '一年内', '长期性'],
score: [0, 0, 1, 2]
},
happenNumArr: {
name: ['1次', '2次', '3次', '4次'],
score: [1, 2, 3, 4],
title:'该事件发生次数为'
},
continusTimeArr : {
name: ['半年之内', '半年以上'],
score: [1, 2],
title: '该事件持续时间为'
},
natureArr: {
name: ['好事', '坏事'],
score: [1, 2],
title: '性质'
},
spiritDegreeArr: {
name: ['无影响', '轻度', '中度', '重度', '极重'],
score: [0, 1, 2, 3, 4],
title:'精神影响程度'
},
impactConTimeArr: {
name: ['三月内', '半年内', '一年内', '一年以上'],
score: [1, 2, 3, 4],
title:'影响持续时间'
}
}
let lifeName = [
'第一部分(家庭有关问题)',
'第二部分(工作学习中的问题)',
'第三部分(社交与其他问题)'
]
module.exports = {
lifeEventName: lifeEventName,
lifeName: lifeName,
lifeArr: lifeArr
}
\ No newline at end of file
......@@ -450,6 +450,10 @@ function loadScene(param) {
var loadSceneUrl = config.url.loadScene;
return wxRequest.postRequest(loadSceneUrl, param);
}
function loadIMScene(param) {
var loadIMSceneUrl = config.url.loadIMScene;
return wxRequest.postRequest(loadIMSceneUrl, param);
}
/**
* 用户购买服务状态
*/
......@@ -596,6 +600,14 @@ function drogOrderDetail(param) {
var drogOrderDetailUrl = config.url.drogOrderDetail;
return wxRequest.postRequest(drogOrderDetailUrl, param);
}
/**
* 是否答题
* @param {*} param
*/
function getIsAnswer(param){
var getIsAnswerUrl = config.url.getIsAnswer;
return wxRequest.postRequest(getIsAnswerUrl, param);
}
function getBusStopListPromise(sid, stopType) {
var getStopListUrl = config.url.getBusStopList;
......@@ -666,6 +678,7 @@ module.exports = {
delFriend: delFriend, //删除好友
appAddFriend: appAddFriend, //app.js添加好友
loadScene: loadScene, //加载量表二维码场景
loadIMScene:loadIMScene,//加载IM量表支付场景
seeBuyStaus: seeBuyStaus, //用户购买服务状态
endInquiry: endInquiry, //同意结束服务
refuseInquiry: refuseInquiry, //拒绝结束服务
......@@ -692,4 +705,5 @@ module.exports = {
logisticsInfo: logisticsInfo, //物流信息
firendAfterRoom: firendAfterRoom, //成功加好友之后选择身份信息进入群聊房间
drogOrderDetail: drogOrderDetail, //药品订单详情
getIsAnswer:getIsAnswer,//是否答题
}
\ No newline at end of file
......@@ -117,6 +117,7 @@ function KICKED_OUT(event){
if (res.confirm) {
wx.showLoading({
title: '正在登录',
mask:true
})
getApp().getUserInfo(function (cb) {
if (!Util.isEmpty(cb)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment