锦水居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

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