This commit is contained in:
zmj 2023-11-04 19:18:29 +08:00
parent e3850dd2f9
commit f752d2cc21
11 changed files with 369 additions and 257 deletions

View File

@ -6,10 +6,11 @@
<view class="iconfont icon-xiangzuo"></view>
</view>
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='sotreParam.keyword'
@confirm="searchSubmit"></input>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input>
</view>
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view v-if="mer_location == 1" style="text-align: right;" class='iconfont search-right'
@click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address">
{{recommend_address}}
@ -19,7 +20,8 @@
</view>
<view class="nav-wrapper">
<view class='nav acea-row row-middle'>
<view v-for="item in downMenus" :key="item.key" class='item' :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
<view v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
<view>
{{item.title}}
</view>
@ -47,7 +49,8 @@
{{item.care_count<10000 ? item.care_count : (item.care_count/10000).toFixed(2)+''}}人关注
</view>
<view class="line" v-if="item.distance"></view>
<view class="distance" v-if="item.distance" @click.stop="showStoreLocation(item)">
<view class="distance" v-if="item.distance"
@click.stop="showStoreLocation(item)">
<view class="">
{{item.distance}}
</view>
@ -58,8 +61,9 @@
</view>
</view>
<view class="pro-box">
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend"
:key='indexn' v-if="item.recommend.length<=3">
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}`" hover-class="none"
class="pro-item" v-for="(itemn,indexn) in item.recommend" :key='indexn'
v-if="item.recommend.length<=3">
<image :src="itemn.image" mode=""></image>
<view class="price">
<text></text>{{itemn.price}}
@ -265,6 +269,7 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {
@ -279,7 +284,8 @@
}).then(res => {
// console.log(res)
this.detaile_address = res.data.address;
this.recommend_address = res.data.address.length > 4 ? res.data.address.slice(0,4) + '...' : res.data.address
this.recommend_address = res.data.address.length > 4 ? res.data.address
.slice(0, 4) + '...' : res.data.address
uni.setStorageSync('adress_location', res.data.address)
})
},
@ -379,6 +385,7 @@
display: flex;
flex-wrap: nowrap;
background: var(--view-theme);
.search-right {
display: flex;
align-items: center;
@ -387,6 +394,7 @@
flex: 1;
padding-left: 20rpx;
}
.right-text {
overflow: hidden;
text-overflow: ellipsis;
@ -397,12 +405,14 @@
color: #fff;
padding: 0 10rpx;
}
.icon-xiangyou,
.icon-dingwei {
font-size: 30rpx;
color: #fff;
}
}
.productList .search .back {
display: flex;
align-items: center;
@ -414,6 +424,7 @@
font-size: 36rpx;
}
}
.productList .search .input {
flex: 1;
// width: 540rpx;
@ -423,19 +434,23 @@
padding: 0 20rpx;
box-sizing: border-box;
}
.productList .search .input input {
flex: 1;
height: 100%;
font-size: 26rpx;
margin-left: 10rpx;
}
.productList .search .input .placeholder {
color: #999;
}
.productList .search .input .iconfont {
font-size: 35rpx;
color: #555;
}
.productList .search .icon-pailie,
.productList .search .icon-tupianpailie {
color: #fff;
@ -444,6 +459,7 @@
height: 86rpx;
line-height: 86rpx;
}
.productList .nav-wrapper {
z-index: 9;
position: fixed;
@ -452,9 +468,11 @@
width: 100%;
margin-top: 86rpx;
background-color: $theme-color;
.tab-bar {
display: flex;
align-items: center;
.tab-item {
position: relative;
flex: 1;
@ -465,6 +483,7 @@
color: #fff;
font-size: 28rpx;
font-weight: bold;
&::after {
content: ' ';
position: absolute;
@ -475,6 +494,7 @@
background: transparent;
transform: translateX(-50%);
}
&.on {
&::after {
background: #fff;
@ -483,6 +503,7 @@
}
}
}
.productList .nav {
height: 86rpx;
color: #454545;
@ -492,6 +513,7 @@
justify-content: space-between;
padding: 0 28rpx;
}
.productList .nav .item {
display: flex;
align-items: center;
@ -500,10 +522,12 @@
color: #FFFFFF;
flex: 1;
}
.productList .nav .item.font-colors {
font-weight: 500;
color: #FFFFFF;
}
.productList .nav .item .font-line {
height: 4rpx;
background-color: #fff;
@ -517,26 +541,32 @@
-o-animation: line 0.3s;
/* Opera */
}
@keyframes line {
from {
width: 0rpx;
}
to {
width: 28rpx;
}
}
.productList .nav .item image {
width: 15rpx;
height: 19rpx;
margin-left: 10rpx;
}
.mer-box {
padding: 20rpx 20rpx;
margin-top: 168rpx;
.mer-item {
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 16rpx;
.mer-hd {
position: relative;
width: 100%;
@ -544,10 +574,12 @@
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
display: flex;
image {
width: 100%;
height: 100%;
}
.mer-name {
position: absolute;
left: 20rpx;
@ -555,6 +587,7 @@
display: flex;
align-items: center;
padding: 0 10rpx;
image {
width: 79rpx;
height: 79rpx;
@ -562,6 +595,7 @@
border-radius: 50%;
margin-right: 10rpx;
}
.mer-top {
display: flex;
align-items: center;
@ -569,6 +603,7 @@
font-size: 28rpx;
font-weight: bold;
margin-bottom: 6rpx;
.font-bg-red {
margin-left: 20rpx;
font-size: 18rpx;
@ -579,60 +614,72 @@
width: auto;
}
}
.mer-btn {
color: rgba($color: #fff, $alpha: 0.7);
font-size: 24rpx;
display: flex;
align-items: center;
.line {
width: 2rpx;
height: 18rpx;
color: rgba($color: #fff, $alpha: 0.7);
margin: 0 12rpx;
}
.distance {
display: flex;
align-items: center;
font-size: 24rpx;
color: rgba($color: #fff, $alpha: 0.7);
.iconfont {
font-size: 24rpx;
line-height: 24rpx;
}
}
}
.txt {
flex: 1;
}
}
}
.pro-box {
display: flex;
align-items: center;
padding: 20rpx 20rpx 30rpx;
.pro-item {
width: 218rpx;
margin-right: 14rpx;
image {
width: 100%;
height: 214rpx;
border-radius: 8rpx;
}
.price {
margin-top: 5rpx;
font-size: 28rpx;
color: var(--view-priceColor);
font-weight: bold;
text {
font-size: 28rpx;
}
}
&:last-child {
margin-right: 0;
}
}
}
}
.more-shop {
display: flex;
align-items: center;
@ -653,6 +700,7 @@
background-color: #fff;
padding-bottom: calc(100% - 40rpx);
padding-top: 200rpx;
.pictrue {
display: flex;
flex-direction: column;

View File

@ -24,7 +24,8 @@
<view>积分</view>
</view>
<view class="item">
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}</view>
<view class="num">{{ info.level_info.discount ? parseFloat(info.level_info.discount)/10 : '0'}}
</view>
<view>折扣</view>
</view>
</view>
@ -45,7 +46,8 @@
附近门店
</view>
<view class="acea-row" @click="goMap">
<view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text class="iconfont icon-gengduo3"></text></view>
<view class="storeName line1">{{storeList[0].name}}</view> {{storeList[0].range}}km<text
class="iconfont icon-gengduo3"></text></view>
</view>
<home v-if="navigation"></home>
</view>
@ -129,6 +131,7 @@
})
} else {
// #endif
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
success: (res) => {
@ -192,11 +195,9 @@
this.config.qrc.code = code;
}
},
hello(res) {
hello(res) {},
},
},
onReachBottom() {
}
onReachBottom() {}
}
</script>
@ -204,6 +205,7 @@
page {
background: linear-gradient(121deg, #F5EBE1 0%, #FFDFBE 100%);
}
.vipGrade {
.headerBg {
background: url('../static/big-bg.png') no-repeat;
@ -211,6 +213,7 @@
width: 100%;
height: 476rpx;
padding-top: 1rpx;
.header {
background: url('../static/grade-bg.png') no-repeat;
background-size: 100% 100%;
@ -218,6 +221,7 @@
height: 286rpx;
margin: 26rpx auto;
padding: 28rpx 28rpx 0 28rpx;
.top {
.pictrue {
width: 92rpx;
@ -225,14 +229,17 @@
border: 1px solid #FFFFFF;
margin-right: 20rpx;
border-radius: 50%;
image {
border-radius: 50%;
width: 100%;
height: 100%;
}
}
.text {
width: 400rpx;
.name {
.nameCon {
color: #EDCAAC;
@ -240,6 +247,7 @@
max-width: 332rpx;
margin-right: 10rpx;
}
.num {
border-radius: 4px;
border: 1px solid #EDCAAC;
@ -250,6 +258,7 @@
padding: 0 4rpx;
}
}
.idNum {
font-weight: 400;
color: #EDCAAC;
@ -259,12 +268,15 @@
}
}
}
.list {
margin-top: 46rpx;
.item {
color: #EDCAAC;
font-size: 22rpx;
text-align: center;
.num {
font-size: 40rpx;
margin-bottom: 15rpx;
@ -272,6 +284,7 @@
}
}
}
.qrCode {
width: 690rpx;
height: 700rpx;
@ -279,6 +292,7 @@
border-radius: 18rpx;
margin: -134rpx auto 0 auto;
padding-top: 60rpx;
.header {
width: 330rpx;
height: 60rpx;
@ -287,6 +301,7 @@
color: #333333;
font-size: 30rpx;
margin: 0 auto;
.title {
width: 146rpx;
height: 100%;
@ -308,6 +323,7 @@
}
}
}
.store {
width: 690rpx;
height: 100rpx;
@ -318,16 +334,19 @@
color: #fff;
font-weight: 500;
font-size: 28rpx;
.iconfont {
margin-right: 20rpx;
font-size: 38rpx;
}
.icon-gengduo3 {
font-size: 24rpx;
margin-left: 5rpx;
margin-right: 0;
margin-top: 6rpx;
}
.storeName {
display: inline-block;
max-width: 284rpx;

View File

@ -470,6 +470,7 @@
//
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {

View File

@ -8,6 +8,7 @@
style=" margin-left: 20rpx">
</view>
<view class="town_name">{{ street }}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
@ -25,6 +26,12 @@
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view>
<!-- <view class="" v-if="!street">
获取定位失败,请手动选择
</view> -->
</view>
<view class="" @click="getPositionFn">
获取定位失败,点击允许
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"> </view>
@ -257,7 +264,7 @@
this.getUserInfo()
this.selfLocation()
// this.selfLocation()
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
@ -313,6 +320,12 @@
this.$bus.$off('value-updated')
},
methods: {
getPositionFn() {
uni.removeStorageSync('RejectTarget')
this.selfLocation()
},
//
zhibo() {
@ -619,6 +632,9 @@
this.isshow = true
uni.setStorageSync('loction', true);
}
console.log(uni.getStorageSync('RejectTarget'), 6666)
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
timeout: '1000',
@ -651,6 +667,8 @@
})
},
fail: (err) => {
// console.log("")
uni.setStorageSync("RejectTarget", true)
this.isshow = false
}
@ -674,6 +692,10 @@
"androidx.core.app.NotificationManagerCompat");
}
var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
//
if (!areNotificationsEnabled) {
uni.showModal({
@ -752,8 +774,10 @@
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
}
.zhibo {
height: 130rpx;
image {
width: 100%;
height: 100%;
@ -901,6 +925,7 @@
left: 20rpx;
z-index: 999;
//
.place_wrapper {
color: #fff;

View File

@ -11,8 +11,7 @@
<view class="back" @click='backjJump()' style="margin-right:17rpx ;">
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
</view>
<view style="font-size: 40rpx;">
<!-- {{titName}} -->
@ -534,6 +533,7 @@
//#endif
},
selfLocation() {
if (uni.getStorageSync('RejectTarget')) return
let self = this
uni.getLocation({
type: 'gcj02',
@ -704,6 +704,7 @@
margin: 0;
padding: 0;
}
.serchbtn {
// position: absolute;
// right: 5rpx;
@ -717,6 +718,7 @@
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
.com_name {
font-size: 32rpx;
// background-color: red;

View File

@ -11,8 +11,7 @@
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
</view>
<view style="font-size: 40rpx;">
@ -539,6 +538,7 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {
@ -717,6 +717,7 @@
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
* {
margin: 0;
padding: 0;

View File

@ -10,7 +10,8 @@
<view class="" style="display: flex;align-items: center;">
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx" @click='backjJump'></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;" @click='backjJump'></i>
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
@click='backjJump'></i>
<view class=""
style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 20rpx;color: #F84221;">
供销综合云市场
@ -769,6 +770,7 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {

View File

@ -11,8 +11,7 @@
<view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i>
</view>
<view style="font-size: 40rpx;">
<!-- {{titName}} -->
@ -536,6 +535,7 @@
},
selfLocation() {
let self = this
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {
@ -705,6 +705,7 @@
margin: 0;
padding: 0;
}
.serchbtn {
// position: absolute;
// right: 5rpx;
@ -718,6 +719,7 @@
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
.com_name {
font-size: 32rpx;
// background-color: red;

View File

@ -2,7 +2,9 @@
<div>
<div class="storeBox" ref="container">
<div class="storeBox-box" v-for="(item, index) in storeList" :key="index" @click.stop="checked(item)">
<div class="store-img"><image :src="item.image" lazy-load="true" /></div>
<div class="store-img">
<image :src="item.image" lazy-load="true" />
</div>
<div class="store-cent-left">
<div class="store-name">{{ item.name }}</div>
<div class="store-address line1">
@ -11,7 +13,8 @@
</div>
<div class="row-right">
<div>
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
<a class="store-phone" :href="'tel:' + item.phone"><span
class="iconfont icon-dadianhua01"></span></a>
</div>
<div class="store-distance" @click.stop="showMaoLocation(item)">
<span class="addressTxt" v-if="item.range">距离{{ item.range }}千米</span>
@ -23,8 +26,8 @@
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
<div>
<iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" :src="
<iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0"
style="display:none;" scrolling="no" :src="
'https://apis.map.qq.com/tools/geolocation?key=' +
mapKey +
'&referer=myapp'
@ -158,6 +161,7 @@
// );
// // this.$refs.geoPage.contentWindow.postMessage("getLocation", "*");
// }
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'wgs84',
success: function(res) {

View File

@ -204,7 +204,9 @@
if (!this.address_id) return false;
let that = this;
getAddressDetail(this.address_id).then(res => {
let region = [res.data.province, res.data.city, res.data.district, res.data.street, res.data.village];
let region = [res.data.province, res.data.city, res.data.district, res.data.street, res
.data.village
];
that.$set(that, 'userAddress', res.data);
that.$set(that, 'region', region);
that.city_id = res.data.city_id
@ -280,6 +282,7 @@
title: '定位中',
mask: true,
});
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
type: 'gcj02',
success: (res) => {

View File

@ -217,7 +217,8 @@ export default {
ctx.drawImage(arr2[2], cx, cy, d, d);
ctx.restore();
const CONTENT_ROW_LENGTH = 40;
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
@ -301,11 +302,13 @@ export default {
ctx.setFillStyle('#282828');
ctx.fillText(site_name, r, 62);
const CONTENT_ROW_LENGTH = 26;
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,textArray[textArray.length - 1].length-1)
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,
textArray[textArray.length - 1].length - 1)
textArray[textArray.length - 1] += '…';
contentArray = textArray;
}
@ -405,7 +408,8 @@ export default {
ctx.setFontSize(28);
ctx.setFillStyle('#282828');
const CONTENT_ROW_LENGTH = 25;
let [contentLeng, contentArray, contentRows] = that.textByteLength(content, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(content,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
@ -836,6 +840,7 @@ export default {
this.doGetLocation();
},
doGetLocation() {
if (uni.getStorageSync('RejectTarget')) return
uni.getLocation({
success: (res) => {
uni.removeStorageSync('CACHE_LONGITUDE');