提交修改

This commit is contained in:
浅念
2025-12-22 11:44:02 +08:00
parent c60dda98a4
commit 4d6c0d6901
20 changed files with 470 additions and 112 deletions
+29 -2
View File
@@ -8,7 +8,8 @@
<scroll-view scroll-y class="page-scroll">
<!-- 图集 -->
<view class="gallery">
<image v-if="detail.media && detail.media.length > 0" class="main-img" :src="detail.media[currentIndex].url_pull" mode="aspectFit"></image>
<image v-if="detail.media && detail.media.length > 0" class="main-img" @click.stop="previewImage(currentIndex)"
@longpress.stop="downloadImage(detail.media[currentIndex])" :src="detail.media[currentIndex].url_pull" mode="aspectFit"></image>
<scroll-view class="thumb-row" scroll-x>
<view class="thumb-container">
<image
@@ -40,7 +41,18 @@
<text class="spec-label">{{item.attr_name}}:</text>
<text class="spec-value">{{ item.attr_value }}</text>
</view>
<view class="spec-row">
<text class="spec-label">是否包邮:</text>
<text class="spec-value">{{ detail.is_free==0?'不包邮':detail.is_free==1?'全国包邮':detail.is_free==2?'省内包邮':'邮费电联' }}</text>
</view>
</view>
<view class="product-card" v-if="detail.sku.point">
<view class="product-point-title"> 产品卖点 </view>
<view class="point-tabs" >
<view class="tabs-txt" v-for="(item, idx) in detail.sku.point.attr_values" :key="idx">{{item}}</view>
</view>
</view>
<!-- Tabs -->
<view class="tabs">
@@ -101,7 +113,7 @@
</view>
</view>
</scroll-view>
<view class="bottom-bar">
<view class="bottom-bar" v-if="currentTab === 'comment'">
<view class="input-box">
<uni-icons type="compose" size="20" color="#bbb"></uni-icons>
<input class="input"
@@ -701,6 +713,7 @@ page,
margin-top: 12rpx;
width: 100%;
white-space: nowrap;
text-align: center;
}
.thumb-container {
display: inline-flex;
@@ -741,6 +754,20 @@ page,
color: #111;
font-weight: 700;
}
.product-point-title{
font-weight: bold;
}
.point-tabs{
margin-top: 20rpx;
}
.tabs-txt{
padding: 20rpx;
color: #3BC6BD;
background:rgb(59 198 189 / 0.12);
display: inline-block;
margin: 6px 5px;
border-radius: 10rpx;
}
.retail {
font-size: 22rpx;
color: #888;
+37 -6
View File
@@ -83,6 +83,11 @@ export default {
// this.syncTabbar()
},
methods: {
goto(item){
uni.navigateTo({
url: '/pages/square/detiles?id='+item.id
});
},
getFuzzy() {
return new Promise((resolve, reject) => {
wx.getSetting({
@@ -114,12 +119,38 @@ export default {
uni.makePhoneCall({ phoneNumber: num });
},
changeTab(key) {
if (this.currentTab === key) return
this.currentTab = key
this.page = 1
this.hasMore = true
this.slist = []
this.loadList()
if((this.longitude==''||this.latitude=='')&&key=='near'){
uni.showModal({
title: '提示',
content: '请先授权地理位!',
content: '请在设置中开启模糊定位权限',
confirmText: '去设置',
success: function (res) {
if (res.confirm) {
wx.openSetting({
success: (setRes) => {
if (setRes.authSetting['scope.userFuzzyLocation']) {
that.getFuzzy().then(res => {
that.latitude = res.latitude
that.longitude = res.longitude
console.log(res);
}).catch(err => console.error(err));
} else {
reject(new Error('未开启模糊定位权限'));
}
}
});
}
},
})
return false
}
if (this.currentTab === key) return
this.currentTab = key
this.page = 1
this.hasMore = true
this.slist = []
this.loadList()
},
loadList(isLoadMore = false) {
if (isLoadMore) {