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

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

上级 57f3cd3e
......@@ -76,7 +76,7 @@
}
]
}
console.log(getApp().globalData.config)
// console.log(getApp().globalData.config)
getApp().globalData.config.about.agreements = agreements
}
setTimeout(()=>{
......
## 1.1.3(2021-08-31)
修复在微信小程序端默认语言为英文的问题
## 1.1.2(2021-08-30)
修复在微信小程序下切换语言报`locale`不存在的问题
## 1.1.1(2021-08-30)
......
......@@ -290,7 +290,7 @@ export default async function() {
});
break;
default:
console.log('code的值是:' + e.result.code, '可以在这里插入,自动处理响应体');
console.log('code的值是:' + e.result.code, '可以在上面添加case,自动处理响应体');
break;
}
......
......@@ -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)
......
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.1.2",
"version": "1.1.3",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
......
......@@ -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),
......
// 简单的使用示例
'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.
先完成此消息的编辑!
想要评论请 注册