feat: 修复bug
This commit is contained in:
@@ -3,8 +3,7 @@
|
|||||||
<TopSafe></TopSafe>
|
<TopSafe></TopSafe>
|
||||||
|
|
||||||
<view class="product_info_header_warp">
|
<view class="product_info_header_warp">
|
||||||
<up-swiper :list="swiperList" class="product_info_header_swiper" @click="onSwiper"
|
<up-swiper :list="swiperList" class="product_info_header_swiper" @click="onSwiper" @change="(e) => (currentNum = e.current)">
|
||||||
@change="(e) => (currentNum = e.current)">
|
|
||||||
<template #indicator>
|
<template #indicator>
|
||||||
<view class="indicator-num">
|
<view class="indicator-num">
|
||||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
||||||
@@ -12,26 +11,28 @@
|
|||||||
</template>
|
</template>
|
||||||
</up-swiper>
|
</up-swiper>
|
||||||
<view class="img_comm left_warp">
|
<view class="img_comm left_warp">
|
||||||
<up-image src="/static/common/left_b_st.png" width="30" height="30" bgColor="#f1f6ff00"
|
<up-image src="/static/common/left_b_st.png" width="30" height="30" bgColor="#f1f6ff00" @click="jumpLeft"></up-image>
|
||||||
@click="jumpLeft"></up-image>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tab-view">
|
<view class="tab-view">
|
||||||
<!-- 限时秒杀卡片 -->
|
<!-- 限时秒杀卡片 -->
|
||||||
<view class="tab-card">
|
<view class="tab-card">
|
||||||
<view class="tab-item" :class="{ active: activeTab === index }" @click="onActiveTabChange(index)"
|
<view class="tab-item" :class="{ active: activeTab === index }" @click="onActiveTabChange(index)" v-for="(item, index) in activeTabList" :key="index">
|
||||||
v-for="(item, index) in activeTabList" :key="index">
|
|
||||||
<text class="tab-text">{{ item.name }}</text>
|
<text class="tab-text">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 限时秒杀标签 -->
|
<!-- 限时秒杀标签 -->
|
||||||
<view class="tab-list-container">
|
<view class="tab-list-container">
|
||||||
<view class="tab-list" @click="onTab(index)" v-for="(item, index) in tabList" :key="index">
|
<view class="tab-list" @click="onTab(index)" v-for="(item, index) in tabList" :key="index">
|
||||||
<text class="text-28 text-space" :style="{
|
<text
|
||||||
color: curTab == index ? '#7A35F6' : '#666',
|
class="text-28 text-space"
|
||||||
}">{{ item.name }}</text>
|
:style="{
|
||||||
|
color: curTab == index ? '#7A35F6' : '#666'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
<!-- <view class="line" v-if="curTab == index"></view> -->
|
<!-- <view class="line" v-if="curTab == index"></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,8 +40,7 @@
|
|||||||
|
|
||||||
<view class="setting-view">
|
<view class="setting-view">
|
||||||
<view class="name-box">
|
<view class="name-box">
|
||||||
<mescroll-uni ref="mescrollRef" @down="downCallback" @up="upCallback" :up="upOption" :down="downOption"
|
<mescroll-uni ref="mescrollRef" @down="downCallback" @up="upCallback" :up="upOption" :down="downOption" @init="mescrollInit" :fixed="false">
|
||||||
@init="mescrollInit" :fixed="false">
|
|
||||||
<!-- 原来单个 v-for 替换成两列 -->
|
<!-- 原来单个 v-for 替换成两列 -->
|
||||||
<view class="mescrollUniView" v-for="item in dataList" :key="item.id">
|
<view class="mescrollUniView" v-for="item in dataList" :key="item.id">
|
||||||
<productSeckillCard :item="item" actived-type="seckill" :attributes="attributes" />
|
<productSeckillCard :item="item" actived-type="seckill" :attributes="attributes" />
|
||||||
@@ -56,18 +56,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { toRaw } from "vue";
|
import { toRaw } from 'vue';
|
||||||
import { getCascadeCategory, getCarouselImage } from "@/api/common.js";
|
import { getCascadeCategory, getCarouselImage } from '@/api/common.js';
|
||||||
import Header from "@/components/common/header.vue";
|
import Header from '@/components/common/header.vue';
|
||||||
import TopSafe from "@/components/common/top-safe.nvue";
|
import TopSafe from '@/components/common/top-safe.nvue';
|
||||||
import MyBtn from "@/components/common/my-btn.vue";
|
import MyBtn from '@/components/common/my-btn.vue';
|
||||||
import PingItem from "@/components/shop/ping-item.vue";
|
import PingItem from '@/components/shop/ping-item.vue';
|
||||||
import { getSeckillGoodsList, getSeckillCurrent, getSeckillPreview } from "@/api/product.js";
|
import { getSeckillGoodsList, getSeckillCurrent, getSeckillPreview } from '@/api/product.js';
|
||||||
import CustomTabBar from "@/components/custom-tab-bar.vue";
|
import CustomTabBar from '@/components/custom-tab-bar.vue';
|
||||||
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins.js';
|
||||||
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue";
|
import MescrollUni from '@/components/mescroll-uni/mescroll-uni.vue';
|
||||||
import productSeckillCard from "@/components/common/product-seckill-card.vue";
|
import productSeckillCard from '@/components/common/product-seckill-card.vue';
|
||||||
import { APP_PAGE_TYPE } from "@/utils/enumUtils.js";
|
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [MescrollMixin],
|
mixins: [MescrollMixin],
|
||||||
@@ -76,72 +76,73 @@ export default {
|
|||||||
return {
|
return {
|
||||||
swiperList: [],
|
swiperList: [],
|
||||||
currentNum: 0,
|
currentNum: 0,
|
||||||
activityId: "",
|
activityId: '',
|
||||||
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
tabList: [{ name: "推荐" }],
|
tabList: [{ name: '推荐' }],
|
||||||
curTab: 0,
|
curTab: 0,
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
activeTabList: [
|
activeTabList: [
|
||||||
{ name: "今日秒杀", type: "current" },
|
{ name: '今日秒杀', type: 'current' },
|
||||||
{ name: "活动预告", type: "preview" }
|
{ name: '活动预告', type: 'preview' }
|
||||||
],
|
],
|
||||||
upOption: {
|
upOption: {
|
||||||
auto: false,
|
auto: false,
|
||||||
page: {
|
page: {
|
||||||
size: 10, // 每页数据的数量,默认10
|
size: 10 // 每页数据的数量,默认10
|
||||||
},
|
},
|
||||||
noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
|
noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
|
||||||
empty: {
|
empty: {
|
||||||
tip: `空空如也`,
|
tip: `空空如也`
|
||||||
},
|
},
|
||||||
textColor: "#333",
|
textColor: '#333',
|
||||||
bgColor: "rgba(0,0,0,0)",
|
bgColor: 'rgba(0,0,0,0)'
|
||||||
},
|
},
|
||||||
downOption: {
|
downOption: {
|
||||||
auto: false,
|
auto: false,
|
||||||
textColor: "#333",
|
textColor: '#333',
|
||||||
bgColor: "rgba(0,0,0,0)",
|
bgColor: 'rgba(0,0,0,0)'
|
||||||
},
|
},
|
||||||
mescroll: null,
|
mescroll: null,
|
||||||
attributes: {}, // 限时秒杀卡片属性
|
attributes: {} // 限时秒杀卡片属性
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.init();
|
this.init();
|
||||||
this.getCarouselImage()
|
this.getCarouselImage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询轮播图
|
// 查询轮播图
|
||||||
async getCarouselImage() {
|
async getCarouselImage() {
|
||||||
const params = {
|
const params = {
|
||||||
pageUi: APP_PAGE_TYPE.SECKILL,
|
pageUi: APP_PAGE_TYPE.SECKILL
|
||||||
};
|
};
|
||||||
const resp = await getCarouselImage(params);
|
const resp = await getCarouselImage(params);
|
||||||
if (resp && resp.bizcode === 100) {
|
if (resp && resp.bizcode === 100) {
|
||||||
const data = resp.data || [];
|
const data = resp.data || [];
|
||||||
this.swiperList =
|
this.swiperList = data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
||||||
data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取秒杀
|
// 获取秒杀
|
||||||
onGetSeckillCurrent(type = 'current') {
|
onGetSeckillCurrent(type = 'current') {
|
||||||
const url = type === 'current' ? getSeckillCurrent : getSeckillPreview;
|
const url = type === 'current' ? getSeckillPreview : getSeckillCurrent;
|
||||||
url().then((res) => {
|
url()
|
||||||
|
.then((res) => {
|
||||||
if (res.bizcode === 100) {
|
if (res.bizcode === 100) {
|
||||||
this.activityId = res.data.activityId;
|
this.activityId = res.data.activityId;
|
||||||
console.log('获取秒杀当前时间', res.data);
|
console.log('获取秒杀当前时间', res.data);
|
||||||
|
|
||||||
this.attributes = {
|
this.attributes = {
|
||||||
leftTime: res.data.leftTime || null,
|
leftTime: res.data.leftTime || null
|
||||||
}
|
};
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.mescroll && this.mescroll.resetUpScroll();
|
this.mescroll && this.mescroll.resetUpScroll();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.mescroll && this.mescroll.endErr();
|
this.mescroll && this.mescroll.endErr();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.mescroll && this.mescroll.endErr();
|
this.mescroll && this.mescroll.endErr();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -154,14 +155,15 @@ export default {
|
|||||||
let params = {
|
let params = {
|
||||||
page: page.num,
|
page: page.num,
|
||||||
pageSize: page.size,
|
pageSize: page.size,
|
||||||
activityId: this.activityId,
|
activityId: this.activityId
|
||||||
};
|
};
|
||||||
if (this.curTab != 0) {
|
if (this.curTab != 0) {
|
||||||
params["categoryId"] = this.tabList[this.curTab].id;
|
params['categoryId'] = this.tabList[this.curTab].id;
|
||||||
} else {
|
} else {
|
||||||
params["isRecomm"] = true;
|
params['isRecomm'] = true;
|
||||||
}
|
}
|
||||||
getSeckillGoodsList(params).then((res) => {
|
getSeckillGoodsList(params)
|
||||||
|
.then((res) => {
|
||||||
let curPageLen = res.data?.entitys ? res.data.entitys.length : 0;
|
let curPageLen = res.data?.entitys ? res.data.entitys.length : 0;
|
||||||
if (page.num === 1) this.dataList = [];
|
if (page.num === 1) this.dataList = [];
|
||||||
if (res.data?.entitys) {
|
if (res.data?.entitys) {
|
||||||
@@ -170,7 +172,8 @@ export default {
|
|||||||
console.log(this.dataList);
|
console.log(this.dataList);
|
||||||
|
|
||||||
this.mescroll.endBySize(curPageLen, res.data ? res.data.totalCount : 0);
|
this.mescroll.endBySize(curPageLen, res.data ? res.data.totalCount : 0);
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.mescroll && this.mescroll.endErr();
|
this.mescroll && this.mescroll.endErr();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -215,17 +218,17 @@ export default {
|
|||||||
},
|
},
|
||||||
jumpLeft() {
|
jumpLeft() {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1, // 返回的页面数,默认为1,返回到上一级
|
delta: 1 // 返回的页面数,默认为1,返回到上一级
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSwiper(index) {
|
onSwiper(index) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: index,
|
current: index,
|
||||||
loop: true,
|
loop: true,
|
||||||
urls: this.swiperList,
|
urls: this.swiperList
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -349,7 +352,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.tab-text {
|
.tab-text {
|
||||||
color: #7A35F6;
|
color: #7a35f6;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,7 +374,6 @@ export default {
|
|||||||
padding: 24rpx 0 0;
|
padding: 24rpx 0 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
;
|
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 520rpx;
|
top: 520rpx;
|
||||||
@@ -395,7 +397,6 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-view {
|
.setting-view {
|
||||||
|
|||||||
+126
-142
@@ -3,27 +3,39 @@
|
|||||||
<view class="mine_header">
|
<view class="mine_header">
|
||||||
<view class="mine_login_data" v-if="currentUserData && Object.keys(currentUserData).length !== 0">
|
<view class="mine_login_data" v-if="currentUserData && Object.keys(currentUserData).length !== 0">
|
||||||
<view class="mine_data">
|
<view class="mine_data">
|
||||||
<up-image :src="currentUserData.avatarUrl
|
<up-image
|
||||||
? currentUserData.avatarUrl
|
:src="currentUserData.avatarUrl ? currentUserData.avatarUrl : 'https://static.tbmall.xin/static/mine/avatar.png'"
|
||||||
: 'https://static.tbmall.xin/static/mine/avatar.png'
|
shape="circle"
|
||||||
" shape="circle" width="54" height="54" bgColor="#f1f6ff00"></up-image>
|
width="54"
|
||||||
|
height="54"
|
||||||
|
bgColor="#f1f6ff00"
|
||||||
|
></up-image>
|
||||||
<view class="mine_info">
|
<view class="mine_info">
|
||||||
<view class="mine_info_name">
|
<view class="mine_info_name">
|
||||||
<text style="margin-right: 20rpx">{{
|
<text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text>
|
||||||
currentUserData.nickname || "信任桥用户"
|
|
||||||
}}</text>
|
|
||||||
|
|
||||||
<view class="level level-grade" @click="jumpToTrustBridge" v-if="currentUserData.agentName">
|
<view class="level level-grade" @click="jumpToTrustBridge" v-if="currentUserData.agentName">
|
||||||
<up-image src="https://static.tbmall.xin/static/mine/rz.png"
|
<up-image
|
||||||
style="margin-right: 8rpx; margin-top: 6rpx" shape="circle" width="13" height="13"
|
src="https://static.tbmall.xin/static/mine/rz.png"
|
||||||
bgColor="#f1f6ff00"></up-image>
|
style="margin-right: 8rpx; margin-top: 6rpx"
|
||||||
|
shape="circle"
|
||||||
|
width="13"
|
||||||
|
height="13"
|
||||||
|
bgColor="#f1f6ff00"
|
||||||
|
></up-image>
|
||||||
<view>{{ currentUserData.agentName }}</view>
|
<view>{{ currentUserData.agentName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="['level', currentUserData.grade ? 'level-name' : 'level-grade']" v-if="!currentUserData.agentName && currentUserData.gradeName">
|
<view :class="['level', currentUserData.grade ? 'level-name' : 'level-grade']" v-if="!currentUserData.agentName && currentUserData.gradeName">
|
||||||
<view style="display: flex; align-items: center;">
|
<view style="display: flex; align-items: center">
|
||||||
<up-image :src="currentUserData.grade? '/static/common/level.png' : 'https://static.tbmall.xin/static/mine/rz.png'" style="margin-right: 8rpx; margin-top: 6rpx" shape="circle"
|
<up-image
|
||||||
width="14" height="14" bgColor="#f1f6ff00"></up-image>
|
:src="currentUserData.grade ? '/static/common/level.png' : 'https://static.tbmall.xin/static/mine/rz.png'"
|
||||||
|
style="margin-right: 8rpx; margin-top: 6rpx"
|
||||||
|
shape="circle"
|
||||||
|
width="14"
|
||||||
|
height="14"
|
||||||
|
bgColor="#f1f6ff00"
|
||||||
|
></up-image>
|
||||||
<view>{{ currentUserData.gradeName }}</view>
|
<view>{{ currentUserData.gradeName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -46,20 +58,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mine_info_id">
|
<view class="mine_info_id">
|
||||||
<text style="margin-right: 20rpx">邀请码:{{ currentUserData.inviteCode }}</text>
|
<text style="margin-right: 20rpx">邀请码:{{ currentUserData.inviteCode }}</text>
|
||||||
<up-image src="/static/common/copy.png" width="14" height="14" bgColor="#f1f6ff00"
|
<up-image src="/static/common/copy.png" width="14" height="14" bgColor="#f1f6ff00" @click="copyData(currentUserData.inviteCode)"></up-image>
|
||||||
@click="copyData(currentUserData.inviteCode)"></up-image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="jumpSetting">
|
<view @click="jumpSetting">
|
||||||
<up-image src="https://static.tbmall.xin/static/mine/icon_arrow_black_off.png" width="22" height="22"
|
<up-image src="https://static.tbmall.xin/static/mine/icon_arrow_black_off.png" width="22" height="22" bgColor="#f1f6ff00"></up-image>
|
||||||
bgColor="#f1f6ff00"></up-image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine_no_login_data" v-else>
|
<view class="mine_no_login_data" v-else>
|
||||||
<view class="mine_data">
|
<view class="mine_data">
|
||||||
<up-image src="https://static.tbmall.xin/static/avater_not.png" shape="circle" width="80" height="80"
|
<up-image src="https://static.tbmall.xin/static/avater_not.png" shape="circle" width="80" height="80" bgColor="#f1f6ff00"></up-image>
|
||||||
bgColor="#f1f6ff00"></up-image>
|
|
||||||
<view class="mine_info_not_login">未登录</view>
|
<view class="mine_info_not_login">未登录</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="jumpLogin" class="login_warp">
|
<view @click="jumpLogin" class="login_warp">
|
||||||
@@ -75,13 +84,11 @@
|
|||||||
<view>我的订单</view>
|
<view>我的订单</view>
|
||||||
<view class="mine_order_title_all" @click="jumpOrder({})">
|
<view class="mine_order_title_all" @click="jumpOrder({})">
|
||||||
<view style="margin-right: 10rpx; font-size: 28rpx; font-weight: normal">全部</view>
|
<view style="margin-right: 10rpx; font-size: 28rpx; font-weight: normal">全部</view>
|
||||||
<up-image style="margin-top: 10rpx" src="/static/common/right.png" width="15" height="15"
|
<up-image style="margin-top: 10rpx" src="/static/common/right.png" width="15" height="15" bgColor="#f1f6ff00"></up-image>
|
||||||
bgColor="#f1f6ff00"></up-image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine_order_list">
|
<view class="mine_order_list">
|
||||||
<view class="mine_fontsize_comm_warp order_list_item" v-for="item in orderTemplList" :key="item.id"
|
<view class="mine_fontsize_comm_warp order_list_item" v-for="item in orderTemplList" :key="item.id" @click="jumpOrder(item)">
|
||||||
@click="jumpOrder(item)">
|
|
||||||
<up-image :src="item.url" width="28" height="28" bgColor="#f1f6ff00"></up-image>
|
<up-image :src="item.url" width="28" height="28" bgColor="#f1f6ff00"></up-image>
|
||||||
<view>{{ item.title }}</view>
|
<view>{{ item.title }}</view>
|
||||||
<up-badge :absolute="true" :offset="[0, 8]" max="99" :value="statisticsObj[item.note]"></up-badge>
|
<up-badge :absolute="true" :offset="[0, 8]" max="99" :value="statisticsObj[item.note]"></up-badge>
|
||||||
@@ -90,8 +97,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 应用 -->
|
<!-- 应用 -->
|
||||||
<view class="mine_content_comm_warp mine_top_comm_warp apply_list">
|
<view class="mine_content_comm_warp mine_top_comm_warp apply_list">
|
||||||
<view class="apply_item mine_fontsize_comm_warp" v-for="item in applyList" :key="item.id"
|
<view class="apply_item mine_fontsize_comm_warp" v-for="item in applyList" :key="item.id" @click="jumpTool(item)">
|
||||||
@click="jumpTool(item)">
|
|
||||||
<up-image :src="item.url" width="36" height="36" bgColor="#f1f6ff00"></up-image>
|
<up-image :src="item.url" width="36" height="36" bgColor="#f1f6ff00"></up-image>
|
||||||
<view>{{ item.title }}</view>
|
<view>{{ item.title }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -223,19 +229,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStorageFun, USER_DATA, clear } from "@/utils/auth.js";
|
import { getStorageFun, USER_DATA, clear } from '@/utils/auth.js';
|
||||||
import { ORDER_TYPE, MINE_ORDER_TYPE } from "@/utils/enumUtils.js";
|
import { ORDER_TYPE, MINE_ORDER_TYPE } from '@/utils/enumUtils.js';
|
||||||
import { copyData } from "@/utils/index.js";
|
import { copyData } from '@/utils/index.js';
|
||||||
import CustomTabBar from "@/components/custom-tab-bar.vue";
|
import CustomTabBar from '@/components/custom-tab-bar.vue';
|
||||||
import { getStatistics } from "@/api/order.js";
|
import { getStatistics } from '@/api/order.js';
|
||||||
import { getUserInfo } from "@/api/auth.js";
|
import { getUserInfo } from '@/api/auth.js';
|
||||||
import { CUSTOMER_SERVICE_PHONE_NUMBER } from "@/utils/config.js";
|
import { CUSTOMER_SERVICE_PHONE_NUMBER } from '@/utils/config.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
CUSTOMER_SERVICE_PHONE_NUMBER() {
|
CUSTOMER_SERVICE_PHONE_NUMBER() {
|
||||||
return CUSTOMER_SERVICE_PHONE_NUMBER;
|
return CUSTOMER_SERVICE_PHONE_NUMBER;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
components: { CustomTabBar },
|
components: { CustomTabBar },
|
||||||
data() {
|
data() {
|
||||||
@@ -245,81 +251,71 @@ export default {
|
|||||||
orderTemplList: [
|
orderTemplList: [
|
||||||
{
|
{
|
||||||
id: ORDER_TYPE.UNPAID,
|
id: ORDER_TYPE.UNPAID,
|
||||||
title: "待支付",
|
title: '待支付',
|
||||||
url: "https://static.tbmall.xin/static/mine/order_unpaid.png",
|
url: 'https://static.tbmall.xin/static/mine/order_unpaid.png',
|
||||||
path:
|
path: '/pages/mine_package/mine_order/mine_order?type=' + MINE_ORDER_TYPE.UNPAID,
|
||||||
"/pages/mine_package/mine_order/mine_order?type=" +
|
note: 'unPayNum'
|
||||||
MINE_ORDER_TYPE.UNPAID,
|
|
||||||
note: "unPayNum",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: ORDER_TYPE.UNSHIPPED,
|
id: ORDER_TYPE.UNSHIPPED,
|
||||||
title: "待发货",
|
title: '待发货',
|
||||||
url: "https://static.tbmall.xin/static/mine/order_unshipped.png",
|
url: 'https://static.tbmall.xin/static/mine/order_unshipped.png',
|
||||||
path:
|
path: '/pages/mine_package/mine_order/mine_order?type=' + MINE_ORDER_TYPE.UNSHIPPED,
|
||||||
"/pages/mine_package/mine_order/mine_order?type=" +
|
note: 'unSentNum'
|
||||||
MINE_ORDER_TYPE.UNSHIPPED,
|
|
||||||
note: "unSentNum",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: ORDER_TYPE.NOT_RECEIVE,
|
id: ORDER_TYPE.NOT_RECEIVE,
|
||||||
title: "待收货",
|
title: '待收货',
|
||||||
url: "https://static.tbmall.xin/static/mine/order_notReceive.png",
|
url: 'https://static.tbmall.xin/static/mine/order_notReceive.png',
|
||||||
path:
|
path: '/pages/mine_package/mine_order/mine_order?type=' + MINE_ORDER_TYPE.NOT_RECEIVE,
|
||||||
"/pages/mine_package/mine_order/mine_order?type=" +
|
note: 'unTakeNum'
|
||||||
MINE_ORDER_TYPE.NOT_RECEIVE,
|
|
||||||
note: "unTakeNum",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: ORDER_TYPE.SUCCEED,
|
id: ORDER_TYPE.SUCCEED,
|
||||||
title: "已完成",
|
title: '已完成',
|
||||||
url: "https://static.tbmall.xin/static/mine/order_afterSale.png",
|
url: 'https://static.tbmall.xin/static/mine/order_afterSale.png',
|
||||||
path:
|
path: '/pages/mine_package/mine_order/mine_order?type=' + MINE_ORDER_TYPE.SUCCEED,
|
||||||
"/pages/mine_package/mine_order/mine_order?type=" +
|
note: 'unCommentNum'
|
||||||
MINE_ORDER_TYPE.SUCCEED,
|
|
||||||
note: "unCommentNum",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: ORDER_TYPE.AFTER_SALE,
|
id: ORDER_TYPE.AFTER_SALE,
|
||||||
title: "售后",
|
title: '售后',
|
||||||
url: "https://static.tbmall.xin/static/new/shouhou.png",
|
url: 'https://static.tbmall.xin/static/new/shouhou.png',
|
||||||
path:
|
path: '/pages/mine_package/mine_order/mine_order?type=' + MINE_ORDER_TYPE.AFTER_SALE,
|
||||||
"/pages/mine_package/mine_order/mine_order?type=" +
|
note: 'unCommentNum'
|
||||||
MINE_ORDER_TYPE.AFTER_SALE,
|
}
|
||||||
note: "unCommentNum",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
applyList: [
|
applyList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: "钱包",
|
title: '钱包',
|
||||||
url: "https://static.tbmall.xin/static/mine/apply_purse.png",
|
url: 'https://static.tbmall.xin/static/mine/apply_purse.png',
|
||||||
path: "/pages/mine_package/mine_purse/mine_purse",
|
path: '/pages/mine_package/mine_purse/mine_purse'
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
title: "优惠券",
|
|
||||||
url: "https://static.tbmall.xin/static/mine/apply_prize.png",
|
|
||||||
path: "/pages/other_package/coupon/coupon",
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// id: 6,
|
||||||
|
// title: "优惠券",
|
||||||
|
// url: "https://static.tbmall.xin/static/mine/apply_prize.png",
|
||||||
|
// path: "/pages/other_package/coupon/coupon",
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
title: "抽奖",
|
title: '抽奖',
|
||||||
url: "https://static.tbmall.xin/static/mine/apply_prize.png",
|
url: 'https://static.tbmall.xin/static/mine/apply_prize.png',
|
||||||
path: "/pages/other_package/nine-grid/nine-grid",
|
path: '/pages/other_package/nine-grid/nine-grid'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
title: "我的推广",
|
title: '我的推广',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_team.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_team.png',
|
||||||
path: "/pages/mine_package/mine_my_team/mine_my_team",
|
path: '/pages/mine_package/mine_my_team/mine_my_team'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
title: "数字积分",
|
title: '数字积分',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_js.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_js.png',
|
||||||
path: "/pages/rwa_package/dongjian/jia",
|
path: '/pages/rwa_package/dongjian/jia'
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// id: 3,
|
// id: 3,
|
||||||
// title: "交易",
|
// title: "交易",
|
||||||
@@ -338,26 +334,26 @@ export default {
|
|||||||
toolList: [
|
toolList: [
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
title: "地址管理",
|
title: '地址管理',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_dz.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_dz.png',
|
||||||
path: "/pages/mine_package/mine_address/mine_address",
|
path: '/pages/mine_package/mine_address/mine_address'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 9,
|
id: 9,
|
||||||
title: "实名认证",
|
title: '实名认证',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_sm.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_sm.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
title: "账户管理",
|
title: '账户管理',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_card.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_card.png',
|
||||||
path: "/pages/rwa_package/account/index",
|
path: '/pages/rwa_package/account/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
title: "邀请好友",
|
title: '邀请好友',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_invite.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_invite.png',
|
||||||
path: "/pages/other_package/invite_friends/invite_friends",
|
path: '/pages/other_package/invite_friends/invite_friends'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// id:2,
|
// id:2,
|
||||||
@@ -373,8 +369,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
id: 7,
|
id: 7,
|
||||||
title: "联系客服",
|
title: '联系客服',
|
||||||
url: "https://static.tbmall.xin/static/mine/xlkf.png",
|
url: 'https://static.tbmall.xin/static/mine/xlkf.png'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// id:4,
|
// id:4,
|
||||||
@@ -384,16 +380,16 @@ export default {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
id: 8,
|
id: 8,
|
||||||
title: "商学院资讯",
|
title: '商学院资讯',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_sxy.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_sxy.png',
|
||||||
path: "/pages/login_package/news/news",
|
path: '/pages/login_package/news/news'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 12,
|
id: 12,
|
||||||
title: "财务",
|
title: '财务',
|
||||||
url: "https://static.tbmall.xin/static/mine/tool_cw.png",
|
url: 'https://static.tbmall.xin/static/mine/tool_cw.png',
|
||||||
path: "/pages/rwa_package/dongjian/finance",
|
path: '/pages/rwa_package/dongjian/finance'
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// id: 11,
|
// id: 11,
|
||||||
// title: "股东行权",
|
// title: "股东行权",
|
||||||
@@ -411,21 +407,21 @@ export default {
|
|||||||
unPayNum: 0, //待支付数量
|
unPayNum: 0, //待支付数量
|
||||||
unSentNum: 0, //待发货数量
|
unSentNum: 0, //待发货数量
|
||||||
unTakeNum: 0, //待收货数量
|
unTakeNum: 0, //待收货数量
|
||||||
unCommentNum: 0, //待评价数量
|
unCommentNum: 0 //待评价数量
|
||||||
}, // 角标统计
|
}, // 角标统计
|
||||||
serviceShow: false, // 我的客服弹框
|
serviceShow: false, // 我的客服弹框
|
||||||
openShow: false, // 暂未开放
|
openShow: false, // 暂未开放
|
||||||
platformType: true,
|
platformType: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.userData = getStorageFun(USER_DATA);
|
this.userData = getStorageFun(USER_DATA);
|
||||||
/*#ifdef APP-PLUS*/
|
/*#ifdef APP-PLUS*/
|
||||||
uni.hideTabBar({
|
uni.hideTabBar({
|
||||||
animation: false,
|
animation: false
|
||||||
});
|
});
|
||||||
const appUpdate = uni.getStorageSync("platform");
|
const appUpdate = uni.getStorageSync('platform');
|
||||||
this.platformType = appUpdate == "android" ? "ANDROID" : "IOS";
|
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
this.getStatistics();
|
this.getStatistics();
|
||||||
|
|
||||||
@@ -447,12 +443,10 @@ export default {
|
|||||||
},
|
},
|
||||||
jumpToTrustBridge() {
|
jumpToTrustBridge() {
|
||||||
// 跳转到指定的信任桥地址
|
// 跳转到指定的信任桥地址
|
||||||
const isAgentLogin = this.currentUserData?.isAgentLogin
|
const isAgentLogin = this.currentUserData?.isAgentLogin ? Number(this.currentUserData?.isAgentLogin) : 0;
|
||||||
? Number(this.currentUserData?.isAgentLogin)
|
|
||||||
: 0;
|
|
||||||
if (isAgentLogin) {
|
if (isAgentLogin) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/mine_package/mild-shopping/mild-shopping",
|
url: '/pages/mine_package/mild-shopping/mild-shopping'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -464,63 +458,56 @@ export default {
|
|||||||
// 优惠券
|
// 优惠券
|
||||||
if (item.id === 6) {
|
if (item.id === 6) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.path,
|
url: item.path
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 客服
|
// 客服
|
||||||
if (item.id === 7) {
|
if (item.id === 7) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/rwa_package/setting/kefu?type=5257",
|
url: '/pages/rwa_package/setting/kefu?type=5257'
|
||||||
});
|
});
|
||||||
} else if (item.id === 9) {
|
} else if (item.id === 9) {
|
||||||
// 实名认证
|
// 实名认证
|
||||||
const currentUserData = this.currentUserData;
|
const currentUserData = this.currentUserData;
|
||||||
console.log("currentUserData", this.currentUserData);
|
console.log('currentUserData', this.currentUserData);
|
||||||
let path =
|
let path = '/pages/mine_package/mine_authentication/mine_authentication';
|
||||||
"/pages/mine_package/mine_authentication/mine_authentication";
|
if (currentUserData && Object.keys(currentUserData).length !== 0 && currentUserData.certStatus && currentUserData.certStatus !== 0) {
|
||||||
if (
|
path = '/pages/mine_package/mine_authentication_ok/mine_authentication_ok';
|
||||||
currentUserData &&
|
|
||||||
Object.keys(currentUserData).length !== 0 &&
|
|
||||||
currentUserData.certStatus &&
|
|
||||||
currentUserData.certStatus !== 0
|
|
||||||
) {
|
|
||||||
path =
|
|
||||||
"/pages/mine_package/mine_authentication_ok/mine_authentication_ok";
|
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: path,
|
url: path
|
||||||
});
|
});
|
||||||
} else if (item.path) {
|
} else if (item.path) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.path,
|
url: item.path
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.openShow = true;
|
this.openShow = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jumpOrder(item) {
|
jumpOrder(item) {
|
||||||
let path = "/pages/mine_package/mine_order/mine_order";
|
let path = '/pages/mine_package/mine_order/mine_order';
|
||||||
if (item && Object.keys(item).length !== 0) {
|
if (item && Object.keys(item).length !== 0) {
|
||||||
path = item.path;
|
path = item.path;
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: path,
|
url: path
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumpLogin() {
|
jumpLogin() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login_package/login/login",
|
url: '/pages/login_package/login/login'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转到入驻页面
|
// 跳转到入驻页面
|
||||||
jumpEnter(type) {
|
jumpEnter(type) {
|
||||||
// 商家入驻
|
// 商家入驻
|
||||||
if (type === "merchant") {
|
if (type === 'merchant') {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/rwa_package/merchant_settlement/merchant_settlement.vue',
|
// url: '/pages/rwa_package/merchant_settlement/merchant_settlement.vue',
|
||||||
// })
|
// })
|
||||||
this.openShow = true;
|
this.openShow = true;
|
||||||
} else if (type === "brand") {
|
} else if (type === 'brand') {
|
||||||
// 企业/品牌入驻
|
// 企业/品牌入驻
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/brand_settlement/brand_settlement',
|
// url: '/pages/brand_settlement/brand_settlement',
|
||||||
@@ -540,31 +527,31 @@ export default {
|
|||||||
if (result && result.bizcode === 100 && result.data) {
|
if (result && result.bizcode === 100 && result.data) {
|
||||||
this.statisticsObj = {
|
this.statisticsObj = {
|
||||||
...result.data,
|
...result.data,
|
||||||
unCommentNum: 0, //待评价数量
|
unCommentNum: 0 //待评价数量
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.statisticsObj = {
|
this.statisticsObj = {
|
||||||
unPayNum: 0, //待支付数量
|
unPayNum: 0, //待支付数量
|
||||||
unSentNum: 0, //待发货数量
|
unSentNum: 0, //待发货数量
|
||||||
unTakeNum: 0, //待收货数量
|
unTakeNum: 0, //待收货数量
|
||||||
unCommentNum: 0, //待评价数量
|
unCommentNum: 0 //待评价数量
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jumpSetting() {
|
jumpSetting() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/rwa_package/setting/setting",
|
url: '/pages/rwa_package/setting/setting'
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.statisticsObj = {
|
this.statisticsObj = {
|
||||||
unPayNum: 0, //待支付数量
|
unPayNum: 0, //待支付数量
|
||||||
unSentNum: 0, //待发货数量
|
unSentNum: 0, //待发货数量
|
||||||
unTakeNum: 0, //待收货数量
|
unTakeNum: 0, //待收货数量
|
||||||
unCommentNum: 0, //待评价数量
|
unCommentNum: 0 //待评价数量
|
||||||
}; // 角标统计
|
}; // 角标统计
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -586,10 +573,7 @@ export default {
|
|||||||
|
|
||||||
.mine_header {
|
.mine_header {
|
||||||
// height: 300rpx;
|
// height: 300rpx;
|
||||||
background: linear-gradient(180deg,
|
background: linear-gradient(180deg, #f2ebff 0%, rgba(245, 245, 247, 0) 100%, #ffffff 100%);
|
||||||
#f2ebff 0%,
|
|
||||||
rgba(245, 245, 247, 0) 100%,
|
|
||||||
#ffffff 100%);
|
|
||||||
/* 将图片居中显示 */
|
/* 将图片居中显示 */
|
||||||
padding: 90rpx 20rpx 0;
|
padding: 90rpx 20rpx 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user