更新优化,修复bug
This commit is contained in:
parent
228e515985
commit
f63e22e9ba
@ -25,6 +25,9 @@
|
|||||||
<view class="relase-two">
|
<view class="relase-two">
|
||||||
{{item.reply_count}}评论
|
{{item.reply_count}}评论
|
||||||
</view>
|
</view>
|
||||||
|
<view class="relase-two">
|
||||||
|
{{item.merchant&&item.merchant.distance}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<span>¥</span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
|
<span>¥</span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
|
||||||
@ -156,7 +159,6 @@
|
|||||||
font-family: SF Pro Display-Regular Italic, SF Pro Display;
|
font-family: SF Pro Display-Regular Italic, SF Pro Display;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #FF6D20;
|
color: #FF6D20;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.relase-two {
|
.relase-two {
|
||||||
|
@ -140,7 +140,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "供应",
|
"navigationBarTitleText": "供应",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"onReachBottomDistance": 300
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
|
@ -686,7 +686,6 @@ export default {
|
|||||||
uni.setStorageSync('loction', true);
|
uni.setStorageSync('loction', true);
|
||||||
}
|
}
|
||||||
if(this.$store.state.storage.location.lat){
|
if(this.$store.state.storage.location.lat){
|
||||||
console.log('定位失败');
|
|
||||||
this.isshow = false
|
this.isshow = false
|
||||||
let latitude, longitude;
|
let latitude, longitude;
|
||||||
latitude = this.$store.state.storage.location.lat.toString();
|
latitude = this.$store.state.storage.location.lat.toString();
|
||||||
|
@ -243,7 +243,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<view class="card" :style="`bottom:${appInfo.bottom}px`"
|
<view class="card" :style="`bottom:${appInfo.bottom+10}px`"
|
||||||
@click="navgo('/pages/order_addcart/order_addcart')">
|
@click="navgo('/pages/order_addcart/order_addcart')">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="cart" :class="{act_cart:act_cart}" style="position: relative;z-index: 9999999;">
|
<view class="cart" :class="{act_cart:act_cart}" style="position: relative;z-index: 9999999;">
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
|
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
|
||||||
:key="index">
|
:key="index">
|
||||||
<!-- {{item.merchant_category_id}} -->
|
<!-- {{item.merchant_category_id}} -->
|
||||||
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
|
<u--image :showLoading="true" :src="item.background" width="94.63rpx" height="99.63rpx"
|
||||||
></u--image>
|
></u--image>
|
||||||
<text
|
<text
|
||||||
style="display: block;font-size: 26.29rpx;">{{item.category_name}}</text>
|
style="display: block;font-size: 26.29rpx;">{{item.category_name}}</text>
|
||||||
@ -117,11 +117,18 @@
|
|||||||
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
|
<!-- <u--image v-for="item,index in [1,1,1,1,1]" :key="index" :showLoading="true"
|
||||||
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
|
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image> -->
|
||||||
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
|
<view class="score">
|
||||||
|
<view class="star">
|
||||||
|
<view
|
||||||
|
:style="{width: `${(item.service_score / 5 * 100).toFixed(0)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text style="margin-left: 20rpx;color: #FF6D20; ">{{item.service_score}}</text>
|
||||||
<text>月销{{item.sales}}</text>
|
<text>月销{{item.sales}}</text>
|
||||||
<text v-if="item.distance">距离{{item.distance}}</text>
|
<text v-if="item.distance" style="font-size: 24rpx;color: #aaa;">{{item.distance}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="li" style="align-items: center;">
|
<view class="li" style="align-items: center;">
|
||||||
@ -363,7 +370,9 @@
|
|||||||
getDiy
|
getDiy
|
||||||
} from '@/api/api.js'
|
} from '@/api/api.js'
|
||||||
|
|
||||||
|
import {
|
||||||
|
HTTP_REQUEST_URL
|
||||||
|
} from '@/config/app';
|
||||||
|
|
||||||
import Cache from '@/utils/cache';
|
import Cache from '@/utils/cache';
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
@ -375,6 +384,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
domain: HTTP_REQUEST_URL,
|
||||||
defaInd: [0, 0],
|
defaInd: [0, 0],
|
||||||
columnData: [],
|
columnData: [],
|
||||||
showSerch: false,
|
showSerch: false,
|
||||||
@ -479,7 +489,7 @@
|
|||||||
this.street_id = options.street_id
|
this.street_id = options.street_id
|
||||||
this.street = options.townName
|
this.street = options.townName
|
||||||
this.product_type = options.product_type ?? 0
|
this.product_type = options.product_type ?? 0
|
||||||
if(this.$store.state.storage.location.lat){
|
if(this.$store.state.storage?.location?.lat){
|
||||||
this.latitude = this.$store.state.storage.location.lat;
|
this.latitude = this.$store.state.storage.location.lat;
|
||||||
this.longitude = this.$store.state.storage.location.long;
|
this.longitude = this.$store.state.storage.location.long;
|
||||||
}
|
}
|
||||||
@ -531,7 +541,7 @@
|
|||||||
mer_location: 0,
|
mer_location: 0,
|
||||||
store_street_theme: 1,
|
store_street_theme: 1,
|
||||||
hide_mer_status: '',
|
hide_mer_status: '',
|
||||||
}, mapGetters(['viewColor'])),
|
}, mapGetters(['viewColor', 'keyColor'])),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectLocation() {
|
selectLocation() {
|
||||||
@ -776,15 +786,40 @@
|
|||||||
},
|
},
|
||||||
selfLocation() {
|
selfLocation() {
|
||||||
let self = this
|
let self = this
|
||||||
if (uni.getStorageSync('RejectTarget')) return
|
if (uni.getStorageSync('RejectTarget')) return;
|
||||||
uni.getLocation({
|
if(this.$store?.state?.storage?.location?.lat){
|
||||||
|
this.latitude = this.$store?.state?.storage?.location?.lat;
|
||||||
|
this.longitude = this.$store?.state?.storage?.location?.long;
|
||||||
|
getGeocoder({
|
||||||
|
lat: this.latitude,
|
||||||
|
long: this.longitude
|
||||||
|
}).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
this.detaile_address = res.data.address;
|
||||||
|
this.location_address = res.data.address;
|
||||||
|
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
||||||
|
.slice(0, 4) + '...' :
|
||||||
|
res.data.address
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log('定位');
|
||||||
let latitude, longitude;
|
let latitude, longitude;
|
||||||
latitude = res.latitude.toString();
|
latitude = res.latitude.toString();
|
||||||
longitude = res.longitude.toString();
|
longitude = res.longitude.toString();
|
||||||
this.latitude = res.latitude.toFixed(6);
|
this.latitude = res.latitude.toFixed(6);
|
||||||
this.longitude = res.longitude.toFixed(6);
|
this.longitude = res.longitude.toFixed(6);
|
||||||
|
this.$store.commit('setLocation', {
|
||||||
|
lat: res.latitude.toFixed(6),
|
||||||
|
long: res.longitude.toFixed(6),
|
||||||
|
});
|
||||||
getGeocoder({
|
getGeocoder({
|
||||||
lat: latitude,
|
lat: latitude,
|
||||||
long: longitude
|
long: longitude
|
||||||
@ -1628,4 +1663,42 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
.score {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
.score-title {
|
||||||
|
margin-right: 15rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.score_text{
|
||||||
|
color: #fd5d2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.star {
|
||||||
|
position: relative;
|
||||||
|
width: 111rpx;
|
||||||
|
height: 19rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
view {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
|
||||||
|
|
||||||
|
&.star_purple {
|
||||||
|
background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -63,10 +63,16 @@
|
|||||||
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
|
<view class="score">
|
||||||
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
|
<view class="star">
|
||||||
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
|
<view
|
||||||
<text>月销2000+</text>
|
:style="{width: `${(item.service_score / 5 * 100).toFixed(0)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text style="margin-left: 20rpx;color: #FF6D20; ">{{item.service_score}}</text>
|
||||||
|
<text>月销{{item.sales}}</text>
|
||||||
|
<text v-if="item.distance" style="font-size: 24rpx;color: #aaa;">{{item.distance}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li" style="align-items: center;">
|
<view class="li" style="align-items: center;">
|
||||||
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
|
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
|
||||||
@ -290,6 +296,9 @@
|
|||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
|
import {
|
||||||
|
HTTP_REQUEST_URL
|
||||||
|
} from '@/config/app';
|
||||||
import {
|
import {
|
||||||
goShopDetail
|
goShopDetail
|
||||||
} from '@/libs/order.js'
|
} from '@/libs/order.js'
|
||||||
@ -306,8 +315,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
domain: HTTP_REQUEST_URL,
|
||||||
titName: "坝坝宴",
|
titName: "",
|
||||||
price: 0,
|
price: 0,
|
||||||
stock: 0,
|
stock: 0,
|
||||||
nows: false,
|
nows: false,
|
||||||
@ -385,7 +394,10 @@
|
|||||||
if (options.street_id != undefined) {
|
if (options.street_id != undefined) {
|
||||||
this.sotreParam.street_id = options.street_id
|
this.sotreParam.street_id = options.street_id
|
||||||
}
|
}
|
||||||
|
if(this.$store.state.storage?.location?.lat){
|
||||||
|
this.latitude = this.$store.state.storage.location.lat;
|
||||||
|
this.longitude = this.$store.state.storage.location.long;
|
||||||
|
}
|
||||||
this.credit_buy = options.credit_buy
|
this.credit_buy = options.credit_buy
|
||||||
this.sotreParam.type_id = options.type_id
|
this.sotreParam.type_id = options.type_id
|
||||||
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||||
@ -432,7 +444,7 @@
|
|||||||
mer_location: 0,
|
mer_location: 0,
|
||||||
store_street_theme: 1,
|
store_street_theme: 1,
|
||||||
hide_mer_status: '',
|
hide_mer_status: '',
|
||||||
}, mapGetters(['viewColor'])),
|
}, mapGetters(['viewColor', 'keyColor'])),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
navGo(id) {
|
navGo(id) {
|
||||||
@ -563,14 +575,39 @@
|
|||||||
},
|
},
|
||||||
selfLocation() {
|
selfLocation() {
|
||||||
let self = this
|
let self = this
|
||||||
uni.getLocation({
|
if (uni.getStorageSync('RejectTarget')) return;
|
||||||
|
if(this.$store?.state?.storage?.location?.lat){
|
||||||
|
this.latitude = this.$store?.state?.storage?.location?.lat;
|
||||||
|
this.longitude = this.$store?.state?.storage?.location?.long;
|
||||||
|
getGeocoder({
|
||||||
|
lat: this.latitude,
|
||||||
|
long: this.longitude
|
||||||
|
}).then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
this.detaile_address = res.data.address;
|
||||||
|
this.location_address = res.data.address;
|
||||||
|
this.recommend_address = res.data.address.length > 4 ? res.data.address
|
||||||
|
.slice(0, 4) + '...' :
|
||||||
|
res.data.address
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
let latitude, longitude;
|
let latitude, longitude;
|
||||||
latitude = res.latitude.toString();
|
latitude = res.latitude.toString();
|
||||||
longitude = res.longitude.toString();
|
longitude = res.longitude.toString();
|
||||||
this.latitude = res.latitude
|
this.latitude = res.latitude;
|
||||||
this.longitude = res.longitude
|
this.longitude = res.longitude;
|
||||||
|
this.$store.commit('setLocation', {
|
||||||
|
lat: res.latitude.toFixed(6),
|
||||||
|
long: res.longitude.toFixed(6),
|
||||||
|
});
|
||||||
getGeocoder({
|
getGeocoder({
|
||||||
lat: latitude,
|
lat: latitude,
|
||||||
long: longitude
|
long: longitude
|
||||||
@ -1341,4 +1378,42 @@
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.score {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
.score-title {
|
||||||
|
margin-right: 15rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.score_text{
|
||||||
|
color: #fd5d2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.star {
|
||||||
|
position: relative;
|
||||||
|
width: 111rpx;
|
||||||
|
height: 19rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
view {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
|
||||||
|
|
||||||
|
&.star_purple {
|
||||||
|
background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -298,12 +298,12 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.list(false, this.street_id);
|
this.list(false, this.street_id);
|
||||||
this.productList2 = [];
|
this.productList2 = [];
|
||||||
}, 500)
|
}, 50)
|
||||||
}
|
}
|
||||||
else if (this.productList2.length > 0) {
|
else if (this.productList2.length > 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.list2(false, '');
|
this.list2(false, '');
|
||||||
}, 500)
|
}, 50)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user