浏览代码

feat: 优化 banner 跳转,分销等

xiansin 2 年之前
父节点
当前提交
480f417408

+ 12 - 2
mini/components/SwiperBox/index.vue

xqd xqd xqd
@@ -57,7 +57,8 @@ export default {
     return {
       loading: true,
       list: [],
-      currentNum: 0
+      currentNum: 0,
+      data: []
     }
   },
   computed: {
@@ -67,8 +68,16 @@ export default {
   },
   methods: {
     handleClick(index) {
-      const item = this.list[index]
+      const item = this.data[index]
       console.log('-->data', item)
+      if (item.episode_id) {
+        this.$u.route({
+          url: 'pages/episode/play',
+          params: {
+            id: item.episode_id
+          }
+        })
+      }
     },
     handleChange(e) {
       this.currentNum = e.current
@@ -76,6 +85,7 @@ export default {
     async getSwiper() {
       await this.$api.setting.banner().then(res => {
         this.loading = false
+        this.data = res.data
         res.data.forEach(obj => {
           this.list.push(obj.image)
         })

+ 7 - 7
mini/pages/episode/play.vue

xqd
@@ -120,13 +120,13 @@ export default {
     // 进度条
     progress(val) {
       if (val >= 100) {
-        const len = this.lists.length
-        const indexArr = ['prev', 'current', 'next']
-        const swiperKey = indexArr[this.swiperCurrent]
-        if (this.swiperEpisode[swiperKey].sort === this.lists[len - 1].sort) {
-          this.$u.toast('已全部播放完成')
-          return 100
-        }
+        // const indexArr = ['prev', 'current', 'next']
+        // const len = this.lists.length
+        // const swiperKey = indexArr[this.swiperCurrent]
+        // if (this.swiperEpisode[swiperKey].sort === this.lists[len - 1].sort) {
+        //   this.$u.toast('已全部播放完成')
+        //   return 100
+        // }
         // 切换
         switch (this.swiperCurrent) {
           case 0:

+ 3 - 2
mini/pages/member/index.vue

xqd xqd
@@ -20,7 +20,7 @@
       </view>
     </view>
     <view class="free main-center cross-center" @click="$u.route('/pages/member/free')">
-      查看 <text>免费片单</text>
+      查看 <text>会员片单</text>
     </view>
 
     <view class="footer main-between">
@@ -267,8 +267,9 @@ export default {
         padding: 20rpx 0;
         color: $info-color;
         text-align: center;
-        font-size: 26rpx;
+        font-size: 42rpx;
         margin-top: 60px;
+        font-weight: bold;
         text{
           color: $dark-color;
         }

+ 0 - 1
mini/pages/my/index.vue

xqd
@@ -124,7 +124,6 @@ export default {
       menus: [
         { icon: '/static/image/my-page/order.png', name: '消费记录', href: '/pages/my/consume' },
         { icon: '/static/image/my-page/recharge.png', name: '充值记录', href: '/pages/my/recharge' },
-        { icon: '/static/image/my-page/share.png', name: '分享好友', type: 'share' },
         { icon: '/static/image/my-page/contact.png', name: '联系客服', type: 'contact' },
         { icon: '/static/image/my-page/share.png', name: '分享中心', href: '/pages/share/index' },
         { icon: '/static/image/my-page/protocol.png', name: '用户协议', href: '/pages/my/protocol' }

+ 15 - 0
mini/pages/share/index.vue

xqd xqd xqd
@@ -39,6 +39,7 @@
         :key="index"
         class="menu-item main-between cross-center"
         :open-type="menu.type ? menu.type : ''"
+        @bindcontact="handleMenu"
         @click="handleMenu(menu)"
       >
         <view class="left-box dir-left-nowrap cross-center">
@@ -59,6 +60,7 @@ export default {
   data() {
     return {
       menus: [
+        { icon: '/static/image/my-page/share.png', name: '分享好友', type: 'share' },
         { icon: '/static/image/share/income.png', name: '分享佣金', href: '/pages/share/income' },
         { icon: '/static/image/share/order.png', name: '分享订单', href: '/pages/share/order' },
         { icon: '/static/image/share/detail.png', name: '提现明细', href: '/pages/share/withdrawDetail' },
@@ -73,6 +75,19 @@ export default {
   },
   methods: {
     handleMenu(menu) {
+      // #ifdef MP-KUAISHOU
+      if (menu.type === 'contact') {
+        ks.makePhoneCall({
+          phoneNumber: this.config.contact,
+          success(res) {
+            console.log('-->success', res)
+          },
+          fail(err) {
+            console.log('-->error', err)
+          }
+        })
+      }
+      // #endif
       if (menu.href) {
         this.$u.route(menu.href)
       }

+ 1 - 1
mini/pages/share/team.vue

xqd
@@ -1,7 +1,7 @@
 <template>
   <view class="share-team">
     <view class="title">
-      <text>一级分享名称({{ userInfo.child_count }})</text>
+      <text>一级分享名称</text>
     </view>
 
     <view