From 454b6963a4b697d58bb813da9860df5d631f2ce4 Mon Sep 17 00:00:00 2001 From: zhangjing Date: Thu, 27 Jul 2023 13:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E6=BB=B4=E5=85=91=E6=8D=A2=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/interfaces/recruit.js | 42 +++- app.json | 5 +- pages/recruit/exchange/exchange.js | 28 ++- pages/recruit/exchange/exchange.wxml | 11 +- pages/recruit/exchange/exchange.wxss | 22 ++ pages/recruit/refertoEdit/refertoEdit.wxml | 3 +- pages/recruit/signWrite/signWrite.js | 6 +- pages/recruit/signWrite/signWrite.wxml | 2 +- pages/recruit/signWrite/signWrite.wxss | 15 ++ pages/water/details/details.js | 98 +++++++++ pages/water/details/details.json | 4 + pages/water/details/details.wxml | 77 +++++++ pages/water/details/details.wxss | 235 +++++++++++++++++++++ pages/water/index.json | 3 +- pages/water/index.wxml | 15 +- pages/water/index.wxss | 9 +- pages/water/logistic/logistic.js | 40 ++++ pages/water/logistic/logistic.json | 4 + pages/water/logistic/logistic.wxml | 44 ++++ pages/water/logistic/logistic.wxss | 141 +++++++++++++ pages/water/waterOrder/waterOrder.js | 115 ++++++++++ pages/water/waterOrder/waterOrder.json | 4 + pages/water/waterOrder/waterOrder.wxml | 55 +++++ pages/water/waterOrder/waterOrder.wxss | 176 +++++++++++++++ project.private.config.json | 2 +- static/icons/address-icon.png | Bin 0 -> 1955 bytes 26 files changed, 1126 insertions(+), 30 deletions(-) create mode 100644 pages/water/details/details.js create mode 100644 pages/water/details/details.json create mode 100644 pages/water/details/details.wxml create mode 100644 pages/water/details/details.wxss create mode 100644 pages/water/logistic/logistic.js create mode 100644 pages/water/logistic/logistic.json create mode 100644 pages/water/logistic/logistic.wxml create mode 100644 pages/water/logistic/logistic.wxss create mode 100644 pages/water/waterOrder/waterOrder.js create mode 100644 pages/water/waterOrder/waterOrder.json create mode 100644 pages/water/waterOrder/waterOrder.wxml create mode 100644 pages/water/waterOrder/waterOrder.wxss create mode 100644 static/icons/address-icon.png diff --git a/api/interfaces/recruit.js b/api/interfaces/recruit.js index ec59ba1..d8a68bb 100644 --- a/api/interfaces/recruit.js +++ b/api/interfaces/recruit.js @@ -103,13 +103,14 @@ const kuaiDi = (experience_id) => req({ }) //水滴兑换商品前置 -const exchangesCreate = () => req({ - url : "experiences/exchanges/create" +const exchangesCreate = (data) => req({ + url : "experiences/exchanges/create", + data: data }) //水滴兑换商品展示 const exchangesShow = () => req({ - url : "experiences/exchanges/show" + url : "experiences/exchanges/show/goods" }) //水滴兑换商品提交 @@ -119,6 +120,34 @@ const exchangesPost = (data) => req({ data: data }) +//水滴兑换tab状态栏 +const tabList = () => req({ + url : "experiences/exchanges/status" +}) + +//水滴兑换列表 +const orderList = (data) => req({ + url : "experiences/exchanges", + data: data +}) + +//水滴兑换列表 +const orderDet = (exchange_id) => req({ + url : "experiences/exchanges/" + exchange_id + "/show" +}) + +//水滴兑换商品提交 +const orderSign = (exchange_id) => req({ + url : "experiences/exchanges/" + exchange_id + "/sign", + method: "POST" +}) + +// 水滴兑换商品快递100 +const orderDi = (exchange_id) => req({ + url : "experiences/exchanges/" + exchange_id + "/track" +}) + + export default ({ index, Enroll, @@ -138,5 +167,10 @@ export default ({ kuaiDi, exchangesCreate, exchangesShow, - exchangesPost + exchangesPost, + tabList, + orderList, + orderDet, + orderSign, + orderDi }) \ No newline at end of file diff --git a/app.json b/app.json index abf5e99..55e3f5a 100644 --- a/app.json +++ b/app.json @@ -39,7 +39,10 @@ "pages/recruit/expressTrack/expressTrack", "pages/recruit/unveil/unveil", "pages/recruit/refertoEdit/refertoEdit", - "pages/recruit/exchange/exchange" + "pages/recruit/exchange/exchange", + "pages/water/waterOrder/waterOrder", + "pages/water/details/details", + "pages/water/logistic/logistic" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/recruit/exchange/exchange.js b/pages/recruit/exchange/exchange.js index ffd34e0..ab6467a 100644 --- a/pages/recruit/exchange/exchange.js +++ b/pages/recruit/exchange/exchange.js @@ -19,21 +19,21 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad(options) {}, + onLoad() {}, onShow() { // 水滴兑换商品前置 this.createInfo(); // 水滴兑换商品展示 - // this.ShowInfo(); - }, + this.ShowInfo(); + }, /** * 水滴兑换商品前置 */ createInfo (){ - wx.$api.recruit.exchangesCreate().then(res => { + wx.$api.recruit.exchangesCreate({address_id: this.data.addressId,}).then(res => { this.setData({ address : res.data.address, addressId : res.data.address.address_id @@ -56,11 +56,21 @@ Page({ * 水滴兑换提交 */ createGo (){ - wx.$api.recruit.exchangesPost({address_id: this.data.addressId}).then(res => { - this.setData({ - exchangesHide: true - }) - }).catch(err => { }) + wx.showModal({ + title : '兑换提示', + content : '尊敬的用户,是否确认兑换此商品', + cancelText: '暂不兑换', + confirmText: '确认兑换', + success : res=> { + if (res.confirm) { + wx.$api.recruit.exchangesPost({address_id: this.data.addressId}).then(res => { + this.setData({ + exchangesHide: true + }) + }).catch(err => { }) + } + } + }) }, // 返回上一页 diff --git a/pages/recruit/exchange/exchange.wxml b/pages/recruit/exchange/exchange.wxml index f11a534..a2a4b39 100644 --- a/pages/recruit/exchange/exchange.wxml +++ b/pages/recruit/exchange/exchange.wxml @@ -12,15 +12,15 @@ - + - 水感应喷雾 + {{dataShow.name}} - ¥129/瓶 + ¥{{dataShow.price.vip}}/瓶 @@ -32,7 +32,7 @@ - + @@ -45,7 +45,8 @@ - 新增收货地址 + + + 新增收货地址 > diff --git a/pages/recruit/exchange/exchange.wxss b/pages/recruit/exchange/exchange.wxss index b997c54..8f71945 100644 --- a/pages/recruit/exchange/exchange.wxss +++ b/pages/recruit/exchange/exchange.wxss @@ -282,4 +282,26 @@ width: 68rpx; display: block; margin: 0 auto; +} + +.address-add { + width: 100%; + text-align: center; + padding: 30rpx 30rpx 0; + box-sizing: border-box; +} + +.address-icon { + width: 82rpx; + margin: 0 auto; + display: block; +} + +.address-go { + display: inline-block; + font-size: 32rpx; + line-height: 68rpx; + border-radius: 10rpx; + color: #ffffff; + padding-bottom: 20rpx; } \ No newline at end of file diff --git a/pages/recruit/refertoEdit/refertoEdit.wxml b/pages/recruit/refertoEdit/refertoEdit.wxml index 3cf6a59..f85248a 100644 --- a/pages/recruit/refertoEdit/refertoEdit.wxml +++ b/pages/recruit/refertoEdit/refertoEdit.wxml @@ -46,7 +46,8 @@ --> - + + diff --git a/pages/recruit/signWrite/signWrite.js b/pages/recruit/signWrite/signWrite.js index adaa930..869fd0a 100644 --- a/pages/recruit/signWrite/signWrite.js +++ b/pages/recruit/signWrite/signWrite.js @@ -16,7 +16,8 @@ Page({ bidData : '', //产品建议 refertoStatus: false,//打卡成功弹出 signDayNumber: '', //累计打卡天数-最新 - signWaterNumber: ' '//累计打卡水滴 + signWaterNumber: '',//累计打卡水滴 + disabled : false }, /** @@ -125,6 +126,9 @@ Page({ * 签到提交 */ tapSign() { + this.setData({ + disabled: true + }) let newPictures = [] for (let pictures of this.data.albumArr){ newPictures.push(pictures.path) diff --git a/pages/recruit/signWrite/signWrite.wxml b/pages/recruit/signWrite/signWrite.wxml index 2d48a5f..701f181 100644 --- a/pages/recruit/signWrite/signWrite.wxml +++ b/pages/recruit/signWrite/signWrite.wxml @@ -38,7 +38,7 @@ - 发布 + diff --git a/pages/recruit/signWrite/signWrite.wxss b/pages/recruit/signWrite/signWrite.wxss index 9faab56..a15ae86 100644 --- a/pages/recruit/signWrite/signWrite.wxss +++ b/pages/recruit/signWrite/signWrite.wxss @@ -62,6 +62,21 @@ text-shadow: 4rpx 4rpx 4rpx rgba(0, 0, 0, .3); } +.clockIn-btn-disabled { + line-height: 70rpx; + width: 100%; + text-align: center; + border: none; + border-radius:0; + background-color:transparent; +} + +button[disabled]{ + line-height: 70rpx; + color: white !important; + opacity: .8; + background-color: transparent !important; +} .recruit-bottom { position: relative; diff --git a/pages/water/details/details.js b/pages/water/details/details.js new file mode 100644 index 0000000..d0eb1cb --- /dev/null +++ b/pages/water/details/details.js @@ -0,0 +1,98 @@ + /* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +Page({ + data: { + goodsData : '', //详情 + canState : '', //操作按钮 + express : '', //物流 + orderNo : '' //订单号 + }, + + onLoad(options) { + this.setData({ + orderNo: options.order_no + }) + }, + + onShow() { + // 获取订单详情 + this.goodsInfo(); + }, + + /** + * 订单详情 + */ + goodsInfo() { + wx.$api.recruit.orderDet(this.data.orderNo).then(res => { + this.setData({ + goodsData : res.data, + express : res.data.express + }) + }).catch(err => {}) + }, + + /** + * 复制订单号 + */ + copyUrl(val) { + wx.setClipboardData({ + data: val.currentTarget.dataset.no, + success: () => { + wx.showToast({ + title: "订单编号复制成功", + icon : "none" + }) + } + }) + }, + + /** + * 订单签收 + */ + signClick() { + wx.showModal({ + title : '提示', + content : '是否签收', + success : res=> { + if (res.confirm) { + wx.$api.recruit.orderSign(this.data.goodsData.exchange_id).then(res => { + wx.showToast({ + title:'签收成功', + icon:'none' + }) + + // 获取订单详情 + this.goodsInfo(); + }).catch(err => {}) + } + } + }) + }, + + /** + * 复制物流单号 + */ + copyExpress(val) { + wx.setClipboardData({ + data: val.currentTarget.dataset.no, + success: () => { + wx.showToast({ + title: "物流单号复制成功", + icon : "none" + }) + } + }) + }, + + // 查看物流 + h5url() { + // var data = JSON.stringify(this.data.goodsData.express) + // url: `/pages/water/logistic/logistic?newData=` + encodeURIComponent(data) + '&title=' + this.data.goodsData.express.express.name + + wx.navigateTo({ + url: "/pages/water/logistic/logistic?exchange_id=" + this.data.goodsData.exchange_id + "&title=" + this.data.goodsData.express.express.name + }) + } +}) diff --git a/pages/water/details/details.json b/pages/water/details/details.json new file mode 100644 index 0000000..cc5941d --- /dev/null +++ b/pages/water/details/details.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "水滴兑换订单详情" +} \ No newline at end of file diff --git a/pages/water/details/details.wxml b/pages/water/details/details.wxml new file mode 100644 index 0000000..a7287bb --- /dev/null +++ b/pages/water/details/details.wxml @@ -0,0 +1,77 @@ + + + + + + 订单状态 + + {{goodsData.status_text}} + + + + + + + {{ goodsData.express.name }} {{ goodsData.express.mobile }} + + {{ goodsData.express.full_address }} + + + + + + + + + {{goodsData.goods.name}} + + 规格 99mlx 1 + + + ¥{{goodsData.goods.price.vip}} + + + + + + 订单信息 + + 交易时间 + {{goodsData.created_at}} + + + 交易状态 + {{goodsData.status_text}} + + + 使用水滴 + ¥{{goodsData.water_number}} + + + + + 物流信息 + + 物流名称 + {{goodsData.express.express.name}} + + + 物流单号 + + {{goodsData.express.express_no}}复制 + + + + 查看物流信息 + + 去查看 + + + + + + + 签收订单 + 返回订单 + + \ No newline at end of file diff --git a/pages/water/details/details.wxss b/pages/water/details/details.wxss new file mode 100644 index 0000000..b3b069b --- /dev/null +++ b/pages/water/details/details.wxss @@ -0,0 +1,235 @@ +page { + background: #f3f4f6; + padding: 30rpx; + box-sizing: border-box; +} + +.While { + border-radius: 10rpx; + margin-bottom: 30rpx; + background-color: #FFFFFF; + box-shadow: 0 0 10rpx rgba(0, 0, 0, .05); +} + +.orderData { + border-bottom: 100rpx transparent solid; +} + +/* 订单 */ +.orderData-cont-label { + padding: 40rpx 30rpx; + display: flex; + box-sizing: border-box; + border-bottom: #f2f2f2 2rpx solid; +} + +.orderData-cont-img { + width: 38rpx; + height: 38rpx; + margin-top: 4rpx; +} + +.orderData-cont-text { + width: calc(100% - 68rpx); + margin-left: 20rpx; + box-sizing: border-box; + font-size: 30rpx; +} + +.orderData-cont-site { + width: calc(100% - 108rpx); +} + +.orderData-cont-name { + margin-bottom: 10rpx; +} + +.orderData-cont-name text { + color: #999; + padding-left: 20rpx; +} + +.orderData-cont-copy { + display: flex; + font-size: 28rpx; + color: #999; +} + +.orderData-cont-copy text { + flex: 1; + display: inline-block; + margin-right: 20rpx; +} + +.orderData-cont-copy view { + color: #3b7cff; +} + +.address-btn { + width: 42rpx; + height: 42rpx; + margin-top: 46rpx; +} + +/* 产品 */ +.list-goods { + display: flex; + padding: 30rpx; + box-sizing: border-box; +} + +.list-goods-img { + width: 184rpx; + height: 184rpx; + margin-right: 30rpx; + border-radius: 10rpx; +} + +.list-goods-cont { + width: calc(100% - 214rpx); +} + +.list-goods-name { + font-size: 32rpx; +} + +.list-goods-text { + line-height: 90rpx; + display: flex; + font-size: 28rpx; + color: #999999; +} + +.list-goods-text text { + flex: 1; +} + +.list-goods-parice { + text-align: right; + font-size: 28rpx; +} + +.list-goods-parice text { + font-size: 34rpx; +} + +/* 规格 */ +.reserveCont-title { + padding: 30rpx; + font-size: 30rpx; +} + +.reserve-label { + display: flex; + padding: 0 30rpx 30rpx; + box-sizing: border-box; + font-size: 28rpx; + line-height: 48rpx; +} + +.reserve-name { + flex: 1; + width: 200rpx; + margin-right: 20rpx; + color: #7e7e7e; +} + +.reserve-text { + width: calc(100% - 240rpx); + text-align: right; + line-height: 50rpx; +} + +.reserve-text-btn { + width: 120rpx; + text-align: center; + color: #ffffff; + background-color: #3b7cff; + font-size: 26rpx; + border-radius: 10rpx; + line-height: 54rpx; +} + +.reserve-text-copy { + display: contents; +} + +.reserve-text-tap { + color: #ff9951; + padding-left: 30rpx; +} + +.reserve-text text { + font-size: 24rpx; + display: inline-block; + background-image: linear-gradient(to right, #f16e06, #f34206); + color: #FFFFFF; + border-radius: 6rpx; + padding: 0 10rpx; + height: 44rpx; + line-height: 44rpx; + margin-top: 6rpx; +} + +.reserve-text text.active { + background-image: linear-gradient(to right, #027be6, #2855f0); +} + +.reserve-text.reserve-price { + font-weight: 600; + font-size: 34rpx; + color: #3b7cff; +} + +.reserve-copy { + color: #3b7cff; + border: #3b7cff 2rpx solid; + display: inline-block; + height: 34rpx; + line-height: 34rpx; + font-size: 26rpx; + padding: 0 10rpx; + border-radius: 4rpx; + margin-left: 10rpx; +} + +.reserve-status { + color: #ff8100 +} + +/* 底部菜单 */ +.order-data-footer { + position: fixed; + bottom: 0; + left: 0; + right: 0; + border-top: solid 1rpx #f2f2f2; + padding-top: 20rpx; + padding-right: 30rpx; + padding-left: 30rpx; + height: 110rpx; + background: white; + flex-wrap: wrap; + flex-direction: row-reverse; + z-index: 9; +} + +.list-btn { + text-align: right; +} + +.order-btn { + border: 2rpx solid #ff8100; + color: #ff8100; + border-radius: 80rpx; + height: 56rpx; + line-height: 56rpx; + padding: 0 20rpx; + display: inline-block; + font-size: 26rpx; + margin-left: 30rpx; +} +.order-btn.grey { + color: grey; + border-color: grey; +} \ No newline at end of file diff --git a/pages/water/index.json b/pages/water/index.json index 3928faa..23a14c2 100644 --- a/pages/water/index.json +++ b/pages/water/index.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "水滴账户" } \ No newline at end of file diff --git a/pages/water/index.wxml b/pages/water/index.wxml index 12952ba..0396605 100644 --- a/pages/water/index.wxml +++ b/pages/water/index.wxml @@ -2,18 +2,20 @@ 水滴的使用规则:可以进行商品兑换 - + 水滴账户 {{score}} - - 水滴兑换 > + + 兑换订单 > + 水滴兑换 > - + + 水滴明细 @@ -28,7 +30,10 @@ - 时间:{{item.created_at}} + 兑换时间:{{item.created_at}} + + + 过期时间:{{item.expired_at}} diff --git a/pages/water/index.wxss b/pages/water/index.wxss index 7f747c3..7c586be 100644 --- a/pages/water/index.wxss +++ b/pages/water/index.wxss @@ -59,10 +59,16 @@ background-color: #ffde49; color: #3a2f00; display: inline-block; - line-height: 68rpx; + line-height: 74rpx; padding: 0 35rpx; border-radius: 80rpx; font-size: 30rpx; + margin: 0 20rpx; +} + +.water-convert-go:last-child{ + color: #fff; + background-color: #5283ea; } .detailed { @@ -140,6 +146,7 @@ .time { font-size: 28rpx; color: #6d6d6d; + margin-top: 15rpx; } .pages-no { diff --git a/pages/water/logistic/logistic.js b/pages/water/logistic/logistic.js new file mode 100644 index 0000000..d877c0d --- /dev/null +++ b/pages/water/logistic/logistic.js @@ -0,0 +1,40 @@ + /* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +Page({ + data: { + title : '', //物流快递 + logisticArr : '', + expressData : '', + exchangeId : '' + }, + + onLoad(options) { + console.log(options) + // const { + // newData = {} + // } = options; + // const data = JSON.parse(decodeURIComponent(newData)); + this.setData({ + exchangeId : options.exchange_id, + title : options.title + }) + }, + + onShow() { + // 查看物流 + this.h5url(); + }, + + // 查看物流 + h5url() { + wx.$api.recruit.orderDi(this.data.exchangeId).then(res => { + this.setData({ + expressData: res.data, + logisticArr: res.data.express_track.list + }) + }).catch(err => {}) + } +}) diff --git a/pages/water/logistic/logistic.json b/pages/water/logistic/logistic.json new file mode 100644 index 0000000..e2aeb4c --- /dev/null +++ b/pages/water/logistic/logistic.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "物流信息" +} \ No newline at end of file diff --git a/pages/water/logistic/logistic.wxml b/pages/water/logistic/logistic.wxml new file mode 100644 index 0000000..e7914fb --- /dev/null +++ b/pages/water/logistic/logistic.wxml @@ -0,0 +1,44 @@ + + + + + + {{expressData.express_track.express_name}} + + {{expressData.express_track.no}} + + + + {{expressData.name}}{{expressData.mobile}} + + + + + + + 收 + + + {{expressData.full_address}} + + + + + + + {{item.time}} + + + + {{item.context}} + + + + + + + + 暂无物流信息 + \ No newline at end of file diff --git a/pages/water/logistic/logistic.wxss b/pages/water/logistic/logistic.wxss new file mode 100644 index 0000000..1a3b2ad --- /dev/null +++ b/pages/water/logistic/logistic.wxss @@ -0,0 +1,141 @@ +.top { + background-color: #3b7cff; + padding: 30rpx 30rpx 60rpx; + box-sizing: border-box; + display: flex; +} + +.top-logo { + background-color: #ffffff; + border-radius: 10rpx; + width: 100rpx; + height: 100rpx; + padding: 10rpx; + box-sizing: border-box; +} + +.top-logo image { + width: 100%; + height: 100%; +} + +.top-cont { + color: #ffffff; + width: calc(100% - 130rpx); + margin-left: 30rpx; +} + +.top-name { + display: flex; + line-height: 44rpx; + padding: 10rpx 0; +} + +.top-no { + font-size: 26rpx; + padding-left: 30rpx; + opacity: .9; +} + +.top-type { + font-size: 24rpx; +} + +.top-type text { + padding-left: 20rpx; +} + +.address { + color: #333333; + font-size: 24rpx; + display: flex; + padding: 30rpx 30rpx 0; +} + +.address-tips { + width: 54rpx; + text-align: center; + height: 54rpx; + line-height: 54rpx; + border-radius: 50%; + background-color: #EEEEEE; + margin-left: -15rpx; + font-size: 24rpx +} + +.address-text { + width: calc(100% - 74rpx); + margin-left: 20rpx; + padding-top: 10rpx; +} + +.white { + margin-top: -30rpx; + background-color: #ffffff; + border-radius: 20rpx; +} + +.list { + padding: 0 30rpx; + box-sizing: border-box; +} + +.item { + padding-bottom: 40rpx; + padding-left: 40rpx; + box-sizing: border-box; + position: relative; +} + +.item:first-child { + padding-top: 30rpx; +} + +.item::after { + position: absolute; + content: ''; + background-color: #DDDDDD; + width: 14rpx; + height: 14rpx; + border-radius: 50%; + left: 0; + top: calc(50% - 6rpx); + z-index: 3; + border: 2rpx solid #ffffff; +} + +.item::before { + position: absolute; + content: ''; + background-color: #F0F0F0; + width: 2rpx; + height: 100%; + border-radius: 50%; + left: 8rpx; + top: 0; +} + +.item-name { + display: flex; +} + +.item-status { + font-weight: 600; + padding-right: 20rpx; +} + +.item-time { + color: #868686; +} + +.item-text { + color: #868686; + font-size: 24rpx; + line-height: 40rpx; + margin-top: 20rpx; +} + +.item:first-child .item-time, +.item:first-child .item-text { + color: #ff8100 !important; +} diff --git a/pages/water/waterOrder/waterOrder.js b/pages/water/waterOrder/waterOrder.js new file mode 100644 index 0000000..8ee15c4 --- /dev/null +++ b/pages/water/waterOrder/waterOrder.js @@ -0,0 +1,115 @@ + /* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +Page({ + data: { + listType : '', // 订单状态 + listArr : '', // 订单列表 + listsArr : [], // 订单列表 + page : {}, // 分页信息 + lodingStats : false,// 加载状态 + }, + + onLoad(options) {}, + + onShow() { + // 获取订单状态栏 + this.tabInfo() + + // 获取订单列表 + this.listInfo() + }, + + /** + * 订单状态栏 + */ + tabInfo() { + wx.$api.recruit.tabList().then(res => { + this.setData({ + listArr: res.data + }) + }).catch(err => {}) + }, + + /** + * 订单列表 + */ + listInfo(page) { + wx.$api.recruit.orderList({ + status: this.data.listType, + page : page || 1 + }).then(res => { + let listArr = this.data.listsArr, + newData = [] + if(page == 1 || page == undefined) listArr = [] + newData = listArr.concat(res.data.data) + this.setData({ + listsArr : newData, + page : res.data.page, + lodingStats : false + }) + wx.stopPullDownRefresh() + }).catch(err => {}) + }, + + /** + * 状态筛选 + */ + onTabs(val){ + if(this.data.listType === val) return + this.setData({ + listType: val.currentTarget.dataset.type + }) + + // 获取订单列表 + this.listInfo() + }, + + /** + * 订单签收 + */ + signClick(e) { + wx.showModal({ + title : '提示', + content : '是否签收', + success : res=> { + if (res.confirm) { + wx.$api.recruit.orderSign(e.currentTarget.dataset.order_no).then(res => { + wx.showToast({ + title:'签收成功', + icon:'none' + }) + + // 获取订单列表 + this.listInfo() + }).catch(err => {}) + } + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + // 获取订单列表 + this.listInfo(); + }, + + /** + * 上拉加载 + */ + onReachBottom(){ + this.setData({ + lodingStats: true + }) + let pageNumber = this.data.page.current + if(this.data.page.has_more){ + pageNumber++ + // 获取订单列表 + this.listInfo(pageNumber); + } + } +}) diff --git a/pages/water/waterOrder/waterOrder.json b/pages/water/waterOrder/waterOrder.json new file mode 100644 index 0000000..1acdeae --- /dev/null +++ b/pages/water/waterOrder/waterOrder.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "水滴兑换订单" +} \ No newline at end of file diff --git a/pages/water/waterOrder/waterOrder.wxml b/pages/water/waterOrder/waterOrder.wxml new file mode 100644 index 0000000..e73ffaa --- /dev/null +++ b/pages/water/waterOrder/waterOrder.wxml @@ -0,0 +1,55 @@ + + + {{item.status_text}} + + + + + + + 订单状态 + {{item.status_text}} + + + + + {{item.goods.name}} + + 规格 99mlx 1 + + + ¥{{item.goods.price.vip}} + + + + + {{item.water_number}}水滴 + + + + 收货城市 + + {{item.express.full_address}} + + + + + 签收订单 + 查看详情 + + + + + + 加载中... + + + 没有更多了~ + + + + + + + 暂无数据 + \ No newline at end of file diff --git a/pages/water/waterOrder/waterOrder.wxss b/pages/water/waterOrder/waterOrder.wxss new file mode 100644 index 0000000..74306c9 --- /dev/null +++ b/pages/water/waterOrder/waterOrder.wxss @@ -0,0 +1,176 @@ +page { + background-color: #f7faff; +} + +/* tabs */ +.header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 99; + height: 100rpx; + background-color: #f7faff; +} + +.tabs { + display: flex; + justify-content: space-around; + padding: 30rpx 10rpx; + font-size: 30rpx; + color: #3c3d3e; +} + +.tabs-item.show { + color: #3b7cff; +} + +/* 列表 */ +.list { + padding: 20rpx 30rpx 30rpx; + box-sizing: border-box; + margin-top: 100rpx; +} + +.list-item { + background-color: #ffffff; + border-radius: 20rpx; + padding: 30rpx; + box-sizing: border-box; + margin-bottom: 30rpx; + box-shadow: 0 4rpx 30rpx 2rpx rgba(0, 0, 0, .05); +} + +.list-top { + display: flex; + margin-bottom: 30rpx; + line-height: 48rpx; +} + +.list-top-no { + flex: 1; +} + +.list-top-status { + color: #ff8100; +} + +.list-goods { + display: flex; +} + +.list-goods-img { + width: 184rpx; + height: 184rpx; + margin-right: 30rpx; + border-radius: 10rpx; +} + +.list-goods-cont { + width: calc(100% - 214rpx); +} + +.list-goods-name { + font-size: 32rpx; +} + +.list-goods-text { + line-height: 90rpx; + display: flex; + font-size: 28rpx; + color: #999999; +} + +.list-goods-text text { + flex: 1; +} + +.list-goods-parice { + text-align: right; + font-size: 28rpx; +} + +.list-goods-parice text { + font-size: 34rpx; +} + +.list-total { + text-align: right; + margin-top: 30rpx; + font-size: 32rpx; + color: #3b7cff; +} + +.list-total.active { + color: #3b7cff; +} + +.list-total text { + font-size: 26rpx; + padding-left: 10rpx; +} + +.list-total-price { + display: inline-block; + font-weight: 600; + font-size: 38rpx; +} + +.list-tips { + background-color: #f7faff; + display: flex; + padding: 20rpx 30rpx; + box-sizing: border-box; + margin: 30rpx 0 40rpx; + border-radius: 10rpx; + line-height: 44rpx; + font-size: 28rpx; +} + +.list-tips-left { + display: flex; + margin-right: 40rpx; +} + +.list-tips-img { + width: 44rpx; + height: 44rpx; + margin-right: 10rpx; +} + +.list-tips-right { + color: #707070; + width: calc(100% - 210rpx); +} + +.list-operate { + display: flex; +} + +.list-more { + flex: 1; + line-height: 56rpx; + font-size: 26rpx; + color: #999999; +} + +.list-btn { + text-align: right; +} + +.list-btn-labor { + border: 2rpx solid #ff8100; + color: #ff8100; + border-radius: 80rpx; + height: 56rpx; + line-height: 56rpx; + padding: 0 25rpx; + display: inline-block; + font-size: 26rpx; + margin-left: 30rpx; +} + +.list-btn-labor.grey { + color: grey; + border-color: grey; +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index b2f6096..62d1d80 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -10,7 +10,7 @@ "list": [ { "name": "", - "pathName": "pages/recruit/refertoEdit/refertoEdit", + "pathName": "pages/recruit/signWrite/signWrite", "query": "", "launchMode": "default", "scene": null diff --git a/static/icons/address-icon.png b/static/icons/address-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0126050801fc5e7496618a9e956cd5b3ca4d77 GIT binary patch literal 1955 zcmV;U2VD4xP)Px+T}ebiRCr$PS_g<^MG$=t3@9pQ&IF>EbI#$+0gp51GiS_V&WZss+Dq5#$bup)q^04xdMEdXz)zlkKD8>oXBkSic*4gmWA*b2a6C6t>4 z;9dY1l6b5!LQC>}zbvP~ zI{@}1`E1ciN?H}bRR9*r&Ao!8c~?f210ZQMfV*=N-c53g_?x6@0j!q(9tZFu$=`Bw z8eO4Ns`Lq!0w8Hd08ao|Iw*1j$z6h}&t=C3U?TtqA)}uG7>Hv?IwaOe()9qwgn5n- z%ai<~3Nxr0fb#(y5(N8_O0tNKQ;A zxktL!MapO6BS}7))@}&kp|J3Mk_(h&)M{R307%N8?wur^_}Gk{{W;r~@mdG!s;k@BZ#-{8uMPB!6vSVJ-QT z1)@p-ZUc~+@E;_nPA9h}fTw~$dyusGHzY~>0T>$wHz4^);`KX#snXb6B%L_5MO6ae z@Mk|@s;90E%)0K}8cE*Zr0X7EQrrVoWQJ7&5KZ?BlC|PTQr-ggBbm<<>sS<6fUin z_d~whKkWTtx0P6>#R?XU5lG@1x zohZEvV9LaM0?AF=Ro?3>bAkzg9RS=M1iPN3uSSg;c=%>I+6`&F-qCzE*?V1Gpvd``AqrlD`aA09^XU({bophh&dhpkzN_-sD#t0Wvy>&K9^MVPnazgz9C=yQ^>iPG3o ziU5#w1b}mj=7sU2NuHeqy%0dm)*b`k;^yyG{3JPniec_Dk}i_0{GkBOD=E(bBx7OK zYgyqHkmSb+_xdtArNrh=cOQ`Cxb3Lm6V2#UlCkFR!A{a~sdb+H{u+RFNluouNqSOi zB|_vqndGdkCbtAY(y0JW2n-%4>5Q*5Ny@jgymk|k59XOjS`UDesVLVdlH<#6C}{$K zjl=xINj9~ZrT|Eq9>ABm&g~i`pD8O$Hcyf}Lq~^oPGL7BY3r(yBtL{0l$s+=bQVc> zf=W~JA1{Xm?lzBTmN&El-~s>#2SyK*^lA2sB;~!fA3p0HWJ!(?hXv+tqS*BR>g$G* zoH*6OWukg}F3+nW04ZB@#x+G)unI}v=YEl-<^A}PTf9BVagw$LFfNS!nUptZeI`k+ z9ctk+k@>kicT(1angQUL@7SNwc#^TH*=M1=K+=%_Y7rulpT7M-;(HsP!RnEuUmN|q z*QEgV4eJ{^-(CPTDP30}=@xd|B+2*ON@wJ>xn3~&y8x1YUTcda%>>}P9FzG;ei(mi z1b~|wQJ`B%Zr7GHVR16gH*(H3o8jkj-+Pa@O%0syxg?#})TsvmlH6m8|LDt>i~#2Wa4qkezHXi*ck9!RB_~VD@71GsP?AmIG)YGR zI4exNoMhcM)B%v>50{*(Mp}ZTKW69%rIz_x0A3*(Ltv%*N%|JREP-jgQxyTYJ$=NK z%^OSdfJ!C#pO`hMW^X20E3<0=NU~Rssi~i&mhJQxS_6rPB)8OKV`Y7kk7fYm+t$6j z=l77@oRXGH&(ztzlU;G;<7Fp=8fc!9oXc3>j7A!Oyq7$U8@?plBACSxY=s@#sD}UUoidfGD#OLT}zVUcMKmJ05=QV zX8P}5q;GS&4TV(axKEjVuROs3^KxO2k^T4h9oEDi=ph(RsZkxv2quH;}Gbsmb=zJS)anTco!($QiWjvy8VQU p^c%K-B80kqeAoiI{e+A3`v=Hg>M#fcdGP=M002ovPDHLkV1gChr1$^; literal 0 HcmV?d00001