@@ -1,5 +1,6 @@ | |||||
const Http = require("./utils/HttpBasics.js") | const Http = require("./utils/HttpBasics.js") | ||||
const config = require("./config/config.js"); | const config = require("./config/config.js"); | ||||
App({ | App({ | ||||
data: {}, | data: {}, | ||||
globalData: { | globalData: { | ||||
@@ -21,10 +22,10 @@ App({ | |||||
nickName: "", //用户姓名 | nickName: "", //用户姓名 | ||||
templateId: [], //订阅消息模板id | templateId: [], //订阅消息模板id | ||||
ifshowtab: false, | ifshowtab: false, | ||||
version: "2.9.1" | |||||
}, | }, | ||||
onLaunch: function () { | onLaunch: function () { | ||||
let that = this | let that = this | ||||
tt.setStorageSync('locationFlag', true); | tt.setStorageSync('locationFlag', true); | ||||
try { | try { | ||||
var res = tt.getSystemInfoSync(); | var res = tt.getSystemInfoSync(); | ||||
@@ -1,6 +1,5 @@ | |||||
const extConfig = tt.getExtConfigSync ? tt.getExtConfigSync().extConfig : {} | const extConfig = tt.getExtConfigSync ? tt.getExtConfigSync().extConfig : {} | ||||
let weappId = extConfig.weappId; | let weappId = extConfig.weappId; | ||||
console.log(extConfig, "configUrls"); | |||||
let configUrls = extConfig.attr.configUrl; | let configUrls = extConfig.attr.configUrl; | ||||
var config = { | var config = { | ||||
@@ -1,7 +1,8 @@ | |||||
{ | { | ||||
"ext": { | "ext": { | ||||
"attr": { | "attr": { | ||||
"configUrl": "https://ctest.malls.iformall.com/C/api" | |||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
"version": "2.9.1" | |||||
}, | }, | ||||
"name": "富茂家政", | "name": "富茂家政", | ||||
"weappId": "tt90b5e6080f896bde01" | "weappId": "tt90b5e6080f896bde01" | ||||
@@ -11,7 +11,7 @@ const QR = require("../utils/memberqrcode.js"); | |||||
const util = require("../utils/util"); | const util = require("../utils/util"); | ||||
const bgColor = require("../utils/bgColor.js") | const bgColor = require("../utils/bgColor.js") | ||||
let app = getApp(); | let app = getApp(); | ||||
const updateManager = tt.getUpdateManager(); | |||||
const updateManager = tt.getUpdateManager() | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
userAvatarUrl: '', | userAvatarUrl: '', | ||||
@@ -917,7 +917,18 @@ Page({ | |||||
}, 1000) | }, 1000) | ||||
setTimeout(() => { | setTimeout(() => { | ||||
console.log('onCheckForUpdate'); | |||||
const getEnvInfoSync = tt.getEnvInfoSync() | |||||
const envType = getEnvInfoSync.microapp.envType | |||||
console.log(envType, 'envType'); | |||||
if (envType == 'development') return | |||||
if (envType == 'preview') { | |||||
tt.showToast({ | |||||
title: 'preview mode', | |||||
icon: "success" | |||||
}); | |||||
} | |||||
updateManager.onCheckForUpdate(res => { | updateManager.onCheckForUpdate(res => { | ||||
console.log(res, 'onCheckForUpdate'); | console.log(res, 'onCheckForUpdate'); | ||||
if (res.hasUpdate) { | if (res.hasUpdate) { | ||||
@@ -936,7 +947,6 @@ Page({ | |||||
} | } | ||||
}); | }); | ||||
}, 2500); | }, 2500); | ||||
}, | }, | ||||
@@ -3,6 +3,8 @@ const navigationBarHeight = (getApp().statusBarHeight + 50) + "px"; | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -83,7 +83,7 @@ | |||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="version">Version {{ version }}</view> | |||||
<view class="version">Version 2.9.1 </view> | |||||
<phoem showBox="{{showPhoem}}" bind:hiePhoen="setPhone" bind:heiBox="setBox"></phoem> | <phoem showBox="{{showPhoem}}" bind:hiePhoen="setPhone" bind:heiBox="setBox"></phoem> | ||||
</view> | </view> | ||||
@@ -253,20 +253,20 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
isDetail: true | isDetail: true | ||||
}) | }) | ||||
tt.showToast({ | |||||
title: '请点击右上角:更多-权限设置-开启地理位置授权', | |||||
icon: 'none', | |||||
duration: 4000, | |||||
success: () => { | |||||
setTimeout(() => { | |||||
tt.showToast({ | |||||
title: '或直接填写详细地址', | |||||
icon: 'none', | |||||
duration: 3000, | |||||
}); | |||||
}, 4000); | |||||
} | |||||
tt.showModal({ | |||||
title: '提示', | |||||
content: '请点击右上角:更多-权限设置-开启地理位置授权,或直接填写详细地址', | |||||
showCancel: false, | |||||
confirmText: "知道了", | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | }); | ||||
}, | }, | ||||
complete: function (data) {} | complete: function (data) {} | ||||
}) | }) | ||||
@@ -330,6 +330,7 @@ Page({ | |||||
currentTag: id, | currentTag: id, | ||||
toView: id | toView: id | ||||
}) | }) | ||||
tt.vibrateShort() | |||||
}, | }, | ||||
goSetShop(e) { | goSetShop(e) { | ||||