[体验官活动]
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
Page({
|
||||
data: {
|
||||
barHeight : getApp().globalData.barHeight, // 状态栏高度
|
||||
openId : '',
|
||||
nameValue : '', // 姓名
|
||||
testTitle : '',
|
||||
nameStatus : false, // 姓名填写弹框
|
||||
@@ -20,19 +19,8 @@ Page({
|
||||
onLoad(options) {
|
||||
// 体验官 type=1或者type=2 直接面检,不用交钱
|
||||
this.setData({
|
||||
refertoType: options.type
|
||||
refertoType: options.type || 0
|
||||
})
|
||||
this.setData({
|
||||
openId: options.code
|
||||
})
|
||||
if(options) {
|
||||
wx.login({
|
||||
success: res => {
|
||||
// 获取openid
|
||||
this.openInfo(res.code)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
@@ -47,18 +35,6 @@ Page({
|
||||
this.ifAnalyze();
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* openid
|
||||
*/
|
||||
openInfo(code) {
|
||||
wx.$api.auth.codeOpenid({code: code}).then(res => {
|
||||
this.setData({
|
||||
openId: res.data
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 是否可检测
|
||||
*/
|
||||
@@ -192,11 +168,12 @@ Page({
|
||||
* 确认支付1元
|
||||
*/
|
||||
payBtn(orderid) {
|
||||
|
||||
wx.showLoading({
|
||||
title: '支付中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.index.skinPay(orderid,{type: 'miniapp', openid: this.data.openId}).then(res=>{
|
||||
wx.$api.index.skinPay(orderid,{type: 'miniapp', openid: wx.getStorageSync("openid")}).then(res=>{
|
||||
wx.hideLoading()
|
||||
let payInfo = JSON.parse(res.data.wechat)
|
||||
wx.requestPayment({
|
||||
|
||||
Reference in New Issue
Block a user