2023-02-28
功能完善
This commit is contained in:
@@ -27,7 +27,8 @@
|
|||||||
} else {
|
} else {
|
||||||
let appid = 'wx8321531c6046c924';
|
let appid = 'wx8321531c6046c924';
|
||||||
let uri = encodeURIComponent(link);
|
let uri = encodeURIComponent(link);
|
||||||
let authURL = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`;
|
let authURL =
|
||||||
|
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`;
|
||||||
window.location.href = authURL;
|
window.location.href = authURL;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -50,13 +51,19 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
// uni.removeStorageSync('userInfo');
|
||||||
|
// uni.removeStorageSync('token');
|
||||||
|
console.log('App onLaunch')
|
||||||
let userInfo = uni.getStorageSync('userInfo') || '';
|
let userInfo = uni.getStorageSync('userInfo') || '';
|
||||||
let token = uni.getStorageSync('token') || '';
|
let token = uni.getStorageSync('token') || '';
|
||||||
|
console.log('App onLaunch>>>',userInfo)
|
||||||
|
console.log('App onLaunch>>>',token)
|
||||||
if (token) {
|
if (token) {
|
||||||
//更新登陆状态
|
//更新登陆状态
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'userInfo',
|
key: 'userInfo',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log('App onLaunch>>', res)
|
||||||
this.login(res.data);
|
this.login(res.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -419,9 +426,13 @@
|
|||||||
video {
|
video {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
html,body,#app{
|
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 骨架屏替代方案 */
|
/* 骨架屏替代方案 */
|
||||||
.Skeleton {
|
.Skeleton {
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "汇融云链",
|
"name" : "汇融云链",
|
||||||
"appid" : "__UNI__FB2C9C4",
|
"appid" : "__UNI__FB2C9C4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0.2",
|
"versionName" : "1.0.0.3",
|
||||||
"versionCode" : 1002,
|
"versionCode" : 1003,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
|
|||||||
@@ -89,12 +89,12 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/order/orderDetail",
|
"path": "pages/order/orderDetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "详情展示",
|
"navigationBarTitleText": "详情展示"
|
||||||
"app-plus": {
|
// "app-plus": {
|
||||||
"titleNView": {
|
// "titleNView": {
|
||||||
"type": "transparent"
|
// "type": "transparent"
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/order/logistics",
|
"path": "pages/order/logistics",
|
||||||
|
|||||||
@@ -1079,11 +1079,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
|
font-size: 18px;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm;
|
font-size: 16px;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
@@ -1180,15 +1182,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
|
font-size: 18px;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm;
|
font-size: 16px;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pro-box {
|
.pro-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1250,17 +1253,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm;
|
font-size: 16px;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon_box {
|
.coupon_box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@@ -70,13 +70,13 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单 -->
|
<!-- 订单 -->
|
||||||
<view class="order-section">
|
<!-- <view class="order-section">
|
||||||
<view class="order-item" @click="navTo('/pages/order/order?status=0')" hover-class="common-hover"
|
<view class="order-item" @click="navTo('/pages/order/order?status=0')" hover-class="common-hover"
|
||||||
:hover-stay-time="50">
|
:hover-stay-time="50">
|
||||||
<text class="yticon icon-shouye"></text>
|
<text class="yticon icon-shouye"></text>
|
||||||
<text>全部订单</text>
|
<text>全部订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-item" @click="navTo('/pages/order/order?status=2')" hover-class="common-hover"
|
<view class="order-item" @click="navTo('/pages/order/order?status=1')" hover-class="common-hover"
|
||||||
:hover-stay-time="50">
|
:hover-stay-time="50">
|
||||||
<text class="yticon icon-daifukuan"></text>
|
<text class="yticon icon-daifukuan"></text>
|
||||||
<text>待付款</text>
|
<text>待付款</text>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<text class="yticon icon-shouhoutuikuan"></text>
|
<text class="yticon icon-shouhoutuikuan"></text>
|
||||||
<text>退款/售后</text>
|
<text>退款/售后</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- 浏览历史 -->
|
<!-- 浏览历史 -->
|
||||||
<view class="history-section icon">
|
<view class="history-section icon">
|
||||||
<view class="sec-header" v-if="viewList && viewList.length > 0">
|
<view class="sec-header" v-if="viewList && viewList.length > 0">
|
||||||
@@ -103,7 +103,8 @@
|
|||||||
<image v-for="(item, index) in viewList" :key="index" @click="navToDetailPage(item)" :src="item.pic"
|
<image v-for="(item, index) in viewList" :key="index" @click="navToDetailPage(item)" :src="item.pic"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!--<list-cell icon="icon-iconfontweixin" iconColor="#e07472" title="我的钱包" tips="您的会员还有3天过期"></list-cell>-->
|
<list-cell icon="icon-iconfontweixin" iconColor="#e07472" title="我的订单"
|
||||||
|
@eventClick="navTo('../../pages/order/order?status=0')"></list-cell>
|
||||||
<list-cell icon="icon-dizhi" iconColor="#5fcda2" title="地址管理"
|
<list-cell icon="icon-dizhi" iconColor="#5fcda2" title="地址管理"
|
||||||
@eventClick="navTo('../../pagesU/address/address')"></list-cell>
|
@eventClick="navTo('../../pagesU/address/address')"></list-cell>
|
||||||
<list-cell icon="icon-tuandui" iconColor="#EE82EE" title="个人资料"
|
<list-cell icon="icon-tuandui" iconColor="#EE82EE" title="个人资料"
|
||||||
@@ -270,10 +271,10 @@
|
|||||||
async getuserinfo() {
|
async getuserinfo() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let data1 = await Api.apiCall('get', Api.index.userInfo, params);
|
let data1 = await Api.apiCall('get', Api.index.userInfo, params);
|
||||||
|
console.log("data》》》", data1);
|
||||||
if (!data1) {
|
if (!data1) {
|
||||||
this.userDetailInfo = {};
|
this.userDetailInfo = {};
|
||||||
}
|
}
|
||||||
console.log("data", data1);
|
|
||||||
|
|
||||||
if (!data1.member) {
|
if (!data1.member) {
|
||||||
this.logout();
|
this.logout();
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
// let url = `/pages/money/pay?id=${id}`;
|
// let url = `/pages/money/pay?id=${id}`;
|
||||||
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1';
|
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1';
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -363,7 +363,7 @@
|
|||||||
// let url = `/pages/money/pay?id=${id}`;
|
// let url = `/pages/money/pay?id=${id}`;
|
||||||
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1';
|
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1';
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
|
<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
|
||||||
<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 }" @click="navToDetailPage(item)">{{ item.stateTip }}</text>
|
||||||
<!-- <text v-if="item.status === 12" class="del-btn yticon icon-iconfontshanchu1" @click="deleteOrder(index)"></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>
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
<text class="title clamp">{{ goodsItem.productName }}</text>
|
<text class="title clamp">{{ goodsItem.productName }}</text>
|
||||||
<text class="attr-box">{{ goodsItem.productAttr }} x {{ goodsItem.productQuantity }}</text>
|
<text class="attr-box">{{ goodsItem.productAttr }} x {{ goodsItem.productQuantity }}</text>
|
||||||
<text class="price">{{ goodsItem.productPrice }}</text><br/>
|
<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 === 5">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text>
|
||||||
<text class="title clamp" v-if="item.status === 3">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text>
|
<text class="title clamp" v-if="item.status === 3">{{ item.deliveryCompany }}:{{ item.deliverySn }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -49,10 +49,10 @@
|
|||||||
<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>
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
@@ -168,7 +168,7 @@ export default {
|
|||||||
|
|
||||||
let params = { pageNum: this.pageNum, status: status };
|
let params = { pageNum: this.pageNum, status: status };
|
||||||
let data = await Api.apiCall('get', Api.order.orderList, params);
|
let data = await Api.apiCall('get', Api.order.orderList, params);
|
||||||
console.log("data:------"+JSON.stringify(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)
|
||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navItem.orderList = [];
|
navItem.orderList = [];
|
||||||
console.log(JSON.stringify(orderList))
|
console.log(orderList)
|
||||||
orderList.forEach(item => {
|
orderList.forEach(item => {
|
||||||
console.log("item-----:"+item)
|
console.log("item-----:"+item)
|
||||||
navItem.orderList.push(item);
|
navItem.orderList.push(item);
|
||||||
|
|||||||
@@ -7,30 +7,36 @@
|
|||||||
<view class="order-item">
|
<view class="order-item">
|
||||||
<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" :style="{ color: orderInfo.stateTipColor }">{{ orderInfo.stateTip }}</text>
|
<text class="state"
|
||||||
<text v-if="orderInfo.status === 9" class="del-btn yticon icon-iconfontshanchu1" @click="deleteOrder(index)"></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>
|
||||||
<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 === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
|
<view v-if="goodsItem.type === 1" class="goods-box-single"
|
||||||
|
v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
|
||||||
<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 {{ goodsItem.productQuantity }}</text>
|
<text class="attr-box">{{ goodsItem.productAttr }} x
|
||||||
|
{{ goodsItem.productQuantity }}</text>
|
||||||
<text class="price">{{ goodsItem.productPrice }} </text>
|
<text class="price">{{ goodsItem.productPrice }} </text>
|
||||||
</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" v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
|
<view v-if="goodsItem.type === 2" class="goods-box-single"
|
||||||
|
v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
|
||||||
<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 {{ goodsItem.productQuantity }}</text>
|
<text class="attr-box">{{ goodsItem.productAttr }} x
|
||||||
|
{{ goodsItem.productQuantity }}</text>
|
||||||
<text class="price">{{ goodsItem.productPrice }} </text>
|
<text class="price">{{ goodsItem.productPrice }} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -55,15 +61,16 @@
|
|||||||
<text class="price">{{ orderInfo.payAmount }}</text>
|
<text class="price">{{ orderInfo.payAmount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action-box b-t">
|
<view class="action-box b-t">
|
||||||
<button v-if="orderInfo.status == 12" class="action-btn" @click="cancelOrder(orderInfo)">取消订单</button>
|
<button v-if="orderInfo.status == 12" class="action-btn"
|
||||||
<button v-if="orderInfo.status == 12" class="action-btn recom" @click="payOrder(orderInfo)">立即支付</button>
|
@click="cancelOrder(orderInfo)">取消订单</button>
|
||||||
<button v-if="orderInfo.status <7" class="action-btn recom" @click="applyRefund(orderInfo.id)">申请售后</button>
|
<button v-if="orderInfo.status == 12" class="action-btn recom"
|
||||||
<button v-if="orderInfo.status == 3" class="action-btn recom" @click="confimDelivery(orderInfo)">确认收货</button>
|
@click="payOrder(orderInfo)">立即支付</button>
|
||||||
<button class='action-btn recom'
|
<button v-if="orderInfo.status <7" class="action-btn recom"
|
||||||
hover-class="btn-hover"
|
@click="applyRefund(orderInfo.id)">申请售后</button>
|
||||||
v-if="orderInfo.status === 4"
|
<button v-if="orderInfo.status == 3" class="action-btn recom"
|
||||||
@click="toEvaluate(orderInfo.id)"
|
@click="confimDelivery(orderInfo)">确认收货</button>
|
||||||
>立即评价</button>
|
<button class='action-btn recom' hover-class="btn-hover" v-if="orderInfo.status === 4"
|
||||||
|
@click="toEvaluate(orderInfo.id)">立即评价</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -74,13 +81,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
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';
|
||||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||||
import empty from '@/components/empty';
|
import empty from '@/components/empty';
|
||||||
import Json from '@/Json';
|
import Json from '@/Json';
|
||||||
import { formatDate } from '@/common/date';
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright,
|
mallplusCopyright,
|
||||||
@@ -91,8 +102,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tabCurrentIndex: 0,
|
tabCurrentIndex: 0,
|
||||||
orderInfo: [],
|
orderInfo: [],
|
||||||
navList: [
|
navList: [{
|
||||||
{
|
|
||||||
status: 0,
|
status: 0,
|
||||||
text: '全部',
|
text: '全部',
|
||||||
loadingType: 'more',
|
loadingType: 'more',
|
||||||
@@ -127,7 +137,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
let params = { id: options.id };
|
let params = {
|
||||||
|
id: options.id
|
||||||
|
};
|
||||||
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);
|
||||||
@@ -164,7 +176,9 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
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);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -177,7 +191,9 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
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);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -197,7 +213,9 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
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);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -218,10 +236,12 @@ export default {
|
|||||||
if (value === 12) {
|
if (value === 12) {
|
||||||
stateTipColor = '#909399';
|
stateTipColor = '#909399';
|
||||||
return '待付款';
|
return '待付款';
|
||||||
}if (value === 1) {
|
}
|
||||||
|
if (value === 1) {
|
||||||
stateTipColor = '#909399';
|
stateTipColor = '#909399';
|
||||||
return '支付成功,没有回掉';
|
return '支付成功,没有回掉';
|
||||||
}if (value === 2) {
|
}
|
||||||
|
if (value === 2) {
|
||||||
stateTip = '待发货';
|
stateTip = '待发货';
|
||||||
} else if (value === 3) {
|
} else if (value === 3) {
|
||||||
stateTip = '待收货';
|
stateTip = '待收货';
|
||||||
@@ -248,7 +268,10 @@ export default {
|
|||||||
stateTip = '待付款';
|
stateTip = '待付款';
|
||||||
}
|
}
|
||||||
|
|
||||||
return { stateTip, stateTipColor };
|
return {
|
||||||
|
stateTip,
|
||||||
|
stateTipColor
|
||||||
|
};
|
||||||
},
|
},
|
||||||
dateFormat(time) {
|
dateFormat(time) {
|
||||||
if (time == null || time === '') {
|
if (time == null || time === '') {
|
||||||
@@ -271,6 +294,7 @@ page,
|
|||||||
.swiper-box {
|
.swiper-box {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-scroll-content {
|
.list-scroll-content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
@@ -283,6 +307,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;
|
||||||
@@ -292,8 +317,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;
|
||||||
@@ -311,12 +338,14 @@ 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;
|
||||||
@@ -325,17 +354,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;
|
||||||
@@ -348,51 +381,61 @@ 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;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attr-box {
|
.attr-box {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
padding: 10upx 12upx;
|
padding: 10upx 12upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -409,13 +452,16 @@ page,
|
|||||||
padding: 20upx 30upx;
|
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;
|
||||||
@@ -423,6 +469,7 @@ page,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-box {
|
.action-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@@ -431,6 +478,7 @@ page,
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 30upx;
|
padding-right: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
width: 160upx;
|
width: 160upx;
|
||||||
height: 60upx;
|
height: 60upx;
|
||||||
@@ -443,12 +491,15 @@ 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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,8 +144,16 @@
|
|||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['login']),
|
...mapMutations(['login']),
|
||||||
selectType(index) {
|
selectType(index) {
|
||||||
this.selectKey = index
|
|
||||||
this.show = !this.show
|
if (index == 0) {
|
||||||
|
this.show = true
|
||||||
|
this.selectKey = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index == 1) {
|
||||||
|
this.show = false
|
||||||
|
this.selectKey = 1
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
inputChange(e) {
|
inputChange(e) {
|
||||||
@@ -258,7 +266,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '登录成功'
|
title: '登录成功'
|
||||||
});
|
});
|
||||||
that.login(res.data.data);
|
that.login(res.data.data.userInfo);
|
||||||
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
||||||
that.$db.set('userInfos', res.data.data.userInfo);
|
that.$db.set('userInfos', res.data.data.userInfo);
|
||||||
|
|
||||||
@@ -354,7 +362,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '登录成功'
|
title: '登录成功'
|
||||||
});
|
});
|
||||||
that.login(res.data.data);
|
that.login(res.data.data.userInfo);
|
||||||
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
||||||
that.$db.set('userInfos', res.data.data.userInfo);
|
that.$db.set('userInfos', res.data.data.userInfo);
|
||||||
|
|
||||||
@@ -520,7 +528,7 @@
|
|||||||
//this.logining = false;
|
//this.logining = false;
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
that.login(data)
|
that.login(data.userInfo)
|
||||||
uni.setStorageSync('userInfos', data.userInfo);
|
uni.setStorageSync('userInfos', data.userInfo);
|
||||||
uni.setStorageSync('token', data.tokenHead + data.token);
|
uni.setStorageSync('token', data.tokenHead + data.token);
|
||||||
console.log(uni.getStorageSync('token'))
|
console.log(uni.getStorageSync('token'))
|
||||||
@@ -545,7 +553,7 @@
|
|||||||
let data = await Api.apiCall('post', Api.index.login, params);
|
let data = await Api.apiCall('post', Api.index.login, params);
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
that.login(data);
|
that.login(data.userInfo);
|
||||||
uni.setStorageSync('userInfos', data.userInfo);
|
uni.setStorageSync('userInfos', data.userInfo);
|
||||||
uni.setStorageSync('token', data.tokenHead + data.token);
|
uni.setStorageSync('token', data.tokenHead + data.token);
|
||||||
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
||||||
@@ -588,7 +596,7 @@
|
|||||||
// 登录成功 记录会员信息到本地
|
// 登录成功 记录会员信息到本地
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
that.login(res.data.data);
|
that.login(res.data.data.userInfo);
|
||||||
uni.setStorageSync('userInfos', res.data
|
uni.setStorageSync('userInfos', res.data
|
||||||
.data.userInfo);
|
.data.userInfo);
|
||||||
uni.setStorageSync('token', res.data.data
|
uni.setStorageSync('token', res.data.data
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
Api.apiCall('post', Api.index.logout, {});
|
Api.apiCall('post', Api.index.logout, {});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
|
uni.removeStorageSync('userInfo');
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item" >
|
<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item" >
|
||||||
<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' v-if="item.status == 0">待审核</text>
|
<text class='state' v-if="item.status == 0">待审核</text>
|
||||||
<text class='state' v-else-if="item.status == 1">退货中</text>
|
<text class='state' v-else-if="item.status == 1">退货中</text>
|
||||||
<text class='state' v-else-if="item.status == 2">已完成</text>
|
<text class='state' v-else-if="item.status == 2">已完成</text>
|
||||||
|
|||||||
@@ -178,6 +178,9 @@ export default {
|
|||||||
if (this.isFenxiao) {
|
if (this.isFenxiao) {
|
||||||
params.isFenxiao = 1;
|
params.isFenxiao = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("params>>>>",params)
|
||||||
|
|
||||||
let list = await Api.apiCall('get', Api.goods.goodsList, params);
|
let list = await Api.apiCall('get', Api.goods.goodsList, params);
|
||||||
let goodsList = list.records;
|
let goodsList = list.records;
|
||||||
// let goodsList = await this.$api.json('goodsList');
|
// let goodsList = await this.$api.json('goodsList');
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="c-list">
|
<!-- <view class="c-list">
|
||||||
<view class="c-row b-b" v-if="skuList && skuList.length > 0" @click="toggleSpec">
|
<view class="c-row b-b" v-if="skuList && skuList.length > 0" @click="toggleSpec">
|
||||||
<text class="tit">规格</text>
|
<text class="tit">规格</text>
|
||||||
<view class="con">
|
<view class="con">
|
||||||
@@ -77,10 +77,10 @@
|
|||||||
<text v-for="(item1, index1) in serviceList" :key="index1">{{ item1 }}</text>
|
<text v-for="(item1, index1) in serviceList" :key="index1">{{ item1 }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 评价 -->
|
<!-- 评价 -->
|
||||||
<view class="eva-section">
|
<!-- <view class="eva-section">
|
||||||
<view class="e-header">
|
<view class="e-header">
|
||||||
<text class="tit">评价</text>
|
<text class="tit">评价</text>
|
||||||
<text>({{ consultCount.all }})</text>
|
<text>({{ consultCount.all }})</text>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="detail-desc">
|
<view class="detail-desc">
|
||||||
<view class="d-header"><text>图文详情</text></view>
|
<view class="d-header"><text>图文详情</text></view>
|
||||||
|
|||||||
@@ -158,7 +158,6 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.listcard-content_title {
|
.listcard-content_title {
|
||||||
padding-right: 30px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ const store = new Vuex.Store({
|
|||||||
console.log(provider);
|
console.log(provider);
|
||||||
if (provider && provider != undefined) {
|
if (provider && provider != undefined) {
|
||||||
console.log("provider", provider);
|
console.log("provider", provider);
|
||||||
console.log("provider>>>", provider.userInfo.memberLevelId);
|
console.log("provider>>>", provider.memberLevelId);
|
||||||
state.hasLogin = true;
|
state.hasLogin = true;
|
||||||
state.hasVip = provider.userInfo.memberLevelId == 1 ? false : true;
|
state.hasVip = provider.memberLevelId == 1 ? false : true;
|
||||||
console.log("state.hasVip >>>", state.hasVip);
|
console.log("state.hasVip >>>", state.hasVip);
|
||||||
uni.setStorage({ //缓存用户登陆状态
|
uni.setStorage({ //缓存用户登陆状态
|
||||||
key: 'userInfo',
|
key: 'userInfo',
|
||||||
data: provider.userInfo
|
data: provider
|
||||||
})
|
})
|
||||||
state.userInfo = provider;
|
state.userInfo = provider;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user