Commit a1a97872 by 高淑倩

modify:激活领卡

parent e4d4f44a
// pages/activateCard/activateCardCallback.js // pages/activateCard/activateCardCallback.js
Page({ const app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
var wxbarcode = require('../../codeUtils/index.js');
wxService.page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -25,10 +30,27 @@ Page({ ...@@ -25,10 +30,27 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow () {
wx.showLoading({
title: '加载中'
})
// this.handleGoActivateCard()
},
handleGoActivateCard() {
wxService.post(`/coupon/coupon/get?cardNo=${1111}`).then(res => {
const {result,data} = res.data
if(result == 0){
// wx.hideLoading()
wxService.router(`/pages/userCenter/userCenter`)
} else {
// wx.hideLoading()
wx.showToast({
title: `${res.desc}`,
icon: 'none'
})
}
})
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
<!--pages/activateCard/activateCardCallback.wxml--> <!--pages/activateCard/activateCardCallback.wxml-->
<text>pages/activateCard/activateCardCallback.wxml</text>
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