15102826049 пре 1 месец
родитељ
комит
e71eb4dd78

+ 1 - 1
.env.development

@@ -10,4 +10,4 @@ VITE_APP_BASE_API = ''
 # 路由懒加载
 VITE_CLI_BABEL_TRANSPILE_MODULES = true
 
-VITE_API_URL=https://test-coupon.qiuyutech.com.cn/stage-api
+VITE_API_URL=http://test-coupon.qiuyutech.com.cn/stage-api

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

@@ -64,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         })
       }, {
         g: common_vendor.t(__props.detail.discountLevel),
-        h: common_vendor.t(__props.detail.createTime),
+        h: common_vendor.t(__props.detail.startTime),
         i: common_vendor.t(__props.detail.endTime),
         j: common_vendor.t(__props.detail.createTime),
         k: __props.isShow

+ 8 - 3
dist/dev/mp-weixin/pagesOne/record/winnerList.js

@@ -13,9 +13,14 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       });
     };
     const onPayment = (data) => {
-      if (data.processStatus != "3")
+      const status = data.processStatus === "3" || data.processStatus === "5" || data.processStatus === "6";
+      if (!status)
         return;
       services_ams.payment(data.id).then((res) => {
+        if (res.code === 500) {
+          common_vendor.index.showToast({ icon: "none", title: "提现申请失败" });
+          return;
+        }
         if (common_vendor.wx$1.canIUse("requestMerchantTransfer")) {
           common_vendor.wx$1.requestMerchantTransfer({
             mchId: res.data.merchantId,
@@ -26,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
               getList();
             },
             fail: (response) => {
-              console.log("fail:", response);
+              common_vendor.index.showToast({ icon: "none", title: "提现申请失败" });
             }
           });
         } else {
@@ -53,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             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"),
+            g: common_vendor.n(item.processStatus === "3" || item.processStatus === "5" || item.processStatus === "6" ? "active" : "static"),
             h: common_vendor.o(($event) => onPayment(item), item.id),
             i: item.id
           });

+ 3 - 3
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 = "https://test-coupon.qiuyutech.com.cn/stage-api/miniApp/oss/upload/" + aData.brandId;
+    const action = "http://test-coupon.qiuyutech.com.cn/stage-api/miniApp/oss/upload/" + aData.brandId;
     const customUpload = (file, formData, options) => {
       common_vendor.index.uploadFile({
         url: action,
@@ -47,6 +47,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       imgList.value = imgList.value.filter((item) => item !== data.url);
     };
     const onAdd = () => {
+      if (imgList.value.length === 0)
+        return common_vendor.index.showToast({ title: "请上传图片", icon: "none" });
       const params = {
         openid,
         mobile: phone,
@@ -59,13 +61,11 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       };
       services_ams.addCustomer(params).then((res) => {
         common_vendor.index.navigateBack();
-        console.log("---------------------", res);
       });
     };
     common_vendor.onLoad((options) => {
       routerInfo.discountId = options.discountId;
       routerInfo.discountLevel = options.discountLevel;
-      console.log("---------------------", routerInfo);
     });
     return (_ctx, _cache) => {
       return {

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

@@ -1,6 +1,6 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
-const baseURL = "https://test-coupon.qiuyutech.com.cn/stage-api";
+const baseURL = "http://test-coupon.qiuyutech.com.cn/stage-api";
 const httpInterceptor = {
   // 拦截前触发
   invoke(options) {

+ 1 - 1
src/pagesOne/record/components/activeBlock.vue

@@ -33,7 +33,7 @@
       </wd-tag>
     </view>
     <view> 活动力度:{{ detail.discountLevel }} </view>
-    <view> 活动时间:{{ detail.createTime }} 至 {{ detail.endTime }} </view>
+    <view> 活动时间:{{ detail.startTime }} 至 {{ detail.endTime }} </view>
     <view> 上传时间:{{ detail.createTime }} </view>
     <view v-if="isShow">
       <view>上传图片:</view>

+ 17 - 3
src/pagesOne/record/winnerList.vue

@@ -25,7 +25,13 @@
         <view> 活动时间:{{ item.startTime }}至{{ item.endTime }} </view>
         <view
           class="widthBtn"
-          :class="item.processStatus === '3' ? 'active' : 'static'"
+          :class="
+            item.processStatus === '3' ||
+            item.processStatus === '5' ||
+            item.processStatus === '6'
+              ? 'active'
+              : 'static'
+          "
           @click="onPayment(item)"
           >提现</view
         >
@@ -49,9 +55,17 @@ const getList = () => {
 };
 
 const onPayment = (data: any) => {
-  if (data.processStatus != "3") return;
+  const status =
+    data.processStatus === "3" ||
+    data.processStatus === "5" ||
+    data.processStatus === "6";
+  if (!status) return;
   payment(data.id)
     .then((res: any) => {
+      if (res.code === 500) {
+        uni.showToast({ icon: "none", title: "提现申请失败" });
+        return;
+      }
       if (wx.canIUse("requestMerchantTransfer")) {
         wx.requestMerchantTransfer({
           mchId: res.data.merchantId,
@@ -64,7 +78,7 @@ const onPayment = (data: any) => {
             // console.log("success:", res);
           },
           fail: (response: any) => {
-            console.log("fail:", response);
+            uni.showToast({ icon: "none", title: "提现申请失败" });
           },
         });
       } else {

+ 2 - 2
src/pagesOne/winner/uploadImage.vue

@@ -64,6 +64,8 @@ const handleRemove = (file: any) => {
 };
 
 const onAdd = () => {
+  if (imgList.value.length === 0)
+    return uni.showToast({ title: "请上传图片", icon: "none" });
   const params = {
     openid,
     mobile: phone,
@@ -76,14 +78,12 @@ const onAdd = () => {
   };
   addCustomer(params).then((res) => {
     uni.navigateBack();
-    console.log("---------------------", res);
   });
 };
 
 onLoad((options: any) => {
   routerInfo.discountId = options.discountId;
   routerInfo.discountLevel = options.discountLevel;
-  console.log("---------------------", routerInfo);
 });
 </script>