diff --git a/app.json b/app.json index 2b76d1a..6b77afa 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,10 @@ { - "pages": [ + "pages": [ "pages/index/index/index", + "pages/giftpack/payment/payment", + "pages/giftpack/buygiftpack/giftpackbuy", + "pages/giftpack/giftpacklist/giftpacklist", + "pages/giftpack/mygiftpack/mygiftpack", "pages/goods/categoryList/categoryList", "pages/cart/cart/cart", "pages/cart/cart2/cart2", @@ -77,7 +81,6 @@ "pages/user/my_service/tment_eval", "pages/user/my_service/tment_order_list", "pages/user/my_service/beauty_deta", - "pages/user/labels/labels" ], "permission": { diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index 5bd9134..04b637b 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -11,8 +11,8 @@ Page({ getStorageID: '', getUserID: '', wareCard: [], - page: 0, - pageSize: 10, + // page: 0, + // pageSize: 10, isEmpty: false, loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore contentText: { @@ -23,7 +23,7 @@ Page({ ismore: 0, //数据是否全部加载完成 is_read: 0, //是否查询过我的礼包接口 curpage: 1, //当前分页数 - pageSize: 3, //页大小 + pageSize: 10, //页大小 total: 0, //总数量 }, onLoad: function(options) { @@ -51,6 +51,7 @@ Page({ var th = this; var id = e.currentTarget.dataset.id; //活动id var my_confirm = th.selectComponent("#my_confirm"); //组件的id + var order_sn = e.currentTarget.dataset.order_sn;//订单号 my_confirm.open( "是否确定购买该礼包", "取消", @@ -81,17 +82,17 @@ Page({ success: function(res) { if (res.data.code == 0) { res = res.data.data; + var url = "/pages/giftpack/payment/payment?type=" + 1 + "order_sn=" + order_sn; wx.requestPayment({ timeStamp: String(res.timeStamp), nonceStr: res.nonceStr, package: res.packageValue, signType: res.signType, paySign: res.paySign, - success: function(n) { - + success: function(res) { + getApp().goto(url); }, - fail: function(n) { - + fail: function(res) { } }); } else { @@ -196,9 +197,7 @@ Page({ navigateTo: function(e) { var th = this; var url = e.currentTarget.dataset.url; - wx.navigateTo({ - url: url, - }) + getApp().goto(url); }, //下拉事件 onReachBottom: function() { @@ -210,5 +209,16 @@ Page({ }) th.getList(); }, - + //图片失败,默认图片 + bind_bnerr2: function(e) { + var _errImg = e.target.dataset.errorimg; + var _errObj = {}; + _errObj[_errImg] = "/public/images/empty.jpg"; + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; + }, + goto: function(e) { + var th = this; + var url = e.currentTarget.dataset.url; + getApp().goto(url); + } }) \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.json b/pages/giftpack/buygiftpack/giftpackbuy.json index f5d4df2..b7705d4 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.json +++ b/pages/giftpack/buygiftpack/giftpackbuy.json @@ -1,6 +1,5 @@ { "navigationBarTitleText": "礼包列表", - "navigationStyle": "custom", "enablePullDownRefresh": false, "usingComponents": { "warn": "/components/long_warn/long_warn", diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml index 53c9c16..f2b7f28 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxml +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -1,6 +1,6 @@ - + @@ -13,13 +13,13 @@ - + - + - {{items.giftTitle}} + {{items.giftTitle}} @@ -48,15 +48,29 @@ {{"已售:"+items.giftQty+"件"}} - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + @@ -71,7 +85,7 @@ 当前暂无礼包 - 去获取 + 回到首页 diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxss b/pages/giftpack/buygiftpack/giftpackbuy.wxss index a43b773..4d2fbe9 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.wxss +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxss @@ -150,16 +150,12 @@ page { line-height: 110rpx; } -.box_button_remark { - -} - .box_button_remark text { font-size: 28rpx; color: #b9b5b5; } -.box_button_buy button { +.box_button_dui { display: inline-block; width: 160rpx; height: 50rpx; @@ -167,17 +163,14 @@ page { background: #fff; color: #000; line-height: 50rpx; + margin-left: 20rpx; + border-radius: 10rpx; } -.box_button_dui button { - display: inline-block; - width: 160rpx; - height: 50rpx; - font-size: 20rpx; +.box_button_buy { background: #d41c34; color: #fff; - line-height: 50rpx; - margin-left: 20rpx; + border-radius: 10rpx; } .foot_box { diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index bfd99dd..61a8f5c 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -22,7 +22,8 @@ Page({ getUrl: '', wareCard: [], orderSn: "", //订单编号 - lbId:"" + lbId: "", + code: "", //核销码 }, onLoad: function(options) { var th = this; @@ -43,17 +44,9 @@ Page({ }) }, onShow: function() { - // var th = this; - // if (th.data.isBuy == 0) { - // th.GetMyGiftList(); - // } else { - // th.GetBuyGiftList(); - // } - // th.setData({ - // giftRemark: th.data.giftRemark.replace(/

- + @@ -40,19 +40,19 @@ - + - + - + - + - + @@ -67,16 +67,16 @@ - + - + - + - 已自动到账 + 奖励已发放 @@ -95,35 +95,37 @@ - - 立即购买 + + 立即购买 - - 立即兑换 + + 立即兑换 - - 立即购买 + + 立即购买 - - 立即兑换 + + 立即兑换 - - 立即使用 + + 立即使用 - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss index 1f5ccb2..877fea4 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.wxss +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -18,7 +18,7 @@ margin: 10rpx 20rpx 20rpx 20rpx; padding: 35rpx; background-color: #FFFFFF; - border-radius: 20rpx; + border-radius: 40rpx; } .top_title.data-v-3a5b7e36 { font-size: 30rpx; @@ -57,7 +57,7 @@ margin: 10rpx 20rpx 20rpx 20rpx; padding: 35rpx; background-color: #FFFFFF; - border-radius: 20rpx; + border-radius: 40rpx; } .box_ware_title.data-v-3a5b7e36 { font-size: 35rpx; @@ -69,14 +69,16 @@ display: flex; margin: 10rpx 0rpx 25rpx 0rpx; } -.box_ware_img.data-v-3a5b7e36 { +/* .box_ware_img.data-v-3a5b7e36 { width: 30%; height: 180rpx; border: #999999 solid 1rpx; -} +} */ .box_ware_img image.data-v-3a5b7e36 { - width: 100%; - height: 100%; + width: 185rpx; + height: 190rpx; + /* background-color: rgba(138, 138, 138, 0.63); */ + border: 2rpx solid #999999; } .box_ware_item.data-v-3a5b7e36 { width: 70%; @@ -126,7 +128,7 @@ margin: 10rpx 20rpx 50rpx 20rpx; padding: 35rpx; background-color: #FFFFFF; - border-radius: 20rpx; + border-radius: 40rpx; } .foot_box_title.data-v-3a5b7e36 { font-size: 35rpx; @@ -162,7 +164,7 @@ height: 70rpx; font-size: 28rpx; line-height: 70rpx; - border-radius: 30rpx 0rpx 0rpx 30rpx; + border-radius: 40rpx; } .foot_button_right.data-v-3a5b7e36 { background: #ffbb42; @@ -171,7 +173,7 @@ height: 70rpx; font-size: 28rpx; line-height: 70rpx; - border-radius: 0rpx 30rpx 30rpx 0rpx; + border-radius: 40rpx; } .foot_button_buy.data-v-3a5b7e36 { background: #e4010c; @@ -180,7 +182,7 @@ height: 70rpx; font-size: 28rpx; line-height: 70rpx; - border-radius: 30rpx 30rpx 30rpx 30rpx; + border-radius: 40rpx; } .foot_button_intalge.data-v-3a5b7e36 { background: #ffbb42; @@ -189,7 +191,7 @@ height: 70rpx; font-size: 28rpx; line-height: 70rpx; - border-radius: 30rpx 30rpx 30rpx 30rpx; + border-radius: 40rpx; } page.data-v-3a5b7e36 { background-color: #e85f93; diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js index 35c810b..e1c5ca3 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.js +++ b/pages/giftpack/mygiftpack/mygiftpack.js @@ -11,8 +11,8 @@ Page({ getStorageID: '', getUserID: '', wareCard: [], - pages: 0, - pageSize: 10, + // pages: 0, + // pageSize: 10, isEmpty: false, loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore contentText: { @@ -23,7 +23,7 @@ Page({ ismore:0,//数据是否全部加载完成 is_read:0,//是否查询过我的礼包接口 curpage: 1, //当前分页数 - pageSize: 3, //页大小 + pageSize: 10, //页大小 total: 0, //总数量 }, @@ -34,8 +34,6 @@ Page({ th.setData({ getStorageID: a.stoid, getUserID: d.user_id, - pages: 1, - pageSize: 3, loadingType: 0, getDate: i.formatTime(new Date().getTime()) }) @@ -169,9 +167,7 @@ Page({ navigateTo: function (e) { var th = this; var url = e.currentTarget.dataset.url; - wx.navigateTo({ - url: url, - }) + getApp().goto(url); }, //下拉事件 onReachBottom: function () { @@ -183,5 +179,13 @@ Page({ }) th.getList(); }, + //图片失败,默认图片 + bind_bnerr2: function (e) { + var _errImg = e.target.dataset.errorimg; + var _errObj = {}; + _errObj[_errImg] = "/public/images/empty.jpg"; + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; + + }, }); \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml index ecd8de2..108cb2f 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.wxml +++ b/pages/giftpack/mygiftpack/mygiftpack.wxml @@ -17,7 +17,7 @@ - + @@ -42,7 +42,7 @@ - {{item.giftTitle}} + {{item.giftTitle}} @@ -94,14 +94,11 @@ 当前暂无礼包 - 去获取 + 去获取 - diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxss b/pages/giftpack/mygiftpack/mygiftpack.wxss index f723b7b..912a2bb 100644 --- a/pages/giftpack/mygiftpack/mygiftpack.wxss +++ b/pages/giftpack/mygiftpack/mygiftpack.wxss @@ -236,7 +236,7 @@ } page { - background-color: #fb7454; + background-color: rgb(250, 120, 88); } .After_all { height: 80rpx; diff --git a/pages/giftpack/payment/payment.js b/pages/giftpack/payment/payment.js new file mode 100644 index 0000000..8070790 --- /dev/null +++ b/pages/giftpack/payment/payment.js @@ -0,0 +1,63 @@ +var e = getApp(); +var regeneratorRuntime = require('../../../utils/runtime.js'); +Page({ + /** + * 页面的初始数据 + */ + data: { + url: e.globalData.setting.imghost, + resourceUrl: e.globalData.setting.resourceUrl, + iurl: e.globalData.setting.imghost, + order: null, + type: 1, + allmoney: 0, + user_money: 0, + order_sn: "", + pick: null, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: async function (options) { + wx.setNavigationBarTitle({ + title: '支付成功', + }); + + var type = options.type, order_sn = options.order_sn; + var th = this, order = null; + //如果是等1,就是单个订单的订单号 + if (type == 1) { + await getApp().request.promiseGet("/api/weshop/order/page", + { data: { store_id: e.globalData.setting.stoid, order_sn: order_sn } }).then(res => { + order = res.data.data.pageData[0]; + th.setData({ order: order, order_sn: order_sn }) + }) + } else { + await getApp().request.promiseGet("/api/weshop/order/page", + { data: { store_id: e.globalData.setting.stoid, parent_sn: order_sn } }).then(res => { + + var allmoney = 0, user_money = 0; + for (var i in res.data.data.pageData) { + var item = res.data.data.pageData[i]; + allmoney += item.order_amount; + user_money += item.user_money ? item.user_money : 0; + } + order = res.data.data.pageData[0]; + th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money }) + }) + } + //--获取门店-- + if (order.exp_type == 1) { + await getApp().request.promiseGet("/api/weshop/pickup/get/" + e.globalData.setting.stoid + "/" + order.pickup_id, + { 1: 1 }).then(res => { + th.setData({ pick: res.data.data }) + }); + } + }, + + goto: function () { + var url = '/pages/index/index/index'; + getApp().goto(url) + }, +}) \ No newline at end of file diff --git a/pages/giftpack/payment/payment.json b/pages/giftpack/payment/payment.json new file mode 100644 index 0000000..1111654 --- /dev/null +++ b/pages/giftpack/payment/payment.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "支付成功", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/giftpack/payment/payment.wxml b/pages/giftpack/payment/payment.wxml new file mode 100644 index 0000000..7bd36f4 --- /dev/null +++ b/pages/giftpack/payment/payment.wxml @@ -0,0 +1,73 @@ + + + + + + + + + + + 订单支付成功! + + + + + + + + 订单编号 : + {{order_sn}} + + + + + + 实付金额 : + + {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元 + {{filters.toFix(allmoney+user_money,2) }}元 + + + + + 支付方式 : + 微信支付,余额支付 + 微信支付 + 余额支付 + 免单 + + + 支付方式 : + 微信支付,余额支付 + 微信支付 + 余额支付 + 免单 + + + + + + + + + + + + + + + + + + 我的礼包 + + + + + 回到首页 + + + + + \ No newline at end of file diff --git a/pages/giftpack/payment/payment.wxss b/pages/giftpack/payment/payment.wxss new file mode 100644 index 0000000..f69e931 --- /dev/null +++ b/pages/giftpack/payment/payment.wxss @@ -0,0 +1,84 @@ +page { + border-top: 2rpx solid rgb(245, 245, 245); +} +.line { + border-top: 2rpx solid rgb(245, 245, 245); + width: 700rpx; +} + +.payradio .Success_box { + padding-top: 45rpx; + padding-bottom: 45rpx; +} + +.payradio .Success_box .Success_box_title { + margin-top: 45rpx; + color: rgb(8, 8, 8); +} + +.payradio image { + width: 140rpx; + height: 140rpx; + display: flex; +} + +.payitem_max { + padding: 0rpx 55rpx; + color: rgb(104, 104, 104); + padding-bottom: 30rpx; +} + +.payitem_max .payitem { + margin-top: 30rpx; +} + +.payitem_max .payitem .pay_nam { + width: 200rpx; +} + +.payitem_max .payitem view { + margin-right: 50rpx; +} +.pay_money{ + color: rgb(219, 27, 52); +} + +.pay_User { + padding-left: 55rpx; + color: rgb(104, 104, 104); +} + +.pay_User .payitem { + margin-top: 30rpx; +} + +.pay_User .payitem .pay_Receiving { + width: 128rpx; + margin-right: 50rpx; +} + +.pay_User .payitem .pay_name { + margin-right: 38rpx; + max-width: 250rpx; +} + +.pay_order { + margin-top: 115rpx; + color: rgb(104, 104, 104); + width: 560rpx; + height: 62rpx; + border-radius: 30rpx; + border: 3rpx solid rgb(209, 209, 209); +} + +.pay_home { + margin-top: 35rpx; + color: rgb(255, 255, 255); + width: 566rpx; + height: 68rpx; + border-radius: 30rpx; + background-color: rgb(219, 27, 52); +} +.address{ + width: 470rpx; +} \ No newline at end of file diff --git a/pages/user/index/index.js b/pages/user/index/index.js index 9fb079f..700f628 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -31,17 +31,15 @@ Page({ full_cz_val:0, is_dengji:0, //是不是等级 }, - goto_service: function () { + goto_nav: function (e) { var th = this; + var url = e.currentTarget.dataset.url; if (th.data.userInfo != null) { - var url = "/pages/user/my_service/i_service"; getApp().goto(url); } else { - if(th.data.is_nav){ wx.navigateTo({ url: '/pages/getphone/getphone', }) - } } }, /** diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 75e50a1..0075a46 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -212,12 +212,12 @@ 我的地址 - + 我的服务 - - + + 我的礼包