- Fix hospital/service/caregiver images blank by prepending baseUrl for relative paths
- Add icon name mapping and resolveIcon() for service icon fallback
- Fix login phone field: res.phone -> res.data.phoneNumber
- Fix pagination stuck at page 1 in mechanism.js and qianbao.js
- Fix response parsing to handle both {code:200} and {erro:0} formats
- Replace raw wx.request calls with unified request() utility (6+ instances)
- Fix hardcoded phone number exposure in orderdetail.js
- Fix broken privacy URL (http: -> https://)
- Fix expired date range in goddess.wxml (2025 -> 2030)
- Remove duplicate refund box in orderdetail.wxml
- Fix service icon fallback ternary logic
- Add proper error handling replacing empty .catch() blocks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
149 lines
2.4 KiB
JavaScript
149 lines
2.4 KiB
JavaScript
const app = getApp()
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
bindNameInput: function (e) {
|
|
this.setData({
|
|
name: e.detail.value
|
|
})
|
|
},
|
|
bindPhoneInput: function (e) {
|
|
this.setData({
|
|
jzphone: e.detail.value
|
|
})
|
|
},
|
|
bindAdressInput: function (e) {
|
|
this.setData({
|
|
address: e.detail.value
|
|
})
|
|
},
|
|
|
|
// 确认支付
|
|
confirm_payy: async function () {
|
|
// wx.showToast({
|
|
// title: '点击了',
|
|
// icon: 'none'
|
|
// });
|
|
var that = this;
|
|
if (!this.data.is_ok_click) {
|
|
that.setData({
|
|
is_ok_click: true
|
|
})
|
|
//你要执行的操作
|
|
this.payment()
|
|
setTimeout(function () {
|
|
that.setData({
|
|
is_ok_click: false
|
|
})
|
|
}, 10000) //阻止一秒点击多次
|
|
} else {
|
|
// wx.showToast({ title:'请勿重复操作!', icon: 'none' });
|
|
}
|
|
},
|
|
|
|
onClose() {
|
|
this.setData({
|
|
show: false
|
|
});
|
|
},
|
|
|
|
xieyi(e){
|
|
wx.navigateTo({
|
|
url: "/pages/webpage/webpage?url=" + 'https://www.baidu.com'
|
|
})
|
|
},
|
|
|
|
// goDoc(e){
|
|
// const staticDoc = {
|
|
// "aa": "https://xxxx.com/aa.html?type=bb"
|
|
// }
|
|
// let doc = e.currentTarget.dataset.doc;
|
|
// wx.navigateTo({
|
|
// url: "/pages/webview/index?url=" + encodeURIComponent(staticDoc[doc]) // 解码
|
|
// })
|
|
// }
|
|
|
|
|
|
|
|
bindDateChange: function (e) {
|
|
this.setData({
|
|
seckill_start: e.detail.value
|
|
})
|
|
},
|
|
|
|
onClickLeft() {
|
|
wx.navigateBack()
|
|
},
|
|
onChange(e) {
|
|
this.setData({
|
|
timeData: e.detail,
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (e) {
|
|
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
|
|
this.setData({
|
|
statusBarHeight: statusBarHeight,
|
|
height: 46 + statusBarHeight,
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
},
|
|
|
|
|
|
}) |