|
@@ -3,7 +3,7 @@
|
|
|
<!-- 微信环境提示浏览器打开 -->
|
|
|
<WxPopTpis v-if="isWeChatBrowser" />
|
|
|
|
|
|
- <div class="padssive">
|
|
|
+ <div class="padssive" v-else>
|
|
|
<div class="bg-top-img-wrap" align="right">
|
|
|
<img class="bg-top-img" src="~assets/image/activity/invite-user/invite-passive-user/bg.png" />
|
|
|
</div>
|
|
@@ -131,7 +131,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="tips">
|
|
|
- 通过登录即可完成注册,成为我们的新用户,登录后表示同意双子星云手机服务协议
|
|
|
+ 通过登录即可完成注册,成为我们的新用户,登录后表示同意云手机客户端服务协议
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -139,7 +139,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import CallApp from 'callapp-lib';
|
|
|
import { registerForInvite } from '~/api/user/client.js';
|
|
|
import { sendSmsCode } from '~/api/message/phone.js';
|
|
|
import WxPopTpis from './components/WxPopTpis';
|
|
@@ -154,9 +153,11 @@ export default {
|
|
|
fetch() {
|
|
|
this.form.invitationUserName = this.$route.query.invitationUserName;
|
|
|
this.form.activityId = this.$route.query.activityId;
|
|
|
+ this.merchantSign = this.$route.query.merchantSign;
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ merchantSign: '', // 商户标识
|
|
|
form: {
|
|
|
phone: '', // 手机号
|
|
|
code: '', // 验证码
|
|
@@ -191,9 +192,9 @@ export default {
|
|
|
// 校验通过
|
|
|
let {msg} = await sendSmsCode(this, {
|
|
|
type: 'common',
|
|
|
- authorizationType: 5,
|
|
|
+ // authorizationType: 7, // 登录类型
|
|
|
phone: this.form.phone,
|
|
|
- });
|
|
|
+ },{ headers: { merchantSign: this.merchantSign }});
|
|
|
|
|
|
this.codeObj.isFinish = false;
|
|
|
this.$refs.countDown.reset();
|
|
@@ -211,26 +212,23 @@ export default {
|
|
|
const valid = await this.$refs.observer.validate();
|
|
|
if(!valid) return; // 校验不通过
|
|
|
// 校验通过
|
|
|
- await registerForInvite(this, this.form);
|
|
|
+ const res = await registerForInvite(this, this.form, { headers: { merchantSign: this.merchantSign }});
|
|
|
+ console.log(res)
|
|
|
this.$toast.success(res.msg);
|
|
|
|
|
|
// 注册成功后,下载
|
|
|
- this.registerDownload();
|
|
|
- }finally {
|
|
|
+ this.registerDownload(res.data);
|
|
|
+ }catch({message}){
|
|
|
+ message && this.$toast.fail(message);
|
|
|
+ } finally {
|
|
|
this.submitting = false;
|
|
|
}
|
|
|
},
|
|
|
- // 注册并下载 TODO
|
|
|
- async registerDownload() {
|
|
|
- let url = 'https://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
|
|
|
-
|
|
|
- const callapp = new CallApp({
|
|
|
- scheme: { protocol: 'opengeminiapp://', host: 'open' },
|
|
|
- fallback: url, // 超时后跳转的地址
|
|
|
- timeout: 2000, // 拉起app超时时间
|
|
|
- })
|
|
|
-
|
|
|
- callapp.open({ param: {}, path: '' })
|
|
|
+ // 跳转到下载应用
|
|
|
+ async registerDownload({ downloadUrl }) {
|
|
|
+ setTimeout(()=>{
|
|
|
+ window.location.href = downloadUrl;
|
|
|
+ }, 600)
|
|
|
}
|
|
|
}
|
|
|
}
|