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