| | |
| | | <template> |
| | | <view> |
| | | <!-- #ifdef MP-WEIXIN || APP-PLUS --> |
| | | <view class="shop_top" :class="{'topbg':scrollViewTop>10}"> |
| | | <view class="shop_top" :class="{'topbg':scrollViewTop>10}" :style="'background-color: '+bgcolor+';'"> |
| | | <view class="ww100" :style="'height:'+topBarTop()+'px;'"></view> |
| | | <view class="tc d-s-c head_top_box" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'"> |
| | | <view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view> |
| | |
| | | <view class="wx-top-right"></view> |
| | | </view> |
| | | </view> |
| | | <view class="top_head pr" :style="'background-color: '+bgcolor+';'"> |
| | | <!-- #ifndef MP-WEIXIN--> |
| | | <view class="state_top"></view> |
| | | <!-- #endif --> |
| | | <view class="head_top" :style="'height:'+topBarTop()+'px;'"></view> |
| | | <view class="d-b-c" :class="index_open_city==1?'open_city':''" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'"> |
| | | </view> |
| | | <view class="nuter" v-if="openCategory.open"> |
| | | <navBar style="width: 100%;" :color='openCategory.color' @currentIndex="setIndex" :currentI="thisindex" |
| | | :navList="category_list"> |
| | | </navBar> |
| | | </view> |
| | | <view style="height: 20rpx;" v-else></view> |
| | | </view> |
| | | <view class="top_bg" :style="'background-color: '+bgcolor+';'"> |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | <scroll-view v-if="" scroll-y="true" :style="'height:' + scrollviewHigh + 'px;'" class="scroll-Y pr bg-f2" |
| | | lower-threshold="50" @scrolltolower="scrolltolowerFunc" @scroll="scrollChnage"> |
| | | <view class="shop_head"> |
| | | <!-- #ifdef MP-WEIXIN || APP-PLUS --> |
| | | <view class="ww100" :style="'height:'+topBarTop()+'px;'"></view> |
| | | <view class="ww100" :style="'height:'+topBarHeight()+'px;'"></view> |
| | | <!-- #endif --> |
| | | <image class="bg_topimg" src="../../static/background_top.png" mode=""></image> |
| | | <view class="shop_head_info"> |
| | | <view class="shop_list_body_item_shop"> |
| | | <view class="shop_list_body_item_shop_logo"> |
| | | <image :src="shop_info.logos" mode=""></image> |
| | | </view> |
| | | <view class="shop_list_body_item_shop_info"> |
| | | <view class="f34 white fb title">{{shop_info.store_name}}</view> |
| | | <view class="f24 white d-s-c"> |
| | | <!-- <view>主营:{{shop_info.category_name}}</view> --> |
| | | <view class="pr20"> |
| | | <text class="icon iconfont icon-htmal5icon24"></text> {{shop_info.server_score}}分 |
| | | </view> |
| | | <view v-if="shop_info.fav_count>0">{{shop_info.fav_count}}人关注</view> |
| | | </view> |
| | | <!-- <view class="f26 d-s-c"> |
| | | <view class="flex-1"> |
| | | <text class="icon iconfont icon-dizhi"></text> |
| | | {{shop_info.address}} |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="shop_list_body_item_shop_others"> |
| | | <view v-if="isfollow == 0" class="collect_btn" @click="guanzhu()"><text |
| | | class="icon iconfont icon-guanzhu1 mr10"></text>关注</view> |
| | | <view v-if="isfollow == 1" class="collect_btn collected" @click="guanzhu()">已关注</view> |
| | | </view> |
| | | </view> |
| | | <view class="shop-notice gray mt10 text-ellipsis">公告:{{shop_info.notice}}</view> |
| | | </view> |
| | | </view> |
| | | <view :class="{'tab-fixed':isFixed}" :style="isFixed?'top:' + topHeight + 'px;':''"> |
| | | <!-- 导航栏 --> |
| | | <view class="inner-tab tab-top"> |
| | | <view :class="nav_type==4?'item active':'item'" @click="changeNavType(4)"> |
| | | <view class="box">简介</view> |
| | | </view> |
| | | <!-- <view :class="nav_type==99?'item active':'item'" @click="changeNavType(99)"> |
| | | <view class="box">精选</view> |
| | | </view> --> |
| | | <view :class="nav_type==0?'item active':'item'" @click="changeNavType(0)"> |
| | | <view class="box">商品</view> |
| | | </view> |
| | | <view :class="nav_type==5?'item active':'item'" @click="changeNavType(5)"> |
| | | <view class="box">活动列表</view> |
| | | </view> |
| | | <!-- <view :class="nav_type==2?'item active':'item'" @click="changeNavType(2)"> |
| | | <view class="box">优惠券</view> |
| | | </view> --> |
| | | <view :class="nav_type==1?'item active':'item'" @click="changeNavType(1)" |
| | | v-if="is_record==1&&is_open==1"> |
| | | <view class="box">直播</view> |
| | | </view> |
| | | <view :class="nav_type==6?'item active':'item'" @click="changeNavType(6)"> |
| | | <view class="box">案例</view> |
| | | </view> |
| | | <!-- <view :class="nav_type==3?'item active':'item'" @click="changeNavType(3)"> |
| | | <view class="box">商家</view> |
| | | </view> --> |
| | | </view> |
| | | <!-- 导航栏 --> |
| | | </view> |
| | | <view class="ww100" style="height: 80rpx;" v-if="isFixed"></view> |
| | | <view class="shop" :class="nav_type==0?'shop-product':''" v-if="shop_info!=''" |
| | | :style="'min-height:' + scrollviewHigh + 'px;'"> |
| | | <view class="shop_head_banner pr bg-white" v-if="adList!= ''"> |
| | | <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000"> |
| | | <swiper-item class="swiper-item" v-for="(item,index) in adList" :key="index"> |
| | | <image :src="item.image.file_path" mode=""></image> |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
| | | <view v-if="nav_type==4"> |
| | | <view class="shop_info_description" v-html="shop_info.description"> |
| | | |
| | | </view> |
| | | </view> |
| | | <view v-if="nav_type==6"> |
| | | <scroll-view scroll-y="true" class="scroll-Y" lower-threshold="50" |
| | | @scrolltolower="scrolltolowerFunc"> |
| | | <view class="article-list"> |
| | | <view class="item" v-for="(item, index) in articlelistData" :key="index" |
| | | @click="gotoDetail(item.article_id)"> |
| | | <view class="info"> |
| | | <view class="title">{{ item.article_title }}</view> |
| | | <view class="summary">{{ item.dec }}</view> |
| | | <view class="datatime d-s-c"> |
| | | <text>{{ item.create_time }}</text> |
| | | <text class="icon iconfont icon-chakan ml30"></text> |
| | | <text class="ml10">{{ item.actual_views }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="pic" v-if="item.image != null"> |
| | | <image :src="item.image.file_path" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 没有记录 --> |
| | | <view class="d-c-c p30" v-if="listData.length == 0 && !loading"> |
| | | <text class="iconfont icon-wushuju"></text> |
| | | <text class="cont">亲,暂无相关记录哦</text> |
| | | </view> |
| | | <uni-load-more v-else :loadingType="loadingType"></uni-load-more> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- 精选 --> |
| | | <view v-if="nav_type==99"> |
| | | <!-- <view class="bg-white pt30"> |
| | | <view class="card-box d-b-c" v-if="card_num" @click.stop="gotoPage('/pages/user/card/list')"> |
| | | <view class="d-s-c"><image class="v-log" src="/static/icon/log-vip.png" mode=""></image>领取会员卡,各种优惠享不停</view> |
| | | <view class="btn-card-box">立即领取<text class="icon iconfont icon-jiantou"></text></view> |
| | | </view> |
| | | </view> --> |
| | | <view class="shop-coupon bg-white" v-if="listData.length > 0"> |
| | | <scroll-view scroll-x="true"> |
| | | <view class="swiper swiper-list"> |
| | | <view class="" v-for="(item, index) in listData" :key="index" v-if="index<=5"> |
| | | <view class="coupon-item" :class="'bg-' + item.color.text"> |
| | | <view class="side-line left-side-line"><text class="round" |
| | | v-for="(round, num) in 8" :key="num"></text></view> |
| | | <view class="side-line right-side-line"><text class="round" |
| | | v-for="(round, num) in 8" :key="num"></text></view> |
| | | <view class="left-type d-s-c"> |
| | | <template v-if="item.coupon_type.value == 10"> |
| | | <text class="f20">¥</text> |
| | | <text class="f26 fb">{{ item.reduce_price }}</text> |
| | | </template> |
| | | <template v-if="item.coupon_type.value == 20"> |
| | | <text class="f24 fb">{{ item.discount }}</text> |
| | | <text class="f20">折</text> |
| | | </template> |
| | | </view> |
| | | <view class="center-content pr"> |
| | | <view class="content-top"> |
| | | <text class="f22 text-ellipsis">{{ item.name }}</text> |
| | | </view> |
| | | <view class="content-bottom f20"> |
| | | {{item.price_text}} |
| | | </view> |
| | | </view> |
| | | <!--领取--> |
| | | <view v-if="item.is_get == 0" class="right-receive d-c-c" |
| | | @click="receiveCoupon(index)"> |
| | | 领 |
| | | </view> |
| | | <view v-else class="right-receive no-receive d-c-c"> |
| | | 已领 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- 商品导航栏 --> |
| | | <view class="inner-tab tab-product tab-index" |
| | | :style="tabIndexFixed?'position:fixed;width:100%;top:' + (topHeight*1+34) + 'px;':''"> |
| | | <view :class="type_active=='all'?'item active':'item'" @click="tabTypeFunc('all')"> |
| | | <view class="box">推荐</view> |
| | | </view> |
| | | <view :class="type_active=='sales'?'item active':'item'" @click="tabTypeFunc('sales')"> |
| | | <view class="box">销量</view> |
| | | </view> |
| | | <view :class="type_active=='new'?'item active':'item'" @click="tabTypeFunc('new')"> |
| | | <view class="box">新品</view> |
| | | </view> |
| | | <view :class="type_active=='price'?'item active':'item'" @click="tabTypeFunc('price')"> |
| | | <view class="box"> |
| | | <text>价格</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="ww100" style="height: 80rpx;" v-if="tabIndexFixed"></view> |
| | | <!-- 商品导航栏 --> |
| | | <view class="shop_body2"> |
| | | <view class="shop_body_t_item" v-for="(item,index) in product_list" :key="index" |
| | | @click="goto_product(item.product_id)"> |
| | | <image :src="item.product_image" mode=""></image> |
| | | <view class="shop_body_t_item_info"> |
| | | <view class="shop_body_t_item_info_title h1">{{item.product_name}}</view> |
| | | <view class="shop_body_t_item_info_price"> |
| | | <view class="f24 redF6">¥<text class="h1">{{item.product_price}}</text></view> |
| | | <view class="f24 huaxianjia">¥<text class="h3">{{item.line_price}}</text></view> |
| | | </view> |
| | | <view class="shop_body_t_item_info_others h3"> |
| | | <view class="shop_body_t_item_info_others_sales">累计成交:{{item.product_sales}}笔</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 商品导航栏 --> |
| | | <view class="inner-tab tab-product tab-product-list" v-if="nav_type==0" |
| | | :style="tabProductFixed?'position:fixed;width:100%;top:' + (topHeight*1+34) + 'px;':''"> |
| | | <view :class="type_active=='all'?'item active':'item'" @click="tabTypeFunc('all')"> |
| | | <view class="box">综合</view> |
| | | </view> |
| | | <view :class="type_active=='sales'?'item active':'item'" @click="tabTypeFunc('sales')"> |
| | | <view class="box">销量</view> |
| | | </view> |
| | | <view :class="type_active=='price'?'item active':'item'" @click="tabTypeFunc('price')"> |
| | | <view class="box"> |
| | | <text>价格</text> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="box"> |
| | | <image @click="select_type()" |
| | | :src="isLieBiao == true?'/static/shop/liebiao.png':'/static/shop/tubiao.png'"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="ww100" style="height: 80rpx;" v-if="tabProductFixed"></view> |
| | | <!-- 商品导航栏 --> |
| | | <view class="shop_body" v-if="isLieBiao ==true&&nav_type==0"> |
| | | <view class="shop_body_l_item" :class="index==listData.length-1?'noborder':''" |
| | | v-for="(item,index) in product_list" :key="index" @click="goto_product(item.product_id)"> |
| | | <view> |
| | | <image :src="item.product_image" mode=""></image> |
| | | </view> |
| | | <view class="shop_body_l_item_info"> |
| | | <view class="shop_body_l_item_info_title gray3 f32">{{item.product_name}}</view> |
| | | <view class="d-b-c pb10"> |
| | | <view class="shop_body_l_item_info_price"> |
| | | <view class="f24 shop_red">¥<text class="f32 fb">{{item.product_price}}</text> |
| | | </view> |
| | | <!-- <view class="h4 huaxianjia">¥<text class="h3">{{item.line_price}}</text></view> --> |
| | | </view> |
| | | <view class="shop_body_l_item_info_others f22"> |
| | | <!-- <view class="shop_body_l_item_info_others_sales">累计成交:{{item.product_sales}}笔</view> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="shop_body2" v-if="isLieBiao ==false&&nav_type==0"> |
| | | <view class="shop_body_t_item" v-for="(item,index) in product_list" :key="index" |
| | | @click="goto_product(item.product_id)"> |
| | | <image :src="item.product_image" mode=""></image> |
| | | <view class="shop_body_t_item_info"> |
| | | <view class="shop_body_t_item_info_title h1">{{item.product_name}}</view> |
| | | <view class="shop_body_t_item_info_price"> |
| | | <view class="f24 redF6">¥<text class="h1">{{item.product_price}}</text></view> |
| | | <view class="f24 huaxianjia">¥<text class="h3">{{item.line_price}}</text></view> |
| | | </view> |
| | | <view class="shop_body_t_item_info_others h3"> |
| | | <view class="shop_body_t_item_info_others_sales">累计成交:{{item.product_sales}}笔</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 直播 --> |
| | | <view v-if="nav_type==1"> |
| | | <view class="live_list" v-if="liveList.length>0"> |
| | | <view v-for="(liveitem,liveindex) in liveList" :key="liveindex" class="live_item" |
| | | @click="toRoom(liveitem)"> |
| | | <view v-if="liveitem.record_url!=''" class="record">可回放</view> |
| | | <view v-if="liveitem.record_url==''" class="record_off">回放生成中</view> |
| | | <view class="live_img"> |
| | | <image :src="liveitem.share.file_path" mode=""></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="ww100" v-else> |
| | | <view class="f30 gray6 tc mt50 pt20">暂无直播间</view> |
| | | </view> |
| | | </view> |
| | | <!-- 客服 --> |
| | | <view v-if="nav_type==3"> |
| | | <view class="d-s-s d-c p-0-30 mt20 mpservice-wrap" v-if="!isloding"> |
| | | <view class="noDatamodel" |
| | | v-if="dataModel==null||(dataModel.qq==''&&dataModel.wechat==''&&dataModel.phone=='')"> |
| | | 该商家尚未设置客服</view> |
| | | <template v-if="dataModel!=null"> |
| | | <view v-if="dataModel.qq!=''" class="d-b-c p-20-0 f30 ww100 border-b" |
| | | @click="copyQQ(dataModel.qq)"> |
| | | <text class="gray9" style="width: 140rpx;"><text |
| | | class='icon iconfont icon-qq'></text></text> |
| | | <text class="p-0-30 flex-1">{{dataModel.qq}}</text> |
| | | <text class="blue">复制</text> |
| | | </view> |
| | | <view v-if="dataModel.wechat!=''" class="d-b-c p-20-0 f30 ww100 border-b" |
| | | @click="copyQQ(dataModel.qq)"> |
| | | <text class="gray9" style="width: 140rpx;"><text |
| | | class='icon iconfont icon-weixin'></text></text> |
| | | <text class="p-0-30 flex-1">{{dataModel.wechat}}</text> |
| | | <text class="blue">复制</text> |
| | | </view> |
| | | <view v-if="dataModel.phone!=''" class="d-b-c p-20-0 f30 ww100" |
| | | @click="callPhone(dataModel.phone)"> |
| | | <text class="gray9" style="width: 140rpx;"><text |
| | | class='icon iconfont icon-002dianhua'></text></text> |
| | | <text class="p-0-30 flex-1">{{dataModel.phone}}</text> |
| | | <text class="blue">拨打</text> |
| | | </view> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | <!-- 优惠券 --> |
| | | <view class="coupon" v-if="listData.length>=1&&nav_type==2"> |
| | | <view class="diy-coupon"> |
| | | <view class=" mt20 mb20" v-for="(item, index) in listData" :key="index"> |
| | | <view class="coupon-item" :class="'bg-' + item.color.text"> |
| | | <view class="side-line left-side-line"><text class="round" v-for="(round, num) in 8" |
| | | :key="num"></text></view> |
| | | <view class="side-line right-side-line"><text class="round" v-for="(round, num) in 8" |
| | | :key="num"></text></view> |
| | | <view class="left-type d-c-c">{{ item.coupon_type.text }}</view> |
| | | <view class="center-content pr"> |
| | | <view class="content-top"> |
| | | <template v-if="item.coupon_type.value == 10"> |
| | | <text class="f22">¥</text> |
| | | <text class="f50 fb">{{ item.reduce_price }}</text> |
| | | <template v-if="item.total_num >= 0"> |
| | | <text class="ml10">仅剩{{ item.total_num }}张</text> |
| | | </template> |
| | | <template v-else> |
| | | <text class="ml10">不限数量</text> |
| | | </template> |
| | | </template> |
| | | <template v-if="item.coupon_type.value == 20"> |
| | | <text class="f50 fb">{{ item.discount }}</text> |
| | | <text>折</text> |
| | | </template> |
| | | </view> |
| | | <view class="content-bottom"> |
| | | <text class="f24">{{ item.name }}</text> |
| | | </view> |
| | | <view class="content-datatime"> |
| | | <template v-if="item.expire_type == 20"> |
| | | 有效期:{{ item.start_time.text }} 至 {{ item.end_time.text }} |
| | | </template> |
| | | <template v-if="item.expire_type == 10"> |
| | | 有效期:领取后{{ item.expire_day }}天有效 |
| | | </template> |
| | | </view> |
| | | </view> |
| | | <!--领取--> |
| | | <view v-if="item.is_get == 0" class="right-receive d-c-c" @click="receiveCoupon(index)"> |
| | | 立即领取 |
| | | </view> |
| | | <view v-else class="right-receive no-receive d-c-c"> |
| | | 已领取 |
| | | </view> |
| | | </view> |
| | | <view class="range_item d-b-c" v-if="item.apply_range == 20" |
| | | @click.stop="gotoPage('/pages/coupon/detail?coupon_id='+ item.coupon_id)"> |
| | | <view>限购店铺部分商品</view> |
| | | <view><text class="icon iconfont icon-jiantou" |
| | | style="color: #999999; font-size: 24rpx;"></text></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 优惠券 --> |
| | | </view> |
| | | <!-- 商品列表 --> |
| | | <view v-if="nav_type==0 || nav_type==99"> |
| | | <view class="d-c-c p30" v-if="product_list.length==0 && !loading"> |
| | | <text class="iconfont icon-wushuju"></text> |
| | | <text class="cont">亲,暂无相关记录哦</text> |
| | | </view> |
| | | <uni-load-more v-else :loadingType="loadingType"></uni-load-more> |
| | | <view class="" style="width: 100%;height: 100rpx;"> |
| | | |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 底部导航 --> |
| | | <!-- <view class="d-a-c nav_bottom"> |
| | | <view :class="nav_type==0?'active':''" @click="nav_type=0"> |
| | | <view class="icon iconfont icon-Homehomepagemenu"></view> |
| | | <view>首页</view> |
| | | </view> |
| | | <view v-if="is_record==1&&is_open==1" :class="nav_type==1?'active':''" @click="nav_type=1"> |
| | | <view class="icon iconfont icon-dianpu1"></view> |
| | | <view>直播</view> |
| | | </view> |
| | | <view v-if="listData.length>0" :class="nav_type==2?'active':''" @click="nav_type=2"> |
| | | <view class="icon iconfont icon-quan"></view> |
| | | <view>优惠券</view> |
| | | </view> |
| | | <view v-if="service_open" :class="nav_type==3?'active':''" @click="toSevice"> |
| | | <view class="icon iconfont icon-kefu2"></view> |
| | | <view>客服</view> |
| | | </view> |
| | | </view> --> |
| | | <diy style="position: relative;" :diyItems="items" :city_supplier_ids="city_supplier_ids" |
| | | :index_open_city="index_open_city"></diy> |
| | | <tabBar :vars="vars"></tabBar> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import uniLoadMore from "@/components/uni-load-more.vue"; |
| | | import diy from '@/components/diy/diy.vue'; |
| | | import tabBar from "@/components/shoptabbar/footTabbar.vue" |
| | | export default { |
| | | components: { |
| | | uniLoadMore |
| | | uniLoadMore, |
| | | tabBar |
| | | }, |
| | | data() { |
| | | return { |
| | | bgcolor:'', |
| | | longitude:'', |
| | | latitude:'', |
| | | isLieBiao: true, |
| | | shop_info: '', //店铺信息 |
| | | articlelistData: [], |
| | |
| | | tabProductTop: 0, |
| | | tabProductFixed: false, |
| | | card_num: 0, |
| | | store_id: '' |
| | | store_id: '', |
| | | category_list: [], |
| | | product_list: [], |
| | | city_supplier_ids:[], |
| | | index_cityname:'', |
| | | index_open_city:0, |
| | | openCategory: { |
| | | color: "#000000", |
| | | open: 0 |
| | | }, |
| | | items: [], |
| | | url:'', |
| | | toplogo:'', |
| | | vars:{} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | onLoad(option) { |
| | | let self = this; |
| | | self.GetStatusBarHeight(); |
| | | self.shop_supplier_id = option.shop_supplier_id; |
| | | if( option.shop_supplier_id){ |
| | | uni.setStorageSync('shop_supplier_id',option.shop_supplier_id) |
| | | } |
| | | self.shop_supplier_id = option.shop_supplier_id||uni.getStorageSync('shop_supplier_id'); |
| | | //#ifdef H5 |
| | | if (this.isWeixin()) { |
| | | this.url = window.location.href; |
| | | } |
| | | //#endif |
| | | }, |
| | | onShow() { |
| | | if (this.store_id > 0) { |
| | |
| | | methods: { |
| | | changeNavType(e) { |
| | | this.nav_type = e; |
| | | this.page=1; |
| | | this.page = 1; |
| | | if (e == 0) { |
| | | this.initTabProduct(); |
| | | }else if(e==6){ |
| | | } else if (e == 6) { |
| | | this.articleGetData(); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | |
| | | //获取数据列表 |
| | | getData() { |
| | | /* getData() { |
| | | let self = this; |
| | | self.loading = true; |
| | | self._post('supplier.index/index', { |
| | |
| | | }) |
| | | self.getservice(); |
| | | }) |
| | | }, |
| | | }, */ |
| | | |
| | | //选择图标模式或者列表模式 true 为列表模式 false 为图表模式 |
| | | select_type() { |
| | |
| | | /*跳转文章详情*/ |
| | | gotoDetail(e) { |
| | | this.gotoPage('/pages/article/detail/detail?article_id=' + e); |
| | | } |
| | | }, |
| | | /*获取首页分类*/ |
| | | getData() { |
| | | let self = this; |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | self._get('supplier.page/index', { |
| | | url: self.url, |
| | | longitude:self.longitude, |
| | | latitude:self.latitude, |
| | | shop_supplier_id: self.shop_supplier_id, |
| | | }, function(res) { |
| | | self.listData = res.data.list; |
| | | self.background = res.data.background; |
| | | self.items = res.data.items; |
| | | self.title_name = res.data.page.params.title; |
| | | self.bgcolor = res.data.page.style.titleBackgroundColor; |
| | | self.msgNum = res.data.msgNum; |
| | | self.toplogo = res.data.page.style.toplogo; |
| | | self.setPage(res.data.page); |
| | | self.title_type = res.data.page.params.title_type; |
| | | self.titleTextColor = res.data.page.style.titleTextColor; |
| | | self.openCategory = res.data.page.category; |
| | | self.vars = res.data.vars; |
| | | console.log(self.vars); |
| | | self.index_open_city=res.data.setting.store.index_open_city; |
| | | self.underline_price_show=res.data.setting.store.underline_price_show; |
| | | if(res.data.setting.store.index_open_city==1){ |
| | | self.getAddress(); |
| | | } |
| | | //弹出收藏 |
| | | // #ifdef MP-WEIXIN |
| | | let isFirst = uni.getStorageSync('isFirst'); |
| | | if (isFirst == '' && res.data.setting.collection.status == '1') { |
| | | self.is_collection = true; |
| | | uni.setStorageSync('isFirst', 1); |
| | | } |
| | | self.is_follow = res.data.setting.officia.status; |
| | | // #endif |
| | | // 首页推送 |
| | | let homepush_name = uni.getStorageSync('homepush_name'); |
| | | if (res.data.setting.homepush.is_open && homepush_name != res.data.setting.homepush.name) { |
| | | self.homepush_data = res.data.setting.homepush; |
| | | self.is_homepush = true; |
| | | self.is_homepush = true; |
| | | } |
| | | // 配置微信扫一扫参数 |
| | | //#ifdef H5 |
| | | if (self.url != '') { |
| | | self.jweixin = self.configWxScan(res.data.signPackage); |
| | | } |
| | | //#endif |
| | | uni.hideLoading(); |
| | | self.loadding = false; |
| | | uni.stopPullDownRefresh(); |
| | | }); |
| | | }, |
| | | /*设置页面*/ |
| | | setPage(page) { |
| | | |
| | | uni.setNavigationBarTitle({ |
| | | title: page.params.name |
| | | }); |
| | | |
| | | let colors = '#000000'; |
| | | if (page.style.titleTextColor == 'white') { |
| | | //字母要小写 |
| | | colors = '#ffffff' |
| | | } |
| | | uni.setNavigationBarColor({ |
| | | frontColor: colors, |
| | | backgroundColor: page.style.titleBackgroundColor |
| | | }) |
| | | uni.setStorageSync('page',page); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | font-size: 28rpx; |
| | | line-height: 2; |
| | | } |
| | | |
| | | |
| | | .article-list-wrap .type-list .tab-item { |
| | | padding: 0 30rpx; |
| | | font-size: 34rpx; |
| | |
| | | white-space: nowrap; |
| | | border-bottom: 4rpx solid #FFFFFF; |
| | | } |
| | | .article-list-wrap .type-list .tab-item.active{ |
| | | |
| | | .article-list-wrap .type-list .tab-item.active { |
| | | border-bottom: 4rpx solid; |
| | | @include border_color('border_color'); |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | |
| | | .article-list { |
| | | background: #ffffff; |
| | | } |
| | | |
| | | |
| | | .article-list .item { |
| | | padding: 30rpx; |
| | | display: flex; |
| | |
| | | align-items: center; |
| | | border-bottom: 1px solid #e3e3e3; |
| | | } |
| | | |
| | | |
| | | .article-list .item .info { |
| | | flex: 1; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | |
| | | .article-list .item .title { |
| | | font-size: 36rpx; |
| | | } |
| | | |
| | | |
| | | .article-list .item .summary { |
| | | margin-top: 20rpx; |
| | | font-size: 28rpx; |
| | | color: #999999; |
| | | } |
| | | |
| | | |
| | | .article-list .item .title, |
| | | .article-list .item .summary { |
| | | display: -webkit-box; |
| | |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | } |
| | | |
| | | |
| | | .article-list .item .pic { |
| | | padding-left: 30rpx; |
| | | } |
| | | |
| | | |
| | | .article-list .item .pic, |
| | | .article-list .item .pic image { |
| | | width: 160rpx; |
| | | height: 160rpx; |
| | | } |
| | | |
| | | |
| | | .article-list .item .datatime { |
| | | margin-top: 20rpx; |
| | | font-size: 24rpx; |