ソースを参照

Merge branch 'dev-5.3.1' of Software/android-cloud-H5 into test

zengzhixiang 3 年 前
コミット
b4c6f327fe
共有8 個のファイルを変更した758 個の追加105 個の削除を含む
  1. 2 2
      modules/vee-validate/plugin.js
  2. 1 0
      nuxt.config.js
  3. 666 94
      package-lock.json
  4. 1 0
      package.json
  5. 1 1
      pages/activity/invite-user/index.vue
  6. 4 8
      pages/activity/invite-user/register.vue
  7. 23 0
      pages/test-call-app.vue
  8. 60 0
      plugins/callapp.js

+ 2 - 2
modules/vee-validate/plugin.js

@@ -14,7 +14,7 @@ extend('phone', {
     if (/1\d{10}/.test(value)) {
       return true;
     }
-    return '{_field_}不正确,请重新输入!';
+    return '请输入11位长度{_field_}';
     // return {
     //   valid: false,
     //   required: true,
@@ -27,6 +27,6 @@ extend('code', {
     if (/\d{6}/.test(value)) {
       return true;
     }
-    return '{_field_}不正确,请重新输入';
+    return '请输入6位{_field_}';
   },
 });

+ 1 - 0
nuxt.config.js

@@ -81,6 +81,7 @@ export default {
     '~/plugins/vue-data-dict',
     { src: '~/plugins/v-mask', mode: 'client' },
     { src: '~/plugins/vconsole', mode: 'client' },
+    { src: '~/plugins/callapp', mode: 'client' },
     // '~/plugins/jweixin',
     // '~/plugins/umeng-datasources',
     // '@/plugins/vant',

File diff suppressed because it is too large
+ 666 - 94
package-lock.json


+ 1 - 0
package.json

@@ -24,6 +24,7 @@
     "@nuxtjs/auth-next": "5.0.0-1648802546.c9880dc",
     "@nuxtjs/axios": "^5.13.6",
     "axios": "^0.27.2",
+    "callapp-lib": "^3.5.2",
     "clipboard": "^2.0.11",
     "clipboard-polyfill": "^4.0.0-rc1",
     "clipboardy": "^3.0.0",

+ 1 - 1
pages/activity/invite-user/index.vue

@@ -129,7 +129,7 @@ export default {
       return [
         { label: '今日收益(星币)', value: this.data.todayIncomeStarCoin },
         { label: '总收益(星币)', value: this.data.totalIncomeStarCoin },
-        { label: '今日购买订单数', value: this.data.totalBuyOrderCount },
+        { label: '今日购买订单数', value: this.data.todayBuyOrderSuccessCount },
         { label: '累计推广订单', value: this.data.totalBuyOrderCount },
         {
           label: '今日购买成功客户',

+ 4 - 8
pages/activity/invite-user/register.vue

@@ -28,7 +28,7 @@
             </validation-provider>
             <validation-provider
               v-slot="{ errors }"
-              name="验证码"
+              name="短信验证码"
               rules="code"
               slim
             >
@@ -114,22 +114,18 @@ export default {
       try {
         this.submitting = true;
         const valid = await this.$refs.observer.validate();
-        console.log(
-          '🚀 ~ file: register.vue ~ line 117 ~ submit ~ valid',
-          valid,
-        );
         if (valid) {
           this.$tongji.trackEvent('活动', '注册', '', 0);
           const res = await registerForInvite(this, this.form);
           this.$toast.success(res.msg);
-          this.toDownload();
+          this.openSzxApp();
         }
       } finally {
         this.submitting = false;
       }
     },
-    toDownload() {
-      window.open('https://www.androidscloud.com', '_self');
+    openSzxApp() {
+      this.$callSzx.open({ param: {}, path: '' });
     },
     async sendSmsCode() {
       try {

+ 23 - 0
pages/test-call-app.vue

@@ -0,0 +1,23 @@
+<template>
+  <v-container>
+    <div class="">
+      <v-btn @click="$callSzx.open({ path: '' })">唤起双子星</v-btn>
+      <v-btn @click="$callWechat.open({ path: '' })">唤起微信</v-btn>
+      <v-btn @click="$callWechat.open({ path: 'scanqrcode' })"
+        >唤起微信扫一扫</v-btn
+      >
+      <v-btn @click="$callAlipay.open({ path: '' })">唤起支付宝</v-btn>
+      <v-btn @click="$callAlipay.open({ param: { saId: 10000007 }, path: '' })"
+        >唤起支付宝扫一扫</v-btn
+      >
+    </div>
+  </v-container>
+</template>
+
+<script>
+export default {
+  auth: false,
+  methods: {},
+};
+</script>
+

+ 60 - 0
plugins/callapp.js

@@ -0,0 +1,60 @@
+import CallApp from 'callapp-lib';
+
+export default function (c, i) {
+  i(
+    'callSzx',
+    new CallApp({
+      scheme: {
+        protocol: 'SZXIosAPP',
+        host: '',
+        // port: 80,
+      },
+      intent: {
+        package: 'com.gemini.cloud.client',
+        // action: '',
+        // category: '',
+        // component: '',
+        scheme: 'SZXIosAPP',
+      },
+      timeout: 2000,
+      yingyongbao:
+        'https://a.app.qq.com/o/simple.jsp?pkgname=com.gemini.cloud.client',
+      appstore: 'https://www.pgyer.com/gemini6',
+      fallback: 'https://www.androidscloud.com',
+    }),
+  );
+  i(
+    'callWechat',
+    new CallApp({
+      scheme: {
+        protocol: 'weixin',
+        host: '',
+        // port: 80,
+      },
+      intent: {
+        package: 'com.tencent.mm',
+        scheme: 'weixin',
+      },
+      timeout: 2000,
+      appstore: 'https://apps.apple.com/cn/app/id414478124',
+      fallback: 'https://weixin.qq.com',
+    }),
+  );
+  i(
+    'callAlipay',
+    new CallApp({
+      scheme: {
+        protocol: 'alipayqr',
+        host: 'platformapi/startapp',
+        // port: 80,
+      },
+      intent: {
+        package: 'com.eg.android.AlipayGphone',
+        scheme: 'alipayqr',
+      },
+      timeout: 2000,
+      appstore: 'https://apps.apple.com/cn/app/id333206289',
+      fallback: 'https://www.alipay.com',
+    }),
+  );
+}