提交
This commit is contained in:
parent
1539e07755
commit
03529f2da5
@ -78,7 +78,14 @@
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['location']),
|
||||
watch: {},
|
||||
watch: {
|
||||
location: {
|
||||
handler(newVal, oldVal) {
|
||||
this.street = newVal.address_component.street
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBanner()
|
||||
this.Area()
|
||||
|
@ -43,7 +43,8 @@
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<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>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
@ -104,7 +105,8 @@
|
||||
<view class="special_work com">
|
||||
<view class="title">里海云仓</view>
|
||||
<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>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
|
@ -10,25 +10,31 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view v-if="storeInfo && storeInfo.merchant">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style='"height:"+height+"px;"'
|
||||
@scroll="scroll">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
|
||||
:style='"height:"+height+"px;"' @scroll="scroll">
|
||||
<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 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>
|
||||
<text v-if="!svipData" class='y-money'>¥{{storeInfo.ot_price}}</text>
|
||||
<view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;">
|
||||
<view class="atmosphere" v-if="svipData && svipData.show_svip_price && svipData.show_svip"
|
||||
style="display: inline-block;">
|
||||
<text class="vip-money">¥{{storeInfo.svip_price}}</text>
|
||||
<image class="vip-image" src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrapper'>
|
||||
<view v-if="storeInfo.atmosphere_pic" class='introduce skeleton-rect acea-row row-between row-bottom atmosphere'>
|
||||
<view v-if="storeInfo.atmosphere_pic"
|
||||
class='introduce skeleton-rect acea-row row-between row-bottom atmosphere'>
|
||||
<view>
|
||||
<text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)" class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)" class="font-bg-red bt-color">自营</text>
|
||||
<text v-if="(storeInfo.merchant && storeInfo.merchant.type_name)"
|
||||
class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="(storeInfo.merchant && storeInfo.merchant.is_trader)"
|
||||
class="font-bg-red bt-color">自营</text>
|
||||
{{storeInfo.store_name}}
|
||||
</view>
|
||||
<view class="fenxiang_btn" @click="listenerActionSheet">
|
||||
@ -45,7 +51,8 @@
|
||||
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
|
||||
¥
|
||||
<text class='num'>{{storeInfo.price}}</text>
|
||||
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip" style="display: inline-block;">
|
||||
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
|
||||
style="display: inline-block;">
|
||||
<text class="vip-money">¥{{storeInfo.svip_price}}</text>
|
||||
<image class="vip-image" src="/static/images/svip.png"></image>
|
||||
</view>
|
||||
@ -55,8 +62,7 @@
|
||||
分享
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="svipData && !svipData.is_svip && svipData.show_svip"
|
||||
<view v-if="svipData && !svipData.is_svip && svipData.show_svip"
|
||||
class="svipCon acea-row row-between-wrapper skeleton-rect" style="margin-top: 20rpx;">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<image src="/static/images/svip_user.png"></image>
|
||||
@ -72,16 +78,22 @@
|
||||
<text v-if="storeInfo.delivery_free == 1" class='integral'>包邮</text>
|
||||
</view>
|
||||
<view v-if="!storeInfo.atmosphere_pic" class='introduce skeleton-rect'>
|
||||
<text v-if="storeInfo.merchant.type_name" class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-if="storeInfo.merchant.type_name"
|
||||
class="font-bg-red bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red bt-color">自营</text>
|
||||
{{storeInfo.store_name || ''}}
|
||||
</view>
|
||||
<view class='label acea-row row-between-wrapper' :style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}">
|
||||
<view class='label acea-row row-between-wrapper'
|
||||
:style="{'padding-bottom':coupon.list.length || storeInfo.top_pid?0 :10+'px;'}">
|
||||
<view class="skeleton-rect">市场价:¥{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view>
|
||||
<view class="skeleton-rect">库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
|
||||
<view class="skeleton-rect">销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
|
||||
<view class="skeleton-rect">
|
||||
库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
|
||||
<view class="skeleton-rect">
|
||||
销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}</view>
|
||||
</view>
|
||||
<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;">
|
||||
<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;">
|
||||
<view class="rank_list acea-row row-between-wrapper">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<text class="rank_title"></text>
|
||||
@ -90,10 +102,12 @@
|
||||
<text class="iconfont icon-xiala1"></text>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap' style="margin-top: 20rpx;" v-if="coupon.list.length > 0">
|
||||
<view class='coupon acea-row row-between-wrapper skeleton-rect' @click='couponTap'
|
||||
style="margin-top: 20rpx;" v-if="coupon.list.length > 0">
|
||||
<view class='hide line1 acea-row'>
|
||||
优惠券:
|
||||
<view class='activity' v-for="(item,index) in coupon.list" :key="index">满{{item.use_min_price}}减{{item.coupon_price}}</view>
|
||||
<view class='activity' v-for="(item,index) in coupon.list" :key="index">
|
||||
满{{item.use_min_price}}减{{item.coupon_price}}</view>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
@ -104,7 +118,8 @@
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
<view v-if="specsInfo.params && specsInfo.params.length>0" class="attribute acea-row row-between-wrapper" @click="seeSpecs">
|
||||
<view v-if="specsInfo.params && specsInfo.params.length>0" class="attribute acea-row row-between-wrapper"
|
||||
@click="seeSpecs">
|
||||
<view class="acea-row row-middle">
|
||||
参数:
|
||||
<view class="list line1">
|
||||
@ -123,10 +138,12 @@
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
<!--保障-->
|
||||
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper' @click="showGuaranee">
|
||||
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper'
|
||||
@click="showGuaranee">
|
||||
<view class="acea-row row-between-wrapper">保障:
|
||||
<view class="guaranteeAttr">
|
||||
<text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''" v-for="(item,index) in guarantee">
|
||||
<text class='atterTxt1' :class="item.guarantee_name ? 'hasAttr' : ''"
|
||||
v-for="(item,index) in guarantee">
|
||||
{{item.guarantee_name ? item.guarantee_name : ''}}
|
||||
</text>
|
||||
</view>
|
||||
@ -143,7 +160,8 @@
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;height: 180rpx;" show-scrollbar="false">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;height: 180rpx;"
|
||||
show-scrollbar="false">
|
||||
<view class="img-box">
|
||||
<view class="combo_item" v-for="(item,index) in comboList" :key="index">
|
||||
<view class="img-item" v-for="(itemn,indexn) in item.discountsProduct" :key="indexn">
|
||||
@ -161,7 +179,8 @@
|
||||
<view class='userEvaluation' id="past1" v-if="replyCount && replyCount>0">
|
||||
<view class='title acea-row row-between-wrapper skeleton-rect'>
|
||||
<view>用户评价({{replyCount}})</view>
|
||||
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?product_id="+id'>
|
||||
<navigator class='praise' hover-class='none'
|
||||
:url='"/pages/users/goods_comment_list/index?product_id="+id'>
|
||||
<text class='t-color'>{{replyChance}}</text>好评率
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</navigator>
|
||||
@ -174,7 +193,8 @@
|
||||
<view class='userPlant' v-if="storeInfo.community && storeInfo.community.length>0">
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view>种草秀 </view>
|
||||
<navigator class='praise' hover-class='none' :url="'/pages/plantGrass/plant_show/index?spu_id='+storeInfo.spu_id">
|
||||
<navigator class='praise' hover-class='none'
|
||||
:url="'/pages/plantGrass/plant_show/index?spu_id='+storeInfo.spu_id">
|
||||
查看全部
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</navigator>
|
||||
@ -197,8 +217,10 @@
|
||||
<view class="info">
|
||||
<view class="name line1">
|
||||
<text>{{storeInfo.merchant.mer_name ? storeInfo.merchant.mer_name : ''}}</text>
|
||||
<image v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10" :src="margin_ico" class="store-margin"></image>
|
||||
<text v-if="storeInfo.merchant.type_name" class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<image v-if="margin_ico_switch==1 && margin_ico && storeInfo.merchant.is_margin == 10"
|
||||
:src="margin_ico" class="store-margin"></image>
|
||||
<text v-if="storeInfo.merchant.type_name"
|
||||
class="font-bg-red ml8 bt-color">{{storeInfo.merchant.type_name}}</text>
|
||||
<text v-else-if="storeInfo.merchant.is_trader" class="font-bg-red ml8 bt-color">自营</text>
|
||||
</view>
|
||||
<view v-if="storeInfo.merchant.care_count" class="txt">
|
||||
@ -206,8 +228,8 @@
|
||||
</view>
|
||||
<view v-else class="txt">0人关注</view>
|
||||
</view>
|
||||
<navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
|
||||
hover-class="none">进店</navigator>
|
||||
<navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id"
|
||||
class="link" hover-class="none">进店</navigator>
|
||||
</view>
|
||||
<view class="score-wrapper">
|
||||
<view class="item">
|
||||
@ -225,7 +247,8 @@
|
||||
<view class="title">店铺推荐</view>
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex" show-scrollbar="false">
|
||||
<view class="img-box">
|
||||
<view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend" :key="index" @click="goProDetail(item)">
|
||||
<view class="img-item" v-for="(item,index) in storeInfo.merchant.recommend" :key="index"
|
||||
@click="goProDetail(item)">
|
||||
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
|
||||
<!-- <image :src="item.image"></image> -->
|
||||
<view class="txt">
|
||||
@ -243,13 +266,16 @@
|
||||
<view class='title'>产品介绍</view>
|
||||
<view class='conter' v-if="description" style="min-height:50rpx;">
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser v-if="description.type == 0" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<jyf-parser v-if="description.type == 0" :domain='domain'
|
||||
:html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view v-if="description.type == 0" class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<view v-if="description.type == 0" class="description"
|
||||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="title">{{description.content.title}}</view>
|
||||
<view v-if="description.content && description.content.title" class="title">
|
||||
{{description.content.title}}</view>
|
||||
<view v-if="description.content && description.content.image" class="pictures">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image>
|
||||
</view>
|
||||
@ -259,7 +285,8 @@
|
||||
<view v-if="priceRule.content" class="price-info">
|
||||
<view class="price-title">{{priceRule.rule_name}}</view>
|
||||
<!-- #ifndef APP-PLUS -->
|
||||
<jyf-parser :domain='domain' :html="priceRule.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<jyf-parser :domain='domain' :html="priceRule.content.replace(/<br\/>/ig, '')" ref="article"
|
||||
:tag-style="tagStyle"></jyf-parser>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="description" v-html="priceRule.content.replace(/<br\/>/ig, '')"></view>
|
||||
@ -270,7 +297,8 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect" @click="call">
|
||||
<view v-if="storeInfo.merchant && storeInfo.merchant.services_type == 1" class="item skeleton-rect"
|
||||
@click="call">
|
||||
<view class="iconfont icon-kefu"></view>
|
||||
<view>客服</view>
|
||||
</view>
|
||||
@ -283,8 +311,8 @@
|
||||
<view class='iconfont icon-shoucang' v-else></view>
|
||||
<view>收藏</view>
|
||||
</view>
|
||||
<navigator open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''" url='/pages/order_addcart/order_addcart'
|
||||
hover-class="none">
|
||||
<navigator open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''"
|
||||
url='/pages/order_addcart/order_addcart' hover-class="none">
|
||||
<view class='iconfont icon-gouwuche1'>
|
||||
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
|
||||
</view>
|
||||
@ -295,23 +323,26 @@
|
||||
<button v-if="storeInfo.type != 1" class='joinCart bnts' form-type="submit">加入购物车</button>
|
||||
</form>
|
||||
<form @submit="goBuy" report-submit='true' v-if="attr.productSelect">
|
||||
<button class='buy bnts' :class="storeInfo.type == 1 ? 'virtual_buy' : ''" form-type="submit" :disabled="attr.productSelect.stock == 0">立即购买</button>
|
||||
<button class='buy bnts' :class="storeInfo.type == 1 ? 'virtual_buy' : ''" form-type="submit"
|
||||
:disabled="attr.productSelect.stock == 0">立即购买</button>
|
||||
</form>
|
||||
</view>
|
||||
<view v-else class='bnt acea-row skeleton-rect'>
|
||||
<form report-submit='true'>
|
||||
<button v-if="arrival_notice" class='buy bnts sold_out' form-type="submit" @click="arrivalNotice">到货通知</button>
|
||||
<button v-if="arrival_notice" class='buy bnts sold_out' form-type="submit"
|
||||
@click="arrivalNotice">到货通知</button>
|
||||
<button v-else class='buy bnts sold_out' form-type="submit" disabled>商品已售罄</button>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="sharePacket.max&&sharePacket.max>0">
|
||||
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"
|
||||
:showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
|
||||
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
|
||||
@closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus"></shareRedPackets>
|
||||
</block>
|
||||
<!-- 组件 -->
|
||||
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
|
||||
@attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window' :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow>
|
||||
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
|
||||
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'
|
||||
:maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow>
|
||||
<block v-if="coupon.coupon">
|
||||
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons"
|
||||
@ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
|
||||
@ -320,13 +351,15 @@
|
||||
<!-- 分享按钮 -->
|
||||
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
||||
<!-- #ifndef MP -->
|
||||
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' v-if="weixinStatus === true" @click="H5ShareBox = true">
|
||||
<button class="item" :class="weixinStatus ? 'item3' : ''" hover-class='none' v-if="weixinStatus === true"
|
||||
@click="H5ShareBox = true">
|
||||
<view class="iconfont icon-weixin3"></view>
|
||||
<view class="">发送给朋友</view>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item" :class="weixinStatus ? 'item3' : ''" open-type="share" hover-class='none' @click="goFriend">
|
||||
<button class="item" :class="weixinStatus ? 'item3' : ''" open-type="share" hover-class='none'
|
||||
@click="goFriend">
|
||||
<view class="iconfont icon-weixin3"></view>
|
||||
<view class="">发送给朋友</view>
|
||||
</button>
|
||||
@ -378,15 +411,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import { getconfig } from '@/api/public.js';
|
||||
import { arrivalSubscribe } from '@/utils/SubscribeMessage.js';
|
||||
@ -951,6 +975,7 @@
|
||||
});
|
||||
let that = this;
|
||||
const data = { product_type: this.product_type }
|
||||
console.log('data', data);
|
||||
getProductDetail(that.id, data).then(res => {
|
||||
uni.hideLoading();
|
||||
let storeInfo = res.data;
|
||||
|
@ -219,10 +219,7 @@
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
|
@ -9,6 +9,19 @@
|
||||
</block>
|
||||
</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">
|
||||
<view class="edit_goods_box">
|
||||
<view class="edit_name flex_a_c edit_name_no">
|
||||
@ -38,7 +51,7 @@
|
||||
<view class="edit_goods_btn">
|
||||
<u-button type="error" text="取消" class="edit_btn" @click="searchGoodsShow=false">
|
||||
</u-button>
|
||||
<u-button type="primary" text="保存" class="edit_btn" @click="searchGoodsClose">
|
||||
<u-button type="primary" text="搜索" class="edit_btn" @click="searchGoodsClose">
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
@ -73,7 +86,8 @@
|
||||
editGoodsShow: false, // 扫码修改商品信息
|
||||
mer_id: '',
|
||||
searchGoodsShow: true,
|
||||
searchGoodsName: ''
|
||||
searchGoodsName: '',
|
||||
goods: []
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@ -91,6 +105,7 @@
|
||||
}
|
||||
const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err))
|
||||
console.log('data', data);
|
||||
this.goods = data.list
|
||||
this.searchGoodsShow = false
|
||||
},
|
||||
async editGoodsClose() {
|
||||
@ -161,6 +176,30 @@
|
||||
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 {
|
||||
width: 336.84rpx;
|
||||
height: 189.47rpx;
|
||||
|
@ -72,8 +72,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
class="pro-item" v-for="(itemn,indexn) in item.recommend.slice(0,3)" :key='indexn'>
|
||||
<navigator :url="`/pages/goods_details/index?id=${itemn.product_id}&product_type=${product_type}`"
|
||||
hover-class="none" class="pro-item" v-for="(itemn,indexn) in item.recommend.slice(0,3)" :key='indexn'>
|
||||
<view class="picture">
|
||||
<easy-loadimage mode="widthFix" :image-src="itemn.image"></easy-loadimage>
|
||||
<view v-if="itemn.border_pic" :style="{ backgroundImage: `url(${itemn.border_pic})` }"
|
||||
@ -269,9 +269,11 @@
|
||||
count: 0,
|
||||
storeTypeArr: [], //店铺类型
|
||||
merList: [], //商户分类
|
||||
product_type: 0
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.product_type = options.product_type ?? 0
|
||||
this.sotreParam.street_id = options.street_id
|
||||
this.sotreParam.type_id = options.type_id
|
||||
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<view class="area_container">
|
||||
<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"
|
||||
class="manage_btn">管理</navigator>
|
||||
<view class="area_container_title_name">选择店铺分类</view>
|
||||
<view class="area_container_title_close" @click="close"><text class="iconfont" ></text></view>
|
||||
<view class="area_container_title_close" @click="close"><text class="iconfont"></text></view>
|
||||
</view>
|
||||
<view class="area_container_content">
|
||||
<view class="selectList_con">
|
||||
@ -13,10 +14,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="selectList_tap">
|
||||
<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" v-for="(item, index) in tapList" :key="index"
|
||||
@click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
|
||||
{{ item.label }}
|
||||
</view>
|
||||
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem" :class="{ selectTap: selectTap == -1 }">请选择</view>
|
||||
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
|
||||
:class="{ selectTap: selectTap == -1 }">请选择</view>
|
||||
</view>
|
||||
<view class="selectList_area">
|
||||
<scroll-view scroll-y="true" class="scroll">
|
||||
@ -26,29 +29,31 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="handle"><view class="handle_button" @click="handleGetSelectArea">确定</view></view>
|
||||
<view class="handle">
|
||||
<view class="handle_button" @click="handleGetSelectArea">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { serialize, Toast } from '../../../libs/uniApi.js';
|
||||
export default {
|
||||
props:{
|
||||
import { serialize, Toast } from '../../../libs/uniApi.js';
|
||||
export default {
|
||||
props: {
|
||||
allReadySelect: {
|
||||
type: Array,
|
||||
default:() => {
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
classifiedData: {
|
||||
type: Array,
|
||||
default:() => {
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
mer_id: {
|
||||
type: Number,
|
||||
type: Number || String,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
@ -116,7 +121,7 @@ export default {
|
||||
},
|
||||
// 选择tap
|
||||
async selectTapItem(item, index) {
|
||||
if(index == 0) {
|
||||
if (index == 0) {
|
||||
this.areaList = serialize(this.classifiedData);
|
||||
this.selectTap = item.value; // 添加边框
|
||||
this.selectTapIndex = index; // 用于判断选择子集时,是否需要删除后面得选项
|
||||
@ -184,11 +189,11 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.area_container {
|
||||
.area_container {
|
||||
background: #fff;
|
||||
border-radius: 16px 16px 0px 0px;
|
||||
|
||||
@ -196,12 +201,14 @@ export default {
|
||||
text-align: center;
|
||||
padding: 36rpx 30rpx 46rpx 0;
|
||||
position: relative;
|
||||
|
||||
&_close {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
.manage_btn{
|
||||
|
||||
.manage_btn {
|
||||
font-weight: normal;
|
||||
color: #e93323;
|
||||
font-size: 24rpx;
|
||||
@ -218,6 +225,7 @@ export default {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
&_item {
|
||||
padding: 3rpx 10rpx;
|
||||
background: #fff6f5;
|
||||
@ -227,11 +235,13 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
> span:nth-child(1) {
|
||||
|
||||
>span:nth-child(1) {
|
||||
display: inline-block;
|
||||
margin-right: 14rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
@ -241,11 +251,13 @@ export default {
|
||||
.selectList_tap {
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
|
||||
&_item {
|
||||
font-size: 28rpx;
|
||||
margin-right: 60rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.selectTap {
|
||||
color: #e93323;
|
||||
border-bottom: 3rpx solid #e93323;
|
||||
@ -263,6 +275,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
|
||||
.iconfont {
|
||||
color: #e93323;
|
||||
font-size: 40rpx;
|
||||
@ -276,6 +289,7 @@ export default {
|
||||
|
||||
.handle {
|
||||
height: 126rpx;
|
||||
|
||||
&_button {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
@ -289,5 +303,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -119,25 +119,29 @@
|
||||
getArticleList(19).then(res => {
|
||||
this.recoList = res.data.list
|
||||
})
|
||||
console.log("位置", JSON.parse(this.location));
|
||||
this.getTownAndStoreId()
|
||||
},
|
||||
onShow() {},
|
||||
computed: mapGetters(['location']),
|
||||
watch: {
|
||||
location: {
|
||||
handler(newVal, oldVal) {
|
||||
this.street_id = newVal.address_reference.town.id
|
||||
this.getCloudShopMerId(this.street_id)
|
||||
this.town = newVal.address_component.street ?? ''
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
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 ?? ''
|
||||
},
|
||||
onShow() {},
|
||||
computed: mapGetters(['location']),
|
||||
watch: {
|
||||
location(newVal, oldVal) {
|
||||
console.log('newVal', newVal);
|
||||
return newVal
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectPlce(e) {
|
||||
console.log("e", e);
|
||||
this.street_id = e.value[1].code
|
||||
this.store_id = e.value[1].id
|
||||
this.town = e.value[1].name
|
||||
this.getCloudShopMerId(e.value[1].code)
|
||||
},
|
||||
|
@ -7,17 +7,10 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
getUserInfo
|
||||
} from "../../api/user.js";
|
||||
import {
|
||||
LOGIN_STATUS,
|
||||
UID
|
||||
} from '../../config/cache';
|
||||
import { getUserInfo } from "../../api/user.js";
|
||||
import { LOGIN_STATUS, UID } from '../../config/cache';
|
||||
import Cache from '../../utils/cache';
|
||||
import {
|
||||
USER_INFO
|
||||
} from '../../config/cache';
|
||||
import { USER_INFO } from '../../config/cache';
|
||||
|
||||
const state = {
|
||||
location: Cache.get('LOCATION_DATA') || {},
|
||||
@ -36,7 +29,7 @@ const state = {
|
||||
|
||||
const mutations = {
|
||||
setLocation(state, data) {
|
||||
state.loca = data
|
||||
state.location = data
|
||||
Cache.set('LOCATION_DATA', data);
|
||||
},
|
||||
LOGIN(state, opt) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user