2023-3-3
功能完善 微信支付
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import store from '../store/index';
|
import store from '../store/index';
|
||||||
export default {
|
export default {
|
||||||
// qq 237524947 wx15d4269d3210863d
|
// qq 237524947 wx15d4269d3210863d
|
||||||
// BASEURI: 'http://2xpk7t.natappfree.cc/api/',
|
// BASEURI: 'http://2wsiyd.natappfree.cc/api/',
|
||||||
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||||
// BASEURI: 'http://192.168.31.52:8083/api/',
|
// BASEURI: 'http://192.168.31.52:8083/api/',
|
||||||
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pay-type-list">
|
<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 == 'wechatpay'" class="icon yticon icon-weixinzhifu"></text>
|
||||||
<text v-if="item.code == 'alipay'" class="icon yticon icon-alipay"></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>
|
<text v-if="item.code == 'offline'" class="icon yticon icon-weixinzhifu"></text>
|
||||||
@@ -15,35 +16,35 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// 如果是商品订单此参数必须
|
// 如果是商品订单此参数必须
|
||||||
orderId: {
|
orderId: {
|
||||||
type: String,
|
type: String,
|
||||||
default() {
|
default () {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 如果是充值订单此参数必须
|
// 如果是充值订单此参数必须
|
||||||
recharge: {
|
recharge: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default () {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 用户id
|
// 用户id
|
||||||
uid: {
|
uid: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default () {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 订单类型
|
// 订单类型
|
||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default () {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,7 +81,9 @@ export default {
|
|||||||
// 用户点击支付方式处理
|
// 用户点击支付方式处理
|
||||||
async toPayHandler(code) {
|
async toPayHandler(code) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let params = { orderId: this.orderId };
|
let params = {
|
||||||
|
orderId: this.orderId
|
||||||
|
};
|
||||||
let data = {
|
let data = {
|
||||||
payment_code: code,
|
payment_code: code,
|
||||||
payment_type: _this.type
|
payment_type: _this.type
|
||||||
@@ -110,17 +113,20 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let res = await Api.apiCall('get', Api.order.aliAppPay, params);
|
let res = await Api.apiCall('get', Api.order.aliAppPay, params);
|
||||||
|
console.log("aliAppPay》》》", res);
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'alipay',
|
provider: 'alipay',
|
||||||
orderInfo: res,
|
orderInfo: res,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
console.log("aliAppPay_data》》》", data);
|
||||||
let rawdataResult = JSON.parse(data.rawdata).result;
|
let rawdataResult = JSON.parse(data.rawdata).result;
|
||||||
let r = rawdataResult.split(';')[0];
|
let r = rawdataResult.split(';')[0];
|
||||||
let r1 = rawdataResult.split(';')[0].length - 1;
|
let r1 = rawdataResult.split(';')[0].length - 1;
|
||||||
let r2 = rawdataResult.split(';')[0].length - 2;
|
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;
|
let out_trade_no = alipayTradeAppPayResponse.out_trade_no;
|
||||||
_this.$common.successToShow('支付成功', () => {
|
_this.$common.successToShow('支付成功', () => {
|
||||||
//_this.redirectHandler(res.data.payment_id)
|
//_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);
|
let data1 = await Api.apiCall('post', Api.order.balancePay, params1);
|
||||||
console.log(data1);
|
console.log(data1);
|
||||||
if (data1) {
|
if (data1) {
|
||||||
@@ -201,14 +209,14 @@ export default {
|
|||||||
this.$common.redirectTo('/pages/order/payment/result?id=' + paymentId);
|
this.$common.redirectTo('/pages/order/payment/result?id=' + paymentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.app {
|
.app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-box {
|
.price-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 265upx;
|
height: 265upx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -222,14 +230,15 @@ export default {
|
|||||||
font-size: 50upx;
|
font-size: 50upx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
margin-top: 12upx;
|
margin-top: 12upx;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pay-type-list {
|
.pay-type-list {
|
||||||
margin-top: 20upx;
|
margin-top: 20upx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding-left: 60upx;
|
padding-left: 60upx;
|
||||||
@@ -249,20 +258,25 @@ export default {
|
|||||||
width: 100upx;
|
width: 100upx;
|
||||||
font-size: 52upx;
|
font-size: 52upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-erjiye-yucunkuan {
|
.icon-erjiye-yucunkuan {
|
||||||
color: #fe8e2e;
|
color: #fe8e2e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-weixinzhifu {
|
.icon-weixinzhifu {
|
||||||
color: #36cb59;
|
color: #36cb59;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-alipay {
|
.icon-alipay {
|
||||||
color: #01aaef;
|
color: #01aaef;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
margin-bottom: 4upx;
|
margin-bottom: 4upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -270,8 +284,9 @@ export default {
|
|||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mix-btn {
|
|
||||||
|
.mix-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -283,5 +298,5 @@ export default {
|
|||||||
background-color: $base-color;
|
background-color: $base-color;
|
||||||
border-radius: 10upx;
|
border-radius: 10upx;
|
||||||
box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
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" : "汇融云链",
|
"name" : "汇融云链",
|
||||||
"appid" : "__UNI__FB2C9C4",
|
"appid" : "__UNI__FB2C9C4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0.3",
|
"versionName" : "1.0.0.5",
|
||||||
"versionCode" : 1003,
|
"versionCode" : 1005,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"oauth" : {
|
"oauth" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "wx04b09a8148e4875c",
|
"appid" : "wxa66597d50184d027",
|
||||||
"appsecret" : "3526ec2107c123f59b5c1cb7ff23a252",
|
"appsecret" : "3526ec2107c123f59b5c1cb7ff23a252",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : ""
|
||||||
},
|
},
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
"payment" : {
|
"payment" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "wx04b09a8148e4875c",
|
"appid" : "wxa66597d50184d027",
|
||||||
"UniversalLinks" : "",
|
"UniversalLinks" : "",
|
||||||
"__platform__" : [ "android" ]
|
"__platform__" : [ "android" ]
|
||||||
},
|
},
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
"ad" : {},
|
"ad" : {},
|
||||||
"share" : {
|
"share" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "wx04b09a8148e4875c",
|
"appid" : "wxa66597d50184d027",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : ""
|
||||||
},
|
},
|
||||||
"qq" : {
|
"qq" : {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="navbar">
|
<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>
|
</view>
|
||||||
|
|
||||||
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
||||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
<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>
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
||||||
|
|
||||||
@@ -15,61 +16,84 @@
|
|||||||
<view class="i-top b-b">
|
<view class="i-top b-b">
|
||||||
<text class="time" @click="navToDetailPage(item)">{{ item.createTime }}</text>
|
<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.id }}</text> -->
|
||||||
<text class="state" :style="{ color: item.stateTipColor }" @click="navToDetailPage(item)">{{ item.stateTip }}</text>
|
<text class="state" :style="{ color: item.stateTipColor }"
|
||||||
<text v-if="item.status === 12" class="del-btn yticon icon-iconfontshanchu1" @click="deleteOrder(index)"></text>
|
@click="navToDetailPage(item)">{{ item.stateTip }}</text>
|
||||||
|
<text v-if="item.status === 12" class="del-btn yticon icon-iconfontshanchu1"
|
||||||
|
@click="deleteOrder(index)"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view v-if="item.orderItemList.length > 1" class="goods-box" scroll-y>
|
<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">
|
<view v-for="(goodsItem, goodsIndex) in item.orderItemList" :key="goodsIndex"
|
||||||
<img class="goods-img" :src="goodsItem.productPic" @click="navToDetailPage(item)" mode="aspectFill" />
|
class="goods-item">
|
||||||
|
<img class="goods-img" :src="goodsItem.productPic" @click="navToDetailPage(item)"
|
||||||
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</scroll-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" />
|
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill" />
|
||||||
<view class="right" @click="navToDetailPage(item)">
|
<view class="right" @click="navToDetailPage(item)">
|
||||||
<text class="title clamp">{{ goodsItem.productName }}</text>
|
<text class="title clamp">{{ goodsItem.productName }}</text>
|
||||||
<text class="attr-box">{{ goodsItem.productAttr }} x {{ goodsItem.productQuantity }}</text>
|
<view class="num_price">
|
||||||
<text class="price">{{ goodsItem.productPrice }}</text><br/>
|
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
|
||||||
<!-- <text class="title clamp" v-if="item.status === 5">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text>
|
<text class="price">{{ goodsItem.productPrice }}</text>
|
||||||
<text class="title clamp" v-if="item.status === 3">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
</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">
|
<view class="price-box">
|
||||||
共
|
共
|
||||||
<text class="num">{{ item.orderItemList.length }}</text>
|
<text class="num">{{ item.orderItemList.length }}</text>
|
||||||
件商品 实付款
|
件商品 实付款
|
||||||
<text class="price">{{ item.payAmount }}</text>
|
<text class="price">{{ item.payAmount }}</text>
|
||||||
</view>
|
</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-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 == 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 == 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 == 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" @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 > 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 < 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 == 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> -->
|
<!-- <button class="action-btn recom" hover-class="btn-hover" v-if="item.status === 4" @click="toEvaluate(item.id)">立即评价</button> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more :status="loadingType"></uni-load-more>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import {
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
mapState
|
||||||
import Api from '@/common/api';
|
} from 'vuex';
|
||||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import empty from '@/components/empty';
|
import Api from '@/common/api';
|
||||||
import { formatDate } from '@/common/date';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
import empty from '@/components/empty';
|
||||||
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
uniLoadMore,
|
uniLoadMore,
|
||||||
@@ -79,39 +103,37 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tabCurrentIndex: 0,
|
tabCurrentIndex: 0,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
orderList: [],
|
|
||||||
headerPosition: 'fixed',
|
headerPosition: 'fixed',
|
||||||
headerTop: '0px',
|
headerTop: '0px',
|
||||||
loadingType: 'loading', //加载更多状态
|
loadingType: 'more', //加载更多状态
|
||||||
navList: [
|
navList: [{
|
||||||
{
|
|
||||||
status: 0,
|
status: 0,
|
||||||
text: '全部',
|
text: '全部',
|
||||||
loadingType: 'loading',
|
loadingType: 'more',
|
||||||
orderList: []
|
orderList: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: 12,
|
status: 12,
|
||||||
text: '待付款',
|
text: '待付款',
|
||||||
loadingType: 'loading',
|
loadingType: 'more',
|
||||||
orderList: []
|
orderList: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: 2,
|
status: 2,
|
||||||
text: '待发货',
|
text: '待发货',
|
||||||
loadingType: 'loading',
|
loadingType: 'more',
|
||||||
orderList: []
|
orderList: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: 3,
|
status: 3,
|
||||||
text: '已发货',
|
text: '已发货',
|
||||||
loadingType: 'loading',
|
loadingType: 'more',
|
||||||
orderList: []
|
orderList: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: 5,
|
status: 5,
|
||||||
text: '已完成',
|
text: '已完成',
|
||||||
loadingType: 'loading',
|
loadingType: 'more',
|
||||||
orderList: []
|
orderList: []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -139,11 +161,22 @@ export default {
|
|||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.loadData('refresh');
|
this.loadData('refresh');
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 2000);
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.loadData('refresh');
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 2000);
|
||||||
},
|
},
|
||||||
//加载更多
|
//加载更多
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.pageNum = this.pageNum+1;
|
this.pageNum = this.pageNum + 1;
|
||||||
this.loadData('refresh');
|
this.loadData();
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['hasLogin', 'userInfo'])
|
...mapState(['hasLogin', 'userInfo'])
|
||||||
@@ -159,6 +192,15 @@ export default {
|
|||||||
},
|
},
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
async loadData(type = 'add', loading) {
|
async loadData(type = 'add', loading) {
|
||||||
|
//没有更多直接返回
|
||||||
|
if (type === 'add') {
|
||||||
|
if (this.loadingType === 'nomore') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadingType = 'loading';
|
||||||
|
} else {
|
||||||
|
this.loadingType = 'more';
|
||||||
|
}
|
||||||
//这里是将订单挂载到tab列表下
|
//这里是将订单挂载到tab列表下
|
||||||
let index = this.tabCurrentIndex;
|
let index = this.tabCurrentIndex;
|
||||||
let navItem = this.navList[index];
|
let navItem = this.navList[index];
|
||||||
@@ -166,12 +208,16 @@ export default {
|
|||||||
let status = navItem.status;
|
let status = navItem.status;
|
||||||
let url;
|
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);
|
let data = await Api.apiCall('get', Api.order.orderList, params);
|
||||||
console.log("data:------"+data)
|
console.log("data:------" + data)
|
||||||
let goodsList = data.records;
|
let goodsList = data.records;
|
||||||
let goodsListJson = JSON.stringify(goodsList)
|
let goodsListJson = JSON.stringify(goodsList)
|
||||||
console.log("goodsList:"+goodsListJson)
|
// console.log("goodsList:" + goodsListJson)
|
||||||
let orderList = goodsList.filter(item => {
|
let orderList = goodsList.filter(item => {
|
||||||
//添加不同状态下订单的表现形式
|
//添加不同状态下订单的表现形式
|
||||||
item = Object.assign(item, this.orderStateExp(item.status));
|
item = Object.assign(item, this.orderStateExp(item.status));
|
||||||
@@ -185,13 +231,15 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (type === 'refresh') {
|
if (type === 'refresh') {
|
||||||
this.orderList = [];
|
navItem.orderList = [];
|
||||||
}
|
}
|
||||||
this.orderList = this.orderList.concat(orderList);
|
navItem.orderList = navItem.orderList.concat(orderList);
|
||||||
console.log("this.orderList.length======:"+this.orderList.length)
|
console.log("data.total======:" + data.total)
|
||||||
console.log("data.total======:"+data.total)
|
console.log("length======:" + navItem.orderList.length)
|
||||||
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
|
//判断是否还有下一页,有是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 (type === 'refresh') {
|
||||||
if (loading == 1) {
|
if (loading == 1) {
|
||||||
uni.hideLoading();
|
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 切换
|
//swiper 切换
|
||||||
@@ -239,19 +281,23 @@ export default {
|
|||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
async cancelOrder(item) {
|
async cancelOrder(item) {
|
||||||
let params = { orderId: item.id };
|
let params = {
|
||||||
|
orderId: item.id
|
||||||
|
};
|
||||||
let data = await Api.apiCall('post', Api.order.closeOrder, params);
|
let data = await Api.apiCall('post', Api.order.closeOrder, params);
|
||||||
console.log(data)
|
console.log(data)
|
||||||
if (data) {
|
if (data) {
|
||||||
this.$api.msg(data);
|
this.$api.msg(data);
|
||||||
this.pageNum = 1;
|
this.pageNum = 1;
|
||||||
this.loadData('refresh');
|
this.loadData('refresh');
|
||||||
this.tabCurrentIndex = 4;
|
this.tabCurrentIndex = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//订单确认收货
|
//订单确认收货
|
||||||
async confimDelivery(item) {
|
async confimDelivery(item) {
|
||||||
let params = { id: item.id };
|
let params = {
|
||||||
|
id: item.id
|
||||||
|
};
|
||||||
let data = await Api.apiCall('post', Api.order.confimDelivery, params);
|
let data = await Api.apiCall('post', Api.order.confimDelivery, params);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -272,7 +318,9 @@ export default {
|
|||||||
|
|
||||||
//订单申请退款
|
//订单申请退款
|
||||||
async applyRefund1(item) {
|
async applyRefund1(item) {
|
||||||
let params = { id: item.id };
|
let params = {
|
||||||
|
id: item.id
|
||||||
|
};
|
||||||
let data = await Api.apiCall('post', Api.order.applyRefund, params);
|
let data = await Api.apiCall('post', Api.order.applyRefund, params);
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@@ -291,15 +339,10 @@ export default {
|
|||||||
orderStateExp(value) {
|
orderStateExp(value) {
|
||||||
let stateTip = '',
|
let stateTip = '',
|
||||||
stateTipColor = '#fa436a';
|
stateTipColor = '#fa436a';
|
||||||
if (value === 12) {
|
|
||||||
stateTipColor = '#909399';
|
|
||||||
stateTip = '待付款';
|
|
||||||
}
|
|
||||||
if (value === 1) {
|
if (value === 1) {
|
||||||
stateTipColor = '#909399';
|
stateTipColor = '#909399';
|
||||||
stateTip = '支付成功,没有回掉';
|
stateTip = '支付成功,没有回掉';
|
||||||
}
|
} else if (value === 2) {
|
||||||
if (value === 2) {
|
|
||||||
stateTip = '待发货';
|
stateTip = '待发货';
|
||||||
} else if (value === 3) {
|
} else if (value === 3) {
|
||||||
stateTip = '待收货';
|
stateTip = '待收货';
|
||||||
@@ -314,6 +357,9 @@ export default {
|
|||||||
stateTip = ' 维权已完成';
|
stateTip = ' 维权已完成';
|
||||||
} else if (value === 8) {
|
} else if (value === 8) {
|
||||||
stateTip = '待分享';
|
stateTip = '待分享';
|
||||||
|
} else if (value === 12) {
|
||||||
|
stateTipColor = '#909399';
|
||||||
|
stateTip = '待付款';
|
||||||
} else if (value === 13) {
|
} else if (value === 13) {
|
||||||
stateTip = '申请退款';
|
stateTip = '申请退款';
|
||||||
} else if (value === 14) {
|
} else if (value === 14) {
|
||||||
@@ -322,13 +368,14 @@ export default {
|
|||||||
stateTip = '已关闭';
|
stateTip = '已关闭';
|
||||||
} else if (value === 16) {
|
} else if (value === 16) {
|
||||||
stateTip = '无效订单';
|
stateTip = '无效订单';
|
||||||
} else if (value === 18) {
|
|
||||||
stateTip = '拼团下单';
|
|
||||||
} else {
|
} else {
|
||||||
stateTip = '待付款';
|
stateTip = '待付款';
|
||||||
}
|
}
|
||||||
|
|
||||||
return { stateTip, stateTipColor };
|
return {
|
||||||
|
stateTip,
|
||||||
|
stateTipColor
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
dateFormat(time) {
|
dateFormat(time) {
|
||||||
@@ -339,24 +386,25 @@ export default {
|
|||||||
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page,
|
page,
|
||||||
.content {
|
.content {
|
||||||
background: $page-color-base;
|
background: $page-color-base;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-box {
|
.swiper-box {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
}
|
}
|
||||||
.list-scroll-content {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
.list-scroll-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
@@ -364,6 +412,7 @@ page,
|
|||||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -373,8 +422,10 @@ page,
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -387,17 +438,19 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-swiper-item {
|
.uni-swiper-item {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.order-item {
|
|
||||||
|
.order-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 30upx;
|
padding-left: 30upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
|
|
||||||
.i-top {
|
.i-top {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -406,17 +459,21 @@ page,
|
|||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.state {
|
.state {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.del-btn {
|
.del-btn {
|
||||||
padding: 10upx 0 10upx 36upx;
|
padding: 10upx 0 10upx 36upx;
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 0;
|
width: 0;
|
||||||
@@ -429,51 +486,67 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 多条商品 */
|
/* 多条商品 */
|
||||||
.goods-box {
|
.goods-box {
|
||||||
height: 160upx;
|
height: 160upx;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
width: 120upx;
|
width: 120upx;
|
||||||
height: 120upx;
|
height: 120upx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 24upx;
|
margin-right: 24upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-img {
|
.goods-img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单条商品 */
|
/* 单条商品 */
|
||||||
.goods-box-single {
|
.goods-box-single {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20upx 0;
|
padding: 20upx 0;
|
||||||
|
|
||||||
.goods-img {
|
.goods-img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 120upx;
|
width: 120upx;
|
||||||
height: 120upx;
|
height: 120upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 30upx 0 24upx;
|
padding: 0 30upx 0 24upx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
line-height: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.num_price {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
.attr-box {
|
.attr-box {
|
||||||
|
flex: 1;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
padding: 10upx 12upx;
|
margin: 0 2upx 0 8upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
@@ -481,22 +554,28 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.price-box {
|
.price-box {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
padding: 20upx 30upx;
|
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
margin: 0 8upx;
|
margin: 0 8upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: $font-sm;
|
font-size: $font-sm;
|
||||||
@@ -504,6 +583,7 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-box {
|
.action-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@@ -512,6 +592,7 @@ page,
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 30upx;
|
padding-right: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
width: 160upx;
|
width: 160upx;
|
||||||
height: 60upx;
|
height: 60upx;
|
||||||
@@ -524,44 +605,47 @@ page,
|
|||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.recom {
|
&.recom {
|
||||||
background: #fff9f9;
|
background: #fff9f9;
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-color: #f7bcc8;
|
border-color: #f7bcc8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load-more */
|
/* load-more */
|
||||||
.uni-load-more {
|
.uni-load-more {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
height: 80upx;
|
height: 80upx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__text {
|
.uni-load-more__text {
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img {
|
.uni-load-more__img {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view {
|
.uni-load-more__img>view {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view view {
|
.uni-load-more__img>view view {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
border-top-left-radius: 1px;
|
border-top-left-radius: 1px;
|
||||||
@@ -571,95 +655,95 @@ page,
|
|||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
transform-origin: 50%;
|
transform-origin: 50%;
|
||||||
animation: load 1.56s ease infinite;
|
animation: load 1.56s ease infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view view:nth-child(1) {
|
.uni-load-more__img>view view:nth-child(1) {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
top: 2px;
|
top: 2px;
|
||||||
left: 9px;
|
left: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view view:nth-child(2) {
|
.uni-load-more__img>view view:nth-child(2) {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
top: 11px;
|
top: 11px;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view view:nth-child(3) {
|
.uni-load-more__img>view view:nth-child(3) {
|
||||||
transform: rotate(270deg);
|
transform: rotate(270deg);
|
||||||
bottom: 2px;
|
bottom: 2px;
|
||||||
left: 9px;
|
left: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-load-more__img > view view:nth-child(4) {
|
.uni-load-more__img>view view:nth-child(4) {
|
||||||
top: 11px;
|
top: 11px;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load1,
|
.load1,
|
||||||
.load2,
|
.load2,
|
||||||
.load3 {
|
.load3 {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load2 {
|
.load2 {
|
||||||
transform: rotate(30deg);
|
transform: rotate(30deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.load3 {
|
.load3 {
|
||||||
transform: rotate(60deg);
|
transform: rotate(60deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.load1 view:nth-child(1) {
|
.load1 view:nth-child(1) {
|
||||||
animation-delay: 0s;
|
animation-delay: 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load2 view:nth-child(1) {
|
.load2 view:nth-child(1) {
|
||||||
animation-delay: 0.13s;
|
animation-delay: 0.13s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load3 view:nth-child(1) {
|
.load3 view:nth-child(1) {
|
||||||
animation-delay: 0.26s;
|
animation-delay: 0.26s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load1 view:nth-child(2) {
|
.load1 view:nth-child(2) {
|
||||||
animation-delay: 0.39s;
|
animation-delay: 0.39s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load2 view:nth-child(2) {
|
.load2 view:nth-child(2) {
|
||||||
animation-delay: 0.52s;
|
animation-delay: 0.52s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load3 view:nth-child(2) {
|
.load3 view:nth-child(2) {
|
||||||
animation-delay: 0.65s;
|
animation-delay: 0.65s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load1 view:nth-child(3) {
|
.load1 view:nth-child(3) {
|
||||||
animation-delay: 0.78s;
|
animation-delay: 0.78s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load2 view:nth-child(3) {
|
.load2 view:nth-child(3) {
|
||||||
animation-delay: 0.91s;
|
animation-delay: 0.91s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load3 view:nth-child(3) {
|
.load3 view:nth-child(3) {
|
||||||
animation-delay: 1.04s;
|
animation-delay: 1.04s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load1 view:nth-child(4) {
|
.load1 view:nth-child(4) {
|
||||||
animation-delay: 1.17s;
|
animation-delay: 1.17s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load2 view:nth-child(4) {
|
.load2 view:nth-child(4) {
|
||||||
animation-delay: 1.3s;
|
animation-delay: 1.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load3 view:nth-child(4) {
|
.load3 view:nth-child(4) {
|
||||||
animation-delay: 1.43s;
|
animation-delay: 1.43s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes load {
|
@-webkit-keyframes load {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
@@ -667,5 +751,5 @@ page,
|
|||||||
100% {
|
100% {
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,16 +5,15 @@
|
|||||||
<scroll-view class="list-scroll-content" scroll-y>
|
<scroll-view class="list-scroll-content" scroll-y>
|
||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
<view class="order-item">
|
<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">
|
<view class="i-top b-b">
|
||||||
<text class="time">{{ orderInfo.createTime }}</text>
|
<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 }" @click="navToDetailPage(item)">{{ orderInfo.id }}--</text> -->
|
||||||
<text class="state"
|
<text class="state"
|
||||||
:style="{ color: orderInfo.stateTipColor }">{{ orderInfo.stateTip }}</text>
|
: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>
|
||||||
|
|
||||||
<view v-if="goodsItem.type === 1" class="goods-box-single"
|
<view v-if="goodsItem.type === 1" class="goods-box-single"
|
||||||
@@ -22,12 +21,20 @@
|
|||||||
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill"></img>
|
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill"></img>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<text class="title clamp">{{ goodsItem.productName }}</text>
|
<text class="title clamp">{{ goodsItem.productName }}</text>
|
||||||
<text class="attr-box">{{ goodsItem.productAttr }} x
|
<view class="num_price">
|
||||||
{{ goodsItem.productQuantity }}</text>
|
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
|
||||||
<text class="price">{{ goodsItem.productPrice }} </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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="i-top b-b">
|
<!-- <view class="i-top b-b">
|
||||||
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单赠品</text>
|
<text class="state" :style="{ color: orderInfo.stateTipColor }">订单赠品</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="goodsItem.type === 2" class="goods-box-single"
|
<view v-if="goodsItem.type === 2" class="goods-box-single"
|
||||||
@@ -39,38 +46,41 @@
|
|||||||
{{ goodsItem.productQuantity }}</text>
|
{{ goodsItem.productQuantity }}</text>
|
||||||
<text class="price">{{ goodsItem.productPrice }} </text>
|
<text class="price">{{ goodsItem.productPrice }} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
<view style="display: flex;flex-direction: column; margin-right: 13px;margin-bottom: 10px;">
|
||||||
|
|
||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
共
|
共
|
||||||
<text class="num">{{ orderInfo.orderItemList.length }}</text>
|
<text class="num">{{ orderInfo.orderItemList.length }}</text>
|
||||||
件商品, 会员折扣
|
件商品, 会员折扣
|
||||||
<text class="price">{{ orderInfo.vipAmount }}</text>
|
<text class="price">{{ orderInfo.vipAmount }}</text>
|
||||||
优惠券抵扣
|
, 优惠券抵扣
|
||||||
<text class="price">{{ orderInfo.couponAmount }}</text>
|
<text class="price">{{ orderInfo.couponAmount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
积分抵扣
|
积分抵扣
|
||||||
<text class="price">{{ orderInfo.integrationAmount }}</text>
|
<text class="price">{{ orderInfo.integrationAmount }}</text>
|
||||||
,运费
|
, 运费
|
||||||
<text class="price">{{ orderInfo.freightAmount }}</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-tit clamp">活动金额</text>
|
||||||
<text class="cell-tip">¥{{ groupActivity.price }}</text>
|
<text class="cell-tip">¥{{ groupActivity.price }}</text>
|
||||||
</view>
|
</view> -->
|
||||||
,实付款
|
, 实付款
|
||||||
<text class="price">{{ orderInfo.payAmount }}</text>
|
<text class="price">{{ orderInfo.payAmount }}</text>
|
||||||
</view>
|
</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"
|
<button v-if="orderInfo.status == 12" class="action-btn"
|
||||||
@click="cancelOrder(orderInfo)">取消订单</button>
|
@click="cancelOrder(orderInfo)">取消订单</button>
|
||||||
<button v-if="orderInfo.status == 12" class="action-btn recom"
|
<button v-if="orderInfo.status == 12" class="action-btn recom"
|
||||||
@click="payOrder(orderInfo)">立即支付</button>
|
@click="payOrder(orderInfo)">立即支付</button>
|
||||||
<button v-if="orderInfo.status <7" class="action-btn recom"
|
<!-- <button v-if="orderInfo.status <7" class="action-btn recom"
|
||||||
@click="applyRefund(orderInfo.id)">申请售后</button>
|
@click="applyRefund(orderInfo.id)">申请售后</button> -->
|
||||||
<button v-if="orderInfo.status == 3" class="action-btn recom"
|
<button v-if="orderInfo.status == 3" class="action-btn recom"
|
||||||
@click="confimDelivery(orderInfo)">确认收货</button>
|
@click="confimDelivery(orderInfo)">确认收货</button>
|
||||||
<button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
|
<!-- <button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
|
||||||
@click="toEvaluate(orderInfo.id)">立即评价</button>
|
@click="toEvaluate(orderInfo.id)">立即评价</button>-->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -101,7 +111,9 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabCurrentIndex: 0,
|
tabCurrentIndex: 0,
|
||||||
orderInfo: [],
|
orderInfo: {
|
||||||
|
orderItemList:[]
|
||||||
|
},
|
||||||
navList: [{
|
navList: [{
|
||||||
status: 0,
|
status: 0,
|
||||||
text: '全部',
|
text: '全部',
|
||||||
@@ -143,6 +155,8 @@
|
|||||||
this.orderInfo = await Api.apiCall('get', Api.order.orderDetail, params);
|
this.orderInfo = await Api.apiCall('get', Api.order.orderDetail, params);
|
||||||
this.orderInfo = Object.assign(this.orderInfo, this.orderStateExp(this.orderInfo.status));
|
this.orderInfo = Object.assign(this.orderInfo, this.orderStateExp(this.orderInfo.status));
|
||||||
this.orderInfo.createTime = this.dateFormat(this.orderInfo.createTime);
|
this.orderInfo.createTime = this.dateFormat(this.orderInfo.createTime);
|
||||||
|
console.log("data:------" + JSON.stringify(this.orderInfo))
|
||||||
|
console.log("data:------" + this.orderInfo.stateTip)
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -233,15 +247,11 @@
|
|||||||
orderStateExp(value) {
|
orderStateExp(value) {
|
||||||
let stateTip = '',
|
let stateTip = '',
|
||||||
stateTipColor = '#fa436a';
|
stateTipColor = '#fa436a';
|
||||||
if (value === 12) {
|
|
||||||
stateTipColor = '#909399';
|
|
||||||
return '待付款';
|
|
||||||
}
|
|
||||||
if (value === 1) {
|
if (value === 1) {
|
||||||
stateTipColor = '#909399';
|
stateTipColor = '#909399';
|
||||||
return '支付成功,没有回掉';
|
stateTip= '支付成功,没有回掉';
|
||||||
}
|
}else if (value === 2) {
|
||||||
if (value === 2) {
|
|
||||||
stateTip = '待发货';
|
stateTip = '待发货';
|
||||||
} else if (value === 3) {
|
} else if (value === 3) {
|
||||||
stateTip = '待收货';
|
stateTip = '待收货';
|
||||||
@@ -256,6 +266,9 @@
|
|||||||
stateTip = ' 维权已完成';
|
stateTip = ' 维权已完成';
|
||||||
} else if (value === 8) {
|
} else if (value === 8) {
|
||||||
stateTip = '待分享';
|
stateTip = '待分享';
|
||||||
|
}else if (value === 12) {
|
||||||
|
stateTipColor = '#909399';
|
||||||
|
stateTip= '待付款';
|
||||||
} else if (value === 13) {
|
} else if (value === 13) {
|
||||||
stateTip = '申请退款';
|
stateTip = '申请退款';
|
||||||
} else if (value === 14) {
|
} else if (value === 14) {
|
||||||
@@ -426,10 +439,17 @@
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.num_price {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
.attr-box {
|
.attr-box {
|
||||||
|
flex: 1;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
padding: 10upx 12upx;
|
margin: 0 2upx 0 8upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
@@ -444,12 +464,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.price-box {
|
.price-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
padding: 20upx 30upx;
|
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user