Commit fa7bdcb3d9a65448de730f560fd2fd57ab4572a1

Authored by taiyuan
1 parent 69c88d7a

礼包详情

packageA/pages/myGift/myGift.js
@@ -32,9 +32,9 @@ Page({ @@ -32,9 +32,9 @@ Page({
32 }); 32 });
33 33
34 if(index == 0) { 34 if(index == 0) {
35 - url = '/api/weshop/libao/libaoFormvip/page';  
36 - } else if(index == 1) {  
37 url = '/api/weshop/libao/libaoForm/page'; 35 url = '/api/weshop/libao/libaoForm/page';
  36 + } else if(index == 1) {
  37 + url = '/api/weshop/libao/libaoFormvip/page';
38 data.user_id = app.globalData.user_id; 38 data.user_id = app.globalData.user_id;
39 }; 39 };
40 40
@@ -72,9 +72,8 @@ Page({ @@ -72,9 +72,8 @@ Page({
72 isLogin: true, 72 isLogin: true,
73 }); 73 });
74 74
75 - this.getData(true, '/api/weshop/libao/libaoFormvip/page', { 75 + this.getData(true, '/api/weshop/libao/libaoForm/page', {
76 store_id: app.globalData.setting.stoid, 76 store_id: app.globalData.setting.stoid,
77 - user_id: app.globalData.user_id,  
78 }); 77 });
79 }; 78 };
80 }; 79 };
packageA/pages/myGift/myGift.wxml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <view class="tab-content"> 6 <view class="tab-content">
7 <block wx:if="{{currentIndex == 0}}"> 7 <block wx:if="{{currentIndex == 0}}">
8 <view class="tab-item" wx:for="{{list.pageData}}"> 8 <view class="tab-item" wx:for="{{list.pageData}}">
9 - <view bindtap="goto" data-url="/packageA/pages/myGiftDetails/myGiftDetails"> 9 + <view bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?id=' + item.lbvipid}}">
10 <!-- 图片 --> 10 <!-- 图片 -->
11 <view class="img-container"><image src="{{imghost + item.lburl}}" class="img" mode="widthFix"/></view> 11 <view class="img-container"><image src="{{imghost + item.lburl}}" class="img" mode="widthFix"/></view>
12 <view class="desc-container"> 12 <view class="desc-container">
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <view class="fs24 c-a4">已售{{item.salenum}}件</view> 21 <view class="fs24 c-a4">已售{{item.salenum}}件</view>
22 </view> 22 </view>
23 <!-- 时间 --> 23 <!-- 时间 -->
24 - <view class="date">活动截止日期{{filter.format_time(item.expdate)}}</view> 24 + <view class="date">活动截止日期 {{filter.format_time(item.expdate)}}</view>
25 <!-- 按钮 --> 25 <!-- 按钮 -->
26 </view> 26 </view>
27 </view> 27 </view>
@@ -33,14 +33,14 @@ @@ -33,14 +33,14 @@
33 </block> 33 </block>
34 34
35 <block wx:else> 35 <block wx:else>
36 - <view class="tab-item flex pd20" wx:for="{{list.pageData}}" bindtap="goto" data-url="/packageA/pages/myGiftDetails/myGiftDetails"> 36 + <view class="tab-item flex pd20" wx:for="{{list.pageData}}" bindtap="goto" data-url="{{'/packageA/pages/myGiftDetails/myGiftDetails?id=' + item.lbvipid}}">
37 <view class="img-container2"><image src="{{imghost + item.lburl}}" class="img" mode="widthFix"/></view> 37 <view class="img-container2"><image src="{{imghost + item.lburl}}" class="img" mode="widthFix"/></view>
38 <view class="flex fdc jc_sb"> 38 <view class="flex fdc jc_sb">
39 <view> 39 <view>
40 <!-- 标题 --> 40 <!-- 标题 -->
41 <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view> 41 <view class="mgb10 ellipsis-2 lh taj">{{item.lbtitle}}</view>
42 <!-- 时间 --> 42 <!-- 时间 -->
43 - <view class="date pdb20">活动截止日期{{filter.format_time(item.endtime)}}</view> 43 + <view class="date pdb20">活动截止日期 {{filter.format_time(item.endtime)}}</view>
44 </view> 44 </view>
45 <!-- 说明 --> 45 <!-- 说明 -->
46 <view class="c-red fs24">*请到线下门店兑换</view> 46 <view class="c-red fs24">*请到线下门店兑换</view>
packageA/pages/myGift/myGift.wxss
@@ -103,6 +103,8 @@ page { @@ -103,6 +103,8 @@ page {
103 background-color: #dedede; 103 background-color: #dedede;
104 margin-right: 20rpx; 104 margin-right: 20rpx;
105 flex-shrink: 0; 105 flex-shrink: 0;
  106 + display: flex;
  107 + align-items: center;
106 } 108 }
107 109
108 .img { 110 .img {
packageA/pages/myGiftDetails/myGiftDetails.js 0 → 100644
  1 +// packageA//pages/myGiftDetails/myGiftDetails.js
  2 +const app = getApp();
  3 +let self = null;
  4 +
  5 +Page({
  6 +
  7 + /**
  8 + * 页面的初始数据
  9 + */
  10 + data: {
  11 +
  12 + },
  13 +
  14 + /**
  15 + * 生命周期函数--监听页面加载
  16 + */
  17 + onLoad: function (options) {
  18 + self = this;
  19 + this.data.id = options.id;
  20 + // console.log('options', options);
  21 + app.isLogin().then(function(data) {//进入页面前已经授权登录成功
  22 + self.setData({
  23 + userInfo: data,
  24 + });
  25 + });
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面初次渲染完成
  30 + */
  31 + onReady: function () {
  32 +
  33 + },
  34 +
  35 + /**
  36 + * 生命周期函数--监听页面显示
  37 + */
  38 + onShow: function () {
  39 + if(app.globalData.userInfo) {
  40 + if(!this.data.isLogin) {
  41 + this.setData({
  42 + userInfo: app.globalData.userInfo,
  43 + imghost: app.globalData.setting.imghost,
  44 + isLogin: true,
  45 + });
  46 +
  47 + // 请求数据
  48 + app.request.promiseGet('/api/weshop/libao/libaoFormvip/page', {
  49 + data: {
  50 + store_id: app.globalData.setting.stoid,
  51 + user_id: app.globalData.user_id,
  52 + id: this.data.id,
  53 + },
  54 + isShowLoading: true,
  55 + }).then(function(res) {
  56 + console.log('res-->', res.data.data.pageData);
  57 + self.setData({
  58 + details: res.data.data.pageData[0],
  59 + });
  60 + });
  61 +
  62 + };
  63 + };
  64 + },
  65 +
  66 + /**
  67 + * 生命周期函数--监听页面隐藏
  68 + */
  69 + onHide: function () {
  70 +
  71 + },
  72 +
  73 + /**
  74 + * 生命周期函数--监听页面卸载
  75 + */
  76 + onUnload: function () {
  77 +
  78 + },
  79 +
  80 + /**
  81 + * 页面相关事件处理函数--监听用户下拉动作
  82 + */
  83 + onPullDownRefresh: function () {
  84 +
  85 + },
  86 +
  87 + /**
  88 + * 页面上拉触底事件的处理函数
  89 + */
  90 + onReachBottom: function () {
  91 +
  92 + },
  93 +
  94 + /**
  95 + * 用户点击右上角分享
  96 + */
  97 + onShareAppMessage: function () {
  98 +
  99 + }
  100 +})
0 \ No newline at end of file 101 \ No newline at end of file
packageA/pages/myGiftDetails/myGiftDetails.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包详情",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "nav_b": "/components/nav_b/nav_b"
  7 + }
  8 +}
0 \ No newline at end of file 9 \ No newline at end of file
packageA/pages/myGiftDetails/myGiftDetails.wxml 0 → 100644
  1 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
  2 +<view class="pdb80">
  3 + <!-- 图片 -->
  4 + <view><image src="{{imghost + details.lburl}}" class="img" mode="widthFix"/></view>
  5 + <!-- 描述-->
  6 + <view class="desc-container">
  7 + <!-- 标题 -->
  8 + <view class="mgb10 ellipsis-2 lh taj">{{details.lbtitle}}</view>
  9 + <!-- 价格 -->
  10 + <view class="flex jc_sb ai-center pdb10">
  11 + <view class="flex ai-center">
  12 + <view class="c-red fs36"><text class="rmb">{{details.lbprice}}</text>/{{details.lbintegral}}积分</view>
  13 + <view class="fs22 c-a4 line-through mgl10">零售价{{details.oldprice}}</view>
  14 + </view>
  15 + <view class="fs24 c-a4">已售{{details.salenum}}件</view>
  16 + </view>
  17 + <!-- 时间 -->
  18 + <view class="date">活动截止日期 {{filter.format_time(details.expdate)}}</view>
  19 + </view>
  20 + <!-- 单品 -->
  21 + <view class="goods-container">
  22 + <view class="pd20 bold bdb">可到线下门店兑换以下单品</view>
  23 + <view class="">
  24 + <view class="flex pd20 jc_sb">
  25 + <view>单品名称</view>
  26 + <view>数量</view>
  27 + </view>
  28 + <view class="flex pd20 jc_sb">
  29 + <view>DN53000039蒂诺间金</view>
  30 + <view class="c-a4">x1</view>
  31 + </view>
  32 + <view class="flex pd20 jc_sb">
  33 + <view>蒂诺间金</view>
  34 + <view class="c-a4">x1</view>
  35 + </view>
  36 + <view class="flex pd20 jc_sb">
  37 + <view>金</view>
  38 + <view class="c-a4">x1000</view>
  39 + </view>
  40 + <view class="flex pd20 jc_sb">
  41 + <view class="ellipsis-1 pdr80">蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂蒂</view>
  42 + <view class="c-a4">x199</view>
  43 + </view>
  44 + </view>
  45 + </view>
  46 +
  47 + <!-- 按钮 -->
  48 + <view class="btn-container">
  49 + <view class="btn exchange">立即兑换</view>
  50 + <view class="btn buy">马上购买</view>
  51 + </view>
  52 +</view>
packageA/pages/myGiftDetails/myGiftDetails.wxss 0 → 100644
  1 +@charset "utf-8";
  2 +
  3 +.c-a4 {
  4 + color: #a4a4a4;
  5 +}
  6 +
  7 +.c-red {
  8 + color: #FF6768;
  9 +}
  10 +
  11 +page {
  12 + background-color: #f0f0f0;
  13 +}
  14 +
  15 +.pdb80 {
  16 + padding-bottom: 80rpx;
  17 +}
  18 +
  19 +.img-container {
  20 + background-color: #dedede;
  21 +}
  22 +
  23 +.img {
  24 + display: block;
  25 + width: 100%;
  26 +}
  27 +
  28 +
  29 +.desc-container {
  30 + padding: 20rpx;
  31 + background-color: white;
  32 +}
  33 +
  34 +
  35 +.rmb::before {
  36 + content: '¥';
  37 +}
  38 +
  39 +
  40 +.date {
  41 + color: #a4a4a4;
  42 + font-size: 24rpx;
  43 +}
  44 +
  45 +
  46 +.goods-container {
  47 + margin-top: 20rpx;
  48 + background-color: white;
  49 + font-size: 28rpx;
  50 +}
  51 +
  52 +
  53 +
  54 +
  55 +
  56 +
  57 +.btn-container {
  58 + position: fixed;
  59 + width: 100%;
  60 + bottom: 0;
  61 + display: flex;
  62 + font-size: 30rpx;
  63 +}
  64 +
  65 +.btn {
  66 + padding: 20rpx;
  67 + flex: 1;
  68 + text-align: center;
  69 +}
  70 +
  71 +.btn.exchange {
  72 + background-color: #FF6768;
  73 + color: white;
  74 +}
  75 +
  76 +.btn.buy {
  77 + background-color: #FACAD6;
  78 + color: #FF6768;
  79 +}
0 \ No newline at end of file 80 \ No newline at end of file