From f2ac920b393755e21327c13f0b57430e70f8ca3b Mon Sep 17 00:00:00 2001 From: linju-json Date: Tue, 31 Aug 2021 11:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=BB=98=E8=AE=A4=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E4=B8=BA=E8=8B=B1=E6=96=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- changelog.md | 2 ++ common/appInit.js | 2 +- lang/i18n.js | 21 +++++++------------ package.json | 2 +- pages/list/list.nvue | 11 +--------- .../cloudfunctions/redis-test/index.js | 11 ---------- .../cloudfunctions/redis-test/package.json | 10 --------- 8 files changed, 13 insertions(+), 48 deletions(-) delete mode 100644 uniCloud-aliyun/cloudfunctions/redis-test/index.js delete mode 100644 uniCloud-aliyun/cloudfunctions/redis-test/package.json diff --git a/App.vue b/App.vue index 3f296794..1f641bbc 100644 --- a/App.vue +++ b/App.vue @@ -76,7 +76,7 @@ } ] } - console.log(getApp().globalData.config) + // console.log(getApp().globalData.config) getApp().globalData.config.about.agreements = agreements } setTimeout(()=>{ diff --git a/changelog.md b/changelog.md index 8ad0d579..fa9faaed 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +## 1.1.3(2021-08-31) +修复在微信小程序端默认语言为英文的问题 ## 1.1.2(2021-08-30) 修复在微信小程序下切换语言报`locale`不存在的问题 ## 1.1.1(2021-08-30) diff --git a/common/appInit.js b/common/appInit.js index 3d9a669f..8f94ba79 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -290,7 +290,7 @@ export default async function() { }); break; default: - console.log('code的值是:' + e.result.code, '可以在这里插入,自动处理响应体'); + console.log('code的值是:' + e.result.code, '可以在上面添加case,自动处理响应体'); break; } diff --git a/lang/i18n.js b/lang/i18n.js index 07a208d5..5a3e2211 100644 --- a/lang/i18n.js +++ b/lang/i18n.js @@ -17,20 +17,13 @@ if (!currentLang) { }else{ uni.getSystemInfo({ success: function (res) { - uni.getSystemInfo({ - success: function (res) { - console.log('获取设备信息:',res); - let language = 'zh-Hans' - if(res.language != 'zh-Hans'){ - language = 'en' - } - uni.setStorageSync('CURRENT_LANG', language) - currentLang = language - }, - fail: (err) => { - console.error(err) - } - }) + console.log('获取设备信息:',res); + let language = 'zh-Hans' + if(res.language == 'en'){ + language = 'en' + } + uni.setStorageSync('CURRENT_LANG', language) + currentLang = language }, fail: (err) => { console.error(err) diff --git a/package.json b/package.json index f1fbca53..7b08e075 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.1.2", + "version": "1.1.3", "description": "云端一体应用快速开发基本项目模版", "keywords": [ "login", diff --git a/pages/list/list.nvue b/pages/list/list.nvue index 36c70dc8..53ae47b2 100644 --- a/pages/list/list.nvue +++ b/pages/list/list.nvue @@ -88,15 +88,6 @@ this.listHight = 'auto' // #endif cdbRef = this.$refs.udb - - // #ifdef VUE3 - console.log('vue3') - // #endif - - // #ifdef VUE2 - console.log('vue2') - // #endif - }, async onShow() { this.keyword = getApp().globalData.searchText @@ -106,11 +97,11 @@ // uni.showLoading({ // title:"获取定位中" // }); + //默认h5端不获取定位 // #ifndef H5 let location = await gps.getLocation({geocode:true}) console.log(location); // #endif - // if(location){ // uni.showToast({ // title: JSON.stringify(location), diff --git a/uniCloud-aliyun/cloudfunctions/redis-test/index.js b/uniCloud-aliyun/cloudfunctions/redis-test/index.js deleted file mode 100644 index 2e13b9c3..00000000 --- a/uniCloud-aliyun/cloudfunctions/redis-test/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// 简单的使用示例 -'use strict'; -const redis = uniCloud.redis() -exports.main = async (event, context) => { - const getResult = await redis.get('my-key') - const setResult = await redis.set('my-key', 'value-test') - return { - getResult, - setResult - } -}; diff --git a/uniCloud-aliyun/cloudfunctions/redis-test/package.json b/uniCloud-aliyun/cloudfunctions/redis-test/package.json deleted file mode 100644 index fd00300e..00000000 --- a/uniCloud-aliyun/cloudfunctions/redis-test/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "redis-test", - "version": "1.0.0", - "description": "", - "main": "index.js", - "extensions": { - "uni-cloud-redis": {} - }, - "author": "" -} -- GitLab