Browse Source

优化

master
ltlzx 4 years ago
parent
commit
f5f781b650
  1. 2
      api/serve/index.js
  2. 1
      i18n/lang/en.json
  3. 1
      i18n/lang/zh-TW.json
  4. 1
      layout/vHeader.vue
  5. 12
      pages/auth/index.vue
  6. 23
      pages/reg/index.vue

2
api/serve/index.js

@ -84,7 +84,7 @@ x.fn = x.prototype = {
let newMsg=options.url.replace(reg,'_'); let newMsg=options.url.replace(reg,'_');
console.info(newMsg) console.info(newMsg)
if(Cache.get(newMsg).data){ if(Cache.get(newMsg).data){
if(newMsg!='_user_walletImage' && newMsg!='_user_withdrawalBalance' && newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'){ if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance' && newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'){
resolve(Cache.get(newMsg).data); resolve(Cache.get(newMsg).data);
} }
uni.request({ uni.request({

1
i18n/lang/en.json

@ -41,6 +41,7 @@
"dark": "dark", "dark": "dark",
"service": "Service", "service": "Service",
"toDwon": "Do you want to go to the download page", "toDwon": "Do you want to go to the download page",
"toDwon1": "Do you want to go to the authentication page",
"a0":"Please enter the purchase code", "a0":"Please enter the purchase code",
"a1":"Copy succeeded", "a1":"Copy succeeded",
"a2":"copy failed", "a2":"copy failed",

1
i18n/lang/zh-TW.json

@ -41,6 +41,7 @@
"dark": "黑", "dark": "黑",
"service": "客服", "service": "客服",
"toDwon": "是否前往下載頁", "toDwon": "是否前往下載頁",
"toDwon1": "是否前往認證頁",
"a0":"請輸入申購碼", "a0":"請輸入申購碼",
"a1":"複製成功", "a1":"複製成功",
"a2":"複製失敗", "a2":"複製失敗",

1
layout/vHeader.vue

@ -38,6 +38,7 @@ export default {
}, },
methods: { methods: {
onClickLeft() { onClickLeft() {
console.info(this.leftClick)
if (this.leftClick) { if (this.leftClick) {
this.leftClick(); this.leftClick();
} else { } else {

12
pages/auth/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="layout-page" :style="themeStyle"> <view class="layout-page" :style="themeStyle">
<v-header :title="$t('auth.a0')"></v-header> <v-header :title="$t('auth.a0')" :leftClick="leftClick"></v-header>
<view class="rounded-md overflow-hidden m-lg bg-panel-3 box-shadow"> <view class="rounded-md overflow-hidden m-lg bg-panel-3 box-shadow">
<v-link to="/pages/auth/primary" class="d-flex align-center p-md border-b link-active "> <v-link to="/pages/auth/primary" class="d-flex align-center p-md border-b link-active ">
<view class="flex-fill color-light fn-lg"> <view class="flex-fill color-light fn-lg">
@ -63,7 +63,15 @@ export default {
Profile.getAuthInfo().then(res=>{ Profile.getAuthInfo().then(res=>{
this.detail = res.data this.detail = res.data
}) })
} },
leftClick(){
// console.info(this.$route.query)
if(this.$route.query.type==1){
this._router.push("/pages/base/index");
}else{
this.$back();
}
}
}, },
created(){ created(){
this.getAuthInfo() this.getAuthInfo()

23
pages/reg/index.vue

@ -203,13 +203,15 @@ export default {
// #ifdef H5 // #ifdef H5
this.$dialog.confirm({ this.$dialog.confirm({
title: this.$t("common.tips"), title: this.$t("common.tips"),
message: this.$t('common.toDwon'), // message: this.$t('common.toDwon'),
message: this.$t('common.toDwon1'),
confirmButtonText: this.$t("common.confirm"), // confirmButtonText: this.$t("common.confirm"), //
cancelButtonText: this.$t("common.cancel"), cancelButtonText: this.$t("common.cancel"),
cancel:true cancel:true
}) })
.then(() => { .then(() => {
window.open(app.down, "_blank "); // window.open(app.down, "_blank ");
this.login()
}).catch(()=>{ }).catch(()=>{
if (this.query.from) { if (this.query.from) {
this.$back(); this.$back();
@ -228,6 +230,23 @@ export default {
this.$toast(this.$t('reg.c5')); this.$toast(this.$t('reg.c5'));
}); });
}, },
//
login(){
let data={type: 2,account:this.form.account,password: this.form.password}
Member.login(this.form)
.then((res) => {
this.loginSuccess(res.data);
})
.catch(() => {
});
},
//
loginSuccess(data) {
this.setToken(data.token);
this.setUser(data.user);
this._router.replace("/pages/auth/index?type=1");
},
// //
clause() { clause() {
Member.clause().then((res) => { Member.clause().then((res) => {

Loading…
Cancel
Save