Commit 8dfbfbd2 by liuquan

修复支付

parent 8a549ed2
...@@ -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(()=>{
......
...@@ -62,16 +62,16 @@ Page({ ...@@ -62,16 +62,16 @@ Page({
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)
} }
} }
}) })
...@@ -377,15 +377,16 @@ Page({ ...@@ -377,15 +377,16 @@ 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}=wx.getStorageSync('user');
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
patient_unionid: that.data.item.unionid, 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,
......
...@@ -364,9 +364,10 @@ Page({ ...@@ -364,9 +364,10 @@ Page({
// hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
// } // }
// } // }
let {unionid}=wx.getStorageSync('user');
let data = { let data = {
id: that.data.options.scene, id: that.data.options.scene,
patient_unionid: that.data.item.unionid, 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,
......
...@@ -357,9 +357,10 @@ Page({ ...@@ -357,9 +357,10 @@ Page({
hstr.push(healthcare[i].id); hstr.push(healthcare[i].id);
} }
} }
let {unionid}=wx.getStorageSync('user');
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
patient_unionid: that.data.item.unionid, 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,
......
...@@ -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='oYQX40AcNx-pgl2fdqGOcJFvHKns'
return wxRequest.postRequest(getUserDataUrl, data); 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