Browse Source

邀请码

master
luyisha 3 years ago
parent
commit
de5a480ab9
  1. 13
      src/index.html
  2. 8
      src/views/signUp/index.vue

13
src/index.html

@ -21,8 +21,17 @@
for (var i = 0; i < mobileAgent.length; i++) { for (var i = 0; i < mobileAgent.length; i++) {
if (browser.indexOf(mobileAgent[i]) != -1) { if (browser.indexOf(mobileAgent[i]) != -1) {
//todo 手机版跳转 //todo 手机版跳转
window.location.href = 'https://app.mhtcoin.com'; console.log(window.location.href);
break; if(window.location.href.indexOf('?invite_code=')!=-1){
let arr = (window.location.href.split('?'))[1];
window.location.href = 'https://app.mhtcoin.com/#/pages/reg/index?'+arr;
// window.location.href = 'http://192.168.66.100:8082/#/pages/reg/index?'+arr;
break;
}else{
window.location.href = 'https://app.mhtcoin.com';
break;
}
} }
} }
} }

8
src/views/signUp/index.vue

@ -53,7 +53,7 @@
<label @click="showType('repwdType')"></label> <label @click="showType('repwdType')"></label>
</div> </div>
<div class="form-group row"> <div class="form-group row" v-if="showInvite">
<input type="text" class="form-control" :disabled="$route.query.invite_code?true:false" v-model="user.parentCode" :placeholder="`${$t('login.referrer')}`" /> <input type="text" class="form-control" :disabled="$route.query.invite_code?true:false" v-model="user.parentCode" :placeholder="`${$t('login.referrer')}`" />
<!-- ${$t('login.optional')} --> <!-- ${$t('login.optional')} -->
</div> </div>
@ -201,7 +201,8 @@ export default {
emailCode: null emailCode: null
}, },
codes: new Array(6) codes: new Array(6),
showInvite: false
}; };
}, },
@ -533,6 +534,9 @@ export default {
if (document.body.clientWidth < 750) { if (document.body.clientWidth < 750) {
window.location.href = this.Globals.mobileUrl + '/#/pages/reg/index?invite_code=' + this.$route.query.invite_code window.location.href = this.Globals.mobileUrl + '/#/pages/reg/index?invite_code=' + this.$route.query.invite_code
} }
this.showInvite = false;
}else{
this.showInvite = true;
} }
}, },

Loading…
Cancel
Save