Commit 0033ee65 by 谢中龙

优化功能

parent c4dd258a
...@@ -132,10 +132,6 @@ ...@@ -132,10 +132,6 @@
"contactPlugin": { "contactPlugin": {
"version": "1.3.0", "version": "1.3.0",
"provider": "wx104a1a20c3f81ec2" "provider": "wx104a1a20c3f81ec2"
},
"live-player-plugin": {
"version": "1.0.2",
"provider": "wx2b03c6e691cd7370"
} }
}, },
"permission": { "permission": {
......
...@@ -66,6 +66,8 @@ Component({ ...@@ -66,6 +66,8 @@ Component({
storgeUserInfo: wx.getStorageSync('_baseUserInfo'), storgeUserInfo: wx.getStorageSync('_baseUserInfo'),
isPlusVip: false, isPlusVip: false,
currentPlusStyle: null, currentPlusStyle: null,
memberIsOpen : false,
levelName : ''
}, },
observers: { observers: {
'**': function (e) { '**': function (e) {
...@@ -81,9 +83,62 @@ Component({ ...@@ -81,9 +83,62 @@ Component({
baseImgUrl: imageUrl, baseImgUrl: imageUrl,
isPlusVip: isVip, isPlusVip: isVip,
currentPlusStyle: isVip ? personData.plus.filter(item => item.purchased == 1)[0] : personData.plus.filter(item => item.purchased == 0)[0] currentPlusStyle: isVip ? personData.plus.filter(item => item.purchased == 1)[0] : personData.plus.filter(item => item.purchased == 0)[0]
}) });
this.getLevelOpenStatus();
}, },
methods: { methods: {
//获取配置的开关
getLevelOpenStatus(){
wxService.get(`/merchant/brandSwitchSetting/getOpenStatus?businessType=2`).then(res => {
const { result, data } = res.data
if (result == 0) {
console.log(data)
if(data){
this.getLevelList();
}
else{
this.setData({
memberIsOpen : false,
})
}
}
}).finally(() => {
wx.hideLoading()
})
},
//获取等级列表
getLevelList(){
wxService.post('/merchant/settingLevel/get').then(res => {
console.log(res)
if(res){
let levelList = res.data.data ? res.data.data : [];
if (levelList.length == 0){
this.setData({
memberIsOpen: false,
})
}
else{
console.log(this.data)
let index = this.data.baseUserInfo.member.level ? this.data.baseUserInfo.member.level : 0;
let filterLevel = levelList.filter(item => item.index == index);
if (filterLevel.length > 0){
this.data.levelName = filterLevel[0].name;
this.setData({
memberIsOpen: true,
levelName: this.data.levelName,
})
}
else{
//未找到等级对应数据 则认为等级被删除了或者等级出现错误数据
this.setData({
memberIsOpen: false,
})
}
}
}
})
},
toPlusPay(e) { toPlusPay(e) {
const { row }= e.currentTarget.dataset const { row }= e.currentTarget.dataset
let toPlus = typeof(row) == 'string'? JSON.parse(row) : row let toPlus = typeof(row) == 'string'? JSON.parse(row) : row
......
...@@ -27,7 +27,13 @@ ...@@ -27,7 +27,13 @@
> >
<view class='user-info' wx:if='{{currentMobile}}'> <view class='user-info' wx:if='{{currentMobile}}'>
<view class="user-avatar"> <view class="user-avatar">
<open-data type="userAvatarUrl" /> <view class="avator">
<open-data type="userAvatarUrl" />
</view>
<view class="user-level" wx:if="{{memberIsOpen}}">
<image src="/assets/imgs/crown.png" mode="aspectFit"></image>
<view class="user-level-name">{{levelName}}</view>
</view>
</view> </view>
<view class='user-name-content'> <view class='user-name-content'>
<view class='user-name'> <view class='user-name'>
......
...@@ -45,11 +45,53 @@ ...@@ -45,11 +45,53 @@
.user-avatar{ .user-avatar{
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
overflow:hidden; /* overflow:hidden; */
border-radius: 50%;
display: inline-block; display: inline-block;
margin-right: 46rpx; margin-right: 30rpx;
position: relative;
}
.user-avatar .avator{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
.user-avatar .user-level{
position: absolute;
left: 50%;
margin-left: -70rpx;
bottom: -28rpx;
width: 140rpx;
height: 25rpx;
z-index: 2;
font-size: 20rpx;
color: #fff;
display: flex;
align-items: center;
} }
.user-avatar .user-level .user-level-name{
flex: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-overflow: ellipsis;
overflow: hidden;
}
.user-avatar .user-level image{
flex: 0;
min-width: 22rpx;
max-width: 22rpx;
height: 22rpx;
margin-right: 4rpx;
}
.user-name-content{ .user-name-content{
display: inline-block; display: inline-block;
} }
......
...@@ -18,13 +18,14 @@ wxService.page({ ...@@ -18,13 +18,14 @@ wxService.page({
hasLogisticInfo : false, hasLogisticInfo : false,
logisticCompanyName: '', logisticCompanyName: '',
logisticNo : '', logisticNo : '',
status : '',
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.hideShareMenu() wx.hideShareMenu()
}, },
...@@ -41,6 +42,7 @@ wxService.page({ ...@@ -41,6 +42,7 @@ wxService.page({
this.setData({ this.setData({
params, params,
orderId: detail.id, orderId: detail.id,
status: detail.status,
orderCode: detail.logistic.supplierCode, orderCode: detail.logistic.supplierCode,
orderLogisticsNo: detail.logistic.code, orderLogisticsNo: detail.logistic.code,
logisticCompanyName: this.data.logisticCompanyName, logisticCompanyName: this.data.logisticCompanyName,
......
...@@ -38,9 +38,8 @@ ...@@ -38,9 +38,8 @@
</view> </view>
</view> </view>
<!-- <view class="button-wrap"> <!-- <view class="button-wrap" wx:if="{{status == 'D'}}">
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button> <button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
<button class="btn btn-lg btn-gray" bindtap="handelReturnGood">申请退款</button>
</view> --> </view> -->
</view> </view>
<!-- <view wx:if="{{!orderId || !hasLogisticInfo}}" class="df no-logis"> <!-- <view wx:if="{{!orderId || !hasLogisticInfo}}" class="df no-logis">
......
...@@ -63,6 +63,20 @@ wxService.page({ ...@@ -63,6 +63,20 @@ wxService.page({
wx.hideShareMenu() wx.hideShareMenu()
}, },
//复制
onTapCopy(e){
wx.setClipboardData({
//准备复制的数据
data: e.currentTarget.dataset.no,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
...@@ -211,10 +225,14 @@ wxService.page({ ...@@ -211,10 +225,14 @@ wxService.page({
item.count = item.canRefundNum; item.count = item.canRefundNum;
}); });
delete copyOrderInfo.orderStore;
let params = JSON.stringify(copyOrderInfo); let obj = {
id: copyOrderInfo.id,
logistic: copyOrderInfo.logistic,
status: copyOrderInfo.status,
}
let params = JSON.stringify(obj);
// 退款申请 // 退款申请
wxService.router(`/pages/logistics/logistics`).search({ params }) wxService.router(`/pages/logistics/logistics`).search({ params })
}, },
......
...@@ -25,10 +25,12 @@ ...@@ -25,10 +25,12 @@
<view class="order-number" wx:if="{{currentIndex == 5}}"> <view class="order-number" wx:if="{{currentIndex == 5}}">
<text>退单号</text> <text>退单号</text>
<text class="number"> {{item.id}}</text> <text class="number"> {{item.id}}</text>
<view class="copy" data-no="{{item.id}}" bindtap="onTapCopy">复制</view>
</view> </view>
<view class="order-number" wx:else> <view class="order-number" wx:else>
<text>订单号</text> <text>订单号</text>
<text class="number">{{item.id}}</text> <text class="number">{{item.id}}</text>
<view class="copy" data-no="{{item.id}}" bindtap="onTapCopy">复制</view>
</view> </view>
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) 关闭 取消 新建 待付款 已支付 待发货 已发货 待收货 已完成 已收货 交易关闭 取消--> <!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) 关闭 取消 新建 待付款 已支付 待发货 已发货 待收货 已完成 已收货 交易关闭 取消-->
......
...@@ -70,10 +70,25 @@ scroll-view{ ...@@ -70,10 +70,25 @@ scroll-view{
.order-number{ .order-number{
color: #808080; color: #808080;
font-size: 25rpx; font-size: 25rpx;
display: flex;
} }
.order-number .number{ .order-number .number{
margin-left: 32rpx; margin-left: 32rpx;
} }
.order-number .copy{
width: 50rpx;
height: 30rpx;
border: solid 1px #cb3c3c;
color: #cb3c3c;
font-size: 22rpx;
border-radius: 5rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 20rpx;
}
.order-status{ .order-status{
font-size: 26rpx; font-size: 26rpx;
color: #333333; color: #333333;
......
...@@ -57,12 +57,23 @@ wxService.page({ ...@@ -57,12 +57,23 @@ wxService.page({
data.createOrderTime = new Date(data.createTime.replace(/-/g,'/')).getTime() || []; data.createOrderTime = new Date(data.createTime.replace(/-/g,'/')).getTime() || [];
data.countDownOrderTime = 7200000; // 2时(h)=7200000毫秒(ms) data.countDownOrderTime = 7200000; // 2时(h)=7200000毫秒(ms)
// 订单倒计时 超多两小时 刷新当前页 // 订单倒计时 超多两小时 刷新当前页
data.orderCanRefund = true;
// 本地时间 - 创建时间 > 2小时 刷新当前页 // 本地时间 - 创建时间 > 2小时 刷新当前页
if (data.logistic){ if (data.logistic){
let receiverInfoArr = data.logistic.receiverInfo.split(',').reverse().filter(item => item); let receiverInfoArr = data.logistic.receiverInfo.split(',').reverse().filter(item => item);
data.logistic.receiverName = receiverInfoArr[1]; data.logistic.receiverName = receiverInfoArr[1];
data.logistic.receiverMobile = receiverInfoArr[0]; data.logistic.receiverMobile = receiverInfoArr[0];
data.logistic.receiverAddress = receiverInfoArr[2] + receiverInfoArr[3]; data.logistic.receiverAddress = receiverInfoArr[2] + receiverInfoArr[3];
let deliverTime = data.logistic.deliverTime ? data.logistic.deliverTime : null;
if(deliverTime){
let diffObj = utils.getDateDiff(deliverTime);
if (diffObj.days <= this.data.canRefundDaysAfterDelivery){
data.orderCanRefund = true;
}
else{
data.orderCanRefund = false;
}
}
} }
else{ else{
data.logistic = null; data.logistic = null;
...@@ -288,9 +299,13 @@ wxService.page({ ...@@ -288,9 +299,13 @@ wxService.page({
item.count = item.canRefundNum; item.count = item.canRefundNum;
}); });
delete copyOrderInfo.orderStore; let obj = {
id: copyOrderInfo.id,
logistic: copyOrderInfo.logistic,
status: copyOrderInfo.status,
}
let params = JSON.stringify(copyOrderInfo); let params = JSON.stringify(obj);
// 退款申请 // 退款申请
wxService.router(`/pages/logistics/logistics`).search({params}) wxService.router(`/pages/logistics/logistics`).search({params})
}, },
......
...@@ -135,36 +135,23 @@ ...@@ -135,36 +135,23 @@
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button> <button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button> <button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
</view> </view>
<view class="button-wrap" wx-if="{{detail.status == 'P' && canApplyRefund}}"> <view class="button-wrap" wx:if="{{detail.orderCanRefund || detail.status == 'D'}}">
<button <button
class="btn btn-lg btn-gray" class="btn btn-gray btn-lg"
data-id="{{detail.id}}" data-id="{{detail.id}}"
wx:if="{{detail.orderCanRefund}}"
data-detail="{{detail}}" data-detail="{{detail}}"
bindtap="handelRequestRefund" bindtap="handelRequestRefund"
>申请退款 >申请退款
</button> </button>
<button
wx:if="{{detail.status == 'D'}}"
class="btn btn-lg btn-primary "
data-id="{{detail.id}}"
bindtap="handelConfirmReceipt">确认收货</button>
</view> </view>
<view class="button-wrap" wx-if="{{detail.status == 'D' && canApplyRefund}}">
<button
class="btn btn-primary btn-lg"
data-id="{{detail.id}}"
data-detail="{{detail}}"
bindtap="handelRequestRefund"
>申请退款
</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelConfirmReceipt">确认收货</button>
</view>
<!-- <view class="button-wrap" wx-if="{{detail.status == 'R'}}">
<button
class="btn btn-lg btn-gray"
data-id="{{detail.id}}"
data-detail="{{detail}}"
bindtap="handelRequestRefund"
>申请退款
</button>
</view> -->
</view> </view>
<!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/> <floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<go-guid/> <go-guid/>
\ No newline at end of file
...@@ -204,7 +204,7 @@ wxService.page({ ...@@ -204,7 +204,7 @@ wxService.page({
this.setData({ this.setData({
productInfo: this.data.productInfo productInfo: this.data.productInfo
}) });
} }
} }
}).finally(() => {}) }).finally(() => {})
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
/> />
</view> </view>
<view class="pro-info"> <view class="pro-info">
<image class="pro-img" <image class="pro-img" src="{{item.skuImgUrl ? item.skuImgUrl: item.mainImgUrl }}" mode="aspectFit" />
src="{{item.skuImgUrl ? item.skuImgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon.png'}}" mode="aspectFit" />
<view class="pro-right-info"> <view class="pro-right-info">
<view class="pro-name">{{item.productName}}</view> <view class="pro-name">{{item.productName}}</view>
<view class="pro-sku">{{item.skuSpec}}</view> <view class="pro-sku">{{item.skuSpec}}</view>
......
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
"id": 24, "id": 24,
"name": "订单详情", "name": "订单详情",
"pathName": "pages/orderDetail/orderDetail", "pathName": "pages/orderDetail/orderDetail",
"query": "id=689550313044185088", "query": "id=659705656785375232",
"scene": null "scene": null
}, },
{ {
......
...@@ -21,6 +21,7 @@ const contants = { ...@@ -21,6 +21,7 @@ const contants = {
ENJOY: 17,// "点赞统计" ENJOY: 17,// "点赞统计"
READ: 18, //"阅读统计" READ: 18, //"阅读统计"
STAFF_RECOMMAND : 19 , //员工推荐 STAFF_RECOMMAND : 19 , //员工推荐
OFFICIAL_ACCOUNT : 20,//公众号
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment