electricity_bill_calc_wx/pages/index/index.js
2024-04-15 08:29:44 +08:00

45 lines
850 B
JavaScript

import { throttle } from "../../utils/index"
Page({
data: {
motto: 'Hello World',
num: 1,
staffA: {firstName: 'Hulk', lastName: 'Hu'},
staffB: {firstName: 'Shang', lastName: 'You'},
staffC: {firstName: 'Gideon', lastName: 'Lin'}
},
onLoad() {
},
onShow() {
},
test: throttle(function() {
}, 500),
payment: function() {
wx.requestPayment({
timeStamp: data?.time,
nonceStr: data?.nonceStr,
package: "prepay_id=" + data?.prepay_id,
paySign: data?.paySign,
signType: 'RSA',
success (res) {
console.log('success', res);
},
fail (res) {
console.log('res', res)
}
})
},
kefu(e) {
console.log('e', e);
},
increment() {
// this.data.num = this.data.num +=1 ;
this.setData({
num: this.data.num + 1
})
}
})