反馈修改-0802
parent
ea8f7f5aca
commit
c0849dfb6e
|
@ -38,7 +38,7 @@
|
||||||
<view class="pull-footer-bg background-white pad-all20 radius30 border-box">
|
<view class="pull-footer-bg background-white pad-all20 radius30 border-box">
|
||||||
<view class="pull-footer background-grey radius30 pad-all20 border-box flex">
|
<view class="pull-footer background-grey radius30 pad-all20 border-box flex">
|
||||||
<view class="price color-ff">
|
<view class="price color-ff">
|
||||||
<view class="font36">合计:¥{{allPrice>0?allPrice:'0'}}</view>
|
<view class="font36">合计:{{allPrice>0?'¥'+allPrice:'0'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn font36 color-48 radius30 flex" :style="{background: !buyNum ? '#cccccc' : '#febf00'}" @tap="submitEv">{{allPrice==0 ? '去购物' : '立即购买'}}</view>
|
<view class="btn font36 color-48 radius30 flex" :style="{background: !buyNum ? '#cccccc' : '#febf00'}" @tap="submitEv">{{allPrice==0 ? '去购物' : '立即购买'}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -81,6 +81,11 @@
|
||||||
type: String,
|
type: String,
|
||||||
default: '20rpx'
|
default: '20rpx'
|
||||||
},
|
},
|
||||||
|
// 是否返回我的页面
|
||||||
|
ifBackMy: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -120,6 +125,11 @@
|
||||||
},
|
},
|
||||||
//返回事件
|
//返回事件
|
||||||
backEv() {
|
backEv() {
|
||||||
|
if(this.ifBackMy){
|
||||||
|
uni.reLaunch({
|
||||||
|
url:`/pages/my/my`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
fail: () => {
|
fail: () => {
|
||||||
|
@ -131,6 +141,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="tabbar border-box pad-sx40 background-white pad-zy20 flex" v-if="isLoading">
|
<view class="tabbar-box border-box pad-sx40 background-white pad-zy20 flex" v-if="isLoading">
|
||||||
<view class="content background-grey border-box color-ff flex">
|
<view class="content background-grey border-box color-ff flex">
|
||||||
<view class="nav flex" @tap="chooseFootTab(index)" v-for="(item,index) in footBarList" :key="index" v-if="current == index">
|
<view class="nav flex" @tap="chooseFootTab(index)" v-for="(item,index) in footBarList" :key="index" v-if="current == index">
|
||||||
<image :style="{width:[39,32][index]+'rpx',height:[40,38][index]+'rpx'}" :src="item.iconPath" mode="widthFix"></image>
|
<image :style="{width:[39,32][index]+'rpx',height:[40,38][index]+'rpx'}" :src="item.iconPath" mode="widthFix"></image>
|
||||||
<view class="title fon24" :class="current==index ? 'active' : ''">{{item.title}}</view>
|
<view class="title fon24" :class="current==index ? 'active' : ''">{{item.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price font60">
|
<view class="price font60">
|
||||||
<text>¥{{cartPrice>0?cartPrice:'0'}}</text>
|
<view><text>¥</text>{{cartPrice>0?this.$toolAll.tools.addXiaoShu(cartPrice):'0'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cart background-orange font36 color-48 flex" @tap="goCart">
|
<view class="cart background-orange font36 color-48 flex" @tap="goCart">
|
||||||
|
@ -41,11 +41,6 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
// 获取当前页面路径
|
// 获取当前页面路径
|
||||||
this.$toolAll.tools.obtainPagePath();
|
this.$toolAll.tools.obtainPagePath();
|
||||||
// 缓存状态栏+标题栏的高度
|
|
||||||
const query = wx.createSelectorQuery().in(this)
|
|
||||||
query.select('.tabbar').boundingClientRect((rect) => {
|
|
||||||
this.$store.commit('footHeightEv',rect.height);
|
|
||||||
}).exec()
|
|
||||||
// 获取底部信息
|
// 获取底部信息
|
||||||
this.getTabbarList();
|
this.getTabbarList();
|
||||||
},
|
},
|
||||||
|
@ -104,7 +99,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.tabbar{
|
.tabbar-box{
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
// 提交
|
// 提交
|
||||||
goOrder(){
|
goOrder(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pagesA/order/detail?id=${this.id}`
|
url:`/pagesA/order/detail?id=${this.id}&backTag=backmy`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 继续购物
|
// 继续购物
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<view class="title">积分抵扣</view>
|
<view class="title">积分抵扣</view>
|
||||||
<view class="section-list font30">
|
<view class="section-list font30">
|
||||||
<view class="item flex">
|
<view class="item flex">
|
||||||
<label class="radio" @tap="scoreCheck=!scoreCheck">
|
<label class="radio" @tap="chooseEv('score')">
|
||||||
<radio :checked="scoreCheck" color="#febf00" :disabled="orderInfo.available_score>0?false:true"/>
|
<radio :checked="scoreCheck" color="#febf00" :disabled="orderInfo.available_score>0?false:true"/>
|
||||||
<text>可用积分</text>
|
<text>可用积分</text>
|
||||||
</label>
|
</label>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<view class="pull-footer-bg background-white pad-all20 radius30 border-box">
|
<view class="pull-footer-bg background-white pad-all20 radius30 border-box">
|
||||||
<view class="pull-footer background-grey radius30 pad-all20 border-box flex">
|
<view class="pull-footer background-grey radius30 pad-all20 border-box flex">
|
||||||
<view class="price color-ff" style="margin-left: 24rpx;">
|
<view class="price color-ff" style="margin-left: 24rpx;">
|
||||||
<view class="font36 flex">合计:<span>¥{{totalPrice}}</span></view>
|
<view class="font36 flex">合计:<text v-if="totalPrice>0">¥</text>{{totalPrice}}</view>
|
||||||
<text class="font26" v-if="discountPrice>0">总优惠:¥{{discountPrice}}</text>
|
<text class="font26" v-if="discountPrice>0">总优惠:¥{{discountPrice}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn font36 color-48 background-orange radius30 flex" @tap="submitEv">立即支付</view>
|
<view class="btn font36 color-48 background-orange radius30 flex" @tap="submitEv">立即支付</view>
|
||||||
|
@ -155,6 +155,7 @@
|
||||||
totalPrice:'',//总价
|
totalPrice:'',//总价
|
||||||
discountPrice:'', //优惠价格
|
discountPrice:'', //优惠价格
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
|
score_rule: 1, //多少积分抵扣
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -170,19 +171,62 @@
|
||||||
|
|
||||||
// 计算价格
|
// 计算价格
|
||||||
computePrice(){
|
computePrice(){
|
||||||
// 计算优惠价格
|
// 原需支付
|
||||||
if(this.vipCheck && !this.couponCheck){
|
let totalNum = this.orderInfo.total_price;
|
||||||
this.discountPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price*(1 - this.$toolAll.tools.addXiaoShu(this.orderInfo.membership_discount)/10));
|
totalNum = parseFloat(this.$toolAll.tools.addXiaoShu(totalNum));
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price-this.discountPrice);
|
let totalPrice = this.$toolAll.tools.addXiaoShu(totalNum);
|
||||||
|
// 会员折扣
|
||||||
|
let vipNum = this.orderInfo.vip_level>0?this.orderInfo.total_price*(1 - this.$toolAll.tools.addXiaoShu(this.orderInfo.membership_discount)/10):0;
|
||||||
|
vipNum = parseFloat(this.$toolAll.tools.addXiaoShu(vipNum));
|
||||||
|
let vipPrice = this.$toolAll.tools.addXiaoShu(vipNum);
|
||||||
|
// 优惠券折扣
|
||||||
|
let couponNum = this.couponList.length>0?this.couponList[this.couponIndex].amount:0;
|
||||||
|
couponNum = parseFloat(this.$toolAll.tools.addXiaoShu(couponNum));
|
||||||
|
let couponPrice = this.$toolAll.tools.addXiaoShu(couponNum);
|
||||||
|
// 积分可抵扣额度
|
||||||
|
let scoreNum = this.orderInfo.available_score*this.score_rule;
|
||||||
|
scoreNum = parseFloat(this.$toolAll.tools.addXiaoShu(scoreNum));
|
||||||
|
let scorePrice = this.$toolAll.tools.addXiaoShu(scoreNum);
|
||||||
|
|
||||||
|
// 只有会员则扣
|
||||||
|
if(this.vipCheck && !this.scoreCheck){
|
||||||
|
this.discountPrice = vipPrice;
|
||||||
}
|
}
|
||||||
if(this.couponCheck && !this.vipCheck){
|
// 只有优惠券
|
||||||
this.discountPrice = this.$toolAll.tools.addXiaoShu(this.couponList[this.couponIndex].amount);
|
if(this.couponCheck && !this.scoreCheck){
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price - this.discountPrice);
|
this.discountPrice = couponPrice;
|
||||||
}
|
}
|
||||||
if(!this.couponCheck && !this.vipCheck){
|
// 只有积分
|
||||||
|
if(!this.vipCheck && !this.couponCheck && this.scoreCheck){
|
||||||
|
if(scoreNum >= totalNum){
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
}else{
|
||||||
|
this.discountPrice = scorePrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 会员折扣+积分
|
||||||
|
if(this.vipCheck && this.scoreCheck){
|
||||||
|
if(scoreNum + vipNum >= totalNum){
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
}else{
|
||||||
|
this.discountPrice = scorePrice + vipPrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 优惠券+积分
|
||||||
|
if(this.couponCheck && this.scoreCheck){
|
||||||
|
if(scoreNum + couponNum >= totalNum){
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
}else{
|
||||||
|
this.discountPrice = scorePrice + couponPrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 都不选择
|
||||||
|
if(!this.vipCheck && !this.couponCheck && !this.scoreCheck){
|
||||||
this.discountPrice = 0;
|
this.discountPrice = 0;
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price);
|
this.totalPrice = totalPrice;
|
||||||
}
|
}
|
||||||
|
// 计算支付价格
|
||||||
|
this.totalPrice = totalPrice - this.discountPrice;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取订单准备信息
|
// 获取订单准备信息
|
||||||
|
@ -212,6 +256,11 @@
|
||||||
// 商品信息
|
// 商品信息
|
||||||
this.orderShopList = res.data.list;
|
this.orderShopList = res.data.list;
|
||||||
|
|
||||||
|
// 积分抵扣规则
|
||||||
|
let score_num = res.data.integral_rule.deduction_points_score;
|
||||||
|
let score_value = res.data.integral_rule.deduction_points_score_value;
|
||||||
|
this.score_rule = parseFloat(score_value)/parseFloat(score_num);
|
||||||
|
|
||||||
// 地址信息
|
// 地址信息
|
||||||
let addr_id = uni.getStorageSync('addr_id');
|
let addr_id = uni.getStorageSync('addr_id');
|
||||||
if(addr_id){
|
if(addr_id){
|
||||||
|
@ -220,7 +269,9 @@
|
||||||
}else{
|
}else{
|
||||||
this.default_address = res.data.default_address;
|
this.default_address = res.data.default_address;
|
||||||
}
|
}
|
||||||
// 计算价格
|
|
||||||
|
|
||||||
|
// 价格
|
||||||
this.discountPrice = 0;
|
this.discountPrice = 0;
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price);
|
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price);
|
||||||
}
|
}
|
||||||
|
@ -260,6 +311,8 @@
|
||||||
this.isCoupon = false;
|
this.isCoupon = false;
|
||||||
this.vipCheck = false;
|
this.vipCheck = false;
|
||||||
this.couponCheck = true;
|
this.couponCheck = true;
|
||||||
|
// 计算价格
|
||||||
|
this.computePrice();
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消选择
|
//取消选择
|
||||||
|
@ -288,6 +341,14 @@
|
||||||
}
|
}
|
||||||
this.computePrice();
|
this.computePrice();
|
||||||
}
|
}
|
||||||
|
if(type == 'score' && this.orderInfo.available_score>0){
|
||||||
|
if(this.scoreCheck){
|
||||||
|
this.scoreCheck = false;
|
||||||
|
}else{
|
||||||
|
this.scoreCheck = true;
|
||||||
|
}
|
||||||
|
this.computePrice();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
|
@ -363,8 +424,14 @@
|
||||||
url:`/pages/cart/finish?id=${id}`
|
url:`/pages/cart/finish?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
'fail': function (res) { // 接口调用失败的回调函数
|
'fail': (res)=> { // 接口调用失败的回调函数
|
||||||
console.log('支付失败:' + JSON.stringify(res));
|
this.$toolAll.tools.showToast('您已取消支付');
|
||||||
|
setTimeout(()=>{
|
||||||
|
// 页面跳转
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesA/order/order?index=1&backTag=nopay`
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pad-x170" v-if="isLoading">
|
<view class="pad-x170" v-if="isLoading">
|
||||||
<status-nav :ifReturn="true" navBarTitle="订单详情" :marginBottom="0"></status-nav>
|
<status-nav :ifReturn="true" navBarTitle="订单详情" :marginBottom="0" :ifBackMy="ifBackMy"></status-nav>
|
||||||
<!-- 收件人信息 -->
|
<!-- 收件人信息 -->
|
||||||
<view class="settlement-content pad-zy20 border-box">
|
<view class="settlement-content pad-zy20 border-box">
|
||||||
<!-- 订单简介 -->
|
<!-- 订单简介 -->
|
||||||
|
@ -105,12 +105,12 @@
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
id:0, //订单id
|
id:0, //订单id
|
||||||
priceAll:'', //实际付款
|
priceAll:'', //实际付款
|
||||||
|
ifBackMy:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
if(op.id !== ''){
|
if(op.id){this.id = op.id;}
|
||||||
this.id = op.id;
|
if(op.backTag){this.ifBackMy = true;}
|
||||||
}
|
|
||||||
this.getOrderDetail();
|
this.getOrderDetail();
|
||||||
},
|
},
|
||||||
// 分享到微信
|
// 分享到微信
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view v-if="isLoading">
|
<view v-if="isLoading">
|
||||||
<status-nav :ifReturn="true" navBarTitle="订单管理" :marginBottom="0"></status-nav>
|
<status-nav :ifReturn="true" navBarTitle="订单管理" :ifBackMy="ifBackMy" :marginBottom="0"></status-nav>
|
||||||
<!-- 订单搜索 -->
|
<!-- 订单搜索 -->
|
||||||
<view class="order-search">
|
<view class="order-search">
|
||||||
<input class="input font30 pad-zy40 color-66 radius20 border-box" v-model="order_coding" type="text" placeholder="请输入订单编号" confirm-type="search" @confirm="doSearch" placeholder-style="color:#666666">
|
<input class="input font30 pad-zy40 color-66 radius20 border-box" v-model="order_coding" type="text" placeholder="请输入订单编号" confirm-type="search" @confirm="doSearch" placeholder-style="color:#666666">
|
||||||
|
@ -88,15 +88,13 @@
|
||||||
size: 10,
|
size: 10,
|
||||||
tag: 'all',
|
tag: 'all',
|
||||||
order_coding:'', //订单号
|
order_coding:'', //订单号
|
||||||
|
ifBackMy:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
if(op.tag !== ''){
|
if(op.tag){this.tag = op.tag;}
|
||||||
this.tag = op.tag;
|
if(op.index){this.activeIndex = op.index;}
|
||||||
}
|
if(op.backTag){this.ifBackMy = true;}
|
||||||
if(op.index !== ''){
|
|
||||||
this.activeIndex = op.index;
|
|
||||||
}
|
|
||||||
this.navWidth = this.orderNav.length*150 - 20 + 'rpx';
|
this.navWidth = this.orderNav.length*150 - 20 + 'rpx';
|
||||||
// 分类切换效果
|
// 分类切换效果
|
||||||
this.setTabList();
|
this.setTabList();
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
<view class="data-v-48b8e4cc"><view class="change-all border-box background-white font26 flex data-v-48b8e4cc" style="{{'top:'+(statusHeight+50+'px')+';'}}"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label flex data-v-48b8e4cc" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#febf00" class="data-v-48b8e4cc"></radio><text class="data-v-48b8e4cc">全选</text></label><view data-event-opts="{{[['tap',[['delShopEv',['$event']]]]]}}" class="del-cart data-v-48b8e4cc" bindtap="__e">删除</view></view><view class="slide-list data-v-48b8e4cc"><block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="slide-item-li border-box background-white flex data-v-48b8e4cc" catchtap="__e"><label data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" class="radio data-v-48b8e4cc" catchtap="__e"><radio checked="{{item.ifcheck}}" color="#febf00" class="data-v-48b8e4cc"></radio></label><view class="shop-img radius30 data-v-48b8e4cc"><image src="{{item.image}}" mode="widthFix" class="data-v-48b8e4cc"></image></view><view class="shop-txt data-v-48b8e4cc"><view class="shop-txt-top data-v-48b8e4cc"><view class="title font30 clips1 data-v-48b8e4cc">{{item.title}}</view><view class="specs font24 color-66 mar-sx10 clips2 data-v-48b8e4cc">{{"规格:"+item.skuName}}</view></view><view class="shop-txt-bottom flex data-v-48b8e4cc"><view class="price font30 color-red data-v-48b8e4cc">{{"¥"+item.price}}</view><view class="num font24 flex data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn fon24 color-ff radius10 flex _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==minNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view><input class="input border-box radius10 data-v-48b8e4cc" type="digit" disabled="{{item.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn fon24 color-ff radius10 flex _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==maxNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="pull-footer-bg background-white pad-all20 radius30 border-box data-v-48b8e4cc"><view class="pull-footer background-grey radius30 pad-all20 border-box flex data-v-48b8e4cc"><view class="price color-ff data-v-48b8e4cc"><view class="font36 data-v-48b8e4cc">{{"合计:¥"+(allPrice>0?allPrice:'0')}}</view></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn font36 color-48 radius30 flex data-v-48b8e4cc" style="{{'background:'+(!buyNum?'#cccccc':'#febf00')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'立即购买'}}</view></view></view><block wx:if="{{listData.length!=0&&total==listData.length}}"><view class="data-v-48b8e4cc"><pitera vue-id="ce62b2a8-1" textStr="—— 到底啦 ——" class="data-v-48b8e4cc" bind:__l="__l"></pitera></view></block><block wx:if="{{!ifLoading&&!listData.length}}"><nothing-page vue-id="ce62b2a8-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-48b8e4cc" bind:__l="__l"></nothing-page></block></view>
|
<view class="data-v-48b8e4cc"><view class="change-all border-box background-white font26 flex data-v-48b8e4cc" style="{{'top:'+(statusHeight+50+'px')+';'}}"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label flex data-v-48b8e4cc" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#febf00" class="data-v-48b8e4cc"></radio><text class="data-v-48b8e4cc">全选</text></label><view data-event-opts="{{[['tap',[['delShopEv',['$event']]]]]}}" class="del-cart data-v-48b8e4cc" bindtap="__e">删除</view></view><view class="slide-list data-v-48b8e4cc"><block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="slide-item-li border-box background-white flex data-v-48b8e4cc" catchtap="__e"><label data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" class="radio data-v-48b8e4cc" catchtap="__e"><radio checked="{{item.ifcheck}}" color="#febf00" class="data-v-48b8e4cc"></radio></label><view class="shop-img radius30 data-v-48b8e4cc"><image src="{{item.image}}" mode="widthFix" class="data-v-48b8e4cc"></image></view><view class="shop-txt data-v-48b8e4cc"><view class="shop-txt-top data-v-48b8e4cc"><view class="title font30 clips1 data-v-48b8e4cc">{{item.title}}</view><view class="specs font24 color-66 mar-sx10 clips2 data-v-48b8e4cc">{{"规格:"+item.skuName}}</view></view><view class="shop-txt-bottom flex data-v-48b8e4cc"><view class="price font30 color-red data-v-48b8e4cc">{{"¥"+item.price}}</view><view class="num font24 flex data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn fon24 color-ff radius10 flex _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==minNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view><input class="input border-box radius10 data-v-48b8e4cc" type="digit" disabled="{{item.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn fon24 color-ff radius10 flex _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==maxNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="pull-footer-bg background-white pad-all20 radius30 border-box data-v-48b8e4cc"><view class="pull-footer background-grey radius30 pad-all20 border-box flex data-v-48b8e4cc"><view class="price color-ff data-v-48b8e4cc"><view class="font36 data-v-48b8e4cc">{{"合计:"+(allPrice>0?'¥'+allPrice:'0')}}</view></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn font36 color-48 radius30 flex data-v-48b8e4cc" style="{{'background:'+(!buyNum?'#cccccc':'#febf00')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'立即购买'}}</view></view></view><block wx:if="{{listData.length!=0&&total==listData.length}}"><view class="data-v-48b8e4cc"><pitera vue-id="ce62b2a8-1" textStr="—— 到底啦 ——" class="data-v-48b8e4cc" bind:__l="__l"></pitera></view></block><block wx:if="{{!ifLoading&&!listData.length}}"><nothing-page vue-id="ce62b2a8-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-48b8e4cc" bind:__l="__l"></nothing-page></block></view>
|
|
@ -195,7 +195,12 @@ var _default =
|
||||||
// 底部距离内容多高
|
// 底部距离内容多高
|
||||||
marginBottom: {
|
marginBottom: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '20rpx' } },
|
default: '20rpx' },
|
||||||
|
|
||||||
|
// 是否返回我的页面
|
||||||
|
ifBackMy: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false } },
|
||||||
|
|
||||||
|
|
||||||
data: function data() {
|
data: function data() {
|
||||||
|
@ -236,6 +241,11 @@ var _default =
|
||||||
},
|
},
|
||||||
//返回事件
|
//返回事件
|
||||||
backEv: function backEv() {
|
backEv: function backEv() {
|
||||||
|
if (this.ifBackMy) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/my/my" });
|
||||||
|
|
||||||
|
} else {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
fail: function fail() {
|
fail: function fail() {
|
||||||
|
@ -244,6 +254,7 @@ var _default =
|
||||||
|
|
||||||
} });
|
} });
|
||||||
|
|
||||||
|
}
|
||||||
} } };exports.default = _default;
|
} } };exports.default = _default;
|
||||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,18 @@ var render = function() {
|
||||||
var _vm = this
|
var _vm = this
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
|
var g0 =
|
||||||
|
_vm.isLoading && _vm.cartPrice > 0
|
||||||
|
? this.$toolAll.tools.addXiaoShu(_vm.cartPrice)
|
||||||
|
: null
|
||||||
|
_vm.$mp.data = Object.assign(
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
$root: {
|
||||||
|
g0: g0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
var recyclableRender = false
|
var recyclableRender = false
|
||||||
var staticRenderFns = []
|
var staticRenderFns = []
|
||||||
|
@ -154,14 +166,9 @@ var _default = {
|
||||||
isLoading: false };
|
isLoading: false };
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted: function mounted() {var _this = this;
|
mounted: function mounted() {
|
||||||
// 获取当前页面路径
|
// 获取当前页面路径
|
||||||
this.$toolAll.tools.obtainPagePath();
|
this.$toolAll.tools.obtainPagePath();
|
||||||
// 缓存状态栏+标题栏的高度
|
|
||||||
var query = wx.createSelectorQuery().in(this);
|
|
||||||
query.select('.tabbar').boundingClientRect(function (rect) {
|
|
||||||
_this.$store.commit('footHeightEv', rect.height);
|
|
||||||
}).exec();
|
|
||||||
// 获取底部信息
|
// 获取底部信息
|
||||||
this.getTabbarList();
|
this.getTabbarList();
|
||||||
},
|
},
|
||||||
|
@ -173,22 +180,22 @@ var _default = {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 获取底部信息
|
// 获取底部信息
|
||||||
getTabbarList: function getTabbarList() {var _this2 = this;
|
getTabbarList: function getTabbarList() {var _this = this;
|
||||||
this.$requst.get('/api/index/mini-program-setting').then(function (res) {
|
this.$requst.get('/api/index/mini-program-setting').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '底部信息');
|
console.log(res, '底部信息');
|
||||||
var tabbarArr = [];
|
var tabbarArr = [];
|
||||||
res.data.footBar.forEach(function (item) {
|
res.data.footBar.forEach(function (item) {
|
||||||
var obj = {
|
var obj = {
|
||||||
iconPath: _this2.$hostHttp + item.icon,
|
iconPath: _this.$hostHttp + item.icon,
|
||||||
title: item.name };
|
title: item.name };
|
||||||
|
|
||||||
tabbarArr.push(obj);
|
tabbarArr.push(obj);
|
||||||
});
|
});
|
||||||
_this2.footBarList = tabbarArr;
|
_this.footBarList = tabbarArr;
|
||||||
// 查询购物车信息
|
// 查询购物车信息
|
||||||
(0, _publicApi.getCartInfo)();
|
(0, _publicApi.getCartInfo)();
|
||||||
_this2.isLoading = true;
|
_this.isLoading = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<block wx:if="{{isLoading}}"><view class="tabbar border-box pad-sx40 background-white pad-zy20 flex"><view class="content background-grey border-box color-ff flex"><block wx:for="{{footBarList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{current==index}}"><view data-event-opts="{{[['tap',[['chooseFootTab',[index]]]]]}}" class="nav flex" bindtap="__e"><image style="{{'width:'+([39,32][index]+'rpx')+';'+('height:'+([40,38][index]+'rpx')+';')}}" src="{{item.iconPath}}" mode="widthFix"></image><view class="{{['title','fon24',current==index?'active':'']}}">{{item.title}}</view></view></block></block><view class="price font60"><text>{{"¥"+(cartPrice>0?cartPrice:'0')}}</text></view></view><view data-event-opts="{{[['tap',[['goCart',['$event']]]]]}}" class="cart background-orange font36 color-48 flex" bindtap="__e"><text>购物车</text><block wx:if="{{cartNum*1<=99}}"><view class="amount font26">(<text>{{cartNum}}</text>)</view></block><block wx:if="{{cartNum*1>99}}"><view class="amount font26">(<text>99</text>)</view></block></view></view></block>
|
<block wx:if="{{isLoading}}"><view class="tabbar-box border-box pad-sx40 background-white pad-zy20 flex"><view class="content background-grey border-box color-ff flex"><block wx:for="{{footBarList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{current==index}}"><view data-event-opts="{{[['tap',[['chooseFootTab',[index]]]]]}}" class="nav flex" bindtap="__e"><image style="{{'width:'+([39,32][index]+'rpx')+';'+('height:'+([40,38][index]+'rpx')+';')}}" src="{{item.iconPath}}" mode="widthFix"></image><view class="{{['title','fon24',current==index?'active':'']}}">{{item.title}}</view></view></block></block><view class="price font60"><view><text>¥</text>{{cartPrice>0?$root.g0:'0'}}</view></view></view><view data-event-opts="{{[['tap',[['goCart',['$event']]]]]}}" class="cart background-orange font36 color-48 flex" bindtap="__e"><text>购物车</text><block wx:if="{{cartNum*1<=99}}"><view class="amount font26">(<text>{{cartNum}}</text>)</view></block><block wx:if="{{cartNum*1>99}}"><view class="amount font26">(<text>99</text>)</view></block></view></view></block>
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
.tabbar{
|
.tabbar-box{
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -185,7 +185,7 @@ var _default =
|
||||||
// 提交
|
// 提交
|
||||||
goOrder: function goOrder() {
|
goOrder: function goOrder() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesA/order/detail?id=".concat(this.id) });
|
url: "/pagesA/order/detail?id=".concat(this.id, "&backTag=backmy") });
|
||||||
|
|
||||||
},
|
},
|
||||||
// 继续购物
|
// 继续购物
|
||||||
|
|
|
@ -140,14 +140,10 @@ var render = function() {
|
||||||
|
|
||||||
if (!_vm._isMounted) {
|
if (!_vm._isMounted) {
|
||||||
_vm.e0 = function($event) {
|
_vm.e0 = function($event) {
|
||||||
_vm.scoreCheck = !_vm.scoreCheck
|
|
||||||
}
|
|
||||||
|
|
||||||
_vm.e1 = function($event) {
|
|
||||||
_vm.wechatCheck = !_vm.wechatCheck
|
_vm.wechatCheck = !_vm.wechatCheck
|
||||||
}
|
}
|
||||||
|
|
||||||
_vm.e2 = function($event) {
|
_vm.e1 = function($event) {
|
||||||
_vm.priceCheck = !_vm.priceCheck
|
_vm.priceCheck = !_vm.priceCheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -349,8 +345,9 @@ var _default =
|
||||||
preferential_options: 'coupon', //优惠选择
|
preferential_options: 'coupon', //优惠选择
|
||||||
totalPrice: '', //总价
|
totalPrice: '', //总价
|
||||||
discountPrice: '', //优惠价格
|
discountPrice: '', //优惠价格
|
||||||
isLoading: false };
|
isLoading: false,
|
||||||
|
score_rule: 1 //多少积分抵扣
|
||||||
|
};
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
|
@ -365,19 +362,62 @@ var _default =
|
||||||
|
|
||||||
// 计算价格
|
// 计算价格
|
||||||
computePrice: function computePrice() {
|
computePrice: function computePrice() {
|
||||||
// 计算优惠价格
|
// 原需支付
|
||||||
if (this.vipCheck && !this.couponCheck) {
|
var totalNum = this.orderInfo.total_price;
|
||||||
this.discountPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price * (1 - this.$toolAll.tools.addXiaoShu(this.orderInfo.membership_discount) / 10));
|
totalNum = parseFloat(this.$toolAll.tools.addXiaoShu(totalNum));
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price - this.discountPrice);
|
var totalPrice = this.$toolAll.tools.addXiaoShu(totalNum);
|
||||||
|
// 会员折扣
|
||||||
|
var vipNum = this.orderInfo.vip_level > 0 ? this.orderInfo.total_price * (1 - this.$toolAll.tools.addXiaoShu(this.orderInfo.membership_discount) / 10) : 0;
|
||||||
|
vipNum = parseFloat(this.$toolAll.tools.addXiaoShu(vipNum));
|
||||||
|
var vipPrice = this.$toolAll.tools.addXiaoShu(vipNum);
|
||||||
|
// 优惠券折扣
|
||||||
|
var couponNum = this.couponList.length > 0 ? this.couponList[this.couponIndex].amount : 0;
|
||||||
|
couponNum = parseFloat(this.$toolAll.tools.addXiaoShu(couponNum));
|
||||||
|
var couponPrice = this.$toolAll.tools.addXiaoShu(couponNum);
|
||||||
|
// 积分可抵扣额度
|
||||||
|
var scoreNum = this.orderInfo.available_score * this.score_rule;
|
||||||
|
scoreNum = parseFloat(this.$toolAll.tools.addXiaoShu(scoreNum));
|
||||||
|
var scorePrice = this.$toolAll.tools.addXiaoShu(scoreNum);
|
||||||
|
|
||||||
|
// 只有会员则扣
|
||||||
|
if (this.vipCheck && !this.scoreCheck) {
|
||||||
|
this.discountPrice = vipPrice;
|
||||||
}
|
}
|
||||||
if (this.couponCheck && !this.vipCheck) {
|
// 只有优惠券
|
||||||
this.discountPrice = this.$toolAll.tools.addXiaoShu(this.couponList[this.couponIndex].amount);
|
if (this.couponCheck && !this.scoreCheck) {
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price - this.discountPrice);
|
this.discountPrice = couponPrice;
|
||||||
}
|
}
|
||||||
if (!this.couponCheck && !this.vipCheck) {
|
// 只有积分
|
||||||
|
if (!this.vipCheck && !this.couponCheck && this.scoreCheck) {
|
||||||
|
if (scoreNum >= totalNum) {
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
} else {
|
||||||
|
this.discountPrice = scorePrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 会员折扣+积分
|
||||||
|
if (this.vipCheck && this.scoreCheck) {
|
||||||
|
if (scoreNum + vipNum >= totalNum) {
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
} else {
|
||||||
|
this.discountPrice = scorePrice + vipPrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 优惠券+积分
|
||||||
|
if (this.couponCheck && this.scoreCheck) {
|
||||||
|
if (scoreNum + couponNum >= totalNum) {
|
||||||
|
this.discountPrice = totalPrice;
|
||||||
|
} else {
|
||||||
|
this.discountPrice = scorePrice + couponPrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 都不选择
|
||||||
|
if (!this.vipCheck && !this.couponCheck && !this.scoreCheck) {
|
||||||
this.discountPrice = 0;
|
this.discountPrice = 0;
|
||||||
this.totalPrice = this.$toolAll.tools.addXiaoShu(this.orderInfo.total_price);
|
this.totalPrice = totalPrice;
|
||||||
}
|
}
|
||||||
|
// 计算支付价格
|
||||||
|
this.totalPrice = totalPrice - this.discountPrice;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取订单准备信息
|
// 获取订单准备信息
|
||||||
|
@ -407,6 +447,11 @@ var _default =
|
||||||
// 商品信息
|
// 商品信息
|
||||||
_this.orderShopList = res.data.list;
|
_this.orderShopList = res.data.list;
|
||||||
|
|
||||||
|
// 积分抵扣规则
|
||||||
|
var score_num = res.data.integral_rule.deduction_points_score;
|
||||||
|
var score_value = res.data.integral_rule.deduction_points_score_value;
|
||||||
|
_this.score_rule = parseFloat(score_value) / parseFloat(score_num);
|
||||||
|
|
||||||
// 地址信息
|
// 地址信息
|
||||||
var addr_id = uni.getStorageSync('addr_id');
|
var addr_id = uni.getStorageSync('addr_id');
|
||||||
if (addr_id) {
|
if (addr_id) {
|
||||||
|
@ -415,7 +460,9 @@ var _default =
|
||||||
} else {
|
} else {
|
||||||
_this.default_address = res.data.default_address;
|
_this.default_address = res.data.default_address;
|
||||||
}
|
}
|
||||||
// 计算价格
|
|
||||||
|
|
||||||
|
// 价格
|
||||||
_this.discountPrice = 0;
|
_this.discountPrice = 0;
|
||||||
_this.totalPrice = _this.$toolAll.tools.addXiaoShu(_this.orderInfo.total_price);
|
_this.totalPrice = _this.$toolAll.tools.addXiaoShu(_this.orderInfo.total_price);
|
||||||
}
|
}
|
||||||
|
@ -455,6 +502,8 @@ var _default =
|
||||||
this.isCoupon = false;
|
this.isCoupon = false;
|
||||||
this.vipCheck = false;
|
this.vipCheck = false;
|
||||||
this.couponCheck = true;
|
this.couponCheck = true;
|
||||||
|
// 计算价格
|
||||||
|
this.computePrice();
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消选择
|
//取消选择
|
||||||
|
@ -483,6 +532,14 @@ var _default =
|
||||||
}
|
}
|
||||||
this.computePrice();
|
this.computePrice();
|
||||||
}
|
}
|
||||||
|
if (type == 'score' && this.orderInfo.available_score > 0) {
|
||||||
|
if (this.scoreCheck) {
|
||||||
|
this.scoreCheck = false;
|
||||||
|
} else {
|
||||||
|
this.scoreCheck = true;
|
||||||
|
}
|
||||||
|
this.computePrice();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
|
@ -559,7 +616,13 @@ var _default =
|
||||||
|
|
||||||
},
|
},
|
||||||
'fail': function fail(res) {// 接口调用失败的回调函数
|
'fail': function fail(res) {// 接口调用失败的回调函数
|
||||||
console.log('支付失败:' + JSON.stringify(res));
|
_this4.$toolAll.tools.showToast('您已取消支付');
|
||||||
|
setTimeout(function () {
|
||||||
|
// 页面跳转
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesA/order/order?index=1&backTag=nopay" });
|
||||||
|
|
||||||
|
}, 1000);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -350,8 +350,8 @@ var _vuex = __webpack_require__(/*! vuex */ 13); //
|
||||||
//引入mapState
|
//引入mapState
|
||||||
var _default = { data: function data() {return { orderDetail: {}, //订单详情
|
var _default = { data: function data() {return { orderDetail: {}, //订单详情
|
||||||
flag: true, isLoading: false, id: 0, //订单id
|
flag: true, isLoading: false, id: 0, //订单id
|
||||||
priceAll: '' //实际付款
|
priceAll: '', //实际付款
|
||||||
};}, onLoad: function onLoad(op) {if (op.id !== '') {this.id = op.id;}this.getOrderDetail();}, // 分享到微信
|
ifBackMy: false };}, onLoad: function onLoad(op) {if (op.id) {this.id = op.id;}if (op.backTag) {this.ifBackMy = true;}this.getOrderDetail();}, // 分享到微信
|
||||||
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
||||||
onShareTimeline: function onShareTimeline(res) {}, methods: { // 查询订单详情
|
onShareTimeline: function onShareTimeline(res) {}, methods: { // 查询订单详情
|
||||||
getOrderDetail: function getOrderDetail() {var _this = this;uni.showLoading({ title: '加载中' });this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {if (res.code == 0) {console.log(res, '订单详情');_this.orderDetail = res.data;_this.priceAll = _this.$toolAll.tools.addXiaoShu(parseFloat(res.data.balance) + parseFloat(res.data.wechat));}uni.hideLoading();_this.isLoading = true;});}, // 取消订单
|
getOrderDetail: function getOrderDetail() {var _this = this;uni.showLoading({ title: '加载中' });this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {if (res.code == 0) {console.log(res, '订单详情');_this.orderDetail = res.data;_this.priceAll = _this.$toolAll.tools.addXiaoShu(parseFloat(res.data.balance) + parseFloat(res.data.wechat));}uni.hideLoading();_this.isLoading = true;});}, // 取消订单
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -283,16 +283,14 @@ var _vuex = __webpack_require__(/*! vuex */ 13); //
|
||||||
//
|
//
|
||||||
//引入mapState
|
//引入mapState
|
||||||
var _default = { data: function data() {return { newTop: uni.getSystemInfoSync().statusBarHeight + 50, orderNav: [{ title: '全部', tag: 'all' }, { title: '待付款', tag: 'waiting' }, { title: '已下单', tag: 'paid' }, { title: '已发货', tag: 'shipped' }, { title: '已完成', tag: 'completed' }], activeIndex: 0, scrollLeft: 0, tabsScrollLeft: 0, navWidth: '', //导航宽度
|
var _default = { data: function data() {return { newTop: uni.getSystemInfoSync().statusBarHeight + 50, orderNav: [{ title: '全部', tag: 'all' }, { title: '待付款', tag: 'waiting' }, { title: '已下单', tag: 'paid' }, { title: '已发货', tag: 'shipped' }, { title: '已完成', tag: 'completed' }], activeIndex: 0, scrollLeft: 0, tabsScrollLeft: 0, navWidth: '', //导航宽度
|
||||||
orderList: [], flag: true, isLoading: false, total: 0, totalAll: -1, page: 1, size: 10, tag: 'all', order_coding: '' //订单号
|
orderList: [], flag: true, isLoading: false, total: 0, totalAll: -1, page: 1, size: 10, tag: 'all', order_coding: '', //订单号
|
||||||
};}, onLoad: function onLoad(op) {if (op.tag !== '') {this.tag = op.tag;}if (op.index !== '') {this.activeIndex = op.index;}this.navWidth = this.orderNav.length * 150 - 20 + 'rpx'; // 分类切换效果
|
ifBackMy: false };}, onLoad: function onLoad(op) {if (op.tag) {this.tag = op.tag;}if (op.index) {this.activeIndex = op.index;}if (op.backTag) {this.ifBackMy = true;}this.navWidth = this.orderNav.length * 150 - 20 + 'rpx'; // 分类切换效果
|
||||||
this.setTabList();}, onShow: function onShow() {this.orderList = [];this.getOrderList();}, onReachBottom: function onReachBottom(e) {if (this.orderList.length < this.total) {this.page++;this.getOrderList();}}, // 分享到微信
|
this.setTabList();}, onShow: function onShow() {this.orderList = [];this.getOrderList();}, onReachBottom: function onReachBottom(e) {if (this.orderList.length < this.total) {this.page++;this.getOrderList();}}, // 分享到微信
|
||||||
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
||||||
onShareTimeline: function onShareTimeline(res) {}, methods: { // 导航切换
|
onShareTimeline: function onShareTimeline(res) {}, methods: { // 导航切换
|
||||||
changeNav: function changeNav(index, tag) {this.total = 0;this.totalAll = -1;this.activeIndex = index;this.tag = tag;this.orderList = [];this.page = 1;this.order_coding = '';this.getOrderList(); // 分类切换效果
|
changeNav: function changeNav(index, tag) {this.total = 0;this.totalAll = -1;this.activeIndex = index;this.tag = tag;this.orderList = [];this.page = 1;this.order_coding = '';this.getOrderList(); // 分类切换效果
|
||||||
this.setTabList();}, // 搜索订单
|
this.setTabList();}, // 搜索订单
|
||||||
doSearch: function doSearch() {this.orderList = [];
|
doSearch: function doSearch() {this.orderList = [];this.activeIndex = 0;this.tag = 'all';
|
||||||
this.activeIndex = 0;
|
|
||||||
this.tag = 'all';
|
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<block wx:if="{{isLoading}}"><view class="data-v-0d5a9fc9"><status-nav vue-id="c40c4b46-1" ifReturn="{{true}}" navBarTitle="订单管理" marginBottom="{{0}}" class="data-v-0d5a9fc9" bind:__l="__l"></status-nav><view class="order-search data-v-0d5a9fc9"><input class="input font30 pad-zy40 color-66 radius20 border-box data-v-0d5a9fc9" type="text" placeholder="请输入订单编号" confirm-type="search" placeholder-style="color:#666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','order_coding','$event',[]]]]]]}}" value="{{order_coding}}" bindconfirm="__e" bindinput="__e"/></view><view class="order-nav-bg mar-s30 data-v-0d5a9fc9" style="{{'top:'+(newTop+'px')+';'}}"><scroll-view scroll-x="true" scroll-left="{{tabsScrollLeft}}" data-event-opts="{{[['scroll',[['scroll',['$event']]]]]}}" bindscroll="__e" class="data-v-0d5a9fc9"><view class="order-nav flex data-v-0d5a9fc9" style="{{'width:'+(navWidth)+';'}}" id="tab_list"><block wx:for="{{orderNav}}" wx:for-item="item" wx:for-index="index"><view class="{{['item','font30','color-8c','radius20','data-v-0d5a9fc9',activeIndex==index?'cur':'']}}" id="tab_item" data-event-opts="{{[['tap',[['changeNav',[index,'$0'],[[['orderNav','',index,'tag']]]]]]]}}" bindtap="__e">{{item.title}}</view></block></view></scroll-view></view><view class="order-list data-v-0d5a9fc9"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="order-item data-v-0d5a9fc9" catchtap="__e"><view class="order-code flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"订单号:"+item.coding}}</text><block wx:if="{{item.status=='waiting'}}"><text class="status color-red data-v-0d5a9fc9">{{item.status_text}}</text></block><block wx:if="{{item.status=='paid'||item.status=='shipped'}}"><text class="status data-v-0d5a9fc9" style="color:#02d20b;">{{item.status_text}}</text></block><block wx:if="{{item.status=='completed'||item.status=='closed'}}"><text class="status color-99 data-v-0d5a9fc9">{{item.status_text}}</text></block></view><view class="item-bg data-v-0d5a9fc9"><block wx:for="{{item.skus}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="item flex data-v-0d5a9fc9"><view class="img data-v-0d5a9fc9"><image src="{{item1.spu_cover}}" mode="widthFix" class="data-v-0d5a9fc9"></image></view><view class="txt data-v-0d5a9fc9"><view class="title clips1 data-v-0d5a9fc9">{{item1.spu_name}}</view><view class="specs clips2 data-v-0d5a9fc9">{{"规格:"+item1.sku_name}}</view><view class="price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"¥"+item1.price}}</text><view class="data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">x</text>{{item1.num}}</view></view></view></view></block></view><view class="total-price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"合计:¥"+item.price}}</text><block wx:if="{{item.status=='waiting'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">取消订单</view><view data-event-opts="{{[['tap',[['payEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn btn-01 border-box data-v-0d5a9fc9" catchtap="__e">立即支付</view></view></block><block wx:if="{{item.status=='paid'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">取消订单</view></view></block><block wx:if="{{item.status=='shipped'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['affirmEv',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="btn btn-02 border-box background-orange data-v-0d5a9fc9" catchtap="__e">确认收货</view></view></block><block wx:if="{{item.status=='completed'||item.status=='closed'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['buyAgain',[index]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">再次购买</view></view></block></view></view></block></view><block wx:if="{{total!==0&&totalAll==total}}"><view class="no-more font24 data-v-0d5a9fc9" style="margin:0;padding:25rpx 0;"><text class="data-v-0d5a9fc9">—— 到底啦 ——</text></view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="c40c4b46-2" content="还没有相关订单哟(*^▽^*)" class="data-v-0d5a9fc9" bind:__l="__l"></nothing-page></block></view></block>
|
<block wx:if="{{isLoading}}"><view class="data-v-0d5a9fc9"><status-nav vue-id="c40c4b46-1" ifReturn="{{true}}" navBarTitle="订单管理" ifBackMy="{{ifBackMy}}" marginBottom="{{0}}" class="data-v-0d5a9fc9" bind:__l="__l"></status-nav><view class="order-search data-v-0d5a9fc9"><input class="input font30 pad-zy40 color-66 radius20 border-box data-v-0d5a9fc9" type="text" placeholder="请输入订单编号" confirm-type="search" placeholder-style="color:#666666" data-event-opts="{{[['confirm',[['doSearch',['$event']]]],['input',[['__set_model',['','order_coding','$event',[]]]]]]}}" value="{{order_coding}}" bindconfirm="__e" bindinput="__e"/></view><view class="order-nav-bg mar-s30 data-v-0d5a9fc9" style="{{'top:'+(newTop+'px')+';'}}"><scroll-view scroll-x="true" scroll-left="{{tabsScrollLeft}}" data-event-opts="{{[['scroll',[['scroll',['$event']]]]]}}" bindscroll="__e" class="data-v-0d5a9fc9"><view class="order-nav flex data-v-0d5a9fc9" style="{{'width:'+(navWidth)+';'}}" id="tab_list"><block wx:for="{{orderNav}}" wx:for-item="item" wx:for-index="index"><view class="{{['item','font30','color-8c','radius20','data-v-0d5a9fc9',activeIndex==index?'cur':'']}}" id="tab_item" data-event-opts="{{[['tap',[['changeNav',[index,'$0'],[[['orderNav','',index,'tag']]]]]]]}}" bindtap="__e">{{item.title}}</view></block></view></scroll-view></view><view class="order-list data-v-0d5a9fc9"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="order-item data-v-0d5a9fc9" catchtap="__e"><view class="order-code flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"订单号:"+item.coding}}</text><block wx:if="{{item.status=='waiting'}}"><text class="status color-red data-v-0d5a9fc9">{{item.status_text}}</text></block><block wx:if="{{item.status=='paid'||item.status=='shipped'}}"><text class="status data-v-0d5a9fc9" style="color:#02d20b;">{{item.status_text}}</text></block><block wx:if="{{item.status=='completed'||item.status=='closed'}}"><text class="status color-99 data-v-0d5a9fc9">{{item.status_text}}</text></block></view><view class="item-bg data-v-0d5a9fc9"><block wx:for="{{item.skus}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="item flex data-v-0d5a9fc9"><view class="img data-v-0d5a9fc9"><image src="{{item1.spu_cover}}" mode="widthFix" class="data-v-0d5a9fc9"></image></view><view class="txt data-v-0d5a9fc9"><view class="title clips1 data-v-0d5a9fc9">{{item1.spu_name}}</view><view class="specs clips2 data-v-0d5a9fc9">{{"规格:"+item1.sku_name}}</view><view class="price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"¥"+item1.price}}</text><view class="data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">x</text>{{item1.num}}</view></view></view></view></block></view><view class="total-price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"合计:¥"+item.price}}</text><block wx:if="{{item.status=='waiting'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">取消订单</view><view data-event-opts="{{[['tap',[['payEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn btn-01 border-box data-v-0d5a9fc9" catchtap="__e">立即支付</view></view></block><block wx:if="{{item.status=='paid'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">取消订单</view></view></block><block wx:if="{{item.status=='shipped'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['affirmEv',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="btn btn-02 border-box background-orange data-v-0d5a9fc9" catchtap="__e">确认收货</view></view></block><block wx:if="{{item.status=='completed'||item.status=='closed'}}"><view class="btns flex data-v-0d5a9fc9"><view data-event-opts="{{[['tap',[['buyAgain',[index]]]]]}}" class="btn border-box data-v-0d5a9fc9" catchtap="__e">再次购买</view></view></block></view></view></block></view><block wx:if="{{total!==0&&totalAll==total}}"><view class="no-more font24 data-v-0d5a9fc9" style="margin:0;padding:25rpx 0;"><text class="data-v-0d5a9fc9">—— 到底啦 ——</text></view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="c40c4b46-2" content="还没有相关订单哟(*^▽^*)" class="data-v-0d5a9fc9" bind:__l="__l"></nothing-page></block></view></block>
|
Loading…
Reference in New Issue