Browse Source

京东+签到支付广告

xiaomei 1 year ago
parent
commit
24b981d31c

+ 0 - 111
src/pages/my/index.vue

@@ -45,28 +45,6 @@
             </view>
             <!-- 用户信息-end -->
             <!-- 节点 -->
-            <!-- <view class="regional flex_r" v-if="localInfo.regional.length > 0">
-                <image src="@/static/my/regional.png" alt="" srcset="" class="ico" />
-                <view class="flex_r flex_ac">
-                    <span class="txtinfo">区域服务节点:</span>
-                    <swiper class="notice_swiper" vertical autoplay circular :interval="2000" :duration="1000">
-                        <swiper-item v-for="(iitem, iindex) in localInfo.regional" :key="iindex" @click="toDetail(item.article_id)">
-                            <span class="not_list">{{ iitem }}</span>
-                        </swiper-item>
-                    </swiper>
-                </view>
-            </view>
-            <view class="regional flex_r flex_ac" v-if="localInfo.operate.length > 0">
-                <image src="@/static/my/regional.png" alt="" srcset="" class="ico" />
-                <view class="flex_r flex_ac">
-                    <span class="txtinfo">区域运营节点:</span>
-                    <swiper class="notice_swiper" vertical autoplay circular :interval="2000" :duration="1000">
-                        <swiper-item v-for="(iitem, iindex) in localInfo.operate" :key="iindex" @click="toDetail(item.article_id)">
-                            <span class="not_list">{{ iitem }}</span>
-                        </swiper-item>
-                    </swiper>
-                </view>
-            </view> -->
             
             <!-- 节点-end -->
             <!-- 账户信息 -->
@@ -84,100 +62,11 @@
                             <image src="/static/wallet/3.png" class="ico" /><span>消费券</span></p>
                         <p class="dinB tc">{{localInfo.integral||0}}</p>
                     </div>
-                    <!-- <div class="i_num flex_c flex_ac" @click="goto('/pages/accountDetails/teaBaby')">
-                        <p class="flex_r flex_ac flex_jc">
-                            <image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/13.png" class="ico" /><span>茶宝</span></p>
-                        <p class="dinB tc">{{userinfo.cha_bao||0}}</p>
-                    </div> -->
-                <!-- </div> -->
-                <!-- <div class="flex_c flex_jse">
-                    <div class="i_num flex_c flex_ae" @click="goto('/pagesC/settledMerchant/balanceLog',{s:0})">
-                        <p class="flex_r flex_ac flex_jc">
-                            <image src="/static/wallet/11.png" class="ico" /><span>商户余额</span></p>
-                        <p class="dinB">{{localInfo.merchant_money || 0}}</p>
-                    </div>
-                    <div class="i_num flex_c flex_ae mar_t30" @click="goto('/pages/accountDetails/teaBaby')">
-                        <p class="flex_r flex_ac flex_jc">
-                            <image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/13.png" class="ico" /><span>茶宝</span></p>
-                        <p class="dinB">{{userinfo.cha_bao||0}}</p>
-                    </div>
-                    
-                </div> -->
             </view>
-            <!-- <view class="acc_info_next flex_r flex_jb mar_t16">
-                <div class="acc_info_next_item flex_r flex_jb" @click="goto('/pagesB/accountDetails/TeaC')">
-                    <div class="flex_c flex_ac">
-                        <image src="@/static/wallet/9.png" class="ico" />
-                        <span>TeaC</span>
-                    </div>
-                    <div class="acc_info_next_item_bottom dinB  flex_c flex_ae flex_jb">
-                        <span>{{userinfo.teac}}</span>
-                        <span>≈{{teacCountCny||0}}CNY</span>
-                    </div>
-                </div>
-                <div class="acc_info_next_item flex_r flex_jb" @click="goto('/pagesB/accountDetails/OriginalShares')">
-                    <div class="flex_c flex_ac">
-                        <image src="@/static/wallet/12.png" class="ico" />
-                        <span>OE</span>
-                    </div>
-                    <div class="acc_info_next_item_bottom dinB flex_c flex_ae flex_jb">
-                        <span>{{localInfo.original_equity || 0}}</span>
-                        <span>≈{{equityCountCny||0}}CNY</span>
-                    </div>
-                </div>
-            </view> -->
             <!-- 账户信息-end -->
         </view>
         <!-- 功能列表 -->
         <view class="fun_container">
-            <!-- <view class="fun mar_t30">
-                <view class="fun_title">数智生活</view>
-                <view class="fun_con mar_t50 flex_r flex_ac">
-                    <navigator class="fun_list flex_c flex_ac" @click="activation" hover-class="none">
-                        <image class="fun_img" src="/static/my/11.png"></image>
-                        <view class="fun_text">激活升级</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/friend" hover-class="none">
-                        <image class="fun_img" src="/static/my/12.png"></image>
-                        <view class="fun_text">社区</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/giveAsPresent" hover-class="none">
-                        <image class="fun_img" src="/static/my/13.png"></image>
-                        <view class="fun_text">赠送</view>
-                    </navigator>
-                </view>
-            </view> -->
-            <!-- <view class="fun mar_t30">
-                <view class="fun_title flex_r flex_ac flex_jb">
-                    <view>云店订单</view>
-                    <view class="moarbtn" @click="goto('/pages/szw-order-list/index')">
-                        <text>查看全部</text>
-                        <text class="iconfont">&#xe62e;</text>
-                    </view>
-                </view>
-                <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=1" hover-class="none">
-                        <image class="fun_img" src="/static/my/payment.png"></image>
-                        <view class="fun_text">待付款</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=5" hover-class="none">
-                        <image class="fun_img" src="/static/my/pickInStore.png"></image>
-                        <view class="fun_text">待自提</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=2" hover-class="none">
-                        <image class="fun_img" src="/static/my/deliver.png"></image>
-                        <view class="fun_text">待发货</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=3" hover-class="none">
-                        <image class="fun_img" src="/static/my/take.png"></image>
-                        <view class="fun_text">待收货</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=4" hover-class="none">
-                        <image class="fun_img" src="/static/my/refund.png"></image>
-                        <view class="fun_text">已完成</view>
-                    </navigator>
-                </view>
-            </view> -->
             <view class="fun mar_t30" v-if="isBusinessCenter">
                 <view class="fun_title">商家中心</view>
                 <view class="fun_con mar_t50 flex_r flex_ac">

+ 154 - 2
src/pages/shoppingMall/index.vue

@@ -87,6 +87,12 @@
             :src="i.item_basic_info.pict_url"
           ></image>
         </view>
+        <view class="image-view" v-else-if="platformObj.type == 3">
+          <image
+            class="product-image"
+            :src="i.imageInfo.imageList[0].url"
+          ></image>
+        </view>
         <view class="content-view">
           <view :class="['product-title', 'ellipsis2']">
             <span class="product-type">
@@ -96,6 +102,7 @@
             <span v-else-if="platformObj.type == 2">{{
               i.item_basic_info.title
             }}</span>
+            <span v-else-if="platformObj.type == 3">{{ i.skuName }}</span>
           </view>
           <!-- 拼多多 -->
           <template v-if="platformObj.type == 1">
@@ -189,6 +196,50 @@
               </text>
             </view>
           </template>
+          <!-- 京东 -->
+          <template v-else-if="platformObj.type == 3">
+            <view class="quan_box flex_r flex_as flex_wrap">
+              <view class="quan" v-if="i.coupon_discount > 0">
+                <span class="pl">券</span>
+                <span>¥{{ i.coupon_discount }}</span>
+              </view>
+              <view class="quan">
+                <span>赠付宝:</span>
+                <span>
+                  {{
+                    Math.floor(
+                      ((i.priceInfo.lowestCouponPrice *
+                        i.commissionInfo.commissionShare) /
+                        100) *
+                        platformObj.ratio *
+                        100
+                    ) / 100
+                  }}
+                </span>
+              </view>
+              <view class="quan">
+                <span>赠茶宝:</span>
+                <span>
+                  {{
+                    Math.floor(
+                      i.priceInfo.lowestCouponPrice * platformObj.chabao * 100
+                    ) / 100
+                  }}
+                </span>
+              </view>
+            </view>
+            <view class="product-price">
+              <text class="product-price-original">
+                <!-- // Math.floor(
+                  //   (i.min_group_price / 100 - i.coupon_discount / 100) * 100
+                  // ) / 100 -->
+                {{ i.priceInfo.lowestCouponPrice }}
+              </text>
+              <text class="product-price-favour">
+                ¥{{ i.priceInfo.price }}
+              </text>
+            </view>
+          </template>
         </view>
       </view>
     </view>
@@ -270,10 +321,9 @@ export default {
       post("v1/cashback/getIcon").then((res) => {
         if (res.code === 0) {
           this.platform = res.data;
-          console.log(this.platform);
+          this.platform.length = 3; // 后期要去掉
           this.platformObj = this.platform[this.navIndex];
           this.ratio = this.platform[this.navIndex].ratio;
-          console.log(this.ratio);
         } else {
           this.$toast(res.msg);
         }
@@ -303,6 +353,17 @@ export default {
         }
       });
     },
+    // 获取京东平台下的分类
+    jingdongCats() {
+      post("v1/cashback/jingdongCats").then((res) => {
+        if (res.code === 0) {
+          this.sort = res.data.cats;
+          this.catObj = this.sort[0];
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
     // 切换平台
     changeNav(item, index) {
       this.sortIndex = 0;
@@ -317,6 +378,8 @@ export default {
         this.duoduoCats();
       } else if (this.platformObj.type == 2) {
         this.taobaoCats();
+      } else if (this.platformObj.type == 3) {
+        this.jingdongCats();
       }
       page = 1;
       this.goods = [];
@@ -446,6 +509,73 @@ export default {
           .catch((e) => {
             uni.hideLoading();
           });
+      } else if (this.platformObj.type == 3) {
+        this.catObj.cat_name
+          ? (data = {
+              p: page,
+              cat_id: this.catObj.cat_id,
+              keyword: this.keyword,
+            })
+          : (data = { p: page, keyword: this.keyword });
+
+        post("v1/cashback/jingdongList", data)
+          .then((res) => {
+            uni.hideLoading();
+            if (res.code === 0) {
+              let obj = JSON.parse(
+                res.data.jd_union_open_goods_query_responce.queryResult
+              ).data;
+              console.log(obj);
+
+              obj.map((i) => {
+                if (i.couponInfo.couponList.length > 0) {
+                  let arr = i.couponInfo.couponList;
+                  for (let ii = 0; ii < arr.length; ii++) {
+                    if (arr[ii].isBest == 1) {
+                      i.coupon_discount = arr[ii].discount;
+                      i.promotion_start_time = arr[ii].useStartTime;
+                      i.promotion_end_time = arr[ii].useEndTime;
+                    } else {
+                      let couponInfo = i.couponInfo.couponList[0] || {};
+                      i.coupon_discount = couponInfo.discount || 0;
+                      i.promotion_start_time = couponInfo.useStartTime || 0;
+                      i.promotion_end_time = couponInfo.useEndTime || 0;
+                    }
+                  }
+                } else {
+                  i.coupon_discount = 0;
+                  i.promotion_start_time = 0;
+                  i.promotion_end_time = 0;
+                }
+                return i;
+              });
+              if (page <= 1) that.goods = [];
+              if (obj.length > 0) {
+                obj.forEach((e) => {
+                  that.goods.push(e);
+                });
+              } else {
+                if (page == 1) {
+                  that.haveGoods = true;
+                  page = -1;
+                } else {
+                  page = -1;
+                  this.$toast("暂无更多");
+                }
+              }
+            } else {
+              if (page == 1) {
+                that.haveGoods = true;
+                page = -1;
+              } else {
+                page = -1;
+                this.$toast("暂无更多");
+              }
+            }
+          })
+          .catch((e) => {
+            uni.hideLoading();
+          });
       }
     },
     // 跳转到商品详情页
@@ -473,6 +603,28 @@ export default {
           promotion_start_time: item.promotion_start_time,
           promotion_end_time: item.promotion_end_time,
         });
+      } else if (this.platformObj.type == 3) {
+        console.log(item);
+
+        this.goto("/pagesC/shoppingMallType/p_details", {
+          item_id: item.itemId,
+          type: this.platformObj.type,
+          annual_vol: item.inOrderCount30Days,
+          yj_price:
+            Math.floor(
+              ((item.priceInfo.lowestCouponPrice *
+                item.commissionInfo.commissionShare) /
+                100) *
+                this.platformObj.ratio *
+                100
+            ) / 100 || 0,
+          goods_price: item.priceInfo.lowestCouponPrice,
+          goods_price_origin: item.priceInfo.price,
+          coupon_discount: item.coupon_discount,
+          shopName: item.shopInfo.shopName,
+          promotion_start_time: item.promotion_start_time,
+          promotion_end_time: item.promotion_end_time,
+        });
       }
     },
   },

+ 49 - 39
src/pages/sign/index.vue

@@ -170,36 +170,36 @@ export default {
             color: '#999',
             selectedColor: '#E68B1E',
         })
-        // if(wx.createRewardedVideoAd){
-        //     rewardedVideoAd = wx.createRewardedVideoAd({ adUnitId: 'adunit-9e59954cb0c189f0' })
-        //     rewardedVideoAd.onLoad(() => {
-        //         console.log('onLoad event emit')
-        //     })
-        //     rewardedVideoAd.onError((err) => {
-        //         console.log('onError event emit', err)
-        //     })
-        //     rewardedVideoAd.onClose(res => {
-        //         console.log(res,"======");
+        if(wx.createRewardedVideoAd){
+            rewardedVideoAd = wx.createRewardedVideoAd({ adUnitId: 'adunit-9e59954cb0c189f0' })
+            rewardedVideoAd.onLoad(() => {
+                console.log('onLoad event emit')
+            })
+            rewardedVideoAd.onError((err) => {
+                console.log('onError event emit', err)
+            })
+            rewardedVideoAd.onClose(res => {
+                console.log(res,"======");
                 
-        //         // 用户点击了【关闭广告】按钮
-        //         if (res && res.isEnded) {
-        //         // 正常播放结束,可以下发游戏奖励
-        //             let data = {
-        //                 time: (new Date().getTime() / 1000).toFixed(0)
-        //             }
-        //             post("v1/user/doSign", data).then((res) => {
-        //                 if (res.code === 0) {
-        //                     this.loadData();
-        //                     this.goto("/pagesC/sign/result")
-        //                 } else {
-        //                     this.$toast(res.msg);
-        //                 }
-        //             });
-        //         } else {
-        //         // 播放中途退出,不下发游戏奖励
-        //         }
-        //     })
-        // }
+                // 用户点击了【关闭广告】按钮
+                if (res && res.isEnded) {
+                // 正常播放结束,可以下发游戏奖励
+                    let data = {
+                        time: (new Date().getTime() / 1000).toFixed(0)
+                    }
+                    post("v1/user/doSign", data).then((res) => {
+                        if (res.code === 0) {
+                            this.loadData();
+                            this.goto("/pagesC/sign/result")
+                        } else {
+                            this.$toast(res.msg);
+                        }
+                    });
+                } else {
+                // 播放中途退出,不下发游戏奖励
+                }
+            })
+        }
     },
     onHide() {},
     methods: {
@@ -217,16 +217,26 @@ export default {
         },
         // 签到
         setSignIn() {
-            let data = {
-                time: (new Date().getTime() / 1000).toFixed(0)
-            }
-            post("v1/user/doSign", data).then((res) => {
-                if (res.code === 0) {
-                    this.loadData();
-                } else {
-                    this.$toast(res.msg);
-                }
-            });
+            // let data = {
+            //     time: (new Date().getTime() / 1000).toFixed(0)
+            // }
+            // post("v1/user/doSign", data).then((res) => {
+            //     if (res.code === 0) {
+            //         this.loadData();
+            //     } else {
+            //         this.$toast(res.msg);
+            //     }
+            // });
+            rewardedVideoAd.show()
+            .catch(() => {
+                rewardedVideoAd.load()
+                .then(() => {
+                    rewardedVideoAd.show()
+                })
+                .catch(err => {
+                    console.log('激励视频 广告显示失败')
+                })
+            })
         },
         // 横幅活动
         getActivityList() {

+ 11 - 11
src/pagesC/settledMerchant/appPay.vue

@@ -16,9 +16,9 @@
     >
       返回APP
     </button>
-    <!-- <div class="ad" v-if="!isShow">
+    <div class="ad" v-if="!isShow">
         <ad-custom unit-id="adunit-a5a3ec14cf5d3b02" bindload="adLoad" binderror="adError" bindclose="adClose"></ad-custom>
-    </div> -->
+    </div>
     <!-- <button
       open-type="launchApp"
       class="back"
@@ -107,15 +107,15 @@ export default {
       });
     },
   },
-  // adLoad() {
-  //   console.log('原生模板广告加载成功')
-  // },
-  // adError(err) {
-  //   console.error('原生模板广告加载失败', err)
-  // },
-  // adClose() {
-  //   console.log('原生模板广告关闭')
-  // },
+  adLoad() {
+    console.log('原生模板广告加载成功')
+  },
+  adError(err) {
+    console.error('原生模板广告加载失败', err)
+  },
+  adClose() {
+    console.log('原生模板广告关闭')
+  },
 };
 </script>
 <style scoped lang="scss">

+ 181 - 0
src/pagesC/shoppingMallType/index.vue

@@ -86,6 +86,12 @@
             :src="i.item_basic_info.pict_url"
           ></image>
         </view>
+        <view class="image-view" v-if="typeObj.type == 3">
+          <image
+            class="product-image"
+            :src="i.imageInfo.imageList[0].url"
+          ></image>
+        </view>
         <view class="content-view flex_c flex_jb" v-if="typeObj.type == 1">
           <view :class="['product-title', 'ellipsis2']">
             <span class="product-type">
@@ -193,6 +199,56 @@
           </view>
           <view class="shop"> {{ i.item_basic_info.shop_title }} </view>
         </view>
+        <view class="content-view flex_c flex_jb" v-else-if="typeObj.type == 3">
+          <view :class="['product-title', 'ellipsis2']">
+            <span class="product-type">
+              {{ typeObj.name }}
+            </span>
+            {{ i.skuName }}
+          </view>
+          <view class="flex_r flex_jb flex_ae">
+            <view class="product-price">
+              <text class="product-price-original">
+                {{ i.priceInfo.lowestCouponPrice }}
+              </text>
+              <text class="product-price-favour"
+                >¥{{ i.priceInfo.price }}</text
+              >
+            </view>
+            <view class="buyed"> {{ i.inOrderCount30Days }}人已购 </view>
+          </view>
+          <view class="quan_box flex_r flex_as flex_wrap">
+            <view class="quan" v-if="i.coupon_discount > 0">
+              <span class="pl">券</span>
+              <span>¥{{ i.coupon_discount }}</span>
+            </view>
+            <view class="quan">
+              <span>赠付宝:</span>
+              <span>
+                {{
+                  Math.floor(
+                    ((i.priceInfo.lowestCouponPrice *
+                      i.commissionInfo.commissionShare) /
+                      100) *
+                      ratio *
+                      100
+                  ) / 100
+                }}
+              </span>
+            </view>
+            <view class="quan">
+              <span>赠茶宝:</span>
+              <span>
+                {{
+                  Math.floor(
+                    i.priceInfo.lowestCouponPrice * chabao_ratio * 100
+                  ) / 100
+                }}
+              </span>
+            </view>
+          </view>
+          <view class="shop"> {{ i.shopInfo.shopName }} </view>
+        </view>
       </view>
     </view>
     <not-goods v-else textStr="暂无数据"></not-goods>
@@ -261,6 +317,8 @@ export default {
     this.duoduoCats();
     if (this.typeObj.type == 2) {
       this.taobaoCats();
+    } else if (this.typeObj.type == 3) {
+      this.jingdongCats();
     }
     this.goodsDay();
   },
@@ -317,6 +375,18 @@ export default {
         }
       });
     },
+    // 获取京东平台下的分类
+    jingdongCats() {
+      post("v1/cashback/jingdongCats").then((res) => {
+        if (res.code === 0) {
+          this.sort = res.data.cats;
+          this.catObj = this.sort[0];
+          this.Channels = res.data.channel;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
     // 获取拼多多平台下的分类
     duoduoCats() {
       post("v1/cashback/duoduoCats").then((res) => {
@@ -391,6 +461,28 @@ export default {
             });
           }
         });
+      } else if (_this.typeObj.type == 3) {
+        post("v1/cashback/jingdongUrl", {
+          item_id: _this.channel.url,
+        }).then((res) => {
+          if (res.code === 0) {
+            let data = JSON.parse(
+              res.data.jd_union_open_promotion_bysubunionid_get_responce
+                .getResult
+            ).data;
+            console.log(data);
+            wx.navigateToMiniProgram({
+              appId: "wx91d27dbf599dff74",
+              path: "pages/union/proxy/proxy?spreadUrl=" + data.shortURL,
+              extraData: {},
+              envVersion: "release",
+              success(res) {
+                // 打开成功
+                _this.$refs.popup.close();
+              },
+            });
+          }
+        });
       }
     },
     // 拼多多复制链接
@@ -596,6 +688,73 @@ export default {
           .catch((e) => {
             uni.hideLoading();
           });
+      } else if (this.typeObj.type == 3) {
+        this.catObj.cat_name
+          ? (data = {
+              p: page,
+              cat_id: this.catObj.cat_id,
+              keyword: this.keyword,
+            })
+          : (data = { p: page, keyword: this.keyword });
+
+        post("v1/cashback/jingdongList", data)
+          .then((res) => {
+            uni.hideLoading();
+            if (res.code === 0) {
+              let obj = JSON.parse(
+                res.data.jd_union_open_goods_query_responce.queryResult
+              ).data;
+              console.log(obj);
+
+              obj.map((i) => {
+                if (i.couponInfo.couponList.length > 0) {
+                  let arr = i.couponInfo.couponList;
+                  for (let ii = 0; ii < arr.length; ii++) {
+                    if (arr[ii].isBest == 1) {
+                      i.coupon_discount = arr[ii].discount;
+                      i.promotion_start_time = arr[ii].useStartTime;
+                      i.promotion_end_time = arr[ii].useEndTime;
+                    } else {
+                      let couponInfo = i.couponInfo.couponList[0] || {};
+                      i.coupon_discount = couponInfo.discount || 0;
+                      i.promotion_start_time = couponInfo.useStartTime || 0;
+                      i.promotion_end_time = couponInfo.useEndTime || 0;
+                    }
+                  }
+                } else {
+                  i.coupon_discount = 0;
+                  i.promotion_start_time = 0;
+                  i.promotion_end_time = 0;
+                }
+                return i;
+              });
+              if (page <= 1) that.goods = [];
+              if (obj.length > 0) {
+                obj.forEach((e) => {
+                  that.goods.push(e);
+                });
+              } else {
+                if (page == 1) {
+                  that.haveGoods = true;
+                  page = -1;
+                } else {
+                  page = -1;
+                  this.$toast("暂无更多");
+                }
+              }
+            } else {
+              if (page == 1) {
+                that.haveGoods = true;
+                page = -1;
+              } else {
+                page = -1;
+                this.$toast("暂无更多");
+              }
+            }
+          })
+          .catch((e) => {
+            uni.hideLoading();
+          });
       }
     },
     onBack() {
@@ -626,6 +785,28 @@ export default {
           promotion_start_time: item.promotion_start_time,
           promotion_end_time: item.promotion_end_time,
         });
+      } else if (this.typeObj.type == 3) {
+        console.log(item);
+
+        this.goto("/pagesC/shoppingMallType/p_details", {
+          item_id: item.itemId,
+          type: this.typeObj.type,
+          annual_vol: item.inOrderCount30Days,
+          yj_price:
+            Math.floor(
+              ((item.priceInfo.lowestCouponPrice *
+                item.commissionInfo.commissionShare) /
+                100) *
+                this.ratio *
+                100
+            ) / 100 || 0,
+          goods_price: item.priceInfo.lowestCouponPrice,
+          goods_price_origin: item.priceInfo.price,
+          coupon_discount: item.coupon_discount,
+          shopName: item.shopInfo.shopName,
+          promotion_start_time: item.promotion_start_time,
+          promotion_end_time: item.promotion_end_time,
+        });
       }
     },
   },

+ 6 - 1
src/pagesC/shoppingMallType/order/list.vue

@@ -43,6 +43,7 @@
                     {{ statusDesc[li.status].t2 }}
                   </span>
                 </view>
+                <span class="num">x{{ li.num }}</span>
                 <view class="good_text flex_r flex_ac flex_jb">
                   <view class="unimport flex_r flex_ac flex_jb width_r">
                     <span class="width_r_1 ellipsis"
@@ -544,9 +545,13 @@ page {
   }
   .goodsDetail_info {
     width: calc(100% - 130rpx);
-    padding: 10rpx 0 10rpx 20rpx;
+    padding: 6rpx 0 6rpx 20rpx;
     position: relative;
   }
+  .num{
+    font-size: 26rpx;
+    color: #868686;
+  }
   .good_name {
     font-size: 28rpx;
     // font-weight: 600;

+ 202 - 49
src/pagesC/shoppingMallType/p_details.vue

@@ -56,6 +56,27 @@
         <view class="text7 bottom">{{ decodeURIComponent(annual_vol) }}</view>
       </view>
     </view>
+    <view class="price_info flex_r flex_ac flex_jb" v-else-if="type == 3">
+      <view class="price flex_c flex_jb">
+        <view class="text1"> 到手价 </view>
+        <view class="bottom">
+          <span class="text2">
+            {{ goods_price }}
+          </span>
+          <text class="text3">¥{{ goods_price_origin }}</text>
+        </view>
+      </view>
+      <view class="price flex_c flex_jb">
+        <view class="text4">预估下单获</view>
+        <view class="text5 bottom">
+          {{ yj_price }}
+        </view>
+      </view>
+      <view class="price flex_c flex_jb">
+        <view class="text6">销量</view>
+        <view class="text7 bottom">{{ decodeURIComponent(annual_vol) }}</view>
+      </view>
+    </view>
     <view class="chabao">
       预估下单获得茶宝:{{ Math.floor(goods_price * chabao_ratio * 100) / 100 }}
     </view>
@@ -82,6 +103,16 @@
         </span>
         {{ detail.title }}
       </view>
+      <view class="goods_name" v-else-if="type == 3">
+        <span class="product-type">
+          {{
+            tabs.filter((t) => {
+              return type == t.type;
+            })[0].name
+          }}
+        </span>
+        {{ detail.skuName }}
+      </view>
       <view
         class="quan flex_r flex_ac flex_jb"
         v-if="type == 1 && detail.has_coupon"
@@ -102,16 +133,42 @@
       </view>
       <view
         class="quan flex_r flex_ac flex_jb"
-        v-if="type == 2 && coupon_discount"
+        v-if="type == 2 && coupon_discount > 0"
+      >
+        <view class="left flex_r flex_ac">
+          <view class="quan_price">{{ coupon_discount }}</view>
+          <view class="flex_c time">
+            <span>专属优惠券</span>
+            <span>
+              {{
+                $day((promotion_start_time / 1000) * 1000).format("YYYY.MM.DD")
+              }}
+              -
+              {{
+                $day((promotion_end_time / 1000) * 1000).format("YYYY.MM.DD")
+              }}
+            </span>
+          </view>
+        </view>
+        <view class="split"></view>
+        <view class="right" @click="buttonClick"> 立即领券 </view>
+      </view>
+      <view
+        class="quan flex_r flex_ac flex_jb"
+        v-if="type == 3 && coupon_discount > 0"
       >
         <view class="left flex_r flex_ac">
           <view class="quan_price">{{ coupon_discount }}</view>
           <view class="flex_c time">
             <span>专属优惠券</span>
             <span>
-              {{ $day(promotion_start_time/1000 *1000).format("YYYY.MM.DD") }}
+              {{
+                $day((promotion_start_time / 1000) * 1000).format("YYYY.MM.DD")
+              }}
               -
-              {{ $day(promotion_end_time/1000 *1000).format("YYYY.MM.DD") }}
+              {{
+                $day((promotion_end_time / 1000) * 1000).format("YYYY.MM.DD")
+              }}
             </span>
           </view>
         </view>
@@ -127,12 +184,15 @@
       />
       <view class="text7 bottom" v-if="type == 1">{{ detail.mall_name }}</view>
       <view class="text7 bottom" v-else-if="type == 2">{{ detail.nick }}</view>
+      <view class="text7 bottom" v-else-if="type == 3">{{
+        decodeURIComponent(shopName)
+      }}</view>
     </view>
     <!-- 标题信息栏-end -->
     <!-- 产品简介 -->
     <view class="brief mar_t20">
       <view class="brief_title flex_r flex_ac">产品简介</view>
-      <view class="brief_con">
+      <view class="brief_con" v-if="type != 3">
         <!-- <mp-html :content="detail.goods_content" ref="jyf"></mp-html> -->
         <img
           v-for="(i, s) in detail.goods_img"
@@ -142,6 +202,16 @@
           mode="widthFix"
         />
       </view>
+      <view class="brief_con" v-else>
+        <!-- <mp-html :content="detail.goods_content" ref="jyf"></mp-html> -->
+        <img
+          v-for="(i, s) in detail.goods_dimg"
+          :key="s"
+          :src="i"
+          alt=""
+          mode="widthFix"
+        />
+      </view>
     </view>
     <!-- 产品简介-end -->
     <!-- 底部导航组件 -->
@@ -202,15 +272,17 @@ export default {
       userinfo: {},
       goodsDa: {},
       unid: "",
-      goods_price: 0, //到手价
-      yj_price: 0, // 返利金额
+      goods_price: 0, //淘宝京东到手价
+      goods_price_origin: 0, //京东到手价
+      yj_price: 0, // 淘宝京东返利金额
+      shopName: "", //京东店铺名称
       tabs: [],
       radio: 0, // 返利比例
-      annual_vol: "", //淘宝销量
+      annual_vol: "", //淘宝京东销量
       chabao_ratio: 0, // 茶宝比例
-      coupon_discount: 0, //淘宝商品券
-      promotion_start_time: 0, // 淘宝商品券开始时间
-      promotion_end_time: 0, // 淘宝商品券到期时间
+      coupon_discount: 0, //淘宝京东商品券
+      promotion_start_time: 0, // 淘宝京东商品券开始时间
+      promotion_end_time: 0, // 淘宝京东商品券到期时间
     };
   },
   onLoad(e) {
@@ -226,6 +298,15 @@ export default {
       this.coupon_discount = e.coupon_discount || 0;
       this.promotion_start_time = e.promotion_start_time;
       this.promotion_end_time = e.promotion_end_time;
+    } else if (this.type == 3) {
+      this.yj_price = e.yj_price || 0;
+      this.goods_price = e.goods_price || 0;
+      this.goods_price_origin = e.goods_price_origin || 0;
+      this.annual_vol = e.annual_vol || 0;
+      this.coupon_discount = e.coupon_discount || 0;
+      this.shopName = e.shopName;
+      this.promotion_start_time = e.promotion_start_time;
+      this.promotion_end_time = e.promotion_end_time;
     }
     this.getIcon();
     this.loadData(e);
@@ -274,7 +355,10 @@ export default {
 
             this.buttonGroup[1].text =
               "下单省\n¥" +
-              Math.floor((this.yj_price + this.detail.coupon_discount / 100)*100)/100;
+              Math.floor(
+                (this.yj_price + this.detail.coupon_discount / 100) * 100
+              ) /
+                100;
           } else {
             uni.showModal({
               title: "提示",
@@ -309,9 +393,51 @@ export default {
 
             this.buttonGroup[1].text =
               "下单省\n¥" +
-              Math.floor((Number(this.detail.reserve_price) -
-                Number(this.goods_price) +
-                Number(this.yj_price)) *100)/100;
+              Math.floor(
+                (Number(this.detail.reserve_price) -
+                  Number(this.goods_price) +
+                  Number(this.yj_price)) *
+                  100
+              ) /
+                100;
+          } else {
+            uni.showModal({
+              title: "提示",
+              content: res.msg,
+              showCancel: false,
+              success: function (res) {
+                if (res) {
+                  uni.navigateBack({
+                    delta: 1,
+                  });
+                }
+              },
+            });
+          }
+        });
+      } else if (this.type == 3) {
+        post("v1/cashback/jingdongInfo", da).then((res) => {
+          if (res.code === 0) {
+            this.detail = JSON.parse(
+              res.data.jd_union_open_goods_bigfield_query_responce.queryResult
+            ).data[0];
+            console.log(this.detail, "----");
+            let arr = [];
+            this.detail?.imageInfo?.imageList.forEach((element) => {
+              arr.push(element.url);
+            });
+            this.detail.goods_img = arr;
+            this.detail.goods_dimg = this.detail.detailImages.split(",");
+
+            this.buttonGroup[1].text =
+              "下单省\n¥" +
+              Math.floor(
+                (Number(this.goods_price_origin) -
+                  Number(this.goods_price) +
+                  Number(this.yj_price)) *
+                  100
+              ) /
+                100;
           } else {
             uni.showModal({
               title: "提示",
@@ -359,7 +485,30 @@ export default {
             }
           });
         } else if (this.type == 2) {
-          _this.isOauth()
+          _this.isOauth();
+        } else if (this.type == 3) {
+          post("v1/cashback/jingdongUrl", {
+            item_id: _this.detail.itemId,
+          }).then((res) => {
+            if (res.code === 0) {
+              let data = JSON.parse(
+                res.data.jd_union_open_promotion_bysubunionid_get_responce.getResult
+              ).data;
+              console.log(data);
+              wx.navigateToMiniProgram({
+                appId: "wx91d27dbf599dff74",
+                path: "pages/union/proxy/proxy?spreadUrl="+data.shortURL,
+                extraData: {
+                  
+                },
+                envVersion: "release",
+                success(res) {
+                  // 打开成功
+                  _this.$refs.popup.close();
+                },
+              });
+            }
+          });
         }
       }
     },
@@ -369,9 +518,8 @@ export default {
         item_id: _this.detail.input_num_iid,
       }).then((res) => {
         if (res.code === 0) {
-          let data = JSON.parse(res.data)
-            .tbk_dg_general_link_convert_response.data.item_url_list
-            .item_url_list[0].link_info_dto.coupon_full_tpwd;
+          let data = JSON.parse(res.data).tbk_dg_general_link_convert_response
+            .data.item_url_list.item_url_list[0].link_info_dto.coupon_full_tpwd;
           console.log(data);
           uniCopy({
             content: data,
@@ -417,42 +565,39 @@ export default {
     async getuserInfo() {
       this.userinfo = await uni.userfun();
     },
+    // 淘宝授权
     isOauth() {
       let _this = this;
       post("v1/user/userinfo").then((res) => {
-          if (res.code === 0) {
-            console.log(res.data.data);
-            
-              if (res.data.data.special_id != 0) {
-                _this.getTaobaoUrl()
-              } else {
-                post("v1/cashback/taobaoCode", {}).then(res1 => {
-                  console.log(res1);
-                  uniCopy({
-                    content: res1.data,
-                    success: (res) => {
-                      uni.showModal({
-                          content: `您还未完成淘宝授权操作,链接已复制到剪贴板,请先转到淘宝或浏览器粘贴打开完成淘宝授权操作`,
-                          confirmText: "知道了",
-                          showCancel: false,
-                          success(res) {
-                            
-                          },
-                      });
-                    },
-                    error: (e) => {},
-                  });
-                  
-                })
-              }
+        if (res.code === 0) {
+          console.log(res.data.data);
+
+          if (res.data.data.special_id != 0) {
+            _this.getTaobaoUrl();
           } else {
-            uni.reLaunch({
-                url:'/pages/my/index'
-            })
+            post("v1/cashback/taobaoCode", {}).then((res1) => {
+              console.log(res1);
+              uniCopy({
+                content: res1.data,
+                success: (res) => {
+                  uni.showModal({
+                    content: `您还未完成淘宝授权操作,链接已复制到剪贴板,请先转到淘宝或浏览器粘贴打开完成淘宝授权操作`,
+                    confirmText: "知道了",
+                    showCancel: false,
+                    success(res) {},
+                  });
+                },
+                error: (e) => {},
+              });
+            });
           }
+        } else {
+          uni.reLaunch({
+            url: "/pages/my/index",
+          });
+        }
       });
-      
-    }
+    },
   },
   onShareAppMessage() {
     // let userinfo = uni.getStorageSync("userinfo");
@@ -469,13 +614,21 @@ export default {
     } else if (this.type == 2) {
       var path = `pagesC/shoppingMallType/p_details?item_id=${this.detail.input_num_iid}&type=${this.type}&goods_price=${this.goods_price}&yj_price=${this.yj_price}&annual_vol=${this.annual_vol}&coupon_discount=${this.coupon_discount}&promotion_start_time=${this.promotion_start_time}&promotion_end_time=${this.promotion_end_time}`;
       var title = this.detail.title;
-      console.log(this.detail.goods_name);
 
       return {
         title: title,
         path: path,
         imageUrl: this.detail.pict_url,
       };
+    } else if (this.type == 3) {
+      var path = `pagesC/shoppingMallType/p_details?item_id=${this.detail.itemId}&type=${this.type}&goods_price=${this.goods_price}&yj_price=${this.yj_price}&annual_vol=${this.annual_vol}&coupon_discount=${this.coupon_discount}&promotion_start_time=${this.promotion_start_time}&promotion_end_time=${this.promotion_end_time}&goods_price_origin=${this.goods_price_origin}&shopName=${this.shopName}`;
+      var title = this.detail.skuName;
+
+      return {
+        title: title,
+        path: path,
+        imageUrl: this.detail.goods_img[0],
+      };
     }
   },
 };

BIN
src/static/my/f_img_code1.png


BIN
src/static/wallet/7.png