feat: 优化

This commit is contained in:
2026-07-23 13:59:35 +08:00
parent 268207b01b
commit 3f335074ea
13 changed files with 614 additions and 580 deletions
+1
View File
@@ -67,6 +67,7 @@
border-radius: 30rpx; border-radius: 30rpx;
padding: 30rpx; padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.data_msg { .data_msg {
+14 -29
View File
@@ -1,43 +1,20 @@
<template> <template>
<view class="choiceness_warp"> <view class="choiceness_warp">
<view class="choiceness_title"> <view class="choiceness_title">
<up-image <up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
src="/static/common/jingxuan_left.png"
width="24"
height="8"
bgColor="#f1f6ff00"
></up-image>
<view class="choiceness_title_msg">为您精选</view> <view class="choiceness_title_msg">为您精选</view>
<up-image <up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
src="/static/common/jingxuan_right.png"
width="24"
height="8"
bgColor="#f1f6ff00"
></up-image>
</view> </view>
<view <view class="choiceness_product" :class="platformType ? '' : 'iosplatformType'">
class="choiceness_product" <view v-for="item in productList" :key="item.id" class="choiceness_product_item" @click="jumpInfo(item)">
:class="platformType ? '' : 'iosplatformType'" <up-image :src="item.url" width="100%" height="140" bgColor="#f1f6ff00"></up-image>
>
<view
v-for="item in productList"
:key="item.id"
class="choiceness_product_item"
@click="jumpInfo(item)"
>
<up-image
:src="item.url"
width="100%"
height="140"
bgColor="#f1f6ff00"
></up-image>
<view class="product_item_name">{{ item.title }}</view> <view class="product_item_name">{{ item.title }}</view>
<view class="product_item_price"> <view class="product_item_price">
<view class="price_"> <view class="price_">
<text>¥</text> <text>¥</text>
<text style="color: 36rpx">{{ item.price }}</text> <text style="color: 36rpx">{{ item.price }}</text>
</view> </view>
<view class="price_sell">已售{{ item.sales }}件</view> <view class="price_sell">全网销量{{ limit999(item.sales) }}件</view>
</view> </view>
</view> </view>
</view> </view>
@@ -63,6 +40,13 @@ export default {
this.getSearchList(); this.getSearchList();
}, },
methods: { methods: {
limit999(n) {
const num = Number(n);
if (isNaN(num) || num < 10000) {
return n != null && n !== '' ? String(n) : '0';
}
return `${Math.floor(num / 10000)}万+`;
},
// //
jumpInfo(item) { jumpInfo(item) {
uni.navigateTo({ uni.navigateTo({
@@ -104,6 +88,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx); padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx);
&.iosplatformType { &.iosplatformType {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }
+24 -7
View File
@@ -19,7 +19,8 @@
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-y="true" class="address-bottom-list" :scroll-into-view="scrollId"> <scroll-view :scroll-y="true" class="address-bottom-list" :scroll-into-view="scrollId"
:scroll-top="scrollTop">
<view class="address-data-view" v-for="(item, index) in dataList" :key="index" :id="item.zi"> <view class="address-data-view" v-for="(item, index) in dataList" :key="index" :id="item.zi">
<text class="text-32 text-gray text-bold">{{ item.zi }}</text> <text class="text-32 text-gray text-bold">{{ item.zi }}</text>
<view class="address-data-data" @click="onItem(item, xItem)" v-for="(xItem, xIndex) in item.data" <view class="address-data-data" @click="onItem(item, xItem)" v-for="(xItem, xIndex) in item.data"
@@ -45,6 +46,7 @@ export default {
data() { data() {
return { return {
scrollId: '', scrollId: '',
scrollTop: 0,
} }
}, },
props: { props: {
@@ -68,10 +70,23 @@ export default {
type: Number, type: Number,
default: 0 default: 0
} }
}, },
watch: {
dataList() {
this.resetScroll();
},
curSelect() {
this.resetScroll();
}
},
methods: { methods: {
resetScroll() {
this.scrollId = '';
this.scrollTop = this.scrollTop === 0 ? 0.01 : 0;
this.$nextTick(() => {
this.scrollTop = 0;
});
},
onClose() { onClose() {
this.$emit('close') this.$emit('close')
}, },
@@ -83,6 +98,7 @@ export default {
}, },
onSelectItrm(item, index) { onSelectItrm(item, index) {
if (index != this.curSelect) { if (index != this.curSelect) {
this.resetScroll();
this.$emit('select', item, index); this.$emit('select', item, index);
} }
}, },
@@ -91,6 +107,7 @@ export default {
Func.debounce(() => this.onItemOne(item, xItem), 150); Func.debounce(() => this.onItemOne(item, xItem), 150);
}, },
onItemOne(item, xItem) { onItemOne(item, xItem) {
this.resetScroll();
this.$emit('itemSelect', item, xItem); this.$emit('itemSelect', item, xItem);
} }
} }
@@ -127,8 +144,8 @@ export default {
.address-bottom-list { .address-bottom-list {
width: 100%; width: 100%;
height: calc(100% - 88rpx - 88rpx - 32rpx); height: calc(100% - 60rpx - 88rpx - 32rpx);
margin-top: 32rpx; margin-top: 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: auto; overflow-y: auto;
@@ -153,8 +170,8 @@ export default {
.address-select-view { .address-select-view {
width: 100%; width: 100%;
height: 88rpx; height: 60rpx;
min-height: 88rpx; min-height: 60rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
+16 -5
View File
@@ -22,9 +22,9 @@
<view class="templ_img_item" v-for="item in uploadTemplList" :key="item.id"> <view class="templ_img_item" v-for="item in uploadTemplList" :key="item.id">
<up-image :src="item.url" width="100%" height="50" bgColor="#f1f6ff00"></up-image> <up-image :src="item.url" width="100%" height="50" bgColor="#f1f6ff00"></up-image>
<view class="templ_img_item_msg"> <view class="templ_img_item_msg">
<up-image :src="item.isOk ? '/static/common/ID_ok_1.png' : '/static/common/ID_error.png'" width="10" <up-image :src="item.isOk ? '/static/common/ID_ok_1.png' : '/static/common/ID_error.png'"
height="10" bgColor="#f1f6ff00"></up-image> width="10" height="10" bgColor="#f1f6ff00"></up-image>
<view class="templ_img_item_msg_title">{{ item.title }}</view> <view class="templ_img_item_msg_title">{{ item.title }}111</view>
</view> </view>
</view> </view>
</view> </view>
@@ -54,7 +54,7 @@ export default {
id: 2, id: 2,
title: "边框缺失", title: "边框缺失",
isOk: false, isOk: false,
url: "https://static.tbmall.xin/static/ID_error_1.png", url: "https://static.tbmall.xin/static/ID_gq.png",
}, { }, {
id: 3, id: 3,
title: "照片模糊", title: "照片模糊",
@@ -176,4 +176,15 @@ export default {
} }
</script> </script>
<style></style> <style scoped lang="scss">
.data_common_warp {
background: #FFFFFF;
border-radius: 30rpx;
padding: 30rpx;
margin-bottom: 30rpx;
&:last-child {
margin-bottom: 92rpx;
}
}
</style>
+8 -1
View File
@@ -16,7 +16,7 @@
<!-- 无优惠券 --> <!-- 无优惠券 -->
<view class="flex-r-lr price-line" v-else> <view class="flex-r-lr price-line" v-else>
<text class="text-28 text-zi text-bold">¥{{ obj.price }}</text> <text class="text-28 text-zi text-bold">¥{{ obj.price }}</text>
<text class="text-24 sold">已售{{ obj.sales }}件</text> <text class="text-24 sold">全网销量{{ limit999(obj.sales) }}件</text>
</view> </view>
</view> </view>
</view> </view>
@@ -32,6 +32,13 @@ export default {
} }
}, },
methods: { methods: {
limit999(n) {
const num = Number(n);
if (isNaN(num) || num < 10000) {
return n != null && n !== '' ? String(n) : '0';
}
return `${Math.floor(num / 10000)}万+`;
},
onClick() { onClick() {
this.$emit('ok', this.obj.id); this.$emit('ok', this.obj.id);
} }
+18 -41
View File
@@ -24,32 +24,18 @@
<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" @click="onTab(index)" v-for="(item, index) in tabList" :key="index">
<text class="text-28 text-space" :style="{
color: curTab == index ? '#7A35F6' : '#666'
}">
{{ item.name }}
</text>
</view>
</view> -->
</view> </view>
<mescroll-uni ref="mescrollRef" top="710rpx" @down="downCallback" @up="upCallback" :up="upOption"
:down="downOption" @init="mescrollInit">
<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" <view class="mescrollUniView">
@init="mescrollInit" :fixed="false"> <productSeckillCard v-for="item in dataList" :key="item.id" :item="item" :actived-type="activedScekillType" :attributes="attributes" />
<!-- 原来单个 v-for 替换成两列 --> </view>
<view class="mescrollUniView" v-for="item in dataList" :key="item.id"> </view>
<productSeckillCard :item="item" :actived-type="activedScekillType" :attributes="attributes" />
</view> </view>
</mescroll-uni> </mescroll-uni>
</view>
</view>
<!-- #ifndef H5 || MP-WEIXIN-->
<CustomTabBar :tabIndex="2" />
<!-- #endif -->
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
</view> </view>
</template> </template>
@@ -238,14 +224,18 @@ export default {
.content-two { .content-two {
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative; position: relative;
overflow: hidden;
} }
.product_info_header_warp { .product_info_header_warp {
position: relative; position: fixed;
top: 0;
left: 0;
width: 100%;
height: 660rpx;
z-index: 10;
background-color: #fff;
.product_info_header_swiper { .product_info_header_swiper {
height: 660rpx !important; height: 660rpx !important;
@@ -379,9 +369,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
overflow-x: auto; overflow-x: auto;
position: absolute; position: fixed;
top: 600rpx; top: 600rpx;
left: 0; left: 0;
z-index: 11;
.tab-list-container { .tab-list-container {
width: 100%; width: 100%;
@@ -406,28 +397,14 @@ export default {
} }
.setting-view { .setting-view {
margin-top: 0;
width: 100%; width: 100%;
flex: 1; padding: 0 32rpx 20rpx;
min-height: 0;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
margin-top: 126rpx; margin-top: 0;
/* #ifndef H5 || MP-WEIXIN */
margin-bottom: calc(100rpx + env(safe-area-inset-bottom));
/* #endif */
.name-box { .name-box {
width: 100%; width: 100%;
flex: 1;
min-height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -17,6 +17,8 @@
</view> </view>
<mescroll-uni ref="mescrollRef" top="660rpx" @down="downCallback" @up="upCallback" :up="upOption" :down="downOption"
@init="mescrollInit">
<view class="tab-view"> <view class="tab-view">
<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 class="text-28 text-space" :style="{
@@ -28,15 +30,12 @@
<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" <view class="mescrollUniView">
@init="mescrollInit" :fixed="false"> <productSeckillCard v-for="item in dataList" :key="item.id" :item="item" actived-type="newcomer" />
<!-- 原来单个 v-for 替换成两列 --> </view>
<view class="mescrollUniView" v-for="item in dataList" :key="item.id"> </view>
<productSeckillCard :item="item" actived-type="newcomer" />
</view> </view>
</mescroll-uni> </mescroll-uni>
</view>
</view>
<!-- #ifndef H5 || MP-WEIXIN--> <!-- #ifndef H5 || MP-WEIXIN-->
<CustomTabBar :tabIndex="2" /> <CustomTabBar :tabIndex="2" />
<!-- #endif --> <!-- #endif -->
@@ -193,14 +192,18 @@ export default {
.content-two { .content-two {
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative; position: relative;
overflow: hidden;
} }
.product_info_header_warp { .product_info_header_warp {
position: relative; position: fixed;
top: 0;
left: 0;
width: 100%;
height: 660rpx;
z-index: 10;
background-color: #fff;
.product_info_header_swiper { .product_info_header_swiper {
height: 660rpx !important; height: 660rpx !important;
@@ -323,25 +326,12 @@ export default {
.setting-view { .setting-view {
margin-top: 40rpx; margin-top: 40rpx;
width: 100%; width: 100%;
flex: 1; padding: 0 32rpx 20rpx;
min-height: 0;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
/* #ifndef H5 || MP-WEIXIN */
margin-bottom: calc(100rpx + env(safe-area-inset-bottom));
/* #endif */
.name-box { .name-box {
width: 100%; width: 100%;
flex: 1;
min-height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
+15 -37
View File
@@ -17,29 +17,16 @@
</view> </view>
<!-- <view class="tab-view"> <mescroll-uni ref="mescrollRef" top="660rpx" @down="downCallback" @up="upCallback" :up="upOption"
<view class="tab-list" @click="onTab(index)" v-for="(item, index) in tabList" :key="index"> :down="downOption" @init="mescrollInit">
<text class="text-28 text-space" :style="{
color: curTab == index ? '#7A35F6' : '#666',
}">{{ item.name }}</text>
<view class="line" v-if="curTab == index"></view>
</view>
</view> -->
<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" <view class="mescrollUniView">
@init="mescrollInit" :fixed="false"> <productSeckillCard v-for="item in dataList" :key="item.id" :item="item" actived-type="super" />
<!-- 原来单个 v-for 替换成两列 --> </view>
<view class="mescrollUniView" v-for="item in dataList" :key="item.id"> </view>
<productSeckillCard :item="item" actived-type="super" />
</view> </view>
</mescroll-uni> </mescroll-uni>
</view>
</view>
<!-- #ifndef H5 || MP-WEIXIN-->
<CustomTabBar :tabIndex="2" />
<!-- #endif -->
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
</view> </view>
</template> </template>
@@ -175,14 +162,18 @@ export default {
.content-two { .content-two {
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative; position: relative;
overflow: hidden;
} }
.product_info_header_warp { .product_info_header_warp {
position: relative; position: fixed;
top: 0;
left: 0;
width: 100%;
height: 660rpx;
z-index: 10;
background-color: #fff;
.product_info_header_swiper { .product_info_header_swiper {
height: 660rpx !important; height: 660rpx !important;
@@ -305,25 +296,12 @@ export default {
.setting-view { .setting-view {
margin-top: 40rpx; margin-top: 40rpx;
width: 100%; width: 100%;
flex: 1; padding: 0 32rpx 20rpx;
min-height: 0;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
/* #ifndef H5 || MP-WEIXIN */
margin-bottom: calc(100rpx + env(safe-area-inset-bottom));
/* #endif */
.name-box { .name-box {
width: 100%; width: 100%;
flex: 1;
min-height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
+54 -6
View File
@@ -1,6 +1,6 @@
<template> <template>
<view class="mine_warp" :class="platformType ? '' : 'iosplatformType'"> <view class="mine_warp" :class="platformType ? '' : 'iosplatformType'">
<view class="mine_header"> <view class="mine_header" :style="headerStyle">
<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 <up-image
@@ -11,9 +11,8 @@
<text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text> <text style="margin-right: 20rpx">{{ 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="/static/common/rz.png" <up-image src="/static/common/rz.png" style="margin-right: 8rpx; margin-top: 6rpx"
style="margin-right: 8rpx; margin-top: 6rpx" shape="circle" width="13" height="13" shape="circle" width="13" height="13" bgColor="#f1f6ff00"></up-image>
bgColor="#f1f6ff00"></up-image>
<view>{{ currentUserData.agentName }}</view> <view>{{ currentUserData.agentName }}</view>
</view> </view>
@@ -84,7 +83,9 @@
@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="[-9, 9]" max="99" :customStyle="{ width: '40rpx', height: '32rpx', borderRadius: '45% 45% 45% 0', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 0 }" :value="statisticsObj[item.note]"></up-badge> <up-badge :absolute="true" :offset="[-9, 9]" max="99"
:customStyle="{ width: '40rpx', height: '32rpx', borderRadius: '45% 45% 45% 0', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 0 }"
:value="statisticsObj[item.note]"></up-badge>
</view> </view>
</view> </view>
</view> </view>
@@ -413,9 +414,14 @@ export default {
platformType: true, platformType: true,
kefuUnreadCount: 0, kefuUnreadCount: 0,
kefuUnreadTimer: null, kefuUnreadTimer: null,
headerStyle: {},
}; };
}, },
created() {
this.headerStyle = this.calcHeaderStyle();
},
onShow() { onShow() {
this.headerStyle = this.calcHeaderStyle();
this.userData = getStorageFun(USER_DATA); this.userData = getStorageFun(USER_DATA);
/*#ifdef APP-PLUS*/ /*#ifdef APP-PLUS*/
uni.hideTabBar({ uni.hideTabBar({
@@ -435,8 +441,50 @@ export default {
onUnload() { onUnload() {
this.stopKefuUnreadPolling(); this.stopKefuUnreadPolling();
}, },
mounted() { }, mounted() {
this.headerStyle = this.calcHeaderStyle();
},
methods: { methods: {
calcHeaderStyle() {
let paddingTop = '90rpx';
let paddingRight = '30rpx';
// #ifdef MP-WEIXIN || MP
try {
const menuButton = uni.getMenuButtonBoundingClientRect();
const sysInfo = uni.getSystemInfoSync();
if (menuButton && menuButton.top && menuButton.top > 0) {
paddingTop = (menuButton.top + 2) + 'px';
if (sysInfo && sysInfo.windowWidth && menuButton.left) {
paddingRight = (sysInfo.windowWidth - menuButton.left + 10) + 'px';
}
} else {
const statusBarHeight = (sysInfo && sysInfo.statusBarHeight) || 20;
paddingTop = (statusBarHeight + 10) + 'px';
paddingRight = '96px';
}
} catch (e) {
paddingTop = '90rpx';
paddingRight = '96px';
}
// #endif
// #ifdef APP-PLUS
try {
const sysInfo = uni.getSystemInfoSync();
if (sysInfo && sysInfo.statusBarHeight) {
paddingTop = (sysInfo.statusBarHeight + 10) + 'px';
}
} catch (e) {
paddingTop = '90rpx';
}
// #endif
return {
paddingTop,
paddingRight
};
},
copyData, copyData,
async refreshKefuUnreadCount() { async refreshKefuUnreadCount() {
const userId = this.currentUserData && this.currentUserData.id; const userId = this.currentUserData && this.currentUserData.id;
@@ -2,6 +2,7 @@
<view class="authentication_warp"> <view class="authentication_warp">
<Header :leftTitle="$t('authentication.title')" left-path-type="switchTab" left-path="/pages/mine/mine"> <Header :leftTitle="$t('authentication.title')" left-path-type="switchTab" left-path="/pages/mine/mine">
</Header> </Header>
<view class="content_warp">
<view class="data_common_warp"> <view class="data_common_warp">
<view class="data_msg">请填写用户本人得相关信息</view> <view class="data_msg">请填写用户本人得相关信息</view>
<view class="'add_form_item add_form_item_but'" v-for="item in formList" :key="item.id"> <view class="'add_form_item add_form_item_but'" v-for="item in formList" :key="item.id">
@@ -19,6 +20,7 @@
</view> </view>
<!-- 证件照 --> <!-- 证件照 -->
<CommonCard @valueFunc="getValue" :Fimg="form.certFimg" :Bimg="form.certBimg" /> <CommonCard @valueFunc="getValue" :Fimg="form.certFimg" :Bimg="form.certBimg" />
</view>
<view class="add_but" @click="addAuthentication"> <view class="add_but" @click="addAuthentication">
{{ userInfo && userInfo.certStatus ? '重新提交' : '提交' }} {{ userInfo && userInfo.certStatus ? '重新提交' : '提交' }}
</view> </view>
@@ -208,9 +210,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.authentication_warp { .authentication_warp {
height: calc(100vh - 58rpx); height: 100%;
// height: calc(100vh - 158rpx);
background-color: $app-bj; background-color: $app-bj;
padding: 30rpx; padding: 0 30rpx;
display: flex;
flex-direction: column;
.content_warp {
flex: 1;
overflow-y: scroll;
}
} }
.cert_ { .cert_ {
@@ -223,4 +233,9 @@ export default {
color: #9e9e9ec7 color: #9e9e9ec7
} }
} }
.add_but {
position: relative;
width: 100%;
}
</style> </style>
+12 -23
View File
@@ -3,38 +3,22 @@
<view class="eval-header"> <view class="eval-header">
<view class="title">商品评价 ({{ totalCount }})</view> <view class="title">商品评价 ({{ totalCount }})</view>
<view class="more" @click="goMore"> <view class="more" @click="goMore">
<view class="rate" <view class="rate">查看全部
>查看全部 <up-image src="/static/common/right.png" width="14" height="14" bgColor="#f1f6ff00" class="arrow"></up-image>
<up-image </view>
src="/static/common/right.png"
width="14"
height="14"
bgColor="#f1f6ff00"
class="arrow"
></up-image
></view>
</view> </view>
</view> </view>
<view class="eval-list"> <view class="eval-list">
<view class="eval-item" v-for="(item, index) in list" :key="index"> <view class="eval-item" v-for="(item, index) in list" :key="index">
<view class="user-info"> <view class="user-info">
<view class="user-left"> <view class="user-left">
<image <image class="avatar" :src="item.userImage" mode="aspectFill"></image>
class="avatar"
:src="item.userImage"
mode="aspectFill"
></image>
<text class="username">{{ item.userName }}</text> <text class="username">{{ item.userName }}</text>
</view> </view>
<view class="user-right"> <view class="user-right">
<view class="stars"> <view class="stars">
<text <text v-for="s in item.rating" :key="s" class="star-icon"
v-for="s in item.rating" :style="{ color: s <= item.rating ? '#7934F6' : '#e5e5e5' }">★</text>
:key="s"
class="star-icon"
:style="{ color: s <= item.rating ? '#7934F6' : '#e5e5e5' }"
>★</text
>
</view> </view>
</view> </view>
</view> </view>
@@ -109,6 +93,7 @@ export default {
/* 自适应父级宽度,可根据页面情况调整 margin */ /* 自适应父级宽度,可根据页面情况调整 margin */
margin: 20rpx auto; margin: 20rpx auto;
box-sizing: border-box; box-sizing: border-box;
} }
/* 头部样式 */ /* 头部样式 */
@@ -133,10 +118,12 @@ export default {
.rate { .rate {
color: #999999; color: #999999;
margin-right: 4rpx; display: flex;
.arrow { .arrow {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-left: 4rpx;
} }
} }
} }
@@ -185,6 +172,7 @@ export default {
.user-right { .user-right {
.stars { .stars {
display: flex; display: flex;
.star-icon { .star-icon {
font-size: 26rpx; font-size: 26rpx;
margin-left: 6rpx; margin-left: 6rpx;
@@ -196,6 +184,7 @@ export default {
/* 评价文字 */ /* 评价文字 */
.eval-content { .eval-content {
margin-bottom: 16rpx; margin-bottom: 16rpx;
.text-desc { .text-desc {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
@@ -63,7 +63,7 @@
下单送{{ orderInfo.contribution }}贡献值 下单送{{ orderInfo.contribution }}贡献值
</view> </view>
<!-- 销量还需要改 --> <!-- 销量还需要改 -->
<view>销量{{ limit999(orderInfo.sales) }}件</view> <view>全网销量{{ limit999(orderInfo.sales) }}件</view>
</view> </view>
</view> </view>
@@ -497,7 +497,11 @@ export default {
methods: { methods: {
assembleAddress, assembleAddress,
limit999(n) { limit999(n) {
return n > 999 ? '999+' : String(n); const num = Number(n);
if (isNaN(num) || num < 10000) {
return n != null && n !== '' ? String(n) : '0';
}
return `${Math.floor(num / 10000)}万+`;
}, },
onOpenApp() { onOpenApp() {
+21 -9
View File
@@ -29,7 +29,8 @@
</u-radio-group> </u-radio-group>
</view> </view>
<view class="right-icon-view" v-else> <view class="right-icon-view" v-else>
<text class="text-32 text-gray" style="margin-right:12rpx" v-if="selectVal && curSelect == '0'">{{selectVal.name + '/' + selectVal.account}}</text> <text class="text-32 text-gray" style="margin-right:12rpx"
v-if="selectVal && curSelect == '0'">{{ selectVal.name + '/' + selectVal.account }}</text>
<u-icon size="14" name="arrow-right" color="#333"></u-icon> <u-icon size="14" name="arrow-right" color="#333"></u-icon>
</view> </view>
</view> </view>
@@ -42,7 +43,8 @@
</u-radio-group> </u-radio-group>
</view> </view>
<view class="right-icon-view" v-else> <view class="right-icon-view" v-else>
<text class="text-32 text-gray" style="margin-right:12rpx" v-if="selectVal && curSelect == '1'">{{selectVal.name + '/' + selectVal.account}}</text> <text class="text-32 text-gray" style="margin-right:12rpx"
v-if="selectVal && curSelect == '1'">{{ selectVal.name + '/' + selectVal.account }}</text>
<u-icon size="14" name="arrow-right" color="#333"></u-icon> <u-icon size="14" name="arrow-right" color="#333"></u-icon>
</view> </view>
</view> </view>
@@ -57,14 +59,15 @@
<text class="text-52 text-zu text-bold">¥</text> <text class="text-52 text-zu text-bold">¥</text>
<input style="background: #fff;margin-top:10rpx;" <input style="background: #fff;margin-top:10rpx;"
:placeholder="type == 0 ? '请输入提现金额(0.3-2000)' : '输入充值金额'" :placeholder="type == 0 ? '请输入提现金额(0.3-2000)' : '输入充值金额'"
placeholder-style="color:#999;font-weight:400" placeholder-style="color:#999;font-weight:400" @input="onInput" border="0" v-model="money"
@input="onInput" :customStyle="inputCss"></input>
border="0" v-model="money" :customStyle="inputCss"></input>
</view> </view>
</view> </view>
<view class="zhu-view" v-if="selectVal"> <view class="zhu-view" v-if="selectVal">
<u-icon size="12" style="margin-top:5rpx;margin-right:12rpx" name="error-circle" color="#7934F6"></u-icon> <u-icon size="12" style="margin-top:5rpx;margin-right:12rpx" name="error-circle"
<text class="text-24 text-zi" style="font-weight: 400;">通过支付宝或微信提现时,将由支付宝/微信官方收取0.6%的费用,本平台不收取任何费用。</text> color="#7934F6"></u-icon>
<text class="text-24 text-zi"
style="font-weight: 400;">通过支付宝或微信提现时,将由支付宝/微信官方收取0.6%的费用,本平台不收取任何费用。</text>
</view> </view>
@@ -72,8 +75,8 @@
<view class="bottom-btn"> <view class="bottom-btn">
<MyBtn :text="bottomText" @ok="onAdd"></MyBtn> <MyBtn :text="bottomText" @ok="onAdd"></MyBtn>
</view> </view>
<SelectItem :itemData="dataList" @close="onClose" @ok="onOk" @add="onAddBack" <SelectItem :itemData="dataList" @close="onClose" @ok="onOk" @add="onAddBack" :type="curSelect"
:type="curSelect" :itemShow="selectShow"></SelectItem> :itemShow="selectShow"></SelectItem>
<CodeItem @ti="onTi" @close="onClose" :codeShow="codeShow" :phone="userInfo ? userInfo.mobile : ''"></CodeItem> <CodeItem @ti="onTi" @close="onClose" :codeShow="codeShow" :phone="userInfo ? userInfo.mobile : ''"></CodeItem>
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
</view> </view>
@@ -396,6 +399,7 @@ export default {
position: relative; position: relative;
} }
.setting-view { .setting-view {
width: 100%; width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height)); height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
@@ -406,6 +410,7 @@ export default {
padding: 0 32rpx; padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.top-view { .top-view {
width: 100%; width: 100%;
margin-top: 40rpx; margin-top: 40rpx;
@@ -419,6 +424,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-radius: 16rpx; border-radius: 16rpx;
.top-left { .top-left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -427,6 +433,7 @@ export default {
} }
.top-right { .top-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -435,6 +442,7 @@ export default {
height: 108rpx; height: 108rpx;
} }
} }
.zhu-view { .zhu-view {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -447,6 +455,7 @@ export default {
background: rgba(121, 52, 246, 0.05); background: rgba(121, 52, 246, 0.05);
border-radius: 8rpx; border-radius: 8rpx;
} }
.mid-view { .mid-view {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -458,6 +467,7 @@ export default {
padding: 32rpx; padding: 32rpx;
padding-bottom: 0; padding-bottom: 0;
margin-top: 24rpx; margin-top: 24rpx;
.item-view { .item-view {
width: 100%; width: 100%;
height: 110rpx; height: 110rpx;
@@ -467,6 +477,7 @@ export default {
position: relative; position: relative;
align-items: center; align-items: center;
border-bottom: 2rpx solid #ececec; border-bottom: 2rpx solid #ececec;
.right-icon-view { .right-icon-view {
position: absolute; position: absolute;
right: 0; right: 0;
@@ -480,6 +491,7 @@ export default {
height: 48rpx; height: 48rpx;
} }
} }
.input-view { .input-view {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;