Commit 187d5eec75aba0c8d3932d525870cf18441e3d0a

Authored by 前端研发-钱巧玲
1 parent 22973097

新增支付成功显示页面,首页判断用户是否登录,界面调整

app.json
1 1 {
2   - "pages": [
  2 + "pages": [
3 3 "pages/index/index/index",
  4 + "pages/giftpack/payment/payment",
  5 + "pages/giftpack/buygiftpack/giftpackbuy",
  6 + "pages/giftpack/giftpacklist/giftpacklist",
  7 + "pages/giftpack/mygiftpack/mygiftpack",
4 8 "pages/goods/categoryList/categoryList",
5 9 "pages/cart/cart/cart",
6 10 "pages/cart/cart2/cart2",
... ... @@ -77,7 +81,6 @@
77 81 "pages/user/my_service/tment_eval",
78 82 "pages/user/my_service/tment_order_list",
79 83 "pages/user/my_service/beauty_deta",
80   -
81 84 "pages/user/labels/labels"
82 85 ],
83 86 "permission": {
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -11,8 +11,8 @@ Page({
11 11 getStorageID: '',
12 12 getUserID: '',
13 13 wareCard: [],
14   - page: 0,
15   - pageSize: 10,
  14 + // page: 0,
  15 + // pageSize: 10,
16 16 isEmpty: false,
17 17 loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
18 18 contentText: {
... ... @@ -23,7 +23,7 @@ Page({
23 23 ismore: 0, //数据是否全部加载完成
24 24 is_read: 0, //是否查询过我的礼包接口
25 25 curpage: 1, //当前分页数
26   - pageSize: 3, //页大小
  26 + pageSize: 10, //页大小
27 27 total: 0, //总数量
28 28 },
29 29 onLoad: function(options) {
... ... @@ -51,6 +51,7 @@ Page({
51 51 var th = this;
52 52 var id = e.currentTarget.dataset.id; //活动id
53 53 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  54 + var order_sn = e.currentTarget.dataset.order_sn;//订单号
54 55 my_confirm.open(
55 56 "是否确定购买该礼包",
56 57 "取消",
... ... @@ -81,17 +82,17 @@ Page({
81 82 success: function(res) {
82 83 if (res.data.code == 0) {
83 84 res = res.data.data;
  85 + var url = "/pages/giftpack/payment/payment?type=" + 1 + "order_sn=" + order_sn;
84 86 wx.requestPayment({
85 87 timeStamp: String(res.timeStamp),
86 88 nonceStr: res.nonceStr,
87 89 package: res.packageValue,
88 90 signType: res.signType,
89 91 paySign: res.paySign,
90   - success: function(n) {
91   -
  92 + success: function(res) {
  93 + getApp().goto(url);
92 94 },
93   - fail: function(n) {
94   -
  95 + fail: function(res) {
95 96 }
96 97 });
97 98 } else {
... ... @@ -196,9 +197,7 @@ Page({
196 197 navigateTo: function(e) {
197 198 var th = this;
198 199 var url = e.currentTarget.dataset.url;
199   - wx.navigateTo({
200   - url: url,
201   - })
  200 + getApp().goto(url);
202 201 },
203 202 //下拉事件
204 203 onReachBottom: function() {
... ... @@ -210,5 +209,16 @@ Page({
210 209 })
211 210 th.getList();
212 211 },
213   -
  212 + //图片失败,默认图片
  213 + bind_bnerr2: function(e) {
  214 + var _errImg = e.target.dataset.errorimg;
  215 + var _errObj = {};
  216 + _errObj[_errImg] = "/public/images/empty.jpg";
  217 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  218 + },
  219 + goto: function(e) {
  220 + var th = this;
  221 + var url = e.currentTarget.dataset.url;
  222 + getApp().goto(url);
  223 + }
214 224 })
215 225 \ No newline at end of file
... ...
pages/giftpack/buygiftpack/giftpackbuy.json
1 1 {
2 2 "navigationBarTitleText": "礼包列表",
3   - "navigationStyle": "custom",
4 3 "enablePullDownRefresh": false,
5 4 "usingComponents": {
6 5 "warn": "/components/long_warn/long_warn",
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxml
1 1 <view class="top_img">
2 2 <view class="top_img">
3   - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image>
  3 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
4 4 </view>
5 5 <view class="top_title">
6 6 <view class="top_title_box">
... ... @@ -13,13 +13,13 @@
13 13 </view>
14 14 <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">
15 15 <view class="content_box">
16   - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn={{items.orderSn}}">
  16 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''">
17 17 <view class="content_box_img">
18   - <image src="{{iurl+items.lbUrl}}" lazy-load="true"></image>
  18 + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
19 19 </view>
20 20 <view class="content_box_title">
21 21 <view class="content_ware_title">
22   - <text bindtap="__e">{{items.giftTitle}}</text>
  22 + <text>{{items.giftTitle}}</text>
23 23 </view>
24 24 <view class="content_ware_type flex">
25 25 <block wx:if="{{items.payMoney>0}}">
... ... @@ -48,15 +48,29 @@
48 48 <text>{{"已售:"+items.giftQty+"件"}}</text>
49 49 </view>
50 50 <view class="flex-vertical">
51   - <block wx:if="{{items.payMoney>0}}">
52   - <view class="box_button_buy" bindtap="GetBuyPrice" data-id="{{items.lbId}}">
53   - <button>立即购买</button>
54   - </view>
  51 + <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}">
  52 + <block wx:if="{{items.payMoney>0}}">
  53 + <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}">
  54 + <button class="box_button_dui">立即购买</button>
  55 + </view>
  56 + </block>
  57 + <block wx:if="{{items.payIntegral>0}}">
  58 + <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}">
  59 + <button class="box_button_dui box_button_buy">立即兑换</button>
  60 + </view>
  61 + </block>
55 62 </block>
56   - <block wx:if="{{items.payIntegral>0}}">
57   - <view class="box_button_dui" bindtap="GetBuyIntegral" data-id="{{items.lbId}}">
58   - <button>立即兑换</button>
59   - </view>
  63 + <block wx:else>
  64 + <block wx:if="{{items.payMoney>0}}">
  65 + <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}">
  66 + <button class="box_button_dui box_button_buy">立即购买</button>
  67 + </view>
  68 + </block>
  69 + <block wx:if="{{items.payIntegral>0}}">
  70 + <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}">
  71 + <button class="box_button_dui box_button_buy">立即兑换</button>
  72 + </view>
  73 + </block>
60 74 </block>
61 75 </view>
62 76 </view>
... ... @@ -71,7 +85,7 @@
71 85 <text>当前暂无礼包</text>
72 86 </view>
73 87 <view class="foot_empty_button">
74   - <text bindtap="__e">去获取</text>
  88 + <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text>
75 89 </view>
76 90 </view>
77 91 </block>
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxss
... ... @@ -150,16 +150,12 @@ page {
150 150 line-height: 110rpx;
151 151 }
152 152  
153   -.box_button_remark {
154   -
155   -}
156   -
157 153 .box_button_remark text {
158 154 font-size: 28rpx;
159 155 color: #b9b5b5;
160 156 }
161 157  
162   -.box_button_buy button {
  158 +.box_button_dui {
163 159 display: inline-block;
164 160 width: 160rpx;
165 161 height: 50rpx;
... ... @@ -167,17 +163,14 @@ page {
167 163 background: #fff;
168 164 color: #000;
169 165 line-height: 50rpx;
  166 + margin-left: 20rpx;
  167 + border-radius: 10rpx;
170 168 }
171 169  
172   -.box_button_dui button {
173   - display: inline-block;
174   - width: 160rpx;
175   - height: 50rpx;
176   - font-size: 20rpx;
  170 +.box_button_buy {
177 171 background: #d41c34;
178 172 color: #fff;
179   - line-height: 50rpx;
180   - margin-left: 20rpx;
  173 + border-radius: 10rpx;
181 174 }
182 175  
183 176 .foot_box {
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -22,7 +22,8 @@ Page({
22 22 getUrl: '',
23 23 wareCard: [],
24 24 orderSn: "", //订单编号
25   - lbId:""
  25 + lbId: "",
  26 + code: "", //核销码
26 27 },
27 28 onLoad: function(options) {
28 29 var th = this;
... ... @@ -43,17 +44,9 @@ Page({
43 44 })
44 45 },
45 46 onShow: function() {
46   - // var th = this;
47   - // if (th.data.isBuy == 0) {
48   - // th.GetMyGiftList();
49   - // } else {
50   - // th.GetBuyGiftList();
51   - // }
52   - // th.setData({
53   - // giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img")
54   - // })
  47 +
55 48 },
56   - GetBuyPrice: function (e) {
  49 + GetBuyPrice: function(e) {
57 50 var that = this.data;
58 51 var th = this;
59 52 // var id = e.currentTarget.dataset.id;//活动id
... ... @@ -62,10 +55,10 @@ Page({
62 55 "是否确定购买该礼包",
63 56 "取消",
64 57 "确定",
65   - function () {
  58 + function() {
66 59 my_confirm.open_cancel(0);
67 60 },
68   - function () {
  61 + function() {
69 62 my_confirm.open_cancel(0);
70 63 var json = {
71 64 "actId": '', //活动Id
... ... @@ -85,7 +78,7 @@ Page({
85 78 header: {
86 79 'content-type': 'application/json'
87 80 }, // 设置请求的 header
88   - success: function (res) {
  81 + success: function(res) {
89 82 if (res.data.code == 0) {
90 83 res = res.data.data;
91 84 wx.requestPayment({
... ... @@ -94,10 +87,10 @@ Page({
94 87 package: res.packageValue,
95 88 signType: res.signType,
96 89 paySign: res.paySign,
97   - success: function (n) {
  90 + success: function(n) {
98 91  
99 92 },
100   - fail: function (n) {
  93 + fail: function(n) {
101 94  
102 95 }
103 96 });
... ... @@ -114,7 +107,7 @@ Page({
114 107  
115 108  
116 109 },
117   - GetBuyIntegral: function (e) {
  110 + GetBuyIntegral: function(e) {
118 111 var that = this.data;
119 112 var th = this;
120 113 // var id = e.currentTarget.dataset.id;//活动id
... ... @@ -123,10 +116,10 @@ Page({
123 116 "是否确定兑换该礼包",
124 117 "取消",
125 118 "确定",
126   - function () {
  119 + function() {
127 120 my_confirm.open_cancel(0);
128 121 },
129   - function () {
  122 + function() {
130 123 my_confirm.open_cancel(0);
131 124 var json = {
132 125 "actId": '', //活动Id
... ... @@ -145,7 +138,7 @@ Page({
145 138 header: {
146 139 'content-type': 'application/json'
147 140 }, // 设置请求的 header
148   - success: function (res) {
  141 + success: function(res) {
149 142 if (res.data.code == 0) {
150 143 getApp().my_warnning("兑换成功!", 1, th);
151 144 } else {
... ... @@ -236,7 +229,7 @@ Page({
236 229 giftPrice: res.data.data.payMoney,
237 230 giftType: res.data.data.actType,
238 231 actTitle: res.data.data.actTitle,
239   - wareCard: res.data.data.wareCard,
  232 + wareCard: res.data.data.wareCard
240 233 })
241 234 } else {
242 235 getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2);
... ... @@ -246,22 +239,59 @@ Page({
246 239 });
247 240  
248 241 },
249   - GetQrCode: function() {
250   - //不销毁调整
251   - uni.navigateTo({
252   - url: '/pages/mygiftpack/QrCode?number=' + this.getGiftID
253   - });
254   -
  242 + //显示核销码
  243 + code_show: function(e) {
  244 + var th = this;
  245 + //--获取成功的时候--
  246 + var no = th.data.code;
  247 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  248 + var obj = {
  249 + val: no,
  250 + content: "请将二维码展示给核销员,收货更快捷"
  251 + };
  252 + qc_com.open(obj)
255 253 },
256   - GetWebHttp: function(type) {
257   -
258   - if (type == 0) {
259   - this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/User/coupon/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html';
260   - }
261   - if (type == 1) {
262   - this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/Yyservice/service_items_list/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html';
263   - }
264   - window.location.href = this.getUrl;
265   - }
  254 + //获取核销码
  255 + getcode: function() {
  256 + var th = this;
  257 + var orderSn = th.data.orderSn; //订单号
  258 + var json = {
  259 + "storeId": a.stoid,
  260 + "orderSn": orderSn
  261 + };
  262 + var data = JSON.stringify(json);
  263 + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
  264 + wx.request({
  265 + url: url,
  266 + data: data,
  267 + method: 'put',
  268 + header: {
  269 + 'content-type': 'application/json'
  270 + }, // 设置请求的 header
  271 + success: function(res) {
  272 + if (res.data.code == 0) {
  273 + th.setData({
  274 + code: res.data.data
  275 + })
  276 + th.code_show();
  277 + } else {
  278 + getApp().my_warnning(res.data.msg, 0, th);
  279 + }
  280 + }
  281 + })
  282 + },
  283 + //界面跳转
  284 + goto: function(e) {
  285 + var th = this;
  286 + var url = e.currentTarget.dataset.url;
  287 + getApp().goto(url);
  288 + },
  289 + //图片失败,默认图片
  290 + bind_bnerr2: function (e) {
  291 + var _errImg = e.target.dataset.errorimg;
  292 + var _errObj = {};
  293 + _errObj[_errImg] = "/public/images/empty.jpg";
  294 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
266 295  
  296 + },
267 297 });
268 298 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.json
... ... @@ -3,6 +3,7 @@
3 3 "navigationStyle": "custom",
4 4 "usingComponents": {
5 5 "warn": "/components/long_warn/long_warn",
6   - "my_confirm": "/components/my_confirm/my_confirm"
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "qr_code": "/components/qr_code/qr_code"
7 8 }
8 9 }
9 10 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.wxml
1 1 <view class="box data-v-3a5b7e36">
2 2 <view class="box_top data-v-3a5b7e36">
3   - <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  3 + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="giftImage"></image>
4 4 </view>
5 5 <view class="box_title data-v-3a5b7e36">
6 6 <view class="top_title data-v-3a5b7e36">
... ... @@ -40,19 +40,19 @@
40 40 <view class="box_ware_box data-v-3a5b7e36">
41 41 <view class="box_ware_img data-v-3a5b7e36">
42 42 <block wx:if="{{item.lbType==1}}">
43   - <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  43 + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
44 44 </block>
45 45 <block wx:if="{{item.lbType==2}}">
46   - <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  46 + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
47 47 </block>
48 48 <block wx:if="{{item.lbType==3}}">
49   - <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  49 + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
50 50 </block>
51 51 <block wx:if="{{item.lbType==4}}">
52   - <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  52 + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
53 53 </block>
54 54 <block wx:if="{{item.lbType==5}}">
55   - <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  55 + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image>
56 56 </block>
57 57 </view>
58 58 <view class="box_ware_item data-v-3a5b7e36">
... ... @@ -67,16 +67,16 @@
67 67 </view>
68 68 <view class="box_ware_code data-v-3a5b7e36">
69 69 <block wx:if="{{isBuy==0&item.lbType==1}}">
70   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="__e" class="data-v-3a5b7e36"></image>
  70 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image>
71 71 </block>
72 72 <block wx:if="{{isBuy==0&item.lbType==2}}">
73   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image>
  73 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image>
74 74 </block>
75 75 <block wx:if="{{isBuy==0&item.lbType==3}}">
76   - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image>
  76 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image>
77 77 </block>
78 78 <block wx:if="{{isBuy==0&item.lbType>3}}">
79   - <text class="data-v-3a5b7e36">已自动到账</text>
  79 + <text class="data-v-3a5b7e36">奖励已发放</text>
80 80 </block>
81 81 </view>
82 82 </view>
... ... @@ -95,35 +95,37 @@
95 95 <block wx:if="{{isBuy==1}}">
96 96 <view class="foot_button data-v-3a5b7e36">
97 97 <block wx:if="{{giftPrice>0&&giftIntegral>0}}">
98   - <view class="foot_button_left data-v-3a5b7e36">
99   - <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text>
  98 + <view class="foot_button_left data-v-3a5b7e36" data-id="{{lbId}}" bindtap="GetBuyPrice">
  99 + <text class="data-v-3a5b7e36">立即购买</text>
100 100 </view>
101 101 </block>
102 102 <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
103   - <view class="foot_button_right data-v-3a5b7e36">
104   - <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text>
  103 + <view class="foot_button_right data-v-3a5b7e36" bindtap="GetBuyIntegral" data-id="{{lbId}}">
  104 + <text class="data-v-3a5b7e36">立即兑换</text>
105 105 </view>
106 106 </block>
107 107 <block wx:if="{{giftPrice>0 && giftIntegral<=0}}">
108   - <view class="foot_button_buy data-v-3a5b7e36">
109   - <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text>
  108 + <view class="foot_button_buy data-v-3a5b7e36" bindtap="GetBuyPrice" data-id="{{lbId}}">
  109 + <text class="data-v-3a5b7e36">立即购买</text>
110 110 </view>
111 111 </block>
112 112 <block wx:if="{{giftPrice<=0 && giftIntegral>0}}">
113   - <view class="foot_button_intalge data-v-3a5b7e36">
114   - <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text>
  113 + <view class="foot_button_intalge data-v-3a5b7e36" bindtap="GetBuyIntegral" data-id="{{lbId}}">
  114 + <text class="data-v-3a5b7e36">立即兑换</text>
115 115 </view>
116 116 </block>
117 117 </view>
118 118 </block>
119 119 <block wx:if="{{isBuy==0}}">
120 120 <view class="foot_button data-v-3a5b7e36">
121   - <view class="foot_button_buy data-v-3a5b7e36">
122   - <text bindtap="__e" class="data-v-3a5b7e36">立即使用</text>
  121 + <view class="foot_button_buy data-v-3a5b7e36" bindtap="getcode">
  122 + <text class="data-v-3a5b7e36">立即使用</text>
123 123 </view>
124 124 </view>
125 125 </block>
126 126 </view>
127 127 <!-- 引入提示组件 -->
128 128 <warn id="warn"></warn>
129   -<my_confirm id="my_confirm"></my_confirm>
130 129 \ No newline at end of file
  130 +<my_confirm id="my_confirm"></my_confirm>
  131 +<!-- 弹出框扫描 -->
  132 +<qr_code id="qc_com"></qr_code>
131 133 \ No newline at end of file
... ...
pages/giftpack/giftpacklist/giftpacklist.wxss
... ... @@ -18,7 +18,7 @@
18 18 margin: 10rpx 20rpx 20rpx 20rpx;
19 19 padding: 35rpx;
20 20 background-color: #FFFFFF;
21   - border-radius: 20rpx;
  21 + border-radius: 40rpx;
22 22 }
23 23 .top_title.data-v-3a5b7e36 {
24 24 font-size: 30rpx;
... ... @@ -57,7 +57,7 @@
57 57 margin: 10rpx 20rpx 20rpx 20rpx;
58 58 padding: 35rpx;
59 59 background-color: #FFFFFF;
60   - border-radius: 20rpx;
  60 + border-radius: 40rpx;
61 61 }
62 62 .box_ware_title.data-v-3a5b7e36 {
63 63 font-size: 35rpx;
... ... @@ -69,14 +69,16 @@
69 69 display: flex;
70 70 margin: 10rpx 0rpx 25rpx 0rpx;
71 71 }
72   -.box_ware_img.data-v-3a5b7e36 {
  72 +/* .box_ware_img.data-v-3a5b7e36 {
73 73 width: 30%;
74 74 height: 180rpx;
75 75 border: #999999 solid 1rpx;
76   -}
  76 +} */
77 77 .box_ware_img image.data-v-3a5b7e36 {
78   - width: 100%;
79   - height: 100%;
  78 + width: 185rpx;
  79 + height: 190rpx;
  80 + /* background-color: rgba(138, 138, 138, 0.63); */
  81 + border: 2rpx solid #999999;
80 82 }
81 83 .box_ware_item.data-v-3a5b7e36 {
82 84 width: 70%;
... ... @@ -126,7 +128,7 @@
126 128 margin: 10rpx 20rpx 50rpx 20rpx;
127 129 padding: 35rpx;
128 130 background-color: #FFFFFF;
129   - border-radius: 20rpx;
  131 + border-radius: 40rpx;
130 132 }
131 133 .foot_box_title.data-v-3a5b7e36 {
132 134 font-size: 35rpx;
... ... @@ -162,7 +164,7 @@
162 164 height: 70rpx;
163 165 font-size: 28rpx;
164 166 line-height: 70rpx;
165   - border-radius: 30rpx 0rpx 0rpx 30rpx;
  167 + border-radius: 40rpx;
166 168 }
167 169 .foot_button_right.data-v-3a5b7e36 {
168 170 background: #ffbb42;
... ... @@ -171,7 +173,7 @@
171 173 height: 70rpx;
172 174 font-size: 28rpx;
173 175 line-height: 70rpx;
174   - border-radius: 0rpx 30rpx 30rpx 0rpx;
  176 + border-radius: 40rpx;
175 177 }
176 178 .foot_button_buy.data-v-3a5b7e36 {
177 179 background: #e4010c;
... ... @@ -180,7 +182,7 @@
180 182 height: 70rpx;
181 183 font-size: 28rpx;
182 184 line-height: 70rpx;
183   - border-radius: 30rpx 30rpx 30rpx 30rpx;
  185 + border-radius: 40rpx;
184 186 }
185 187 .foot_button_intalge.data-v-3a5b7e36 {
186 188 background: #ffbb42;
... ... @@ -189,7 +191,7 @@
189 191 height: 70rpx;
190 192 font-size: 28rpx;
191 193 line-height: 70rpx;
192   - border-radius: 30rpx 30rpx 30rpx 30rpx;
  194 + border-radius: 40rpx;
193 195 }
194 196 page.data-v-3a5b7e36 {
195 197 background-color: #e85f93;
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -11,8 +11,8 @@ Page({
11 11 getStorageID: '',
12 12 getUserID: '',
13 13 wareCard: [],
14   - pages: 0,
15   - pageSize: 10,
  14 + // pages: 0,
  15 + // pageSize: 10,
16 16 isEmpty: false,
17 17 loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
18 18 contentText: {
... ... @@ -23,7 +23,7 @@ Page({
23 23 ismore:0,//数据是否全部加载完成
24 24 is_read:0,//是否查询过我的礼包接口
25 25 curpage: 1, //当前分页数
26   - pageSize: 3, //页大小
  26 + pageSize: 10, //页大小
27 27 total: 0, //总数量
28 28 },
29 29  
... ... @@ -34,8 +34,6 @@ Page({
34 34 th.setData({
35 35 getStorageID: a.stoid,
36 36 getUserID: d.user_id,
37   - pages: 1,
38   - pageSize: 3,
39 37 loadingType: 0,
40 38 getDate: i.formatTime(new Date().getTime())
41 39 })
... ... @@ -169,9 +167,7 @@ Page({
169 167 navigateTo: function (e) {
170 168 var th = this;
171 169 var url = e.currentTarget.dataset.url;
172   - wx.navigateTo({
173   - url: url,
174   - })
  170 + getApp().goto(url);
175 171 },
176 172 //下拉事件
177 173 onReachBottom: function () {
... ... @@ -183,5 +179,13 @@ Page({
183 179 })
184 180 th.getList();
185 181 },
  182 + //图片失败,默认图片
  183 + bind_bnerr2: function (e) {
  184 + var _errImg = e.target.dataset.errorimg;
  185 + var _errObj = {};
  186 + _errObj[_errImg] = "/public/images/empty.jpg";
  187 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  188 +
  189 + },
186 190  
187 191 });
188 192 \ No newline at end of file
... ...
pages/giftpack/mygiftpack/mygiftpack.wxml
... ... @@ -17,7 +17,7 @@
17 17 <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}">
18 18 <view class="content_box_img">
19 19 <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
20   - <image src="{{iurl+item.lbUrl}}" lazy-load="true"></image>
  20 + <image src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
21 21 <block wx:if="{{item.actType!=0}}">
22 22 <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}">
23 23 <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image>
... ... @@ -42,7 +42,7 @@
42 42 </view>
43 43 <view class="content_box_title">
44 44 <view class="content_ware_title">
45   - <text bindtap="__e">{{item.giftTitle}}</text>
  45 + <text>{{item.giftTitle}}</text>
46 46 </view>
47 47 <view class="content_ware_type">
48 48 <block wx:if="{{item.actType==0&item.payMoney>0}}">
... ... @@ -94,14 +94,11 @@
94 94 <text>当前暂无礼包</text>
95 95 </view>
96 96 <view class="foot_empty_button">
97   - <text bindtap="__e">去获取</text>
  97 + <text bindtap="navigateTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">去获取</text>
98 98 </view>
99 99 </view>
100 100 </block>
101 101 <block wx:if="{{ismore}}">
102   - <!-- <view class="foot_box">
103   - <text>———— 到底了 ————</text>
104   - </view> -->
105 102 <!-- 加载完毕并且数据大于=页大小 -->
106 103 <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}">
107 104 <view class="Line"></view>
... ...
pages/giftpack/mygiftpack/mygiftpack.wxss
... ... @@ -236,7 +236,7 @@
236 236 }
237 237  
238 238 page {
239   - background-color: #fb7454;
  239 + background-color: rgb(250, 120, 88);
240 240 }
241 241 .After_all {
242 242 height: 80rpx;
... ...
pages/giftpack/payment/payment.js 0 → 100644
  1 +var e = getApp();
  2 +var regeneratorRuntime = require('../../../utils/runtime.js');
  3 +Page({
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + url: e.globalData.setting.imghost,
  9 + resourceUrl: e.globalData.setting.resourceUrl,
  10 + iurl: e.globalData.setting.imghost,
  11 + order: null,
  12 + type: 1,
  13 + allmoney: 0,
  14 + user_money: 0,
  15 + order_sn: "",
  16 + pick: null,
  17 + },
  18 +
  19 + /**
  20 + * 生命周期函数--监听页面加载
  21 + */
  22 + onLoad: async function (options) {
  23 + wx.setNavigationBarTitle({
  24 + title: '支付成功',
  25 + });
  26 +
  27 + var type = options.type, order_sn = options.order_sn;
  28 + var th = this, order = null;
  29 + //如果是等1,就是单个订单的订单号
  30 + if (type == 1) {
  31 + await getApp().request.promiseGet("/api/weshop/order/page",
  32 + { data: { store_id: e.globalData.setting.stoid, order_sn: order_sn } }).then(res => {
  33 + order = res.data.data.pageData[0];
  34 + th.setData({ order: order, order_sn: order_sn })
  35 + })
  36 + } else {
  37 + await getApp().request.promiseGet("/api/weshop/order/page",
  38 + { data: { store_id: e.globalData.setting.stoid, parent_sn: order_sn } }).then(res => {
  39 +
  40 + var allmoney = 0, user_money = 0;
  41 + for (var i in res.data.data.pageData) {
  42 + var item = res.data.data.pageData[i];
  43 + allmoney += item.order_amount;
  44 + user_money += item.user_money ? item.user_money : 0;
  45 + }
  46 + order = res.data.data.pageData[0];
  47 + th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money })
  48 + })
  49 + }
  50 + //--获取门店--
  51 + if (order.exp_type == 1) {
  52 + await getApp().request.promiseGet("/api/weshop/pickup/get/" + e.globalData.setting.stoid + "/" + order.pickup_id,
  53 + { 1: 1 }).then(res => {
  54 + th.setData({ pick: res.data.data })
  55 + });
  56 + }
  57 + },
  58 +
  59 + goto: function () {
  60 + var url = '/pages/index/index/index';
  61 + getApp().goto(url)
  62 + },
  63 +})
0 64 \ No newline at end of file
... ...
pages/giftpack/payment/payment.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "支付成功",
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
pages/giftpack/payment/payment.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  2 +<view>
  3 + <!-- 支付成功提示 -->
  4 + <view class="payradio">
  5 + <!-- 提示框 -->
  6 + <view class="Success_box flex-center">
  7 + <view>
  8 + <view class="flex-center">
  9 + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image>
  10 + </view>
  11 + <view class="Success_box_title fs32">订单支付成功!</view>
  12 + </view>
  13 + </view>
  14 +
  15 + <!-- 支付信息 -->
  16 + <view class="payitem_max fs28">
  17 + <!-- 订单编号 -->
  18 + <view class="payitem flex">
  19 + <view>订单编号 :</view>
  20 + <text selectable="true">{{order_sn}}</text>
  21 + </view>
  22 +
  23 + <!-- 实付金额 -->
  24 +
  25 + <view class="payitem flex">
  26 + <view>实付金额 :</view>
  27 + <!-- {{filters.toFix()}} -->
  28 + <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view>
  29 + <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view>
  30 + </view>
  31 +
  32 + <!-- 支付方式 -->
  33 + <view class="payitem flex" wx:if="type==1">
  34 + <view>支付方式 :</view>
  35 + <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view>
  36 + <view wx:elif="{{order.order_amount>0}}">微信支付</view>
  37 + <view wx:elif="{{order.user_money>0}}">余额支付</view>
  38 + <view wx:else>免单</view>
  39 + </view>
  40 + <view class="payitem flex" wx:else>
  41 + <view>支付方式 :</view>
  42 + <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view>
  43 + <view wx:elif="{{allmoney>0}}">微信支付</view>
  44 + <view wx:elif="{{user_money>0}}">余额支付</view>
  45 + <view wx:else>免单</view>
  46 + </view>
  47 +
  48 +
  49 +
  50 + </view>
  51 + </view>
  52 + <view class="flex-level">
  53 + <view class="line"></view>
  54 + </view>
  55 +
  56 + <!-- 跳转链接 -->
  57 + <view>
  58 +
  59 + <!-- 链接 -->
  60 + <view class="fs32">
  61 + <view class="flex-center">
  62 + <navigator class="pay_order flex-center" url="/pages/giftpack/mygiftpack/mygiftpack">
  63 + <view>我的礼包</view>
  64 + </navigator>
  65 + </view>
  66 + <view class="flex-center">
  67 + <navigator class="pay_home flex-center" bindtap="goto">
  68 + <view>回到首页</view>
  69 + </navigator>
  70 + </view>
  71 + </view>
  72 + </view>
  73 +</view>
0 74 \ No newline at end of file
... ...
pages/giftpack/payment/payment.wxss 0 → 100644
  1 +page {
  2 + border-top: 2rpx solid rgb(245, 245, 245);
  3 +}
  4 +.line {
  5 + border-top: 2rpx solid rgb(245, 245, 245);
  6 + width: 700rpx;
  7 +}
  8 +
  9 +.payradio .Success_box {
  10 + padding-top: 45rpx;
  11 + padding-bottom: 45rpx;
  12 +}
  13 +
  14 +.payradio .Success_box .Success_box_title {
  15 + margin-top: 45rpx;
  16 + color: rgb(8, 8, 8);
  17 +}
  18 +
  19 +.payradio image {
  20 + width: 140rpx;
  21 + height: 140rpx;
  22 + display: flex;
  23 +}
  24 +
  25 +.payitem_max {
  26 + padding: 0rpx 55rpx;
  27 + color: rgb(104, 104, 104);
  28 + padding-bottom: 30rpx;
  29 +}
  30 +
  31 +.payitem_max .payitem {
  32 + margin-top: 30rpx;
  33 +}
  34 +
  35 +.payitem_max .payitem .pay_nam {
  36 + width: 200rpx;
  37 +}
  38 +
  39 +.payitem_max .payitem view {
  40 + margin-right: 50rpx;
  41 +}
  42 +.pay_money{
  43 + color: rgb(219, 27, 52);
  44 +}
  45 +
  46 +.pay_User {
  47 + padding-left: 55rpx;
  48 + color: rgb(104, 104, 104);
  49 +}
  50 +
  51 +.pay_User .payitem {
  52 + margin-top: 30rpx;
  53 +}
  54 +
  55 +.pay_User .payitem .pay_Receiving {
  56 + width: 128rpx;
  57 + margin-right: 50rpx;
  58 +}
  59 +
  60 +.pay_User .payitem .pay_name {
  61 + margin-right: 38rpx;
  62 + max-width: 250rpx;
  63 +}
  64 +
  65 +.pay_order {
  66 + margin-top: 115rpx;
  67 + color: rgb(104, 104, 104);
  68 + width: 560rpx;
  69 + height: 62rpx;
  70 + border-radius: 30rpx;
  71 + border: 3rpx solid rgb(209, 209, 209);
  72 +}
  73 +
  74 +.pay_home {
  75 + margin-top: 35rpx;
  76 + color: rgb(255, 255, 255);
  77 + width: 566rpx;
  78 + height: 68rpx;
  79 + border-radius: 30rpx;
  80 + background-color: rgb(219, 27, 52);
  81 +}
  82 +.address{
  83 + width: 470rpx;
  84 +}
0 85 \ No newline at end of file
... ...
pages/user/index/index.js
... ... @@ -31,17 +31,15 @@ Page({
31 31 full_cz_val:0,
32 32 is_dengji:0, //是不是等级
33 33 },
34   - goto_service: function () {
  34 + goto_nav: function (e) {
35 35 var th = this;
  36 + var url = e.currentTarget.dataset.url;
36 37 if (th.data.userInfo != null) {
37   - var url = "/pages/user/my_service/i_service";
38 38 getApp().goto(url);
39 39 } else {
40   - if(th.data.is_nav){
41 40 wx.navigateTo({
42 41 url: '/pages/getphone/getphone',
43 42 })
44   - }
45 43 }
46 44 },
47 45 /**
... ...
pages/user/index/index.wxml
... ... @@ -212,12 +212,12 @@
212 212 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image>
213 213 <view class="four-level-word">我的地址</view>
214 214 </view>
215   - <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" >
  215 + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_nav" >
216 216 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
217 217 <view class="four-level-word">我的服务</view>
218 218 </view>
219   - <view class="item t-c" data-url="/pages/giftpack/mygiftpack/mygiftpack" bindtap="goto">
220   - <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
  219 + <view class="item t-c" data-url="/pages/giftpack/mygiftpack/mygiftpack" bindtap="goto_nav">
  220 + <image class="xc-center-img " src="{{iurl}}/miniapp/images/user/wdlb.png"></image>
221 221 <view class="four-level-word">我的礼包</view>
222 222 </view>
223 223 </view>
... ...