Commit f9c2acb1 by liuquan

合并分支 'feature.login.v3.2.3.20210605.liuquan' 到 'test'

Feature.login.v3.2.3.20210605.liuquan

查看合并请求 !15
parents 473c760e 382d0c54
...@@ -56,6 +56,7 @@ App({ ...@@ -56,6 +56,7 @@ App({
}, },
onShow: function () { onShow: function () {
console.log("onShow") console.log("onShow")
this.forcedUpdate();
}, },
onHide: function () { onHide: function () {
console.log("onHide") console.log("onHide")
......
...@@ -99,11 +99,5 @@ ...@@ -99,11 +99,5 @@
} }
] ]
}, },
"usingComponents": {
"mp-toptips": "/miniprogram_npm/weui-miniprogram/toptips/toptips",
"answer":"/components/answer/answer",
"modal": "/components/modal/modal",
"login": "/components/login/login"
},
"sitemapLocation": "sitemap.json" "sitemapLocation": "sitemap.json"
} }
\ No newline at end of file
...@@ -128,7 +128,7 @@ Component({ ...@@ -128,7 +128,7 @@ Component({
}) })
return return
} }
let url = `/packageA/room/room?roomID=${roomID}&template=${that.data.template}&debugMode=${that.data.debugMode}&cloudenv=${that.data.cloudenv}&userID=${userID}&roomFile=${JSON.stringify(that.data.roomFile)}` let url = `/packageA/room/room?roomID=${roomID}&template=${that.data.template}&debugMode=${that.data.debugMode}&cloudenv=${that.data.cloudenv}&userID=${userID}&roomFile=${JSON.stringify(encodeURIComponent(that.data.roomFile))}`
that.tapTime = nowTime that.tapTime = nowTime
that.checkDeviceAuthorize().then((result) => { that.checkDeviceAuthorize().then((result) => {
console.log('授权成功', result) console.log('授权成功', result)
...@@ -241,9 +241,10 @@ Component({ ...@@ -241,9 +241,10 @@ Component({
// 组件所在页面的生命周期函数 // 组件所在页面的生命周期函数
/**组件调用时监听im视频通话消息 */ /**组件调用时监听im视频通话消息 */
show: function () { show: function () {
console.log("pageshow")
let that = this; let that = this;
let onMessageReceived = function (event) { let onMessageReceived = function (event) {
// console.log("%c收到推送的单聊", "color:#04BE02", event, that.data.videocall) console.log("%c收到推送的单聊answer", "color:#04BE02", event, that.data.videocall)
let index = Number(event.data.length - 1); let index = Number(event.data.length - 1);
let data = JSON.parse(event.data[index].payload.data); let data = JSON.parse(event.data[index].payload.data);
//判断当前消息为视频通话并且无正在进行中的视频请求时弹出 //判断当前消息为视频通话并且无正在进行中的视频请求时弹出
...@@ -280,6 +281,7 @@ Component({ ...@@ -280,6 +281,7 @@ Component({
this.setData({ this.setData({
onMessageReceived: onMessageReceived onMessageReceived: onMessageReceived
}) })
// console.log(this.data.onMessageReceived)
Tim.tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.data.onMessageReceived); Tim.tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.data.onMessageReceived);
}, },
......
...@@ -147,6 +147,7 @@ Component({ ...@@ -147,6 +147,7 @@ Component({
// } // }
// 经历了 5001 浮窗关闭事件,小程序底层会自动退房,恢复小程序时组件需要重新进房 // 经历了 5001 浮窗关闭事件,小程序底层会自动退房,恢复小程序时组件需要重新进房
// 重新进房 // 重新进房
console.log('pageLifetimes-show',this.data.config)
this.enterRoom({ roomID: this.data.config.roomID }).then(()=>{ this.enterRoom({ roomID: this.data.config.roomID }).then(()=>{
// 进房后开始推送视频或音频 // 进房后开始推送视频或音频
// setTimeout(()=>{ // setTimeout(()=>{
...@@ -335,6 +336,7 @@ Component({ ...@@ -335,6 +336,7 @@ Component({
console.log(theTiem); console.log(theTiem);
let config= that.data.config; let config= that.data.config;
config.roomFile.callduration=theTiem; config.roomFile.callduration=theTiem;
console.log('config',config)
that.setData({ that.setData({
config:config config:config
}) })
...@@ -1671,6 +1673,7 @@ Component({ ...@@ -1671,6 +1673,7 @@ Component({
const userID = this.data.config.userID const userID = this.data.config.userID
this._searchGroup({ roomID }).then((imResponse) => { this._searchGroup({ roomID }).then((imResponse) => {
// 查询群资料,判断是否为群主 // 查询群资料,判断是否为群主
console.log('_searchGroup',imResponse.data.group.ownerID,userID)
if (imResponse.data.group.ownerID === userID && userList.length === 0) { if (imResponse.data.group.ownerID === userID && userList.length === 0) {
// 如果 userList 为 0 群主可以解散群,并登出IM // 如果 userList 为 0 群主可以解散群,并登出IM
this._dismissGroup({ roomID }).then(()=>{ this._dismissGroup({ roomID }).then(()=>{
......
...@@ -612,9 +612,10 @@ Page({ ...@@ -612,9 +612,10 @@ Page({
wx.getSetting({ wx.getSetting({
withSubscriptions: true, withSubscriptions: true,
success(res) { success(res) {
var itemSettings = !Util.isEmpty(res.subscriptionsSetting) ? res.subscriptionsSetting.itemSettings : ""; let itemSettings = !Util.isEmpty(res.subscriptionsSetting) ? res.subscriptionsSetting.itemSettings : "";
console.log('itemSettings', res, itemSettings)
if (itemSettings) { if (itemSettings) {
if (itemSettings['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'] == 'accept') { if (itemSettings['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'] == 'accept' ) {
that.setData({ that.setData({
remind: false remind: false
}); });
...@@ -645,8 +646,10 @@ Page({ ...@@ -645,8 +646,10 @@ Page({
remind: false remind: false
}) })
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'], tmplIds: ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'],
success(res) {} success(res) {
console.log('requestSubscribeMessage', res)
}
}) })
that.checkDeviceAuthorize().then((result) => { that.checkDeviceAuthorize().then((result) => {
console.log('%c授权成功', 'color:#04BE02', result) console.log('%c授权成功', 'color:#04BE02', result)
...@@ -654,6 +657,72 @@ Page({ ...@@ -654,6 +657,72 @@ Page({
console.log('没有授权', error) console.log('没有授权', error)
}) })
}, },
tmplArr() {
return new Promise((success,fail)=>{
wx.getSetting({
withSubscriptions: true
}).then(res => {
let itemSettings = !res.subscriptionsSetting.mainSwitch ? res.subscriptionsSetting.itemSettings : "";
console.log('itemSettings21331', res, itemSettings)
if (itemSettings) {
console.log('1')
let list = ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
arr = [];
arr = list.map((item) => {
if (itemSettings[item] = "reject") return item
})
}
success(arr)
}).catch(err => {
fail(arr)
})
})
// wx.getSetting({
// withSubscriptions: true
// }).then(res => {
// let itemSettings = !res.subscriptionsSetting.mainSwitch ? res.subscriptionsSetting.itemSettings : "";
// console.log('itemSettings21331', res, itemSettings)
// if (itemSettings) {
// console.log('1')
// let list = ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
// arr = [];
// arr = list.map((item) => {
// if (itemSettings[item] = "reject") return item
// })
// }
// console.log('tmplArr1', arr)
// return arr;
// }).catch(err => {
// console.log('tmplArr2', arr)
// return arr;
// })
// wx.getSetting({
// withSubscriptions: true,
// success(res) {
// let itemSettings = !res.subscriptionsSetting.mainSwitch ? res.subscriptionsSetting.itemSettings : "";
// console.log('itemSettings21331', res, itemSettings)
// if (itemSettings) {
// console.log('1')
// let list = ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
// arr = [];
// arr = list.map((item) => {
// if (itemSettings[item] = "reject") return item
// })
// }
// console.log('tmplArr1', arr)
// return arr;
// },
// fail() {
// console.log('tmplArr2', arr)
// return arr;
// }
// // complete(){
// // console.log('tmplArr3', arr)
// // return arr;
// // }
// })
},
/** /**
* 服务提前结束 0同意 1拒绝 * 服务提前结束 0同意 1拒绝
*/ */
...@@ -719,7 +788,7 @@ Page({ ...@@ -719,7 +788,7 @@ Page({
status: true, status: true,
serviceName: res.data.name serviceName: res.data.name
}) })
if( res.data.counsel=="20"){ if (res.data.counsel == "20") {
that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid); that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid);
} }
return return
...@@ -729,8 +798,8 @@ Page({ ...@@ -729,8 +798,8 @@ Page({
end_time: '', end_time: '',
serviceName: '未知', serviceName: '未知',
}) })
if( res.data.counsel=="20"){ if (res.data.counsel == "20") {
that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid); that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid);
} }
break; break;
} }
...@@ -952,34 +1021,34 @@ Page({ ...@@ -952,34 +1021,34 @@ Page({
}); });
}).then((imResponse) => { }).then((imResponse) => {
console.log("%c第一次拉取消息列表", "color:#04BE02", imResponse) console.log("%c第一次拉取消息列表", "color:#04BE02", imResponse)
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: '提示',
content: '对方发起了一个结束当前服务的请求', // content: '对方发起了一个结束当前服务的请求',
success(res) { // success(res) {
if (res.confirm) { // if (res.confirm) {
that.endInquiry(0); // that.endInquiry(0);
that.userPayList(that.data.orderId ? that.data.orderId : ''); // that.userPayList(that.data.orderId ? that.data.orderId : '');
} else if (res.cancel) { // } else if (res.cancel) {
that.endInquiry(1); // that.endInquiry(1);
that.userPayList(that.data.orderId ? that.data.orderId : ''); // that.userPayList(that.data.orderId ? that.data.orderId : '');
} // }
} // }
}) // })
} // }
} // }
that.setData({ // that.setData({
messageList: that.showTimestamp(messageList), // 消息列表。 // messageList: that.showTimestamp(messageList), // 消息列表。
nextReqMessageID: imResponse.data.nextReqMessageID, // 用于续拉,分页续拉时需传入该字段。 // nextReqMessageID: imResponse.data.nextReqMessageID, // 用于续拉,分页续拉时需传入该字段。
isCompleted: imResponse.data.isCompleted // 表示是否已经拉完所有消息。 // isCompleted: imResponse.data.isCompleted // 表示是否已经拉完所有消息。
}) // })
//延时500ms避免scroll-view的防止抖动生效 //延时500ms避免scroll-view的防止抖动生效
setTimeout(() => { setTimeout(() => {
that.scrollToBottom(); //使滑动条到最底部 that.scrollToBottom(); //使滑动条到最底部
...@@ -1472,6 +1541,7 @@ Page({ ...@@ -1472,6 +1541,7 @@ Page({
this.setData({ this.setData({
reportShow: true reportShow: true
}) })
console.log('message',message)
let msg = Util.deepClone(message); let msg = Util.deepClone(message);
that.unsentMessageInsert(msg); that.unsentMessageInsert(msg);
Tim.createCustomMessage(message).then((imResponse) => { Tim.createCustomMessage(message).then((imResponse) => {
......
...@@ -19,12 +19,14 @@ Page({ ...@@ -19,12 +19,14 @@ Page({
paySuccess: false, paySuccess: false,
errshow: false, errshow: false,
items: [{ items: [{
name: '', name: '',
value: '1' value: '1'
}, }, {
], name: '否',
isInvoice:0,//是否开具发票 value: '0'
isBtnAsh:true,//支付按钮置灰 }],
isInvoice: -1, //是否开具发票
isBtnAsh: true, //支付按钮置灰
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -56,22 +58,22 @@ Page({ ...@@ -56,22 +58,22 @@ Page({
that.login = that.selectComponent("#login"); that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal"); that.modal = that.selectComponent("#modal");
that.answer = that.selectComponent("#answer"); that.answer = that.selectComponent("#answer");
if (wx.getStorageSync('data').unionid == undefined || wx.getStorageSync('data').unionid == '') { if (Util.isEmpty(wx.getStorageSync('data').unionid)) {
wx.login({ wx.login({
success: function (msg) { success: function (msg) {
Service.getOpenId(msg.code).then((res) => { Service.getOpenId(msg.code).then((res) => {
wx.setStorageSync('user', res) wx.setStorageSync('user', res)
return Service.getUserData(res.openid) return Service.getUserData(res.openid)
}).then((res) => { }).then((res1) => {
if (Util.isEmpty(res.unionid)) { if (Util.isEmpty(res1.unionid)) {
that.login.showLogin(); that.login.showLogin();
} else { } else {
wx.setStorageSync('data', res) wx.setStorageSync('data', res1)
if (that.data.options.isQuick == 0) { if (that.data.options.isQuick == 0) {
// 正常开药 // 正常开药
that.getPrescribe(that.data.options.scene, res.unionid) that.getPrescribe(that.data.options.scene, res1.unionid)
} else { } else {
that.getQuick(that.data.options.scene, res.unionid) that.getQuick(that.data.options.scene, res1.unionid)
} }
} }
}) })
...@@ -88,7 +90,9 @@ Page({ ...@@ -88,7 +90,9 @@ Page({
}, },
// 处方笺 // 处方笺
getPrescribe: function (id, patient_unionid) { getPrescribe: function (id, patient_unionid) {
wx.showLoading({mask:true}); wx.showLoading({
mask: true
});
let that = this let that = this
if (that.data.paySuccess) { if (that.data.paySuccess) {
wx.hideLoading(); wx.hideLoading();
...@@ -133,7 +137,9 @@ Page({ ...@@ -133,7 +137,9 @@ Page({
}, },
// 快速开药 // 快速开药
getQuick: function (quickid, patient_unionid) { getQuick: function (quickid, patient_unionid) {
wx.showLoading({mask:true}); wx.showLoading({
mask: true
});
var that = this var that = this
if (that.data.paySuccess) { if (that.data.paySuccess) {
wx.hideLoading(); wx.hideLoading();
...@@ -223,7 +229,9 @@ Page({ ...@@ -223,7 +229,9 @@ Page({
* @param {Object} e 事件绑定值 * @param {Object} e 事件绑定值
*/ */
myDetails: function (e) { myDetails: function (e) {
wx.showLoading({mask:true}); wx.showLoading({
mask: true
});
var that = this; var that = this;
if (wx.getStorageSync('data').unionid == undefined) { if (wx.getStorageSync('data').unionid == undefined) {
that.login.showLogin(); that.login.showLogin();
...@@ -246,11 +254,11 @@ Page({ ...@@ -246,11 +254,11 @@ Page({
* 是否需要开具纸质发票 * 是否需要开具纸质发票
* @param {*} e * @param {*} e
*/ */
checkboxChange: function (e) { radioChange: function (e) {
this.setData({ this.setData({
isInvoice: e.detail.value[0]==1?1:0, isInvoice: e.detail.value,
}) })
}, },
/** /**
* 调起顺丰电话客服 * 调起顺丰电话客服
*/ */
...@@ -263,7 +271,9 @@ Page({ ...@@ -263,7 +271,9 @@ Page({
* 知情同意书 * 知情同意书
*/ */
goConsent: function () { goConsent: function () {
wx.showLoading({mask:true}) wx.showLoading({
mask: true
})
wx.navigateTo({ wx.navigateTo({
url: '/packageA/consent/consent' url: '/packageA/consent/consent'
}) })
...@@ -273,7 +283,9 @@ Page({ ...@@ -273,7 +283,9 @@ Page({
* 同意知情同意书 * 同意知情同意书
*/ */
agree: function () { agree: function () {
wx.showLoading({mask:true}); wx.showLoading({
mask: true
});
var that = this; var that = this;
var agree = that.data.agree ? false : true; var agree = that.data.agree ? false : true;
that.setData({ that.setData({
...@@ -285,7 +297,9 @@ Page({ ...@@ -285,7 +297,9 @@ Page({
*选择地址 *选择地址
*/ */
gosite() { gosite() {
wx.showLoading({mask:true}) wx.showLoading({
mask: true
})
wx.navigateTo({ wx.navigateTo({
url: '/packageA/site/site', url: '/packageA/site/site',
}) })
...@@ -317,6 +331,16 @@ Page({ ...@@ -317,6 +331,16 @@ Page({
that.setData({ that.setData({
isBtnAsh: false isBtnAsh: false
}) })
let {
unionid
} = wx.getStorageSync('user');
if (Util.isEmpty(unionid)) {
that.login.showLogin();
that.setData({
isBtnAsh: true
})
return
}
if (that.data.receiveAddress.id == undefined) { if (that.data.receiveAddress.id == undefined) {
wx.showToast({ wx.showToast({
title: '请填写收货地址', title: '请填写收货地址',
...@@ -327,6 +351,17 @@ Page({ ...@@ -327,6 +351,17 @@ Page({
}) })
return return
} }
if (that.data.isInvoice== -1) {
wx.showToast({
title: '请选择是否需要随货纸质发票',
icon: 'none',
duration:2000
})
that.setData({
isBtnAsh: true
})
return
}
if (that.data.ishow == true) { if (that.data.ishow == true) {
if (that.data.item == null) { if (that.data.item == null) {
wx.showToast({ wx.showToast({
...@@ -377,15 +412,26 @@ Page({ ...@@ -377,15 +412,26 @@ Page({
prescriptionPay: function () { prescriptionPay: function () {
let that = this; let that = this;
let hstr = new Array(); let hstr = new Array();
let healthcare = that.data.list.healthcare; // let healthcare = that.data.list.healthcare;
for (let i = 0; i < healthcare.length; i++) { // for (let i = 0; i < healthcare.length; i++) {
if (healthcare[i].checked) { // if (healthcare[i].checked) {
hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
} // }
// }
let {
unionid,openid
} = wx.getStorageSync('user');
if (unionid == undefined || unionid == ''){
wx.showModel({
title: '小懂提示:-99',
content: '当前小程序版本太低,请重启小程序再试!',
})
return
} }
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
patient_unionid: that.data.item.unionid, patient_unionid: unionid,
openid:openid,
modular: that.data.list.modular, modular: that.data.list.modular,
lastid: that.data.item.id, lastid: that.data.item.id,
address: that.data.receiveAddress.id, address: that.data.receiveAddress.id,
...@@ -393,7 +439,7 @@ Page({ ...@@ -393,7 +439,7 @@ Page({
money: that.data.list.money, money: that.data.list.money,
hstr: hstr.toString(), hstr: hstr.toString(),
isgd: 1, isgd: 1,
isInvoice:that.data.isInvoice, isInvoice: that.data.isInvoice,
// rise_need:that.data.isInvoice // rise_need:that.data.isInvoice
} }
// let data={ // let data={
...@@ -421,7 +467,7 @@ Page({ ...@@ -421,7 +467,7 @@ Page({
signType: 'MD5', signType: 'MD5',
paySign: res.data.parameter.paySign, paySign: res.data.parameter.paySign,
success(res) { success(res) {
console.log("success",res); console.log("success", res);
if (res.errMsg && res.errMsg == "requestPayment:ok") { if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok") console.log("requestPayment:ok")
wx.reLaunch({ wx.reLaunch({
...@@ -438,7 +484,7 @@ Page({ ...@@ -438,7 +484,7 @@ Page({
} }
}, },
fail(res) { fail(res) {
console.log("fail",res); console.log("fail", res);
wx.showToast({ wx.showToast({
title: '支付失败', title: '支付失败',
icon: 'none' icon: 'none'
......
...@@ -110,20 +110,12 @@ ...@@ -110,20 +110,12 @@
</view> </view>
</view> </view>
<view class="order-num"> <view class="order-num">
<text>开具发票</text> <text>是否需要随货纸质发票</text>
<!-- <radio-group class="radio-group" bindchange="radioChange"> <radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for="{{items}}" wx:key="key"> <label class="radio" wx:for="{{items}}" wx:key="key">
<radio value="{{item.value}}" checked="{{item.value==0?true : false}}" color='#1384ff' />{{item.name}} <radio value="{{item.value}}" checked="{{item.value==isInvoice}}" color='#1384ff' />{{item.name}}
</label> </label>
</radio-group> --> </radio-group>
<checkbox-group class="checkbox-group" bindchange="checkboxChange">
<label class="checkbox" wx:for="{{items}}" wx:key="key">
<checkbox value="{{item.value}}" checked="{{item.value==0?true : false}}" color='#1384ff' />{{item.name}}
</label>
</checkbox-group>
<!-- <label class="checkbox">
<checkbox value="{{item.value}}" checked="{{item.value==0?true : false}}" color='#1384ff'/>{{item.name}}
</label> -->
</view> </view>
<view class="tys" bindtap="agree"> <view class="tys" bindtap="agree">
<view wx:if='{{!agree}}' class="unselected"> <view wx:if='{{!agree}}' class="unselected">
......
...@@ -7,10 +7,10 @@ page { ...@@ -7,10 +7,10 @@ page {
background: rgb(242, 242, 242) background: rgb(242, 242, 242)
} }
/* checkbox { radio {
padding-top: 90rpx; transform: scale(.8);
transform: scale(.8); color: #1384ff;
} */ }
checkbox { checkbox {
transform: scale(.7); transform: scale(.7);
......
...@@ -273,12 +273,18 @@ Page({ ...@@ -273,12 +273,18 @@ Page({
//保存 //保存
sava: Util.debouce(function () { sava: Util.debouce(function () {
var that = this; var that = this;
that.setData({
sava: false
})
if (that.data.name == "") { if (that.data.name == "") {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '请填写正确的姓名', content: '请填写正确的姓名',
showCancel: false, showCancel: false,
}) })
that.setData({
sava: true
})
return; return;
} else if (that.data.phone == "") { } else if (that.data.phone == "") {
wx.showModal({ wx.showModal({
...@@ -358,6 +364,9 @@ Page({ ...@@ -358,6 +364,9 @@ Page({
content: '请填写正确的出生年月', content: '请填写正确的出生年月',
showCancel: false, showCancel: false,
}) })
that.setData({
sava: true
})
return; return;
} else if (that.data.GMSstate == 1 && that.data.GMSLength == 0) { } else if (that.data.GMSstate == 1 && that.data.GMSLength == 0) {
wx.showModal({ wx.showModal({
...@@ -365,6 +374,9 @@ Page({ ...@@ -365,6 +374,9 @@ Page({
content: '请填写过敏药物', content: '请填写过敏药物',
showCancel: false, showCancel: false,
}) })
that.setData({
sava: true
})
return; return;
} else if (that.data.GWBSstate == 1 && that.data.GWBSLength == 0) { } else if (that.data.GWBSstate == 1 && that.data.GWBSLength == 0) {
wx.showModal({ wx.showModal({
...@@ -372,10 +384,13 @@ Page({ ...@@ -372,10 +384,13 @@ Page({
content: '请填写过往病史', content: '请填写过往病史',
showCancel: false, showCancel: false,
}) })
that.setData({
sava: true
})
return; return;
} else if (that.data.idCard != '') { } else if (that.data.idCard != '') {
if (that.data.idType == 1 || that.data.idCard.substring(0, 2) == '65') { if (that.data.idType == 1 || that.data.idCard.substring(0, 2) == '65') {
var allData = wx.getStorageSync("data"); var allData = wx.getStorageSync("user");
var data var data
if (that.data.id == '') { if (that.data.id == '') {
data = { data = {
...@@ -618,7 +633,7 @@ Page({ ...@@ -618,7 +633,7 @@ Page({
var allData = wx.getStorageSync("data"); var allData = wx.getStorageSync("data");
if (that.data.id == '') { if (that.data.id == '') {
var data = { var data = {
unionid: allData.unionid, unionid:allData.unionid,
name: that.data.name, name: that.data.name,
card: that.data.idCard, card: that.data.idCard,
idType: that.data.idType, idType: that.data.idType,
......
...@@ -61,7 +61,7 @@ Page({ ...@@ -61,7 +61,7 @@ Page({
that.login = that.selectComponent("#login"); that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal"); that.modal = that.selectComponent("#modal");
that.answer = that.selectComponent("#answer"); that.answer = that.selectComponent("#answer");
if (wx.getStorageSync('data').unionid == undefined || wx.getStorageSync('data').unionid == '') { if (Util.isEmpty(wx.getStorageSync('data').unionid)) {
wx.login({ wx.login({
success: function (msg) { success: function (msg) {
Service.getOpenId(msg.code).then((res) => { Service.getOpenId(msg.code).then((res) => {
...@@ -364,9 +364,11 @@ Page({ ...@@ -364,9 +364,11 @@ Page({
// hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
// } // }
// } // }
let {unionid,openid}=wx.getStorageSync('user');
let data = { let data = {
id: that.data.options.scene, id: that.data.options.scene,
patient_unionid: that.data.item.unionid, openid:openid,
patient_unionid:unionid,
modular: that.data.list.modular, modular: that.data.list.modular,
lastid: that.data.item.id, lastid: that.data.item.id,
address: that.data.receiveAddress.id, address: that.data.receiveAddress.id,
......
...@@ -248,8 +248,7 @@ Page({ ...@@ -248,8 +248,7 @@ Page({
minBitrate: Number(options.minBitrate), minBitrate: Number(options.minBitrate),
audioVolumeType: options.audioVolumeType, audioVolumeType: options.audioVolumeType,
audioQuality: options.audioQuality, audioQuality: options.audioQuality,
roomFile:JSON.parse(options.roomFile), roomFile:JSON.parse(decodeURIComponent(options.roomFile)),
// pusher URL 参数 // pusher URL 参数
scene: options.scene, scene: options.scene,
encsmall: options.encsmall, encsmall: options.encsmall,
......
...@@ -156,6 +156,7 @@ Page({ ...@@ -156,6 +156,7 @@ Page({
var that = this; var that = this;
let data = {}; let data = {};
data.openid = wx.getStorageSync('user').openid; data.openid = wx.getStorageSync('user').openid;
// data.openid = 'oYQX40NLrhSABsJpu_5GbRTELTP4'
Service.getReportList(data).then((res) => { Service.getReportList(data).then((res) => {
if (!res) { if (!res) {
wx.showToast({ wx.showToast({
...@@ -165,11 +166,7 @@ Page({ ...@@ -165,11 +166,7 @@ Page({
}) })
return; return;
} }
if (res[0].length == 0 && res[1].length == 0) {
that.setData({
record404: true
})
} else {
that.structureDataUser(res[0]); that.structureDataUser(res[0]);
var con = res[1]; var con = res[1];
for (let i = 0; i < con.length; i++) { for (let i = 0; i < con.length; i++) {
...@@ -180,7 +177,11 @@ Page({ ...@@ -180,7 +177,11 @@ Page({
[`userReport.haveDone`]: con, [`userReport.haveDone`]: con,
isShow: true, isShow: true,
}) })
} if(con.length==0&&this.data.userReport.notDone.length==0){
that.setData({
record404: true
})
}
wx.stopPullDownRefresh(); wx.stopPullDownRefresh();
}) })
}, },
...@@ -199,6 +200,8 @@ Page({ ...@@ -199,6 +200,8 @@ Page({
json.push(e[j]) json.push(e[j])
} else {} } else {}
} }
console.log("structureDataUser",e)
that.setData({ that.setData({
['userReport.notDone']: json ['userReport.notDone']: json
}) })
......
@import '/common/common.wxss'; @import '/common/common.wxss';
page { page {
background: #f2f2f2; background: #fff;
border-top: 10rpx solid #f5f8fb; border-top: 10rpx solid #f5f8fb;
} }
......
...@@ -223,7 +223,7 @@ Page({ ...@@ -223,7 +223,7 @@ Page({
item.groupName = item.groupProfile.name; item.groupName = item.groupProfile.name;
return item; return item;
}); });
console.log("serviceList",JSON.stringify(serviceList)); // console.log("serviceList",JSON.stringify(serviceList));
that.setData({ that.setData({
serviceList: serviceList, serviceList: serviceList,
showview: true, showview: true,
......
...@@ -216,6 +216,7 @@ Page({ ...@@ -216,6 +216,7 @@ Page({
}, },
//支付 //支付
applyPay: function (e) { applyPay: function (e) {
console.log('e',e)
wx.showLoading({ wx.showLoading({
title: '正在生成', title: '正在生成',
mask: true mask: true
......
...@@ -19,14 +19,14 @@ Page({ ...@@ -19,14 +19,14 @@ Page({
paySuccess: false, paySuccess: false,
errshow: false, errshow: false,
items: [{ items: [{
name: '不需要', name: '是',
value: '0'
}, {
name: '需要',
value: '1' value: '1'
}, ], }, {
isInvoice: 0, //是否开具发票 name: '否',
isBtnAsh: true, //支付按钮置灰 value: '0'
}],
isInvoice: -1, //是否开具发票
isBtnAsh: true //支付按钮置灰
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -287,6 +287,16 @@ Page({ ...@@ -287,6 +287,16 @@ Page({
that.setData({ that.setData({
isBtnAsh: false isBtnAsh: false
}) })
let {
unionid
} = wx.getStorageSync('user');
if (Util.isEmpty(unionid)) {
that.login.showLogin();
that.setData({
isBtnAsh: true
})
return
}
if (that.data.receiveAddress.id == undefined) { if (that.data.receiveAddress.id == undefined) {
wx.showToast({ wx.showToast({
title: '请填写收货地址', title: '请填写收货地址',
...@@ -297,6 +307,17 @@ Page({ ...@@ -297,6 +307,17 @@ Page({
}) })
return return
} }
if (that.data.isInvoice== -1) {
wx.showToast({
title: '请选择是否需要随货纸质发票',
icon: 'none',
duration:2000
})
that.setData({
isBtnAsh: true
})
return
}
if (that.data.ishow == true) { if (that.data.ishow == true) {
if (that.data.item == null) { if (that.data.item == null) {
wx.showToast({ wx.showToast({
...@@ -347,15 +368,27 @@ Page({ ...@@ -347,15 +368,27 @@ Page({
prescriptionPay: function () { prescriptionPay: function () {
let that = this; let that = this;
let hstr = new Array(); let hstr = new Array();
let healthcare = that.data.list.healthcare; // let healthcare = that.data.list.healthcare;
for (let i = 0; i < healthcare.length; i++) { // for (let i = 0; i < healthcare.length; i++) {
if (healthcare[i].checked) { // if (healthcare[i].checked) {
hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
} // }
// }
let {
unionid,
openid
} = wx.getStorageSync('data');
if (unionid == undefined || unionid == '') {
wx.showModel({
title: '小懂提示:-99',
content: '当前小程序版本太低,请重启小程序再试!',
})
return
} }
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
patient_unionid: that.data.item.unionid, openid: openid,
patient_unionid: unionid,
modular: that.data.list.modular, modular: that.data.list.modular,
lastid: that.data.item.id, lastid: that.data.item.id,
address: that.data.receiveAddress.id, address: that.data.receiveAddress.id,
...@@ -363,6 +396,7 @@ Page({ ...@@ -363,6 +396,7 @@ Page({
money: that.data.list.money, money: that.data.list.money,
hstr: hstr.toString(), hstr: hstr.toString(),
isgd: 1, isgd: 1,
isInvoice: that.data.isInvoice,
// rise_need:that.data.isInvoice // rise_need:that.data.isInvoice
} }
Service.prescriptionPay(data).then((res) => { Service.prescriptionPay(data).then((res) => {
...@@ -446,6 +480,17 @@ Page({ ...@@ -446,6 +480,17 @@ Page({
isBtnAsh: true isBtnAsh: true
}) })
return; return;
default:
wx.hideLoading();
wx.showModal({
title: '提示',
showCancel: false,
content: res.msg,
})
that.setData({
isBtnAsh: true
})
return;
} }
}) })
}, },
...@@ -475,7 +520,7 @@ Page({ ...@@ -475,7 +520,7 @@ Page({
} }
}) })
}, },
/** /**
* *
*/ */
hideModal() { hideModal() {
......
...@@ -107,14 +107,14 @@ ...@@ -107,14 +107,14 @@
<text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text> <text class="fonw-400" style="font-size: 28rpx;">{{list.freight}}</text>
</view> </view>
</view> </view>
<!-- <view class="order-num"> <view class="order-num">
<text>纸质发票</text> <text>是否需要随货纸质发票</text>
<radio-group class="radio-group" bindchange="radioChange"> <radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for="{{items}}" wx:key="key"> <label class="radio" wx:for="{{items}}" wx:key="key">
<radio value="{{item.value}}" checked="{{item.value==0?true : false}}" color='#1384ff' />{{item.name}} <radio value="{{item.value}}" checked="{{item.value==isInvoice}}" color='#1384ff' />{{item.name}}
</label> </label>
</radio-group> </radio-group>
</view> --> </view>
<view class="tys" bindtap="agree"> <view class="tys" bindtap="agree">
<view wx:if='{{!agree}}' class="unselected"> <view wx:if='{{!agree}}' class="unselected">
</view> </view>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<text class="tys-text">我已阅读并接受</text> <text class="tys-text">我已阅读并接受</text>
<text class="zqtys" catchtap="goConsent">《知情同意书》</text> <text class="zqtys" catchtap="goConsent">《知情同意书》</text>
</view> </view>
<view class="tsy">根据药品实际仓储位置,您的订单可能分开发货</view> <view class="tsy">根据您的收货地址,若顺丰无法送达,则采用邮政发货。</view>
<view class="tsy">遇到任何问题请拨打客服电话:<text bindtap='dial' data-tel='4001199218' style="color:#2684ff;">4001199218</text></view> <view class="tsy">遇到任何问题请拨打客服电话:<text bindtap='dial' data-tel='4001199218' style="color:#2684ff;">4001199218</text></view>
<view class="user-logo"> <view class="user-logo">
<image src="/images/xdjklogo.png"></image> <image src="/images/xdjklogo.png"></image>
......
@import '/components/modal/modal.wxss'; @import '/components/modal/modal.wxss';
@import '/components/cu-modal.wxss'; @import '/components/cu-modal.wxss';
page { page {
width: 750rpx; width: 750rpx;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
background: rgb(242, 242, 242) background: rgb(242, 242, 242)
} }
checkbox { /* checkbox {
padding-top: 90rpx; padding-top: 90rpx;
transform: scale(.8); transform: scale(.8);
} } */
radio { radio {
transform: scale(.8);
color: #1384ff;
}
checkbox {
transform: scale(.7); transform: scale(.7);
color: #1384ff; color: #1384ff;
} }
.radio { .checkbox {
font-size: 28rpx; font-size: 28rpx;
} }
/*checkbox未选中时样式 */ /*checkbox未选中时样式 */
checkbox .wx-checkbox-input { checkbox .wx-checkbox-input {
/* 自定义样式.... */ /* 自定义样式.... */
...@@ -38,6 +46,12 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -38,6 +46,12 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
color: #fff; color: #fff;
} }
.checkbox-group {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.wrap { .wrap {
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -109,7 +123,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -109,7 +123,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
/* align-items: center; */ /* align-items: center; */
} }
.ml-15 { .ml-15 {
...@@ -225,11 +239,13 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -225,11 +239,13 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.list1{
.list1 {
padding: 0; padding: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.list-item, .list-item,
.list-item1 { .list-item1 {
display: flex; display: flex;
...@@ -238,18 +254,20 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -238,18 +254,20 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
padding-bottom: 42rpx; padding-bottom: 42rpx;
padding-top: 42rpx; padding-top: 42rpx;
} }
.list-item2
{ .list-item2 {
display: flex; display: flex;
width: 100%; width: 100%;
} }
.br{
margin: 30rpx; .br {
background-color:#F5F8FB; margin: 30rpx;
background-color: #F5F8FB;
height: 2rpx; height: 2rpx;
width: 530rpx; width: 530rpx;
} }
.list-item image, .list-item image,
.list-item1 image { .list-item1 image {
width: 155rpx; width: 155rpx;
...@@ -284,8 +302,14 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -284,8 +302,14 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
font-weight: 600; font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.errname{
.errname {
width: 400rpx; width: 400rpx;
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
...@@ -298,6 +322,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -298,6 +322,7 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
text-overflow: ellipsis; text-overflow: ellipsis;
/*超出部分文字以...显示*/ /*超出部分文字以...显示*/
} }
.firm { .firm {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
...@@ -323,10 +348,12 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -323,10 +348,12 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
.pirce { .pirce {
color: #EC5B68; color: #EC5B68;
} }
.err_msg{
.err_msg {
color: #EC5B68; color: #EC5B68;
font-weight: 700; font-weight: 700;
} }
.pirce text:first-child { .pirce text:first-child {
font-size: 24rpx; font-size: 24rpx;
} }
...@@ -341,11 +368,13 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -341,11 +368,13 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
margin-top: 5rpx; margin-top: 5rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.errnumber{
.errnumber {
display: flex; display: flex;
margin-top: 5rpx; margin-top: 5rpx;
font-size: 20rpx; font-size: 20rpx;
} }
.order-list { .order-list {
border-top: 20rpx solid rgb(242, 242, 242); border-top: 20rpx solid rgb(242, 242, 242);
} }
...@@ -612,40 +641,45 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { ...@@ -612,40 +641,45 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
width: 650rpx; width: 650rpx;
height: 104rpx; height: 104rpx;
} }
.err-title{
font-size: 32rpx; .err-title {
font-weight: 700; font-size: 32rpx;
text-align: center; font-weight: 700;
color: #333333; text-align: center;
margin-bottom: 50rpx; color: #333333;
margin-bottom: 50rpx;
} }
.err-image{
height: 120rpx!important; .err-image {
width: 120rpx!important; height: 120rpx !important;
width: 120rpx !important;
} }
.err-btn{
margin:0rpx auto; .err-btn {
margin: 0rpx auto;
margin-top: 30rpx; margin-top: 30rpx;
width: 510rpx; width: 510rpx;
height: 66rpx; height: 66rpx;
line-height: 66rpx; line-height: 66rpx;
background-color: #2684ff; background-color: #2684ff;
font-size: 26rpx; font-size: 26rpx;
border-radius: 33rpx; border-radius: 33rpx;
} }
/* 弹框 */ /* 弹框 */
.shade { .shade {
display: block; display: block;
position: fixed; position: fixed;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.3);
z-index: 1001; z-index: 1001;
} }
.modal-title{
.modal-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
\ No newline at end of file
...@@ -94,6 +94,12 @@ ...@@ -94,6 +94,12 @@
"pathName": "pages/docuterInfo/docuterInfo", "pathName": "pages/docuterInfo/docuterInfo",
"query": "t_unitid=18870", "query": "t_unitid=18870",
"scene": 1008 "scene": 1008
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"scene": null
} }
] ]
} }
......
...@@ -28,7 +28,7 @@ function getUserSig(user) { ...@@ -28,7 +28,7 @@ function getUserSig(user) {
let getUserSigUrl = config.url.getUserSig; let getUserSigUrl = config.url.getUserSig;
let data = { let data = {
"user": user "user": user
// "user": "oHhp80bZb-BpXBeyL9EHX1SSoAfU" // "user": "oHhp80WZGTyZNT8dD0_cGz0_bwgI"
} }
return wxRequest.getRequest(getUserSigUrl, data); return wxRequest.getRequest(getUserSigUrl, data);
}; };
...@@ -50,7 +50,7 @@ function getUserData(openid) { ...@@ -50,7 +50,7 @@ function getUserData(openid) {
let getUserDataUrl = config.url.getUserData; let getUserDataUrl = config.url.getUserData;
let data = {}; let data = {};
data.openid = openid; data.openid = openid;
// data.openid='oYQX40AHxKlrHu_fVDrp4u486tsY' // data.openid='oYQX40IIkeCSa2Kb_5UmEKkrUcH0'
return wxRequest.postRequest(getUserDataUrl, data); return wxRequest.postRequest(getUserDataUrl, data);
}; };
/** /**
......
...@@ -188,7 +188,7 @@ function formatLocation(longitude, latitude) { ...@@ -188,7 +188,7 @@ function formatLocation(longitude, latitude) {
} }
//非空判断 //非空判断
function isEmpty(obj) { function isEmpty(obj) {
if (!obj || obj == "undefined" || obj == null || obj == 'null' || obj == "") { if (!obj || obj == "undefined" || obj == null || obj == 'null' || obj == "" || obj == undefined) {
return true; return true;
} else { } else {
return false; return false;
......
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