|
|
@@ -11,57 +11,116 @@
|
|
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
|
|
|
|
|
<!-- 订单列表 -->
|
|
|
- <view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
|
|
|
- <view class="i-top b-b">
|
|
|
- <text class="time">{{ item._add_time }}</text>
|
|
|
- <text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
|
|
|
- <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
|
|
|
+ <view class="order-item" v-for="(item, index) in tabItem.orderList">
|
|
|
+ <view class="order-top flex">
|
|
|
+ <view class="order-top-left">
|
|
|
+ <image class="order-top-left-image" src="../../static/img/order5.png" mode=""></image>
|
|
|
+ <view class="order-top-left-font">订单信息</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-top-right">{{ item.after_sales == 1 ? '申请售后' : item.after_sales == 2 ? '售后成功' : tabItem.text }}</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
|
|
|
- <view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">委托时间:</view>
|
|
|
+ <view class="order-info-right">{{ item.time }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">订单类型:</view>
|
|
|
+ <view class="order-info-right">{{ item.type == 2 ? '代办' : '陪诊' }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">医院:</view>
|
|
|
+ <view class="order-info-right">{{ item.hospital }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">预约人:</view>
|
|
|
+ <view class="order-info-right">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex" v-if="item.type == 2">
|
|
|
+ <view class="order-info-left">代办类型:</view>
|
|
|
+ <view class="order-info-right">{{ item.catename }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex" v-if="item.type == 1">
|
|
|
+ <view class="order-info-left">陪诊类型:</view>
|
|
|
+ <view class="order-info-right">{{ item.catename }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex" v-if="item.type == 1">
|
|
|
+ <view class="order-info-left">陪诊服务:</view>
|
|
|
+ <view class="order-info-right">{{ item.servicename }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex" v-if="item.issm == 2">
|
|
|
+ <view class="order-info-left">接送地址:</view>
|
|
|
+ <view class="order-info-right">{{ item.transfer_address }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">备注:</view>
|
|
|
+ <view class="order-info-right">{{ item.remarks || '无' }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-btn-box" v-if="tabCurrentIndex == 0">
|
|
|
+ <view class="order-btn" @click="qxorder(item)">
|
|
|
+ <image class="order-btn-icon" src="../../static/img/order3.png" mode=""></image>
|
|
|
+ <view class="order-btn-font">取消订单</view>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
- <!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
|
|
|
- <view class="right">
|
|
|
- <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
|
|
|
- <text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
|
|
|
- <text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="ordering" v-if="tabCurrentIndex == 1">
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人电话:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.phone }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="ordering-btn flex" @click="call(item)">
|
|
|
+ <image class="ordering-btn-icon" src="../../static/img/order4.png" mode=""></image>
|
|
|
+ <view class="ordering-btn-font">立即联系</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="ordering" v-if="tabCurrentIndex == 2">
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.name }}</view>
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
- <view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
|
|
|
- <view class="right">
|
|
|
- <view class="flex-start">
|
|
|
- <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
|
|
|
- <text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人电话:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.phone }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">照片:</view>
|
|
|
+ <view class="order-info-picture">
|
|
|
+ <view class="order-info-picture-item" v-for="(itm, inx) in item.images"><image :src="itm" mode=""></image></view>
|
|
|
</view>
|
|
|
- <view class="row flex">
|
|
|
- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
|
|
|
- <text class="attr-box"> x {{ goodsItem.cart_num }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="ordering-btnbox">
|
|
|
+ <view class="ordering-btnbox-left" @click="navTo('/pages/order/evaluate?unique=' + item.id)">
|
|
|
+ <image class="ordering-btnbox-left-icon" src="../../static/img/order1.png" mode=""></image>
|
|
|
+ <view class="ordering-btnbox-left-font">{{ item.after_sales == 1 ? '查看售后' : '申请售后' }}</view>
|
|
|
</view>
|
|
|
+ <view class="ordering-btnbox-right" @click="accomplish(item)"><view class="ordering-btnbox-right-font">确认完成</view></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="price-box">
|
|
|
- 共
|
|
|
- <text class="num">{{ item.cartInfo.length }}</text>
|
|
|
- 件商品 邮费
|
|
|
- <text class="price">{{ moneyNum(item.pay_postage)}}</text>
|
|
|
- 实付款
|
|
|
- <text class="price">{{ moneyNum(item.pay_price)}}</text>
|
|
|
- </view>
|
|
|
- <view class="action-box b-t" v-if="item.status != 5">
|
|
|
- <button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
|
|
|
- <button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
|
|
|
- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
|
|
|
- <button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
|
|
|
- <button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
|
|
|
+ <view class="ordering" v-if="tabCurrentIndex == 3">
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">接单人电话:</view>
|
|
|
+ <view class="order-info-right">{{ item.receiving.phone }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order-info flex">
|
|
|
+ <view class="order-info-left">照片:</view>
|
|
|
+ <view class="order-info-picture">
|
|
|
+ <view class="order-info-picture-item" v-for="(itm, inx) in item.images"><image :src="itm" mode=""></image></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="order-btn-box">
|
|
|
+ <view class="order-btn" @click="navTo('/pages/order/evaluate?unique=' + item.id)">
|
|
|
+ <image class="order-btn-icon" src="../../static/img/order1.png" mode=""></image>
|
|
|
+ <view class="order-btn-font">{{ item.after_sales == 1 ? '查看售后' : '申请售后' }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
|
@@ -71,20 +130,26 @@
|
|
|
|
|
|
<script>
|
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
+import { mapState, mapMutations } from 'vuex';
|
|
|
import empty from '@/components/empty';
|
|
|
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
|
|
|
+import { orderList, orderCancel, orderDel, orderTake, confirmation } from '@/api/order.js';
|
|
|
+import { getTime } from '@/utils/rocessor.js';
|
|
|
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
uniLoadMore,
|
|
|
empty
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
tabCurrentIndex: 0,
|
|
|
navList: [
|
|
|
{
|
|
|
state: 0,
|
|
|
- text: '待付款',
|
|
|
+ text: '待接单',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
|
@@ -92,7 +157,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 1,
|
|
|
- text: '待发货',
|
|
|
+ text: '进行中',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
|
@@ -100,7 +165,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 2,
|
|
|
- text: '待收货',
|
|
|
+ text: '待确认',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
|
@@ -108,14 +173,6 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 3,
|
|
|
- text: '待评价',
|
|
|
- loadingType: 'more',
|
|
|
- orderList: [],
|
|
|
- page: 1, //当前页数
|
|
|
- limit: 10 //每次信息条数
|
|
|
- },
|
|
|
- {
|
|
|
- state: 4,
|
|
|
text: '已完成',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
@@ -125,77 +182,124 @@ export default {
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
- onLoad(options) {
|
|
|
- /**
|
|
|
- * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
|
|
|
- * 替换onLoad下代码即可
|
|
|
- */
|
|
|
- this.tabCurrentIndex = +options.state;
|
|
|
- // #ifndef MP
|
|
|
- this.loadData();
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- if (options.state == 0) {
|
|
|
+ onShow() {
|
|
|
+ this.navList = [
|
|
|
+ {
|
|
|
+ state: 0,
|
|
|
+ text: '待接单',
|
|
|
+ loadingType: 'more',
|
|
|
+ orderList: [],
|
|
|
+ page: 1, //当前页数
|
|
|
+ limit: 10 //每次信息条数
|
|
|
+ },
|
|
|
+ {
|
|
|
+ state: 1,
|
|
|
+ text: '进行中',
|
|
|
+ loadingType: 'more',
|
|
|
+ orderList: [],
|
|
|
+ page: 1, //当前页数
|
|
|
+ limit: 10 //每次信息条数
|
|
|
+ },
|
|
|
+ {
|
|
|
+ state: 2,
|
|
|
+ text: '待确认',
|
|
|
+ loadingType: 'more',
|
|
|
+ orderList: [],
|
|
|
+ page: 1, //当前页数
|
|
|
+ limit: 10 //每次信息条数
|
|
|
+ },
|
|
|
+ {
|
|
|
+ state: 3,
|
|
|
+ text: '已完成',
|
|
|
+ loadingType: 'more',
|
|
|
+ orderList: [],
|
|
|
+ page: 1, //当前页数
|
|
|
+ limit: 10 //每次信息条数
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.tabCurrentIndex = 0;
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ // 保存地址
|
|
|
+ saveUrl();
|
|
|
+ // 登录拦截
|
|
|
+ interceptor();
|
|
|
+ } else {
|
|
|
this.loadData();
|
|
|
}
|
|
|
- // #endif
|
|
|
},
|
|
|
+ onLoad(options) {},
|
|
|
// #ifdef APP-PLUS || H5
|
|
|
- onBackPress(e){
|
|
|
+ onBackPress(e) {
|
|
|
uni.switchTab({
|
|
|
- url: '/pages/user/user',
|
|
|
+ url: '/pages/user/user'
|
|
|
});
|
|
|
return true;
|
|
|
},
|
|
|
// #endif
|
|
|
filters: {
|
|
|
- moneyNum(value){
|
|
|
- return +value;
|
|
|
- },
|
|
|
+ moneyNum(value) {
|
|
|
+ return +value;
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- // 转换金额为数字
|
|
|
- moneyNum(value){
|
|
|
- return +value;
|
|
|
+ call(item) {
|
|
|
+ console.log(item.receiving.phone);
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: item.receiving.phone //仅为示例
|
|
|
+ });
|
|
|
},
|
|
|
- // 确认收货
|
|
|
- orderTake(item, index) {
|
|
|
- let obj = this;
|
|
|
+ // 完成
|
|
|
+ accomplish(opt) {
|
|
|
+ const obj = this;
|
|
|
uni.showModal({
|
|
|
- title: '是否确认收货?',
|
|
|
- success: () => {
|
|
|
- orderTake({
|
|
|
- uni: item.order_id
|
|
|
- })
|
|
|
- .then(e => {
|
|
|
- obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确认订单成功',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ confirmation({}, opt.id).then(e => {
|
|
|
uni.showToast({
|
|
|
- title: '收货成功'
|
|
|
+ title: '确认订单成功',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 2000
|
|
|
});
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
+ obj.loadData('shua');
|
|
|
});
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- //跳转到订单详情
|
|
|
- goToOrderDetail(e) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/order/orderDetail?id=' + e.order_id
|
|
|
- });
|
|
|
+
|
|
|
+ // 转换金额为数字
|
|
|
+ moneyNum(value) {
|
|
|
+ return +value;
|
|
|
},
|
|
|
- // 申请退款
|
|
|
- orderRefund(e) {
|
|
|
+ navTo(url) {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/order/orderRefund?id=' + e.order_id
|
|
|
+ url
|
|
|
});
|
|
|
},
|
|
|
- // 订单支付
|
|
|
- orderPay(e) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
|
|
|
+ // 取消订单
|
|
|
+ qxorder(opt) {
|
|
|
+ const obj = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否取消订单',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ orderCancel({}, opt.id).then(e => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '取消订单成功',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ obj.loadData('shua');
|
|
|
+ });
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//获取订单列表
|
|
|
@@ -204,6 +308,13 @@ export default {
|
|
|
let index = this.tabCurrentIndex;
|
|
|
let navItem = this.navList[index];
|
|
|
let state = navItem.state;
|
|
|
+ if (source === 'shua') {
|
|
|
+ navItem.loaded = false;
|
|
|
+ navItem.page = 1;
|
|
|
+ navItem.limit = 10;
|
|
|
+ navItem.loadingType = 'more';
|
|
|
+ navItem.orderList = [];
|
|
|
+ }
|
|
|
if (source === 'tabChange' && navItem.loaded === true) {
|
|
|
//tab切换只有第一次需要加载数据
|
|
|
return;
|
|
|
@@ -216,23 +327,48 @@ export default {
|
|
|
//防止重复加载
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
// 修改当前对象状态为加载中
|
|
|
navItem.loadingType = 'loading';
|
|
|
|
|
|
orderList({
|
|
|
- type: state,
|
|
|
+ status: state,
|
|
|
page: navItem.page,
|
|
|
limit: navItem.limit
|
|
|
})
|
|
|
.then(({ data }) => {
|
|
|
- let arr = data.map(e => {
|
|
|
- let b = this.orderStateExp(e.status);
|
|
|
- e.stateTip = b.stateTip;
|
|
|
- e.stateTipColor = b.stateTipColor;
|
|
|
- return e;
|
|
|
+ data.forEach(e => {
|
|
|
+ if (e.remarks == undefined || e.remarks == 'undefined') {
|
|
|
+ e.remarks = '无';
|
|
|
+ }
|
|
|
+ let key = Object.keys(e.cate);
|
|
|
+ let name = '';
|
|
|
+ key.forEach(e => {
|
|
|
+ if (name == '') {
|
|
|
+ name = name + e;
|
|
|
+ } else {
|
|
|
+ name = name + '/' + e;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ e.catename = name;
|
|
|
+ let key1 = Object.keys(e.service);
|
|
|
+ let name1 = '';
|
|
|
+ e.issm = 1;
|
|
|
+ key1.forEach(es => {
|
|
|
+ console.log(e);
|
|
|
+ if (es == '上门接送') {
|
|
|
+ e.issm = 2;
|
|
|
+ }
|
|
|
+ if (name1 == '') {
|
|
|
+ name1 = name1 + es;
|
|
|
+ } else {
|
|
|
+ name1 = name1 + '/' + es;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ e.servicename = name1;
|
|
|
+ e.time = getTime(e.time);
|
|
|
});
|
|
|
- navItem.orderList = navItem.orderList.concat(arr);
|
|
|
- // console.log(navItem.orderList);
|
|
|
+ navItem.orderList = navItem.orderList.concat(data);
|
|
|
navItem.page++;
|
|
|
if (navItem.limit == data.length) {
|
|
|
//判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
@@ -258,77 +394,6 @@ export default {
|
|
|
//顶部tab点击
|
|
|
tabClick(index) {
|
|
|
this.tabCurrentIndex = index;
|
|
|
- },
|
|
|
- //删除订单
|
|
|
- deleteOrder(index) {
|
|
|
- uni.showLoading({
|
|
|
- title: '请稍后'
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
|
|
- uni.hideLoading();
|
|
|
- }, 600);
|
|
|
- },
|
|
|
- //取消订单
|
|
|
- cancelOrder(item) {
|
|
|
- uni.showModal({
|
|
|
- title: '订单取消',
|
|
|
- content: '是否取消订单?',
|
|
|
- success: e => {
|
|
|
- if (e.confirm) {
|
|
|
- uni.showLoading({
|
|
|
- title: '请稍后'
|
|
|
- });
|
|
|
- orderCancel({ id: item.order_id })
|
|
|
- .then(e => {
|
|
|
- uni.showToast({
|
|
|
- title: '取消成功',
|
|
|
- duration: 2000,
|
|
|
- position: 'top'
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
- });
|
|
|
- //取消订单后删除待付款中该项
|
|
|
- let list = this.navList[this.tabCurrentIndex].orderList;
|
|
|
- let index = list.findIndex(val => val.id === item.id);
|
|
|
- index !== -1 && list.splice(index, 1);
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- //订单状态文字和颜色
|
|
|
- orderStateExp(state) {
|
|
|
- let stateTip = '',
|
|
|
- stateTipColor = '#fa436a';
|
|
|
- switch (+state) {
|
|
|
- case 0:
|
|
|
- stateTip = '待付款';
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- stateTip = '待发货';
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- stateTip = '待收货';
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- stateTip = '待评价';
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- stateTip = '已完成';
|
|
|
- stateTipColor = '#5dbc7c';
|
|
|
- break;
|
|
|
- case 9:
|
|
|
- stateTip = '订单已关闭';
|
|
|
- stateTipColor = '#909399';
|
|
|
- break;
|
|
|
-
|
|
|
- //更多自定义
|
|
|
- }
|
|
|
- return { stateTip, stateTipColor };
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -384,163 +449,150 @@ page,
|
|
|
.uni-swiper-item {
|
|
|
height: auto;
|
|
|
}
|
|
|
+
|
|
|
.order-item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- padding-left: 30rpx;
|
|
|
- background: #fff;
|
|
|
- margin-top: 16rpx;
|
|
|
- .i-top {
|
|
|
+ width: 702rpx;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ margin: 20rpx auto 0;
|
|
|
+ padding: 24rpx;
|
|
|
+ .order-top-left {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- height: 80rpx;
|
|
|
- padding-right: 30rpx;
|
|
|
- font-size: $font-base;
|
|
|
- color: $font-color-dark;
|
|
|
- position: relative;
|
|
|
- .time {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
- .state {
|
|
|
- color: $base-color;
|
|
|
+ .order-top-left-image {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 37rpx;
|
|
|
}
|
|
|
- .del-btn {
|
|
|
- padding: 10rpx 0 10rpx 36rpx;
|
|
|
- font-size: $font-lg;
|
|
|
- color: $font-color-light;
|
|
|
- position: relative;
|
|
|
- &:after {
|
|
|
- content: '';
|
|
|
- width: 0;
|
|
|
- height: 30rpx;
|
|
|
- border-left: 1px solid $border-color-dark;
|
|
|
- position: absolute;
|
|
|
- left: 20rpx;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- }
|
|
|
+ .order-top-left-font {
|
|
|
+ margin-left: 10rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
}
|
|
|
}
|
|
|
- /* 多条商品 */
|
|
|
- .goods-box {
|
|
|
- height: 160rpx;
|
|
|
- padding: 20rpx 0;
|
|
|
- white-space: nowrap;
|
|
|
- .goods-item {
|
|
|
- width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
- display: inline-block;
|
|
|
- margin-right: 24rpx;
|
|
|
- }
|
|
|
- .goods-img {
|
|
|
- display: block;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
+ .order-top-right {
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #ff6f0f;
|
|
|
}
|
|
|
- /* 单条商品 */
|
|
|
- .goods-box-single {
|
|
|
- display: flex;
|
|
|
- padding: 20rpx 0;
|
|
|
- .goods-img {
|
|
|
- display: block;
|
|
|
- width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
+ .order-info {
|
|
|
+ margin-top: 24rpx;
|
|
|
+ align-items: flex-start;
|
|
|
+ .order-info-left {
|
|
|
+ width: 200rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #666666;
|
|
|
}
|
|
|
- .right {
|
|
|
- flex: 1;
|
|
|
+ .order-info-right {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ .order-info-picture {
|
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
- padding: 0 30rpx 0 24rpx;
|
|
|
- overflow: hidden;
|
|
|
- .row{
|
|
|
- margin-top: 10rpx;
|
|
|
- }
|
|
|
- .row_title{
|
|
|
- padding:5rpx 10rpx;
|
|
|
- background-color: #dddddd;
|
|
|
- border-radius: 10rpx;
|
|
|
- font-size: 22rpx;
|
|
|
- color: #ffffff;
|
|
|
- }
|
|
|
- .title {
|
|
|
- font-size: $font-base + 2rpx;
|
|
|
- color: $font-color-dark;
|
|
|
- line-height: 1;
|
|
|
- width: 80%;
|
|
|
- }
|
|
|
- .attr-box {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- font-size: $font-sm + 2rpx;
|
|
|
- color: $font-color-light;
|
|
|
- }
|
|
|
- .price {
|
|
|
- display: inline;
|
|
|
- font-size: $font-base + 2rpx;
|
|
|
- color: $font-color-dark;
|
|
|
- &:before {
|
|
|
- content: '¥';
|
|
|
- font-size: $font-sm;
|
|
|
-
|
|
|
+ justify-content: flex-end;
|
|
|
+ .order-info-picture-item {
|
|
|
+ width: 130rpx;
|
|
|
+ height: 130rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .price-box {
|
|
|
+ .order-btn-box {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
- align-items: baseline;
|
|
|
- padding: 20rpx 30rpx;
|
|
|
- font-size: $font-sm + 2rpx;
|
|
|
- color: $font-color-light;
|
|
|
- .num {
|
|
|
- margin: 0 8rpx;
|
|
|
- color: $font-color-dark;
|
|
|
- }
|
|
|
- .price {
|
|
|
- font-size: $font-lg;
|
|
|
- color: $font-color-dark;
|
|
|
- &:before {
|
|
|
- content: '¥';
|
|
|
- font-size: $font-sm;
|
|
|
- margin: 0 2rpx 0 8rpx;
|
|
|
+ .order-btn {
|
|
|
+ margin-top: 34rpx;
|
|
|
+ align-items: center;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ width: 181rpx;
|
|
|
+ height: 63rpx;
|
|
|
+ border: 1rpx solid #c9c9c9;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ .order-btn-icon {
|
|
|
+ width: 38rpx;
|
|
|
+ height: 38rpx;
|
|
|
+ }
|
|
|
+ .order-btn-font {
|
|
|
+ margin-left: 7rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #666666;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .action-box {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- align-items: center;
|
|
|
- height: 100rpx;
|
|
|
- position: relative;
|
|
|
- padding-right: 30rpx;
|
|
|
- }
|
|
|
- .action-btn {
|
|
|
- width: 160rpx;
|
|
|
- height: 60rpx;
|
|
|
- margin: 0;
|
|
|
- margin-left: 24rpx;
|
|
|
- padding: 0;
|
|
|
- text-align: center;
|
|
|
- line-height: 60rpx;
|
|
|
- font-size: $font-sm + 2rpx;
|
|
|
- color: $font-color-dark;
|
|
|
- background: #fff;
|
|
|
- border-radius: 100px;
|
|
|
- &:after {
|
|
|
- border-radius: 100px;
|
|
|
- }
|
|
|
- &.recom {
|
|
|
- color: $base-color;
|
|
|
- &:after {
|
|
|
- border-color: $base-color;
|
|
|
+ .ordering {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ padding: 30rpx 0 10rpx;
|
|
|
+ border-top: 1px solid #eaeced;
|
|
|
+ .ordering-btn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 38rpx auto 0;
|
|
|
+ width: 566rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: #24a17d;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ .ordering-btn-icon {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ }
|
|
|
+ .ordering-btn-font {
|
|
|
+ margin-left: 14rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
- &.evaluate {
|
|
|
- color: $color-yellow;
|
|
|
- &:after {
|
|
|
- border-color: $color-yellow;
|
|
|
+ .ordering-btnbox {
|
|
|
+ margin-top: 40rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .ordering-btnbox-left {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ line-height: 1;
|
|
|
+ .ordering-btnbox-left-icon {
|
|
|
+ width: 42rpx;
|
|
|
+ height: 42rpx;
|
|
|
+ }
|
|
|
+ .ordering-btnbox-left-font {
|
|
|
+ margin-top: 10rpx;
|
|
|
+ font-size: 20rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ordering-btnbox-right {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 556rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: #24a17d;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ .ordering-btnbox-right-font {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -555,119 +607,6 @@ page,
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
-.uni-load-more__text {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #999;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img {
|
|
|
- height: 24px;
|
|
|
- width: 24px;
|
|
|
- margin-right: 10px;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view {
|
|
|
- position: absolute;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view view {
|
|
|
- width: 6px;
|
|
|
- height: 2px;
|
|
|
- border-top-left-radius: 1px;
|
|
|
- border-bottom-left-radius: 1px;
|
|
|
- background: #999;
|
|
|
- position: absolute;
|
|
|
- opacity: 0.2;
|
|
|
- transform-origin: 50%;
|
|
|
- animation: load 1.56s ease infinite;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view view:nth-child(1) {
|
|
|
- transform: rotate(90deg);
|
|
|
- top: 2px;
|
|
|
- left: 9px;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view view:nth-child(2) {
|
|
|
- transform: rotate(180deg);
|
|
|
- top: 11px;
|
|
|
- right: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view view:nth-child(3) {
|
|
|
- transform: rotate(270deg);
|
|
|
- bottom: 2px;
|
|
|
- left: 9px;
|
|
|
-}
|
|
|
-
|
|
|
-.uni-load-more__img > view view:nth-child(4) {
|
|
|
- top: 11px;
|
|
|
- left: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.load1,
|
|
|
-.load2,
|
|
|
-.load3 {
|
|
|
- height: 24px;
|
|
|
- width: 24px;
|
|
|
-}
|
|
|
-
|
|
|
-.load2 {
|
|
|
- transform: rotate(30deg);
|
|
|
-}
|
|
|
-
|
|
|
-.load3 {
|
|
|
- transform: rotate(60deg);
|
|
|
-}
|
|
|
-
|
|
|
-.load1 view:nth-child(1) {
|
|
|
- animation-delay: 0s;
|
|
|
-}
|
|
|
-
|
|
|
-.load2 view:nth-child(1) {
|
|
|
- animation-delay: 0.13s;
|
|
|
-}
|
|
|
-
|
|
|
-.load3 view:nth-child(1) {
|
|
|
- animation-delay: 0.26s;
|
|
|
-}
|
|
|
-
|
|
|
-.load1 view:nth-child(2) {
|
|
|
- animation-delay: 0.39s;
|
|
|
-}
|
|
|
-
|
|
|
-.load2 view:nth-child(2) {
|
|
|
- animation-delay: 0.52s;
|
|
|
-}
|
|
|
-
|
|
|
-.load3 view:nth-child(2) {
|
|
|
- animation-delay: 0.65s;
|
|
|
-}
|
|
|
-
|
|
|
-.load1 view:nth-child(3) {
|
|
|
- animation-delay: 0.78s;
|
|
|
-}
|
|
|
-
|
|
|
-.load2 view:nth-child(3) {
|
|
|
- animation-delay: 0.91s;
|
|
|
-}
|
|
|
-
|
|
|
-.load3 view:nth-child(3) {
|
|
|
- animation-delay: 1.04s;
|
|
|
-}
|
|
|
-
|
|
|
-.load1 view:nth-child(4) {
|
|
|
- animation-delay: 1.17s;
|
|
|
-}
|
|
|
-
|
|
|
-.load2 view:nth-child(4) {
|
|
|
- animation-delay: 1.3s;
|
|
|
-}
|
|
|
-
|
|
|
-.load3 view:nth-child(4) {
|
|
|
- animation-delay: 1.43s;
|
|
|
-}
|
|
|
-
|
|
|
@-webkit-keyframes load {
|
|
|
0% {
|
|
|
opacity: 1;
|