2023-3-3
功能完善 微信支付
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import store from '../store/index';
|
||||
export default {
|
||||
// qq 237524947 wx15d4269d3210863d
|
||||
// BASEURI: 'http://2xpk7t.natappfree.cc/api/',
|
||||
// BASEURI: 'http://2wsiyd.natappfree.cc/api/',
|
||||
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||
// BASEURI: 'http://192.168.31.52:8083/api/',
|
||||
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="pay-type-list">
|
||||
<view class="type-item b-b" v-for="item in paymentss" :key="item.code" @click="toPayHandler(item.code)" v-if="!(type == 2 && item.code == 'balancepay')">
|
||||
<view class="type-item b-b" v-for="item in paymentss" :key="item.code" @click="toPayHandler(item.code)"
|
||||
v-if="!(type == 2 && item.code == 'balancepay')">
|
||||
<text v-if="item.code == 'wechatpay'" class="icon yticon icon-weixinzhifu"></text>
|
||||
<text v-if="item.code == 'alipay'" class="icon yticon icon-alipay"></text>
|
||||
<text v-if="item.code == 'offline'" class="icon yticon icon-weixinzhifu"></text>
|
||||
@@ -80,7 +81,9 @@ export default {
|
||||
// 用户点击支付方式处理
|
||||
async toPayHandler(code) {
|
||||
let _this = this;
|
||||
let params = { orderId: this.orderId };
|
||||
let params = {
|
||||
orderId: this.orderId
|
||||
};
|
||||
let data = {
|
||||
payment_code: code,
|
||||
payment_type: _this.type
|
||||
@@ -110,17 +113,20 @@ export default {
|
||||
}
|
||||
|
||||
let res = await Api.apiCall('get', Api.order.aliAppPay, params);
|
||||
console.log("aliAppPay》》》", res);
|
||||
if (res) {
|
||||
console.log(res);
|
||||
uni.requestPayment({
|
||||
provider: 'alipay',
|
||||
orderInfo: res,
|
||||
success: function(data) {
|
||||
console.log("aliAppPay_data》》》", data);
|
||||
let rawdataResult = JSON.parse(data.rawdata).result;
|
||||
let r = rawdataResult.split(';')[0];
|
||||
let r1 = rawdataResult.split(';')[0].length - 1;
|
||||
let r2 = rawdataResult.split(';')[0].length - 2;
|
||||
let alipayTradeAppPayResponse = JSON.parse(r.substr(0, r1)).alipay_trade_app_pay_response;
|
||||
let alipayTradeAppPayResponse = JSON.parse(r.substr(0, r1))
|
||||
.alipay_trade_app_pay_response;
|
||||
let out_trade_no = alipayTradeAppPayResponse.out_trade_no;
|
||||
_this.$common.successToShow('支付成功', () => {
|
||||
//_this.redirectHandler(res.data.payment_id)
|
||||
@@ -177,7 +183,9 @@ export default {
|
||||
* 用户余额支付
|
||||
*
|
||||
*/
|
||||
let params1 = { orderId: this.orderId };
|
||||
let params1 = {
|
||||
orderId: this.orderId
|
||||
};
|
||||
let data1 = await Api.apiCall('post', Api.order.balancePay, params1);
|
||||
console.log(data1);
|
||||
if (data1) {
|
||||
@@ -222,6 +230,7 @@ export default {
|
||||
font-size: 50upx;
|
||||
color: #303133;
|
||||
margin-top: 12upx;
|
||||
|
||||
&:before {
|
||||
content: '¥';
|
||||
font-size: 40upx;
|
||||
@@ -249,20 +258,25 @@ export default {
|
||||
width: 100upx;
|
||||
font-size: 52upx;
|
||||
}
|
||||
|
||||
.icon-erjiye-yucunkuan {
|
||||
color: #fe8e2e;
|
||||
}
|
||||
|
||||
.icon-weixinzhifu {
|
||||
color: #36cb59;
|
||||
}
|
||||
|
||||
.icon-alipay {
|
||||
color: #01aaef;
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-size: $font-lg;
|
||||
color: $font-color-dark;
|
||||
margin-bottom: 4upx;
|
||||
}
|
||||
|
||||
.con {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -271,6 +285,7 @@ export default {
|
||||
color: $font-color-light;
|
||||
}
|
||||
}
|
||||
|
||||
.mix-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
BIN
mallplusui-uniapp-app/docs/pyw_app_key.jks
Normal file
BIN
mallplusui-uniapp-app/docs/pyw_app_key.jks
Normal file
Binary file not shown.
13
mallplusui-uniapp-app/docs/签名密码及第三方登录信息.txt
Normal file
13
mallplusui-uniapp-app/docs/签名密码及第三方登录信息.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
签名密码及第三方登录信息
|
||||
|
||||
证书别名:key0
|
||||
证书签名的密码:yxt123
|
||||
|
||||
QQ登录的
|
||||
APP ID:101453048
|
||||
APP Key:80382d6bd51922ef10a182f69b84581d
|
||||
审核通过
|
||||
|
||||
微信
|
||||
AppID: wxc46a728ab3aae3c0
|
||||
AppSecret: 85f3970bdfba3d7d01fdd82bc370aeec
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "汇融云链",
|
||||
"appid" : "__UNI__FB2C9C4",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0.3",
|
||||
"versionCode" : 1003,
|
||||
"versionName" : "1.0.0.5",
|
||||
"versionCode" : 1005,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
@@ -63,7 +63,7 @@
|
||||
"sdkConfigs" : {
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx04b09a8148e4875c",
|
||||
"appid" : "wxa66597d50184d027",
|
||||
"appsecret" : "3526ec2107c123f59b5c1cb7ff23a252",
|
||||
"UniversalLinks" : ""
|
||||
},
|
||||
@@ -73,7 +73,7 @@
|
||||
},
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx04b09a8148e4875c",
|
||||
"appid" : "wxa66597d50184d027",
|
||||
"UniversalLinks" : "",
|
||||
"__platform__" : [ "android" ]
|
||||
},
|
||||
@@ -91,7 +91,7 @@
|
||||
"ad" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx04b09a8148e4875c",
|
||||
"appid" : "wxa66597d50184d027",
|
||||
"UniversalLinks" : ""
|
||||
},
|
||||
"qq" : {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="navbar">
|
||||
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
||||
<view v-for="(item, index) in navList" :key="index" class="nav-item"
|
||||
:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
||||
</view>
|
||||
|
||||
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
|
||||
<scroll-view class="list-scroll-content" scroll-y>
|
||||
<!-- 空白页 -->
|
||||
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
||||
|
||||
@@ -15,60 +16,83 @@
|
||||
<view class="i-top b-b">
|
||||
<text class="time" @click="navToDetailPage(item)">{{ item.createTime }}</text>
|
||||
<!-- <text class="state" :style="{ color: item.stateTipColor }" @click="navToDetailPage(item)">{{ item.id }}</text> -->
|
||||
<text class="state" :style="{ color: item.stateTipColor }" @click="navToDetailPage(item)">{{ item.stateTip }}</text>
|
||||
<text v-if="item.status === 12" class="del-btn yticon icon-iconfontshanchu1" @click="deleteOrder(index)"></text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }"
|
||||
@click="navToDetailPage(item)">{{ item.stateTip }}</text>
|
||||
<text v-if="item.status === 12" class="del-btn yticon icon-iconfontshanchu1"
|
||||
@click="deleteOrder(index)"></text>
|
||||
</view>
|
||||
|
||||
<scroll-view v-if="item.orderItemList.length > 1" class="goods-box" scroll-y>
|
||||
<view v-for="(goodsItem, goodsIndex) in item.orderItemList" :key="goodsIndex" class="goods-item">
|
||||
<img class="goods-img" :src="goodsItem.productPic" @click="navToDetailPage(item)" mode="aspectFill" />
|
||||
<view v-for="(goodsItem, goodsIndex) in item.orderItemList" :key="goodsIndex"
|
||||
class="goods-item">
|
||||
<img class="goods-img" :src="goodsItem.productPic" @click="navToDetailPage(item)"
|
||||
mode="aspectFill" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-if="item.orderItemList.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.orderItemList" :key="goodsIndex">
|
||||
<view v-if="item.orderItemList.length === 1" class="goods-box-single"
|
||||
v-for="(goodsItem, goodsIndex) in item.orderItemList" :key="goodsIndex">
|
||||
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill" />
|
||||
<view class="right" @click="navToDetailPage(item)">
|
||||
<text class="title clamp">{{ goodsItem.productName }}</text>
|
||||
<text class="attr-box">{{ goodsItem.productAttr }} x {{ goodsItem.productQuantity }}</text>
|
||||
<text class="price">{{ goodsItem.productPrice }}</text><br/>
|
||||
<!-- <text class="title clamp" v-if="item.status === 5">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text>
|
||||
<text class="title clamp" v-if="item.status === 3">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text> -->
|
||||
</view>
|
||||
<view class="num_price">
|
||||
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
|
||||
<text class="price">{{ goodsItem.productPrice }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;flex-direction: row;margin-right: 13px;margin-bottom: 10px;">
|
||||
<!-- <image v-if="item.status === 5||item.status === 3" style="width: 20px;height: 20px;"
|
||||
src="/static/temp//orderId.png"></image> -->
|
||||
<text style="margin-left: 5px;color: #c1c1c1;font-size: 13px;"
|
||||
v-if="item.status === 5||item.status === 3">{{item.deliveryCompany}}:</text>
|
||||
<text style="margin-left: 5px;color: #c1c1c1;font-size: 13px;"
|
||||
v-if="item.status === 5||item.status === 3">{{ item.deliverySn }}</text>
|
||||
<view class="price-box">
|
||||
共
|
||||
<text class="num">{{ item.orderItemList.length }}</text>
|
||||
件商品 实付款
|
||||
<text class="price">{{ item.payAmount }}</text>
|
||||
</view>
|
||||
<view class="action-box b-t">
|
||||
</view>
|
||||
|
||||
<view class="action-box b-t" v-if="item.status==12||item.status==3">
|
||||
<!-- <text class="state" :style="{ color: item.stateTipColor }" v-if="item.orderType == 1">正常订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-if="item.orderType == 6">秒杀订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-else-if="item.orderType == 2">拼团订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-else-if="item.orderType == 3">团购订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-else-if="item.orderType == 4">砍价订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-else-if="item.orderType == 5">积分订单</text>
|
||||
<text class="state" :style="{ color: item.stateTipColor }" v-else-if="item.orderType == 5">积分订单</text> -->
|
||||
<button v-if="item.status == 12" class="action-btn" @click="cancelOrder(item)">取消订单</button>
|
||||
<button v-if="item.status == 12" class="action-btn recom" @click="payOrder(item)">立即支付</button>
|
||||
<button v-if="item.status == 12" class="action-btn recom"
|
||||
@click="payOrder(item)">立即支付</button>
|
||||
<!-- <button v-if="item.status > 2 && item.status < 10" class="action-btn recom" @click="lookLogistics(item.id)">物流追踪</button> -->
|
||||
<button v-if="item.status < 5" class="action-btn recom" @click="applyRefund(item.id)">申请售后</button>
|
||||
<button v-if="item.status == 3" class="action-btn recom" @click="confimDelivery(item)">确认收货</button>
|
||||
<!-- <button v-if="item.status < 5" class="action-btn recom" @click="applyRefund(item.id)">申请售后</button> -->
|
||||
<button v-if="item.status == 3" class="action-btn recom"
|
||||
@click="confimDelivery(item)">确认收货</button>
|
||||
<!-- <button class="action-btn recom" hover-class="btn-hover" v-if="item.status === 4" @click="toEvaluate(item.id)">立即评价</button> -->
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more :status="loadingType"></uni-load-more>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<uni-load-more :status="loadingType"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
import empty from '@/components/empty';
|
||||
import { formatDate } from '@/common/date';
|
||||
import {
|
||||
formatDate
|
||||
} from '@/common/date';
|
||||
export default {
|
||||
components: {
|
||||
mallplusCopyright,
|
||||
@@ -79,39 +103,37 @@ export default {
|
||||
return {
|
||||
tabCurrentIndex: 0,
|
||||
pageNum: 1,
|
||||
orderList: [],
|
||||
headerPosition: 'fixed',
|
||||
headerTop: '0px',
|
||||
loadingType: 'loading', //加载更多状态
|
||||
navList: [
|
||||
{
|
||||
loadingType: 'more', //加载更多状态
|
||||
navList: [{
|
||||
status: 0,
|
||||
text: '全部',
|
||||
loadingType: 'loading',
|
||||
loadingType: 'more',
|
||||
orderList: []
|
||||
},
|
||||
{
|
||||
status: 12,
|
||||
text: '待付款',
|
||||
loadingType: 'loading',
|
||||
loadingType: 'more',
|
||||
orderList: []
|
||||
},
|
||||
{
|
||||
status: 2,
|
||||
text: '待发货',
|
||||
loadingType: 'loading',
|
||||
loadingType: 'more',
|
||||
orderList: []
|
||||
},
|
||||
{
|
||||
status: 3,
|
||||
text: '已发货',
|
||||
loadingType: 'loading',
|
||||
loadingType: 'more',
|
||||
orderList: []
|
||||
},
|
||||
{
|
||||
status: 5,
|
||||
text: '已完成',
|
||||
loadingType: 'loading',
|
||||
loadingType: 'more',
|
||||
orderList: []
|
||||
}
|
||||
]
|
||||
@@ -139,11 +161,22 @@ export default {
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.loadData('refresh');
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 2000);
|
||||
},
|
||||
onShow() {
|
||||
this.pageNum = 1;
|
||||
this.loadData('refresh');
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 2000);
|
||||
},
|
||||
//加载更多
|
||||
onReachBottom() {
|
||||
this.pageNum = this.pageNum + 1;
|
||||
this.loadData('refresh');
|
||||
this.loadData();
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(['hasLogin', 'userInfo'])
|
||||
@@ -159,6 +192,15 @@ export default {
|
||||
},
|
||||
//获取订单列表
|
||||
async loadData(type = 'add', loading) {
|
||||
//没有更多直接返回
|
||||
if (type === 'add') {
|
||||
if (this.loadingType === 'nomore') {
|
||||
return;
|
||||
}
|
||||
this.loadingType = 'loading';
|
||||
} else {
|
||||
this.loadingType = 'more';
|
||||
}
|
||||
//这里是将订单挂载到tab列表下
|
||||
let index = this.tabCurrentIndex;
|
||||
let navItem = this.navList[index];
|
||||
@@ -166,12 +208,16 @@ export default {
|
||||
let status = navItem.status;
|
||||
let url;
|
||||
|
||||
let params = { pageNum: this.pageNum, status: status };
|
||||
let params = {
|
||||
pageNum: this.pageNum,
|
||||
status: status
|
||||
};
|
||||
console.log("params:------" + JSON.stringify(params))
|
||||
let data = await Api.apiCall('get', Api.order.orderList, params);
|
||||
console.log("data:------" + data)
|
||||
let goodsList = data.records;
|
||||
let goodsListJson = JSON.stringify(goodsList)
|
||||
console.log("goodsList:"+goodsListJson)
|
||||
// console.log("goodsList:" + goodsListJson)
|
||||
let orderList = goodsList.filter(item => {
|
||||
//添加不同状态下订单的表现形式
|
||||
item = Object.assign(item, this.orderStateExp(item.status));
|
||||
@@ -185,13 +231,15 @@ export default {
|
||||
});
|
||||
|
||||
if (type === 'refresh') {
|
||||
this.orderList = [];
|
||||
navItem.orderList = [];
|
||||
}
|
||||
this.orderList = this.orderList.concat(orderList);
|
||||
console.log("this.orderList.length======:"+this.orderList.length)
|
||||
navItem.orderList = navItem.orderList.concat(orderList);
|
||||
console.log("data.total======:" + data.total)
|
||||
console.log("length======:" + navItem.orderList.length)
|
||||
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
|
||||
this.loadingType = this.orderList.length >= data.total ? 'nomore' : 'loading';
|
||||
this.loadingType = navItem.orderList.length >= data.total ? 'nomore' : 'more';
|
||||
console.log("type======:" + type)
|
||||
console.log("loadingType======:" + this.loadingType)
|
||||
if (type === 'refresh') {
|
||||
if (loading == 1) {
|
||||
uni.hideLoading();
|
||||
@@ -200,12 +248,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
navItem.orderList = [];
|
||||
console.log(orderList)
|
||||
orderList.forEach(item => {
|
||||
console.log("item-----:"+item)
|
||||
navItem.orderList.push(item);
|
||||
});
|
||||
},
|
||||
|
||||
//swiper 切换
|
||||
@@ -239,19 +281,23 @@ export default {
|
||||
},
|
||||
//取消订单
|
||||
async cancelOrder(item) {
|
||||
let params = { orderId: item.id };
|
||||
let params = {
|
||||
orderId: item.id
|
||||
};
|
||||
let data = await Api.apiCall('post', Api.order.closeOrder, params);
|
||||
console.log(data)
|
||||
if (data) {
|
||||
this.$api.msg(data);
|
||||
this.pageNum = 1;
|
||||
this.loadData('refresh');
|
||||
this.tabCurrentIndex = 4;
|
||||
this.tabCurrentIndex = 1;
|
||||
}
|
||||
},
|
||||
//订单确认收货
|
||||
async confimDelivery(item) {
|
||||
let params = { id: item.id };
|
||||
let params = {
|
||||
id: item.id
|
||||
};
|
||||
let data = await Api.apiCall('post', Api.order.confimDelivery, params);
|
||||
console.log(data);
|
||||
if (data) {
|
||||
@@ -272,7 +318,9 @@ export default {
|
||||
|
||||
//订单申请退款
|
||||
async applyRefund1(item) {
|
||||
let params = { id: item.id };
|
||||
let params = {
|
||||
id: item.id
|
||||
};
|
||||
let data = await Api.apiCall('post', Api.order.applyRefund, params);
|
||||
if (data) {
|
||||
console.log(data);
|
||||
@@ -291,15 +339,10 @@ export default {
|
||||
orderStateExp(value) {
|
||||
let stateTip = '',
|
||||
stateTipColor = '#fa436a';
|
||||
if (value === 12) {
|
||||
stateTipColor = '#909399';
|
||||
stateTip = '待付款';
|
||||
}
|
||||
if (value === 1) {
|
||||
stateTipColor = '#909399';
|
||||
stateTip = '支付成功,没有回掉';
|
||||
}
|
||||
if (value === 2) {
|
||||
} else if (value === 2) {
|
||||
stateTip = '待发货';
|
||||
} else if (value === 3) {
|
||||
stateTip = '待收货';
|
||||
@@ -314,6 +357,9 @@ export default {
|
||||
stateTip = ' 维权已完成';
|
||||
} else if (value === 8) {
|
||||
stateTip = '待分享';
|
||||
} else if (value === 12) {
|
||||
stateTipColor = '#909399';
|
||||
stateTip = '待付款';
|
||||
} else if (value === 13) {
|
||||
stateTip = '申请退款';
|
||||
} else if (value === 14) {
|
||||
@@ -322,13 +368,14 @@ export default {
|
||||
stateTip = '已关闭';
|
||||
} else if (value === 16) {
|
||||
stateTip = '无效订单';
|
||||
} else if (value === 18) {
|
||||
stateTip = '拼团下单';
|
||||
} else {
|
||||
stateTip = '待付款';
|
||||
}
|
||||
|
||||
return { stateTip, stateTipColor };
|
||||
return {
|
||||
stateTip,
|
||||
stateTipColor
|
||||
};
|
||||
},
|
||||
|
||||
dateFormat(time) {
|
||||
@@ -352,6 +399,7 @@ page,
|
||||
.swiper-box {
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
|
||||
.list-scroll-content {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -364,6 +412,7 @@ page,
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.nav-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -373,8 +422,10 @@ page,
|
||||
font-size: 15px;
|
||||
color: $font-color-dark;
|
||||
position: relative;
|
||||
|
||||
&.current {
|
||||
color: $base-color;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -392,12 +443,14 @@ page,
|
||||
.uni-swiper-item {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 30upx;
|
||||
background: #fff;
|
||||
margin-top: 16upx;
|
||||
|
||||
.i-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -406,17 +459,21 @@ page,
|
||||
font-size: $font-base;
|
||||
color: $font-color-dark;
|
||||
position: relative;
|
||||
|
||||
.time {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.state {
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.del-btn {
|
||||
padding: 10upx 0 10upx 36upx;
|
||||
font-size: $font-lg;
|
||||
color: $font-color-light;
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
width: 0;
|
||||
@@ -429,51 +486,67 @@ page,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 多条商品 */
|
||||
.goods-box {
|
||||
height: 160upx;
|
||||
padding: 20upx 0;
|
||||
white-space: nowrap;
|
||||
|
||||
.goods-item {
|
||||
width: 120upx;
|
||||
height: 120upx;
|
||||
display: inline-block;
|
||||
margin-right: 24upx;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 单条商品 */
|
||||
.goods-box-single {
|
||||
display: flex;
|
||||
padding: 20upx 0;
|
||||
|
||||
.goods-img {
|
||||
display: block;
|
||||
width: 120upx;
|
||||
height: 120upx;
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 30upx 0 24upx;
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
font-size: $font-base + 2upx;
|
||||
color: $font-color-dark;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.num_price {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 5px;
|
||||
|
||||
.attr-box {
|
||||
flex: 1;
|
||||
font-size: $font-sm + 2upx;
|
||||
color: $font-color-light;
|
||||
padding: 10upx 12upx;
|
||||
margin: 0 2upx 0 8upx;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: $font-base + 2upx;
|
||||
color: $font-color-dark;
|
||||
|
||||
&:before {
|
||||
content: '¥';
|
||||
font-size: $font-sm;
|
||||
@@ -481,22 +554,28 @@ page,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.price-box {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: baseline;
|
||||
padding: 20upx 30upx;
|
||||
font-size: $font-sm + 2upx;
|
||||
color: $font-color-light;
|
||||
|
||||
.num {
|
||||
margin: 0 8upx;
|
||||
color: $font-color-dark;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: $font-lg;
|
||||
color: $font-color-dark;
|
||||
|
||||
&:before {
|
||||
content: '¥';
|
||||
font-size: $font-sm;
|
||||
@@ -504,6 +583,7 @@ page,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action-box {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@@ -512,6 +592,7 @@ page,
|
||||
position: relative;
|
||||
padding-right: 30upx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
width: 160upx;
|
||||
height: 60upx;
|
||||
@@ -524,12 +605,15 @@ page,
|
||||
color: $font-color-dark;
|
||||
background: #fff;
|
||||
border-radius: 100px;
|
||||
|
||||
&:after {
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
&.recom {
|
||||
background: #fff9f9;
|
||||
color: $base-color;
|
||||
|
||||
&:after {
|
||||
border-color: #f7bcc8;
|
||||
}
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
<scroll-view class="list-scroll-content" scroll-y>
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-item">
|
||||
<view class="i-top b-b">
|
||||
<text class="state" :style="{ color: orderInfo.stateTipColor }">{{orderInfo.orderSn}}</text>
|
||||
</view>
|
||||
|
||||
<view class="i-top b-b">
|
||||
<text class="time">{{ orderInfo.createTime }}</text>
|
||||
<!-- <text class="state" :style="{ color: orderInfo.stateTipColor }" @click="navToDetailPage(item)">{{ orderInfo.id }}--</text> -->
|
||||
<text class="state"
|
||||
:style="{ color: orderInfo.stateTipColor }">{{ orderInfo.stateTip }}</text>
|
||||
<text v-if="orderInfo.status === 9" class="del-btn yticon icon-iconfontshanchu1"
|
||||
@click="deleteOrder(index)"></text>
|
||||
</view>
|
||||
<view class="i-top b-b">
|
||||
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单商品</text>
|
||||
</view>
|
||||
|
||||
<view v-if="goodsItem.type === 1" class="goods-box-single"
|
||||
@@ -22,12 +21,20 @@
|
||||
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill"></img>
|
||||
<view class="right">
|
||||
<text class="title clamp">{{ goodsItem.productName }}</text>
|
||||
<text class="attr-box">{{ goodsItem.productAttr }} x
|
||||
{{ goodsItem.productQuantity }}</text>
|
||||
<view class="num_price">
|
||||
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
|
||||
<text class="price">{{ goodsItem.productPrice }}</text>
|
||||
</view>
|
||||
<view style="display: flex;flex-direction: row;">
|
||||
<text style="color: #c1c1c1;font-size: 13px;"
|
||||
v-if="orderInfo.status === 5||orderInfo.status === 3">{{orderInfo.deliveryCompany}}:</text>
|
||||
<text style="color: #c1c1c1;font-size: 13px;"
|
||||
v-if="orderInfo.status === 5||orderInfo.status === 3">{{ orderInfo.deliverySn }}</text>
|
||||
</view>
|
||||
<view class="i-top b-b">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="i-top b-b">
|
||||
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单赠品</text>
|
||||
</view>
|
||||
<view v-if="goodsItem.type === 2" class="goods-box-single"
|
||||
@@ -39,13 +46,15 @@
|
||||
{{ goodsItem.productQuantity }}</text>
|
||||
<text class="price">{{ goodsItem.productPrice }} </text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view style="display: flex;flex-direction: column; margin-right: 13px;margin-bottom: 10px;">
|
||||
|
||||
<view class="price-box">
|
||||
共
|
||||
<text class="num">{{ orderInfo.orderItemList.length }}</text>
|
||||
件商品, 会员折扣
|
||||
<text class="price">{{ orderInfo.vipAmount }}</text>
|
||||
优惠券抵扣
|
||||
, 优惠券抵扣
|
||||
<text class="price">{{ orderInfo.couponAmount }}</text>
|
||||
</view>
|
||||
<view class="price-box">
|
||||
@@ -53,24 +62,25 @@
|
||||
<text class="price">{{ orderInfo.integrationAmount }}</text>
|
||||
, 运费
|
||||
<text class="price">{{ orderInfo.freightAmount }}</text>
|
||||
<view class="yt-list-cell b-b" v-if="groupActivity">
|
||||
<!-- <view class="yt-list-cell b-b" v-if="groupActivity">
|
||||
<text class="cell-tit clamp">活动金额</text>
|
||||
<text class="cell-tip">¥{{ groupActivity.price }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
, 实付款
|
||||
<text class="price">{{ orderInfo.payAmount }}</text>
|
||||
</view>
|
||||
<view class="action-box b-t">
|
||||
</view>
|
||||
<view class="action-box b-t" v-if="orderInfo.status==12||orderInfo.status==3">
|
||||
<button v-if="orderInfo.status == 12" class="action-btn"
|
||||
@click="cancelOrder(orderInfo)">取消订单</button>
|
||||
<button v-if="orderInfo.status == 12" class="action-btn recom"
|
||||
@click="payOrder(orderInfo)">立即支付</button>
|
||||
<button v-if="orderInfo.status <7" class="action-btn recom"
|
||||
@click="applyRefund(orderInfo.id)">申请售后</button>
|
||||
<!-- <button v-if="orderInfo.status <7" class="action-btn recom"
|
||||
@click="applyRefund(orderInfo.id)">申请售后</button> -->
|
||||
<button v-if="orderInfo.status == 3" class="action-btn recom"
|
||||
@click="confimDelivery(orderInfo)">确认收货</button>
|
||||
<button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
|
||||
@click="toEvaluate(orderInfo.id)">立即评价</button>
|
||||
<!-- <button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
|
||||
@click="toEvaluate(orderInfo.id)">立即评价</button>-->
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -101,7 +111,9 @@
|
||||
data() {
|
||||
return {
|
||||
tabCurrentIndex: 0,
|
||||
orderInfo: [],
|
||||
orderInfo: {
|
||||
orderItemList:[]
|
||||
},
|
||||
navList: [{
|
||||
status: 0,
|
||||
text: '全部',
|
||||
@@ -143,6 +155,8 @@
|
||||
this.orderInfo = await Api.apiCall('get', Api.order.orderDetail, params);
|
||||
this.orderInfo = Object.assign(this.orderInfo, this.orderStateExp(this.orderInfo.status));
|
||||
this.orderInfo.createTime = this.dateFormat(this.orderInfo.createTime);
|
||||
console.log("data:------" + JSON.stringify(this.orderInfo))
|
||||
console.log("data:------" + this.orderInfo.stateTip)
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -233,15 +247,11 @@
|
||||
orderStateExp(value) {
|
||||
let stateTip = '',
|
||||
stateTipColor = '#fa436a';
|
||||
if (value === 12) {
|
||||
stateTipColor = '#909399';
|
||||
return '待付款';
|
||||
}
|
||||
|
||||
if (value === 1) {
|
||||
stateTipColor = '#909399';
|
||||
return '支付成功,没有回掉';
|
||||
}
|
||||
if (value === 2) {
|
||||
stateTip= '支付成功,没有回掉';
|
||||
}else if (value === 2) {
|
||||
stateTip = '待发货';
|
||||
} else if (value === 3) {
|
||||
stateTip = '待收货';
|
||||
@@ -256,6 +266,9 @@
|
||||
stateTip = ' 维权已完成';
|
||||
} else if (value === 8) {
|
||||
stateTip = '待分享';
|
||||
}else if (value === 12) {
|
||||
stateTipColor = '#909399';
|
||||
stateTip= '待付款';
|
||||
} else if (value === 13) {
|
||||
stateTip = '申请退款';
|
||||
} else if (value === 14) {
|
||||
@@ -426,10 +439,17 @@
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.num_price {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 5px;
|
||||
|
||||
.attr-box {
|
||||
flex: 1;
|
||||
font-size: $font-sm + 2upx;
|
||||
color: $font-color-light;
|
||||
padding: 10upx 12upx;
|
||||
margin: 0 2upx 0 8upx;
|
||||
}
|
||||
|
||||
.price {
|
||||
@@ -444,12 +464,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.price-box {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: baseline;
|
||||
padding: 20upx 30upx;
|
||||
font-size: $font-sm + 2upx;
|
||||
color: $font-color-light;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user