| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869 |
- <template>
- <view class="page-index" :class="{'bgf':navIndex >0}">
- <!-- #ifdef H5 -->
- <view class="header">
- <view class="serch-wrapper flex acea-row row-between-wrapper">
- <view v-if="logoUrl" class="logo">
- <image :src="logoUrl" mode=""></image>
- </view>
- <navigator url="/pages/columnGoods/goods_search/index" :class="logoUrl ? 'input' : 'uninput'" hover-class="none"><text class="iconfont icon-xiazai5"></text>
- 搜索商品</navigator>
- <navigator class="btn" url="/pages/chat/customer_list/index?type=0" hover-class="none">
- <view class="iconfont icon-xiaoxi"></view>
- <text class="iconnum bg-color-red" v-if="userInfo.total_unread">{{userInfo.total_unread}}</text>
- </navigator>
- </view>
-
- </view>
- <!-- #endif -->
- <!-- #ifdef MP -->
- <view class="mp-header">
- <view class="sys-head" view :style="{ height: statusBarHeight }"></view>
- <view class="serch-box" view style="height: 43px;">
- <view class="serch-wrapper flex">
- <view v-if="logoUrl" class="logo">
- <image :src="logoUrl" mode=""></image>
- </view>
- <navigator url="/pages/columnGoods/goods_search/index" :class="logoUrl ? 'input' : 'uninput'" hover-class="none"><text class="iconfont icon-xiazai5"></text>
- 搜索商品</navigator>
- </view>
- </view>
- </view>
- <!-- #endif -->
- <!-- 分类页 -->
- <view class="productList" :style="'margin-top:'+prodeuctTop+'px;'">
- <view class="sort acea-row" :class="sortList.length ? '' : 'no_pad'" :style="{marginTop:sortMarTop+'px'}">
- <navigator hover-class='none' :url="'/pages/columnGoods/goods_list/index?id='+item.store_category_id+'&title='+item.cate_name"
- class="item" v-for="(item,index) in sortList" :key="index">
- <view class="pictrue">
- <image :src="item.pic"></image>
- </view>
- <view class="text">{{item.cate_name}}</view>
- </navigator>
- <view class="item" @click="bindMore()" v-if="sortList.length">
- <view class="pictrues acea-row row-center-wrapper">
- <text class="iconfont icon-gengduo1"></text>
- </view>
- <view class="text" style="margin-top: 22rpx;">更多</view>
- </view>
- </view>
- <block v-if="sortProduct.length>0">
- <view class='list acea-row row-between-wrapper'>
- <navigator @tap="goDetails(item)" class='item' v-for="(item,index) in sortProduct"
- :key="index">
- <view class='pictrue'>
- <image :src='item.image'></image>
- </view>
- <view class='text'>
- <view class='name line1'><text v-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red">自营</text>
- <span v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</span>
- {{item.store_name}}</view>
- <view class="acea-row row-middle">
- <view class='money font-color-red'>¥<text class='num'>{{item.price}}</text></view>
- <text class="coupon font-color-red" v-if="item.issetCoupon">领券</text>
- </view>
- </view>
- </navigator>
- <view class='loadingicon acea-row row-center-wrapper' v-if='sortProduct.length > 0 || sortProductLoading'>
- <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
- </view>
- </view>
- </block>
- <block v-if="sortProduct.length == 0">
- <view class="noCommodity">
- <view class='pictrue' style="margin: 0 auto;">
- <image src='/static/images/noShopper.png'></image>
- </view>
- <recommend :hostProduct="hostProduct"></recommend>
- </view>
- </block>
- </view>
- <!-- #ifdef MP -->
- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize>
- <!-- #endif -->
- </view>
- </template>
- <script>
- var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
- let app = getApp();
- import {
- getUserInfo
- } from '@/api/user.js';
- import {
- getIndexData,
- getCoupons,
- getPower
- } from '@/api/api.js';
- // #ifdef MP
- import {
- getTemlIds
- } from '@/api/api.js';
- import {
- SUBSCRIBE_MESSAGE,
- TIPS_KEY
- } from '@/config/cache';
- // import {
- // getLiveList
- // } from '@/api/store.js';
- // #endif
- import {
- getShare,
- follow,
- getconfig,
- } from '@/api/public.js';
- import {
- getSeckillIndexTime
- } from '@/api/activity.js';
- import goodList from '@/components/goodList';
- import promotionGood from '@/components/promotionGood';
- import couponWindow from '@/components/couponWindow';
- import {
- goShopDetail
- } from '@/libs/order.js'
- import {
- mapGetters,
- mapMutations
- } from "vuex";
- // import { mapState, mapMutations } from 'vuex';
- import tabNav from '@/components/tabNav.vue'
- import countDown from '@/components/countDown'
- import {
- getCategoryList,
- getProductslist,
- getProductHot,
- storeCategory,
- storeMerchantList,
- } from '@/api/store.js';
- import {
- getPresellList,
- getSeckillList,
- getAssistList,
- initiateAssistApi,
- assistUserData,
- getCombinationList
- } from '@/api/activity.js';
- import {
- openBargainSubscribe
- } from '@/utils/SubscribeMessage.js';
- import {
- setVisit,
- spread
- } from '@/api/user.js'
- import recommend from '@/components/recommend';
- // #ifdef MP
- import authorize from '@/components/Authorize';
- // #endif
- import {
- silenceBindingSpread
- } from '@/utils';
- import history from "@/mixins/history";
- import {
- toLogin
- } from '@/libs/login.js';
- import shareScence from "@/libs/spread";
- export default {
- computed: mapGetters(['isLogin', 'uid']),
- mixins: [history],
- components: {
- tabNav,
- goodList,
- promotionGood,
- couponWindow,
- countDown,
- recommend,
- // #ifdef MP
- authorize
- // #endif
- },
- data() {
- return {
- countDownHour: "00",
- countDownMinute: "00",
- countDownSecond: "00",
- // datatime: '',
- ad: '',
- userInfo: '',
- loading: false,
- isAuto: false, //没有授权的不会自动授权
- isShowAuth: false, //是否隐藏授权
- statusBarHeight: statusBarHeight,
- navIndex: 0,
- navTop: [],
- subscribe: false,
- followUrl: "",
- followHid: true,
- followCode: false,
- logoUrl: app.globalData.site_logo,
- // logoUrl: "",
- imgUrls: [],
- hot: [],
- sortList: [],
- itemNew: [],
- menus: [],
- bastInfo: '',
- fastInfo: '',
- firstInfo: '',
- firstList: [],
- salesInfo: '',
- likeInfo: [],
- benefit: [],
- indicatorDots: false,
- circular: true,
- autoplay: true,
- interval: 3000,
- duration: 500,
- window: false,
- iShidden: false,
- navH: "",
- newGoodsBananr: '',
- couponList: [],
- lovely: [],
- spikeList: [], //秒杀
- // liveList: [], //直播
- presellList: [], //预售
- assistList: [], //助力
- assistUserList: [], //已助力数据
- assistUserCount: '',
- combinationList: [],
- // spikeList: [],
- bargList: [],
- ProductNavindex: 0,
- marTop: 0,
- datatime: 0,
- childID: 0,
- loadend: false,
- // loading: false,
- loadTitle: '加载更多',
- sortProduct: [],
- where: {
- pid: 0,
- page: 1,
- limit: 6,
- },
- is_switch: true,
- hostProduct: [],
- hotPage: 1,
- hotLimit: 8,
- hotScroll: true,
- hotLoading: false,
- hotTitle: '加载更多',
- explosiveMoney: [],
- prodeuctTop: 0,
- pinkInfo: '',
- searchH: 0,
- isFixed: false,
- goodScroll: true, //精品推荐开关
- params: { //精品推荐分页
- page: 1,
- limit: 10,
- },
- tempArr: [], //精品推荐临时数组
- pageInfo: '', // 精品推荐全数据
- site_name: app.globalData.site_name, //首页title
- swiperCur: 0,
- brandList: [],
- d: '',
- h: '',
- m: '',
- s: '',
- sum_h: '',
- endBg: 'linear-gradient(#666666, #999999)',
- notBg: 'rgb(26, 163, 246)',
- playBg: 'linear-gradient(#FF0000, #FF5400)',
- hide_mer_status: 1,
- sortMarTop: 0,
- globalDatas: {},
- mpHeight: 0,
- currSpid: '',
- // sortMarTop: 0,
- mer_location: "",
- share_title: "",
- showNum: 0,
- power: ''
- }
- },
- /**
- * 用户点击右上角分享
- */
- // #ifdef MP
- onShareAppMessage: function() {
- let that = this;
- wx.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- })
- return {
- title: that.share_title,
- path: '/pages/index/index?spid=' + that.uid
- }
- },
- onShareTimeline: function() {
- let that = this;
- return {
- title: that.share_title,
- query: {
- spid: that.uid,
- },
- imageUrl: ''
- }
- },
- // #endif
- onLoad(options) {
- // this.navIndex = options.navIndex
- this.changeTab(JSON.parse(options.e))
- // #ifdef MP-TOUTIAO
- // this.getPower()
- // #endif
- let that = this;
- if (options.spid) {
- that.currSpid = options.spid
- app.globalData.spid = options.spid;
- }
- // #ifdef MP
- if (options.scene) {
- let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
- if (value.id) options.id = value.id;
- //记录推广人uid
- if (value.spid) {
- that.currSpid = value.spid
- app.globalData.spid = value.spid;
-
- }
- }
- // #endif
- shareScence(that.currSpid, that.isLogin)
- // #ifndef MP-TOUTIAO
- uni.getLocation({
- type: 'wgs84',
- success: function(res) {
- try {
- uni.setStorageSync('user_latitude', res.latitude);
- uni.setStorageSync('user_longitude', res.longitude);
- } catch(res) {
- console.log(res)
- }
- }
- });
- // #endif
-
- // #ifdef MP
- // 获取小程序头部高度
- this.navH = app.globalData.navHeight;
- let info = uni.createSelectorQuery().select(".mp-header");
- info.boundingClientRect(function(data) {
- console.log(data.height,'++++++++++++++++++++++++++++++++++')
- that.marTop = data.height
- }).exec()
- // #endif
- // #ifndef MP
- this.navH = 0;
- // #endif
- this.isLogin && silenceBindingSpread();
- // this.setVisit()
- Promise.all([this.getIndexConfig(), this.storeMerchant(), this.get_host_product(), this.getSpeckillCutTime(), this.getSpikeProduct(),
- this.getCombinationProduct(), this.getPresellProduct(), this.getAssistProduct(), this.getAssistUserCount(),
- ]);
- // #ifdef MP
- // this.getLiveLists()
- // #endif
- if (this.isLogin) {
- console.log("登录了+++++")
- this.showNum = 1
- this.getUserInfo();
- // #ifdef MP
- // this.getHistory()
- // #endif
- };
- },
- onShow() {
- this.getConfig()
- if(this.isLogin){
- if(this.showNum !== 1){
- this.getUserInfo()
- }else {
- this.showNum = 0
- }
- }
-
- },
- onReady() {
- let self = this
- // #ifdef MP
- setTimeout(res => {
- let info = uni.createSelectorQuery().select(".mp-header");
- info.boundingClientRect(function(data) { //data - 各种参数
- self.mpHeight = data.height
- }).exec()
- }, 800)
- // #endif
- },
- watch: {
- globalDatas(nVal, oVal) {
- // #ifdef H5
- this.ShareInfo(nVal)
- // #endif
- }
- },
- methods: {
- // 微信登录回调
- onLoadFun: function(e) {
- console.log('回调数据',e);
- this.isShowAuth = false
- // if(!e.phone){
- // uni.showModal({
- // title: "请绑定手机号",
- // content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
- // showCancel: false,
- // complete(){
- // console.log("绑定手机号")
- // uni.navigateTo({
- // url: '/pages/users/user_phone/index'
- // })
- // }
- // })
- // }
- },
- setViewport(content) {
- const meta = document.querySelector('meta[name=viewport]');
- if (!meta) return;
- meta.setAttribute('content', content);
- },
- // 菜单详情
- goMenuDetail(item) {
- // let url = this.$util.stringIntercept(item.url, 0, "\?")
- if (item.url == '/pages/goods_cate/goods_cate') {
- let data = this.$util.stringIntercept(item.url, 1, "\?")
- data = this.$util.stringIntercept(data, 1, "\=")
- uni.setStorageSync('storeIndex', data);
- uni.switchTab({
- url: '/pages/goods_cate/goods_cate'
- })
- // try {
- // } catch (e) {}
- } else {
- uni.navigateTo({
- url: item.url
- })
- }
- },
- getConfig() {
- // 获取配置
- getconfig().then(res => {
- let self = this
- this.globalDatas = res.data
- this.logoUrl = res.data.site_logo
- this.site_name = res.data.site_name
- this.hide_mer_status = res.data.hide_mer_status
- this.mer_location = res.data.mer_location
- this.share_title = res.data.share_title
- uni.setNavigationBarTitle({
- title: self.site_name
- })
- uni.$emit('configData', res.data)
- }).catch(err => {})
- },
- // 分类页更多
- bindMore() {
- console.log(this.navTop[this.navIndex])
- try {
- uni.setStorageSync('storeIndex', this.navTop[this.navIndex].pid);
- uni.switchTab({
- url: '/pages/goods_cate/goods_cate'
- })
- } catch (e) {}
- },
- goDetails(item){
- goShopDetail(item, this.uid).then(res => {
- if (this.isLogin) {
- initiateAssistApi(item.activity_id).then(res => {
- let id = res.data.product_assist_set_id;
- uni.hideLoading();
- // #ifndef MP
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- // #endif
- // #ifdef MP
- openBargainSubscribe().then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- }).catch((err) => {
- uni.hideLoading();
- });
- // #endif
- }).catch((err) => {
- uni.showToast({
- title: err,
- icon: 'none'
- })
- });
- } else {
- // #ifdef H5 || APP-PLUS
- toLogin();
- // #endif
- // #ifdef MP
- this.$emit('isShowAuth', true);
- this.$emit('isAuto', true);
- // #endif
- }
- })
- },
- // 进店
- goStore: function(id) {
- if (this.hide_mer_status != 1) {
- uni.navigateTo({
- url: `/pages/store/home/index?id=${id}`
- })
- }
- },
- /**
- * 获取个人用户信息
- */
- getUserInfo: function() {
- let that = this;
- getUserInfo().then(res => {
- that.userInfo = res.data
- if(!that.userInfo.phone){
- uni.showModal({
- title: "请绑定手机号",
- content: "为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权!",
- showCancel: false,
- complete() {
- uni.navigateTo({
- url: '/pages/users/user_phone/index'
- })
- }
- })
- }
- });
- },
- // 品牌好店
- storeMerchant() {
- storeMerchantList({
- page: 1,
- limit: 3,
- is_best: 1
- }).then(res => {
- this.brandList = res.data.list;
- })
- },
- // 获取秒杀截止时间
- getSpeckillCutTime() {
- getSeckillIndexTime().then(res => {
- this.datatime = res.data.seckillEndTime;
- });
- },
- // 获取秒杀商品
- getSpikeProduct() {
- let that = this;
- getSeckillList({
- limit: 10
- }).then(res => {
- that.spikeList = res.data.list;
- that.spikeList.map((item) => {
- item.sales = item.stock === 0 ? '0%' : (item.sales * 100 / item.stock).toFixed(2) + '%'
- })
- }).catch((e) => {});
- },
- // #ifdef MP
- // 直播
- // getLiveLists() {
- // let that = this;
- // getLiveList({
- // limit: 10
- // }).then(res => {
- // that.liveList = res.data.list;
- // that.liveList.forEach((val) => {
- // val.link = ((val.live_status == 103 && val.replay_status) || val.live_status === 101 || val.live_status ===
- // 102) ? 'plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=' + val.room_id : ''
- // });
- // }).catch((e) => {});;
- // },
- // #endif
- // 拼团
- getCombinationProduct() {
- let that = this;
-
- getCombinationList({
- limit: 3
- }).then(res => {
- that.combinationList = res.data.list;
- }).catch((e) => {});
- },
- // 预售
- getPresellProduct() {
- let that = this;
- getPresellList({
- limit: 10
- }).then(res => {
- that.presellList = res.data.list;
- }).catch((e) => {});
- },
- // 助力
- getAssistProduct() {
- let that = this;
- getAssistList({
- limit: 10
- }).then(res => {
- that.assistList = res.data.list;
- }).catch((e) => {});
- },
- // 获取已助力成功数据
- getAssistUserCount() {
- let that = this;
- assistUserData().then(res => {
- that.assistUserCount = res.data.count;
- that.assistUserList = res.data.list;
- }).catch((e) => {});
- },
- handleAssist(id) {
- if (this.isLogin) {
- initiateAssistApi(id).then(res => {
- let id = res.data.product_assist_set_id;
- uni.hideLoading();
- // #ifndef MP
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- // #endif
- // #ifdef MP
- openBargainSubscribe().then(res => {
- uni.hideLoading();
- uni.navigateTo({
- url: '/pages/activity/assist_detail/index?id=' + id
- });
- }).catch((err) => {
- uni.hideLoading();
- });
- // #endif
- }).catch((err) => {
- uni.showToast({
- title: err,
- icon: 'none'
- })
- });
- } else {
- // #ifdef H5 || APP-PLUS
- toLogin();
- // #endif
- // #ifdef MP
- this.isAuto = true;
- this.$set(this, 'isShowAuth', true);
- // #endif
- }
- },
- // swiper
- swiperChange(e) {
- // this.swiperCur = e.detail.current
- let {
- current,
- source
- } = e.detail
- if (source === 'autoplay' || source === 'touch') {
- //根据官方 source 来进行判断swiper的change事件是通过什么来触发的,autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的,所以做了限制,只有在自动轮播和用户主动触发才去改变current值,达到规避了抖动bug
- this.swiperCur = e.detail.current
- }
- },
- // 记录会员访问
- setVisit() {
- setVisit({
- url: '/pages/index/index'
- }).then(res => {
- console.log(res)
- })
- },
- // 导航分类切换
- changeTab(e) {
- let self = this
- if (this.navIndex == e.index) return
- this.navIndex = e.index;
- if (e.index > 0) {
- storeCategory({
- pid: e.pid
- }).then(res => {
- this.sortList = res.data.length > 9 ? res.data.splice(0, 9) : res.data;
- if (this.sortList.length > 0) {
- this.where.pid = e.pid;
- this.where.page = 1;
- this.loadend = false;
- this.loading = false;
- this.sortProduct = [];
- this.get_product_list();
- }
- });
- // #ifdef MP
- setTimeout(res => {
- let info = uni.createSelectorQuery().select(".mp-header");
- info.boundingClientRect(function(data) { //data - 各种参数
- self.sortMarTop = data.height + 10
- }).exec()
- }, 0)
- // #endif
- // #ifdef H5
- self.sortMarTop = 10
- // #endif
- }
- },
- //分类产品
- get_product_list: function() {
- console.log(123);
- let that = this;
- // if (!that.loadend) return;
- if (that.loading) return;
- that.loading = true;
- that.loadTitle = '';
- getProductslist(that.where).then(res => {
- let list = res.data.list;
- let productList = that.$util.SplitArray(list, that.sortProduct);
- let loadend = list.length < that.where.limit;
- that.loadend = loadend;
- that.loading = false;
- that.loadTitle = loadend ? '已全部加载' : '加载更多';
- that.$set(that, 'sortProduct', productList);
- that.$set(that.where, 'page', that.where.page + 1);
- }).catch(err => {
- that.loading = false;
- that.loadTitle = '加载更多';
- });
- },
- /**
- * 获取我的推荐
- */
- get_host_product: function() {
- let that = this;
- let num = that.hotLimit
- if (!that.hotScroll) return;
- if (that.hotLoading) return;
- that.hotLoading = true;
- that.hotTitle = '';
- getProductHot(
- that.hotPage,
- that.hotLimit,
- ).then(res => {
- let list = res.data.list;
- let productList = that.$util.SplitArray(list, that.hostProduct);
- let hotScroll = list.length <= num && list.length != 0;
- that.hotScroll = hotScroll;
- that.hotLoading = false;
- that.hotTitle = !hotScroll ? '已全部加载' : '加载更多';
- that.$set(that, 'hostProduct', productList);
- that.$set(that, 'hotPage', that.hotPage + 1);
- });
- },
- // 首页数据
- getIndexConfig: function() {
- let that = this;
- getIndexData().then(res => {
-
- that.$set(that, "imgUrls", res.data.banner);
- that.$set(that, "menus", res.data.menu);
- that.$set(that, "hot", res.data.hot);
- that.$set(that, "ad", res.data.ad);
- res.data.category.unshift({
- 'cate_name': '首页'
- })
- that.$set(that, "navTop", res.data.category);
- that.lovely = res.data.lovely
- that.$set(that, "pageInfo", res.data)
- that.$set(that, "likeInfo", res.data.likeInfo);
- that.$set(that, "benefit", res.data.benefit);
- that.explosiveMoney = res.data.explosive_money
- // #ifdef H5
- that.subscribe = res.data.subscribe;
- // #endif
- // 小程序判断用户是否授权;
- // #ifdef MP
- uni.getSetting({
- success(res) {
- if (!res.authSetting['scope.userInfo']) {
- that.window = that.couponList.length ? true : false;
- } else {
- that.window = false;
- that.iShidden = true;
- }
- }
- });
- // #endif
- // #ifndef MP
- if (that.isLogin) {
- that.window = false;
- } else {
- that.window = that.couponList.length ? true : false;
- }
- // #endif
- })
- },
- // 砍价详情
- bargDetail(item) {
- if (!this.isLogin) {
- // #ifdef H5
- uni.showModal({
- title: '提示',
- content: '您未登录,请登录!',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/users/login/index'
- })
- } else if (res.cancel) {}
- }
- })
- // #endif
- // #ifdef MP
- this.$set(this, 'isAuto', true);
- this.$set(this, 'isShowAuth', true);
- // #endif
- } else {
- uni.navigateTo({
- url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.uid}`
- })
- }
- },
- // 授权关闭
- authColse: function(e) {
- this.isShowAuth = e
- },
- // 首发新品详情
- goDetail(item) {
- if (item.activity && item.activity.type === "2" && !this.isLogin) {
- // #ifdef H5
- uni.showModal({
- title: '提示',
- content: '您未登录,请登录!',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/users/login/index'
- })
- } else if (res.cancel) {}
- }
- })
- // #endif
- // #ifdef MP
- this.$set(this, 'isAuto', true);
- this.$set(this, 'isShowAuth', true);
- // #endif
- return
- } else {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- })
- })
- }
- },
- // 分类详情
- godDetail(item) {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}`
- })
-
- },
- //拼团详情
- goCombinDetail(item) {
- uni.navigateTo({
- url: `/pages/activity/combination_details/index?id=${item.product_group_id}`
- })
-
- },
- countTime: function() {
- // 获取当前时间
- var date = new Date();
- var now = date.getTime();
- //设置截止时间
- var endDate = new Date("2020-10-22 23:23:23");
- var end = endDate.getTime();
- //时间差
- var leftTime = end - now;
- //定义变量 d,h,m,s保存倒计时的时间
- if (leftTime >= 0) {
- this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
- this.h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
- this.m = Math.floor(leftTime / 1000 / 60 % 60);
- this.s = Math.floor(leftTime / 1000 % 60);
- this.sum_h = this.d * 24 + this.h
- }
- // console.log(this.h)
- // console.log(this.m)
- // console.log(this.s)
- // console.log(this.s);
- //递归每秒调用countTime方法,显示动态时间效果
- setTimeout(this.countTime, 1000);
- },
- //#ifdef H5
- ShareInfo(datas) {
- let data = this.storeInfo;
- let href = location.href;
- if (this.$wechat.isWeixin()) {
- if (this.isLogin) {
- href = href.indexOf("?") === -1 ? href + "?spid=" + this.uid : href + "&spid=" + this.uid;
- } else {
- href = href
-
- }
- let configAppMessage = {
- desc: datas.share_info,
- title: datas.share_title,
- link: href,
- imgUrl: datas.share_pic
- };
- this.$wechat.wechatEvevt([
- "updateAppMessageShareData",
- "updateTimelineShareData",
- "onMenuShareAppMessage",
- "onMenuShareTimeline"
- ], configAppMessage).then(res => {
- console.log(res, '=============================>>WXAPI');
- }).catch(err => {
- console.log(err);
- })
- }
- },
- //#endif
- moreShop() {
- uni.navigateTo({
- url: `/pages/store/shopStreet/index`
- })
- },
- getPower() {
- getPower().then( ({data}) => {
- if(data.openlink) {
- this.power = data.openlink
- uni.setStorageSync('power', data.openlink);
- }else {
- uni.showModal({
- title: '提示',
- showCancel: false,
- content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
- })
- }
-
-
- })
- }
- },
- mounted() {
- let self = this
- // #ifdef H5
- // 获取H5 搜索框高度
- let appSearchH = uni.createSelectorQuery().select(".serch-wrapper");
- appSearchH.boundingClientRect(function(data) {
- self.searchH = data.height
- }).exec()
- // #endif
- },
- // 滚动到底部
- onReachBottom() {
- console.log('到底了')
- if (this.navIndex == 0) {
- // 首页加载更多
- this.get_host_product();
- } else {
- // 分类栏目加载更多
- if (this.sortProduct.length > 0) {
- this.get_product_list();
- } else {
- this.get_host_product();
- }
- }
- },
- // 滚动监听
- onPageScroll(e) {
- // #ifdef H5
- let self = this
- if (e.scrollTop >= self.searchH) {
- self.isFixed = true
- } else {
- self.isFixed = false
- }
- // #endif
- }
- }
- </script>
- <style>
- page {
- display: flex;
- flex-direction: column;
- height: 100%;
- /* #ifdef H5 */
- background-color: #fff;
- /* #endif */
- }
- </style>
- <style lang="scss">
- .area-row {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: block;
- width: 100%;
- text-align: center;
- }
- .seckill-count,
- .assist-count {
- background-color: #fff;
- margin-bottom: 20rpx;
- border-radius: 16rpx;
- padding: 20rpx 0 26rpx 20rpx;
- box-shadow: 4rpx 2rpx 12rpx 2rpx rgba(0, 0, 0, 0.03);
- }
- .assist-count {
- padding: 20rpx 0 26rpx 0;
- }
- .wapper_count {
- padding: 0 0 26rpx 20rpx;
- }
- .presell-count {
- background-color: #fff;
- margin-bottom: 20rpx;
- border-radius: 16rpx;
- box-shadow: 4rpx 2rpx 12rpx 2rpx rgba(0, 0, 0, 0.03);
- }
- .spike-bd {
- margin-bottom: 20rpx;
- border-radius: 16rpx;
- padding-left: 20rpx;
- display: flex;
- position: relative;
- &.title-bd {
- margin-bottom: 0;
- padding: 30rpx 0 20rpx 20rpx;
- border-radius: 16rpx 16rpx 0 0;
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsYAAABmCAMAAAD/NadAAAAAilBMVEX5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv5fjv9hz39hTj9xEv9vUj9tkT9vUj8nDb8ljL8qzv8ozf8sED8s0H+yU/9uET9pz78ojr8qTv8nTP8qz39rkP8iDn8kS/9hDb8hjj7gjn9rU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CMMw0Pc/9ZeQ/Ucoi7dHMxK0TVzTBPgAfsbyAfyM5QOE8TW76bAkjebwU47zxoTHdAl5JE+IRHKNyeXk0njqtwHJnffC6qjex+ZUlIXwNzkLVlTGQ0aa4rAMiG6AyGPbSXr6zlBQ2MuSyoEtxGk9JrSOGarOThexoiNZC56rKQyWWixl72lDA5Vxfjy32P5ebKR5gR3uX056JSPZuXirlbELESXts0fTOF0l3Cjus2LeFJ0LtzqcdlLHLX236tGt1WzE+FaLdDkezNmoETk93aolVkO8bvwOlNsMi9lQUh2o+IkSw50Gi4iIiIiIiIiIiIiIiIiIiMjhD4tMxFN8soNOAAAAAElFTkSuQmCC');
- background-size: 100%;
- .more-btn {
- top: 28rpx;
- }
- }
- .title {
- font-weight: bold;
- color: #282828;
- font-size: 32rpx;
- }
- .spike-distance {
- margin-left: 15rpx;
- position: relative;
- top: 1.4rpx;
- display: flex;
- border: 1px solid #E93323;
- border-radius: 4rpx;
- height: 40rpx;
- .bg-red {
- font-size: 20rpx;
- color: #fff;
- background-color: #E93323;
- padding: 0 10rpx;
- line-height: 38rpx;
- height: 38rpx;
- }
- .time {
- font-size: 22rpx;
- padding: 0 12rpx;
- color: #E93323;
- height: 38rpx;
- line-height: 38rpx;
- /deep/.red {
- margin: 0;
- }
- }
- .red-color {
- color: #E93323;
- }
- }
- .more-btn {
- position: absolute;
- right: 20rpx;
- top: 0;
- color: #999;
- font-size: 28rpx;
- .iconfont {
- font-size: 26rpx;
- }
- }
- }
- .spike-wrapper {
- width: 100%;
- margin-top: 27rpx;
- .spike-item {
- display: inline-block;
- width: 222rpx;
- margin-right: 20rpx;
- &.presell-item {
- width: 210rpx;
- .img-box {
- height: 210rpx;
- image {
- height: 210rpx;
- }
- }
- .name {
- margin-top: 8rpx;
- color: #282828;
- }
- }
- &.assist-item {
- box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.08);
- }
- .img-box {
- position: relative;
- height: 222rpx;
- .participants {
- padding: 4rpx 12rpx;
- border-radius: 16rpx;
- background: rgba(0, 0, 0, .35);
- color: #fff;
- text-align: center;
- position: absolute;
- top: 10rpx;
- left: 10rpx;
- font-size: 20rpx;
- }
- image {
- width: 100%;
- height: 222rpx;
- border-radius: 16rpx;
- }
- .box_bg {
- position: absolute;
- bottom: 0;
- left: 0;
- text-align: center;
- width: 149rpx;
- height: 42rpx;
- line-height: 42rpx;
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJUAAAAqCAMAAACN4OndAAAAmVBMVEUAAAD/dy37mij/eiz+hCv+fSz8kyn+gCz9hyv9jSr9iir8kCn8lin7lyj7mij7mij7mij7mij7mij7mij7mij7mij7mSj7mij7mij7mij7mSj7mij7mij7mij+gSz7mij7mij7mij7mij7mij/dy37mij7mCj/eyz+fiz+gSv8kCn9jCr9hiv9iSr8lCn8kin+hCv8lin9jiqx53KQAAAAJHRSTlMA8fHx8fHx8fHx8fHx8cdMjnpvNBgN59vYrp9eKfXt4tGUP76oKK8EAAABeklEQVRYw82Z126DQBBFx6S3xRQ3wDXZkJ7Y//9xgVm2GQXJIZHveWEfj0YczUpLA5cTzZniomaxOG24ZK6ZK+aGOVfc1twxwW9YhqR5aFE2PCmema+KN+adeWV2uxfms+ajZrt9NMhDET9blT21enitW1bd07JebS3FX2glXVZllxbzP1oTUqQja+WLabq0fK/+WkNSTOPGqj2tI/zzG2IyOdNWAClOiVnXp8YBIMXxJk2LUFSnubaCSDEYN19tBZSilCttBZRiFaO2AkpRykJb4aRYj0pb4aQohd04OCmKkbWCSXE1ImuFkmKQkmOFkmJIrhVIijPyrEBSDH0rkBSjyiiMjBVKisNIyMBYIaU4M1ZIKdqNg5RibqyQUkyMFVCKEzJWQClm1gooxdBa4aS4JGuFk2LkWMGkGLj3K5gUY3c7o6Q4IdcKJcXEswJJMSbPCiPFiHwrhBTnOe1ZAaR4X9C+1dFTFDk5DHrQfjVQHPhqMBZZnJDLN9Y/g30cqDDDAAAAAElFTkSuQmCC');
- background-repeat: no-repeat;
- background-size: cover;
- color: #fff;
- font-size: 22rpx;
- }
- .msg {
- position: absolute;
- left: 10rpx;
- bottom: 16rpx;
- width: 86rpx;
- height: 30rpx;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(255, 109, 96, 1);
- border-radius: 6rpx;
- font-size: 20rpx;
- color: $theme-color;
- }
- }
- .info {
- margin-top: 10rpx;
- .name {
- font-size: 26rpx;
- }
- .stock-box {
- width: 100%;
- height: 20rpx;
- background-color: #FFDCD9;
- border-radius: 20rpx;
- margin-top: 13rpx;
- position: relative;
- color: #fff;
- font-size: 18rpx;
- line-height: 20rpx;
- text-align: center;
- overflow: hidden;
- .grabbed {
- height: 20rpx;
- background: linear-gradient(#FF0000, #FF5400);
- position: absolute;
- top: 0;
- left: 0;
- border-radius: 20rpx;
- }
- .stock-sales {
- position: absolute;
- left: 50%;
- margin-left: -40rpx;
- }
- }
- .price-box {
- display: flex;
- align-items: center;
- justify-content: start;
- margin-top: 4rpx;
- &.presell-price {
- display: block;
- .price {}
- .old-price {
- display: block;
- margin: 6rpx 0 0 0;
- }
- }
- .tips {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 28rpx;
- height: 28rpx;
- background-color: $theme-color;
- color: #fff;
- font-size: 20rpx;
- border-radius: 2px;
- }
- .price {
- display: flex;
- color: $theme-color;
- font-size: 28rpx;
- font-weight: bold;
- text {
- font-size: 18rpx;
- }
- }
- .old-price {
- display: flex;
- margin-left: 10rpx;
- color: #AAAAAA;
- text-decoration: line-through;
- font-size: 20rpx;
- text {
- font-size: 18rpx;
- }
- }
- }
- }
- .assist-info {
- .price {
- display: flex;
- color: $theme-color;
- font-size: 28rpx;
- font-weight: bold;
- margin-top: 2rpx;
- text {
- font-size: 18rpx;
- }
- .assist_price {
- font-size: 20rpx;
- display: inline-block;
- width: 82rpx;
- height: 32rpx;
- text-align: center;
- line-height: 30rpx;
- background: #ffeae5;
- border-radius: 4rpx;
- }
- }
- .price-box {
- padding: 15rpx 15rpx 8rpx;
- .name {
- font-size: 24rpx;
- color: #333;
- line-height: 30rpx;
- }
- }
- .initiate_btn {
- width: 100%;
- height: 48rpx;
- line-height: 48rpx;
- ;
- background: linear-gradient(90deg, #FF0000 0%, #FF5400 100%);
- text-align: center;
- color: #fff;
- font-size: 24rpx;
- border-radius: 0 0 16rpx 16rpx;
- }
- }
- }
- }
- .combination-count {
- background-color: #fff;
- margin-bottom: 11px;
- border-radius: 16rpx;
- box-shadow: 2px 1px 6px 1px rgba(0, 0, 0, 0.03);
- padding: 25rpx 20rpx;
- position: relative;
- .spike-wrapper {
- overflow: hidden;
- width: 670rpx;
- }
- }
- /deep/.spike-box .styleAll {
- display: inline-block;
- width: 44rpx;
- height: 40rpx;
- line-height: 40rpx;
- padding: 0;
- text-align: center;
- border-radius: 8rpx;
- }
- .page-index {
- display: flex;
- flex-direction: column;
- min-height: 100%;
- background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
- .ad {
- width: 710rpx;
- height: 156rpx;
- margin: 10rpx auto 20rpx auto;
- image {
- width: 100%;
- height: 100%;
- }
- }
- // &.bgf{
- // background: #fff;
- // }
- .header {
- width: 100%;
- // height: 320rpx;
- .btn {
- position: relative;
- .iconfont {
- font-size: 45rpx;
- }
- }
- .iconnum {
- min-width: 6px;
- color: #fff;
- border-radius: 15rpx;
- position: absolute;
- right: -10rpx;
- top: -10rpx;
- font-size: 10px;
- padding: 0 4px;
- }
- .serch-wrapper {
- align-items: center;
- padding: 20rpx 30rpx 0 30rpx;
- .logo {
- width: 127rpx;
- height: 46rpx;
- }
- image {
- width: 118rpx;
- height: 42rpx;
- }
- .input,.uninput {
- display: flex;
- align-items: center;
- max-width: 490rpx;
- min-width: 460rpx;
- height: 64rpx;
- padding: 0 0 0 30rpx;
- background: rgba(237, 237, 237, 1);
- border: 1px solid rgba(241, 241, 241, 1);
- border-radius: 32rpx;
- color: #BBBBBB;
- font-size: 28rpx;
- .iconfont {
- margin-right: 20rpx;
- }
- }
- .uninput{
- min-width: 610rpx;
- max-width: 620rpx;
- }
- }
- .tabNav {
- padding-top: 24rpx;
- }
- }
- /*直播*/
- .live-count {
- background-color: #fff;
- margin-bottom: 20rpx;
- border-radius: 16rpx;
- padding: 20rpx 0 26rpx 20rpx;
- box-shadow: 4rpx 2rpx 12rpx 2rpx rgba(0, 0, 0, 0.03);
- }
- .live-wrapper {
- position: relative;
- width: 100%;
- overflow: hidden;
- border-radius: 16rpx;
- image {
- width: 100%;
- height: 400rpx;
- }
- .live-top {
- z-index: 20;
- position: absolute;
- left: 0;
- top: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- width: 120rpx;
- height: 32rpx;
- &.playRadius {
- border-radius: 0;
- }
- &.notPlayRadius {
- border-radius: 0rpx 0px 18rpx 0px;
- }
- image {
- width: 30rpx;
- height: 30rpx;
- margin-right: 6rpx;
- /* #ifdef H5 */
- display: block;
- /* #endif */
- }
- }
- .broadcast-time {
- z-index: 20;
- position: absolute;
- left: 110rpx;
- top: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- width: 160rpx;
- height: 36rpx;
- background: rgba(0, 0, 0, .4);
- font-size: 22rpx;
- border-radius: 0 0 18rpx 0;
- }
- .live-title {
- position: absolute;
- left: 0;
- bottom: 6rpx;
- width: 100%;
- height: 70rpx;
- line-height: 70rpx;
- text-align: center;
- font-size: 30rpx;
- color: #fff;
- background: rgba(0, 0, 0, 0.35);
- }
- &.mores {
- width: 100%;
- .item {
- position: relative;
- width: 280rpx;
- height: 224rpx;
- display: inline-block;
- border-radius: 16rpx;
- overflow: hidden;
- margin-right: 20rpx;
- image {
- width: 320rpx;
- height: 180rpx;
- border-radius: 16rpx;
- }
- .live-title {
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- font-size: 22rpx;
- }
- .live-top {
- width: 110rpx;
- height: 32rpx;
- font-size: 22rpx;
- image {
- width: 20rpx;
- height: 20rpx;
- }
- }
- }
- }
- }
- /* #ifdef MP */
- .mp-header {
- z-index: 999;
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- /* #ifdef H5 */
- padding-bottom: 20rpx;
- /* #endif */
- // background: linear-gradient(90deg, $bg-star 50%, $bg-end 100%);
- background-color: #fff;
- .serch-wrapper {
- height: 100%;
- align-items: center;
- padding: 0 50rpx 0 53rpx;
- image {
- width: 118rpx;
- height: 42rpx;
- margin-right: 30rpx;
- }
- .input,.uninput {
- display: flex;
- align-items: center;
- width: 305rpx;
- height: 58rpx;
- padding: 0 0 0 30rpx;
- background: rgba(247, 247, 247, 1);
- border: 1px solid rgba(241, 241, 241, 1);
- border-radius: 29rpx;
- color: #BBBBBB;
- font-size: 28rpx;
-
- .iconfont {
- margin-right: 20rpx;
- }
-
- }
- .uninput{
- min-width: 460rpx;
- max-width: 480rpx;
- }
-
- }
- }
- /* #endif */
- }
- .activity_pic {
- margin-left: 20rpx;
- padding-left: 20rpx;
- position: relative;
- &::before {
- content: "";
- display: inline-block;
- width: 2rpx;
- height: 40rpx;
- background: #DCDCDC;
- position: absolute;
- top: 0;
- left: 0;
- }
- .picture {
- display: inline-block;
- }
- .avatar {
- width: 42rpx;
- height: 42rpx;
- line-height: 20rem;
- display: inline-block;
- background: #2ddcd3 no-repeat center/cover;
- position: relative;
- text-align: center;
- color: #fff;
- font-weight: 600;
- vertical-align: bottom;
- font-size: .875rem;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- border-radius: 50%;
- background-repeat: no-repeat;
- background-size: cover;
- background-position: 0 0;
- margin-right: -10rpx;
- box-shadow: 0 0 0 1px #fff;
- }
- .pic_count {
- margin-left: 30rpx;
- color: #999999;
- font-size: 26rpx;
- position: relative;
- top: -4rpx;
- }
- }
- .productList {
- background-color: #F1F1F1;
-
- .sort {
- width: 710rpx;
- max-height: 380rpx;
- background: rgba(255, 255, 255, 1);
- border-radius: 16rpx;
- padding: 0 0rpx 30rpx;
- flex-wrap: wrap;
- margin: 25rpx auto 30rpx auto;
- padding-top: 8rpx;
- &.no_pad {
- padding: 0;
- }
- /* #ifdef MP */
- /* #endif */
- .item {
- .pictrues {
- width: 90rpx;
- height: 90rpx;
- background: rgba(248, 248, 248, 1);
- border-radius: 50%;
- margin: 0 auto;
- }
- width: 20%;
- margin-top: 30rpx;
- text-align: center;
- image {
- width: 90rpx;
- height: 90rpx;
- }
- .text {
- color: #272727;
- font-size: 24rpx;
- margin-top: 10rpx;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- }
- }
- .productList .list {
- padding: 0 20rpx;
- }
- .productList .list.on {
- background-color: #fff;
- border-top: 1px solid #f6f6f6;
- }
- .productList .list .item {
- width: 345rpx;
- margin-top: 20rpx;
- background-color: #fff;
- border-radius: 10rpx;
- }
- .productList .list .item.on {
- width: 100%;
- display: flex;
- border-bottom: 1rpx solid #f6f6f6;
- padding: 30rpx 0;
- margin: 0;
- }
- .productList .list .item .pictrue {
- position: relative;
- width: 100%;
- height: 345rpx;
- }
- .productList .list .item .pictrue.on {
- width: 180rpx;
- height: 180rpx;
- }
- .productList .list .item .pictrue image {
- width: 100%;
- height: 100%;
- border-radius: 10rpx 10rpx 0 0;
- }
- .productList .list .item .pictrue image.on {
- border-radius: 6rpx;
- }
- .productList .list .item .text {
- padding: 14rpx 17rpx 26rpx 17rpx;
- font-size: 28rpx;
- color: #212121;
- }
- .productList .list .item .text.on {
- width: 508rpx;
- padding: 0 0 0 22rpx;
- }
- .productList .list .item .text .money {
- font-size: 26rpx;
- font-weight: bold;
- margin-top: 8rpx;
- }
- .productList .list .item .text .coupon {
- background: rgba(255, 248, 247, 1);
- border: 1px solid rgba(233, 51, 35, 1);
- border-radius: 4rpx;
- font-size: 20rpx;
- margin-left: 18rpx;
- padding: 1rpx 4rpx;
- }
- .productList .list .item .text .money.on {
- margin-top: 50rpx;
- }
- .productList .list .item .text .money .num {
- font-size: 34rpx;
- }
- .productList .list .item .text .vip {
- font-size: 22rpx;
- color: #aaa;
- margin-top: 7rpx;
- }
- .productList .list .item .text .vip.on {
- margin-top: 12rpx;
- }
- .productList .list .item .text .vip .vip-money {
- font-size: 24rpx;
- color: #282828;
- font-weight: bold;
- }
- .productList .list .item .text .vip .vip-money image {
- width: 46rpx;
- height: 21rpx;
- margin-left: 4rpx;
- }
- .pictrue {
- position: relative;
- }
- .fixed {
- z-index: 100;
- position: fixed;
- left: 0;
- top: 0;
- background-color: #fff;
- box-shadow: 0 10rpx 20rpx -5rpx rgba(0, 0, 0, 0.06);
- // background: linear-gradient(90deg, red 50%, #ff5400 100%);
- }
- .mores-txt {
- width: 100%;
- align-items: center;
- justify-content: center;
- height: 70rpx;
- color: #999;
- font-size: 24rpx;
- .iconfont {
- margin-top: 2rpx;
- font-size: 20rpx;
- }
- }
- .menu-txt {
- font-size: 24rpx;
- color: #454545;
- }
- .mp-bg {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 330rpx;
- // background: linear-gradient(90deg, #fff 50%, #fff 100%);
- // border-radius: 0 0 30rpx 30rpx;
- }
- .main {
- padding: 0 20rpx;
- }
- </style>
|