|
|
|
@ -10,17 +10,18 @@
|
|
|
|
(loginResult.pic.indexOf('http') === -1 ? picDomain + loginResult.pic : loginResult.pic)
|
|
|
|
(loginResult.pic.indexOf('http') === -1 ? picDomain + loginResult.pic : loginResult.pic)
|
|
|
|
:
|
|
|
|
:
|
|
|
|
'/static/images/icon/head04.png'
|
|
|
|
'/static/images/icon/head04.png'
|
|
|
|
" />
|
|
|
|
"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="userinfo-name">
|
|
|
|
<view class="userinfo-name">
|
|
|
|
<view>{{ loginResult.nickName ? loginResult.nickName : "用户昵称" }}</view>
|
|
|
|
<view>{{ loginResult.nickName ? loginResult.nickName : '用户昵称' }}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view v-if="!isAuthInfo" class="userinfo-none">
|
|
|
|
<view v-if="!isAuthInfo" class="userinfo-none">
|
|
|
|
<view class="default-pic" @tap="toLogin">
|
|
|
|
<view class="default-pic" @tap="toLogin">
|
|
|
|
<image src="@/static/images/icon/head04.png" />
|
|
|
|
<image src="@/static/images/icon/head04.png"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="none-login" @tap="toLogin">
|
|
|
|
<view class="none-login" @tap="toLogin">
|
|
|
|
<button class="unlogin">
|
|
|
|
<button class="unlogin">
|
|
|
|
@ -42,40 +43,40 @@
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
<view class="checkmore" data-sts="0" @tap="toOrderListPage">
|
|
|
|
<view class="checkmore" data-sts="0" @tap="toOrderListPage">
|
|
|
|
<text>查看全部</text>
|
|
|
|
<text>查看全部</text>
|
|
|
|
<text class="arrowhead" />
|
|
|
|
<text class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="procedure">
|
|
|
|
<view class="procedure">
|
|
|
|
<view class="items" data-sts="1" @tap="toOrderListPage">
|
|
|
|
<view class="items" data-sts="1" @tap="toOrderListPage">
|
|
|
|
<image src="@/static/images/icon/toPay.png" />
|
|
|
|
<image src="@/static/images/icon/toPay.png"/>
|
|
|
|
<text>待支付</text>
|
|
|
|
<text>待支付</text>
|
|
|
|
<text v-if="orderAmount.unPay>0" class="num-badge">
|
|
|
|
<text v-if="orderAmount.unPay>0" class="num-badge">
|
|
|
|
{{ orderAmount.unPay }}
|
|
|
|
{{ orderAmount.unPay }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="items" data-sts="2" @tap="toOrderListPage">
|
|
|
|
<view class="items" data-sts="2" @tap="toOrderListPage">
|
|
|
|
<image src="@/static/images/icon/toDelivery.png" />
|
|
|
|
<image src="@/static/images/icon/toDelivery.png"/>
|
|
|
|
<text>待发货</text>
|
|
|
|
<text>待发货</text>
|
|
|
|
<text v-if="orderAmount.payed>0" class="num-badge">
|
|
|
|
<text v-if="orderAmount.payed>0" class="num-badge">
|
|
|
|
{{ orderAmount.payed }}
|
|
|
|
{{ orderAmount.payed }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="items" data-sts="3" @tap="toOrderListPage">
|
|
|
|
<view class="items" data-sts="3" @tap="toOrderListPage">
|
|
|
|
<image src="@/static/images/icon/toTake.png" />
|
|
|
|
<image src="@/static/images/icon/toTake.png"/>
|
|
|
|
<text>待收货</text>
|
|
|
|
<text>待收货</text>
|
|
|
|
<text v-if="orderAmount.consignment>0" class="num-badge">
|
|
|
|
<text v-if="orderAmount.consignment>0" class="num-badge">
|
|
|
|
{{ orderAmount.consignment }}
|
|
|
|
{{ orderAmount.consignment }}
|
|
|
|
</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="items" data-sts="5" @tap="toOrderListPage">
|
|
|
|
<view class="items" data-sts="5" @tap="toOrderListPage">
|
|
|
|
<image src="@/static/images/icon/toComment.png" />
|
|
|
|
<image src="@/static/images/icon/toComment.png"/>
|
|
|
|
<text>已完成</text>
|
|
|
|
<text>已完成</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!--end 订单状态 -->
|
|
|
|
<!--end 订单状态 -->
|
|
|
|
|
|
|
|
|
|
|
|
<view class="prod-col" style="display: none;" >
|
|
|
|
<view class="prod-col" style="display: none;">
|
|
|
|
<view class="col-item" @tap="myCollectionHandle">
|
|
|
|
<view class="col-item" @tap="myCollectionHandle">
|
|
|
|
<view v-if="loginResult" class="num">
|
|
|
|
<view v-if="loginResult" class="num">
|
|
|
|
{{ collectionCount }}
|
|
|
|
{{ collectionCount }}
|
|
|
|
@ -114,52 +115,52 @@
|
|
|
|
<view class="my-menu">
|
|
|
|
<view class="my-menu">
|
|
|
|
<view class="memu-item" @tap="toMemberInfoPage">
|
|
|
|
<view class="memu-item" @tap="toMemberInfoPage">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/promotion.png" />
|
|
|
|
<image src="@/static/images/icon/promotion.png"/>
|
|
|
|
<text>档案信息</text>
|
|
|
|
<text>档案信息</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toScorePage">
|
|
|
|
<view class="memu-item" @tap="toScorePage">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/myCoupon.png" />
|
|
|
|
<image src="@/static/images/icon/myCoupon.png"/>
|
|
|
|
<text>积分商城</text>
|
|
|
|
<text>积分商城</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toMemberPage">
|
|
|
|
<view class="memu-item" @tap="toMemberPage">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/getCoupon.png" />
|
|
|
|
<image src="@/static/images/icon/getCoupon.png"/>
|
|
|
|
<text>会员专区</text>
|
|
|
|
<text>会员专区</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toDistCenter" style="display: none;" >
|
|
|
|
<view class="memu-item" @tap="toDistCenter" style="display: none;">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/promotion.png" />
|
|
|
|
<image src="@/static/images/icon/promotion.png"/>
|
|
|
|
<text>分销中心</text>
|
|
|
|
<text>分销中心</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toCouponCenter" style="display: none;" >
|
|
|
|
<view class="memu-item" @tap="toCouponCenter" style="display: none;">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/getCoupon.png" />
|
|
|
|
<image src="@/static/images/icon/getCoupon.png"/>
|
|
|
|
<text>领券中心</text>
|
|
|
|
<text>领券中心</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toMyCouponPage" style="display: none;" >
|
|
|
|
<view class="memu-item" @tap="toMyCouponPage" style="display: none;">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/myCoupon.png" />
|
|
|
|
<image src="@/static/images/icon/myCoupon.png"/>
|
|
|
|
<text>我的优惠券</text>
|
|
|
|
<text>我的优惠券</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="memu-item" @tap="toAddressList">
|
|
|
|
<view class="memu-item" @tap="toAddressList">
|
|
|
|
<view class="i-name">
|
|
|
|
<view class="i-name">
|
|
|
|
<image src="@/static/images/icon/myAddr.png" />
|
|
|
|
<image src="@/static/images/icon/myAddr.png"/>
|
|
|
|
<text>收货地址</text>
|
|
|
|
<text>收货地址</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="arrowhead" />
|
|
|
|
<view class="arrowhead"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!--end 列表项 -->
|
|
|
|
<!--end 列表项 -->
|
|
|
|
@ -174,15 +175,15 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
const picDomain = import.meta.env.VITE_APP_RESOURCES_URL
|
|
|
|
const picDomain = import.meta.env.VITE_APP_RESOURCES_URL
|
|
|
|
|
|
|
|
|
|
|
|
const isAuthInfo = ref(false)
|
|
|
|
const isAuthInfo = ref(false)
|
|
|
|
const loginResult = ref('')
|
|
|
|
const loginResult = ref('')
|
|
|
|
const orderAmount = ref('')
|
|
|
|
const orderAmount = ref('')
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onShow(() => {
|
|
|
|
onShow(() => {
|
|
|
|
loginResult.value = uni.getStorageSync('loginResult')
|
|
|
|
loginResult.value = uni.getStorageSync('loginResult')
|
|
|
|
isAuthInfo.value = !!loginResult.value
|
|
|
|
isAuthInfo.value = !!loginResult.value
|
|
|
|
// 加载订单数字
|
|
|
|
// 加载订单数字
|
|
|
|
@ -201,35 +202,35 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
showCollectionCount()
|
|
|
|
showCollectionCount()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const toMemberInfoPage = () => {
|
|
|
|
const toMemberInfoPage = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/member-info/member-info'
|
|
|
|
url: '/pages/member-info/member-info'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toScorePage = () => {
|
|
|
|
const toScorePage = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/score/score'
|
|
|
|
url: '/pages/score/score'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toMemberPage = () => {
|
|
|
|
const toMemberPage = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/member/member'
|
|
|
|
url: '/pages/member/member'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toDistCenter = () => {
|
|
|
|
const toDistCenter = () => {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
icon: 'none',
|
|
|
|
title: '该功能未开源'
|
|
|
|
title: '该功能未开源'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toCouponCenter = () => {
|
|
|
|
const toCouponCenter = () => {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
icon: 'none',
|
|
|
|
title: '该功能未开源'
|
|
|
|
title: '该功能未开源'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toMyCouponPage = () => {
|
|
|
|
const toMyCouponPage = () => {
|
|
|
|
/* uni.showToast({
|
|
|
|
/* uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
icon: 'none',
|
|
|
|
title: '该功能未开源'
|
|
|
|
title: '该功能未开源'
|
|
|
|
@ -237,31 +238,31 @@
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/delivery-address/delivery-address'
|
|
|
|
url: '/pages/delivery-address/delivery-address'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const handleTips = () => {
|
|
|
|
const handleTips = () => {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
icon: 'none',
|
|
|
|
title: '该功能未开源'
|
|
|
|
title: '该功能未开源'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const toAddressList = () => {
|
|
|
|
const toAddressList = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/delivery-address/delivery-address'
|
|
|
|
url: '/pages/delivery-address/delivery-address'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const toOrderListPage = (e) => {
|
|
|
|
const toOrderListPage = (e) => {
|
|
|
|
const sts = e.currentTarget.dataset.sts
|
|
|
|
const sts = e.currentTarget.dataset.sts
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/orderList/orderList?sts=' + sts
|
|
|
|
url: '/pages/orderList/orderList?sts=' + sts
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const collectionCount = ref(0)
|
|
|
|
const collectionCount = ref(0)
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询所有的收藏量
|
|
|
|
* 查询所有的收藏量
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const showCollectionCount = () => {
|
|
|
|
const showCollectionCount = () => {
|
|
|
|
uni.showLoading()
|
|
|
|
uni.showLoading()
|
|
|
|
http.request({
|
|
|
|
http.request({
|
|
|
|
url: '/p/user/collection/count',
|
|
|
|
url: '/p/user/collection/count',
|
|
|
|
@ -274,12 +275,12 @@
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
collectionCount.value = data
|
|
|
|
collectionCount.value = data
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 我的收藏跳转
|
|
|
|
* 我的收藏跳转
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const myCollectionHandle = () => {
|
|
|
|
const myCollectionHandle = () => {
|
|
|
|
let url = '/pages/prod-classify/prod-classify?sts=5'
|
|
|
|
let url = '/pages/prod-classify/prod-classify?sts=5'
|
|
|
|
const id = 0
|
|
|
|
const id = 0
|
|
|
|
const title = '我的收藏商品'
|
|
|
|
const title = '我的收藏商品'
|
|
|
|
@ -289,21 +290,21 @@
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url
|
|
|
|
url
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 去登陆
|
|
|
|
* 去登陆
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const toLogin = () => {
|
|
|
|
const toLogin = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/accountLogin/accountLogin'
|
|
|
|
url: '/pages/accountLogin/accountLogin'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 退出登录
|
|
|
|
* 退出登录
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
const logout = () => {
|
|
|
|
const logout = () => {
|
|
|
|
http.request({
|
|
|
|
http.request({
|
|
|
|
url: '/logOut',
|
|
|
|
url: '/logOut',
|
|
|
|
method: 'post'
|
|
|
|
method: 'post'
|
|
|
|
@ -323,9 +324,9 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}, 1000)
|
|
|
|
}, 1000)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@use './user.scss';
|
|
|
|
@use './user.scss';
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|