Commit 48651c12 by liuquan

no message

parent d3bfcf5f
...@@ -21,10 +21,9 @@ Page({ ...@@ -21,10 +21,9 @@ Page({
items: [{ items: [{
name: '', name: '',
value: '1' value: '1'
}, }, ],
], isInvoice: 0, //是否开具发票
isInvoice:0,//是否开具发票 isBtnAsh: true, //支付按钮置灰
isBtnAsh:true,//支付按钮置灰
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -88,7 +87,9 @@ Page({ ...@@ -88,7 +87,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 +134,9 @@ Page({ ...@@ -133,7 +134,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 +226,9 @@ Page({ ...@@ -223,7 +226,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();
...@@ -248,7 +253,7 @@ Page({ ...@@ -248,7 +253,7 @@ Page({
*/ */
checkboxChange: function (e) { checkboxChange: function (e) {
this.setData({ this.setData({
isInvoice: e.detail.value[0]==1?1:0, isInvoice: e.detail.value[0] == 1 ? 1 : 0,
}) })
}, },
/** /**
...@@ -263,7 +268,9 @@ Page({ ...@@ -263,7 +268,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 +280,9 @@ Page({ ...@@ -273,7 +280,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 +294,9 @@ Page({ ...@@ -285,7 +294,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 +328,16 @@ Page({ ...@@ -317,6 +328,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: '请填写收货地址',
...@@ -383,7 +404,9 @@ Page({ ...@@ -383,7 +404,9 @@ Page({
// hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
// } // }
// } // }
let {unionid}=wx.getStorageSync('data'); let {
unionid
} = wx.getStorageSync('user');
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
patient_unionid: unionid, patient_unionid: unionid,
...@@ -394,7 +417,7 @@ Page({ ...@@ -394,7 +417,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={
...@@ -422,7 +445,7 @@ Page({ ...@@ -422,7 +445,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({
...@@ -439,7 +462,7 @@ Page({ ...@@ -439,7 +462,7 @@ Page({
} }
}, },
fail(res) { fail(res) {
console.log("fail",res); console.log("fail", res);
wx.showToast({ wx.showToast({
title: '支付失败', title: '支付失败',
icon: 'none' icon: 'none'
......
...@@ -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,6 +177,10 @@ Page({ ...@@ -180,6 +177,10 @@ 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,
......
...@@ -291,6 +291,14 @@ Page({ ...@@ -291,6 +291,14 @@ 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: '请填写收货地址',
...@@ -357,6 +365,7 @@ Page({ ...@@ -357,6 +365,7 @@ Page({
// hstr.push(healthcare[i].id); // hstr.push(healthcare[i].id);
// } // }
// } // }
let {unionid}=wx.getStorageSync('data'); let {unionid}=wx.getStorageSync('data');
let data = { let data = {
payid: that.data.list.payid, payid: that.data.list.payid,
......
...@@ -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='oYQX40AcNx-pgl2fdqGOcJFvHKns' // data.openid='oYQX40NLrhSABsJpu_5GbRTELTP4'
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