Commit bdb5b227 by liuquan

修复bug

parent 48651c12
......@@ -56,6 +56,7 @@ App({
},
onShow: function () {
console.log("onShow")
this.forcedUpdate();
},
onHide: function () {
console.log("onHide")
......
......@@ -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"
}
\ No newline at end of file
......@@ -612,9 +612,10 @@ Page({
wx.getSetting({
withSubscriptions: true,
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['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'] == 'accept') {
if (itemSettings['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'] == 'accept' && itemSettings['FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'] == 'accept') {
that.setData({
remind: false
});
......@@ -644,9 +645,12 @@ Page({
that.setData({
remind: false
})
wx.requestSubscribeMessage({
tmplIds: ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY'],
success(res) {}
tmplIds: ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'],
success(res) {
console.log('requestSubscribeMessage', res)
}
})
that.checkDeviceAuthorize().then((result) => {
console.log('%c授权成功', 'color:#04BE02', result)
......@@ -654,6 +658,24 @@ Page({
console.log('没有授权', error)
})
},
tmplArr() {
let arr=[];
wx.getSetting({
withSubscriptions: true,
success(res) {
let itemSettings = !Util.isEmpty(res.subscriptionsSetting) ? res.subscriptionsSetting.itemSettings : "";
console.log('itemSettings', res, itemSettings)
if (itemSettings) {
arr=itemSettings.map((item)=>{
})
}else{
arr= ['d33RkZvTz6O8Zjw8b8faoKIQGXA0cJJ2G24_kIWQjtY', 'FfvTlT9HNBt1zHNWKYUBs5dJ5n-bG7bcVpPcVZrH8jk'];
}
}
})
return arr;
},
/**
* 服务提前结束 0同意 1拒绝
*/
......@@ -719,7 +741,7 @@ Page({
status: true,
serviceName: res.data.name
})
if( res.data.counsel=="20"){
if (res.data.counsel == "20") {
that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid);
}
return
......@@ -729,8 +751,8 @@ Page({
end_time: '',
serviceName: '未知',
})
if( res.data.counsel=="20"){
that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid);
if (res.data.counsel == "20") {
that.getFreeChat(that.data.t_unionid, wx.getStorageSync('data').unionid);
}
break;
}
......
......@@ -55,7 +55,7 @@ Page({
that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal");
that.answer = that.selectComponent("#answer");
if (wx.getStorageSync('data').unionid == undefined || wx.getStorageSync('data').unionid == '') {
if (Util.isEmpty(wx.getStorageSync('data').unionid)) {
wx.login({
success: function (msg) {
Service.getOpenId(msg.code).then((res) => {
......@@ -405,11 +405,19 @@ Page({
// }
// }
let {
unionid
unionid,openid
} = wx.getStorageSync('user');
if (unionid == undefined || unionid == ''){
wx.showModel({
title: '小懂提示:-99',
content: '当前小程序版本太低,请重启小程序再试!',
})
return
}
let data = {
payid: that.data.list.payid,
patient_unionid: unionid,
openid:openid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
......
......@@ -61,7 +61,7 @@ Page({
that.login = that.selectComponent("#login");
that.modal = that.selectComponent("#modal");
that.answer = that.selectComponent("#answer");
if (wx.getStorageSync('data').unionid == undefined || wx.getStorageSync('data').unionid == '') {
if (Util.isEmpty(wx.getStorageSync('data').unionid)) {
wx.login({
success: function (msg) {
Service.getOpenId(msg.code).then((res) => {
......@@ -364,9 +364,10 @@ Page({
// hstr.push(healthcare[i].id);
// }
// }
let {unionid}=wx.getStorageSync('data');
let {unionid,openid}=wx.getStorageSync('user');
let data = {
id: that.data.options.scene,
openid:openid,
patient_unionid:unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
......
......@@ -216,6 +216,7 @@ Page({
},
//支付
applyPay: function (e) {
console.log('e',e)
wx.showLoading({
title: '正在生成',
mask: true
......
......@@ -228,15 +228,15 @@ Page({
})
}
},
/**
/**
* 是否需要开具纸质发票
* @param {*} e
*/
checkboxChange: function (e) {
this.setData({
isInvoice: e.detail.value[0]==1?1:0,
})
},
checkboxChange: function (e) {
this.setData({
isInvoice: e.detail.value[0] == 1 ? 1 : 0,
})
},
/**
* 拨打电话
*/
......@@ -291,7 +291,9 @@ Page({
that.setData({
isBtnAsh: false
})
let {unionid}=wx.getStorageSync('user');
let {
unionid
} = wx.getStorageSync('user');
if (Util.isEmpty(unionid)) {
that.login.showLogin();
that.setData({
......@@ -365,11 +367,21 @@ Page({
// hstr.push(healthcare[i].id);
// }
// }
let {unionid}=wx.getStorageSync('data');
let {
unionid,
openid
} = wx.getStorageSync('data');
if (unionid == undefined || unionid == '') {
wx.showModel({
title: '小懂提示:-99',
content: '当前小程序版本太低,请重启小程序再试!',
})
return
}
let data = {
payid: that.data.list.payid,
patient_unionid:unionid,
openid: openid,
patient_unionid: unionid,
modular: that.data.list.modular,
lastid: that.data.item.id,
address: that.data.receiveAddress.id,
......@@ -377,7 +389,7 @@ Page({
money: that.data.list.money,
hstr: hstr.toString(),
isgd: 1,
isInvoice:that.data.isInvoice,
isInvoice: that.data.isInvoice,
// rise_need:that.data.isInvoice
}
Service.prescriptionPay(data).then((res) => {
......@@ -501,7 +513,7 @@ Page({
}
})
},
/**
/**
*
*/
hideModal() {
......
......@@ -94,6 +94,12 @@
"pathName": "pages/docuterInfo/docuterInfo",
"query": "t_unitid=18870",
"scene": 1008
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"scene": null
}
]
}
......
......@@ -50,7 +50,7 @@ function getUserData(openid) {
let getUserDataUrl = config.url.getUserData;
let data = {};
data.openid = openid;
// data.openid='oYQX40NLrhSABsJpu_5GbRTELTP4'
// data.openid='oYQX40IIkeCSa2Kb_5UmEKkrUcH0'
return wxRequest.postRequest(getUserDataUrl, data);
};
/**
......
......@@ -188,7 +188,7 @@ function formatLocation(longitude, latitude) {
}
//非空判断
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;
} else {
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