Forráskód Böngészése

feat(福利go)对接口 列表

xing.li 3 éve
szülő
commit
94040d5886

+ 1 - 1
api/welfareMall.js

@@ -98,7 +98,7 @@ class WelfareMall extends request {
   static getOrderParams(orderSn,openId) {
     let params = {
       orderSn:orderSn,
-      source: "WX_MINI_APP",
+      source: "FREE_MINI_APP",
       thirdPartyName: 'coupon-activity',
       payCode: "HSAY-SHARE",
       openId: openId

BIN
images/welfareMall/window_del.png


+ 18 - 1
pages/welfareMall/activityInfo/activityInfo.js

@@ -15,6 +15,7 @@ Page({
      buttonText:'',
      userMobile: '', //用户手机号
      orderInfo: [], //下单信息
+     hideWindowValue:false
   },
 
   /**
@@ -99,6 +100,10 @@ Page({
    * @param {*} e 
    */
   getPhoneNumber(e) {
+    // this.setData({
+    //   hideWindowValue:true
+    // })
+    // return;
     let _self = this;
     var encryptedData = e.detail.encryptedData;
     var iv = e.detail.iv;
@@ -122,6 +127,8 @@ Page({
    * 下单
    */
   async nowBuy() {
+
+   
     let _self = this;
     try {
       let res = await WelfareMall.createOrder(_self.data.userMobile, _self.data.detail.activityId,1);
@@ -170,6 +177,16 @@ Page({
           // console.log(res);
         }
       })
-  }
+  },
+  goToOrderList(){
+       wx.redirectTo({
+            url: '/pages/welfareMall/historical/historical'
+        })
+  },
 
+hideWindow(){
+  this.setData({
+    hideWindowValue:false
+  })
+}
 })

+ 14 - 1
pages/welfareMall/activityInfo/activityInfo.wxml

@@ -69,4 +69,17 @@
   <view class="now_buy" bindtap="nowBuy" wx:if="{{userMobile.length>0}}">{{buttonText}}</view>
   <button class="now_buy_button" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>{{buttonText}}</button>
 </view>
-<view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
+<view class="go_buy"  style="background-color:#bdbdbd" wx:else>{{statusShowText}}</view>
+
+<view class="bg-zindex" wx:if="{{hideWindowValue}}">
+
+    <view class="success_window flex-column">
+    <view class="w_title">购买成功</view>
+    <view class="w_name">{{detail.name}}</view>
+    <view class="w_text">已发送至您的卡包</view>
+    <view class="w_border"></view>
+    <view class="w_go_order" bindtap="goToOrderList">去看看</view>
+
+    </view>
+   <image class="widow_del" src="/images/welfareMall/window_del.png"  bindtap="hideWindow"></image>
+</view>

+ 61 - 1
pages/welfareMall/activityInfo/activityInfo.wxss

@@ -20,6 +20,7 @@ Page {
   width: 345px;
   height: 118px;
   justify-content: space-between!important;
+  margin-top: 25px;
 }
 .info_left{
   width: 243px;
@@ -40,7 +41,7 @@ Page {
   font-size: 24px;
   font-weight: bold;
   color: #444444;
-  margin-top: 5px;
+  /* margin-top: 5px; */
 }
 .info_coupon_num{
   font-size: 12px;
@@ -144,4 +145,63 @@ margin-left: 28px;
   width: 316px!important;
   text-align: center;
   font-size: 22px;
+}
+.bg-zindex{
+  position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ background: rgba(0, 0, 0, 0.8);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+}
+.success_window{
+  width: 328px;
+  height: 227px;
+  background-image: url(https://dy.shpr.top/welfareGo/window_info.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  position: relative;
+  z-index: 9999;
+  align-items: center;
+}
+
+.w_title{
+
+height: 20px;
+font-size: 18px;
+font-weight: 700;
+color: #B01717;
+margin-top: 30px;
+}
+
+.w_name{
+margin-top:30px;
+}
+.w_text{
+  margin-top: 8px;
+}
+.w_border{
+  width: 300px;
+  height: 1px;
+  background: #A0A0A0;
+  margin-top: 21px;
+}
+.w_go_order{
+  width: 164px;
+  height: 42px;
+  background: #B01717;
+  border-radius: 20px;
+  text-align: center;
+  color: #fff;
+  line-height: 42px;
+  margin-top: 20px;
+}
+
+.widow_del{
+  width: 21px;
+  height: 21px;
+  margin-top:24px;
 }

+ 2 - 1
pages/welfareMall/index/index.js

@@ -16,7 +16,8 @@ Page({
      
       autoplay: true,
       interval: 2000,
-      duration: 500
+      duration: 500,
+      indicatorDots:true
   },
 
   /**

+ 1 - 0
pages/welfareMall/index/index.wxml

@@ -2,6 +2,7 @@
 
 <view>
 <swiper  class="swiper"
+indicator-dots="{{indicatorDots}}"
         autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
         <block wx:for="{{bannerList}}" wx:key="unique" data-appid="{{item.appId}}" data-path="{{item.path}}" bindtap="goToBanner">
           <swiper-item >

+ 1 - 1
pages/welfareMall/index/index.wxss

@@ -65,7 +65,7 @@ Page {
   margin-top: 13px;
   box-sizing: border-box;
   padding: 20px 17px;
-  margin-bottom: 60px;
+  margin-bottom: 20px;
 }
 .c_l_top{
   width: 100%;