|
|
|
var api = require("../../utils/api.js")
|
|
|
|
const app = getApp()
|
|
|
|
Page({
|
|
|
|
data: {
|
|
|
|
code: "",
|
|
|
|
checked: true,
|
|
|
|
experience: "",
|
|
|
|
nvabarData: {
|
|
|
|
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
|
|
|
title: "注册", //导航栏 中间的标题
|
|
|
|
},
|
|
|
|
height: app.globalData.height * 2 + 20,
|
|
|
|
},
|
|
|
|
onLoad () {
|
|
|
|
// wx.setNavigationBarColor({
|
|
|
|
// frontColor: '#ffffff',
|
|
|
|
// backgroundColor: '#FC383B',
|
|
|
|
// animation: {
|
|
|
|
// duration: 400,
|
|
|
|
// timingFunc: 'easeIn'
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
let that = this
|
|
|
|
const versionNum = "1.7.12"
|
|
|
|
api.getScanSwitch(versionNum).then(function (res) {
|
|
|
|
console.log(res.data)
|
|
|
|
let state = res.data ? res.data.scanFlag : '1'
|
|
|
|
that.setData({
|
|
|
|
experience: state
|
|
|
|
})
|
|
|
|
|
|
|
|
// if (state == '0') { // 跳过扫码
|
|
|
|
// // app.globalData.tempGridId = '1169158285790900226' //'1191534416067149825'
|
|
|
|
// wx.reLaunch({
|
|
|
|
// url: '/pages/index/index?scene=1169158285790900226'
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
// console.log('code2:', options.code)
|
|
|
|
// this.setData({
|
|
|
|
// code: options.code
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
experience () {
|
|
|
|
app.globalData.tempGridId = "1233274128467787777" //1233592630168813569
|
|
|
|
wx.reLaunch({
|
|
|
|
url: "/pages/indexNew/indexNew?scene=1233274128467787777"
|
|
|
|
})
|
|
|
|
},
|
|
|
|
scan () {
|
|
|
|
wx.scanCode({
|
|
|
|
success: (res) => {
|
|
|
|
console.log("扫码结果",res);
|
|
|
|
console.log("/"+decodeURIComponent(res.path));
|
|
|
|
wx.reLaunch({
|
|
|
|
url: "/"+decodeURIComponent(res.path)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
fail: (res) => {
|
|
|
|
console.log(res);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
toAgreement () {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/subpages/home/pages/agreement/agreement"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|