|
|
@@ -2,6 +2,7 @@
|
|
|
const Constants = require('@/utils/Constants.js');
|
|
|
const mixins = require('@/mixins/index.js');
|
|
|
const app = getApp()
|
|
|
+const util = require('@/utils/util.js')
|
|
|
const api = require('@/utils/api.js');
|
|
|
Page({
|
|
|
mixins: [mixins],
|
|
|
@@ -12,7 +13,8 @@ Page({
|
|
|
needHelpUserNumber: 5,
|
|
|
powerModelShowFlag: true,
|
|
|
menuButtonTop: 48,
|
|
|
- params: {}
|
|
|
+ params: {},
|
|
|
+ helpFlag: true
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -123,14 +125,19 @@ Page({
|
|
|
console.log('helpMe');
|
|
|
_this.wxlogin().then(res => {
|
|
|
_this.getopenid({ code: res.code }).then(res => {
|
|
|
- console.log('res', res);
|
|
|
if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
const openid = res.data.data.openid
|
|
|
let service = app.globalData['couponReceiveService']
|
|
|
const params = _this.data.params
|
|
|
params.userWxid = openid
|
|
|
_this.excute(service, 'insert_coupon_send', params).then(res => {
|
|
|
-
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
+ util.showToast('助力成功!')
|
|
|
+ this.setData({
|
|
|
+ helpFlag: false,
|
|
|
+ powerModelShowFlag: false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
})
|