Browse Source

接口联调

15102826049 5 hours ago
parent
commit
f066bcbb6f
28 changed files with 284 additions and 187 deletions
  1. 10 5
      dist/dev/mp-weixin/components/userLoginPopup.js
  2. 10 1
      dist/dev/mp-weixin/pages/index/index.js
  3. 1 1
      dist/dev/mp-weixin/pages/index/index.wxml
  4. 16 6
      dist/dev/mp-weixin/pagesOne/record/components/activeBlock.js
  5. 1 1
      dist/dev/mp-weixin/pagesOne/record/components/activeBlock.wxml
  6. 23 9
      dist/dev/mp-weixin/pagesOne/record/uploadDetail.js
  7. 1 0
      dist/dev/mp-weixin/pagesOne/winner/components/uploadReceptPopop.js
  8. 20 11
      dist/dev/mp-weixin/pagesOne/winner/components/uploadRecordPopup.js
  9. 1 1
      dist/dev/mp-weixin/pagesOne/winner/components/uploadRecordPopup.wxml
  10. 12 11
      dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.js
  11. 1 1
      dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.wxml
  12. 3 0
      dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.wxss
  13. 20 18
      dist/dev/mp-weixin/pagesOne/winner/index.js
  14. 0 0
      dist/dev/mp-weixin/pagesOne/winner/index.wxml
  15. 15 8
      dist/dev/mp-weixin/project.private.config.json
  16. 8 0
      dist/dev/mp-weixin/services/ams.js
  17. 12 12
      dist/dev/mp-weixin/utils/common.js
  18. 9 2
      dist/dev/mp-weixin/utils/system.js
  19. 11 6
      src/components/userLoginPopup.vue
  20. 11 15
      src/pages/index/index.vue
  21. 9 5
      src/pagesOne/record/components/activeBlock.vue
  22. 27 1
      src/pagesOne/record/uploadDetail.vue
  23. 1 23
      src/pagesOne/winner/components/uploadReceptPopop.vue
  24. 19 9
      src/pagesOne/winner/components/uploadRecordPopup.vue
  25. 9 7
      src/pagesOne/winner/components/winRecordPopup.vue
  26. 13 10
      src/pagesOne/winner/index.vue
  27. 12 12
      src/utils/common.ts
  28. 9 12
      src/utils/system.ts

+ 10 - 5
dist/dev/mp-weixin/components/userLoginPopup.js

@@ -11,15 +11,20 @@ if (!Math) {
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "userLoginPopup",
+  props: {
+    path: {
+      type: String,
+      default: ""
+    }
+  },
   emits: ["update:show"],
   setup(__props, { expose: __expose, emit: __emit }) {
     let show = common_vendor.ref(false);
+    const props = __props;
     const getphonenumber = async (e) => {
-      await utils_system.getMobile(e.detail.code);
-      const phone = common_vendor.index.getStorageSync("phone");
-      if (phone) {
-        show.value = false;
-      }
+      await utils_system.getMobile(e.detail.code, props.path);
+      common_vendor.index.getStorageSync("phone");
+      show.value = false;
     };
     __expose({ show });
     return (_ctx, _cache) => {

+ 10 - 1
dist/dev/mp-weixin/pages/index/index.js

@@ -28,7 +28,13 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const loginRef = common_vendor.ref(null);
     const toActivity = () => {
-      console.log("==============3333333333", utils_system.isGetPhone());
+      if (!utils_system.isGetPhone()) {
+        loginRef.value.show = true;
+      } else {
+        common_vendor.index.navigateTo({
+          url: "/pagesOne/winner/index"
+        });
+      }
     };
     common_vendor.onShow(() => {
       utils_system.getActivityData();
@@ -45,6 +51,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         b: common_vendor.o(toActivity),
         c: common_vendor.sr(loginRef, "f5f2151a-1", {
           "k": "loginRef"
+        }),
+        d: common_vendor.p({
+          path: "/pagesOne/winner/index"
         })
       };
     };

+ 1 - 1
dist/dev/mp-weixin/pages/index/index.wxml

@@ -1 +1 @@
-<view class="homeContent"><wd-swiper wx:if="{{a}}" u-i="f5f2151a-0" bind:__l="__l" u-p="{{a}}"></wd-swiper><image class="enter-img" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/enter.png" mode="scaleToFill" bindtap="{{b}}"/><user-login-popup class="r" u-r="loginRef" u-i="f5f2151a-1" bind:__l="__l"></user-login-popup></view>
+<view class="homeContent"><wd-swiper wx:if="{{a}}" u-i="f5f2151a-0" bind:__l="__l" u-p="{{a}}"></wd-swiper><image class="enter-img" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/enter.png" mode="scaleToFill" bindtap="{{b}}"/><user-login-popup wx:if="{{d}}" class="r" u-r="loginRef" u-i="f5f2151a-1" bind:__l="__l" u-p="{{d}}"></user-login-popup></view>

+ 16 - 6
dist/dev/mp-weixin/pagesOne/record/components/activeBlock.js

@@ -21,22 +21,32 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     isShow: {
       type: Boolean,
       default: false
+    },
+    detail: {
+      type: Object,
+      default: () => {
+      }
     }
   },
   setup(__props) {
-    const props = __props;
     return (_ctx, _cache) => {
       return common_vendor.e({}, {}, {
-        a: common_vendor.t(common_vendor.unref(utils_common.formatTagStr)("3")),
-        b: common_vendor.p({
+        a: common_vendor.t(__props.detail.title)
+      }, {
+        b: common_vendor.t(common_vendor.unref(utils_common.formatTagStr)("3")),
+        c: common_vendor.p({
           ["custom-style"]: "padding:8rpx 26rpx;border-radius: 8rpx;font-size:22rpx;float: right",
           color: common_vendor.unref(utils_common.formatTagColor)("3"),
           ["bg-color"]: common_vendor.unref(utils_common.formatTagBgColor)("3")
         })
       }, {
-        c: __props.isShow
+        d: common_vendor.t(__props.detail.discountLevel),
+        e: common_vendor.t(__props.detail.createTime),
+        f: common_vendor.t(__props.detail.endTime),
+        g: common_vendor.t(__props.detail.createTime),
+        h: __props.isShow
       }, __props.isShow ? {
-        d: common_vendor.f(props.imgList, (joy, index, i0) => {
+        i: common_vendor.f(__props.detail.receiptImages, (joy, index, i0) => {
           return {
             a: index,
             b: "1142a638-1-" + i0,
@@ -49,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           };
         })
       } : {}, {
-        e: __props.isShow
+        j: __props.isShow
       }, __props.isShow ? {} : {});
     };
   }

+ 1 - 1
dist/dev/mp-weixin/pagesOne/record/components/activeBlock.wxml

@@ -1 +1 @@
-<view class="activityItem data-v-1142a638"><view class="top flex-start-btw data-v-1142a638"><view class="data-v-1142a638"><image wx:if="{{true}}" class="now data-v-1142a638" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png" mode="scaleToFill"/><image wx:if="{{false}}" class="old data-v-1142a638" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png" mode="scaleToFill"/><text class="name data-v-1142a638">3月今麦郎上传小票返红包</text></view><wd-tag wx:if="{{true}}" class="data-v-1142a638" u-s="{{['d']}}" u-i="1142a638-0" bind:__l="__l" u-p="{{b}}">{{a}}</wd-tag></view><view class="data-v-1142a638"> 活动力度:满26返6 </view><view class="data-v-1142a638"> 活动时间:2021-11-21至2021-11-21 </view><view class="data-v-1142a638"> 上传时间:2021-11-21至2021-11-21 </view><view wx:if="{{c}}" class="data-v-1142a638"><view class="data-v-1142a638">上传图片:</view><view class="imgBox flex-start-center data-v-1142a638"><wd-img wx:for="{{d}}" wx:for-item="joy" wx:key="a" class="data-v-1142a638" u-i="{{joy.b}}" bind:__l="__l" u-p="{{joy.c}}"/></view></view><view wx:if="{{e}}" class="remark data-v-1142a638">拒绝原因:订单中活动商品数量/金额不足</view></view>
+<view class="activityItem data-v-1142a638"><view class="top flex-start-btw data-v-1142a638"><view class="data-v-1142a638"><image wx:if="{{true}}" class="now data-v-1142a638" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png" mode="scaleToFill"/><image wx:if="{{false}}" class="old data-v-1142a638" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png" mode="scaleToFill"/><text class="name data-v-1142a638">{{a}}</text></view><wd-tag wx:if="{{true}}" class="data-v-1142a638" u-s="{{['d']}}" u-i="1142a638-0" bind:__l="__l" u-p="{{c}}">{{b}}</wd-tag></view><view class="data-v-1142a638"> 活动力度:{{d}}</view><view class="data-v-1142a638"> 活动时间:{{e}} 至 {{f}}</view><view class="data-v-1142a638"> 上传时间:{{g}}</view><view wx:if="{{h}}" class="data-v-1142a638"><view class="data-v-1142a638">上传图片:</view><view class="imgBox flex-start-center data-v-1142a638"><wd-img wx:for="{{i}}" wx:for-item="joy" wx:key="a" class="data-v-1142a638" u-i="{{joy.b}}" bind:__l="__l" u-p="{{joy.c}}"/></view></view><view wx:if="{{j}}" class="remark data-v-1142a638">拒绝原因:订单中活动商品数量/金额不足</view></view>

+ 23 - 9
dist/dev/mp-weixin/pagesOne/record/uploadDetail.js

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const services_ams = require("../../services/ams.js");
 if (!Math) {
   ActiveBlock();
 }
@@ -7,18 +8,31 @@ const ActiveBlock = () => "./components/activeBlock.js";
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "uploadDetail",
   setup(__props) {
-    const imgList = [
-      "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/Group%201.png",
-      "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/rule.png",
-      "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/record.png"
-      //   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/photo.png",
-      //   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/book.png",
-    ];
+    const aData = JSON.parse(common_vendor.index.getStorageSync("activityData"));
+    const openid = common_vendor.index.getStorageSync("openid");
+    const id = common_vendor.ref("");
+    const detail = common_vendor.ref({});
+    const getList = () => {
+      const params = {
+        openid,
+        marketingActivityId: aData.id,
+        id: id.value
+      };
+      services_ams.rewardDetail(params).then((res) => {
+        const data = res.data;
+        data.rereceiptImages = res.data.receiptImages.split(",");
+        detail.value = data;
+      });
+    };
+    common_vendor.onLoad((options) => {
+      id.value = options.id;
+      getList();
+    });
     return (_ctx, _cache) => {
       return {
         a: common_vendor.p({
-          imgList,
-          isShow: true
+          isShow: true,
+          detail: detail.value
         })
       };
     };

+ 1 - 0
dist/dev/mp-weixin/pagesOne/winner/components/uploadReceptPopop.js

@@ -35,6 +35,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       common_vendor.index.navigateTo({
         url: `/pagesOne/winner/uploadImage?discountId=${discountId.value}&discountLevel=${discountLevel.value}`
       });
+      emit("update:show", false);
     };
     const discountId = common_vendor.ref("");
     const discountLevel = common_vendor.ref("");

+ 20 - 11
dist/dev/mp-weixin/pagesOne/winner/components/uploadRecordPopup.js

@@ -2,6 +2,7 @@
 const common_vendor = require("../../../common/vendor.js");
 const pagesOne_winner_utils_source = require("../utils/source.js");
 const hooks_useDraw = require("../../../hooks/useDraw.js");
+const utils_common = require("../../../utils/common.js");
 if (!Array) {
   const _easycom_wd_tag2 = common_vendor.resolveComponent("wd-tag");
   const _easycom_wd_popup2 = common_vendor.resolveComponent("wd-popup");
@@ -18,26 +19,34 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     show: {
       type: Boolean,
       default: false
-    }
+    },
+    list: Array
   },
   emits: ["update:show"],
   setup(__props, { emit: __emit }) {
     const props = __props;
     const emit = __emit;
+    const toDetail = (id) => {
+      common_vendor.index.navigateTo({
+        url: `/pagesOne/record/uploadDetail?id=${id}`
+      });
+    };
     const { handleClose } = hooks_useDraw.useDraw(props, emit);
     return (_ctx, _cache) => {
       return {
-        a: common_vendor.f(6, (item, k0, i0) => {
-          return common_vendor.e({
-            a: "5a089942-1-" + i0 + ",5a089942-0",
-            b: common_vendor.p({
+        a: common_vendor.f(props.list, (item, k0, i0) => {
+          return {
+            a: common_vendor.t(item.discountLevel),
+            b: common_vendor.t(common_vendor.unref(utils_common.formatTagStr)(item.processStatus)),
+            c: "5a089942-1-" + i0 + ",5a089942-0",
+            d: common_vendor.p({
               ["custom-style"]: "padding:8rpx 26rpx;border-radius: 8rpx;font-size:22rpx;",
-              color: "#FF3B1D",
-              ["bg-color"]: "#FF3B1D33"
-            })
-          }, {
-            e: item
-          });
+              color: common_vendor.unref(utils_common.formatTagColor)(item.processStatus),
+              ["bg-color"]: common_vendor.unref(utils_common.formatTagBgColor)(item.processStatus)
+            }),
+            e: common_vendor.o(($event) => toDetail(item.id), item.id),
+            f: item.id
+          };
         }),
         b: common_vendor.o(
           //@ts-ignore

+ 1 - 1
dist/dev/mp-weixin/pagesOne/winner/components/uploadRecordPopup.wxml

@@ -1 +1 @@
-<view class="uploadRecordPopup data-v-5a089942"><wd-popup wx:if="{{e}}" class="data-v-5a089942" u-s="{{['d']}}" u-i="5a089942-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"><view class="content data-v-5a089942"><view class="list data-v-5a089942"><view wx:for="{{a}}" wx:for-item="item" wx:key="e" class="record data-v-5a089942"><view class="left data-v-5a089942"><text class="data-v-5a089942">活动力度:满26返6</text><wd-tag wx:if="{{true}}" class="data-v-5a089942" u-s="{{['d']}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"> 已拒绝 </wd-tag><wd-tag wx:else class="data-v-5a089942" u-s="{{['d']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d||''}}"> 已通过 </wd-tag></view><view class="time data-v-5a089942"><text class="data-v-5a089942">上传时间:2021-11-21 06:12:31</text><text class="detailBtn data-v-5a089942">查看详情</text></view></view></view></view><image class="closed data-v-5a089942" bindtap="{{b}}" src="{{c}}" mode="scaleToFill"/></wd-popup></view>
+<view class="uploadRecordPopup data-v-5a089942"><wd-popup wx:if="{{e}}" class="data-v-5a089942" u-s="{{['d']}}" u-i="5a089942-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"><view class="content data-v-5a089942"><view class="list data-v-5a089942"><view wx:for="{{a}}" wx:for-item="item" wx:key="f" class="record data-v-5a089942"><view class="left data-v-5a089942"><text class="data-v-5a089942">活动力度:{{item.a}}</text><wd-tag wx:if="{{item.d}}" class="data-v-5a089942" u-s="{{['d']}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}">{{item.b}} </wd-tag></view><view class="time data-v-5a089942"><text class="data-v-5a089942">上传时间:2021-11-21 06:12:31</text><text class="detailBtn data-v-5a089942" bindtap="{{item.e}}">查看详情</text></view></view></view></view><image class="closed data-v-5a089942" bindtap="{{b}}" src="{{c}}" mode="scaleToFill"/></wd-popup></view>

+ 12 - 11
dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.js

@@ -16,6 +16,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     show: {
       type: Boolean,
       default: false
+    },
+    list: {
+      type: Array,
+      default: () => []
     }
   },
   emits: ["update:show"],
@@ -25,23 +29,20 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const { handleClose } = hooks_useDraw.useDraw(props, emit);
     return (_ctx, _cache) => {
       return {
-        a: common_vendor.f(6, (item, k0, i0) => {
+        a: common_vendor.f(__props.list, (item, k0, i0) => {
           return {
-            a: item
+            a: common_vendor.t(item.discountLevel),
+            b: common_vendor.t(item.paymentAmount),
+            c: item.id
           };
         }),
-        b: common_vendor.f(2, (item, k0, i0) => {
-          return {
-            a: item
-          };
-        }),
-        c: common_vendor.o(
+        b: common_vendor.o(
           //@ts-ignore
           (...args) => common_vendor.unref(handleClose) && common_vendor.unref(handleClose)(...args)
         ),
-        d: common_vendor.unref(pagesOne_winner_utils_source.imgObj).close,
-        e: common_vendor.o(($event) => props.show = $event),
-        f: common_vendor.p({
+        c: common_vendor.unref(pagesOne_winner_utils_source.imgObj).close,
+        d: common_vendor.o(($event) => props.show = $event),
+        e: common_vendor.p({
           ["custom-style"]: "height: 880rpx;width:686rpx;background: transparent;",
           modelValue: props.show
         })

+ 1 - 1
dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.wxml

@@ -1 +1 @@
-<view class="winRecordPopup data-v-519d4c6f"><wd-popup wx:if="{{f}}" class="data-v-519d4c6f" u-s="{{['d']}}" u-i="519d4c6f-0" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"><view class="content data-v-519d4c6f"><view class="list data-v-519d4c6f"><view wx:for="{{a}}" wx:for-item="item" wx:key="a" class="record data-v-519d4c6f"><text class="data-v-519d4c6f">活动力度:满26返6</text><text class="data-v-519d4c6f">奖励金额:5元</text></view><view wx:for="{{b}}" wx:for-item="item" wx:key="a" class="record data-v-519d4c6f"><text class="data-v-519d4c6f">活动力度:满26返61</text><text class="data-v-519d4c6f">奖励金额:5111111元</text></view></view></view><image class="closed data-v-519d4c6f" bindtap="{{c}}" src="{{d}}" mode="scaleToFill"/></wd-popup></view>
+<view class="winRecordPopup data-v-519d4c6f"><wd-popup wx:if="{{e}}" class="data-v-519d4c6f" u-s="{{['d']}}" u-i="519d4c6f-0" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"><view class="content data-v-519d4c6f"><view class="list data-v-519d4c6f"><view wx:for="{{a}}" wx:for-item="item" wx:key="c" class="record data-v-519d4c6f"><text class="data-v-519d4c6f">活动力度:{{item.a}}</text><text class="data-v-519d4c6f">奖励金额:{{item.b}}元</text></view></view></view><image class="closed data-v-519d4c6f" bindtap="{{b}}" src="{{c}}" mode="scaleToFill"/></wd-popup></view>

+ 3 - 0
dist/dev/mp-weixin/pagesOne/winner/components/winRecordPopup.wxss

@@ -47,6 +47,9 @@
   padding: 32rpx 0;
   border-bottom: 1rpx solid rgba(191, 200, 219, 0.5);
 }
+.winRecordPopup .content .list .record > text.data-v-519d4c6f {
+  line-height: 30rpx;
+}
 .winRecordPopup .content .list .record > text.data-v-519d4c6f:last-of-type {
   margin-left: 44rpx;
 }

+ 20 - 18
dist/dev/mp-weixin/pagesOne/winner/index.js

@@ -24,9 +24,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     let showRecord = common_vendor.ref(false);
     let showDesc = common_vendor.ref(false);
     const appid = common_vendor.index.getStorageSync("appid");
-    const backImage = common_vendor.ref(
-      "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/Group%201.png"
-    );
+    const backImage = common_vendor.ref("");
     let aData = common_vendor.reactive({ discounts: [] });
     let list = common_vendor.ref([]);
     const openid = common_vendor.index.getStorageSync("openid");
@@ -44,6 +42,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           };
         });
         common_vendor.index.setStorageSync("activityData", JSON.stringify(aData));
+        backImage.value = res.data[0].activityImage;
       }).catch((err) => {
         console.log(err);
       });
@@ -53,17 +52,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       console.log("openid", openid);
       services_ams.rewardList({ openid }).then((res) => {
         rewardData.value = res.rows;
-        console.log("获奖记录", rewardData);
       });
     };
     const showUploadRecord = () => {
       getRewardList();
       showRecord.value = true;
     };
-    const cinnerData = common_vendor.ref([]);
+    const winnerData = common_vendor.ref([]);
     const getWinnerList = () => {
       services_ams.auditSuccessList({ openid }).then((res) => {
-        cinnerData.value = res.rows;
+        winnerData.value = res.rows;
         console.log("获奖记录", rewardData);
       });
     };
@@ -90,7 +88,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         i: common_vendor.o(showUploadRecord),
         j: common_vendor.unref(pagesOne_winner_utils_source.gifObj).pointer,
         k: common_vendor.o(handledUpload),
-        l: common_vendor.f(common_vendor.unref(list), (item, k0, i0) => {
+        l: common_vendor.t(common_vendor.unref(aData).startTime),
+        m: common_vendor.t(common_vendor.unref(aData).endTime),
+        n: common_vendor.f(common_vendor.unref(list), (item, k0, i0) => {
           return {
             a: common_vendor.t(item.cashbackAmount),
             b: common_vendor.t(item.thresholdAmount),
@@ -98,28 +98,30 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             d: item.id
           };
         }),
-        m: common_vendor.p({
+        o: common_vendor.p({
           ["bg-color"]: "transparent"
         }),
-        n: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = $event : showExample = $event),
-        o: common_vendor.p({
+        p: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = $event : showExample = $event),
+        q: common_vendor.p({
           show: common_vendor.unref(showExample)
         }),
-        p: common_vendor.o(($event) => common_vendor.isRef(showUpload) ? showUpload.value = $event : showUpload = $event),
-        q: common_vendor.p({
+        r: common_vendor.o(($event) => common_vendor.isRef(showUpload) ? showUpload.value = $event : showUpload = $event),
+        s: common_vendor.p({
           list: common_vendor.unref(list),
           show: common_vendor.unref(showUpload)
         }),
-        r: common_vendor.o(($event) => common_vendor.isRef(showWiner) ? showWiner.value = $event : showWiner = $event),
-        s: common_vendor.p({
+        t: common_vendor.o(($event) => common_vendor.isRef(showWiner) ? showWiner.value = $event : showWiner = $event),
+        v: common_vendor.p({
+          list: winnerData.value,
           show: common_vendor.unref(showWiner)
         }),
-        t: common_vendor.o(($event) => common_vendor.isRef(showRecord) ? showRecord.value = $event : showRecord = $event),
-        v: common_vendor.p({
+        w: common_vendor.o(($event) => common_vendor.isRef(showRecord) ? showRecord.value = $event : showRecord = $event),
+        x: common_vendor.p({
+          list: rewardData.value,
           show: common_vendor.unref(showRecord)
         }),
-        w: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = $event : showDesc = $event),
-        x: common_vendor.p({
+        y: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = $event : showDesc = $event),
+        z: common_vendor.p({
           show: common_vendor.unref(showDesc)
         })
       };

File diff suppressed because it is too large
+ 0 - 0
dist/dev/mp-weixin/pagesOne/winner/index.wxml


+ 15 - 8
dist/dev/mp-weixin/project.private.config.json

@@ -5,23 +5,30 @@
     "miniprogram": {
       "list": [
         {
-          "name": "pagesOne/winner/uploadImage",
-          "pathName": "pagesOne/winner/uploadImage",
-          "query": "discountId=1924735448735100930&discountLevel=%E6%BB%A125%E8%BF%945",
+          "name": "pagesOne/record/uploadDetail",
+          "pathName": "pagesOne/record/uploadDetail",
+          "query": "id=1925368772240125953",
           "scene": null,
           "launchMode": "default"
         },
         {
-          "name": "pagesOne/winner/index",
-          "pathName": "pagesOne/winner/index",
+          "name": "pagesOne/record/uploadDetail",
+          "pathName": "pagesOne/record/uploadDetail",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "pagesOne/winner/uploadImage",
+          "pathName": "pagesOne/winner/uploadImage",
           "query": "discountId=1924735448735100930&discountLevel=%E6%BB%A125%E8%BF%945",
           "launchMode": "default",
           "scene": null
         },
         {
-          "name": "pagesOne/record/uploadDetail",
-          "pathName": "pagesOne/record/uploadDetail",
-          "query": "",
+          "name": "pagesOne/winner/index",
+          "pathName": "pagesOne/winner/index",
+          "query": "discountId=1924735448735100930&discountLevel=%E6%BB%A125%E8%BF%945",
           "launchMode": "default",
           "scene": null
         },

+ 8 - 0
dist/dev/mp-weixin/services/ams.js

@@ -34,6 +34,13 @@ const auditSuccessList = (data) => {
     data
   });
 };
+const rewardDetail = (data) => {
+  return utils_http.http({
+    method: "POST",
+    url: "/customer/rewardDetail",
+    data
+  });
+};
 const getPhoneNumberInfo = (data) => {
   return utils_http.http({
     method: "GET",
@@ -46,4 +53,5 @@ exports.auditSuccessList = auditSuccessList;
 exports.getActivity = getActivity;
 exports.getCarousel = getCarousel;
 exports.getPhoneNumberInfo = getPhoneNumberInfo;
+exports.rewardDetail = rewardDetail;
 exports.rewardList = rewardList;

+ 12 - 12
dist/dev/mp-weixin/utils/common.js

@@ -1,32 +1,32 @@
 "use strict";
 const formatTagColor = (type) => {
   switch (type) {
-    case "1":
-      return "#00B97B";
-    case "2":
+    case "0":
       return "#F59701";
-    case "3":
+    case "2":
       return "#FF3B1D";
+    default:
+      return "#00B97B";
   }
 };
 const formatTagBgColor = (type) => {
   switch (type) {
-    case "1":
-      return "#00B97B33";
-    case "2":
+    case "0":
       return "#F5970133";
-    case "3":
+    case "2":
       return "#FF3B1D33";
+    default:
+      return "#00B97B33";
   }
 };
 const formatTagStr = (type) => {
   switch (type) {
-    case "1":
-      return "已通过";
-    case "2":
+    case "0":
       return "待审核";
-    case "3":
+    case "2":
       return "已拒绝";
+    default:
+      return "已通过";
   }
 };
 exports.formatTagBgColor = formatTagBgColor;

+ 9 - 2
dist/dev/mp-weixin/utils/system.js

@@ -20,16 +20,23 @@ const getActivityData = () => {
   });
   return isAuth;
 };
-const getMobile = (code) => {
+const getMobile = (code, path) => {
   services_ams.getPhoneNumberInfo(code).then((res) => {
+    common_vendor.index.showToast({
+      title: res.msg,
+      icon: "success"
+    });
     common_vendor.index.setStorageSync("phone", res.data);
+    common_vendor.index.navigateTo({
+      url: path
+    });
   });
 };
 const isGetPhone = () => {
   const data = JSON.parse(common_vendor.index.getStorageSync("activityData")) || {};
   const authCheck = (data == null ? void 0 : data.authCheck.split(",")) || [];
   const isCheck = authCheck.includes("1");
-  const isPhone = common_vendor.index.getStorageSync("phone") ? true : false;
+  const isPhone = !!common_vendor.index.getStorageSync("phone");
   return isCheck && isPhone;
 };
 exports.getActivityData = getActivityData;

+ 11 - 6
src/components/userLoginPopup.vue

@@ -35,12 +35,17 @@ let show = ref(false);
 const emit = defineEmits(["update:show"]);
 import { verifyPhone, getMobile, isGetPhone } from "@/utils/system";
 
-const getphonenumber = async (e) => {
-  await getMobile(e.detail.code);
-  const phone = uni.getStorageSync("phone");
-  if (phone) {
-    show.value = false;
-  }
+const props = defineProps({
+  path: {
+    type: String,
+    default: "",
+  },
+});
+
+const getphonenumber = async (e: any) => {
+  await getMobile(e.detail.code, props.path);
+  uni.getStorageSync("phone");
+  show.value = false;
 };
 
 defineExpose({ show });

+ 11 - 15
src/pages/index/index.vue

@@ -24,7 +24,10 @@
     </view>
     <button hover-class="button-hover" @click="onLogin">登录</button>
     <wd-button type="success">成功按钮</wd-button> -->
-    <user-login-popup ref="loginRef"></user-login-popup>
+    <user-login-popup
+      ref="loginRef"
+      path="/pagesOne/winner/index"
+    ></user-login-popup>
   </view>
 </template>
 
@@ -82,29 +85,22 @@ const payment = () => {
   });
 };
 
-// const getphonenumber = (e: any) => {
-//   console.log("-----------------------", e.detail.code);
-// };
-
 const bannerList = ref([]);
 const getBanner = () => {
   getCarousel(appid).then((res: any) => {
     bannerList.value = res.data;
-    // swiperList.value = res.data;
   });
 };
 
 const loginRef = <any>ref(null);
 const toActivity = () => {
-  console.log("==============3333333333", isGetPhone());
-
-  // if (!verifyPhone() || !isGetPhone()) {
-  //   loginRef.value.show = true;
-  // } else {
-  //   uni.navigateTo({
-  //     url: "/pagesOne/winner/index",
-  //   });
-  // }
+  if (!isGetPhone()) {
+    loginRef.value.show = true;
+  } else {
+    uni.navigateTo({
+      url: "/pagesOne/winner/index",
+    });
+  }
 };
 onShow(() => {
   getActivityData();

+ 9 - 5
src/pagesOne/record/components/activeBlock.vue

@@ -14,7 +14,7 @@
           mode="scaleToFill"
           v-if="false"
         />
-        <text class="name">3月今麦郎上传小票返红包</text>
+        <text class="name">{{ detail.title }}</text>
       </view>
 
       <wd-tag
@@ -26,14 +26,14 @@
         {{ formatTagStr("3") }}
       </wd-tag>
     </view>
-    <view> 活动力度:满26返6 </view>
-    <view> 活动时间:2021-11-21至2021-11-21 </view>
-    <view> 上传时间:2021-11-21至2021-11-21 </view>
+    <view> 活动力度:{{ detail.discountLevel }} </view>
+    <view> 活动时间:{{ detail.createTime }} 至 {{ detail.endTime }} </view>
+    <view> 上传时间:{{ detail.createTime }} </view>
     <view v-if="isShow">
       <view>上传图片:</view>
       <view class="imgBox flex-start-center">
         <wd-img
-          v-for="(joy, index) in props.imgList"
+          v-for="(joy, index) in detail.receiptImages"
           :key="index"
           :width="50"
           :height="112"
@@ -61,6 +61,10 @@ const props = defineProps({
     type: Boolean,
     default: false,
   },
+  detail: {
+    type: Object,
+    default: () => {},
+  },
 });
 // console.log(props);
 </script>

+ 27 - 1
src/pagesOne/record/uploadDetail.vue

@@ -1,14 +1,18 @@
 <template>
   <view class="winnerListContent">
     <view class="content">
-      <active-block :imgList="imgList" :isShow="true"></active-block>
+      <active-block isShow :detail="detail"></active-block>
     </view>
   </view>
 </template>
 
 <script lang="ts" setup>
+import { ref } from "vue";
+import { rewardDetail } from "@/services/ams";
 // import { formatTagColor, formatTagBgColor, formatTagStr } from "@/utils/common";
 import ActiveBlock from "./components/activeBlock.vue";
+import { onLoad } from "@dcloudio/uni-app";
+
 const imgList = [
   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/Group%201.png",
   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/rule.png",
@@ -16,6 +20,28 @@ const imgList = [
   //   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/photo.png",
   //   "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/book.png",
 ];
+const aData = JSON.parse(uni.getStorageSync("activityData"));
+const openid = uni.getStorageSync("openid");
+const id = ref("");
+
+const detail = ref({});
+const getList = () => {
+  const params = {
+    openid,
+    marketingActivityId: aData.id,
+    id: id.value,
+  };
+  rewardDetail(params).then((res: any) => {
+    const data = res.data;
+    data.rereceiptImages = res.data.receiptImages.split(",");
+    detail.value = data;
+  });
+};
+
+onLoad((options: any) => {
+  id.value = options.id;
+  getList();
+});
 </script>
 
 <style lang="scss" scoped>

+ 1 - 23
src/pagesOne/winner/components/uploadReceptPopop.vue

@@ -51,7 +51,6 @@ import { reactive, ref } from "vue";
 import { imgObj } from "../utils/source";
 import { useDraw } from "@/hooks/useDraw";
 import { receptProp } from "../utils/interface";
-
 const props = defineProps({
   show: {
     type: Boolean,
@@ -72,6 +71,7 @@ const toUploadImage = (type: string) => {
   uni.navigateTo({
     url: `/pagesOne/winner/uploadImage?discountId=${discountId.value}&discountLevel=${discountLevel.value}`,
   });
+  emit("update:show", false);
 };
 
 const discountId = ref<string>("");
@@ -83,28 +83,6 @@ const radioChange = (e: any) => {
   discountLevel.value = `满${obj.thresholdAmount}返${obj.cashbackAmount}`;
 };
 
-const onCamera = () => {
-  uni.chooseImage({
-    count: 1,
-    // sourceType: ["camera", "ablum"],
-    success: function (res) {
-      uni.saveImageToPhotosAlbum({
-        filePath: res.tempFilePaths[0],
-        success: function () {
-          console.log("save success");
-        },
-      });
-    },
-  });
-};
-
-// const list = [
-//   { name: "满25返8", id: "1", checked: false },
-//   { name: "满25返8", id: "2", checked: false },
-//   { name: "满25返8", id: "3", checked: true },
-//   { name: "满25返8", id: "1", checked: false },
-//   { name: "满25返8", id: "2", checked: false },
-// ];
 const { handleClose } = useDraw(props, emit);
 </script>
 

+ 19 - 9
src/pagesOne/winner/components/uploadRecordPopup.vue

@@ -6,29 +6,30 @@
     >
       <view class="content">
         <view class="list">
-          <view v-for="item in 6" :key="item" class="record">
+          <view v-for="item in props.list" :key="item.id" class="record">
             <view class="left">
-              <text>活动力度:满26返6</text>
+              <text>活动力度:{{ item.discountLevel }}</text>
               <wd-tag
-                v-if="true"
                 custom-style="padding:8rpx 26rpx;border-radius: 8rpx;font-size:22rpx;"
-                color="#FF3B1D"
-                bg-color="#FF3B1D33"
+                :color="formatTagColor(item.processStatus)"
+                :bg-color="formatTagBgColor(item.processStatus)"
               >
-                已拒绝
+                {{ formatTagStr(item.processStatus) }}
+
+                <!-- 已拒绝 -->
               </wd-tag>
-              <wd-tag
+              <!-- <wd-tag
                 v-else
                 custom-style="padding:8rpx 26rpx;border-radius: 8rpx;font-size:22rpx;"
                 color="#00B97B"
                 bg-color="#00B97B33"
               >
                 已通过
-              </wd-tag>
+              </wd-tag> -->
             </view>
             <view class="time">
               <text>上传时间:2021-11-21 06:12:31</text>
-              <text class="detailBtn">查看详情</text>
+              <text class="detailBtn" @click="toDetail(item.id)">查看详情</text>
             </view>
           </view>
         </view>
@@ -47,14 +48,23 @@
 import { imgObj } from "../utils/source";
 import { ref } from "vue";
 import { useDraw } from "@/hooks/useDraw";
+import { formatTagColor, formatTagBgColor, formatTagStr } from "@/utils/common";
+
 const props = defineProps({
   show: {
     type: Boolean,
     default: false,
   },
+  list: Array<any>,
 });
 const emit = defineEmits(["update:show"]);
 
+const toDetail = (id: string) => {
+  uni.navigateTo({
+    url: `/pagesOne/record/uploadDetail?id=${id}`,
+  });
+};
+
 const { handleClose } = useDraw(props, emit);
 </script>
 

+ 9 - 7
src/pagesOne/winner/components/winRecordPopup.vue

@@ -6,13 +6,9 @@
     >
       <view class="content">
         <view class="list">
-          <view v-for="item in 6" :key="item" class="record">
-            <text>活动力度:满26返6</text>
-            <text>奖励金额:5元</text>
-          </view>
-          <view v-for="item in 2" :key="item" class="record">
-            <text>活动力度:满26返61</text>
-            <text>奖励金额:5111111元</text>
+          <view v-for="item in list" :key="item.id" class="record">
+            <text>活动力度:{{ item.discountLevel }}</text>
+            <text>奖励金额:{{ item.paymentAmount }}元</text>
           </view>
         </view>
       </view>
@@ -35,6 +31,10 @@ const props = defineProps({
     type: Boolean,
     default: false,
   },
+  list: {
+    type: Array<any>,
+    default: () => [],
+  },
 });
 const emit = defineEmits(["update:show"]);
 
@@ -67,6 +67,8 @@ const { handleClose } = useDraw(props, emit);
         padding: 32rpx 0;
         border-bottom: 1rpx solid rgba(191, 200, 219, 0.5);
         > text {
+          line-height: 30rpx;
+
           &:last-of-type {
             margin-left: 44rpx;
           }

+ 13 - 10
src/pagesOne/winner/index.vue

@@ -32,7 +32,7 @@
       <view class="activityTimeBox">
         <text class="bigTitle">活动时间</text>
         <view class="timeBox">
-          <text>2025.03.01-2025.03.31 </text>
+          <text>{{ aData.startTime }}-{{ aData.endTime }} </text>
           <text>限指定门店、指定商品使用</text>
         </view>
       </view>
@@ -58,8 +58,14 @@
       :list="list"
       v-model:show="showUpload"
     ></upload-recept-popop>
-    <win-record-popup v-model:show="showWiner"></win-record-popup>
-    <upload-record-popup v-model:show="showRecord"></upload-record-popup>
+    <win-record-popup
+      v-model:show="showWiner"
+      :list="winnerData"
+    ></win-record-popup>
+    <upload-record-popup
+      v-model:show="showRecord"
+      :list="rewardData"
+    ></upload-record-popup>
     <activity-desc-popup v-model:show="showDesc"></activity-desc-popup>
   </view>
 </template>
@@ -82,9 +88,7 @@ let showWiner = ref<boolean>(false);
 let showRecord = ref<boolean>(false);
 let showDesc = ref<boolean>(false);
 const appid = uni.getStorageSync("appid");
-const backImage = ref<string>(
-  "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/Group%201.png"
-);
+const backImage = ref<string>("");
 
 let aData: any = reactive({ discounts: [] });
 let list = ref([] as receptProp[]);
@@ -108,7 +112,7 @@ const getList = () => {
       });
 
       uni.setStorageSync("activityData", JSON.stringify(aData));
-      // backImage.value = res.data[0].activityImage;
+      backImage.value = res.data[0].activityImage;
     })
     .catch((err) => {
       console.log(err);
@@ -121,7 +125,6 @@ const getRewardList = () => {
   console.log("openid", openid);
   rewardList({ openid }).then((res: any) => {
     rewardData.value = res.rows;
-    console.log("获奖记录", rewardData);
   });
 };
 
@@ -131,11 +134,11 @@ const showUploadRecord = () => {
   showRecord.value = true;
 };
 
-const cinnerData = ref([]);
+const winnerData = ref([]);
 //获取奖励记录
 const getWinnerList = () => {
   auditSuccessList({ openid }).then((res: any) => {
-    cinnerData.value = res.rows;
+    winnerData.value = res.rows;
     console.log("获奖记录", rewardData);
   });
 };

+ 12 - 12
src/utils/common.ts

@@ -1,32 +1,32 @@
 export const formatTagColor = (type: string) => {
   switch (type) {
-    case "1":
-      return "#00B97B";
-    case "2":
+    case "0":
       return "#F59701";
-    case "3":
+    case "2":
       return "#FF3B1D";
+    default:
+      return "#00B97B";
   }
 };
 
 export const formatTagBgColor = (type: string) => {
   switch (type) {
-    case "1":
-      return "#00B97B33";
-    case "2":
+    case "0":
       return "#F5970133";
-    case "3":
+    case "2":
       return "#FF3B1D33";
+    default:
+      return "#00B97B33";
   }
 };
 
 export const formatTagStr = (type: string) => {
   switch (type) {
-    case "1":
-      return "已通过";
-    case "2":
+    case "0":
       return "待审核";
-    case "3":
+    case "2":
       return "已拒绝";
+    default:
+      return "已通过";
   }
 };

+ 9 - 12
src/utils/system.ts

@@ -23,27 +23,24 @@ export const getActivityData = () => {
     .then((res: any) => {
       const data = res.data[0] || {};
       uni.setStorageSync("activityData", JSON.stringify(data));
-
-      // const authCheck = data?.authCheck.split(",") || [];
-      // if (authCheck.includes("1")) {
-      //   isAuth = true;
-      // } else {
-      //   isAuth = false;
-      // }
-      // console.log("---------------------1111", authCheck.includes("1"));
     })
     .catch((err) => {
       console.log(err);
-
-      // isAuth = false;
     });
 
   return isAuth;
 };
 
-export const getMobile = (code: string) => {
+export const getMobile = (code: string, path: string) => {
   getPhoneNumberInfo(code).then((res: any) => {
+    uni.showToast({
+      title: res.msg,
+      icon: "success",
+    });
     uni.setStorageSync("phone", res.data);
+    uni.navigateTo({
+      url: path,
+    });
   });
 };
 
@@ -51,7 +48,7 @@ export const isGetPhone = () => {
   const data = JSON.parse(uni.getStorageSync("activityData")) || {};
   const authCheck = data?.authCheck.split(",") || [];
   const isCheck = authCheck.includes("1");
-  const isPhone = uni.getStorageSync("phone") ? true : false;
+  const isPhone = !!uni.getStorageSync("phone");
 
   return isCheck && isPhone;
 };

Some files were not shown because too many files changed in this diff