45 lines
905 B
JavaScript
45 lines
905 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() {
|
|
console.log('---', this.renderer)
|
|
},
|
|
onShow() {
|
|
|
|
},
|
|
test: throttle(function() {
|
|
console.log('test', this.data.motto)
|
|
}, 500),
|
|
payment: function() {
|
|
wx.requestPayment({
|
|
timeStamp: `${Date.now()}`,
|
|
nonceStr: 'qwertyuiop',
|
|
package: 'prepay_id=111',
|
|
signType: 'MD5',
|
|
paySign: '11',
|
|
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
|
|
})
|
|
}
|
|
})
|