diff --git a/collect_information/project.config.json b/collect_information/project.config.json index 2d18dde..780ca20 100644 --- a/collect_information/project.config.json +++ b/collect_information/project.config.json @@ -5,11 +5,14 @@ "appid": "touristappid", "setting": { "urlCheck": false, - "es6": false, + "es6": true, "enhance": false, + "minified": true, + "minifyWXSS": true, + "minifyWXML": true, "compileHotReLoad": false, - "postcss": false, - "minified": false + "postcss": true, + "minified": true }, "compileType": "miniprogram" } diff --git a/collect_information/src/app.ts b/collect_information/src/app.ts index 28f74dd..b9729bb 100644 --- a/collect_information/src/app.ts +++ b/collect_information/src/app.ts @@ -24,6 +24,40 @@ const App = createApp({ }) } }, + onShow(){ + const updateManager = Taro.getUpdateManager() + updateManager.onCheckForUpdate(function(res) { + // 请求完新版本信息的回调 + if (res.hasUpdate) { + // 新版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate() + } + }) + updateManager.onUpdateReady(function() { + // 新版本已经准备好,可以提示用户更新 + Taro.showModal({ + title: '更新提示', + content: '发现新版本,是否重启应用?', + success: function (res) { + if (res.confirm) { + // 新的版本已经准备好,调用 applyUpdate 应用新版本 + updateManager.applyUpdate() + } + } + }).then(res=>{ + console.log(res) + }) + }) + updateManager.onUpdateFailed(function() { + // 新版本下载失败,可进行一些提示用户的操作 + Taro.showModal({ + title: '已有新版本', + content: '请删除当前小程序,重新从搜索界面打开获取最新版本', + }).then(res => { + console.log(res) + }) + }) + } // 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖 }) diff --git a/collect_information/src/request/index.ts b/collect_information/src/request/index.ts index b1dacfa..dd5e7ca 100644 --- a/collect_information/src/request/index.ts +++ b/collect_information/src/request/index.ts @@ -30,7 +30,6 @@ class CustomRequest { BASE_API: string = process.env.TARO_APP_BASE_API; private request(url: string, method: keyof Taro.request.Method, options: ApiOptions, params?: object,): Promise> { - console.log(this.BASE_API,'0000000') return new Promise>((resolve, reject) => { if (options.loading) { Taro.showLoading({ diff --git a/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.scss b/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.scss index c0a88ff..89857bc 100644 --- a/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.scss +++ b/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.scss @@ -10,3 +10,11 @@ height: 140px } } +.uploadPictures{ + display: flex; + justify-content: center; + align-items: center; + width: 220px; + height: 254px; + border: 2px solid #d5d3d3; +} diff --git a/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.vue b/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.vue index 3c9fe8e..a01a944 100644 --- a/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.vue +++ b/collect_information/src/subPages/projectManager/securityUserForm/securityUserForm.vue @@ -1,10 +1,16 @@