优化中英文切换功能
This commit is contained in:
parent
50ee190427
commit
5ed080d09e
68
App.vue
68
App.vue
|
|
@ -3,22 +3,20 @@
|
||||||
let SystemVersion = ""
|
let SystemVersion = ""
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
list: [{
|
||||||
|
key: "en",
|
||||||
|
value: "en"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "zh",
|
||||||
|
value: "zh-Hans"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 0,
|
|
||||||
text: that.$t('common.titleHome')
|
|
||||||
})
|
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 1,
|
|
||||||
text: that.$t('common.titleNews')
|
|
||||||
})
|
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 2,
|
|
||||||
text: that.$t('common.titleMe')
|
|
||||||
})
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 获取设备信息
|
// 获取设备信息
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
|
|
@ -35,7 +33,6 @@
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pageTwo/login/login'
|
url: '/pageTwo/login/login'
|
||||||
})
|
})
|
||||||
console.log("有网络连接", res.isConnected)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -55,6 +52,7 @@
|
||||||
console.log('on login-sucesss')
|
console.log('on login-sucesss')
|
||||||
that.handleUserList()
|
that.handleUserList()
|
||||||
that.handleBannerList()
|
that.handleBannerList()
|
||||||
|
that.handleTabBarItem()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
|
|
@ -74,10 +72,10 @@
|
||||||
that.handleoginversion()
|
that.handleoginversion()
|
||||||
that.handleCityList()
|
that.handleCityList()
|
||||||
that.handleCooperationUrl()
|
that.handleCooperationUrl()
|
||||||
console.log('App Launch', uni.getLocale())
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show')
|
let that = this
|
||||||
|
that.handleTabBarItem()
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
|
@ -95,22 +93,29 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
that.$store.commit('changeLanguage', res.data.language_arr)
|
that.$store.commit('changeLanguage', res.data.language_arr)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// uni.setLocale(res.data.language)
|
that.$i18n.locale = res.data.language
|
||||||
uni.setStorageSync('language', res.data.language)
|
uni.setStorageSync('language', res.data.language)
|
||||||
|
that.$store.commit('changeLocale', res.data.language)
|
||||||
uni.$emit('login-sucesss');
|
uni.$emit('login-sucesss');
|
||||||
console.log("已登录手机语言", res.data.language)
|
console.log("已登录手机语言", res.data.language)
|
||||||
} else {
|
} else {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success(e) {
|
success(e) {
|
||||||
let language = uni.getStorageSync('language') ? uni.getStorageSync(
|
let locale = ""
|
||||||
'language') : e.language.indexOf("zh") != -1 ? "zh-Hans" : e
|
that.list.forEach(ite => {
|
||||||
.language
|
if (e.language.indexOf(ite.key) != -1) {
|
||||||
uni.setLocale(language)
|
locale = ite.value
|
||||||
uni.setStorageSync('language', language)
|
|
||||||
uni.$emit('need-login');
|
|
||||||
console.log("未登录手机语言", language)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
let language = uni.getStorageSync('language') ? uni.getStorageSync('language') : locale
|
||||||
|
that.$i18n.locale = language
|
||||||
|
uni.setStorageSync('language', language)
|
||||||
|
that.$store.commit('changeLocale', language)
|
||||||
|
uni.$emit('need-login');
|
||||||
|
console.log("未登录手机语言", language, uni.getStorageSync('language'), locale)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
// #ifdef APP-PLUS||APP
|
// #ifdef APP-PLUS||APP
|
||||||
that.$store.commit('changePhoneInfo', {
|
that.$store.commit('changePhoneInfo', {
|
||||||
|
|
@ -255,6 +260,21 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleTabBarItem() {
|
||||||
|
let that = this
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
text: that.$t('common.titleHome')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
text: that.$t('common.titleNews')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 2,
|
||||||
|
text: that.$t('common.titleMe')
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@
|
||||||
"inheritHeighet.tips4": "A child's postnatal growth environment is conducive to their growth in height. Please continue to maintain and strengthen the management of acquired factors. When the child reaches adulthood, they can be more than 10cm taller than the standard.",
|
"inheritHeighet.tips4": "A child's postnatal growth environment is conducive to their growth in height. Please continue to maintain and strengthen the management of acquired factors. When the child reaches adulthood, they can be more than 10cm taller than the standard.",
|
||||||
|
|
||||||
"contrast.time": "time (days)",
|
"contrast.time": "time (days)",
|
||||||
"index.ideal": "ideal",
|
"index.ideal": "Current age and ideal ",
|
||||||
|
|
||||||
"contrast.weightdiff": "reduce weight",
|
"contrast.weightdiff": "reduce weight",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ export default {
|
||||||
ja, //日语
|
ja, //日语
|
||||||
"zh-Hans": zh, //中文
|
"zh-Hans": zh, //中文
|
||||||
'zh-Hant': zhHant, //繁体
|
'zh-Hant': zhHant, //繁体
|
||||||
|
"en-CN": en
|
||||||
}
|
}
|
||||||
|
|
@ -156,7 +156,8 @@
|
||||||
"searchBluetoothFail": "重新搜索",
|
"searchBluetoothFail": "重新搜索",
|
||||||
"Nodevicefound": "没有搜索到蓝牙设备",
|
"Nodevicefound": "没有搜索到蓝牙设备",
|
||||||
"onDeviceMeasureTips": "请确定设备是开机状态",
|
"onDeviceMeasureTips": "请确定设备是开机状态",
|
||||||
"openDeviceeMeasureTips": "请确定手机蓝牙及位置信息已打开",
|
"openDeviceeMeasureTips": "请确定手机蓝牙已打开",
|
||||||
|
"openDeviceeMeasureTips2":"请确定手机位置信息已打开",
|
||||||
"deviceDisconnection": "测量过程中已与设备连接中断,请重新连接设备再开始测量",
|
"deviceDisconnection": "测量过程中已与设备连接中断,请重新连接设备再开始测量",
|
||||||
"offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量",
|
"offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量",
|
||||||
"remeasure": "重新测量",
|
"remeasure": "重新测量",
|
||||||
|
|
|
||||||
206
manifest.json
206
manifest.json
|
|
@ -1,34 +1,34 @@
|
||||||
{
|
{
|
||||||
"name" : "Reedaw",
|
"name": "Reedaw",
|
||||||
"appid" : "__UNI__20604F1",
|
"appid": "__UNI__20604F1",
|
||||||
"description" : "面向儿童青少年的健康体质测量APP",
|
"description": "面向儿童青少年的健康体质测量APP",
|
||||||
"versionName" : "1.3.4",
|
"versionName": "1.3.4",
|
||||||
"versionCode" : 134,
|
"versionCode": 134,
|
||||||
"transformPx" : false,
|
"transformPx": false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus": {
|
||||||
"usingComponents" : true,
|
"usingComponents": true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler": "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion": 3,
|
||||||
"splashscreen" : {
|
"splashscreen": {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender": true,
|
||||||
"waiting" : true,
|
"waiting": true,
|
||||||
"autoclose" : true,
|
"autoclose": true,
|
||||||
"delay" : 0
|
"delay": 0
|
||||||
},
|
},
|
||||||
"template" : "index.html",
|
"template": "index.html",
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {
|
"modules": {
|
||||||
"Bluetooth" : {}
|
"Bluetooth": {}
|
||||||
},
|
},
|
||||||
"compattible" : {
|
"compattible": {
|
||||||
"ignoreVersion" : true // true 表示忽略版本检查提示
|
"ignoreVersion": true // true 表示忽略版本检查提示
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute": {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"android" : {
|
"android": {
|
||||||
"permissions" : [
|
"permissions": [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
|
@ -45,113 +45,119 @@
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
],
|
],
|
||||||
"abiFilters" : [ "arm64-v8a", "x86" ]
|
"abiFilters": ["arm64-v8a", "x86"]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios": {
|
||||||
"dSYMs" : false,
|
"dSYMs": false,
|
||||||
"idfa" : false,
|
"idfa": false,
|
||||||
"privacyDescription" : {
|
"privacyDescription": {
|
||||||
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙权限来连接设备",
|
"NSBluetoothAlwaysUsageDescription": "需要蓝牙权限来连接设备",
|
||||||
"NSBluetoothPeripheralUsageDescription" : "使用蓝牙与外设通信"
|
"NSBluetoothPeripheralUsageDescription": "使用蓝牙与外设通信"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs": {
|
||||||
"share" : {},
|
"share": {},
|
||||||
"ad" : {},
|
"ad": {},
|
||||||
"geolocation" : {
|
"geolocation": {
|
||||||
"system" : {
|
"system": {
|
||||||
"__platform__" : [ "ios" ]
|
"__platform__": ["ios"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons": {
|
||||||
"android" : {
|
"android": {
|
||||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
"hdpi": "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios": {
|
||||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad" : {
|
"ipad": {
|
||||||
"app" : "unpackage/res/icons/76x76.png",
|
"app": "unpackage/res/icons/76x76.png",
|
||||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
"app@2x": "unpackage/res/icons/152x152.png",
|
||||||
"notification" : "unpackage/res/icons/20x20.png",
|
"notification": "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||||
"settings" : "unpackage/res/icons/29x29.png",
|
"settings": "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
"spotlight": "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone" : {
|
"iphone": {
|
||||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
"app@2x": "unpackage/res/icons/120x120.png",
|
||||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
"app@3x": "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"splashscreen" : {
|
"splashscreen": {
|
||||||
"androidStyle" : "common",
|
"androidStyle": "common",
|
||||||
"android" : {
|
"android": {
|
||||||
"hdpi" : "static/logo.png",
|
"hdpi": "static/logo.png",
|
||||||
"xhdpi" : "static/logo.png",
|
"xhdpi": "static/logo.png",
|
||||||
"xxhdpi" : "static/logo.png"
|
"xxhdpi": "static/logo.png"
|
||||||
},
|
},
|
||||||
"useOriginalMsgbox" : true
|
"useOriginalMsgbox": true
|
||||||
}
|
}
|
||||||
|
// "i18n": {
|
||||||
|
// "enable": true,
|
||||||
|
// "paths": {
|
||||||
|
// "en": "/locale/en.json",
|
||||||
|
// "zh": "/locale/zh.json",
|
||||||
|
// "zh-Hans": "/locale/zh.json",
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permissions" : {
|
"permissions": {
|
||||||
"Android" : [
|
"Android": [{
|
||||||
{
|
"name": "android.permission.READ_EXTERNAL_STORAGE",
|
||||||
"name" : "android.permission.READ_EXTERNAL_STORAGE",
|
"desc": "读取外部存储"
|
||||||
"desc" : "读取外部存储"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "android.permission.WRITE_EXTERNAL_STORAGE",
|
"name": "android.permission.WRITE_EXTERNAL_STORAGE",
|
||||||
"desc" : "写入外部存储"
|
"desc": "写入外部存储"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"quickapp" : {},
|
"quickapp": {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin": {
|
||||||
"appid" : "wx9c0b7a436ada6d1e",
|
"appid": "wx9c0b7a436ada6d1e",
|
||||||
"setting" : {
|
"setting": {
|
||||||
"urlCheck" : false,
|
"urlCheck": false,
|
||||||
"postcss" : true,
|
"postcss": true,
|
||||||
"minified" : true
|
"minified": true
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents": true
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay": {
|
||||||
"usingComponents" : true
|
"usingComponents": true
|
||||||
},
|
},
|
||||||
"mp-baidu" : {
|
"mp-baidu": {
|
||||||
"usingComponents" : true
|
"usingComponents": true
|
||||||
},
|
},
|
||||||
"mp-toutiao" : {
|
"mp-toutiao": {
|
||||||
"usingComponents" : true
|
"usingComponents": true
|
||||||
},
|
},
|
||||||
"uniStatistics" : {
|
"uniStatistics": {
|
||||||
"enable" : false,
|
"enable": false,
|
||||||
"version" : "2"
|
"version": "2"
|
||||||
},
|
},
|
||||||
"vueVersion" : "2",
|
"vueVersion": "2",
|
||||||
"locale" : "zh-Hans",
|
"locale": "zh-Hans",
|
||||||
"h5" : {
|
"h5": {
|
||||||
"template" : "index.html"
|
"template": "index.html"
|
||||||
},
|
},
|
||||||
"fallbackLocale" : "zh-Hans"
|
"fallbackLocale": "zh-Hans"
|
||||||
}
|
}
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<th>姓名</th>
|
<th>姓名</th>
|
||||||
<td>{{info.nickname}}</td>
|
<td>{{info.nickname}}</td>
|
||||||
<th>性别</th>
|
<th>性别</th>
|
||||||
<td>{{info.gender==0?"未知":info.sex==1?"男":"女"}}</td>
|
<td>{{info.gender==0?"未知":info.gender==1?"男":"女"}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>出生年月</th>
|
<th>出生年月</th>
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@
|
||||||
...mapState(["languageList"]),
|
...mapState(["languageList"]),
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
let that = this
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
that.login()
|
that.login()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
@ -124,7 +125,6 @@
|
||||||
onReady() {
|
onReady() {
|
||||||
let that = this
|
let that = this
|
||||||
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
|
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
|
||||||
console.log("language", that.language, uni.getStorageSync('language'), uni.getLocale())
|
|
||||||
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).value
|
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).value
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -261,9 +261,9 @@
|
||||||
that.language = ite.key
|
that.language = ite.key
|
||||||
that.nowlanguage = ite.value
|
that.nowlanguage = ite.value
|
||||||
that.Islanguage = false
|
that.Islanguage = false
|
||||||
uni.setLocale(ite.key)
|
that.$i18n.locale = ite.key
|
||||||
uni.setStorageSync('language', ite.key)
|
uni.setStorageSync('language', ite.key)
|
||||||
console.log("ite", ite.key)
|
that.$store.commit('changeLocale', ite.key)
|
||||||
},
|
},
|
||||||
handleToggle() {
|
handleToggle() {
|
||||||
this.phone = ""
|
this.phone = ""
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,6 @@
|
||||||
uni.onBluetoothAdapterStateChange(function(res) {
|
uni.onBluetoothAdapterStateChange(function(res) {
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
})
|
})
|
||||||
console.log("token", uni.getStorageSync('token'))
|
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
that.openBluetoothAdapter()
|
that.openBluetoothAdapter()
|
||||||
}
|
}
|
||||||
|
|
@ -427,7 +426,6 @@
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function() {
|
isConnected: function() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log("isConnected", that.isConnected)
|
|
||||||
if (!that.isConnected) {
|
if (!that.isConnected) {
|
||||||
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
|
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
|
||||||
that.islink = -1
|
that.islink = -1
|
||||||
|
|
@ -435,23 +433,22 @@
|
||||||
},
|
},
|
||||||
isBluetoothTyle: function() {
|
isBluetoothTyle: function() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log("isBluetoothTyle", that.isBluetoothTyle)
|
|
||||||
if (!that.isBluetoothTyle) {
|
if (!that.isBluetoothTyle) {
|
||||||
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
|
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
|
||||||
that.islink = -1
|
that.islink = -1
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
that.language = uni.getStorageSync('language')
|
that.language = uni.getStorageSync('language')
|
||||||
|
console.log("onshow首页", that.language)
|
||||||
uni.onBluetoothAdapterStateChange(function(res) {
|
uni.onBluetoothAdapterStateChange(function(res) {
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
})
|
})
|
||||||
if (uni.getStorageSync('isBle') && uni.getStorageSync('isBle') == true) {
|
if (uni.getStorageSync('isBle') && uni.getStorageSync('isBle') == true) {
|
||||||
that.openBluetoothAdapter()
|
that.openBluetoothAdapter()
|
||||||
uni.setStorageSync('isBle', false)
|
uni.setStorageSync('isBle', false)
|
||||||
console.log("首次添加玩用户后初始化蓝牙", uni.getStorageSync('isBle'))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -886,10 +883,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
.lixiang {
|
.lixiang {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
|
justify-content: flex-end;
|
||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
|
|
|
||||||
|
|
@ -115,17 +115,14 @@
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let that = this
|
let that = this
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: that.$t('common.titleMe')
|
||||||
|
})
|
||||||
that.language = uni.getStorageSync('language')
|
that.language = uni.getStorageSync('language')
|
||||||
that.index = that.languageList.findIndex(ite => ite.key == that.language)
|
that.index = that.languageList.findIndex(ite => ite.key == that.language)
|
||||||
console.log("language", that.language, that.index)
|
|
||||||
that.token = uni.getStorageSync('token')
|
that.token = uni.getStorageSync('token')
|
||||||
that.handleAccountNumber()
|
that.handleAccountNumber()
|
||||||
},
|
},
|
||||||
onReady() {
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: this.$t('common.titleMe'),
|
|
||||||
})
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
nickname() {
|
nickname() {
|
||||||
this.user = {}
|
this.user = {}
|
||||||
|
|
@ -179,10 +176,10 @@
|
||||||
that.$model.getSetLanguage({
|
that.$model.getSetLanguage({
|
||||||
language: that.languageList[that.index].key,
|
language: that.languageList[that.index].key,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log("qqqqqqqqqqq", res)
|
that.$i18n.locale = that.languageList[that.index].key
|
||||||
that.language = that.languageList[that.index].key
|
|
||||||
uni.setLocale(that.languageList[that.index].key)
|
|
||||||
uni.setStorageSync('language', that.languageList[that.index].key)
|
uni.setStorageSync('language', that.languageList[that.index].key)
|
||||||
|
that.$store.commit('changeLocale', that.languageList[that.index].key)
|
||||||
|
uni.$emit('login-sucesss');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
|
|
|
||||||
|
|
@ -388,11 +388,11 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -23px;
|
top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.span {
|
.span {
|
||||||
margin-top: 8px;
|
margin-top: -25px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -8px;
|
right: -8px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@ export default new Vuex.Store({
|
||||||
pop: [],
|
pop: [],
|
||||||
isCoupon: false
|
isCoupon: false
|
||||||
},
|
},
|
||||||
languageList: []
|
languageList: [],
|
||||||
|
setLocale: ""
|
||||||
},
|
},
|
||||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
@ -168,6 +169,11 @@ export default new Vuex.Store({
|
||||||
changeLungLevel(state, newData) {
|
changeLungLevel(state, newData) {
|
||||||
state.lungLevel = newData
|
state.lungLevel = newData
|
||||||
},
|
},
|
||||||
|
// 设置语言
|
||||||
|
changeLocale(state, newData) {
|
||||||
|
console.log("changeLocale", newData)
|
||||||
|
state.setLocale = newData
|
||||||
|
},
|
||||||
//获取家庭成员
|
//获取家庭成员
|
||||||
changeFamilay(state, newData) {
|
changeFamilay(state, newData) {
|
||||||
if (newData.length == 0) {
|
if (newData.length == 0) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ import $store from '@/store'
|
||||||
import $Bluetooth from '@/toolJs/Bluetooth.js'
|
import $Bluetooth from '@/toolJs/Bluetooth.js'
|
||||||
import $tools from '@/toolJs/tools.js'
|
import $tools from '@/toolJs/tools.js'
|
||||||
import messages from '@/locale/index.js'
|
import messages from '@/locale/index.js'
|
||||||
let $t = messages[uni.getLocale()]
|
// let Language = $store.state.setLocale
|
||||||
|
// let $t = messages[Language]
|
||||||
let myTime;
|
let myTime;
|
||||||
let devicesList = []
|
let devicesList = []
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -35,6 +36,8 @@ function openBluetoothAdapter() {
|
||||||
|
|
||||||
// 开始搜寻附近的蓝牙外围设备
|
// 开始搜寻附近的蓝牙外围设备
|
||||||
function startBluetoothDeviceDiscovery() {
|
function startBluetoothDeviceDiscovery() {
|
||||||
|
let Language = $store.state.setLocale
|
||||||
|
let $t = messages[Language]
|
||||||
devicesList = []
|
devicesList = []
|
||||||
uni.startBluetoothDevicesDiscovery({
|
uni.startBluetoothDevicesDiscovery({
|
||||||
allowDuplicatesKey: true,
|
allowDuplicatesKey: true,
|
||||||
|
|
@ -164,6 +167,8 @@ function handleDevicesMac(device, acd_id) {
|
||||||
}
|
}
|
||||||
// 蓝牙连接失败
|
// 蓝牙连接失败
|
||||||
function getBluetoothAdapter(err) {
|
function getBluetoothAdapter(err) {
|
||||||
|
let Language = $store.state.setLocale
|
||||||
|
let $t = messages[Language]
|
||||||
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
|
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
|
||||||
"openBluetoothAdapter:fail auth deny" ||
|
"openBluetoothAdapter:fail auth deny" ||
|
||||||
err.errMsg === "openBluetoothAdapter:fail authorize no response"
|
err.errMsg === "openBluetoothAdapter:fail authorize no response"
|
||||||
|
|
@ -180,7 +185,8 @@ function getBluetoothAdapter(err) {
|
||||||
uni.openBluetoothAdapter({
|
uni.openBluetoothAdapter({
|
||||||
success: e => {
|
success: e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:$t.linkBluetooth.openBluetoothSuccess,
|
title: $t.linkBluetooth
|
||||||
|
.openBluetoothSuccess,
|
||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
$store.commit("changeBluetooth", true);
|
$store.commit("changeBluetooth", true);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import $store from '@/store'
|
import $store from '@/store'
|
||||||
import $tools from '@/toolJs/tools.js'
|
import $tools from '@/toolJs/tools.js'
|
||||||
import messages from '@/locale/index.js'
|
import messages from '@/locale/index.js'
|
||||||
let Language = uni.getStorageSync("language")
|
|
||||||
let $t = messages[Language]
|
|
||||||
export default {
|
export default {
|
||||||
msg,
|
msg,
|
||||||
toHex,
|
toHex,
|
||||||
|
|
@ -261,6 +259,9 @@ function checkPrivacyAgreement() {
|
||||||
|
|
||||||
function getBluetoothAdapter(err) {
|
function getBluetoothAdapter(err) {
|
||||||
let textLink = ""
|
let textLink = ""
|
||||||
|
let Language = $store.state.setLocale
|
||||||
|
let $t = messages[Language]
|
||||||
|
console.log("tools", $store.state.setLocale)
|
||||||
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
|
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
|
||||||
"openBluetoothAdapter:fail auth deny" ||
|
"openBluetoothAdapter:fail auth deny" ||
|
||||||
err.errMsg === "openBluetoothAdapter:fail authorize no response"
|
err.errMsg === "openBluetoothAdapter:fail authorize no response"
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -43,7 +43,7 @@ _vue.default.prototype.$model = _model.default;
|
||||||
// 语言
|
// 语言
|
||||||
|
|
||||||
var i18nConfig = {
|
var i18nConfig = {
|
||||||
locale: uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale(),
|
locale: uni.getStorageSync('language') || "zh-Hans",
|
||||||
messages: _index.default
|
messages: _index.default
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -140,18 +140,6 @@ var _default = {
|
||||||
},
|
},
|
||||||
onLaunch: function onLaunch() {
|
onLaunch: function onLaunch() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 0,
|
|
||||||
text: that.$t('common.titleHome')
|
|
||||||
});
|
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 1,
|
|
||||||
text: that.$t('common.titleNews')
|
|
||||||
});
|
|
||||||
uni.setTabBarItem({
|
|
||||||
index: 2,
|
|
||||||
text: that.$t('common.titleMe')
|
|
||||||
});
|
|
||||||
that.updataWeiXin(); //小程序版本更新
|
that.updataWeiXin(); //小程序版本更新
|
||||||
|
|
||||||
//订阅登录成功事件
|
//订阅登录成功事件
|
||||||
|
|
@ -159,6 +147,7 @@ var _default = {
|
||||||
console.log('on login-sucesss');
|
console.log('on login-sucesss');
|
||||||
that.handleUserList();
|
that.handleUserList();
|
||||||
that.handleBannerList();
|
that.handleBannerList();
|
||||||
|
that.handleTabBarItem();
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/home/home'
|
url: '/pages/home/home'
|
||||||
|
|
@ -178,10 +167,10 @@ var _default = {
|
||||||
that.handleoginversion();
|
that.handleoginversion();
|
||||||
that.handleCityList();
|
that.handleCityList();
|
||||||
that.handleCooperationUrl();
|
that.handleCooperationUrl();
|
||||||
console.log('App Launch', uni.getLocale());
|
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
console.log('App Show');
|
var that = this;
|
||||||
|
that.handleTabBarItem();
|
||||||
},
|
},
|
||||||
onHide: function onHide() {},
|
onHide: function onHide() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -193,16 +182,18 @@ var _default = {
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.$store.commit('changeLanguage', res.data.language_arr);
|
that.$store.commit('changeLanguage', res.data.language_arr);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// uni.setLocale(res.data.language)
|
that.$i18n.locale = res.data.language;
|
||||||
uni.setStorageSync('language', res.data.language);
|
uni.setStorageSync('language', res.data.language);
|
||||||
|
that.$store.commit('changeLocale', res.data.language);
|
||||||
uni.$emit('login-sucesss');
|
uni.$emit('login-sucesss');
|
||||||
console.log("已登录手机语言", res.data.language);
|
console.log("已登录手机语言", res.data.language);
|
||||||
} else {
|
} else {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function success(e) {
|
success: function success(e) {
|
||||||
var language = uni.getStorageSync('language') ? uni.getStorageSync('language') : e.language.indexOf("zh") != -1 ? "zh-Hans" : e.language;
|
var language = uni.getStorageSync('language') ? uni.getStorageSync('language') : e.language.indexOf("zh") != -1 ? "zh-Hans" : e.language;
|
||||||
uni.setLocale(language);
|
that.$i18n.locale = language;
|
||||||
uni.setStorageSync('language', language);
|
uni.setStorageSync('language', language);
|
||||||
|
that.$store.commit('changeLocale', language);
|
||||||
uni.$emit('need-login');
|
uni.$emit('need-login');
|
||||||
console.log("未登录手机语言", language);
|
console.log("未登录手机语言", language);
|
||||||
}
|
}
|
||||||
|
|
@ -321,6 +312,21 @@ var _default = {
|
||||||
content: '请退出并移除小程序,重新打开...'
|
content: '请退出并移除小程序,重新打开...'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
handleTabBarItem: function handleTabBarItem() {
|
||||||
|
var that = this;
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
text: that.$t('common.titleHome')
|
||||||
|
});
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
text: that.$t('common.titleNews')
|
||||||
|
});
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 2,
|
||||||
|
text: that.$t('common.titleMe')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -208,7 +208,6 @@ var _default = {
|
||||||
onReady: function onReady() {
|
onReady: function onReady() {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale();
|
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale();
|
||||||
console.log("language", that.language, uni.getStorageSync('language'), uni.getLocale());
|
|
||||||
that.nowlanguage = that.languageList.find(function (ite) {
|
that.nowlanguage = that.languageList.find(function (ite) {
|
||||||
return ite.key == that.language;
|
return ite.key == that.language;
|
||||||
}).value;
|
}).value;
|
||||||
|
|
@ -345,9 +344,9 @@ var _default = {
|
||||||
that.language = ite.key;
|
that.language = ite.key;
|
||||||
that.nowlanguage = ite.value;
|
that.nowlanguage = ite.value;
|
||||||
that.Islanguage = false;
|
that.Islanguage = false;
|
||||||
uni.setLocale(ite.key);
|
that.$i18n.locale = ite.key;
|
||||||
uni.setStorageSync('language', ite.key);
|
uni.setStorageSync('language', ite.key);
|
||||||
console.log("ite", ite.key);
|
that.$store.commit('changeLocale', ite.key);
|
||||||
},
|
},
|
||||||
handleToggle: function handleToggle() {
|
handleToggle: function handleToggle() {
|
||||||
this.phone = "";
|
this.phone = "";
|
||||||
|
|
|
||||||
|
|
@ -332,10 +332,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -23px;
|
top: 8px;
|
||||||
}
|
}
|
||||||
.report .desc .statuevue .item .span.data-v-7bb9ca46 {
|
.report .desc .statuevue .item .span.data-v-7bb9ca46 {
|
||||||
margin-top: 8px;
|
margin-top: -25px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -8px;
|
right: -8px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,6 @@ var _default = {
|
||||||
uni.onBluetoothAdapterStateChange(function (res) {
|
uni.onBluetoothAdapterStateChange(function (res) {
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
});
|
});
|
||||||
console.log("token", uni.getStorageSync('token'));
|
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
that.openBluetoothAdapter();
|
that.openBluetoothAdapter();
|
||||||
}
|
}
|
||||||
|
|
@ -478,7 +477,6 @@ var _default = {
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function isConnected() {
|
isConnected: function isConnected() {
|
||||||
var that = this;
|
var that = this;
|
||||||
console.log("isConnected", that.isConnected);
|
|
||||||
if (!that.isConnected) {
|
if (!that.isConnected) {
|
||||||
that.textLink = that.$t("linkBluetooth.startlinkBluetooth");
|
that.textLink = that.$t("linkBluetooth.startlinkBluetooth");
|
||||||
that.islink = -1;
|
that.islink = -1;
|
||||||
|
|
@ -486,7 +484,6 @@ var _default = {
|
||||||
},
|
},
|
||||||
isBluetoothTyle: function isBluetoothTyle() {
|
isBluetoothTyle: function isBluetoothTyle() {
|
||||||
var that = this;
|
var that = this;
|
||||||
console.log("isBluetoothTyle", that.isBluetoothTyle);
|
|
||||||
if (!that.isBluetoothTyle) {
|
if (!that.isBluetoothTyle) {
|
||||||
that.textLink = that.$t("linkBluetooth.startlinkBluetooth");
|
that.textLink = that.$t("linkBluetooth.startlinkBluetooth");
|
||||||
that.islink = -1;
|
that.islink = -1;
|
||||||
|
|
@ -496,13 +493,13 @@ var _default = {
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.language = uni.getStorageSync('language');
|
that.language = uni.getStorageSync('language');
|
||||||
|
console.log("onshow首页", that.language);
|
||||||
uni.onBluetoothAdapterStateChange(function (res) {
|
uni.onBluetoothAdapterStateChange(function (res) {
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
});
|
});
|
||||||
if (uni.getStorageSync('isBle') && uni.getStorageSync('isBle') == true) {
|
if (uni.getStorageSync('isBle') && uni.getStorageSync('isBle') == true) {
|
||||||
that.openBluetoothAdapter();
|
that.openBluetoothAdapter();
|
||||||
uni.setStorageSync('isBle', false);
|
uni.setStorageSync('isBle', false);
|
||||||
console.log("首次添加玩用户后初始化蓝牙", uni.getStorageSync('isBle'));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -332,10 +332,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -23px;
|
top: 8px;
|
||||||
}
|
}
|
||||||
.report .desc .statuevue .item .span.data-v-92bb8f34 {
|
.report .desc .statuevue .item .span.data-v-92bb8f34 {
|
||||||
margin-top: 8px;
|
margin-top: -25px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -8px;
|
right: -8px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -211,19 +211,16 @@ var _default = {
|
||||||
}),
|
}),
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: that.$t('common.titleMe')
|
||||||
|
});
|
||||||
that.language = uni.getStorageSync('language');
|
that.language = uni.getStorageSync('language');
|
||||||
that.index = that.languageList.findIndex(function (ite) {
|
that.index = that.languageList.findIndex(function (ite) {
|
||||||
return ite.key == that.language;
|
return ite.key == that.language;
|
||||||
});
|
});
|
||||||
console.log("language", that.language, that.index);
|
|
||||||
that.token = uni.getStorageSync('token');
|
that.token = uni.getStorageSync('token');
|
||||||
that.handleAccountNumber();
|
that.handleAccountNumber();
|
||||||
},
|
},
|
||||||
onReady: function onReady() {
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: this.$t('common.titleMe')
|
|
||||||
});
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
nickname: function nickname() {
|
nickname: function nickname() {
|
||||||
this.user = {};
|
this.user = {};
|
||||||
|
|
@ -277,10 +274,10 @@ var _default = {
|
||||||
that.$model.getSetLanguage({
|
that.$model.getSetLanguage({
|
||||||
language: that.languageList[that.index].key
|
language: that.languageList[that.index].key
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
console.log("qqqqqqqqqqq", res);
|
that.$i18n.locale = that.languageList[that.index].key;
|
||||||
that.language = that.languageList[that.index].key;
|
|
||||||
uni.setLocale(that.languageList[that.index].key);
|
|
||||||
uni.setStorageSync('language', that.languageList[that.index].key);
|
uni.setStorageSync('language', that.languageList[that.index].key);
|
||||||
|
that.$store.commit('changeLocale', that.languageList[that.index].key);
|
||||||
|
uni.$emit('login-sucesss');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
navTo: function navTo(url) {
|
navTo: function navTo(url) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue