Commit 8dfbfbd2 by liuquan

修复支付

parent 8a549ed2
......@@ -128,7 +128,7 @@ Component({
})
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.checkDeviceAuthorize().then((result) => {
console.log('授权成功', result)
......@@ -241,9 +241,10 @@ Component({
// 组件所在页面的生命周期函数
/**组件调用时监听im视频通话消息 */
show: function () {
console.log("pageshow")
let that = this;
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 data = JSON.parse(event.data[index].payload.data);
//判断当前消息为视频通话并且无正在进行中的视频请求时弹出
......@@ -280,6 +281,7 @@ Component({
this.setData({
onMessageReceived: onMessageReceived
})
// console.log(this.data.onMessageReceived)
Tim.tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.data.onMessageReceived);
},
......
......@@ -147,6 +147,7 @@ Component({
// }
// 经历了 5001 浮窗关闭事件,小程序底层会自动退房,恢复小程序时组件需要重新进房
// 重新进房
console.log('pageLifetimes-show',this.data.config)
this.enterRoom({ roomID: this.data.config.roomID }).then(()=>{
// 进房后开始推送视频或音频
// setTimeout(()=>{
......@@ -335,6 +336,7 @@ Component({
console.log(theTiem);
let config= that.data.config;
config.roomFile.callduration=theTiem;
console.log('config',config)
that.setData({
config:config
})
......@@ -1671,6 +1673,7 @@ Component({
const userID = this.data.config.userID
this._searchGroup({ roomID }).then((imResponse) => {
// 查询群资料,判断是否为群主
console.log('_searchGroup',imResponse.data.group.ownerID,userID)
if (imResponse.data.group.ownerID === userID && userList.length === 0) {
// 如果 userList 为 0 群主可以解散群,并登出IM
this._dismissGroup({ roomID }).then(()=>{
......
......@@ -62,16 +62,16 @@ Page({
Service.getOpenId(msg.code).then((res) => {
wx.setStorageSync('user', res)
return Service.getUserData(res.openid)
}).then((res) => {
if (Util.isEmpty(res.unionid)) {
}).then((res1) => {
if (Util.isEmpty(res1.unionid)) {
that.login.showLogin();
} else {
wx.setStorageSync('data', res)
wx.setStorageSync('data', res1)
if (that.data.options.isQuick == 0) {
// 正常开药
that.getPrescribe(that.data.options.scene, res.unionid)
that.getPrescribe(that.data.options.scene, res1.unionid)
} else {
that.getQuick(that.data.options.scene, res.unionid)
that.getQuick(that.data.options.scene, res1.unionid)
}
}
})
......@@ -377,15 +377,16 @@ Page({
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 healthcare = that.data.list.healthcare;
// for (let i = 0; i < healthcare.length; i++) {
// if (healthcare[i].checked) {
// hstr.push(healthcare[i].id);
// }
// }
let {unionid}=wx.getStorageSync('user');
let data = {
payid: that.data.list.payid,
patient_unionid: that.data.item.unionid,
patient_unionid: unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
......
......@@ -364,9 +364,10 @@ Page({
// hstr.push(healthcare[i].id);
// }
// }
let {unionid}=wx.getStorageSync('user');
let data = {
id: that.data.options.scene,
patient_unionid: that.data.item.unionid,
patient_unionid:unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
......
......@@ -248,8 +248,7 @@ Page({
minBitrate: Number(options.minBitrate),
audioVolumeType: options.audioVolumeType,
audioQuality: options.audioQuality,
roomFile:JSON.parse(options.roomFile),
roomFile:JSON.parse(decodeURIComponent(options.roomFile)),
// pusher URL 参数
scene: options.scene,
encsmall: options.encsmall,
......
......@@ -357,9 +357,10 @@ Page({
hstr.push(healthcare[i].id);
}
}
let {unionid}=wx.getStorageSync('user');
let data = {
payid: that.data.list.payid,
patient_unionid: that.data.item.unionid,
patient_unionid: unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
......
......@@ -28,7 +28,7 @@ function getUserSig(user) {
let getUserSigUrl = config.url.getUserSig;
let data = {
"user": user
// "user": "oHhp80bZb-BpXBeyL9EHX1SSoAfU"
// "user": "oHhp80WZGTyZNT8dD0_cGz0_bwgI"
}
return wxRequest.getRequest(getUserSigUrl, data);
};
......@@ -50,7 +50,7 @@ function getUserData(openid) {
let getUserDataUrl = config.url.getUserData;
let data = {};
data.openid = openid;
// data.openid='oYQX40AHxKlrHu_fVDrp4u486tsY'
// data.openid='oYQX40AcNx-pgl2fdqGOcJFvHKns'
return wxRequest.postRequest(getUserDataUrl, data);
};
/**
......
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