15102826049 1 місяць тому
батько
коміт
21e36a8882

+ 1 - 1
dist/build/mp-weixin/pages/index/index.js

@@ -1 +1 @@
-"use strict";const e=require("../../common/vendor.js"),n=require("../../services/ams.js"),o=require("../../utils/system.js");if(!Array){e.resolveComponent("wd-swiper")()}Math||((()=>"../../node-modules/wot-design-uni/components/wd-swiper/wd-swiper.js")+s)();const s=()=>"../../components/userLoginPopup.js",t=e.defineComponent({__name:"index",setup(s){const t=e.ref(0),i=e.index.getStorageSync("appid"),a=e.ref([]),r=e.ref(null),d=()=>{o.isGetPhone()?e.index.navigateTo({url:"/pagesOne/winner/index"}):r.value.show=!0};return e.onLoad((()=>{e.index.login({success:o=>{n.getOpenId(o.code).then((n=>{200===n.code?e.index.setStorageSync("openid",n.data.openid):e.index.showToast({title:"获取openid失败",icon:"none"})}))}}),n.getCarousel(i).then((e=>{a.value=e.data}))})),e.onShow((()=>{o.getActivityData()})),(n,o)=>({a:e.p({customClass:"customSwiper",list:a.value,autoplay:!0,"value-key":"imageUrl",value:t.value}),b:e.o(d),c:e.sr(r,"f5f2151a-1",{k:"loginRef"}),d:e.p({path:"/pagesOne/winner/index"})})}});wx.createPage(t);
+"use strict";const e=require("../../common/vendor.js"),n=require("../../services/ams.js"),o=require("../../utils/system.js");if(!Array){e.resolveComponent("wd-swiper")()}Math||((()=>"../../node-modules/wot-design-uni/components/wd-swiper/wd-swiper.js")+t)();const t=()=>"../../components/userLoginPopup.js",i=e.defineComponent({__name:"index",setup(t){const i=e.ref(0),s=e.index.getStorageSync("appid"),a=e.ref([]),r=e.ref(null),d=()=>{JSON.parse(e.index.getStorageSync("activityData"))||{}?o.isGetPhone()?e.index.navigateTo({url:"/pagesOne/winner/index"}):r.value.show=!0:e.index.showToast({title:"当前暂无满返红包上传小票活动哦",icon:"none"})};return e.onLoad((()=>{e.index.login({success:o=>{const t={code:o.code,appid:e.index.getAccountInfoSync().miniProgram.appId};n.getOpenId(t).then((n=>{200===n.code?e.index.setStorageSync("openid",n.data.openid):e.index.showToast({title:"获取openid失败",icon:"none"})}))}}),n.getCarousel(s).then((e=>{a.value=e.data}))})),e.onShow((()=>{o.getActivityData()})),(n,o)=>({a:e.p({customClass:"customSwiper",list:a.value,autoplay:!0,"value-key":"imageUrl",value:i.value}),b:e.o(d),c:e.sr(r,"f5f2151a-1",{k:"loginRef"}),d:e.p({path:"/pagesOne/winner/index"})})}});wx.createPage(i);

+ 1 - 1
dist/build/mp-weixin/services/ams.js

@@ -1 +1 @@
-"use strict";const t=require("../utils/http.js");exports.addCustomer=e=>t.http({method:"POST",url:"/customer/add",data:e}),exports.auditSuccessList=e=>t.http({method:"POST",url:"/customer/auditSuccessList",data:e}),exports.getActivity=e=>t.http({method:"GET",url:`/miniApp/getActivity/${e}`}),exports.getCarousel=e=>t.http({method:"GET",url:`/miniApp/getCarousel/${e}`,data:e}),exports.getOpenId=e=>t.http({method:"GET",url:`/miniApp/getOpenId/${e}`,data:e}),exports.getPhoneNumberInfo=e=>t.http({method:"GET",url:`/miniApp/getPhoneNumber/${e}`,data:e}),exports.payment=e=>t.http({method:"POST",url:`/customer/payment/${e}`,data:e}),exports.rewardDetail=e=>t.http({method:"POST",url:"/customer/rewardDetail",data:e}),exports.rewardList=e=>t.http({method:"POST",url:"/customer/rewardList",data:e}),exports.validate=e=>t.http({method:"POST",url:`/miniApp/validate/${e.marketingActivityId}`,data:e});
+"use strict";const t=require("../utils/http.js");exports.addCustomer=e=>t.http({method:"POST",url:"/customer/add",data:e}),exports.auditSuccessList=e=>t.http({method:"POST",url:"/customer/auditSuccessList",data:e}),exports.getActivity=e=>t.http({method:"GET",url:`/miniApp/getActivity/${e}`}),exports.getCarousel=e=>t.http({method:"GET",url:`/miniApp/getCarousel/${e}`,data:e}),exports.getOpenId=e=>t.http({method:"GET",url:`/miniApp/getOpenId/${e.appid}/${e.code}`,data:e}),exports.getPhoneNumberInfo=e=>t.http({method:"GET",url:`/miniApp/getPhoneNumber/${e.appid}/${e.code}`}),exports.payment=e=>t.http({method:"POST",url:`/customer/payment/${e}`,data:e}),exports.rewardDetail=e=>t.http({method:"POST",url:"/customer/rewardDetail",data:e}),exports.rewardList=e=>t.http({method:"POST",url:"/customer/rewardList",data:e}),exports.validate=e=>t.http({method:"POST",url:`/miniApp/validate/${e.marketingActivityId}`,data:e});

+ 1 - 1
dist/build/mp-weixin/utils/system.js

@@ -1 +1 @@
-"use strict";const t=require("../common/vendor.js"),e=require("../services/ams.js"),n=t.index.getWindowInfo(),o=()=>n.statusBarHeight;exports.getActivityData=()=>{const n=t.index.getStorageSync("appid");return e.getActivity(n).then((e=>{const n=e.data[0]||{};t.index.setStorageSync("activityData",JSON.stringify(n))})).catch((t=>{console.log(t)})),!1},exports.getMobile=async(n,o)=>{const i=await e.getPhoneNumberInfo(n);try{return 200===i.code?(t.index.setStorageSync("phone",i.data),o&&t.index.navigateTo({url:o})):t.index.showToast({title:"获取手机号失败",icon:"none"}),i.data}catch(a){t.index.showToast({title:"获取手机号失败",icon:"none"})}},exports.getNavBarPaddingTop=()=>{if(t.index.getMenuButtonBoundingClientRect){let{top:e,height:n}=t.index.getMenuButtonBoundingClientRect();return n+(e-o())}return 0},exports.getNavTop=()=>{let e=t.wx$1.getSystemInfoSync().windowWidth;const n=t.wx$1.getSystemInfoSync().statusBarHeight,o=t.wx$1.getMenuButtonBoundingClientRect();o.height,o.top;return n*(750/e)},exports.getStatusBarHeight=o,exports.isGetPhone=()=>{const e=JSON.parse(t.index.getStorageSync("activityData"))||{},n=((null==e?void 0:e.authCheck.split(","))||[]).includes("1"),o=!!t.index.getStorageSync("phone");return n&&o};
+"use strict";const t=require("../common/vendor.js"),e=require("../services/ams.js"),n=t.index.getWindowInfo(),o=()=>n.statusBarHeight;exports.getActivityData=()=>{const n=t.index.getStorageSync("appid");return e.getActivity(n).then((e=>{const n=e.data[0]||{};t.index.setStorageSync("activityData",JSON.stringify(n))})).catch((t=>{console.log(t)})),!1},exports.getMobile=async(n,o)=>{const i={code:n,appid:t.index.getStorageSync("appid")},a=await e.getPhoneNumberInfo(i);try{return 200===a.code?(t.index.setStorageSync("phone",a.data),o&&t.index.navigateTo({url:o})):t.index.showToast({title:"获取手机号失败",icon:"none"}),a.data}catch(r){t.index.showToast({title:"获取手机号失败",icon:"none"})}},exports.getNavBarPaddingTop=()=>{if(t.index.getMenuButtonBoundingClientRect){let{top:e,height:n}=t.index.getMenuButtonBoundingClientRect();return n+(e-o())}return 0},exports.getNavTop=()=>{let e=t.wx$1.getSystemInfoSync().windowWidth;const n=t.wx$1.getSystemInfoSync().statusBarHeight,o=t.wx$1.getMenuButtonBoundingClientRect();o.height,o.top;return n*(750/e)},exports.getStatusBarHeight=o,exports.isGetPhone=()=>{const e=JSON.parse(t.index.getStorageSync("activityData"))||{},n=((null==e?void 0:e.authCheck.split(","))||[]).includes("1"),o=!!t.index.getStorageSync("phone");return n&&o};

+ 6 - 4
dist/dev/mp-weixin/pagesOne/winner/index.js

@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const rewardData = common_vendor.ref([]);
     const getRewardList = () => {
       console.log("openid", openid);
-      services_ams.rewardList({ openid }).then((res) => {
+      services_ams.rewardList({ openid, marketingActivityId: aData.id }).then((res) => {
         rewardData.value = res.rows;
       });
     };
@@ -63,9 +63,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const winnerData = common_vendor.ref([]);
     const getWinnerList = () => {
-      services_ams.auditSuccessList({ openid }).then((res) => {
-        winnerData.value = res.rows;
-      });
+      services_ams.auditSuccessList({ openid, marketingActivityId: aData.id }).then(
+        (res) => {
+          winnerData.value = res.rows;
+        }
+      );
     };
     const showWinerRecord = () => {
       getWinnerList();

+ 6 - 4
src/pagesOne/winner/index.vue

@@ -143,7 +143,7 @@ const rewardData = ref([]);
 //获取上传记录
 const getRewardList = () => {
   console.log("openid", openid);
-  rewardList({ openid }).then((res: any) => {
+  rewardList({ openid, marketingActivityId: aData.id }).then((res: any) => {
     rewardData.value = res.rows;
   });
 };
@@ -157,9 +157,11 @@ const showUploadRecord = () => {
 const winnerData = ref([]);
 //获取奖励记录
 const getWinnerList = () => {
-  auditSuccessList({ openid }).then((res: any) => {
-    winnerData.value = res.rows;
-  });
+  auditSuccessList({ openid, marketingActivityId: aData.id }).then(
+    (res: any) => {
+      winnerData.value = res.rows;
+    }
+  );
 };
 
 //打开获奖记录