Commit fcd2910c by liuquan

A:新增IM聊天付费量表

U:修改患者用户信息必填
U:修改处方复核信息
parent 767a53df
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
nav: true, //控制头部医师显示 nav: true, //控制头部医师显示
scrollHeight: "100%", //聊天内容显示 scrollHeight: "100%", //聊天内容显示
adjust: true, adjust: true,
keyHeight: 0,//输入框高度 keyHeight: 0, //输入框高度
scrollTop: 0, scrollTop: 0,
reportShow: true, //发送报告内容框 reportShow: true, //发送报告内容框
iPhoneX: false, iPhoneX: false,
...@@ -50,7 +50,7 @@ Page({ ...@@ -50,7 +50,7 @@ Page({
msgContent: '', //默认消息文字 msgContent: '', //默认消息文字
isRecord: false, //录音显示 isRecord: false, //录音显示
isRecording: false, //是否正在录音 isRecording: false, //是否正在录音
isTouch:false, //防止录音单次点击出现bug isTouch: false, //防止录音单次点击出现bug
canSend: true, canSend: true,
title: "正在录音", title: "正在录音",
audioSave: '', //当前播放音频路径 audioSave: '', //当前播放音频路径
...@@ -218,7 +218,7 @@ Page({ ...@@ -218,7 +218,7 @@ Page({
wx.setStorageSync('user', res) wx.setStorageSync('user', res)
return Service.getUserData(res.openid) return Service.getUserData(res.openid)
}).then((res) => { }).then((res) => {
console.log("res",res) console.log("res", res)
let timers = setInterval(() => { let timers = setInterval(() => {
console.log("App.globalData.isLogin", App.globalData.isLogin); console.log("App.globalData.isLogin", App.globalData.isLogin);
if (App.globalData.isLogin) { if (App.globalData.isLogin) {
...@@ -226,8 +226,8 @@ Page({ ...@@ -226,8 +226,8 @@ Page({
that.getMessageList(that.data.groupID); //打开某个会话时,第一次拉取消息列表和获取群信息 that.getMessageList(that.data.groupID); //打开某个会话时,第一次拉取消息列表和获取群信息
} }
}, 500) }, 500)
wx.setStorageSync('data', res) wx.setStorageSync('data', res)
that.setMessageRead(); that.setMessageRead();
}).catch(error => { }).catch(error => {
console.error("我的服务登录", error) console.error("我的服务登录", error)
}) })
...@@ -797,15 +797,15 @@ Page({ ...@@ -797,15 +797,15 @@ Page({
/** /**
* 医生更多服务 * 医生更多服务
*/ */
moreService:Util.debouce(function() { moreService: Util.debouce(function () {
var that = this; 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; return;
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/docuterInfo/docuterInfo?t_unionid=' + that.data.t_unionid + '&t_unitid=' + that.data.doctorunitid + '&t_openid=' + that.data.t_openid, 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获取焦点 //input获取焦点
inputFoucus: function (e) { inputFoucus: function (e) {
var that = this; var that = this;
...@@ -875,14 +875,14 @@ Page({ ...@@ -875,14 +875,14 @@ Page({
/** /**
* 聊天记录 * 聊天记录
*/ */
chatLog:Util.debouce(function () { chatLog: Util.debouce(function () {
wx.showLoading(); wx.showLoading();
wx.navigateTo({ wx.navigateTo({
url: '/packageA/chattingRecords/chattingRecords?id=' + this.data.orderId + '&doctorimage=' + this.data.doctorimage, url: '/packageA/chattingRecords/chattingRecords?id=' + this.data.orderId + '&doctorimage=' + this.data.doctorimage,
}) })
wx.setStorageSync('list', this.data.messageList); wx.setStorageSync('list', this.data.messageList);
wx.hideLoading(); wx.hideLoading();
},1000,true), }, 1000, true),
scroll: function () {}, scroll: function () {},
// ______ __ __ ______ __ __ // ______ __ __ ______ __ __
// | \| \ / \ | \ | \ | \ // | \| \ / \ | \ | \ | \
...@@ -944,10 +944,10 @@ Page({ ...@@ -944,10 +944,10 @@ Page({
let msgList = Util.deepClone(imResponse.data.messageList); let msgList = Util.deepClone(imResponse.data.messageList);
let messageList = that.messageListParser(msgList); let messageList = that.messageListParser(msgList);
let length = Number(messageList.length - 1); let length = Number(messageList.length - 1);
console.log("length",length) console.log("length", length)
if (length >= 0) { if (length >= 0) {
that.data.lastShowTimeStamp = messageList[length].time; 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") { if (messageList[length].payload.data == "InitiateEndService") {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
...@@ -1091,7 +1091,7 @@ Page({ ...@@ -1091,7 +1091,7 @@ Page({
if (item.type == "TIMCustomElem") { if (item.type == "TIMCustomElem") {
item.payload.data = JSON.parse(item.payload.data) item.payload.data = JSON.parse(item.payload.data)
let type = item.payload.data.type; 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.description = item.payload.data.content;
item.payload.data = item.payload.data.type; 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') {
...@@ -1220,7 +1220,7 @@ Page({ ...@@ -1220,7 +1220,7 @@ Page({
to: that.data.groupID, to: that.data.groupID,
conversationType: TIM.TYPES.CONV_GROUP, conversationType: TIM.TYPES.CONV_GROUP,
payload: { payload: {
file: res file: res//文件对象
}, },
//临时图片路径 //临时图片路径
path: res.tempFilePaths[0], path: res.tempFilePaths[0],
...@@ -1248,7 +1248,7 @@ Page({ ...@@ -1248,7 +1248,7 @@ Page({
handleLongPress(e) { handleLongPress(e) {
var that = this; var that = this;
//当前是按下状态 //当前是按下状态
that.data.isTouch=true; that.data.isTouch = true;
console.log("手指按下") console.log("手指按下")
that.data.startPoint = e.touches[0]; that.data.startPoint = e.touches[0];
if (!this.data.payFlag) { if (!this.data.payFlag) {
...@@ -1286,7 +1286,7 @@ Page({ ...@@ -1286,7 +1286,7 @@ Page({
handleTouchEnd() { handleTouchEnd() {
console.log("手指离开") console.log("手指离开")
//当前是手指离开状态 //当前是手指离开状态
this.data.isTouch=false; this.data.isTouch = false;
wx.hideLoading() wx.hideLoading()
recorderManager.stop() recorderManager.stop()
this.setData({ this.setData({
...@@ -1321,14 +1321,14 @@ Page({ ...@@ -1321,14 +1321,14 @@ Page({
} else if (auth === true) { // 用户已经同意授权 } else if (auth === true) { // 用户已经同意授权
// console.log('this.data.isTouch',this.data.isTouch) // console.log('this.data.isTouch',this.data.isTouch)
//判断当前按压状态,是按下就执行录音 //判断当前按压状态,是按下就执行录音
if(this.data.isTouch){ if (this.data.isTouch) {
that.setData({ that.setData({
canSend: true, canSend: true,
isRecording: true, isRecording: true,
title: "正在录音" title: "正在录音"
}) })
recorderManager.start(recordOptions) recorderManager.start(recordOptions)
}else{ } else {
//否则提示"说话时间短" //否则提示"说话时间短"
that.setData({ that.setData({
errorToptips: '说话时间太短' errorToptips: '说话时间太短'
...@@ -1512,22 +1512,35 @@ Page({ ...@@ -1512,22 +1512,35 @@ Page({
wx.showLoading(); wx.showLoading();
let data = {} let data = {}
data.inquiry_id = e.currentTarget.dataset.id; data.inquiry_id = e.currentTarget.dataset.id;
Service.getTestInfo(data).then((res) => { /**
console.log("getCheckup", res) * @todo 修改im发生量表收费
if (res.code == 1) { */
var data = { let status= e.currentTarget.dataset.status?e.currentTarget.dataset.status:1;
t_openid: res.data.openid, let url;
g_time: res.data.time, if (status == 0) {
marketstatus: res.data.marketstatus, url=`/pages/info/info?inquiry=2&inquiry_id=${e.currentTarget.dataset.id}`;
unitid: res.data.unitid, wx.reLaunch({
url: url,
})
} else {
url= `/pages/info/info?otype=1&inquiry=2&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,
}
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(); wx.hideLoading();
}, 1000, true), }, 1000, true),
//微信获取手机号 //微信获取手机号
...@@ -1585,7 +1598,7 @@ Page({ ...@@ -1585,7 +1598,7 @@ Page({
* type 0 处方 1 用药建议 * type 0 处方 1 用药建议
* @param {} e * @param {} e
*/ */
viewRecipe: Util.debouce(function(e) { viewRecipe: Util.debouce(function (e) {
wx.showLoading(); wx.showLoading();
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
console.log("item", item) console.log("item", item)
...@@ -1593,7 +1606,7 @@ Page({ ...@@ -1593,7 +1606,7 @@ Page({
url: '/packageA/recipeDetails/recipeDetails?id=' + item.payid + '&type=' + item.type, url: '/packageA/recipeDetails/recipeDetails?id=' + item.payid + '&type=' + item.type,
}) })
wx.hideLoading(); wx.hideLoading();
},1000,true), }, 1000, true),
/** /**
* 购买药品 buyDrug() * 购买药品 buyDrug()
* isQuick 开药方式0-正常开药,1-二维码,2-快速开药 * isQuick 开药方式0-正常开药,1-二维码,2-快速开药
...@@ -1606,7 +1619,7 @@ Page({ ...@@ -1606,7 +1619,7 @@ Page({
* type 0-处方药,1-保健品 * type 0-处方药,1-保健品
* payid 支付ID * payid 支付ID
*/ */
buyDrug:Util.debouce(function(e) { buyDrug: Util.debouce(function (e) {
wx.showLoading(); wx.showLoading();
let that = this; let that = this;
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
...@@ -1628,14 +1641,14 @@ Page({ ...@@ -1628,14 +1641,14 @@ Page({
url: '/packageA/drugOrderInfo/drugOrderInfo?scene=' + id + '&isQuick=' + item.isQuick + '&orderId=' + this.data.orderId + '&groupID=' + that.data.groupID, url: '/packageA/drugOrderInfo/drugOrderInfo?scene=' + id + '&isQuick=' + item.isQuick + '&orderId=' + this.data.orderId + '&groupID=' + that.data.groupID,
}) })
wx.hideLoading(); wx.hideLoading();
}else{ } else {
wx.hideLoading(); wx.hideLoading();
that.setData({ that.setData({
errorToptips: res.msg errorToptips: res.msg
}) })
} }
}) })
},1000,true), }, 1000, true),
//客服电话 //客服电话
dial(e) { dial(e) {
let tel = e.currentTarget.dataset.tel; let tel = e.currentTarget.dataset.tel;
...@@ -1643,7 +1656,7 @@ Page({ ...@@ -1643,7 +1656,7 @@ Page({
phoneNumber: tel, phoneNumber: tel,
}) })
}, },
/** /**
* 图片加载失败函数 * 图片加载失败函数
* type 0 医生头像 1 患者头像 * type 0 医生头像 1 患者头像
* @param {any} e * @param {any} e
...@@ -1655,12 +1668,12 @@ Page({ ...@@ -1655,12 +1668,12 @@ Page({
let img; let img;
if (type == 0) { if (type == 0) {
up = "doctorimage"; up = "doctorimage";
img="/images/doctor_img.png"; img = "/images/doctor_img.png";
} else if(type == 1) { } else if (type == 1) {
up = "avatarUrl"; up = "avatarUrl";
img="/images/head-img.png"; img = "/images/head-img.png";
} }
console.log('img',img) console.log('img', img)
this.setData({ this.setData({
[up]: img [up]: img
}) })
......
...@@ -36,7 +36,10 @@ ...@@ -36,7 +36,10 @@
</button> </button>
</view> </view>
</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 slot="refresher" class="scrollloading"><i class="weui-loading"></i></view>
<view class='warp-info'> <view class='warp-info'>
...@@ -107,7 +110,8 @@ ...@@ -107,7 +110,8 @@
<!-- 白方消息 --> <!-- 白方消息 -->
<view class='left' wx:if="{{item.flow=='in'}}" id='d{{index}}'> <view class='left' wx:if="{{item.flow=='in'}}" 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' 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:if="{{item.payload.uuid==audioSave}}" src="/images/yuyin-gif.gif"></image>
<image class="ico" wx:else src="/images/yuyin-ico.png"></image> <image class="ico" wx:else src="/images/yuyin-ico.png"></image>
{{item.payload.second}}" {{item.payload.second}}"
...@@ -116,7 +120,8 @@ ...@@ -116,7 +120,8 @@
<!-- 蓝方消息 --> <!-- 蓝方消息 -->
<view class='right' wx:if="{{item.flow=='out'}}" id='d{{index}}'> <view class='right' wx:if="{{item.flow=='out'}}" 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' 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:if="{{item.payload.uuid==audioSave}}" src="/images/yuyin-gif1.gif"></image>
<image class="ico" wx:else src="/images/yuyin-ico1.png"></image> <image class="ico" wx:else src="/images/yuyin-ico1.png"></image>
{{item.payload.second}}" {{item.payload.second}}"
...@@ -130,7 +135,8 @@ ...@@ -130,7 +135,8 @@
<view class="systemReport-title">检测报告</view> <view class="systemReport-title">检测报告</view>
<view class="systemReport-text">{{doctorname}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view> <view class="systemReport-text">{{doctorname}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-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>
</view> </view>
<!-- 蓝方消息 --> <!-- 蓝方消息 -->
...@@ -138,7 +144,8 @@ ...@@ -138,7 +144,8 @@
<view class="systemReport-title">检测报告</view> <view class="systemReport-title">检测报告</view>
<view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view> <view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-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>
</view> </view>
</block> </block>
...@@ -149,7 +156,8 @@ ...@@ -149,7 +156,8 @@
<view class="reserve-time">预约时间 <text class="reserve-text">{{item.payload.description}}</text></view> <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="reserve-server">预约服务 <text class="reserve-text">在线复诊/咨询</text></view>
<view class="btn-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>
</view> </view>
</block> </block>
...@@ -157,14 +165,16 @@ ...@@ -157,14 +165,16 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Checkup"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Checkup"}}'>
<view class='Report'> <view class='Report'>
<view class="Report-doctor"> <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 class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.nickname}}</text><text <view><text class="doctor-name">{{item.payload.description.nickname}}</text><text
class="doctor-title">{{doctortitle}}</text></view> class="doctor-title">{{doctortitle}}</text></view>
<view class="doctor-unit">{{item.payload.description.work_unit}}</view> <view class="doctor-unit">{{item.payload.description.work_unit}}</view>
</view> </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">
<view class="scale-title">量表名称:</view> <view class="scale-title">量表名称:</view>
<view> <view>
...@@ -174,7 +184,7 @@ ...@@ -174,7 +184,7 @@
</view> </view>
</view> </view>
<view class="btn-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>
</view> </view>
</block> </block>
...@@ -182,7 +192,7 @@ ...@@ -182,7 +192,7 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="UserDrug"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="UserDrug"}}'>
<view class='recipe'> <view class='recipe'>
<view class="recipe-doctor"> <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 class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.name}}</text><text <view><text class="doctor-name">{{item.payload.description.name}}</text><text
class="doctor-title">{{doctortitle}}</text></view> class="doctor-title">{{doctortitle}}</text></view>
...@@ -210,7 +220,7 @@ ...@@ -210,7 +220,7 @@
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Prescription"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="Prescription"}}'>
<view class='recipe'> <view class='recipe'>
<view class="recipe-doctor"> <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 class="doctor-info">
<view><text class="doctor-name">{{item.payload.description.name}}</text><text <view><text class="doctor-name">{{item.payload.description.name}}</text><text
class="doctor-title">{{doctortitle}}</text></view> class="doctor-title">{{doctortitle}}</text></view>
...@@ -236,21 +246,23 @@ ...@@ -236,21 +246,23 @@
<!-- 视频消息 --> <!-- 视频消息 -->
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="LaunchVideo"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="LaunchVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'> <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 class='msg' data-c="{{item.payload.text}}">视频通话请求</view>
</view> </view>
<!-- <view class="LaunchVideo">视频通话请求</view> --> <!-- <view class="LaunchVideo">视频通话请求</view> -->
</block> </block>
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="closeVideo"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="closeVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'> <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 class='msg' data-c="{{item.payload.text}}">已挂断</view>
</view> </view>
<!-- <view class="LaunchVideo">已挂断</view> --> <!-- <view class="LaunchVideo">已挂断</view> -->
</block> </block>
<block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="hangUpVideo"}}'> <block wx:if='{{item.type == "TIMCustomElem"&&item.payload.data=="hangUpVideo"}}'>
<view class="{{item.flow=='in'?'left':'right'}}" id='d{{index}}'> <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 class='msg' data-c="{{item.payload.text}}">已拒接</view>
</view> </view>
<!-- <view class="LaunchVideo">已挂断</view> --> <!-- <view class="LaunchVideo">已挂断</view> -->
...@@ -260,8 +272,10 @@ ...@@ -260,8 +272,10 @@
<view class='userInfo'> <view class='userInfo'>
<view class="userInfo-title">患者信息</view> <view class="userInfo-title">患者信息</view>
<view class="basicInfo">基本信息<text class="userInfo-text">{{item.payload.description.name}}</text></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-GSGN">肝肾功能<text class="userInfo-text">{{item.payload.description.disease}}</text>
<view class="userInfo-BYQK">备孕情况<text class="userInfo-text">{{item.payload.description.beiyun}}</text></view> </view>
<view class="userInfo-BYQK">备孕情况<text class="userInfo-text">{{item.payload.description.beiyun}}</text>
</view>
<view class="userInfo-GWBS"> <view class="userInfo-GWBS">
<view>过往病史</view> <view>过往病史</view>
<view class="gwbs-text">{{item.payload.description.past_desc}}</view> <view class="gwbs-text">{{item.payload.description.past_desc}}</view>
...@@ -281,7 +295,7 @@ ...@@ -281,7 +295,7 @@
<block wx:if='{{item.type == "TIMTextElem"}}'> <block wx:if='{{item.type == "TIMTextElem"}}'>
<!-- 蓝方消息 --> <!-- 蓝方消息 -->
<view class='right' id='d{{index}}'> <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='msg' data-c="{{item.payload.text}}" bind:longpress='cope'>{{item.payload.text}}</view>
<view class="unsentloading"><i class="weui-loading"></i></view> <view class="unsentloading"><i class="weui-loading"></i></view>
</view> </view>
...@@ -313,7 +327,8 @@ ...@@ -313,7 +327,8 @@
<view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view> <view class="systemReport-text">{{name}}发送了一份{{item.payload.description.lbname}}的检测报告,可点击下方按钮查看</view>
<view class="btn-view"> <view class="btn-view">
<view><i class="weui-loading"></i></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>
</view> </view>
</block> </block>
...@@ -360,13 +375,16 @@ ...@@ -360,13 +375,16 @@
<image class='send-btn-img' src='{{isRecord?"/images/record.png":"/images/audio.png"}}'></image> <image class='send-btn-img' src='{{isRecord?"/images/record.png":"/images/audio.png"}}'></image>
</view> </view>
<block wx:if="{{isRecord}}"> <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>
<block wx:if="{{isRecording}}">抬起 停止</block> <block wx:if="{{isRecording}}">抬起 停止</block>
</view> </view>
</block> </block>
<block wx:else> <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> <button class='send-btn' bindtap="createTextMessage">发送</button>
</block> </block>
</view> </view>
...@@ -409,7 +427,8 @@ ...@@ -409,7 +427,8 @@
<view class="{{estimateIssue.issue4?'issue-active':''}}" bindtap="issue" data-issue="4">服务价格太高</view> <view class="{{estimateIssue.issue4?'issue-active':''}}" bindtap="issue" data-issue="4">服务价格太高</view>
</view> </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> </textarea>
<button class="estimate-btn" wx:if="{{graded>0}}">匿名提交</button> <button class="estimate-btn" wx:if="{{graded>0}}">匿名提交</button>
</view> </view>
...@@ -417,12 +436,14 @@ ...@@ -417,12 +436,14 @@
<view class="cu-modal bottom-modal {{reportShow?'':'show'}} warp-up" bindtap="openReport"> <view class="cu-modal bottom-modal {{reportShow?'':'show'}} warp-up" bindtap="openReport">
<!-- style='height:{{winH - 100}}px;bottom:-{{winH}}px;' --> <!-- 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:{{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> <view class='list-title'>发送报告</view>
<text class="cuIcon-close close" catchtap="openReport"></text> <text class="cuIcon-close close" catchtap="openReport"></text>
<view class="animate" style='height:{{winH - 168}}px;'> <view class="animate" style='height:{{winH - 168}}px;'>
<block wx:for="{{result}}" wx:for-item="item" wx:for-index="index" wx:key="index"> <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'> <view class='pho'>
<image src="{{item.headimgurl?item.headimgurl:noSrc}}"></image> <image src="{{item.headimgurl?item.headimgurl:noSrc}}"></image>
</view> </view>
......
...@@ -17,12 +17,13 @@ ...@@ -17,12 +17,13 @@
<block> <block>
<view class="num flex"> <view class="num flex">
<text>订单编号:{{item.ordernumber}}</text> <text>订单编号:{{item.ordernumber}}</text>
<!-- <text wx-if="{{item.status==1}}">已退款</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==2}}">待发货</text>
<text wx-if="{{item.status==3}}">待收货</text> <text wx-if="{{item.status==3}}">待收货</text>
<text wx-if="{{item.status==4}}">已完成</text> <text wx-if="{{item.status==4}}">已完成</text>
<text wx-if="{{item.status==5}}">订单过期</text> <text wx-if="{{item.status==5}}">订单过期</text>
<text wx-if="{{item.status==7}}">订单作废</text> <text wx-if="{{item.status==7}}">订单作废</text>
</view> </view>
<block wx:for="{{item.prescription}}" wx:key="index" wx:for-item="itemName"> <block wx:for="{{item.prescription}}" wx:key="index" wx:for-item="itemName">
<view class="list "> <view class="list ">
...@@ -50,14 +51,27 @@ ...@@ -50,14 +51,27 @@
<text>(含运费¥{{item.freight}})</text> <text>(含运费¥{{item.freight}})</text>
</view> </view>
<view class="dele flex"> <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="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="editAddress" data-ordernumber="{{item.ordernumber}}"
<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> data-address="{{item.address}}">修改地址</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="ckwl" wx:if="{{item.status==2}}" bindtap="goLogistics"
<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货</view> data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}"
<view class="ljzf" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goOrderDetail" data-id="{{item.id}}">订单详情</view> data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}"
<view class="ljzf" wx:if="{{item.status==1}}" bindtap="goPay" data-id="{{item.yfid}}" data-isquick="{{item.modular}}">立即支付</view> 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==5}}">订单过期</view>
<view class="ljzf1" wx:if="{{item.status==7}}">订单作废</view> <view class="ljzf1" wx:if="{{item.status==7}}">订单作废</view>
</view> </view>
......
...@@ -280,6 +280,16 @@ Page({ ...@@ -280,6 +280,16 @@ Page({
showCancel: false, showCancel: false,
}) })
return; return;
} else if (that.data.phone.length == "") {
wx.showModal({
title: '提示',
content: '请填写手机号',
showCancel: false,
})
that.setData({
sava: true
})
return;
} else if (that.data.phone != '' && that.data.phone.length != 11) { } else if (that.data.phone != '' && that.data.phone.length != 11) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="flex-xm4"> <view class="flex-xm4">
<view class="tname">手机号</view> <view class="tname">手机号</view>
<view class="phoneinput"> <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> <view wx:if="{{!phoneYes}}" class="line"></view>
<button wx:if='{{!phoneYes}}' class="wxhq" open-type="getPhoneNumber" <button wx:if='{{!phoneYes}}' class="wxhq" open-type="getPhoneNumber"
bindgetphonenumber="getPhoneNumber">微信获取</button> bindgetphonenumber="getPhoneNumber">微信获取</button>
......
...@@ -155,12 +155,12 @@ ...@@ -155,12 +155,12 @@
</view> </view>
<view class="yishi"> <view class="yishi">
<text>审核:</text> <text>审核:</text>
<text>栾文娟</text> <text>欧兆智</text>
</view> </view>
<view class="yishi"> <!-- <view class="yishi">
<text>复审:</text> <text>复审:</text>
<text>傅美来</text> <text>傅美来</text>
</view> </view> -->
<image class="img" src="/images/zhang.png"></image> <image class="img" src="/images/zhang.png"></image>
</view> </view>
<view class="specialTips"> <view class="specialTips">
......
...@@ -190,7 +190,7 @@ Page({ ...@@ -190,7 +190,7 @@ Page({
let that = this; let that = this;
var json = []; var json = [];
for (let j in e) { 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; var len = e[j].measure_id_z.split(',').length;
e[j].time01 = Util.timeMethod(e[j].time); e[j].time01 = Util.timeMethod(e[j].time);
e[j].lb_num = len; e[j].lb_num = len;
......
...@@ -33,7 +33,7 @@ Page({ ...@@ -33,7 +33,7 @@ Page({
}).then((res) => { }).then((res) => {
if (Util.isEmpty(res.unionid)) { if (Util.isEmpty(res.unionid)) {
that.login.showLogin(); that.login.showLogin();
console.log(1) // console.log(1)
that.setData({ that.setData({
showview: true, showview: true,
}) })
...@@ -115,7 +115,7 @@ Page({ ...@@ -115,7 +115,7 @@ Page({
}, },
//菜单栏红点提示 //菜单栏红点提示
resultNot(openid) { resultNot(openid) {
console.log("resultNot") // console.log("resultNot")
//未做量表提醒 //未做量表提醒
var data = { var data = {
openid: openid openid: openid
...@@ -131,20 +131,20 @@ Page({ ...@@ -131,20 +131,20 @@ Page({
}) })
} }
}).catch(error => { }).catch(error => {
console.error("菜单栏红点提示", error) // console.error("菜单栏红点提示", error)
}) })
}, },
//获取im会话列表 //获取im会话列表
sessionList: function () { sessionList: function () {
let that = this; 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 => { that.data.sessionList = Tim.data.sessionList.filter(item => {
return item.type == "GROUP" return item.type == "GROUP"
}); });
Tim.tim.getGroupList().then(function (imResponse) { Tim.tim.getGroupList().then(function (imResponse) {
console.log("群组列表", imResponse.data.groupList); // 群组列表 // console.log("群组列表", imResponse.data.groupList); // 群组列表
}).catch(function (imError) { }).catch(function (imError) {
console.warn('getGroupList error:', imError); // 获取群组列表失败的相关信息 // console.warn('getGroupList error:', imError); // 获取群组列表失败的相关信息
}); });
//取消在Tim.js监听的会话列表避免重复监听 //取消在Tim.js监听的会话列表避免重复监听
// Tim.tim.off(TIM.EVENT.CONVERSATION_LIST_UPDATED, Tim.onConversationListUpdated); // Tim.tim.off(TIM.EVENT.CONVERSATION_LIST_UPDATED, Tim.onConversationListUpdated);
...@@ -158,7 +158,7 @@ Page({ ...@@ -158,7 +158,7 @@ Page({
*/ */
onConversationListUpdated: function (event) { onConversationListUpdated: function (event) {
let that = this; let that = this;
console.log("%c收到会话列表更新通知", "color:#2684ff", event) // console.log("%c收到会话列表更新通知", "color:#2684ff", event)
that.data.sessionList = event.data.filter(item => { that.data.sessionList = event.data.filter(item => {
return item.type == "GROUP" return item.type == "GROUP"
}); });
......
...@@ -265,16 +265,15 @@ Page({ ...@@ -265,16 +265,15 @@ Page({
inquiry: '', //1二维码,2聊天页面心理体检 inquiry: '', //1二维码,2聊天页面心理体检
inquiry_id: '', //心理体检量表ID inquiry_id: '', //心理体检量表ID
viewrice: true, //判断是否显示量表价格 viewrice: true, //判断是否显示量表价格
dropDown:8,//多少条显示展开折叠数 dropDown: 8, //多少条显示展开折叠数
animDropDown:{},//动效 animDropDown: {}, //动效
}, },
onLoad: function (options) { onLoad: function (options) {
var that = this; var that = this;
console.log('options',options);
/** otype=1 第一次未答完题进行第二题 || 从报告列表跳转 else 扫码过来 */ /** otype=1 第一次未答完题进行第二题 || 从报告列表跳转 else 扫码过来 */
that.data.otype = options.otype ? options.otype : -1; that.data.otype = options.otype ? options.otype : -1;
if (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) { } else if (options.otype != 0) {
var scene = decodeURIComponent(options.scene) var scene = decodeURIComponent(options.scene)
wx.setStorageSync('qrcode_id', scene) wx.setStorageSync('qrcode_id', scene)
...@@ -292,7 +291,7 @@ Page({ ...@@ -292,7 +291,7 @@ Page({
}); });
wx.showLoading({ wx.showLoading({
title: '正在加载', title: '正在加载',
}) });
}, },
onShow: function () { onShow: function () {
let that = this; let that = this;
...@@ -348,12 +347,17 @@ Page({ ...@@ -348,12 +347,17 @@ Page({
} }
wx.setStorageSync('user', res) wx.setStorageSync('user', res)
if (otype == 1) { if (otype == 1) {
var info = wx.getStorageSync('weiLb'); //不需要支付的量表
let info = wx.getStorageSync('weiLb');
that.loadItem(info); that.loadItem(info);
} else { } 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) wx.setStorageSync('qrcode_id', scene)
that.loadScene(scene); // 加载二维码场景 if (that.data.inquiry == 2)
that.loadIMScene(scene); // 加载二维码场景
else
that.loadScene(scene); // 加载二维码场景
} }
that.loadData(); // 获取个人信息 that.loadData(); // 获取个人信息
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
...@@ -489,14 +493,13 @@ Page({ ...@@ -489,14 +493,13 @@ Page({
}) })
} }
wx.setStorageSync('weiLb', res) wx.setStorageSync('weiLb', res)
// 是否有未做完的题 res.characters_id 为null 时表示没有扫码后未做的量表 // 是否有未做完的题 res.characters_id 为null 时表示没有扫码后未做的量表;
// res.record_id = res.characters_id ?res.characters_id:-1; // res.record_id = res.characters_id ?res.characters_id:-1;
if (res.characters_id) { if (res.characters_id) {
res.record_id = res.characters_id res.record_id = res.characters_id
} else { } else {
res.record_id = -1; res.record_id = -1;
} }
if (Number(res.type) == 3) { if (Number(res.type) == 3) {
// 二维码已失效 // 二维码已失效
Util.alert('您扫的二维码已经失效!', function () { Util.alert('您扫的二维码已经失效!', function () {
...@@ -538,7 +541,6 @@ Page({ ...@@ -538,7 +541,6 @@ Page({
title: '支付检测费' //修改title title: '支付检测费' //修改title
}) })
wx.setStorageSync('payInfo', json) wx.setStorageSync('payInfo', json)
} else { // 不需要免费、体验金 } else { // 不需要免费、体验金
var user = wx.getStorageSync('user'); var user = wx.getStorageSync('user');
var data1 = {}; var data1 = {};
...@@ -572,6 +574,82 @@ Page({ ...@@ -572,6 +574,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) { getUnitid: function (e) {
let that = this let that = this
var allData = wx.getStorageSync('data'); var allData = wx.getStorageSync('data');
...@@ -592,20 +670,20 @@ Page({ ...@@ -592,20 +670,20 @@ Page({
* 量表数量超过dropdown数量显示'展开'/'收起' * 量表数量超过dropdown数量显示'展开'/'收起'
* @param {*} e * @param {*} e
*/ */
dropdown(e){ dropdown(e) {
console.log(e.currentTarget.dataset.dropdown); console.log(e.currentTarget.dataset.dropdown);
let dropDown= e.currentTarget.dataset.dropdown; let dropDown = e.currentTarget.dataset.dropdown;
this.setData({ this.setData({
dropDown:dropDown dropDown: dropDown
}) })
// //点击弹出 // //点击弹出
// if (dropDown==8) { // if (dropDown==8) {
// //缩回动画 // //缩回动画
// this.popp(); // this.popp();
// } else { // } else {
// //弹出动画 // //弹出动画
// this.takeback(); // this.takeback();
// } // }
}, },
positionNational: function (a, e) { positionNational: function (a, e) {
var arr = a; var arr = a;
...@@ -788,7 +866,6 @@ Page({ ...@@ -788,7 +866,6 @@ Page({
time: e.time, time: e.time,
} }
that.payCsX(_json) that.payCsX(_json)
} else { } else {
Util.alert('支付失败', function () { Util.alert('支付失败', function () {
wx.reLaunch({ wx.reLaunch({
...@@ -818,7 +895,7 @@ Page({ ...@@ -818,7 +895,7 @@ Page({
data.gold = e.money; data.gold = e.money;
// data.gold = 0.01; // data.gold = 0.01;
data.g_id = g_id; 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'; var url = Api.HOST + 'wechatIteration.php?s=Home/payrecord';
Api.fetchPost(url, data, (err, res) => { Api.fetchPost(url, data, (err, res) => {
...@@ -1030,9 +1107,9 @@ Page({ ...@@ -1030,9 +1107,9 @@ Page({
if (res[0]) { if (res[0]) {
that.setData({ that.setData({
lb_id: res[0] lb_id: res[0]
}) })
// 保存 信息 用于判断是不是同一个量表 // 保存 信息 用于判断是不是同一个量表
var lb_descript = { var lb_descript = {
id: res, id: res,
desc: e desc: e
} }
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true, "minifyWXSS": true
"skeletonGenerateFilesWithoutConfirm": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.12.2", "libVersion": "2.12.2",
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli'; var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli';
// var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy'; // var HOST_xinli = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';
var HOST_xinli_lb = 'https://static.xiaodongai.com/'; var HOST_xinli_lb = 'https://static.xiaodongai.com/';
var HOST = 'https://www.xiaodongai.com/xiaodongai/kongtian/';
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 = 'https://www.xiaodongai.com/xiaodongai/ceshi/';//测试库
var HOST_P = "http://static.xiaodongai.com/xiaodongai/"; var HOST_P = "http://static.xiaodongai.com/xiaodongai/";
var HOST_P_K = "http://static.xiaodongai.com/xiaodongai/kongtian/"; var HOST_P_K = "http://static.xiaodongai.com/xiaodongai/kongtian/";
......
'use strict'; '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 = 'https://www.xiaodongai.com/xiaodongai/xinli_ceshi_copy';
var HOST_xinli_lb = 'https://static.xiaodongai.com/'; const HOST_xinli_lb = 'https://static.xiaodongai.com/';
var HOST_P = "https://static.xiaodongai.com/xiaodongai/"; const HOST_P = "https://static.xiaodongai.com/xiaodongai/";
var HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/"; 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 = 'https://www.xiaodongai.com/xiaodongai/ceshi/';//测试库
// var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/';//本地 // var HOST = 'http://192.168.0.123:8081/xiaodongai/ceshi/';//本地
// var HOST = 'http://localhost/xiaodongai/kongtian/';//本地 // 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/";//互联网医院正式 // var HOST_yiyuan="https://www.xiaodongai.com/xiaodong_yiyuan/xd_admin/public/index.php/api/";//互联网医院正式
const url = { const url = {
getUserSig: HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID getUserSig: HOST + 'wechatIm.php?s=/Im/wechat_get_sign', //获取usersig以及userID
...@@ -79,6 +81,7 @@ const url = { ...@@ -79,6 +81,7 @@ const url = {
/**end */ /**end */
/**量表 */ /**量表 */
loadScene:HOST+"wechatIteration.php?s=/Measure/is_price",//判断量表二维码场景 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",//获取检测信息 getTestInfo:HOST+"wechatIteration.php?s=/InquiryUser/findInquiry",//获取检测信息
/**end */ /**end */
/**用户购买问诊信息 begin*/ /**用户购买问诊信息 begin*/
......
...@@ -450,6 +450,10 @@ function loadScene(param) { ...@@ -450,6 +450,10 @@ function loadScene(param) {
var loadSceneUrl = config.url.loadScene; var loadSceneUrl = config.url.loadScene;
return wxRequest.postRequest(loadSceneUrl, param); return wxRequest.postRequest(loadSceneUrl, param);
} }
function loadIMScene(param) {
var loadIMSceneUrl = config.url.loadIMScene;
return wxRequest.postRequest(loadIMSceneUrl, param);
}
/** /**
* 用户购买服务状态 * 用户购买服务状态
*/ */
...@@ -666,6 +670,7 @@ module.exports = { ...@@ -666,6 +670,7 @@ module.exports = {
delFriend: delFriend, //删除好友 delFriend: delFriend, //删除好友
appAddFriend: appAddFriend, //app.js添加好友 appAddFriend: appAddFriend, //app.js添加好友
loadScene: loadScene, //加载量表二维码场景 loadScene: loadScene, //加载量表二维码场景
loadIMScene:loadIMScene,//加载IM量表支付场景
seeBuyStaus: seeBuyStaus, //用户购买服务状态 seeBuyStaus: seeBuyStaus, //用户购买服务状态
endInquiry: endInquiry, //同意结束服务 endInquiry: endInquiry, //同意结束服务
refuseInquiry: refuseInquiry, //拒绝结束服务 refuseInquiry: refuseInquiry, //拒绝结束服务
......
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