Commit abb5b0e1 by 赵雅纹

Merge branch 'dev_7.1.0' into fixbug-ZYW

parents 365ae6b8 acba3e72
/* component/tabSort/tabSort.wxss */ /* component/tabSort/tabSort.wxss */
/* @import '/base/base.wxss'; */
.tab-sort { .tab-sort {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
...@@ -40,14 +41,3 @@ ...@@ -40,14 +41,3 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
button {
background-color: transparent;
border-radius:0;
padding: 0;
}
button::after{
border:none;
}
.button-hover, .button-active{
background-color:transparent;
}
\ No newline at end of file
...@@ -3,7 +3,6 @@ const app = getApp() ...@@ -3,7 +3,6 @@ const app = getApp()
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo const envInfo = require('../../config/index').envInfo
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
...@@ -44,12 +43,13 @@ wxService.page({ ...@@ -44,12 +43,13 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
this.getAddressList() this.getAddressList()
}, },
// 获取地址列表 // 获取地址列表
getAddressList(){ getAddressList(){
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.post(`/member/addressManage/getall`,{ wxService.post(`/member/addressManage/getall`,{
userId: memberId userId: memberId
}).then(res => { }).then(res => {
...@@ -90,6 +90,7 @@ wxService.page({ ...@@ -90,6 +90,7 @@ wxService.page({
//设置默认地址 //设置默认地址
settingDefalutAddress(e){ settingDefalutAddress(e){
const { memberId } = wx.getStorageSync('_baseUserInfo')
console.log(e) console.log(e)
let params = { let params = {
userId: memberId, userId: memberId,
......
...@@ -61,23 +61,23 @@ wxService.page({ ...@@ -61,23 +61,23 @@ wxService.page({
*/ */
onShow: function () { onShow: function () {
console.log('currentIndex', this.data.currentIndex) console.log('currentIndex', this.data.currentIndex)
const {currentIndex} = this.data const { currentIndex } = this.data
if(currentIndex == 5){ if (currentIndex == 5) {
this.getRefundList(this.data.pageNo, this.data.pageSize) this.getRefundList(this.data.pageNo, this.data.pageSize)
} else { } else {
this.setData({ this.setData({
pageNo: 1, pageNo: 1,
pageSize: 5 pageSize: 5
},()=>{ }, () => {
const params = { trade: this.data.trade } const params = { trade: this.data.trade }
this.initOrderList(this.data.pageNo, this.data.pageSize, params) this.initOrderList(this.data.pageNo, this.data.pageSize, params)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade) // this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
}) })
} }
}, },
// 确认收货 // 确认收货
handelConfirmReceipt(e) { handelConfirmReceipt(e) {
...@@ -163,20 +163,38 @@ if(currentIndex == 5){ ...@@ -163,20 +163,38 @@ if(currentIndex == 5){
} }
}) })
}, },
// 查看物流
checkLogistics(e) {
const { detail } = e.currentTarget.dataset
let params = JSON.stringify(detail)
// 退款申请
wxService.router(`/pages/logistics/logistics`).search({ params })
},
// 查看详情 // 查看详情
handelCheckRfDetail(e){ handelCheckRfDetail(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
},
// 订单详情
handelDetail(e) {
// const {detail} = e.currentTarget.dataset
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`) wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
}, },
// 退单详情
handelDetailRf(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/refundDetail/refundDetail?id=${id}`)
},
// 退货寄回 // 退货寄回
handelCheckRfSend(e){ handelCheckRfSend(e) {
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
console.log('handelCheckRfSend', id ) console.log('handelCheckRfSend', id)
}, },
// 取消退款 // 取消退款
handelCancelRefund(e){ handelCancelRefund(e) {
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
console.log('取消退款', id ) console.log('取消退款', id)
this.handelRevokeRefund(id) this.handelRevokeRefund(id)
}, },
handelRevokeRefund(id) { handelRevokeRefund(id) {
...@@ -184,8 +202,8 @@ if(currentIndex == 5){ ...@@ -184,8 +202,8 @@ if(currentIndex == 5){
title: '加载中', title: '加载中',
mask: true mask: true
}) })
const params = {id} const params = { id }
wxService.post(`/sale/refund/buyer/cancel`,params).then(res => { wxService.post(`/sale/refund/buyer/cancel`, params).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
...@@ -196,22 +214,12 @@ if(currentIndex == 5){ ...@@ -196,22 +214,12 @@ if(currentIndex == 5){
}); });
setTimeout(() => { setTimeout(() => {
wxService.router('/pages/order/order') wxService.router('/pages/order/order')
},200) }, 200)
} }
} }
}) })
}, },
// 订单详情
handelDetail(e) {
// const {detail} = e.currentTarget.dataset
const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
},
// 退单详情
handelDetailRf(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/refundDetail/refundDetail?id=${id}`)
},
//点击切换tab //点击切换tab
switchTab(e) { switchTab(e) {
const { type, status } = e.currentTarget.dataset const { type, status } = e.currentTarget.dataset
...@@ -228,11 +236,11 @@ if(currentIndex == 5){ ...@@ -228,11 +236,11 @@ if(currentIndex == 5){
this.getRefundList(this.data.pageNo, this.data.pageSize) this.getRefundList(this.data.pageNo, this.data.pageSize)
} else { } else {
this.setData({ this.setData({
trade:status trade: status
},()=>{ }, () => {
this.initOrderList(this.data.pageNo, this.data.pageSize, status) this.initOrderList(this.data.pageNo, this.data.pageSize, status)
}) })
} }
}) })
}, },
...@@ -276,7 +284,7 @@ if(currentIndex == 5){ ...@@ -276,7 +284,7 @@ if(currentIndex == 5){
this.setData({ this.setData({
orderList: this.data.pageNo == 1 ? [...data] : [...this.data.orderList, ...data], orderList: this.data.pageNo == 1 ? [...data] : [...this.data.orderList, ...data],
noMoreFlag: data.length < pageSize ? true : false noMoreFlag: data.length < pageSize ? true : false
},()=>{ }, () => {
// this.data.orderList.forEach(item =>{ // this.data.orderList.forEach(item =>{
// console.log('item', item) // console.log('item', item)
// // 退单列表 // // 退单列表
...@@ -293,7 +301,7 @@ if(currentIndex == 5){ ...@@ -293,7 +301,7 @@ if(currentIndex == 5){
this.setData({ this.setData({
no_data: this.data.orderList.length ? true : false no_data: this.data.orderList.length ? true : false
}) })
}) })
} }
} }
...@@ -325,11 +333,11 @@ if(currentIndex == 5){ ...@@ -325,11 +333,11 @@ if(currentIndex == 5){
// }) // })
// } // }
// }) // })
// } // }
// } // }
// }) // })
// }, // },
/** /**
......
...@@ -109,25 +109,25 @@ ...@@ -109,25 +109,25 @@
<view wx:if="{{currentIndex == 5}}"> <view wx:if="{{currentIndex == 5}}">
<view class="btn-group"> <view class="btn-group">
<view class="order-status-rf" wx-if="{{item.status == 'C'}}"> <view class="order-status-rf" wx-if="{{item.status == 'C'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view> </view>
<view class="order-status-rf" wx-if="{{item.status == 'N'}}"> <view class="order-status-rf" wx-if="{{item.status == 'N'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button> <button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button>
</view> </view>
<view class="order-status-rf" wx-if="{{item.status == 'A'}}"> <view class="order-status-rf" wx-if="{{item.status == 'A'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfSend">退货寄回</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfSend">退货寄回</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button> <button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button>
</view> </view>
<view class="order-status-rf" wx-if="{{item.status == 'R'}}"> <view class="order-status-rf" wx-if="{{item.status == 'R'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view> </view>
<view class="order-status-rf" wx-if="{{item.status == 'RJ'}}"> <view class="order-status-rf" wx-if="{{item.status == 'RJ'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view> </view>
<view class="order-status-rf" wx-if="{{item.status == 'D'}}"> <view class="order-status-rf" wx-if="{{item.status == 'D'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button> <button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -140,14 +140,22 @@ ...@@ -140,14 +140,22 @@
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button> <button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button>
</view> </view>
<view class="order-status" wx-if="{{item.status == 'P'}}"> <view class="order-status" wx-if="{{item.status == 'P'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none"> <button
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button> class="btn btn-sm btn-default"
</navigator> data-id="{{item.id}}"
data-detail="{{item}}"
bindtap="checkLogistics"
>查看物流
</button>
</view> </view>
<view class="order-status" wx-if="{{item.status == 'D'}}"> <view class="order-status" wx-if="{{item.status == 'D'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none"> <button
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button> class="btn btn-sm btn-default"
</navigator> data-id="{{item.id}}"
data-detail="{{item}}"
bindtap="checkLogistics"
>查看物流
</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelConfirmReceipt">确认收货</button> <button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelConfirmReceipt">确认收货</button>
</view> </view>
<view class="order-status" wx-if="{{item.status == 'R'}}" /> <view class="order-status" wx-if="{{item.status == 'R'}}" />
......
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