水滴兑换模块开发完成
This commit is contained in:
@@ -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
|
||||
})
|
||||
5
app.json
5
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",
|
||||
|
||||
@@ -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 => { })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 返回上一页
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<view class="recruit-border">
|
||||
<view class="goodsCont-item">
|
||||
<view class="goodsCont-item-cont">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/07/21/d13f569152040d39a6e25e571a84d68b.png" mode="widthFix" class="goodsCont-item-photo"></image>
|
||||
<image src="{{dataShow.cover}}" mode="widthFix" class="goodsCont-item-photo"></image>
|
||||
<view class="goodsCont-item-price">
|
||||
<image src="https://cdn.shuiganying.com/images/2023/05/17/054f6658624c4b1ed78bb834a8d3c4d6.png" mode="widthFix" class="goodsCont-item-price-back"></image>
|
||||
<view class="goodsCont-item-price-cont">
|
||||
<view class="goodsCont-item-price-left">
|
||||
水感应喷雾
|
||||
{{dataShow.name}}
|
||||
</view>
|
||||
<view class="goodsCont-item-price-right goodsCont-item-price-white">
|
||||
<view class="goodsCont-item-price-number">¥<text>129</text>/瓶</view>
|
||||
<view class="goodsCont-item-price-number">¥<text>{{dataShow.price.vip}}</text>/瓶</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,7 +32,7 @@
|
||||
<!-- 地址 -->
|
||||
<view class="recruit-block">
|
||||
<view class="recruit-border">
|
||||
<navigator hover-class="none" url="/pages/site/index?type=goodsAddress" class="address-cont" wx:if="{{address}}">
|
||||
<navigator hover-class="none" url="/pages/site/index?type=goodsAddress" class="address-cont" wx:if="{{address != ''}}">
|
||||
<view class="siteTop">
|
||||
<image class="siteTop-img" src="https://cdn.shuiganying.com/images/2023/07/21/af4c2254c0eb79492966ca4a89d73e85.png" mode="widthFix"></image>
|
||||
<view class="siteTop-name">
|
||||
@@ -45,7 +45,8 @@
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="address-add" wx:else>
|
||||
<navigator hover-class="none" url="/pages/site/index?type=goodsAddress" class="address-go">新增收货地址 +</navigator>
|
||||
<image class="address-icon" src="/static/icons/address-icon.png" mode="widthFix"></image>
|
||||
<navigator hover-class="none" url="/pages/site/index?type=goodsAddress" class="address-go">新增收货地址 ></navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -283,3 +283,25 @@
|
||||
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;
|
||||
}
|
||||
@@ -46,7 +46,8 @@
|
||||
</picker>
|
||||
</view> -->
|
||||
<view class="site-input">
|
||||
<input placeholder="请输入详细地址" name="address" type="text" value="{{enrollData.express.address}}"></input>
|
||||
<label>收货地址</label>
|
||||
<input placeholder="请输入详细的收货地址" name="address" type="text" value="{{enrollData.express.address}}"></input>
|
||||
</view>
|
||||
<view class="site-btn" wx:if="{{cityArr[cityIndex].surplus != 0}}">
|
||||
<button form-type="submit" size="mini" disabled="{{disabled}}">提交申请</button>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</navigator>
|
||||
<view class="clockIn-btn" bindtap="tapSign">
|
||||
<image class="clockIn-btn-img" src="https://cdn.shuiganying.com/images/2023/07/10/c7a52b0906209823c68ca293946ae051.png" mode="widthFix"></image>
|
||||
<view class="clockIn-btn-text">发布</view>
|
||||
<button class="clockIn-btn-text clockIn-btn-disabled" disabled="{{disabled}}">发布</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -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;
|
||||
|
||||
98
pages/water/details/details.js
Normal file
98
pages/water/details/details.js
Normal file
@@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/water/details/details.json
Normal file
4
pages/water/details/details.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "水滴兑换订单详情"
|
||||
}
|
||||
77
pages/water/details/details.wxml
Normal file
77
pages/water/details/details.wxml
Normal file
@@ -0,0 +1,77 @@
|
||||
<view class="orderData">
|
||||
<view class="While">
|
||||
<view class="orderData-cont-label">
|
||||
<image class="orderData-cont-img" src="https://cdn.shuiganying.com/images/2023/04/04/3b3938e3a883e6b173b4d49a5242666a.png" mode="aspectFill"></image>
|
||||
<view class="orderData-cont-text">
|
||||
<view class="orderData-cont-name">订单状态</view>
|
||||
<view class="orderData-cont-copy">
|
||||
<text class="nowrap">{{goodsData.status_text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderData-cont-label">
|
||||
<image class="orderData-cont-img" src="/static/icons/siteIcon.png" mode="aspectFill"></image>
|
||||
<view class="orderData-cont-text orderData-cont-site">
|
||||
<view class="orderData-cont-name">{{ goodsData.express.name }} <text>{{ goodsData.express.mobile }}</text></view>
|
||||
<view class="orderData-cont-copy">
|
||||
{{ goodsData.express.full_address }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="While list-goods">
|
||||
<image class="list-goods-img" mode="aspectFill" src="{{goodsData.goods.cover}}"></image>
|
||||
<view class="list-goods-cont">
|
||||
<view class="nowrap list-goods-name">{{goodsData.goods.name}}</view>
|
||||
<view class="list-goods-text">
|
||||
<text>规格 99ml</text>x 1
|
||||
</view>
|
||||
<view class="list-goods-parice">
|
||||
¥<text>{{goodsData.goods.price.vip}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="While reserveCont">
|
||||
<view class="reserveCont-title">订单信息</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">交易时间</view>
|
||||
<view class="reserve-text">{{goodsData.created_at}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">交易状态</view>
|
||||
<view class="reserve-text reserve-status">{{goodsData.status_text}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">使用水滴</view>
|
||||
<view class="reserve-text reserve-price">¥{{goodsData.water_number}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="While reserveCont" wx:if="{{goodsData.express.express_no}}">
|
||||
<view class="reserveCont-title">物流信息</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">物流名称</view>
|
||||
<view class="reserve-text">{{goodsData.express.express.name}}</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">物流单号</view>
|
||||
<view class="reserve-text reserve-text-copy">
|
||||
{{goodsData.express.express_no}}<view bindtap="copyExpress" class="reserve-text-tap" data-no="{{goodsData.express.express_no}}">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reserve-label">
|
||||
<view class="reserve-name">查看物流信息</view>
|
||||
<view class="reserve-text reserve-text-btn" bindtap="h5url">
|
||||
去查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-data-footer">
|
||||
<view class="list-btn">
|
||||
<view class="order-btn" bindtap="signClick" wx:if="{{goodsData.can_sign}}">签收订单</view>
|
||||
<navigator hover-class="none" class="order-btn grey" open-type="navigateBack">返回订单</navigator>
|
||||
</view>
|
||||
</view>
|
||||
235
pages/water/details/details.wxss
Normal file
235
pages/water/details/details.wxss
Normal file
@@ -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;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "水滴账户"
|
||||
}
|
||||
@@ -2,18 +2,20 @@
|
||||
水滴的使用规则:可以进行商品兑换
|
||||
<image src="/static/icons/water_close.png"></image>
|
||||
</view>
|
||||
<view class="water {{isExchange ? 'active' : ''}}">
|
||||
<view class="water active">
|
||||
<view class="water-top">
|
||||
水滴账户<image src="/static/icons/water_icon.png"></image>
|
||||
</view>
|
||||
<view class="water-number">
|
||||
{{score}}
|
||||
</view>
|
||||
<view class="water-convert" wx:if="{{isExchange}}">
|
||||
<navigator hover-class="none" url="/pages/recruit/exchange/exchange" class="water-convert-go">水滴兑换 ></navigator>
|
||||
<view class="water-convert">
|
||||
<navigator hover-class="none" url="/pages/water/waterOrder/waterOrder" class="water-convert-go">兑换订单 ></navigator>
|
||||
<navigator hover-class="none" url="/pages/recruit/exchange/exchange" class="water-convert-go" wx:if="{{isExchange}}">水滴兑换 ></navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailed {{isExchange ? 'active' : ''}}">
|
||||
<!-- {{isExchange ? 'active' : ''}} -->
|
||||
<view class="detailed active">
|
||||
<view class="title">
|
||||
水滴明细
|
||||
</view>
|
||||
@@ -28,7 +30,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
时间:<text>{{item.created_at}}</text>
|
||||
兑换时间:<text>{{item.created_at}}</text>
|
||||
</view>
|
||||
<view class="time" wx:if="{{item.expired_at != ''}}">
|
||||
过期时间:<text>{{item.expired_at}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
|
||||
@@ -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 {
|
||||
|
||||
40
pages/water/logistic/logistic.js
Normal file
40
pages/water/logistic/logistic.js
Normal file
@@ -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 => {})
|
||||
}
|
||||
})
|
||||
4
pages/water/logistic/logistic.json
Normal file
4
pages/water/logistic/logistic.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "物流信息"
|
||||
}
|
||||
44
pages/water/logistic/logistic.wxml
Normal file
44
pages/water/logistic/logistic.wxml
Normal file
@@ -0,0 +1,44 @@
|
||||
<block wx:if="{{logisticArr.length > 0}}">
|
||||
<view class="top">
|
||||
<view class="top-logo">
|
||||
<image src="{{expressData.express_track.logo ? expressData.express_track.logo : 'https://cdn.shuiganying.com/images/2023/07/27/eca556ea6028f859e53c13103bb312f1.png'}}" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="top-cont">
|
||||
<view class="top-name">
|
||||
{{expressData.express_track.express_name}}
|
||||
<view class="top-no">
|
||||
{{expressData.express_track.no}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-type">
|
||||
{{expressData.name}}<text>{{expressData.mobile}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="white">
|
||||
<view class="address">
|
||||
<view class="address-tips">
|
||||
收
|
||||
</view>
|
||||
<view class="address-text">
|
||||
{{expressData.full_address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" wx:for="{{logisticArr}}" wx:key="logisticArr">
|
||||
<view class="item-name">
|
||||
<view class="item-time">
|
||||
{{item.time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
{{item.context}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/imgs/cont_null.png"></image>
|
||||
<view>暂无物流信息</view>
|
||||
</view>
|
||||
141
pages/water/logistic/logistic.wxss
Normal file
141
pages/water/logistic/logistic.wxss
Normal file
@@ -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;
|
||||
}
|
||||
115
pages/water/waterOrder/waterOrder.js
Normal file
115
pages/water/waterOrder/waterOrder.js
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
})
|
||||
4
pages/water/waterOrder/waterOrder.json
Normal file
4
pages/water/waterOrder/waterOrder.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "水滴兑换订单"
|
||||
}
|
||||
55
pages/water/waterOrder/waterOrder.wxml
Normal file
55
pages/water/waterOrder/waterOrder.wxml
Normal file
@@ -0,0 +1,55 @@
|
||||
<view class="header">
|
||||
<view class="tabs">
|
||||
<view class="tabs-item {{listType == item.status ? 'show' : ''}}" bindtap="onTabs" data-type="{{item.status}}" wx:for="{{listArr}}" wx:key="listArr">{{item.status_text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list" wx:if="{{listsArr.length > 0}}">
|
||||
<view class="list-item" wx:for="{{listsArr}}" wx:key="listsArr">
|
||||
<view class="list-top">
|
||||
<view class="list-top-no">订单状态</view>
|
||||
<view class="list-top-status">{{item.status_text}}</view>
|
||||
</view>
|
||||
<view class="list-goods">
|
||||
<image class="list-goods-img" mode="aspectFill" src="{{item.goods.cover}}"></image>
|
||||
<view class="list-goods-cont">
|
||||
<view class="nowrap list-goods-name">{{item.goods.name}}</view>
|
||||
<view class="list-goods-text">
|
||||
<text>规格 99ml</text>x 1
|
||||
</view>
|
||||
<view class="list-goods-parice">
|
||||
¥<text>{{item.goods.price.vip}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-total">
|
||||
<view class="list-total-price">{{item.water_number}}</view><text>水滴</text>
|
||||
</view>
|
||||
<view class="list-tips">
|
||||
<view class="list-tips-left">
|
||||
<image class="list-tips-img" src="https://cdn.shuiganying.com/images/2023/04/04/d4543817b05d3aaac04dfb85ff9f8f8c.png"></image>收货城市
|
||||
</view>
|
||||
<view class="nowrap list-tips-right">{{item.express.full_address}}</view>
|
||||
</view>
|
||||
<view class="list-operate">
|
||||
<view class="list-more"></view>
|
||||
<view class="list-btn">
|
||||
<view bindtap="signClick" data-order_no="{{item.exchange_id}}" class="list-btn-labor" wx:if="{{item.can_sign}}">签收订单</view>
|
||||
<navigator hover-class="none" url="/pages/water/details/details?order_no={{item.exchange_id}}" class="list-btn-labor grey">查看详情</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||
<block wx:if="{{page.has_more}}">
|
||||
<image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
|
||||
</block>
|
||||
<block wx:else>
|
||||
没有更多了~
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pack-center pages-hint" wx:else>
|
||||
<image src="/static/imgs/text_null.png"></image>
|
||||
<view>暂无数据</view>
|
||||
</view>
|
||||
176
pages/water/waterOrder/waterOrder.wxss
Normal file
176
pages/water/waterOrder/waterOrder.wxss
Normal file
@@ -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;
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"list": [
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/recruit/refertoEdit/refertoEdit",
|
||||
"pathName": "pages/recruit/signWrite/signWrite",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
|
||||
BIN
static/icons/address-icon.png
Normal file
BIN
static/icons/address-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user