Browse Source

统计

undefined
xubin 4 years ago
parent
commit
982edbc36d
18 changed files with 69 additions and 54 deletions
  1. +1
    -1
      addons/unishop/uniapp/uni-shop/pages/flash/list.vue
  2. +47
    -32
      addons/unishop/uniapp/uni-shop/pages/order/order.vue
  3. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html
  4. +13
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/chunk-vendors.7164a63c.js
  5. +0
    -13
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/chunk-vendors.73b1d7ab.js
  6. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.0f07f687.js
  7. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.338f4afc.js
  8. +1
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-address.b1b69fb9.js
  9. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.2083de58.js
  10. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.7b1d509a.js
  11. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-flash-list.80c0cd2e.js
  12. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-flash-list.88487aed.js
  13. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.88727e2f.js
  14. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.99f4d294.js
  15. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.4310eb47.js
  16. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.7b7c2d47.js
  17. +0
    -1
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.4fa16733.js
  18. +1
    -0
      addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.e23b2b52.js

+ 1
- 1
addons/unishop/uniapp/uni-shop/pages/flash/list.vue View File

@@ -4,7 +4,7 @@
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{current: tabCurrentIndex === index}"
@click="tabClick(index)">
<view class="hour">
<view>{{(new Date(item.starttime)).getFullYear()+'-'+((new Date(item.starttime)).getMonth()+1)+'-'+(new Date(item.starttime)).getDay()}}&nbsp{{item.starttime_hour}}</view>
<view>{{(new Date(item.starttime)).getFullYear()+'-'+((new Date(item.starttime)).getMonth()+1)+'-'+(new Date(item.starttime)).getDate()}}&nbsp{{item.starttime_hour}}</view>
<view class="text">{{state[item.state].text}}</view>
</view>
</view>


+ 47
- 32
addons/unishop/uniapp/uni-shop/pages/order/order.vue View File

@@ -17,12 +17,12 @@
<view v-for="(item,index) in tabItem.orderList" :key="index" class="order-item" @click="navTo('/pages/order/orderDetail?order_id='+item.order_id)">
<view class="i-top b-b">
<text class="time">{{item.createtime}}</text>
<text class="state" :style="{color: item.stateTipColor}">{{item.stateTip + (item.refund_status_text ? ':'+item.refund_status_text : '')}} </text>
<text class="state" :style="{color: item.stateTipColor}">{{item.stateTip + (item.refund_status_text ? ':'+item.refund_status_text : '')}}
</text>
<text v-if="item.state===9" class="del-btn yticon icon-lajitong" @click.stop="deleteOrder(index)"></text>
</view>

<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.products"
:key="goodsIndex">
<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.products" :key="goodsIndex">
<image class="goods-img" :src="goodsItem.image" mode="aspectFill"></image>
<view class="right">
<text class="refund" v-if="goodsItem.refund">退款成功</text>
@@ -52,7 +52,7 @@
<!-- <button class="action-btn" v-if="item.have_received != 0 && item.have_commented != 0">追加评价</button> -->
<!-- <button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">申请售后</button> -->
</view>
<!-- <view class="action-box b-t" v-if="item.state == 9 && item.status == -1">
<!-- <view class="action-box b-t" v-if="item.state == 9 && item.status == -1">
<button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">查看售后</button>
</view> -->
</view>
@@ -74,6 +74,7 @@
data() {
return {
tabCurrentIndex: 0,
// 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,5=售后
navList: [{
state: 0,
text: 'all',
@@ -103,14 +104,14 @@
// page: 1
// },
{
state: 4,
state: 3,
text: 'Completed',
loadingType: 'more',
orderList: [],
page: 1
},
{
state: 5,
state: 4,
text: 'Cancelled',
loadingType: 'more',
orderList: [],
@@ -125,6 +126,7 @@
* 修复app端点击除全部订单外的按钮进入时不加载数据的问题
* 替换onLoad下代码即可
*/
console.log(options)
this.tabCurrentIndex = +options.state;
// #ifndef MP
this.loadData()
@@ -143,6 +145,9 @@
async loadData(source) {
//这里是将订单挂载到tab列表下
let index = this.tabCurrentIndex;
// let navItem = this.navList.find((item) => {
// return item.state == (index == 3 ? '4' : index == 4 ? '9' : index);
// })
let navItem = this.navList[index];
let state = navItem.state;

@@ -162,7 +167,7 @@
navItem.loadingType = 'loading';

let result = await this.$api.request('/order/getOrders', 'GET', {
type: state,
type: state == 3 ? '4' : state == 4 ? '5' : state,
page: navItem.page,
pagesize: this.pageSize
});
@@ -191,6 +196,7 @@

//swiper 切换
changeTab(e) {
console.log(e.target)
this.tabCurrentIndex = e.target.current;
this.loadData('tabChange');
},
@@ -201,25 +207,29 @@
//删除订单
async deleteOrder(index) {
let [error, res] = await uni.showModal({
cancelText:'Cancel',
confirmText:'OK',
cancelText: 'Cancel',
confirmText: 'OK',
title: 'Confirm delete order'
});
if (res.confirm) {
if (res.confirm) {
// let index = this.tabCurrentIndex;
// let order_id = this.navList.find((item) => {
// return item.state == return item.state == (index == 3 ? '4' : index == 4 ? '9' : index);
// }).orderList[index].order_id;
let order_id = this.navList[this.tabCurrentIndex].orderList[index].order_id;
let result = await this.$api.request('/order/delete?order_id=' + order_id)
if (result) {
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
}
}
},
//取消订单
async cancelOrder(item) {
let that = this;
let [error, res] = await uni.showModal({
cancelText:'Cancel',
confirmText:'OK',
cancelText: 'Cancel',
confirmText: 'OK',
title: 'Confirm cancel order',
content: 'Unrecoverable after cancellation',
});
@@ -240,8 +250,9 @@
if (position !== -1) {
that.navList[0].orderList[position] = item;
}
// todo 已取消的添加进已取消列表

//退款后删除待付款中该项
//取消后删除待付款中该项
let list = that.navList[1].orderList;
let index = list.findIndex(val => val.order_id === item.order_id);
index !== -1 && list.splice(index, 1);
@@ -255,8 +266,8 @@
async refunded(item) {
let that = this;
let [error, res] = await uni.showModal({
cancelText:'Cancel',
confirmText:'OK',
cancelText: 'Cancel',
confirmText: 'OK',
title: 'Confirm refund',
content: 'Unrecoverable after refund',
});
@@ -281,7 +292,7 @@
that.navList[0].orderList[position] = item;
}

//取消订单后删除待付款中该项
//退款后删除待发货中该项
let list = that.navList[2].orderList;
let index = list.findIndex(val => val.order_id === item.order_id);
index !== -1 && list.splice(index, 1);
@@ -295,8 +306,8 @@
async receivedOrder(item) {
let that = this;
let [error, res] = await uni.showModal({
cancelText:'Cancel',
confirmText:'OK',
cancelText: 'Cancel',
confirmText: 'OK',
title: 'Confirm receipt'
});
if (res.confirm == true) {
@@ -305,12 +316,12 @@
});
if (res) {
// 已确认收货
let {
stateTip,
stateTipColor
} = that.orderStateExp(4);
// 更新全部订单里面的状态
let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
if (position !== -1) {
@@ -323,7 +334,7 @@
have_received: 1
});
}
//收货订单后删除待收货中该项
let list = that.navList[3].orderList;
let index = list.findIndex(val => val.order_id === item.order_id);
@@ -348,12 +359,12 @@
case 2:
stateTip = '待发货';
break;
case 3:
stateTip = '待收货';
// case 3: //
// stateTip = '待收货';
// break;
case 4: //
stateTip = '已完成';
break;
// case 4:
// stateTip = '待评价';
// break;
case 5:
stateTip = '已取消';
break;
@@ -399,7 +410,8 @@
this.receivedOrder(item);
break;
case 'evaluate':
this.$api.navTo('/pages/order/evaluate?product_id='+item.id+'&order_id='+item.order_id+'&image='+item.image+'&title='+item.title+'&spec='+item.spec);
this.$api.navTo('/pages/order/evaluate?product_id=' + item.id + '&order_id=' + item.order_id + '&image=' + item.image +
'&title=' + item.title + '&spec=' + item.spec);
break;
case 'refund':
this.$api.navTo('/pages/order/refund?order_id=' + item.order_id);
@@ -440,14 +452,14 @@
// page: 1
// },
{
state: 4,
state: 3,
text: 'Completed',
loadingType: 'more',
orderList: [],
page: 1
},
{
state: 5,
state: 4,
text: 'Cancelled',
loadingType: 'more',
orderList: [],
@@ -598,6 +610,7 @@
padding: 0 30upx 0 24upx;
overflow: hidden;
position: relative;

.title {
font-size: $font-base + 2upx;
color: $font-color-dark;
@@ -620,7 +633,8 @@
margin: 0 2upx 0 8upx;
}
}
.action-btn{

.action-btn {
width: 160rpx;
height: 60rpx;
padding: 0;
@@ -635,7 +649,8 @@
right: 30rpx;
bottom: 0;
}
.refund{

.refund {
position: absolute;
right: 30rpx;
font-size: 28rpx;


+ 1
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/index.html View File

@@ -1,3 +1,3 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>宜家自购商城</title><script>document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.73b1d7ab.js></script><script src=/h5/static/js/index.0f07f687.js></script></body></html>
})</script><link rel=stylesheet href=/h5/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/h5/static/js/chunk-vendors.7164a63c.js></script><script src=/h5/static/js/index.338f4afc.js></script></body></html>

+ 13
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/chunk-vendors.7164a63c.js
File diff suppressed because it is too large
View File


+ 0
- 13
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/chunk-vendors.73b1d7ab.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.0f07f687.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/index.338f4afc.js
File diff suppressed because it is too large
View File


addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-address.b1b69fb9.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.2083de58.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-address-addressManage.7b1d509a.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-flash-list.80c0cd2e.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-flash-list.88487aed.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.88727e2f.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-index-index.99f4d294.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.4310eb47.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-money-pay.7b7c2d47.js
File diff suppressed because it is too large
View File


+ 0
- 1
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.4fa16733.js
File diff suppressed because it is too large
View File


+ 1
- 0
addons/unishop/uniapp/uni-shop/unpackage/dist/build/h5/static/js/pages-order-order.e23b2b52.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save