多语言小程序
This commit is contained in:
parent
741f1460e9
commit
ad6a039c2e
31
App.vue
31
App.vue
|
|
@ -93,35 +93,14 @@
|
||||||
// 版本信息
|
// 版本信息
|
||||||
handleoginversion() {
|
handleoginversion() {
|
||||||
let that = this
|
let that = this
|
||||||
that.$model.getloginversion({
|
that.$model.getloginversion().then(res => {
|
||||||
is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
|
let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language
|
||||||
}).then(res => {
|
uni.setLocale(language)
|
||||||
that.$store.commit('changeLanguage', res.data.language_arr)
|
|
||||||
if (res.code == 0) {
|
|
||||||
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)
|
if (res.code == 0) {
|
||||||
uni.$emit('login-sucesss');
|
uni.$emit('login-sucesss');
|
||||||
console.log("已登录手机语言", res.data.language)
|
|
||||||
} else {
|
} else {
|
||||||
uni.getSystemInfo({
|
|
||||||
success(e) {
|
|
||||||
let locale = ""
|
|
||||||
that.list.forEach(ite => {
|
|
||||||
if (e.language.indexOf(ite.key) != -1) {
|
|
||||||
locale = ite.value
|
|
||||||
}
|
|
||||||
})
|
|
||||||
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');
|
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', {
|
||||||
|
|
@ -129,7 +108,7 @@
|
||||||
})
|
})
|
||||||
// 比对版本号
|
// 比对版本号
|
||||||
let version = that.$tools.compareVersions(SystemVersion, res.data.version)
|
let version = that.$tools.compareVersions(SystemVersion, res.data.version)
|
||||||
console.log("是否登录及版本号", res.data.version, SystemVersion, version)
|
console.log("是否登录及版本号",res, res.data.version, SystemVersion, version)
|
||||||
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
if (version == -1) { // 0版本号相通,1,:第一个版本号大于第二个版本号,-1:第一个版本号小于第二个版本号
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '发现新版本',
|
title: '发现新版本',
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
<uni-icons type="down" size="18"></uni-icons>
|
<uni-icons type="down" size="18"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="languageList" v-if="Islanguage">
|
<view class="languageList" v-if="Islanguage">
|
||||||
<view class="item" v-for="(ite,ind) in languageList" :class="[nowlanguage==ite.value?'active':'']"
|
<view class="item" v-for="(ite,ind) in languageList" :class="[nowlanguage==ite.name?'active':'']"
|
||||||
@click="handleSetlanguage(ite)">
|
@click="handleSetlanguage(ite)">
|
||||||
{{ite.value}}
|
{{ite.name}}
|
||||||
<image src="../../static/dui1.png" v-if="nowlanguage==ite.value"></image>
|
<image src="../../static/dui1.png" v-if="nowlanguage==ite.name"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="editem">
|
<view class="editem">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text">{{language=='zh-Hans'?$t("common.titleAccountText"):$t("common.infoEmail")}}
|
<view class="text">{{$t("common.titleAccountText")}}
|
||||||
</view>
|
</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input v-model="phone" :placeholder="$t('tips.verifyRecord')" />
|
<input v-model="phone" :placeholder="$t('tips.verifyRecord')" />
|
||||||
|
|
@ -118,6 +118,9 @@
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let that = this
|
let that = this
|
||||||
|
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
|
||||||
|
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).value
|
||||||
|
console.log("language", that.language, uni.getStorageSync('language'), uni.getLocale())
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
that.login()
|
that.login()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
@ -258,12 +261,11 @@
|
||||||
// 语言切换
|
// 语言切换
|
||||||
handleSetlanguage(ite) {
|
handleSetlanguage(ite) {
|
||||||
let that = this
|
let that = this
|
||||||
|
uni.setLocale(ite.key)
|
||||||
that.language = ite.key
|
that.language = ite.key
|
||||||
that.nowlanguage = ite.value
|
that.nowlanguage = ite.value
|
||||||
that.Islanguage = false
|
that.Islanguage = false
|
||||||
that.$i18n.locale = ite.key
|
|
||||||
uni.setStorageSync('language', ite.key)
|
uni.setStorageSync('language', ite.key)
|
||||||
that.$store.commit('changeLocale', ite.key)
|
|
||||||
},
|
},
|
||||||
handleToggle() {
|
handleToggle() {
|
||||||
this.phone = ""
|
this.phone = ""
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,14 @@ const httpRequest = (url, method = "get", data) => {
|
||||||
const get = (url, data) => {
|
const get = (url, data) => {
|
||||||
data.token = uni.getStorageSync('token')
|
data.token = uni.getStorageSync('token')
|
||||||
data.aan_id = uni.getStorageSync('aan_id')
|
data.aan_id = uni.getStorageSync('aan_id')
|
||||||
|
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
|
||||||
return httpRequest(url, 'get', data)
|
return httpRequest(url, 'get', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const post = (url, data) => {
|
const post = (url, data) => {
|
||||||
data.token = uni.getStorageSync('token')
|
data.token = uni.getStorageSync('token')
|
||||||
data.aan_id = uni.getStorageSync('aan_id')
|
data.aan_id = uni.getStorageSync('aan_id')
|
||||||
|
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
|
||||||
return httpRequest(url, 'post', data)
|
return httpRequest(url, 'post', data)
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
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
|
|
@ -185,33 +185,14 @@ var _default = {
|
||||||
// 版本信息
|
// 版本信息
|
||||||
handleoginversion: function handleoginversion() {
|
handleoginversion: function handleoginversion() {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.$model.getloginversion({
|
that.$model.getloginversion().then(function (res) {
|
||||||
is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
|
var language = res.data.language == "zh" ? 'zh-Hans' : res.data.language;
|
||||||
}).then(function (res) {
|
uni.setLocale(language);
|
||||||
that.$store.commit('changeLanguage', res.data.language_arr);
|
|
||||||
if (res.code == 0) {
|
|
||||||
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);
|
if (res.code == 0) {
|
||||||
uni.$emit('login-sucesss');
|
uni.$emit('login-sucesss');
|
||||||
console.log("已登录手机语言", res.data.language);
|
|
||||||
} else {
|
} else {
|
||||||
uni.getSystemInfo({
|
|
||||||
success: function success(e) {
|
|
||||||
var locale = "";
|
|
||||||
that.list.forEach(function (ite) {
|
|
||||||
if (e.language.indexOf(ite.key) != -1) {
|
|
||||||
locale = ite.value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var 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');
|
uni.$emit('need-login');
|
||||||
console.log("未登录手机语言", language, uni.getStorageSync('language'), locale);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -104,46 +104,7 @@
|
||||||
/******/ var promises = [];
|
/******/ var promises = [];
|
||||||
/******/
|
/******/
|
||||||
/******/
|
/******/
|
||||||
/******/ // mini-css-extract-plugin CSS loading
|
|
||||||
/******/ var cssChunks = {"uni_modules/uni-icons/components/uni-icons/uni-icons":1,"element/headerIndex":1,"element/manuallyAdd/record":1,"uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item":1,"uni_modules/uni-collapse/components/uni-collapse/uni-collapse":1,"uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts":1,"element/slider-fraction":1,"element/manuallyAdd/publicAdd":1,"element/target/firstweight":1,"uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item":1,"element/ren-calendar/ren-calendar":1,"uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker":1,"element/drawer":1,"uni_modules/qiun-data-charts/components/qiun-error/qiun-error":1,"uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar":1,"uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker":1,"uni_modules/qiun-data-charts/components/qiun-loading/loading1":1,"uni_modules/qiun-data-charts/components/qiun-loading/loading2":1,"uni_modules/qiun-data-charts/components/qiun-loading/loading3":1,"uni_modules/qiun-data-charts/components/qiun-loading/loading4":1,"uni_modules/qiun-data-charts/components/qiun-loading/loading5":1,"uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item":1};
|
|
||||||
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
|
||||||
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
|
||||||
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
|
||||||
/******/ var href = "" + ({"uni_modules/uni-icons/components/uni-icons/uni-icons":"uni_modules/uni-icons/components/uni-icons/uni-icons","element/headerIndex":"element/headerIndex","element/manuallyAdd/record":"element/manuallyAdd/record","uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item":"uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item","uni_modules/uni-collapse/components/uni-collapse/uni-collapse":"uni_modules/uni-collapse/components/uni-collapse/uni-collapse","uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts":"uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts","element/slider-fraction":"element/slider-fraction","element/manuallyAdd/publicAdd":"element/manuallyAdd/publicAdd","element/target/firstweight":"element/target/firstweight","uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item":"uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item","uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action":"uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action","element/ren-calendar/ren-calendar":"element/ren-calendar/ren-calendar","uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker":"uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker","element/drawer":"element/drawer","uni_modules/qiun-data-charts/components/qiun-error/qiun-error":"uni_modules/qiun-data-charts/components/qiun-error/qiun-error","uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading":"uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading","uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar":"uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar","uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker":"uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker","uni_modules/qiun-data-charts/components/qiun-loading/loading1":"uni_modules/qiun-data-charts/components/qiun-loading/loading1","uni_modules/qiun-data-charts/components/qiun-loading/loading2":"uni_modules/qiun-data-charts/components/qiun-loading/loading2","uni_modules/qiun-data-charts/components/qiun-loading/loading3":"uni_modules/qiun-data-charts/components/qiun-loading/loading3","uni_modules/qiun-data-charts/components/qiun-loading/loading4":"uni_modules/qiun-data-charts/components/qiun-loading/loading4","uni_modules/qiun-data-charts/components/qiun-loading/loading5":"uni_modules/qiun-data-charts/components/qiun-loading/loading5","uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item":"uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item"}[chunkId]||chunkId) + ".wxss";
|
|
||||||
/******/ var fullhref = __webpack_require__.p + href;
|
|
||||||
/******/ var existingLinkTags = document.getElementsByTagName("link");
|
|
||||||
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
|
|
||||||
/******/ var tag = existingLinkTags[i];
|
|
||||||
/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
|
|
||||||
/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
|
|
||||||
/******/ }
|
|
||||||
/******/ var existingStyleTags = document.getElementsByTagName("style");
|
|
||||||
/******/ for(var i = 0; i < existingStyleTags.length; i++) {
|
|
||||||
/******/ var tag = existingStyleTags[i];
|
|
||||||
/******/ var dataHref = tag.getAttribute("data-href");
|
|
||||||
/******/ if(dataHref === href || dataHref === fullhref) return resolve();
|
|
||||||
/******/ }
|
|
||||||
/******/ var linkTag = document.createElement("link");
|
|
||||||
/******/ linkTag.rel = "stylesheet";
|
|
||||||
/******/ linkTag.type = "text/css";
|
|
||||||
/******/ linkTag.onload = resolve;
|
|
||||||
/******/ linkTag.onerror = function(event) {
|
|
||||||
/******/ var request = event && event.target && event.target.src || fullhref;
|
|
||||||
/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
|
|
||||||
/******/ err.code = "CSS_CHUNK_LOAD_FAILED";
|
|
||||||
/******/ err.request = request;
|
|
||||||
/******/ delete installedCssChunks[chunkId]
|
|
||||||
/******/ linkTag.parentNode.removeChild(linkTag)
|
|
||||||
/******/ reject(err);
|
|
||||||
/******/ };
|
|
||||||
/******/ linkTag.href = fullhref;
|
|
||||||
/******/
|
/******/
|
||||||
/******/ var head = document.getElementsByTagName("head")[0];
|
|
||||||
/******/ head.appendChild(linkTag);
|
|
||||||
/******/ }).then(function() {
|
|
||||||
/******/ installedCssChunks[chunkId] = 0;
|
|
||||||
/******/ }));
|
|
||||||
/******/ }
|
|
||||||
/******/
|
/******/
|
||||||
/******/ // JSONP chunk loading for javascript
|
/******/ // JSONP chunk loading for javascript
|
||||||
/******/
|
/******/
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -104,20 +104,19 @@ var render = function () {
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var m0 = _vm.$t("common.titleLogin")
|
var m0 = _vm.$t("common.titleLogin")
|
||||||
var m1 = _vm.$t("common.titleToggleLogin")
|
var m1 = _vm.$t("common.titleToggleLogin")
|
||||||
var m2 = _vm.language == "zh-Hans" ? _vm.$t("common.titleAccountText") : null
|
var m2 = _vm.$t("common.titleAccountText")
|
||||||
var m3 = !(_vm.language == "zh-Hans") ? _vm.$t("common.infoEmail") : null
|
var m3 = _vm.$t("tips.verifyRecord")
|
||||||
var m4 = _vm.$t("tips.verifyRecord")
|
var m4 = _vm.isCode ? _vm.$t("common.titleCode") : null
|
||||||
var m5 = _vm.isCode ? _vm.$t("common.titleCode") : null
|
var m5 = _vm.isCode ? _vm.$t("common.titleCode") : null
|
||||||
var m6 = _vm.isCode ? _vm.$t("common.titleCode") : null
|
var m6 =
|
||||||
var m7 =
|
|
||||||
_vm.isCode && !(_vm.second < 60) ? _vm.$t("common.titleSendCode") : null
|
_vm.isCode && !(_vm.second < 60) ? _vm.$t("common.titleSendCode") : null
|
||||||
|
var m7 = !_vm.isCode ? _vm.$t("common.titlePassword") : null
|
||||||
var m8 = !_vm.isCode ? _vm.$t("common.titlePassword") : null
|
var m8 = !_vm.isCode ? _vm.$t("common.titlePassword") : null
|
||||||
var m9 = !_vm.isCode ? _vm.$t("common.titlePassword") : null
|
var m9 = !_vm.isCode ? _vm.$t("common.titleForgotPassword") : null
|
||||||
var m10 = !_vm.isCode ? _vm.$t("common.titleForgotPassword") : null
|
var m10 = _vm.$t("common.titleAgreementText")
|
||||||
var m11 = _vm.$t("common.titleAgreementText")
|
var m11 = _vm.$t("common.titleAgreementContntText")
|
||||||
var m12 = _vm.$t("common.titleAgreementContntText")
|
var m12 = _vm.$t("common.titleLogin")
|
||||||
var m13 = _vm.$t("common.titleLogin")
|
var m13 = _vm.$t("common.titleRegister")
|
||||||
var m14 = _vm.$t("common.titleRegister")
|
|
||||||
_vm.$mp.data = Object.assign(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
|
|
@ -136,7 +135,6 @@ var render = function () {
|
||||||
m11: m11,
|
m11: m11,
|
||||||
m12: m12,
|
m12: m12,
|
||||||
m13: m13,
|
m13: m13,
|
||||||
m14: m14,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -204,6 +202,11 @@ var _default = {
|
||||||
computed: _objectSpread({}, (0, _vuex.mapState)(["languageList"])),
|
computed: _objectSpread({}, (0, _vuex.mapState)(["languageList"])),
|
||||||
onLoad: function onLoad() {
|
onLoad: function onLoad() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale();
|
||||||
|
that.nowlanguage = that.languageList.find(function (ite) {
|
||||||
|
return ite.key == that.language;
|
||||||
|
}).value;
|
||||||
|
console.log("language", that.language, uni.getStorageSync('language'), uni.getLocale());
|
||||||
that.login();
|
that.login();
|
||||||
},
|
},
|
||||||
onReady: function onReady() {
|
onReady: function onReady() {
|
||||||
|
|
@ -342,12 +345,11 @@ var _default = {
|
||||||
// 语言切换
|
// 语言切换
|
||||||
handleSetlanguage: function handleSetlanguage(ite) {
|
handleSetlanguage: function handleSetlanguage(ite) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
uni.setLocale(ite.key);
|
||||||
that.language = ite.key;
|
that.language = ite.key;
|
||||||
that.nowlanguage = ite.value;
|
that.nowlanguage = ite.value;
|
||||||
that.Islanguage = false;
|
that.Islanguage = false;
|
||||||
that.$i18n.locale = ite.key;
|
|
||||||
uni.setStorageSync('language', ite.key);
|
uni.setStorageSync('language', ite.key);
|
||||||
that.$store.commit('changeLocale', ite.key);
|
|
||||||
},
|
},
|
||||||
handleToggle: function handleToggle() {
|
handleToggle: function handleToggle() {
|
||||||
this.phone = "";
|
this.phone = "";
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="content data-v-111bb4d3"><view class="bg data-v-111bb4d3"></view><view class="top data-v-111bb4d3"><image src="../../static/logo2.png" class="data-v-111bb4d3"></image><text class="data-v-111bb4d3">Reedaw</text></view><view class="login box_shadow data-v-111bb4d3"><view class="title data-v-111bb4d3">{{$root.m0}}</view><view data-event-opts="{{[['tap',[['handleToggle',['$event']]]]]}}" class="toggle cblue data-v-111bb4d3" bindtap="__e">{{''+$root.m1+''}}</view><view class="editem data-v-111bb4d3"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{(language=='zh-Hans'?$root.m2:$root.m3)+''}}</view><view class="input data-v-111bb4d3"><input placeholder="{{$root.m4}}" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-111bb4d3"/></view></view><block wx:if="{{isCode}}"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m5}}</view><view class="input yanzhengma data-v-111bb4d3"><input class="uni-input data-v-111bb4d3" placeholder="{{$root.m6}}" data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" value="{{code}}" bindinput="__e"/><button class="code data-v-111bb4d3" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second:$root.m7)+''}}</button></view></view></block><block wx:else><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m8}}</view><view class="input data-v-111bb4d3"><input class="uni-input data-v-111bb4d3" placeholder="{{$root.m9}}" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view></view></block><block wx:if="{{!isCode}}"><view class="forget data-v-111bb4d3"><text data-event-opts="{{[['tap',[['handlePassword',['forgetPassword']]]]]}}" bindtap="__e" class="data-v-111bb4d3">{{$root.m10+"?"}}</text></view></block></view><view class="xieyi data-v-111bb4d3"><checkbox-group data-event-opts="{{[['change',[['checkboxChange',['$event']]]]]}}" class="group data-v-111bb4d3" bindchange="__e"><label class="data-v-111bb4d3"><checkbox style="transform:scale(0.7);" value="{{1}}" class="data-v-111bb4d3"></checkbox>{{$root.m11+''}}<text data-event-opts="{{[['tap',[['',['$event']],['handlexieyi',['$event']]]]]}}" class="blue data-v-111bb4d3" catchtap="__e">{{"《"+$root.m12+"》"}}</text></label></checkbox-group></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-111bb4d3" bindtap="__e">{{$root.m13}}</view><view data-event-opts="{{[['tap',[['handlePassword',['register']]]]]}}" class="btngroup data-v-111bb4d3" bindtap="__e"><text class="data-v-111bb4d3">{{$root.m14}}</text></view></view><view class="wxbtn data-v-111bb4d3"><block wx:if="{{value==1}}"><button open-type="getPhoneNumber" data-event-opts="{{[['getphonenumber',[['getPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e" class="data-v-111bb4d3"><view class="data-v-111bb4d3"><image src="../../static/phone.png" class="data-v-111bb4d3"></image></view><text class="data-v-111bb4d3">手机号快捷登录</text></button></block><block wx:else><button data-event-opts="{{[['tap',[['handleIsTel',['$event']]]]]}}" bindtap="__e" class="data-v-111bb4d3"><view class="data-v-111bb4d3"><image src="../../static/phone.png" class="data-v-111bb4d3"></image></view><text class="data-v-111bb4d3">手机号快捷登录</text></button></block></view></view>
|
<view class="content data-v-111bb4d3"><view class="bg data-v-111bb4d3"></view><view class="top data-v-111bb4d3"><image src="../../static/logo2.png" class="data-v-111bb4d3"></image><text class="data-v-111bb4d3">Reedaw</text></view><view class="login box_shadow data-v-111bb4d3"><view class="title data-v-111bb4d3">{{$root.m0}}</view><view data-event-opts="{{[['tap',[['handleToggle',['$event']]]]]}}" class="toggle cblue data-v-111bb4d3" bindtap="__e">{{''+$root.m1+''}}</view><view class="editem data-v-111bb4d3"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m2+''}}</view><view class="input data-v-111bb4d3"><input placeholder="{{$root.m3}}" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-111bb4d3"/></view></view><block wx:if="{{isCode}}"><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m4}}</view><view class="input yanzhengma data-v-111bb4d3"><input class="uni-input data-v-111bb4d3" placeholder="{{$root.m5}}" data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" value="{{code}}" bindinput="__e"/><button class="code data-v-111bb4d3" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second:$root.m6)+''}}</button></view></view></block><block wx:else><view class="item data-v-111bb4d3"><view class="text data-v-111bb4d3">{{$root.m7}}</view><view class="input data-v-111bb4d3"><input class="uni-input data-v-111bb4d3" placeholder="{{$root.m8}}" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view></view></block><block wx:if="{{!isCode}}"><view class="forget data-v-111bb4d3"><text data-event-opts="{{[['tap',[['handlePassword',['forgetPassword']]]]]}}" bindtap="__e" class="data-v-111bb4d3">{{$root.m9+"?"}}</text></view></block></view><view class="xieyi data-v-111bb4d3"><checkbox-group data-event-opts="{{[['change',[['checkboxChange',['$event']]]]]}}" class="group data-v-111bb4d3" bindchange="__e"><label class="data-v-111bb4d3"><checkbox style="transform:scale(0.7);" value="{{1}}" class="data-v-111bb4d3"></checkbox>{{$root.m10+''}}<text data-event-opts="{{[['tap',[['',['$event']],['handlexieyi',['$event']]]]]}}" class="blue data-v-111bb4d3" catchtap="__e">{{"《"+$root.m11+"》"}}</text></label></checkbox-group></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-111bb4d3" bindtap="__e">{{$root.m12}}</view><view data-event-opts="{{[['tap',[['handlePassword',['register']]]]]}}" class="btngroup data-v-111bb4d3" bindtap="__e"><text class="data-v-111bb4d3">{{$root.m13}}</text></view></view><view class="wxbtn data-v-111bb4d3"><block wx:if="{{value==1}}"><button open-type="getPhoneNumber" data-event-opts="{{[['getphonenumber',[['getPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e" class="data-v-111bb4d3"><view class="data-v-111bb4d3"><image src="../../static/phone.png" class="data-v-111bb4d3"></image></view><text class="data-v-111bb4d3">手机号快捷登录</text></button></block><block wx:else><button data-event-opts="{{[['tap',[['handleIsTel',['$event']]]]]}}" bindtap="__e" class="data-v-111bb4d3"><view class="data-v-111bb4d3"><image src="../../static/phone.png" class="data-v-111bb4d3"></image></view><text class="data-v-111bb4d3">手机号快捷登录</text></button></block></view></view>
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": false
|
"compileHotReLoad": false
|
||||||
},
|
},
|
||||||
"libVersion": "3.8.1",
|
"libVersion": "3.10.3",
|
||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"list": [
|
"list": [
|
||||||
|
|
|
||||||
|
|
@ -1353,7 +1353,7 @@ var _default2 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.default = _default2;
|
exports.default = _default2;
|
||||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 464)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 464)["uniCloud"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue