15102826049 пре 12 часа
родитељ
комит
f3be2940a1
39 измењених фајлова са 641 додато и 195 уклоњено
  1. 1 1
      .env.development
  2. 1 2
      dist/dev/mp-weixin/app.json
  3. 19 19
      dist/dev/mp-weixin/common/vendor.js
  4. 7 3
      dist/dev/mp-weixin/components/userLoginPopup.js
  5. 0 1
      dist/dev/mp-weixin/pages/index/index.js
  6. 63 12
      dist/dev/mp-weixin/pages/my/index.js
  7. 2 1
      dist/dev/mp-weixin/pages/my/index.json
  8. 1 1
      dist/dev/mp-weixin/pages/my/index.wxml
  9. 52 23
      dist/dev/mp-weixin/pagesOne/record/components/activeBlock.js
  10. 1 0
      dist/dev/mp-weixin/pagesOne/record/components/activeBlock.json
  11. 1 1
      dist/dev/mp-weixin/pagesOne/record/components/activeBlock.wxml
  12. 1 1
      dist/dev/mp-weixin/pagesOne/record/uploadDetail.js
  13. 24 1
      dist/dev/mp-weixin/pagesOne/record/uploadList.js
  14. 1 1
      dist/dev/mp-weixin/pagesOne/record/uploadList.wxml
  15. 34 5
      dist/dev/mp-weixin/pagesOne/record/winnerList.js
  16. 1 1
      dist/dev/mp-weixin/pagesOne/record/winnerList.wxml
  17. 3 0
      dist/dev/mp-weixin/pagesOne/record/winnerList.wxss
  18. 14 0
      dist/dev/mp-weixin/pagesOne/winner/components/uploadReceptPopop.js
  19. 46 28
      dist/dev/mp-weixin/pagesOne/winner/index.js
  20. 1 0
      dist/dev/mp-weixin/pagesOne/winner/index.json
  21. 0 0
      dist/dev/mp-weixin/pagesOne/winner/index.wxml
  22. 4 0
      dist/dev/mp-weixin/pagesOne/winner/index.wxss
  23. 1 1
      dist/dev/mp-weixin/pagesOne/winner/uploadImage.js
  24. 9 2
      dist/dev/mp-weixin/project.private.config.json
  25. 11 0
      dist/dev/mp-weixin/services/ams.js
  26. 1 1
      dist/dev/mp-weixin/utils/http.js
  27. 26 5
      dist/dev/mp-weixin/utils/system.js
  28. 7 3
      src/components/userLoginPopup.vue
  29. 1 1
      src/manifest.json
  30. 1 8
      src/pages/index/index.vue
  31. 72 18
      src/pages/my/index.vue
  32. 35 15
      src/pagesOne/record/components/activeBlock.vue
  33. 1 1
      src/pagesOne/record/uploadDetail.vue
  34. 24 2
      src/pagesOne/record/uploadList.vue
  35. 33 9
      src/pagesOne/record/winnerList.vue
  36. 14 0
      src/pagesOne/winner/components/uploadReceptPopop.vue
  37. 83 19
      src/pagesOne/winner/index.vue
  38. 6 3
      src/services/ams.ts
  39. 39 6
      src/utils/system.ts

+ 1 - 1
.env.development

@@ -10,4 +10,4 @@ VITE_APP_BASE_API = ''
 # 路由懒加载
 VITE_CLI_BABEL_TRANSPILE_MODULES = true
 
-VITE_API_URL=http://192.168.168.71:8080
+VITE_API_URL=http://192.168.168.104:8090

+ 1 - 2
dist/dev/mp-weixin/app.json

@@ -42,8 +42,7 @@
     ]
   },
   "requiredPrivateInfos": [
-    "getLocation",
-    "chooseLocation"
+    "getLocation"
   ],
   "permission": {
     "scope.userLocation": {

+ 19 - 19
dist/dev/mp-weixin/common/vendor.js

@@ -8419,6 +8419,25 @@ const cellProps = {
    */
   customTitleClass: makeStringProp("")
 };
+const iconProps = {
+  ...baseProps,
+  /**
+   * 使用的图标名字,可以使用链接图片
+   */
+  name: makeRequiredProp(String),
+  /**
+   * 图标的颜色
+   */
+  color: String,
+  /**
+   * 图标的字体大小
+   */
+  size: numericProp,
+  /**
+   * 类名前缀,用于使用自定义图标
+   */
+  classPrefix: makeStringProp("wd-icon")
+};
 const gapProps = {
   ...baseProps,
   /**
@@ -9134,25 +9153,6 @@ const popupProps = {
    */
   lockScroll: makeBooleanProp(true)
 };
-const iconProps = {
-  ...baseProps,
-  /**
-   * 使用的图标名字,可以使用链接图片
-   */
-  name: makeRequiredProp(String),
-  /**
-   * 图标的颜色
-   */
-  color: String,
-  /**
-   * 图标的字体大小
-   */
-  size: numericProp,
-  /**
-   * 类名前缀,用于使用自定义图标
-   */
-  classPrefix: makeStringProp("wd-icon")
-};
 const tagProps = {
   ...baseProps,
   /**

+ 7 - 3
dist/dev/mp-weixin/components/userLoginPopup.js

@@ -15,15 +15,19 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     path: {
       type: String,
       default: ""
+    },
+    refresh: {
+      type: Boolean,
+      default: false
     }
   },
-  emits: ["update:show"],
   setup(__props, { expose: __expose, emit: __emit }) {
     let show = common_vendor.ref(false);
+    const emit = __emit;
     const props = __props;
     const getphonenumber = async (e) => {
-      await utils_system.getMobile(e.detail.code, props.path);
-      common_vendor.index.getStorageSync("phone");
+      const res = await utils_system.getMobile(e.detail.code, props.path);
+      emit("getPhone", res);
       show.value = false;
     };
     __expose({ show });

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

@@ -18,7 +18,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const appid = common_vendor.index.getStorageSync("appid");
     common_vendor.onLoad(() => {
       getBanner();
-      utils_system.isGetPhone();
     });
     const bannerList = common_vendor.ref([]);
     const getBanner = () => {

+ 63 - 12
dist/dev/mp-weixin/pages/my/index.js

@@ -8,8 +8,9 @@ if (!Array) {
 }
 const _easycom_wd_cell = () => "../../node-modules/wot-design-uni/components/wd-cell/wd-cell.js";
 if (!Math) {
-  _easycom_wd_cell();
+  (_easycom_wd_cell + UserLoginPopup)();
 }
+const UserLoginPopup = () => "../../components/userLoginPopup.js";
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   setup(__props) {
@@ -32,37 +33,87 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         num: 0
       }
     ];
-    common_vendor.ref("Hello");
     const navTop = common_vendor.ref(0);
+    const loginRef = common_vendor.ref(null);
+    const path = common_vendor.ref("");
+    const phone = common_vendor.index.getStorageSync("phone");
+    const toWinner = () => {
+      path.value = "/pagesOne/record/winnerList";
+      if (!utils_system.isGetPhone()) {
+        loginRef.value.show = true;
+      } else {
+        common_vendor.index.navigateTo({
+          url: "/pagesOne/record/winnerList"
+        });
+      }
+    };
+    const toUpLoad = () => {
+      path.value = "/pagesOne/record/uploadList";
+      if (!utils_system.isGetPhone()) {
+        loginRef.value.show = true;
+      } else {
+        common_vendor.index.navigateTo({
+          url: "/pagesOne/record/uploadList"
+        });
+      }
+    };
+    const mobile = common_vendor.ref("");
+    const onLogin = async (e) => {
+      path.value = "";
+      console.log("-------------------", utils_system.isGetPhone());
+      if (!utils_system.isGetPhone()) {
+        loginRef.value.show = true;
+      }
+    };
+    const getPhone = (res) => {
+      mobile.value = res;
+    };
     common_vendor.onLoad(() => {
       navTop.value = utils_system.getNavTop();
     });
+    common_vendor.onShow(() => {
+      utils_system.getActivityData();
+    });
     return (_ctx, _cache) => {
-      return {
+      return common_vendor.e({
         a: imgObj.myBg,
         b: navTop.value + "rpx",
         c: imgObj.user,
-        d: navTop.value + 125 + "rpx",
-        e: common_vendor.f(list, (item, index, i0) => {
+        d: common_vendor.t(common_vendor.unref(phone) || mobile.value || "用户昵称"),
+        e: !common_vendor.unref(phone) && !mobile.value
+      }, !common_vendor.unref(phone) && !mobile.value ? {
+        f: common_vendor.o(onLogin)
+      } : {}, {
+        g: navTop.value + 125 + "rpx",
+        h: common_vendor.f(list, (item, index, i0) => {
           return {
             a: item.src,
             b: index
           };
         }),
-        f: navTop.value + 280 + "rpx",
-        g: imgObj.gift,
-        h: imgObj.with,
-        i: common_vendor.p({
+        i: navTop.value + 280 + "rpx",
+        j: imgObj.gift,
+        k: imgObj.with,
+        l: common_vendor.o(toWinner),
+        m: common_vendor.p({
           ["is-link"]: true,
           title: "奖励记录"
         }),
-        j: imgObj.page,
-        k: common_vendor.p({
+        n: imgObj.page,
+        o: common_vendor.o(toUpLoad),
+        p: common_vendor.p({
           border: true,
           ["is-link"]: true,
           title: "上传记录"
+        }),
+        q: common_vendor.sr(loginRef, "276ac604-2", {
+          "k": "loginRef"
+        }),
+        r: common_vendor.o(getPhone),
+        s: common_vendor.p({
+          path: path.value
         })
-      };
+      });
     };
   }
 });

+ 2 - 1
dist/dev/mp-weixin/pages/my/index.json

@@ -1,6 +1,7 @@
 {
   "navigationStyle": "custom",
   "usingComponents": {
-    "wd-cell": "../../node-modules/wot-design-uni/components/wd-cell/wd-cell"
+    "wd-cell": "../../node-modules/wot-design-uni/components/wd-cell/wd-cell",
+    "user-login-popup": "../../components/userLoginPopup"
   }
 }

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

@@ -1 +1 @@
-<view class="myContent data-v-276ac604"><image class="myBg data-v-276ac604" src="{{a}}" mode="scaleToFill"/><view class="topTitle data-v-276ac604" style="{{'margin-top:' + b}}">个人中心</view><view class="userBox data-v-276ac604" style="{{'margin-top:' + d}}"><image class="avatar data-v-276ac604" src="{{c}}" mode="scaleToFill"/><view class="nickName data-v-276ac604"><text class="name data-v-276ac604">用户昵称</text><text class="login data-v-276ac604">点击登录</text></view></view><view class="dataBox data-v-276ac604" style="{{'top:' + f}}"><view wx:for="{{e}}" wx:for-item="item" wx:key="b" class="dataItem data-v-276ac604"><view class="inside data-v-276ac604"><text class="label data-v-276ac604">可用积分</text><view class="data-v-276ac604"/><text class="data-v-276ac604">0</text></view><image class="data-v-276ac604" src="{{item.a}}" mode="scaleToFill"/></view></view><view class="content data-v-276ac604"><view class="toolBox data-v-276ac604"><view class="title data-v-276ac604"> 常用工具 </view><view class="tools data-v-276ac604"><wd-cell wx:if="{{i}}" class="data-v-276ac604" u-s="{{['icon','d']}}" u-i="276ac604-0" bind:__l="__l" u-p="{{i}}"><image class="data-v-276ac604" src="{{g}}" mode="scaleToFill" slot="icon"/><image style="width:128rpx;height:48rpx" src="{{h}}" mode="scaleToFill" class="custom-text data-v-276ac604"/></wd-cell><wd-cell wx:if="{{k}}" class="data-v-276ac604" u-s="{{['icon']}}" u-i="276ac604-1" bind:__l="__l" u-p="{{k}}"><image class="data-v-276ac604" src="{{j}}" mode="scaleToFill" slot="icon"/></wd-cell></view></view></view></view>
+<view class="myContent data-v-276ac604"><image class="myBg data-v-276ac604" src="{{a}}" mode="scaleToFill"/><view class="topTitle data-v-276ac604" style="{{'margin-top:' + b}}">个人中心</view><view class="userBox data-v-276ac604" style="{{'margin-top:' + g}}"><image class="avatar data-v-276ac604" src="{{c}}" mode="scaleToFill"/><view class="nickName data-v-276ac604"><text class="name data-v-276ac604">{{d}}</text><text wx:if="{{e}}" class="login data-v-276ac604" bindtap="{{f}}">点击登录</text></view></view><view class="dataBox data-v-276ac604" style="{{'top:' + i}}"><view wx:for="{{h}}" wx:for-item="item" wx:key="b" class="dataItem data-v-276ac604"><view class="inside data-v-276ac604"><text class="label data-v-276ac604">可用积分</text><view class="data-v-276ac604"/><text class="data-v-276ac604">0</text></view><image class="data-v-276ac604" src="{{item.a}}" mode="scaleToFill"/></view></view><view class="content data-v-276ac604"><view class="toolBox data-v-276ac604"><view class="title data-v-276ac604"> 常用工具 </view><view class="tools data-v-276ac604"><wd-cell wx:if="{{m}}" class="data-v-276ac604" u-s="{{['icon','d']}}" bindclick="{{l}}" u-i="276ac604-0" bind:__l="__l" u-p="{{m}}"><image class="data-v-276ac604" src="{{j}}" mode="scaleToFill" slot="icon"/><image style="width:128rpx;height:48rpx" src="{{k}}" mode="scaleToFill" class="custom-text data-v-276ac604"/></wd-cell><wd-cell wx:if="{{p}}" class="data-v-276ac604" u-s="{{['icon']}}" bindclick="{{o}}" u-i="276ac604-1" bind:__l="__l" u-p="{{p}}"><image class="data-v-276ac604" src="{{n}}" mode="scaleToFill" slot="icon"/></wd-cell></view></view></view><user-login-popup wx:if="{{s}}" class="r data-v-276ac604" u-r="loginRef" bindgetPhone="{{r}}" u-i="276ac604-2" bind:__l="__l" u-p="{{s}}"></user-login-popup></view>

+ 52 - 23
dist/dev/mp-weixin/pagesOne/record/components/activeBlock.js

@@ -2,22 +2,20 @@
 const common_vendor = require("../../../common/vendor.js");
 const utils_common = require("../../../utils/common.js");
 if (!Array) {
+  const _easycom_wd_icon2 = common_vendor.resolveComponent("wd-icon");
   const _easycom_wd_tag2 = common_vendor.resolveComponent("wd-tag");
   const _easycom_wd_img2 = common_vendor.resolveComponent("wd-img");
-  (_easycom_wd_tag2 + _easycom_wd_img2)();
+  (_easycom_wd_icon2 + _easycom_wd_tag2 + _easycom_wd_img2)();
 }
+const _easycom_wd_icon = () => "../../../node-modules/wot-design-uni/components/wd-icon/wd-icon.js";
 const _easycom_wd_tag = () => "../../../node-modules/wot-design-uni/components/wd-tag/wd-tag.js";
 const _easycom_wd_img = () => "../../../node-modules/wot-design-uni/components/wd-img/wd-img.js";
 if (!Math) {
-  (_easycom_wd_tag + _easycom_wd_img)();
+  (_easycom_wd_icon + _easycom_wd_tag + _easycom_wd_img)();
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "activeBlock",
   props: {
-    imgList: {
-      type: Array,
-      default: () => []
-    },
     isShow: {
       type: Boolean,
       default: false
@@ -26,30 +24,57 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       type: Object,
       default: () => {
       }
+    },
+    index: {
+      type: Number,
+      default: 0
+    },
+    isLink: {
+      type: Boolean,
+      default: false
     }
   },
   setup(__props) {
+    const props = __props;
+    const toDetail = (id) => {
+      if (!props.isLink)
+        return;
+      common_vendor.index.navigateTo({
+        url: `/pagesOne/record/uploadDetail?id=${id}`
+      });
+    };
     return (_ctx, _cache) => {
-      return common_vendor.e({}, {}, {
-        a: common_vendor.t(__props.detail.title)
-      }, {
-        b: common_vendor.t(common_vendor.unref(utils_common.formatTagStr)("3")),
-        c: common_vendor.p({
+      return common_vendor.e({
+        a: __props.index === 0
+      }, __props.index === 0 ? {} : {}, {
+        b: common_vendor.t(__props.detail.title),
+        c: __props.isLink
+      }, __props.isLink ? {
+        d: common_vendor.p({
+          name: "arrow-right",
+          size: "26rpx",
+          color: "#ADB5BD"
+        })
+      } : {}, {
+        e: common_vendor.t(common_vendor.unref(utils_common.formatTagStr)(__props.detail.processStatus)),
+        f: 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")
+          color: common_vendor.unref(utils_common.formatTagColor)(__props.detail.processStatus),
+          ["bg-color"]: common_vendor.unref(utils_common.formatTagBgColor)(__props.detail.processStatus)
         })
       }, {
-        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 ? {
-        i: common_vendor.f(__props.detail.receiptImages, (joy, index, i0) => {
+        g: common_vendor.t(__props.detail.discountLevel),
+        h: common_vendor.t(__props.detail.createTime),
+        i: common_vendor.t(__props.detail.endTime),
+        j: common_vendor.t(__props.detail.createTime),
+        k: __props.isShow
+      }, __props.isShow ? common_vendor.e({
+        l: __props.detail.receiptImages && __props.detail.receiptImages.length
+      }, __props.detail.receiptImages && __props.detail.receiptImages.length ? {
+        m: common_vendor.f(__props.detail.receiptImages, (joy, index, i0) => {
           return {
             a: index,
-            b: "1142a638-1-" + i0,
+            b: "1142a638-2-" + i0,
             c: common_vendor.p({
               width: 50,
               height: 112,
@@ -58,9 +83,13 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             })
           };
         })
+      } : {}) : {}, {
+        n: __props.isShow && __props.detail.auditRemark
+      }, __props.isShow && __props.detail.auditRemark ? {
+        o: common_vendor.t(__props.detail.auditRemark)
       } : {}, {
-        j: __props.isShow
-      }, __props.isShow ? {} : {});
+        p: common_vendor.o(($event) => toDetail(__props.detail.id))
+      });
     };
   }
 });

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

@@ -1,6 +1,7 @@
 {
   "component": true,
   "usingComponents": {
+    "wd-icon": "../../../node-modules/wot-design-uni/components/wd-icon/wd-icon",
     "wd-tag": "../../../node-modules/wot-design-uni/components/wd-tag/wd-tag",
     "wd-img": "../../../node-modules/wot-design-uni/components/wd-img/wd-img"
   }

+ 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">{{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>
+<view bindtap="{{p}}" class="activityItem data-v-1142a638"><view class="top flex-start-btw data-v-1142a638"><view class="flex-start-center data-v-1142a638"><image wx:if="{{a}}" class="now data-v-1142a638" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png" mode="scaleToFill"/><image wx:else 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">{{b}}</text><wd-icon wx:if="{{c}}" class="data-v-1142a638" u-i="1142a638-0" bind:__l="__l" u-p="{{d}}"></wd-icon></view><wd-tag wx:if="{{true}}" class="data-v-1142a638" u-s="{{['d']}}" u-i="1142a638-1" bind:__l="__l" u-p="{{f}}">{{e}}</wd-tag></view><view class="data-v-1142a638"> 活动力度:{{g}}</view><view class="data-v-1142a638"> 活动时间:{{h}} 至 {{i}}</view><view class="data-v-1142a638"> 上传时间:{{j}}</view><view wx:if="{{k}}" class="data-v-1142a638"><view class="data-v-1142a638">上传图片:</view><view wx:if="{{l}}" class="imgBox flex-start-center data-v-1142a638"><wd-img wx:for="{{m}}" 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="{{n}}" class="remark data-v-1142a638">拒绝原因:{{o}}</view></view>

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

@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       };
       services_ams.rewardDetail(params).then((res) => {
         const data = res.data;
-        data.rereceiptImages = res.data.receiptImages.split(",");
+        data.receiptImages = res.data.receiptImages.split(",");
         detail.value = data;
       });
     };

+ 24 - 1
dist/dev/mp-weixin/pagesOne/record/uploadList.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,8 +8,30 @@ const ActiveBlock = () => "./components/activeBlock.js";
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "uploadList",
   setup(__props) {
+    const openid = common_vendor.index.getStorageSync("openid");
+    const list = common_vendor.ref([]);
+    const getList = () => {
+      services_ams.rewardList({ openid }).then((res) => {
+        list.value = res.rows;
+      });
+    };
+    common_vendor.onLoad(() => {
+      getList();
+    });
     return (_ctx, _cache) => {
-      return {};
+      return {
+        a: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: item.id,
+            b: "9e9212b6-0-" + i0,
+            c: common_vendor.p({
+              detail: item,
+              index,
+              isLink: true
+            })
+          };
+        })
+      };
     };
   }
 });

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

@@ -1 +1 @@
-<view class="winnerListContent data-v-9e9212b6"><view class="title data-v-9e9212b6">上传记录</view><view class="content data-v-9e9212b6"><active-block class="data-v-9e9212b6" u-i="9e9212b6-0" bind:__l="__l"></active-block></view></view>
+<view class="winnerListContent data-v-9e9212b6"><view class="title data-v-9e9212b6">上传记录</view><view class="content data-v-9e9212b6"><active-block wx:for="{{a}}" wx:for-item="item" wx:key="a" class="data-v-9e9212b6" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></active-block></view></view>

+ 34 - 5
dist/dev/mp-weixin/pagesOne/record/winnerList.js

@@ -1,8 +1,37 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
-  return common_vendor.e({}, {});
-}
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1f9f7d73"]]);
+const services_ams = require("../../services/ams.js");
+const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
+  __name: "winnerList",
+  setup(__props) {
+    const openid = common_vendor.index.getStorageSync("openid");
+    const list = common_vendor.ref([]);
+    const getList = () => {
+      services_ams.auditSuccessList({ openid }).then((res) => {
+        list.value = res.rows;
+      });
+    };
+    common_vendor.onLoad(() => {
+      getList();
+    });
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.f(list.value, (item, index, i0) => {
+          return common_vendor.e({
+            a: index === 0
+          }, index === 0 ? {} : {}, {
+            b: common_vendor.t(item.title),
+            c: common_vendor.t(item.discountLevel),
+            d: common_vendor.t(item.paymentAmount || 0),
+            e: common_vendor.t(item.startTime),
+            f: common_vendor.t(item.endTime),
+            g: common_vendor.n(item.processStatus === "3" ? "active" : "static"),
+            h: item.id
+          });
+        })
+      };
+    };
+  }
+});
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1f9f7d73"]]);
 wx.createPage(MiniProgramPage);

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

@@ -1 +1 @@
-<view class="winnerListContent data-v-1f9f7d73"><view class="title data-v-1f9f7d73">奖励记录</view><view class="content data-v-1f9f7d73"><view class="activityItem data-v-1f9f7d73"><view class="top flex-start-center data-v-1f9f7d73"><image wx:if="{{true}}" class="now data-v-1f9f7d73" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png" mode="scaleToFill"/><image wx:if="{{false}}" class="old data-v-1f9f7d73" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png" mode="scaleToFill"/><text class="name data-v-1f9f7d73">3月今麦郎上传小票返红包</text></view><view class="data-v-1f9f7d73"><text class="data-v-1f9f7d73">活动力度:满26返6</text><text class="data-v-1f9f7d73">奖励金额:5元</text></view><view class="data-v-1f9f7d73"> 活动时间:2021-11-21至2021-11-21 </view><view class="widthBtn data-v-1f9f7d73">提现</view></view></view></view>
+<view class="winnerListContent data-v-1f9f7d73"><view class="title data-v-1f9f7d73">奖励记录</view><view class="content data-v-1f9f7d73"><view wx:for="{{a}}" wx:for-item="item" wx:key="h" class="activityItem data-v-1f9f7d73"><view class="top flex-start-center data-v-1f9f7d73"><image wx:if="{{item.a}}" class="now data-v-1f9f7d73" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png" mode="scaleToFill"/><image wx:else class="old data-v-1f9f7d73" src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png" mode="scaleToFill"/><text class="name data-v-1f9f7d73">{{item.b}}</text></view><view class="data-v-1f9f7d73"><text class="data-v-1f9f7d73">活动力度:{{item.c}}</text><text class="data-v-1f9f7d73">奖励金额:{{item.d}}元</text></view><view class="data-v-1f9f7d73"> 活动时间:{{item.e}}至{{item.f}}</view><view class="{{['widthBtn', 'data-v-1f9f7d73', item.g]}}">提现</view></view></view></view>

+ 3 - 0
dist/dev/mp-weixin/pagesOne/record/winnerList.wxss

@@ -106,4 +106,7 @@
   color: #fff;
   line-height: 48rpx;
   text-align: center;
+}
+.winnerListContent .widthBtn.static.data-v-1f9f7d73 {
+  background: #d1d1d6;
 }

+ 14 - 0
dist/dev/mp-weixin/pagesOne/winner/components/uploadReceptPopop.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 services_ams = require("../../../services/ams.js");
 if (!Array) {
   const _easycom_wd_gap2 = common_vendor.resolveComponent("wd-gap");
   const _easycom_wd_popup2 = common_vendor.resolveComponent("wd-popup");
@@ -19,11 +20,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       type: Boolean,
       default: false
     },
+    id: {
+      type: String,
+      defalut: ""
+    },
     list: Array
   },
   emits: ["update:show"],
   setup(__props, { emit: __emit }) {
     const props = __props;
+    const openid = common_vendor.index.getStorageSync("openid");
     const emit = __emit;
     common_vendor.ref("1");
     const toUploadImage = (type) => {
@@ -32,6 +38,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           title: "请先选择优惠力度",
           icon: "none"
         });
+      const params = {
+        openid,
+        marketingActivityId: props.id,
+        discountId: discountId.value
+      };
+      services_ams.validate(params).then((res) => {
+        console.log("验证次数", res);
+      });
       common_vendor.index.navigateTo({
         url: `/pagesOne/winner/uploadImage?discountId=${discountId.value}&discountLevel=${discountLevel.value}`
       });

+ 46 - 28
dist/dev/mp-weixin/pagesOne/winner/index.js

@@ -1,14 +1,17 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_system = require("../../utils/system.js");
 const pagesOne_winner_utils_source = require("./utils/source.js");
 const services_ams = require("../../services/ams.js");
 if (!Array) {
+  const _easycom_wd_icon2 = common_vendor.resolveComponent("wd-icon");
   const _easycom_wd_gap2 = common_vendor.resolveComponent("wd-gap");
-  _easycom_wd_gap2();
+  (_easycom_wd_icon2 + _easycom_wd_gap2)();
 }
+const _easycom_wd_icon = () => "../../node-modules/wot-design-uni/components/wd-icon/wd-icon.js";
 const _easycom_wd_gap = () => "../../node-modules/wot-design-uni/components/wd-gap/wd-gap.js";
 if (!Math) {
-  (_easycom_wd_gap + PhotoExamplePopup + UploadReceptPopop + WinRecordPopup + UploadRecordPopup + ActivityDescPopup)();
+  (_easycom_wd_icon + _easycom_wd_gap + PhotoExamplePopup + UploadReceptPopop + WinRecordPopup + UploadRecordPopup + ActivityDescPopup)();
 }
 const PhotoExamplePopup = () => "./components/photoExamplePopup.js";
 const UploadReceptPopop = () => "./components/uploadReceptPopop.js";
@@ -62,35 +65,48 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const getWinnerList = () => {
       services_ams.auditSuccessList({ openid }).then((res) => {
         winnerData.value = res.rows;
-        console.log("获奖记录", rewardData);
       });
     };
     const showWinerRecord = () => {
       getWinnerList();
       showWiner.value = true;
     };
+    const onBack = () => {
+      common_vendor.index.navigateBack({ delta: 1 });
+    };
     const handledUpload = () => {
       showUpload.value = true;
     };
     common_vendor.onShow(() => {
       getList();
     });
+    common_vendor.ref(0);
+    common_vendor.onLoad(() => {
+    });
     return (_ctx, _cache) => {
       return {
-        a: backImage.value,
-        b: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = true : showDesc = true),
-        c: common_vendor.unref(pagesOne_winner_utils_source.imgObj).rule,
-        d: common_vendor.unref(pagesOne_winner_utils_source.imgObj).record,
-        e: common_vendor.o(showWinerRecord),
-        f: common_vendor.unref(pagesOne_winner_utils_source.imgObj).photo,
-        g: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = true : showExample = true),
-        h: common_vendor.unref(pagesOne_winner_utils_source.imgObj).book,
-        i: common_vendor.o(showUploadRecord),
-        j: common_vendor.unref(pagesOne_winner_utils_source.gifObj).pointer,
-        k: common_vendor.o(handledUpload),
-        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) => {
+        a: common_vendor.unref(utils_system.getStatusBarHeight)() + "px",
+        b: common_vendor.o(onBack),
+        c: common_vendor.p({
+          name: "thin-arrow-left",
+          size: "44rpx",
+          color: "#000"
+        }),
+        d: common_vendor.unref(utils_system.getNavBarPaddingTop)() + "px",
+        e: backImage.value,
+        f: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = true : showDesc = true),
+        g: common_vendor.unref(pagesOne_winner_utils_source.imgObj).rule,
+        h: common_vendor.unref(pagesOne_winner_utils_source.imgObj).record,
+        i: common_vendor.o(showWinerRecord),
+        j: common_vendor.unref(pagesOne_winner_utils_source.imgObj).photo,
+        k: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = true : showExample = true),
+        l: common_vendor.unref(pagesOne_winner_utils_source.imgObj).book,
+        m: common_vendor.o(showUploadRecord),
+        n: common_vendor.unref(pagesOne_winner_utils_source.gifObj).pointer,
+        o: common_vendor.o(handledUpload),
+        p: common_vendor.t(common_vendor.unref(aData).startTime),
+        q: common_vendor.t(common_vendor.unref(aData).endTime),
+        r: common_vendor.f(common_vendor.unref(list), (item, k0, i0) => {
           return {
             a: common_vendor.t(item.cashbackAmount),
             b: common_vendor.t(item.thresholdAmount),
@@ -98,30 +114,32 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             d: item.id
           };
         }),
-        o: common_vendor.p({
+        s: common_vendor.p({
           ["bg-color"]: "transparent"
         }),
-        p: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = $event : showExample = $event),
-        q: common_vendor.p({
+        t: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = $event : showExample = $event),
+        v: common_vendor.p({
           show: common_vendor.unref(showExample)
         }),
-        r: common_vendor.o(($event) => common_vendor.isRef(showUpload) ? showUpload.value = $event : showUpload = $event),
-        s: common_vendor.p({
+        w: common_vendor.unref(aData).id,
+        x: common_vendor.o(($event) => common_vendor.isRef(showUpload) ? showUpload.value = $event : showUpload = $event),
+        y: common_vendor.p({
           list: common_vendor.unref(list),
+          id: common_vendor.unref(aData).id,
           show: common_vendor.unref(showUpload)
         }),
-        t: common_vendor.o(($event) => common_vendor.isRef(showWiner) ? showWiner.value = $event : showWiner = $event),
-        v: common_vendor.p({
+        z: common_vendor.o(($event) => common_vendor.isRef(showWiner) ? showWiner.value = $event : showWiner = $event),
+        A: common_vendor.p({
           list: winnerData.value,
           show: common_vendor.unref(showWiner)
         }),
-        w: common_vendor.o(($event) => common_vendor.isRef(showRecord) ? showRecord.value = $event : showRecord = $event),
-        x: common_vendor.p({
+        B: common_vendor.o(($event) => common_vendor.isRef(showRecord) ? showRecord.value = $event : showRecord = $event),
+        C: common_vendor.p({
           list: rewardData.value,
           show: common_vendor.unref(showRecord)
         }),
-        y: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = $event : showDesc = $event),
-        z: common_vendor.p({
+        D: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = $event : showDesc = $event),
+        E: common_vendor.p({
           show: common_vendor.unref(showDesc)
         })
       };

+ 1 - 0
dist/dev/mp-weixin/pagesOne/winner/index.json

@@ -1,6 +1,7 @@
 {
   "navigationStyle": "custom",
   "usingComponents": {
+    "wd-icon": "../../node-modules/wot-design-uni/components/wd-icon/wd-icon",
     "wd-gap": "../../node-modules/wot-design-uni/components/wd-gap/wd-gap",
     "photo-example-popup": "./components/photoExamplePopup",
     "upload-recept-popop": "./components/uploadReceptPopop",

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/dev/mp-weixin/pagesOne/winner/index.wxml


+ 4 - 0
dist/dev/mp-weixin/pagesOne/winner/index.wxss

@@ -208,4 +208,8 @@
   color: #ffffff;
   font-size: 28rpx;
   bottom: 24rpx;
+}
+.winnerContent .back.data-v-3457e999 {
+  position: fixed;
+  left: 40rpx;
 }

+ 1 - 1
dist/dev/mp-weixin/pagesOne/winner/uploadImage.js

@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const openid = common_vendor.index.getStorageSync("openid");
     const phone = common_vendor.index.getStorageSync("phone");
     const routerInfo = common_vendor.reactive({ discountId: "", discountLevel: "" });
-    const action = "http://192.168.168.71:8080/miniApp/oss/upload/" + aData.brandId;
+    const action = "http://192.168.168.104:8090/miniApp/oss/upload/" + aData.brandId;
     const customUpload = (file, formData, options) => {
       common_vendor.index.uploadFile({
         url: action,

+ 9 - 2
dist/dev/mp-weixin/project.private.config.json

@@ -5,11 +5,18 @@
     "miniprogram": {
       "list": [
         {
+          "name": "pagesOne/record/winnerList",
+          "pathName": "pagesOne/record/winnerList",
+          "query": "",
+          "scene": null,
+          "launchMode": "default"
+        },
+        {
           "name": "pagesOne/record/uploadDetail",
           "pathName": "pagesOne/record/uploadDetail",
           "query": "id=1925368772240125953",
-          "scene": null,
-          "launchMode": "default"
+          "launchMode": "default",
+          "scene": null
         },
         {
           "name": "pagesOne/record/uploadDetail",

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

@@ -48,6 +48,16 @@ const getPhoneNumberInfo = (data) => {
     data
   });
 };
+const validate = (data) => {
+  return utils_http.http({
+    method: "POST",
+    url: `/miniApp/validate/${data.marketingActivityId}`,
+    data: {
+      openid: data.openid,
+      discountId: data.discountId
+    }
+  });
+};
 exports.addCustomer = addCustomer;
 exports.auditSuccessList = auditSuccessList;
 exports.getActivity = getActivity;
@@ -55,3 +65,4 @@ exports.getCarousel = getCarousel;
 exports.getPhoneNumberInfo = getPhoneNumberInfo;
 exports.rewardDetail = rewardDetail;
 exports.rewardList = rewardList;
+exports.validate = validate;

+ 1 - 1
dist/dev/mp-weixin/utils/http.js

@@ -1,6 +1,6 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
-const baseURL = "http://192.168.168.71:8080";
+const baseURL = "http://192.168.168.104:8090";
 const httpInterceptor = {
   // 拦截前触发
   invoke(options) {

+ 26 - 5
dist/dev/mp-weixin/utils/system.js

@@ -9,6 +9,16 @@ const getNavTop = () => {
   const navTop = statusBarHeight * (750 / windowWidth);
   return navTop;
 };
+const SYSTEM_INFO = common_vendor.index.getWindowInfo();
+const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight;
+const getNavBarPaddingTop = () => {
+  if (common_vendor.index.getMenuButtonBoundingClientRect) {
+    let { top, height } = common_vendor.index.getMenuButtonBoundingClientRect();
+    return height + (top - getStatusBarHeight());
+  } else {
+    return 0;
+  }
+};
 const getActivityData = () => {
   const appid = common_vendor.index.getStorageSync("appid");
   let isAuth = false;
@@ -20,17 +30,26 @@ const getActivityData = () => {
   });
   return isAuth;
 };
-const getMobile = (code, path) => {
-  services_ams.getPhoneNumberInfo(code).then((res) => {
+const getMobile = async (code, path) => {
+  const res = await services_ams.getPhoneNumberInfo(code);
+  try {
     common_vendor.index.showToast({
       title: res.msg,
       icon: "success"
     });
     common_vendor.index.setStorageSync("phone", res.data);
-    common_vendor.index.navigateTo({
-      url: path
+    if (path) {
+      common_vendor.index.navigateTo({
+        url: path
+      });
+    }
+    return res.data;
+  } catch (err) {
+    common_vendor.index.showToast({
+      title: err.msg,
+      icon: "none"
     });
-  });
+  }
 };
 const isGetPhone = () => {
   const data = JSON.parse(common_vendor.index.getStorageSync("activityData")) || {};
@@ -41,5 +60,7 @@ const isGetPhone = () => {
 };
 exports.getActivityData = getActivityData;
 exports.getMobile = getMobile;
+exports.getNavBarPaddingTop = getNavBarPaddingTop;
 exports.getNavTop = getNavTop;
+exports.getStatusBarHeight = getStatusBarHeight;
 exports.isGetPhone = isGetPhone;

+ 7 - 3
src/components/userLoginPopup.vue

@@ -32,7 +32,7 @@
 import { ref, defineExpose } from "vue";
 import { useDraw } from "@/hooks/useDraw";
 let show = ref(false);
-const emit = defineEmits(["update:show"]);
+const emit = defineEmits();
 import { verifyPhone, getMobile, isGetPhone } from "@/utils/system";
 
 const props = defineProps({
@@ -40,11 +40,15 @@ const props = defineProps({
     type: String,
     default: "",
   },
+  refresh: {
+    type: Boolean,
+    default: false,
+  },
 });
 
 const getphonenumber = async (e: any) => {
-  await getMobile(e.detail.code, props.path);
-  uni.getStorageSync("phone");
+  const res = await getMobile(e.detail.code, props.path);
+  emit("getPhone", res);
   show.value = false;
 };
 

+ 1 - 1
src/manifest.json

@@ -55,7 +55,7 @@
       "urlCheck": false
     },
     "usingComponents": true,
-    "requiredPrivateInfos": ["getLocation", "chooseLocation"],
+    "requiredPrivateInfos": ["getLocation"],
     "permission": {
       "scope.userLocation": {
         "desc": "是否允许授权地理位置信息。"

+ 1 - 8
src/pages/index/index.vue

@@ -36,22 +36,15 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
 import { getCarousel } from "@/services/ams";
 import { ref } from "vue";
 // import { useInfoStore } from "@/store/info";
-import { getActivityData, getPhoneNumber, isGetPhone } from "@/utils/system";
+import { getActivityData, isGetPhone } from "@/utils/system";
 import UserLoginPopup from "@/components/userLoginPopup.vue";
 
 const current = ref<number>(0);
 const appid = uni.getStorageSync("appid");
 onLoad(() => {
-  // payment();
   getBanner();
-  isGetPhone();
 });
 
-const getPhone = (e: any) => {
-  isGetPhone();
-  // infoStore.getPhoneNumber(e.detail.code);
-};
-
 const payment = () => {
   uni.login({
     //获取code,

+ 72 - 18
src/pages/my/index.vue

@@ -7,8 +7,10 @@
     <view class="userBox" :style="{ marginTop: navTop + 125 + 'rpx' }">
       <image class="avatar" :src="imgObj.user" mode="scaleToFill" />
       <view class="nickName">
-        <text class="name">用户昵称</text>
-        <text class="login">点击登录</text>
+        <text class="name">{{ phone || mobile || "用户昵称" }}</text>
+        <text v-if="!phone && !mobile" class="login" @click="onLogin"
+          >点击登录</text
+        >
       </view>
     </view>
     <view class="dataBox" :style="{ top: navTop + 280 + 'rpx' }">
@@ -25,7 +27,7 @@
         <view class="title"> 常用工具 </view>
 
         <view class="tools">
-          <wd-cell is-link title="奖励记录">
+          <wd-cell is-link title="奖励记录" @click="toWinner">
             <template #icon>
               <image :src="imgObj.gift" mode="scaleToFill" />
             </template>
@@ -36,7 +38,7 @@
               class="custom-text"
             />
           </wd-cell>
-          <wd-cell border is-link title="上传记录">
+          <wd-cell border is-link title="上传记录" @click="toUpLoad">
             <template #icon>
               <image :src="imgObj.page" mode="scaleToFill" />
             </template>
@@ -44,6 +46,11 @@
         </view>
       </view>
     </view>
+    <user-login-popup
+      ref="loginRef"
+      :path="path"
+      @getPhone="getPhone"
+    ></user-login-popup>
   </view>
 </template>
 
@@ -53,6 +60,8 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
 import { ref } from "vue";
 import { getNavTop } from "@/utils/system";
 import { paymentAPI } from "@/services/ams";
+import { getActivityData, isGetPhone, getMobile } from "@/utils/system";
+import UserLoginPopup from "@/components/userLoginPopup.vue";
 
 const imgObj = {
   user: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/user.png",
@@ -77,26 +86,71 @@ const list = [
   },
 ];
 
-const title = ref<string>("Hello");
 const navTop = ref<number>(0);
-onLoad(() => {
-  navTop.value = getNavTop();
-});
+const loginRef = <any>ref(null);
+const path = ref<string>("");
+const phone = uni.getStorageSync("phone");
 
-const onLogin = async () => {
-  let form = {
-    mobile: "18927563000",
-    password: "123456",
-  };
-  let res: any = await postLoginAPI(form);
-  if (res.code == 200) {
+const toWinner = () => {
+  path.value = "/pagesOne/record/winnerList";
+  if (!isGetPhone()) {
+    loginRef.value.show = true;
   } else {
-    return uni.showToast({
-      title: res.msg,
-      icon: "none",
+    uni.navigateTo({
+      url: "/pagesOne/record/winnerList",
     });
   }
 };
+
+const toUpLoad = () => {
+  path.value = "/pagesOne/record/uploadList";
+  if (!isGetPhone()) {
+    loginRef.value.show = true;
+  } else {
+    uni.navigateTo({
+      url: "/pagesOne/record/uploadList",
+    });
+  }
+};
+
+const mobile = ref<string>("");
+const onLogin = async (e: any) => {
+  path.value = "";
+  console.log("-------------------", isGetPhone());
+
+  if (!isGetPhone()) {
+    loginRef.value.show = true;
+  }
+  // setTimeout(() => {
+  //   mobile.value = uni.getStorageSync("phone");
+  //   console.log("--------------------", mobile.value);
+  // }, 2000);
+  // const data = await getMobile(e.detail.code, "");
+  // console.log(data);
+};
+const getPhone = (res: string) => {
+  mobile.value = res;
+};
+onLoad(() => {
+  navTop.value = getNavTop();
+});
+onShow(() => {
+  getActivityData();
+});
+// const onLogin = async () => {
+//   let form = {
+//     mobile: "18927563000",
+//     password: "123456",
+//   };
+//   let res: any = await postLoginAPI(form);
+//   if (res.code == 200) {
+//   } else {
+//     return uni.showToast({
+//       title: res.msg,
+//       icon: "none",
+//     });
+//   }
+// };
 </script>
 
 <style lang="scss" scoped>

+ 35 - 15
src/pagesOne/record/components/activeBlock.vue

@@ -1,29 +1,35 @@
 <template>
-  <view class="activityItem">
+  <view @click="toDetail(detail.id)" class="activityItem">
     <view class="top flex-start-btw">
-      <view>
+      <view class="flex-start-center">
         <image
           class="now"
           src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png"
           mode="scaleToFill"
-          v-if="true"
+          v-if="index === 0"
         />
         <image
           class="old"
           src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png"
           mode="scaleToFill"
-          v-if="false"
+          v-else
         />
         <text class="name">{{ detail.title }}</text>
+        <wd-icon
+          v-if="isLink"
+          name="arrow-right"
+          size="26rpx"
+          color="#ADB5BD"
+        ></wd-icon>
       </view>
 
       <wd-tag
         v-if="true"
         custom-style="padding:8rpx 26rpx;border-radius: 8rpx;font-size:22rpx;float: right"
-        :color="formatTagColor('3')"
-        :bg-color="formatTagBgColor('3')"
+        :color="formatTagColor(detail.processStatus)"
+        :bg-color="formatTagBgColor(detail.processStatus)"
       >
-        {{ formatTagStr("3") }}
+        {{ formatTagStr(detail.processStatus) }}
       </wd-tag>
     </view>
     <view> 活动力度:{{ detail.discountLevel }} </view>
@@ -31,7 +37,10 @@
     <view> 上传时间:{{ detail.createTime }} </view>
     <view v-if="isShow">
       <view>上传图片:</view>
-      <view class="imgBox flex-start-center">
+      <view
+        v-if="detail.receiptImages && detail.receiptImages.length"
+        class="imgBox flex-start-center"
+      >
         <wd-img
           v-for="(joy, index) in detail.receiptImages"
           :key="index"
@@ -42,8 +51,8 @@
         />
       </view>
     </view>
-    <view v-if="isShow" class="remark"
-      >拒绝原因:订单中活动商品数量/金额不足</view
+    <view v-if="isShow && detail.auditRemark" class="remark"
+      >拒绝原因:{{ detail.auditRemark }}</view
     >
   </view>
 </template>
@@ -52,11 +61,6 @@
 import { formatTagColor, formatTagBgColor, formatTagStr } from "@/utils/common";
 
 const props = defineProps({
-  imgList: {
-    type: Array<string>,
-    default: () => [],
-  },
-
   isShow: {
     type: Boolean,
     default: false,
@@ -65,7 +69,23 @@ const props = defineProps({
     type: Object,
     default: () => {},
   },
+  index: {
+    type: Number,
+    default: 0,
+  },
+  isLink: {
+    type: Boolean,
+    default: false,
+  },
 });
+
+const toDetail = (id: string) => {
+  if (!props.isLink) return;
+
+  uni.navigateTo({
+    url: `/pagesOne/record/uploadDetail?id=${id}`,
+  });
+};
 // console.log(props);
 </script>
 

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

@@ -33,7 +33,7 @@ const getList = () => {
   };
   rewardDetail(params).then((res: any) => {
     const data = res.data;
-    data.rereceiptImages = res.data.receiptImages.split(",");
+    data.receiptImages = res.data.receiptImages.split(",");
     detail.value = data;
   });
 };

+ 24 - 2
src/pagesOne/record/uploadList.vue

@@ -2,14 +2,36 @@
   <view class="winnerListContent">
     <view class="title">上传记录</view>
     <view class="content">
-      <active-block></active-block>
+      <active-block
+        v-for="(item, index) in list"
+        :key="item.id"
+        :detail="item"
+        :index="index"
+        isLink
+      ></active-block>
     </view>
   </view>
 </template>
 
 <script lang="ts" setup>
-import { computed } from "vue";
+import { onLoad } from "@dcloudio/uni-app";
+import { ref } from "vue";
 import ActiveBlock from "./components/activeBlock.vue";
+import { rewardList } from "@/services/ams";
+
+const openid = uni.getStorageSync("openid");
+
+const list = <any>ref([]);
+
+const getList = () => {
+  rewardList({ openid }).then((res: any) => {
+    list.value = res.rows;
+  });
+};
+
+onLoad(() => {
+  getList();
+});
 </script>
 
 <style lang="scss" scoped>

+ 33 - 9
src/pagesOne/record/winnerList.vue

@@ -2,34 +2,55 @@
   <view class="winnerListContent">
     <view class="title">奖励记录</view>
     <view class="content">
-      <view class="activityItem">
+      <view v-for="(item, index) in list" :key="item.id" class="activityItem">
         <view class="top flex-start-center">
           <image
             class="now"
             src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/nowAct.png"
             mode="scaleToFill"
-            v-if="true"
+            v-if="index === 0"
           />
           <image
             class="old"
             src="https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/act.png"
             mode="scaleToFill"
-            v-if="false"
+            v-else
           />
-          <text class="name">3月今麦郎上传小票返红包</text>
+          <text class="name">{{ item.title }}</text>
         </view>
         <view>
-          <text>活动力度:满26返6</text>
-          <text>奖励金额:5元</text>
+          <text>活动力度:{{ item.discountLevel }}</text>
+          <text>奖励金额:{{ item.paymentAmount || 0 }}元</text>
         </view>
-        <view> 活动时间:2021-11-21至2021-11-21 </view>
-        <view class="widthBtn">提现</view>
+        <view> 活动时间:{{ item.startTime }}至{{ item.endTime }} </view>
+        <view
+          class="widthBtn"
+          :class="item.processStatus === '3' ? 'active' : 'static'"
+          >提现</view
+        >
       </view>
     </view>
   </view>
 </template>
 
-<script lang="ts" setup></script>
+<script lang="ts" setup>
+import { onLoad } from "@dcloudio/uni-app";
+import { ref } from "vue";
+import { auditSuccessList } from "@/services/ams";
+const openid = uni.getStorageSync("openid");
+
+const list = <any>ref([]);
+
+const getList = () => {
+  auditSuccessList({ openid }).then((res: any) => {
+    list.value = res.rows;
+  });
+};
+
+onLoad(() => {
+  getList();
+});
+</script>
 
 <style lang="scss" scoped>
 .winnerListContent {
@@ -138,6 +159,9 @@
     color: #fff;
     line-height: 48rpx;
     text-align: center;
+    &.static {
+      background: #d1d1d6;
+    }
   }
 }
 </style>

+ 14 - 0
src/pagesOne/winner/components/uploadReceptPopop.vue

@@ -51,13 +51,19 @@ import { reactive, ref } from "vue";
 import { imgObj } from "../utils/source";
 import { useDraw } from "@/hooks/useDraw";
 import { receptProp } from "../utils/interface";
+import { validate } from "@/services/ams";
 const props = defineProps({
   show: {
     type: Boolean,
     default: false,
   },
+  id: {
+    type: String,
+    defalut: "",
+  },
   list: Array<receptProp>,
 });
+const openid = uni.getStorageSync("openid");
 
 const emit = defineEmits(["update:show"]);
 const value = ref("1");
@@ -68,6 +74,14 @@ const toUploadImage = (type: string) => {
       title: "请先选择优惠力度",
       icon: "none",
     });
+  const params = {
+    openid,
+    marketingActivityId: props.id,
+    discountId: discountId.value,
+  };
+  validate(params).then((res: any) => {
+    console.log("验证次数", res);
+  });
   uni.navigateTo({
     url: `/pagesOne/winner/uploadImage?discountId=${discountId.value}&discountLevel=${discountLevel.value}`,
   });

+ 83 - 19
src/pagesOne/winner/index.vue

@@ -1,5 +1,20 @@
 <template>
   <view class="winnerContent">
+    <view
+      class="back flex-center"
+      :style="{ paddingTop: getNavBarPaddingTop() + 'px' }"
+    >
+      <view
+        class="statusBar"
+        :style="{ height: getStatusBarHeight() + 'px' }"
+      ></view>
+      <wd-icon
+        name="thin-arrow-left"
+        size="44rpx"
+        color="#000"
+        @click="onBack"
+      ></wd-icon>
+    </view>
     <image class="backImage" :src="backImage" mode="scaleToFill" />
     <view class="content">
       <view class="floatWindow">
@@ -21,7 +36,7 @@
         </view>
       </view>
       <view class="uploadBox">
-        <view class="count">您还有0次奖励机会</view>
+        <!-- <view class="count">您还有0次奖励机会</view> -->
         <view @click="handledUpload" class="btnBox">
           <image :src="gifObj.pointer" />
         </view>
@@ -56,6 +71,7 @@
     <photo-example-popup v-model:show="showExample"></photo-example-popup>
     <upload-recept-popop
       :list="list"
+      :id="aData.id"
       v-model:show="showUpload"
     ></upload-recept-popop>
     <win-record-popup
@@ -73,6 +89,12 @@
 <script setup lang="ts">
 import { reactive, ref, computed } from "vue";
 import { onLoad, onShow } from "@dcloudio/uni-app";
+import {
+  getStatusBarHeight,
+  getNavBarHeight,
+  getNavBarPaddingTop,
+  getNavTop,
+} from "@/utils/system";
 
 import { imgObj, gifObj } from "./utils/source";
 import PhotoExamplePopup from "./components/photoExamplePopup.vue";
@@ -89,7 +111,7 @@ let showRecord = ref<boolean>(false);
 let showDesc = ref<boolean>(false);
 const appid = uni.getStorageSync("appid");
 const backImage = ref<string>("");
-
+// const statusBarHeight = uni.getWindowInfo().statusBarHeight * 2;
 let aData: any = reactive({ discounts: [] });
 let list = ref([] as receptProp[]);
 
@@ -139,7 +161,6 @@ const winnerData = ref([]);
 const getWinnerList = () => {
   auditSuccessList({ openid }).then((res: any) => {
     winnerData.value = res.rows;
-    console.log("获奖记录", rewardData);
   });
 };
 
@@ -149,30 +170,69 @@ const showWinerRecord = () => {
   showWiner.value = true;
 };
 
+const onBack = () => {
+  uni.navigateBack({ delta: 1 });
+};
+
 const handledUpload = () => {
-  showUpload.value = true;
-  // uni.getLocation({
-  //   type: "gcj02",
-  //   success: async (res) => {
-  //     const { latitude, longitude } = res;
-  //     // 调用高德API
-  //     const key = "7c607ea6b491804270ddcdd72daad58c";
-  //     const url = `https://restapi.amap.com/v3/geocode/regeo?key=${key}&location=${longitude},${latitude}`;
-  //     const data = await uni.request({ url });
-  //     console.log("用户所在位置", res);
-  //   },
-  //   fail: (err) => {
-  //     uni.showToast({
-  //       title: "获取位置失败",
-  //       icon: "none",
-  //     });
+  // uni.getSetting({
+  //   success: (res) => {
+  //     if (!res.authSetting["scope.address"]) {
+  //       uni.authorize({
+  //         scope: "scope.address",
+  //         success() {
+  //           console.log("1111111111111111111");
+
+  //           // 用户同意授权
+  //         },
+  //         fail() {
+  //           // 用户拒绝授权
+  //           uni.showModal({
+  //             title: "提示",
+  //             content: "您拒绝了地址授权,请手动开启",
+  //             success: () => {
+  //               uni.openSetting();
+  //             },
+  //           });
+  //         },
+  //       });
+  //     } else {
+  //       uni.getLocation({
+  //         type: "wgs84",
+  //         success: function (res) {
+  //           console.log("当前位置的经度:" + res.longitude);
+  //           console.log("当前位置的纬度:" + res.latitude);
+  //           uni.showToast({
+  //             title: "当前位置的经纬度:" + res.longitude + "," + res.latitude,
+  //             icon: "success",
+  //             mask: true,
+  //           });
+  //         },
+  //         fail(error) {
+  //           uni.showToast({
+  //             title: "请勿频繁调用!",
+  //             icon: "none",
+  //           });
+  //           console.log("失败", error);
+  //         },
+  //       });
+
+  //       console.log("222222222222222222");
+  //     }
   //   },
   // });
+
+  showUpload.value = true;
 };
 
 onShow(() => {
   getList();
 });
+const navTop = ref<number>(0);
+
+onLoad(() => {
+  // navTop.value = getNavTop();
+});
 </script>
 
 <style lang="scss" scoped>
@@ -381,5 +441,9 @@ onShow(() => {
       }
     }
   }
+  .back {
+    position: fixed;
+    left: 40rpx;
+  }
 }
 </style>

+ 6 - 3
src/services/ams.ts

@@ -76,10 +76,13 @@ export const postLoginAPI = (data: any) => {
   });
 };
 
-export const paymentAPI = (data: any) => {
+export const validate = (data: any) => {
   return http({
     method: "POST",
-    url: "/v3/fund-app/mch-transfer/transfer-bills",
-    data,
+    url: `/miniApp/validate/${data.marketingActivityId}`,
+    data: {
+      openid: data.openid,
+      discountId: data.discountId,
+    },
   });
 };

+ 39 - 6
src/utils/system.ts

@@ -1,5 +1,4 @@
 import { getPhoneNumberInfo, getActivity } from "@/services/ams";
-
 export const getNavTop = () => {
   // 1.获取屏幕可使用宽度
   let windowWidth = wx.getSystemInfoSync().windowWidth;
@@ -15,6 +14,31 @@ export const getNavTop = () => {
   const navTop = statusBarHeight * (750 / windowWidth);
   return navTop;
 };
+//旧版 const SYSTEM_INFO = uni.getSystemInfoSync();
+const SYSTEM_INFO = uni.getWindowInfo();
+
+//时间电量状态栏高度
+export const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight;
+
+export const getTitleBarHeight = () => {
+  //关闭按钮胶囊
+  if (uni.getMenuButtonBoundingClientRect) {
+    let { top, height } = uni.getMenuButtonBoundingClientRect();
+    return height + (top - getStatusBarHeight()) * 2;
+  } else {
+    return 0;
+  }
+};
+export const getNavBarHeight = () => getStatusBarHeight() + getTitleBarHeight();
+
+export const getNavBarPaddingTop = () => {
+  if (uni.getMenuButtonBoundingClientRect) {
+    let { top, height } = uni.getMenuButtonBoundingClientRect();
+    return height + (top - getStatusBarHeight());
+  } else {
+    return 0;
+  }
+};
 
 export const getActivityData = () => {
   const appid = uni.getStorageSync("appid");
@@ -31,17 +55,26 @@ export const getActivityData = () => {
   return isAuth;
 };
 
-export const getMobile = (code: string, path: string) => {
-  getPhoneNumberInfo(code).then((res: any) => {
+export const getMobile = async (code: string, path: string) => {
+  const res: any = await getPhoneNumberInfo(code);
+  try {
     uni.showToast({
       title: res.msg,
       icon: "success",
     });
     uni.setStorageSync("phone", res.data);
-    uni.navigateTo({
-      url: path,
+    if (path) {
+      uni.navigateTo({
+        url: path,
+      });
+    }
+    return res.data;
+  } catch (err: any) {
+    uni.showToast({
+      title: err.msg,
+      icon: "none",
     });
-  });
+  }
 };
 
 export const isGetPhone = () => {

Неке датотеке нису приказане због велике количине промена