Ver código fonte

驼驼-商城

panyong 4 anos atrás
pai
commit
5ca03fbf65
1 arquivos alterados com 27 adições e 13 exclusões
  1. 27 13
      htmldev/loan/src/views/loan/explain/index.vue

+ 27 - 13
htmldev/loan/src/views/loan/explain/index.vue

@@ -1,28 +1,41 @@
 <template>
   <div class="wrapper">
-    <img class="banner" :src="productInfo.productContentUrl" alt="">
-    <div class="footer myself" :class="!RId ? 'myself' : 'other'">
-      <!--本人:可以分享-->
+    <img class="banner"
+         :src="productInfo.productContentUrl"
+         alt="">
+    <!--合伙人推广-->
+    <div class="footer myself" v-if="partnerId">
+      <router-link class="btn-apply single"
+                   :to="{path: '/loan/apply/' + orderProductId, query: { partnerId }}">点击预约办理
+      </router-link>
+    </div>
+    <!--妥妥:本人-->
+    <div class="footer myself" v-else-if="!RId">
+      <!--可以分享-->
       <template v-if="userShareConfig.share">
         <router-link class="btn-apply double"
-                     :to="{path: '/loan/apply/' + orderProductId, query: { partnerId, RId }}">点击预约办理
+                     :to="{path: '/loan/apply/' + orderProductId}">点击申请
         </router-link>
         <a class="invite double"
            href="javascript:;"
            @click="booInvite = true">分享好礼</a>
       </template>
-      <!--本人:不能分享-->
+      <!--不能分享-->
+      <router-link class="btn-apply single"
+                   :to="{path: '/loan/apply/' + orderProductId}"
+                   v-else>点击申请
+      </router-link>
+    </div>
+    <!--妥妥:非本人-->
+    <div class="footer other" v-else>
       <router-link class="btn-apply single"
-                   :to="{path: '/loan/apply/' + orderProductId, query: { partnerId, RId }}"
-                   v-else>点击预约办理
+                   :to="{path: '/loan/apply/' + orderProductId, query: { RId }}">点击预约办理
       </router-link>
-      <!--非本人-->
-      <div class="partner-info"
-           v-if="false">
+      <div class="partner-info">
         <div class="partner-avatar">
-          <img src="" alt="">
+          <img :src="decodeURIComponent(RImgUrl)" alt="">
         </div>
-        <p class="name">leon 邀请你</p>
+        <p class="name">{{ decodeURIComponent(RName) }} 邀请你</p>
       </div>
     </div>
     <!--弹窗:邀请-->
@@ -102,7 +115,8 @@ export default {
     }
   },
   async mounted () {
-    funWxShare('驼驼银服', '家里用钱,就找驼驼银服,省心,省力,妥妥的!', location.href, location.protocol + '//api.tuotuoyinfu.com/img/logo.jpg')
+    const shareHref = this.partnerId ? `${location.origin}${location.pathname}?partnerId=${this.partnerId}` : `${location.origin}${location.pathname}?RId=${this.userShareConfig.id}&RName=${encodeURIComponent(this.userShareConfig.userName)}&RImgUrl=${encodeURIComponent(this.userShareConfig.userImgUrl)}`
+    funWxShare('驼驼银服', '家里用钱,就找驼驼银服,省心,省力,妥妥的!', shareHref, location.protocol + '//api.tuotuoyinfu.com/img/logo.jpg')
     await this.$nextTick()
     this.funGetProductDetail()
   },