提交 f2ac920b 编写于 作者: DCloud_JSON's avatar DCloud_JSON 提交者: study夏羽

修复在微信小程序端默认语言为英文的问题

上级 57f3cd3e
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
} }
] ]
} }
console.log(getApp().globalData.config) // console.log(getApp().globalData.config)
getApp().globalData.config.about.agreements = agreements getApp().globalData.config.about.agreements = agreements
} }
setTimeout(()=>{ setTimeout(()=>{
......
## 1.1.3(2021-08-31)
修复在微信小程序端默认语言为英文的问题
## 1.1.2(2021-08-30) ## 1.1.2(2021-08-30)
修复在微信小程序下切换语言报`locale`不存在的问题 修复在微信小程序下切换语言报`locale`不存在的问题
## 1.1.1(2021-08-30) ## 1.1.1(2021-08-30)
......
...@@ -290,7 +290,7 @@ export default async function() { ...@@ -290,7 +290,7 @@ export default async function() {
}); });
break; break;
default: default:
console.log('code的值是:' + e.result.code, '可以在这里插入,自动处理响应体'); console.log('code的值是:' + e.result.code, '可以在上面添加case,自动处理响应体');
break; break;
} }
......
...@@ -15,13 +15,11 @@ if (!currentLang) { ...@@ -15,13 +15,11 @@ if (!currentLang) {
uni.setStorageSync('CURRENT_LANG', language) uni.setStorageSync('CURRENT_LANG', language)
currentLang = language currentLang = language
}else{ }else{
uni.getSystemInfo({
success: function (res) {
uni.getSystemInfo({ uni.getSystemInfo({
success: function (res) { success: function (res) {
console.log('获取设备信息:',res); console.log('获取设备信息:',res);
let language = 'zh-Hans' let language = 'zh-Hans'
if(res.language != 'zh-Hans'){ if(res.language == 'en'){
language = 'en' language = 'en'
} }
uni.setStorageSync('CURRENT_LANG', language) uni.setStorageSync('CURRENT_LANG', language)
...@@ -31,11 +29,6 @@ if (!currentLang) { ...@@ -31,11 +29,6 @@ if (!currentLang) {
console.error(err) console.error(err)
} }
}) })
},
fail: (err) => {
console.error(err)
}
})
} }
} }
let i18nConfig = { let i18nConfig = {
......
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.1.2", "version": "1.1.3",
"description": "云端一体应用快速开发基本项目模版", "description": "云端一体应用快速开发基本项目模版",
"keywords": [ "keywords": [
"login", "login",
......
...@@ -88,15 +88,6 @@ ...@@ -88,15 +88,6 @@
this.listHight = 'auto' this.listHight = 'auto'
// #endif // #endif
cdbRef = this.$refs.udb cdbRef = this.$refs.udb
// #ifdef VUE3
console.log('vue3')
// #endif
// #ifdef VUE2
console.log('vue2')
// #endif
}, },
async onShow() { async onShow() {
this.keyword = getApp().globalData.searchText this.keyword = getApp().globalData.searchText
...@@ -106,11 +97,11 @@ ...@@ -106,11 +97,11 @@
// uni.showLoading({ // uni.showLoading({
// title:"获取定位中" // title:"获取定位中"
// }); // });
//默认h5端不获取定位
// #ifndef H5 // #ifndef H5
let location = await gps.getLocation({geocode:true}) let location = await gps.getLocation({geocode:true})
console.log(location); console.log(location);
// #endif // #endif
// if(location){ // if(location){
// uni.showToast({ // uni.showToast({
// title: JSON.stringify(location), // title: JSON.stringify(location),
......
// 简单的使用示例
'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
}
};
{
"name": "redis-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"extensions": {
"uni-cloud-redis": {}
},
"author": ""
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册