This commit is contained in:
cc_zbp 2023-05-19 15:07:35 +08:00
parent 1539e07755
commit 03529f2da5
9 changed files with 772 additions and 689 deletions

View File

@ -78,7 +78,14 @@
} }
}, },
computed: mapGetters(['location']), computed: mapGetters(['location']),
watch: {}, watch: {
location: {
handler(newVal, oldVal) {
this.street = newVal.address_component.street
},
immediate: true
}
},
created() { created() {
this.getBanner() this.getBanner()
this.Area() this.Area()

View File

@ -43,7 +43,8 @@
<view class="special_work com"> <view class="special_work com">
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
<view class="content "> <view class="content ">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1`)"> <view class="examine"
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text> <text class="text">供货采购</text>
</view> </view>
@ -104,7 +105,8 @@
<view class="special_work com"> <view class="special_work com">
<view class="title">里海云仓</view> <view class="title">里海云仓</view>
<view class="content "> <view class="content ">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1`)"> <view class="examine"
@click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1&product_type=98`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
<text class="text">供货采购</text> <text class="text">供货采购</text>
</view> </view>

View File

@ -1,392 +1,416 @@
<template> <template>
<view :style="viewColor"> <view :style="viewColor">
<view class="product-con"> <view class="product-con">
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="head-wrapper" :style="'top:'+statusBarHeight"> <view class="head-wrapper" :style="'top:'+statusBarHeight">
<view class="head-menu"> <view class="head-menu">
<view class='iconfont icon-xiangzuo' @click="returns"></view> <view class='iconfont icon-xiangzuo' @click="returns"></view>
<view class="iconfont icon-shouye4" @click="goHome"></view> <view class="iconfont icon-shouye4" @click="goHome"></view>
</view> </view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<view v-if="storeInfo && storeInfo.merchant"> <view v-if="storeInfo && storeInfo.merchant">
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"' <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
@scroll="scroll"> :style='"height:"+height+"px;"' @scroll="scroll">
<view id="past0"> <view id="past0">
<productConSwiper :imgUrls="storeInfo.slider_image" :videoCoverImg="videoCoverImg" :videoline="storeInfo.video_link"></productConSwiper> <productConSwiper :imgUrls="storeInfo.slider_image" :videoCoverImg="videoCoverImg"
<!--有氛围图--> :videoline="storeInfo.video_link"></productConSwiper>
<view v-if="storeInfo.atmosphere_pic" :style="{ backgroundImage: `url(${storeInfo.atmosphere_pic})` }" class='nav acea-row row-between-wrapper'> <!--有氛围图-->
<view class='money skeleton-rect'><text class='num'>{{storeInfo.price}}</text> <view v-if="storeInfo.atmosphere_pic" :style="{ backgroundImage: `url(${storeInfo.atmosphere_pic})` }"
<text v-if="!svipData" class='y-money'>{{storeInfo.ot_price}}</text> class='nav acea-row row-between-wrapper'>
<view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;"> <view class='money skeleton-rect'><text class='num'>{{storeInfo.price}}</text>
<text class="vip-money">{{storeInfo.svip_price}}</text> <text v-if="!svipData" class='y-money'>{{storeInfo.ot_price}}</text>
<image class="vip-image" src="/static/images/svip.png"></image> <view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip"
</view> style="display: inline-block;">
</view> <text class="vip-money">{{storeInfo.svip_price}}</text>
</view> <image class="vip-image" src="/static/images/svip.png"></image>
<view class='wrapper'> </view>
<view v-if="storeInfo.atmosphere_pic" class='introduce skeleton-rect acea-row row-between row-bottom atmosphere'> </view>
<view> </view>
<text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)" class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text> <view class='wrapper'>
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)" class="font-bg-red bt-color">自营</text> <view v-if="storeInfo.atmosphere_pic"
{{storeInfo.store_name}} class='introduce skeleton-rect acea-row row-between row-bottom atmosphere'>
</view> <view>
<view class="fenxiang_btn" @click="listenerActionSheet"> <text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)"
<view class='iconfont icon-fenxiang'></view> class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
分享 <text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)"
</view> class="font-bg-red bt-color">自营</text>
</view> {{storeInfo.store_name}}
<view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'> </view>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text> <view class="fenxiang_btn" @click="listenerActionSheet">
<text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text> <view class='iconfont icon-fenxiang'></view>
</view> 分享
<!--无氛围图--> </view>
<view v-else class='share acea-row row-between row-bottom'> </view>
<view class='money p-color skeleton-rect' style="min-width: 70rpx;"> <view v-if="storeInfo.atmosphere_pic" class='integral_count skeleton-rect'>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text>
<text class='num'>{{storeInfo.price}}</text> <text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text>
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;"> </view>
<text class="vip-money">{{storeInfo.svip_price}}</text> <!--无氛围图-->
<image class="vip-image" src="/static/images/svip.png"></image> <view v-else class='share acea-row row-between row-bottom'>
</view> <view class='money p-color skeleton-rect' style="min-width: 70rpx;">
</view>
<view @click="listenerActionSheet" class="fenxiang_btn"> <text class='num'>{{storeInfo.price}}</text>
<view class='iconfont icon-fenxiang'></view> <view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
分享 style="display: inline-block;">
</view> <text class="vip-money">{{storeInfo.svip_price}}</text>
</view> <image class="vip-image" src="/static/images/svip.png"></image>
<view </view>
v-if="svipData && !svipData.is_svip && svipData.show_svip" </view>
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;"> <view @click="listenerActionSheet" class="fenxiang_btn">
<view class="acea-row row-between-wrapper"> <view class='iconfont icon-fenxiang'></view>
<image src="/static/images/svip_user.png"></image> 分享
<view class="">开通 SVIP会员 立省<text>{{svipData.save_money}}</text></view> </view>
</view> </view>
<navigator class="svipBtn" url="/pages/annex/vip_paid/index"> <view v-if="svipData && !svipData.is_svip && svipData.show_svip"
立即开通 class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
<text class="iconfont icon-jiantou"></text> <view class="acea-row row-between-wrapper">
</navigator> <image src="/static/images/svip_user.png"></image>
</view> <view class="">开通 SVIP会员 立省<text>{{svipData.save_money}}</text></view>
<view v-if="!storeInfo.atmosphere_pic" class='integral_count skeleton-rect'> </view>
<text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text> <navigator class="svipBtn" url="/pages/annex/vip_paid/index">
<text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text> 立即开通
</view> <text class="iconfont icon-jiantou"></text>
<view v-if="!storeInfo.atmosphere_pic" class='introduce skeleton-rect'> </navigator>
<text v-if="storeInfo.merchant.type_name" class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text> </view>
<text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red bt-color">自营</text> <view v-if="!storeInfo.atmosphere_pic" class='integral_count skeleton-rect'>
{{storeInfo.store_name || ''}} <text v-if="storeInfo.max_integral > 0" class='integral'>积分最高可抵扣{{storeInfo.max_integral}}</text>
</view> <text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text>
<view class='label acea-row row-between-wrapper' :style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}"> </view>
<view class="skeleton-rect">市场价:{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view> <view v-if="!storeInfo.atmosphere_pic" class='introduce skeleton-rect'>
<view class="skeleton-rect">库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view> <text v-if="storeInfo.merchant.type_name"
<view class="skeleton-rect">销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view> class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
</view> <text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red bt-color">自营</text>
<navigator v-if="storeInfo.top_pid" hover-class='none' :url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label' style="padding-bottom: 10px;"> {{storeInfo.store_name || ''}}
<view class="rank_list acea-row row-between-wrapper"> </view>
<view class="acea-row row-between-wrapper"> <view class='label acea-row row-between-wrapper'
<text class="rank_title"></text> :style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}">
<view>{{ storeInfo.top_name }} · {{ storeInfo.top_num }}</view> <view class="skeleton-rect">市场价:{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view>
</view> <view class="skeleton-rect">
<text class="iconfont icon-xiala1"></text> 库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
</view> <view class="skeleton-rect">
</navigator> 销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
<view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap' style="margin-top: 20rpx;" v-if="coupon.list.length > 0"> </view>
<view class='hide line1 acea-row'> <navigator v-if="storeInfo.top_pid" hover-class='none'
优惠券 :url="`/pages/activity/rank/index?cate_id=${storeInfo.top_pid}`" class='label'
<view class='activity' v-for="(item,index) in coupon.list" :key="index">{{item.use_min_price}}{{item.coupon_price}}</view> style="padding-bottom: 10px;">
</view> <view class="rank_list acea-row row-between-wrapper">
<view class='iconfont icon-jiantou'></view> <view class="acea-row row-between-wrapper">
</view> <text class="rank_title"></text>
</view> <view>{{ storeInfo.top_name }} · {{ storeInfo.top_num }}</view>
<view class='attribute acea-row row-between-wrapper skeleton-rect' @click="selecAttr"> </view>
<view class="acea-row row-between-wrapper">{{attrTxt}} <text class="iconfont icon-xiala1"></text>
<text class='atterTxt'>{{attrValue}}</text> </view>
</view> </navigator>
<view class='iconfont icon-jiantou'></view> <view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap'
</view> style="margin-top: 20rpx;" v-if="coupon.list.length > 0">
<view v-if="specsInfo.params && specsInfo.params.length>0" class="attribute acea-row row-between-wrapper" @click="seeSpecs"> <view class='hide line1 acea-row'>
<view class="acea-row row-middle"> 优惠券
参数 <view class='activity' v-for="(item,index) in coupon.list" :key="index">
<view class="list line1"> {{item.use_min_price}}{{item.coupon_price}}</view>
<text class="item params" v-for="(item,index) in specsInfo.params" :key="index" </view>
v-if="index<2">{{item.name}}</text> <view class='iconfont icon-jiantou'></view>
<text>...</text> </view>
</view> </view>
</view> <view class='attribute acea-row row-between-wrapper skeleton-rect' @click="selecAttr">
<view class="iconfont icon-jiantou"></view> <view class="acea-row row-between-wrapper">{{attrTxt}}
</view> <text class='atterTxt'>{{attrValue}}</text>
<!--运费--> </view>
<view v-if="shipping || shippingValue" class='attribute acea-row row-between-wrapper' @click="showShip"> <view class='iconfont icon-jiantou'></view>
<view class="acea-row row-between-wrapper">运费 </view>
<text class='atterTxt'>{{shippingValue}}</text> <view v-if="specsInfo.params && specsInfo.params.length>0" class="attribute acea-row row-between-wrapper"
</view> @click="seeSpecs">
<view class='iconfont icon-jiantou'></view> <view class="acea-row row-middle">
</view> 参数
<!--保障--> <view class="list line1">
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper' @click="showGuaranee"> <text class="item params" v-for="(item,index) in specsInfo.params" :key="index"
<view class="acea-row row-between-wrapper">保障 v-if="index<2">{{item.name}}</text>
<view class="guaranteeAttr"> <text>...</text>
<text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''" v-for="(item,index) in guarantee"> </view>
{{item.guarantee_name ? item.guarantee_name : ''}} </view>
</text> <view class="iconfont icon-jiantou"></view>
</view> </view>
</view> <!--运费-->
<view class='iconfont icon-jiantou'></view> <view v-if="shipping || shippingValue" class='attribute acea-row row-between-wrapper' @click="showShip">
</view> <view class="acea-row row-between-wrapper">运费
</view> <text class='atterTxt'>{{shippingValue}}</text>
<!--优惠套餐--> </view>
<view class='combo' v-if="comboList && comboList.length>0"> <view class='iconfont icon-jiantou'></view>
<view class='title acea-row row-between-wrapper'> </view>
<view>优惠套餐({{comboTotal}}) </view> <!--保障-->
<view class='praise' @click="openCombo"> <view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper'
查看全部 @click="showGuaranee">
<text class='iconfont icon-jiantou'></text> <view class="acea-row row-between-wrapper">保障
</view> <view class="guaranteeAttr">
</view> <text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''"
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;height: 180rpx;" show-scrollbar="false"> v-for="(item,index) in guarantee">
<view class="img-box"> {{item.guarantee_name ? item.guarantee_name : ''}}
<view class="combo_item" v-for="(item,index) in comboList" :key="index"> </text>
<view class="img-item" v-for="(itemn,indexn) in item.discountsProduct" :key="indexn"> </view>
<image :src="itemn.image" mode="" @click="openCombo"></image> </view>
<text v-if="indexn != item.count-1" class="iconfont icon-jiahao2"></text> <view class='iconfont icon-jiantou'></view>
</view> </view>
<view class="list_total"> </view>
<view class="list_num">{{item.count}}</view> <!--优惠套餐-->
<view class="list_price p-color"> ¥{{item.max_price}}</view> <view class='combo' v-if="comboList && comboList.length>0">
</view> <view class='title acea-row row-between-wrapper'>
</view> <view>优惠套餐({{comboTotal}}) </view>
</view> <view class='praise' @click="openCombo">
</scroll-view> 查看全部
</view> <text class='iconfont icon-jiantou'></text>
<view class='userEvaluation' id="past1" v-if="replyCount && replyCount>0"> </view>
<view class='title acea-row row-between-wrapper skeleton-rect'> </view>
<view>用户评价({{replyCount}})</view> <scroll-view scroll-x="true" style="white-space: nowrap; display: flex;height: 180rpx;"
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?product_id="+id'> show-scrollbar="false">
<text class='t-color'>{{replyChance}}</text>好评率 <view class="img-box">
<text class='iconfont icon-jiantou'></text> <view class="combo_item" v-for="(item,index) in comboList" :key="index">
</navigator> <view class="img-item" v-for="(itemn,indexn) in item.discountsProduct" :key="indexn">
</view> <image :src="itemn.image" mode="" @click="openCombo"></image>
<block v-if="replyCount && replyCount>0"> <text v-if="indexn != item.count-1" class="iconfont icon-jiahao2"></text>
<userEvaluation :reply="reply"></userEvaluation> </view>
</block> <view class="list_total">
</view> <view class="list_num">{{item.count}}</view>
<!-- 种草秀 --> <view class="list_price p-color"> ¥{{item.max_price}}</view>
<view class='userPlant' v-if="storeInfo.community && storeInfo.community.length>0"> </view>
<view class='title acea-row row-between-wrapper'> </view>
<view>种草秀 </view> </view>
<navigator class='praise' hover-class='none' :url="'/pages/plantGrass/plant_show/index?spu_id='+storeInfo.spu_id"> </scroll-view>
查看全部 </view>
<text class='iconfont icon-jiantou'></text> <view class='userEvaluation' id="past1" v-if="replyCount && replyCount>0">
</navigator> <view class='title acea-row row-between-wrapper skeleton-rect'>
</view> <view>用户评价({{replyCount}})</view>
<view class="imgList acea-row"> <navigator class='praise' hover-class='none'
<view class="pictrue" v-for="(item, index) in storeInfo.community" :key="index" v-if="index<=2" :url='"/pages/users/goods_comment_list/index?product_id="+id'>
@click="goPlant(item)"> <text class='t-color'>{{replyChance}}</text>好评率
<image :src="item.image[0]" class="image"></image> <text class='iconfont icon-jiantou'></text>
<image v-if="item.is_type == 2" class="video_img" src="@/static/images/stop.png" mode=""></image> </navigator>
</view> </view>
</view> <block v-if="replyCount && replyCount>0">
</view> <userEvaluation :reply="reply"></userEvaluation>
<!-- 商铺信息 --> </block>
<view class="store-wrapper" v-if="storeInfo.merchant && hide_mer_status !=1"> </view>
<view class="store-hd skeleton-rect"> <!-- 种草秀 -->
<view class="store-info"> <view class='userPlant' v-if="storeInfo.community && storeInfo.community.length>0">
<view class="logo"> <view class='title acea-row row-between-wrapper'>
<image :src="storeInfo.merchant.mer_avatar" mode=""></image> <view>种草秀 </view>
</view> <navigator class='praise' hover-class='none'
<view class="info"> :url="'/pages/plantGrass/plant_show/index?spu_id='+storeInfo.spu_id">
<view class="name line1"> 查看全部
<text>{{storeInfo.merchant.mer_name ? storeInfo.merchant.mer_name : ''}}</text> <text class='iconfont icon-jiantou'></text>
<image v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10" :src="margin_ico" class="store-margin"></image> </navigator>
<text v-if="storeInfo.merchant.type_name" class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text> </view>
<text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red ml8 bt-color">自营</text> <view class="imgList acea-row">
</view> <view class="pictrue" v-for="(item, index) in storeInfo.community" :key="index" v-if="index<=2"
<view v-if="storeInfo.merchant.care_count" class="txt"> @click="goPlant(item)">
{{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注 <image :src="item.image[0]" class="image"></image>
</view> <image v-if="item.is_type == 2" class="video_img" src="@/static/images/stop.png" mode=""></image>
<view v-else class="txt">0人关注</view> </view>
</view> </view>
<navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link" </view>
hover-class="none">进店</navigator> <!-- 商铺信息 -->
</view> <view class="store-wrapper" v-if="storeInfo.merchant && hide_mer_status !=1">
<view class="score-wrapper"> <view class="store-hd skeleton-rect">
<view class="item"> <view class="store-info">
商品描述<text>{{storeInfo.merchant.product_score}}</text> <view class="logo">
</view> <image :src="storeInfo.merchant.mer_avatar" mode=""></image>
<view class="item"> </view>
卖家服务<text>{{storeInfo.merchant.service_score}}</text> <view class="info">
</view> <view class="name line1">
<view class="item"> <text>{{storeInfo.merchant.mer_name ? storeInfo.merchant.mer_name : ''}}</text>
物流服务<text>{{storeInfo.merchant.postage_score}}</text> <image v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10"
</view> :src="margin_ico" class="store-margin"></image>
</view> <text v-if="storeInfo.merchant.type_name"
</view> class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text>
<view v-if="storeInfo.merchant.recommend && storeInfo.merchant.recommend.length > 0" class="con-box"> <text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red ml8 bt-color">自营</text>
<view class="title">店铺推荐</view> </view>
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false"> <view v-if="storeInfo.merchant.care_count" class="txt">
<view class="img-box"> {{storeInfo.merchant.care_count < 10000 ? storeInfo.merchant.care_count : (storeInfo.merchant.care_count/10000).toFixed(2)+'万'}}人关注
<view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend" :key="index" @click="goProDetail(item)"> </view>
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> <view v-else class="txt">0人关注</view>
<!-- <image :src="item.image"></image> --> </view>
<view class="txt"> <navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id"
<view class="title line1">{{item.store_name}}</view> class="link" hover-class="none">进店</navigator>
<view class="price"> </view>
<text></text>{{item.price}} <view class="score-wrapper">
</view> <view class="item">
</view> 商品描述<text>{{storeInfo.merchant.product_score}}</text>
</view> </view>
</view> <view class="item">
</scroll-view> 卖家服务<text>{{storeInfo.merchant.service_score}}</text>
</view> </view>
</view> <view class="item">
<view class='product-intro' id="past3"> 物流服务<text>{{storeInfo.merchant.postage_score}}</text>
<view class='title'>产品介绍</view> </view>
<view class='conter' v-if="description" style="min-height:50rpx;"> </view>
<!-- #ifndef APP-PLUS --> </view>
<jyf-parser v-if="description.type == 0" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser> <view v-if="storeInfo.merchant.recommend && storeInfo.merchant.recommend.length > 0" class="con-box">
<!-- #endif --> <view class="title">店铺推荐</view>
<!-- #ifdef APP-PLUS --> <scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
<view v-if="description.type == 0" class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view> <view class="img-box">
<!-- #endif --> <view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend" :key="index"
<view v-else class="product_content"> @click="goProDetail(item)">
<view v-if="description.content && description.content.title" class="title">{{description.content.title}}</view> <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
<view v-if="description.content && description.content.image" class="pictures"> <!-- <image :src="item.image"></image> -->
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image> <view class="txt">
</view> <view class="title line1">{{item.store_name}}</view>
</view> <view class="price">
</view> <text></text>{{item.price}}
<!-- 价格说明 --> </view>
<view v-if="priceRule.content" class="price-info"> </view>
<view class="price-title">{{priceRule.rule_name}}</view> </view>
<!-- #ifndef APP-PLUS --> </view>
<jyf-parser :domain='domain' :html="priceRule.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser> </scroll-view>
<!-- #endif --> </view>
<!-- #ifdef APP-PLUS --> </view>
<view class="description" v-html="priceRule.content.replace(/<br\/>/ig, '')"></view> <view class='product-intro' id="past3">
<!-- #endif --> <view class='title'>产品介绍</view>
</view> <view class='conter' v-if="description" style="min-height:50rpx;">
</view> <!-- #ifndef APP-PLUS -->
<view style='height:120rpx;'></view> <jyf-parser v-if="description.type == 0" :domain='domain'
</scroll-view> :html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
</view> <!-- #endif -->
<view class='footer acea-row row-between-wrapper'> <!-- #ifdef APP-PLUS -->
<view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect" @click="call"> <view v-if="description.type == 0" class="description"
<view class="iconfont icon-kefu"></view> v-html="description.content.replace(/<br\/>/ig, '')"></view>
<view>客服</view> <!-- #endif -->
</view> <view v-else class="product_content">
<view v-else class="item skeleton-rect" @click="couponTap2"> <view v-if="description.content && description.content.title" class="title">
<view class="iconfont icon-kefu"></view> {{description.content.title}}</view>
<view>客服</view> <view v-if="description.content && description.content.image" class="pictures">
</view> <image v-for="(item,index) in description.content.image" :key="index" :src="item"></image>
<view @click="setCollect" class='item skeleton-rect'> </view>
<view class='iconfont icon-shoucang1' v-if="storeInfo.isRelation"></view> </view>
<view class='iconfont icon-shoucang' v-else></view> </view>
<view>收藏</view> <!-- 价格说明 -->
</view> <view v-if="priceRule.content" class="price-info">
<navigator open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''" url='/pages/order_addcart/order_addcart' <view class="price-title">{{priceRule.rule_name}}</view>
hover-class="none"> <!-- #ifndef APP-PLUS -->
<view class='iconfont icon-gouwuche1'> <jyf-parser :domain='domain' :html="priceRule.content.replace(/<br\/>/ig, '')" ref="article"
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text> :tag-style="tagStyle"></jyf-parser>
</view> <!-- #endif -->
<view>购物车</view> <!-- #ifdef APP-PLUS -->
</navigator> <view class="description" v-html="priceRule.content.replace(/<br\/>/ig, '')"></view>
<view v-if="attr.productSelect.stock != 0" class='bnt acea-row skeleton-rect'> <!-- #endif -->
<form @submit="joinCart" report-submit='true'> </view>
<button v-if="storeInfo.type != 1" class='joinCart bnts' form-type="submit">加入购物车</button> </view>
</form> <view style='height:120rpx;'></view>
<form @submit="goBuy" report-submit='true' v-if="attr.productSelect"> </scroll-view>
<button class='buy bnts' :class="storeInfo.type == 1 ? 'virtual_buy' : ''" form-type="submit" :disabled="attr.productSelect.stock == 0">立即购买</button> </view>
</form> <view class='footer acea-row row-between-wrapper'>
</view> <view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect"
<view v-else class='bnt acea-row skeleton-rect'> @click="call">
<form report-submit='true'> <view class="iconfont icon-kefu"></view>
<button v-if="arrival_notice" class='buy bnts sold_out' form-type="submit" @click="arrivalNotice">到货通知</button> <view>客服</view>
<button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button> </view>
</form> <view v-else class="item skeleton-rect" @click="couponTap2">
</view> <view class="iconfont icon-kefu"></view>
</view> <view>客服</view>
<block v-if="sharePacket.max&&sharePacket.max>0"> </view>
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange" <view @click="setCollect" class='item skeleton-rect'>
:showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets> <view class='iconfont icon-shoucang1' v-if="storeInfo.isRelation"></view>
</block> <view class='iconfont icon-shoucang' v-else></view>
<!-- 组件 --> <view>收藏</view>
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum" </view>
@attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window' :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow> <navigator open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''"
<block v-if="coupon.coupon"> url='/pages/order_addcart/order_addcart' hover-class="none">
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons" <view class='iconfont icon-gouwuche1'>
@ChangCouponsUseState="ChangCouponsUseState"></couponListWindow> <text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
</block> </view>
<specs :specsInfo="specsInfo" @myevent="mySpecs"></specs> <view>购物车</view>
<!-- 分享按钮 --> </navigator>
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''"> <view v-if="attr.productSelect.stock != 0" class='bnt acea-row skeleton-rect'>
<!-- #ifndef MP --> <form @submit="joinCart" report-submit='true'>
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' v-if="weixinStatus === true" @click="H5ShareBox = true"> <button v-if="storeInfo.type != 1" class='joinCart bnts' form-type="submit">加入购物车</button>
<view class="iconfont icon-weixin3"></view> </form>
<view class="">发送给朋友</view> <form @submit="goBuy" report-submit='true' v-if="attr.productSelect">
</button> <button class='buy bnts' :class="storeInfo.type == 1 ? 'virtual_buy' : ''" form-type="submit"
<!-- #endif --> :disabled="attr.productSelect.stock == 0">立即购买</button>
<!-- #ifdef MP --> </form>
<button class="item" :class="weixinStatus ? 'item3' : ''" open-type="share" hover-class='none' @click="goFriend"> </view>
<view class="iconfont icon-weixin3"></view> <view v-else class='bnt acea-row skeleton-rect'>
<view class="">发送给朋友</view> <form report-submit='true'>
</button> <button v-if="arrival_notice" class='buy bnts sold_out' form-type="submit"
<!-- #endif --> @click="arrivalNotice">到货通知</button>
<!-- #ifdef APP-PLUS --> <button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button>
<view class="item" @click="appShare('WXSceneSession')"> </form>
<view class="iconfont icon-weixin3"></view> </view>
<view class="">分享给好友</view> </view>
</view> <block v-if="sharePacket.max&&sharePacket.max>0">
<!-- #endif --> <shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' @click="goPoster"> @closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
<view class="iconfont icon-haibao"></view> </block>
<view class="">生成海报</view> <!-- 组件 -->
</button> <productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' @click="copyPwd"> @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'
<view class="iconfont icon-fuzhikouling1"></view> :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow>
<view>生成口令</view> <block v-if="coupon.coupon">
</button> <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons"
</view> @ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
<view class="mask" v-if="posters" @click="listenerActionClose"></view> </block>
<!--口令复制结果--> <specs :specsInfo="specsInfo" @myevent="mySpecs"></specs>
<copyPassword :isCopy='isCopy' :copyUrl='copyUrl' @close="closeCopy"></copyPassword> <!-- 分享按钮 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
<!-- 海报展示 --> <!-- #ifndef MP -->
<view class='poster-pop' v-if="posterImageStatus"> <button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' v-if="weixinStatus === true"
<image src='../../static/images/poster-close.png' class='close' @click="posterImageClose"></image> @click="H5ShareBox = true">
<image :src='posterImage'></image> <view class="iconfont icon-weixin3"></view>
<!-- #ifndef H5 --> <view class="">发送给朋友</view>
<view class='save-poster' @click="savePosterPath">保存到手机</view> </button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef MP -->
<view class="keep">长按图片可以保存到手机</view> <button class="item" :class="weixinStatus ? 'item3' : ''" open-type="share" hover-class='none'
<!-- #endif --> @click="goFriend">
</view> <view class="iconfont icon-weixin3"></view>
<view class='mask' v-if="posterImageStatus"></view> <view class="">发送给朋友</view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> </button>
<!-- 发送给朋友图片 --> <!-- #endif -->
<view class="share-box" v-if="H5ShareBox"> <!-- #ifdef APP-PLUS -->
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image> <view class="item" @click="appShare('WXSceneSession')">
</view> <view class="iconfont icon-weixin3"></view>
<guaranteeTemplate ref="guartemplate" :guarantee='guarantee' :shipping='shipping'></guaranteeTemplate> <view class="">分享给好友</view>
<!-- #ifndef H5 --> </view>
<passwordPopup></passwordPopup> <!-- #endif -->
<!-- #endif --> <button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' @click="goPoster">
<!--套餐产品弹窗--> <view class="iconfont icon-haibao"></view>
<discounts-goods ref="discounts" :id="id" :uid="uid"></discounts-goods> <view class="">生成海报</view>
</view> </button>
</view> <button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' @click="copyPwd">
<view class="iconfont icon-fuzhikouling1"></view>
<view>生成口令</view>
</button>
</view>
<view class="mask" v-if="posters" @click="listenerActionClose"></view>
<!--口令复制结果-->
<copyPassword :isCopy='isCopy' :copyUrl='copyUrl' @close="closeCopy"></copyPassword>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- 海报展示 -->
<view class='poster-pop' v-if="posterImageStatus">
<image src='../../static/images/poster-close.png' class='close' @click="posterImageClose"></image>
<image :src='posterImage'></image>
<!-- #ifndef H5 -->
<view class='save-poster' @click="savePosterPath">保存到手机</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="keep">长按图片可以保存到手机</view>
<!-- #endif -->
</view>
<view class='mask' v-if="posterImageStatus"></view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
<!-- 发送给朋友图片 -->
<view class="share-box" v-if="H5ShareBox">
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
</view>
<guaranteeTemplate ref="guartemplate" :guarantee='guarantee' :shipping='shipping'></guaranteeTemplate>
<!-- #ifndef H5 -->
<passwordPopup></passwordPopup>
<!-- #endif -->
<!--套餐产品弹窗-->
<discounts-goods ref="discounts" :id="id" :uid="uid"></discounts-goods>
</view>
</view>
</template> </template>
<script> <script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import { getconfig } from '@/api/public.js'; import { getconfig } from '@/api/public.js';
import { arrivalSubscribe } from '@/utils/SubscribeMessage.js'; import { arrivalSubscribe } from '@/utils/SubscribeMessage.js';
@ -951,6 +975,7 @@
}); });
let that = this; let that = this;
const data = { product_type: this.product_type } const data = { product_type: this.product_type }
console.log('data', data);
getProductDetail(that.id, data).then(res => { getProductDetail(that.id, data).then(res => {
uni.hideLoading(); uni.hideLoading();
let storeInfo = res.data; let storeInfo = res.data;

View File

@ -219,10 +219,7 @@
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.toString(); longitude = res.longitude.toString();
getGeocoder({ getGeocoder({ lat: latitude, long: longitude }).then(res => {
lat: latitude,
long: longitude
}).then(res => {
this.$store.commit('setLocation', res.data) this.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street this.street = res.data.address_component.street
}).catch(err => { }).catch(err => {

View File

@ -9,6 +9,19 @@
</block> </block>
</view> </view>
<view class="goods-wrapper wrapper">
<block v-for="(item,index) in goods" :key="index">
<view class="item">
<view class="l_cont">
<image :src="item.image" mode="aspectFill"></image>
</view>
<view class="r_cont">
<text>{{item.store_name}}</text>
</view>
</view>
</block>
</view>
<u-popup :show="editGoodsShow" @close="editGoodsClose" :round="18" mode="center"> <u-popup :show="editGoodsShow" @close="editGoodsClose" :round="18" mode="center">
<view class="edit_goods_box"> <view class="edit_goods_box">
<view class="edit_name flex_a_c edit_name_no"> <view class="edit_name flex_a_c edit_name_no">
@ -38,7 +51,7 @@
<view class="edit_goods_btn"> <view class="edit_goods_btn">
<u-button type="error" text="取消" class="edit_btn" @click="searchGoodsShow=false"> <u-button type="error" text="取消" class="edit_btn" @click="searchGoodsShow=false">
</u-button> </u-button>
<u-button type="primary" text="保存" class="edit_btn" @click="searchGoodsClose"> <u-button type="primary" text="搜索" class="edit_btn" @click="searchGoodsClose">
</u-button> </u-button>
</view> </view>
</view> </view>
@ -73,7 +86,8 @@
editGoodsShow: false, // editGoodsShow: false, //
mer_id: '', mer_id: '',
searchGoodsShow: true, searchGoodsShow: true,
searchGoodsName: '' searchGoodsName: '',
goods: []
} }
}, },
onLoad(e) { onLoad(e) {
@ -91,6 +105,7 @@
} }
const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err)) const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err))
console.log('data', data); console.log('data', data);
this.goods = data.list
this.searchGoodsShow = false this.searchGoodsShow = false
}, },
async editGoodsClose() { async editGoodsClose() {
@ -161,6 +176,30 @@
margin: 0 auto; margin: 0 auto;
} }
.goods-wrapper {
.item {
display: flex;
height: 175.44rpx;
width: 100%;
background-color: #fff;
margin-top: 21.05rpx;
border-radius: 8px;
padding: 12px;
.l_cont {
image {
width: 133.33rpx;
height: 133.33rpx;
border-radius: 8px;
}
}
.r_cont {
margin-left: 17.54rpx;
}
}
}
.select_item { .select_item {
width: 336.84rpx; width: 336.84rpx;
height: 189.47rpx; height: 189.47rpx;

View File

@ -72,8 +72,8 @@
</view> </view>
</view> </view>
<view class="pro-box" :class="'styleType'+store_street_theme"> <view class="pro-box" :class="'styleType'+store_street_theme">
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}&product_type=98`" hover-class="none" <navigator :url="`/pages/goods_details/index?id=${itemn.product_id}&product_type=${product_type}`"
class="pro-item" v-for="(itemn,indexn) in item.recommend.slice(0,3)" :key='indexn'> hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend.slice(0,3)" :key='indexn'>
<view class="picture"> <view class="picture">
<easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage> <easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage>
<view v-if="itemn.border_pic" :style="{ backgroundImage: `url(${itemn.border_pic})` }" <view v-if="itemn.border_pic" :style="{ backgroundImage: `url(${itemn.border_pic})` }"
@ -269,9 +269,11 @@
count: 0, count: 0,
storeTypeArr: [], // storeTypeArr: [], //
merList: [], // merList: [], //
product_type: 0
}; };
}, },
onLoad(options) { onLoad(options) {
this.product_type = options.product_type ?? 0
this.sotreParam.street_id = options.street_id this.sotreParam.street_id = options.street_id
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() || ''

View File

@ -1,293 +1,307 @@
<template> <template>
<view class="area_container"> <view class="area_container">
<view class="area_container_title"> <view class="area_container_title">
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none" class="manage_btn">管理</navigator> <navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
<view class="area_container_title_name">选择店铺分类</view> class="manage_btn">管理</navigator>
<view class="area_container_title_close" @click="close"><text class="iconfont" >&#xe62f;</text></view> <view class="area_container_title_name">选择店铺分类</view>
</view> <view class="area_container_title_close" @click="close"><text class="iconfont">&#xe62f;</text></view>
<view class="area_container_content"> </view>
<view class="selectList_con"> <view class="area_container_content">
<view class="selectList_con_item" v-for="(item, index) in selectList" :key="index"> <view class="selectList_con">
<text>{{ item.label }}</text> <view class="selectList_con_item" v-for="(item, index) in selectList" :key="index">
<text class="iconfont" @click="delSelectItem(item, index)">&#xe62f;</text> <text>{{ item.label }}</text>
</view> <text class="iconfont" @click="delSelectItem(item, index)">&#xe62f;</text>
</view> </view>
<view class="selectList_tap"> </view>
<view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index" @click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }"> <view class="selectList_tap">
{{ item.label }} <view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index"
</view> @click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem" :class="{ selectTap: selectTap == -1 }">请选择</view> {{ item.label }}
</view> </view>
<view class="selectList_area"> <view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
<scroll-view scroll-y="true" class="scroll"> :class="{ selectTap: selectTap == -1 }">请选择</view>
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item"> </view>
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.label }}</view> <view class="selectList_area">
<view @click="handlyAddSelect(item)" v-if="!item.children"><text class="iconfont">&#xe70e;</text></view> <scroll-view scroll-y="true" class="scroll">
</view> <view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
</scroll-view> <view class="selectList_area_item_name" @click="selectArea(item)">{{ item.label }}</view>
</view> <view @click="handlyAddSelect(item)" v-if="!item.children"><text class="iconfont">&#xe70e;</text></view>
<view class="handle"><view class="handle_button" @click="handleGetSelectArea">确定</view></view> </view>
</view> </scroll-view>
</view> </view>
<view class="handle">
<view class="handle_button" @click="handleGetSelectArea">确定</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import { serialize, Toast } from '../../../libs/uniApi.js'; import { serialize, Toast } from '../../../libs/uniApi.js';
export default { export default {
props:{ props: {
allReadySelect: { allReadySelect: {
type: Array, type: Array,
default:() => { default: () => {
return [] return []
} }
}, },
classifiedData: { classifiedData: {
type: Array, type: Array,
default:() => { default: () => {
return [] return []
} }
}, },
mer_id: { mer_id: {
type: Number, type: Number || String,
default: 0 default: 0
} }
}, },
data() { data() {
return { return {
selectList: [], selectList: [],
selectTap: -1, selectTap: -1,
selectTapIndex: -1, // selectTapIndex: -1, //
tapList: [], tapList: [],
isShowLastItem: true, // isShowLastItem: true, //
areaList: [] areaList: []
}; };
}, },
watch: { watch: {
classifiedData: { classifiedData: {
handler(val) { handler(val) {
this.areaList = this.classifiedData this.areaList = this.classifiedData
}, },
deep: true deep: true
} }
}, },
created() { created() {
this.areaList = serialize(this.classifiedData); this.areaList = serialize(this.classifiedData);
console.log(this.areaList); console.log(this.areaList);
}, },
methods: { methods: {
// //
async selectArea(item) { async selectArea(item) {
//
if (!(item.children && item.children.length)) {
// Toast('');
return;
if (this.isShowLastItem) {
this.tapList.push(item);
} else {
this.tapList.splice(this.tapList.length - 1, 1, item);
}
this.isShowLastItem = false;
return;
}
console.log(item);
// titletitleitem
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
this.selectTapIndex = -1;
return;
}
// //
if (item.children && item.children.length) { if (!(item.children && item.children.length)) {
this.areaList = item.children; // Toast('');
this.tapList.push(item); return;
this.isShowLastItem = true; if (this.isShowLastItem) {
this.selectTap = -1; this.tapList.push(item);
return; } else {
} this.tapList.splice(this.tapList.length - 1, 1, item);
}
this.isShowLastItem = false;
return;
}
console.log(item);
// titletitleitem
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
this.selectTapIndex = -1;
return;
}
//
if (item.children && item.children.length) {
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
return;
}
}, },
// tap // tap
async selectTapItem(item, index) { async selectTapItem(item, index) {
if(index == 0) { if (index == 0) {
this.areaList = serialize(this.classifiedData); this.areaList = serialize(this.classifiedData);
this.selectTap = item.value; // this.selectTap = item.value; //
this.selectTapIndex = index; // this.selectTapIndex = index; //
return; return;
} }
this.selectTap = item.value; this.selectTap = item.value;
this.areaList = item.children; this.areaList = item.children;
}, },
// //
selectTapLastItem(val) { selectTapLastItem(val) {
this.selectTap = -1; this.selectTap = -1;
if (!this.tapList.length) { if (!this.tapList.length) {
// this.areaList = val.children; // this.areaList = val.children;
this.areaList = serialize(this.classifiedData); this.areaList = serialize(this.classifiedData);
return; return;
} }
this.areaList = this.tapList[this.tapList.length - 1].children; this.areaList = this.tapList[this.tapList.length - 1].children;
}, },
// //
handlyAddSelect(item) { handlyAddSelect(item) {
if (this.selectList.some(val => val.value == item.value)) { if (this.selectList.some(val => val.value == item.value)) {
Toast('已经选择过了') Toast('已经选择过了')
return return
} }
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
}
if (!item.parent_id) {
this.selectList.push(item);
return;
}
let str = '';
str =
serialize(this.tapList)
.map(val => val.name)
.join('/') +
'/' +
item.name;
this.selectList.push({ ...item, name: str });
},
//
delSelectItem(item, index) {
this.selectList.splice(index, 1);
},
//
handleGetSelectArea() {
this.$emit('handleGetSelectArea', this.selectList);
},
close() {
this.$emit('close');
},
// if (this.selectTapIndex > -1) {
unique(arr) { this.tapList.splice(this.selectTapIndex, 999);
var obj = {}; }
return arr.filter(ele => { if (!item.parent_id) {
if (!obj[ele]) { this.selectList.push(item);
obj[ele] = true; return;
return true; }
} let str = '';
}); str =
} serialize(this.tapList)
} .map(val => val.name)
}; .join('/') +
'/' +
item.name;
this.selectList.push({ ...item, name: str });
},
//
delSelectItem(item, index) {
this.selectList.splice(index, 1);
},
//
handleGetSelectArea() {
this.$emit('handleGetSelectArea', this.selectList);
},
close() {
this.$emit('close');
},
//
unique(arr) {
var obj = {};
return arr.filter(ele => {
if (!obj[ele]) {
obj[ele] = true;
return true;
}
});
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.area_container { .area_container {
background: #fff; background: #fff;
border-radius: 16px 16px 0px 0px; border-radius: 16px 16px 0px 0px;
&_title { &_title {
text-align: center; text-align: center;
padding: 36rpx 30rpx 46rpx 0; padding: 36rpx 30rpx 46rpx 0;
position: relative; position: relative;
&_close {
position: absolute;
top: 20rpx;
right: 20rpx;
}
.manage_btn{
font-weight: normal;
color: #e93323;
font-size: 24rpx;
position: absolute;
left: 30rpx;
top: 40rpx;
}
}
&_content {
padding: 0 30rpx;
.selectList_con { &_close {
display: flex; position: absolute;
flex-wrap: wrap; top: 20rpx;
margin-bottom: 50rpx; right: 20rpx;
&_item { }
padding: 3rpx 10rpx;
background: #fff6f5;
color: #e93323;
margin-right: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
font-size: 22rpx;
> span:nth-child(1) {
display: inline-block;
margin-right: 14rpx;
white-space: nowrap;
}
.iconfont {
font-size: 24rpx;
}
}
}
.selectList_tap { .manage_btn {
border-bottom: 1px solid #eeeeee; font-weight: normal;
display: flex; color: #e93323;
&_item { font-size: 24rpx;
font-size: 28rpx; position: absolute;
margin-right: 60rpx; left: 30rpx;
white-space: nowrap; top: 40rpx;
} }
.selectTap { }
color: #e93323;
border-bottom: 3rpx solid #e93323;
padding-bottom: 21rpx;
}
}
.selectList_area { &_content {
.scroll { padding: 0 30rpx;
height: 597rpx;
}
.selectList_area_item { .selectList_con {
padding: 40rpx 0; display: flex;
display: flex; flex-wrap: wrap;
justify-content: space-between; margin-bottom: 50rpx;
font-size: 28rpx;
.iconfont {
color: #e93323;
font-size: 40rpx;
}
.selectList_area_item_name { &_item {
flex: 0.7; padding: 3rpx 10rpx;
} background: #fff6f5;
} color: #e93323;
} margin-right: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
font-size: 22rpx;
.handle { >span:nth-child(1) {
height: 126rpx; display: inline-block;
&_button { margin-right: 14rpx;
width: 690rpx; white-space: nowrap;
height: 86rpx; }
background: #e93323;
border-radius: 43rpx; .iconfont {
display: flex; font-size: 24rpx;
align-items: center; }
justify-content: center; }
font-size: 32rpx; }
color: #fff;
} .selectList_tap {
} border-bottom: 1px solid #eeeeee;
} display: flex;
}
</style> &_item {
font-size: 28rpx;
margin-right: 60rpx;
white-space: nowrap;
}
.selectTap {
color: #e93323;
border-bottom: 3rpx solid #e93323;
padding-bottom: 21rpx;
}
}
.selectList_area {
.scroll {
height: 597rpx;
}
.selectList_area_item {
padding: 40rpx 0;
display: flex;
justify-content: space-between;
font-size: 28rpx;
.iconfont {
color: #e93323;
font-size: 40rpx;
}
.selectList_area_item_name {
flex: 0.7;
}
}
}
.handle {
height: 126rpx;
&_button {
width: 690rpx;
height: 86rpx;
background: #e93323;
border-radius: 43rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #fff;
}
}
}
}
</style>

View File

@ -119,25 +119,29 @@
getArticleList(19).then(res => { getArticleList(19).then(res => {
this.recoList = res.data.list this.recoList = res.data.list
}) })
console.log("位置", JSON.parse(this.location)); this.getTownAndStoreId()
const LOCA = JSON.parse(this.location)
this.street_id = LOCA.address_reference.town.id
this.getCloudShopMerId(this.street_id)
this.town = LOCA.address_component.street ?? ''
}, },
onShow() {}, onShow() {},
computed: mapGetters(['location']), computed: mapGetters(['location']),
watch: { watch: {
location(newVal, oldVal) { location: {
console.log('newVal', newVal); handler(newVal, oldVal) {
return newVal this.street_id = newVal.address_reference.town.id
this.getCloudShopMerId(this.street_id)
this.town = newVal.address_component.street ?? ''
},
immediate: true
} }
}, },
methods: { methods: {
getTownAndStoreId() {
const LOCA = JSON.parse(this.location)
this.street_id = LOCA.address_reference.town.id
this.getCloudShopMerId(this.street_id)
this.town = LOCA.address_component.street ?? ''
},
selectPlce(e) { selectPlce(e) {
console.log("e", e);
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.store_id = e.value[1].id
this.town = e.value[1].name this.town = e.value[1].name
this.getCloudShopMerId(e.value[1].code) this.getCloudShopMerId(e.value[1].code)
}, },

View File

@ -7,17 +7,10 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import { getUserInfo } from "../../api/user.js";
getUserInfo import { LOGIN_STATUS, UID } from '../../config/cache';
} from "../../api/user.js";
import {
LOGIN_STATUS,
UID
} from '../../config/cache';
import Cache from '../../utils/cache'; import Cache from '../../utils/cache';
import { import { USER_INFO } from '../../config/cache';
USER_INFO
} from '../../config/cache';
const state = { const state = {
location: Cache.get('LOCATION_DATA') || {}, location: Cache.get('LOCATION_DATA') || {},
@ -36,7 +29,7 @@ const state = {
const mutations = { const mutations = {
setLocation(state, data) { setLocation(state, data) {
state.loca = data state.location = data
Cache.set('LOCATION_DATA', data); Cache.set('LOCATION_DATA', data);
}, },
LOGIN(state, opt) { LOGIN(state, opt) {