Forráskód Böngészése

feat(活动-邀请好友赚星币): 活动规则对接协议

曾志翔 2 éve%!(EXTRA string=óta)
szülő
commit
1f9fe75611
1 módosított fájl, 12 hozzáadás és 4 törlés
  1. 12 4
      pages/activity/invite-user/index.vue

+ 12 - 4
pages/activity/invite-user/index.vue

@@ -46,8 +46,8 @@
     </div> -->
     <div class="box box4">
       <div class="box-header">活动规则</div>
-      <div class="box-main text-sm">
-        <p>1、传播过程中有任何疑问,可直接咨询客服</p>
+      <div class="box-main text-sm" v-html="activityRules">
+        <!-- <p>1、传播过程中有任何疑问,可直接咨询客服</p>
         <p>
           2、用户可以通过分享页面或者套餐给想要分享的人,被分享人购买云机套餐后,分享人可获得套餐对应的星币
         </p>
@@ -57,7 +57,7 @@
         <p>4、星币可在双子星购买任一等价值套餐</p>
         <p>
           5、请勿利用双子星传播或扩散任何有关于政治、情色等任何违法的信息,一经发现,取消资格,如果触犯任何法律相关问题,平台不负任何责任
-        </p>
+        </p> -->
       </div>
     </div>
     <!-- <div class="">invite-user</div> -->
@@ -86,7 +86,7 @@
 // import clipboard from 'clipboardy/browser';
 import * as clipboard from 'clipboard-polyfill/text';
 import { getStarCoinOverview } from '~/api/activity/invite-user.js';
-
+import { getContentByType } from '~/api/public/agreement.js';
 export default {
   // auth: false,
   name: 'InviteUser',
@@ -105,11 +105,13 @@ export default {
         activityId: null,
         status: 0,
       },
+      activityRules: '',
     };
   },
   async fetch() {
     //
     try {
+      this.getActivityRules();
       this.data = (await getStarCoinOverview(this)).data;
     } catch (error) {
       this.$toast.error(error.message);
@@ -195,6 +197,12 @@ export default {
         this.$toast.success('链接复制成功');
       }
     },
+    async getActivityRules() {
+      const res = await getContentByType(this, 'iuserrules01');
+      this.activityRules = res.data.content
+        .replace(/[\d\D]*<body>([\d\D]+)<\/body>[\d\D]*/i, '$1')
+        .replace(/<div class="phone-container">([\d\D]+)<\/div>/g, '$1');
+    },
   },
 };
 </script>