|
@@ -7,6 +7,7 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
+ exitApp: false,
|
|
|
canIUse: wx.canIUse('button.open-type.getUserInfo')
|
|
|
},
|
|
|
|
|
@@ -14,6 +15,7 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+ let self = this
|
|
|
prevpage = options.prevpage ? options.prevpage : '/pages/index/index'
|
|
|
if (options.prevpage && options.querys) {
|
|
|
let querys = ''
|
|
@@ -23,6 +25,15 @@ Page({
|
|
|
querys = '?' + querys.slice(0, querys.length - 1)
|
|
|
prevpage = prevpage + querys
|
|
|
}
|
|
|
+ wx.getSystemInfo({
|
|
|
+ success: function(res) {
|
|
|
+ if (res.SDKVersion >= '2.1.0') {
|
|
|
+ self.setData({
|
|
|
+ exitApp: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
},
|
|
|
getUserInfoEvent: function (e) {
|
|
|
let that = this
|