1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269 |
- <template>
- <view class="app-container">
- <view class="home-container">
- <block>
- <view class="top-container">
- <image src="@/static/home/top_bg.png" mode="widthFix" class="bg"></image>
- <view class="content">
- <view class="title" :style="cuStyle">广佛格力商城</view>
- <view class="header-container">
- <view class="left" @tap="getLocation">
- <image src="@/static/home/dingweitus.png"></image>
- <text style="color: #ffffff;">{{currentPosition||''}}</text>
- </view>
- </view>
- <view class="search">
- <image src="@/static/icon/search.png" class=""></image>
- <input v-model="keyword" @confirm="searchSubmit" type="text" confirm-type="search"
- placeholder="搜索商品名称或型号">
- </view>
- <view class="shangjiakapian">
- <view class="shangjiatupiand">
- <image style="width: 100%;height: 310rpx;" src="@/static/home/shangjiabeijing.png"
- class=""></image>
- <view class="nirongdd">
- <view style="color:#ffffff;font-size: 36rpx;margin-bottom: 16rpx;">
- {{websitData.name||''}}
- </view>
- <view
- style="margin-bottom: 16rpx;display: flex;justify-content: flex-start;align-items: center;">
- <view
- style="color:#ffffff;font-size: 24rpx;box-sizing: border-box;padding: 8rpx 18rpx;border-radius: 20rpx;background: rgba(245, 245,245,0.2);margin-right: 20rpx;">
- {{websitData.type||''}}
- </view>
- <view style="color:#ffffff;font-size: 24rpx;">
- {{websitData.websitNumber||''}}
- </view>
- </view>
- <view style="color:#ffffff;font-size: 24rpx;">地址:{{websitData.address||''}}</view>
- </view>
- <view
- style="display: flex;justify-content: space-between;align-items: center;width: 100%;height: 100rpx;position: absolute;left: 0;bottom: 0;right: 0;background: rgba(245, 245,245,0.3);">
- <view style="width: 50%;display: flex;justify-content: center;align-items: center;"
- @click="dakaidaoh">
- <image style="width: 40rpx;height: 40rpx;" src="@/static/home/juliduoyuan.png"
- class=""></image>
- <view style="font-size: 28rpx;color: #ffffff;margin-left: 20rpx;">
- 距您{{distancess||''}}KM
- </view>
- </view>
- <view
- style="width: 6rpx;height: 50rpx;border-radius: 3rpx;background:rgba(245, 245,245,0.6);">
- </view>
- <view style="width: 50%;display: flex;justify-content: center;align-items: center;"
- @click="bodasjdh(websitData.mobile||'')">
- <image style="width: 40rpx;height: 40rpx;" src="@/static/home/dianhuaaa.png"
- class=""></image>
- <view style="font-size: 28rpx;color: #ffffff;margin-left: 20rpx;">电话</view>
- </view>
- </view>
- <image @click="chakanyyzz" style="width: 50rpx;height: 50rpx;position: absolute; top: 30%; right: 40rpx;"
- src="@/static/home/yinyangzhiz.png"></image>
- </view>
- <view class="shangjiakapiandibubiaos">
- <view class="shangjiakapiandibuItem">
- <view>官方直营</view>
- </view>
- <view class="shangjiakapiandibuItem">
- <view>急速发货</view>
- </view>
- <view class="shangjiakapiandibuItem">
- <view>全场包邮</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="swiper-container" v-if=" bannerList.length > 0">
- <swiper @change="changeBanner" :autoplay="true">
- <block v-for="(item, index) in bannerList" :key='index'>
- <swiper-item>
- <image :src="item.imgSrc" mode="aspectFill"
- @tap="toMiniProgram(item.appId, item.linkUrl)" v-if="item.type === 2"></image>
- <image :src="item.imgSrc" mode="aspectFill" @tap="toActivityList(item.goodsId)"
- v-if="item.type === 3"></image>
- <image :src="item.imgSrc" mode="aspectFill" @tap="toGoodsDetail(item.goodsId)" v-else>
- </image>
- </swiper-item>
- </block>
- </swiper>
- <view class="dots-conatiner">
- <view class="con" :style="'width:'+(bannerList.length * 20)+'rpx;'">
- <view class="dot" :style=" 'transform:translateX('+ (bannerCurrent * 100) +'%)' "></view>
- </view>
- </view>
- </view>
- </block>
- <!-- --------------------------------- -->
- <view class="caidanrukou">
- <view class="dangecaidanrukou" @click="goodsClassify">
- <view>
- <image class="tupiancaidan" src="@/static/home/fenlei.png"></image>
- </view>
- <view class="dangecaidanrukouTitle">商品分类</view>
- </view>
- <view class="dangecaidanrukou" @click="couponList">
- <view>
- <image class="tupiancaidan" src="@/static/home/youhuiquan.png"></image>
- </view>
- <view class="dangecaidanrukouTitle">优惠卡券</view>
- </view>
- <view class="dangecaidanrukou" @click="orderListPage">
- <view>
- <image class="tupiancaidan" src="@/static/home/dingdan.png"></image>
- </view>
- <view class="dangecaidanrukouTitle">我的订单</view>
- </view>
- </view>
- </view>
- <view class="sptjyangshi">
- 商品推荐
- </view>
- <view class="top-container2">
- <view class="tab">
- <view class="item" :class="screenType === 0 ? 'current':''" @tap="changeScreen(0)">综合</view>
- <view class="item" :class="screenType === 1 ? 'current':''" @tap="changeScreen(1)">销量</view>
- <view class="item" :class="screenType === 2 || screenType === 3 ? 'current':''" @tap="changeScreen(2)">
- 价格
- <image src="@/static/icon/price_1.png" v-if="screenType === 2"></image>
- <image src="@/static/icon/price_2.png" v-if="screenType === 3"></image>
- <image src="@/static/icon/price_0.png" v-if="screenType != 2 && screenType != 3"></image>
- </view>
- <view class="item" :class="screenType === 4 ? 'current':''" @tap="changeScreen(4)">上架时间</view>
- </view>
- <!-- 切换商品卡片样式 -->
- <!-- <view class="icon">
- <image src="@/static/icon/show_1.png" v-if="showType == 1" @tap="showType = 2"></image>
- <image src="@/static/icon/show_2.png" v-if="showType == 2" @tap="showType = 1"></image>
- </view> -->
- </view>
- <view class="goods-waterfall-list" v-show="showType == 1">
- <view class="left">
- <block v-for="(item, index) in goodsList" :key='index'>
- <view class="item" v-if="index%2==0" @tap="toGoodsDetail(item.goodsId)">
- <view class="image">
- <image :src="item.imgUrl" mode="aspectFill" class="img"></image>
- <image :src="item.logo" mode="aspectFill" class="water" v-if="item.isShowWater"></image>
- </view>
- <view class="content">
- <view class="title ellipsis-2">{{item.goodsName}}</view>
- <view class="tags" v-if="item.tags1 && item.tags1.length > 0">
- <view class="it" v-for="(it, idx) in item.tags1" :key="idx">{{it}}</view>
- </view>
- <view class="price">
- <view class="price-1">¥{{item.goodsPrice | numToFixed}}</view>
- <view class="price-2">¥{{item.orgGoodsPrice | numToFixed}}</view>
- </view>
- <view class="tags2" v-if="item.tags2 && item.tags2.length > 0">
- <view class="it" v-for="(it, idx) in item.tags2" :key="idx">{{it}}</view>
- </view>
- <view class="text">销量:{{item.soldNum}}</view>
- </view>
- </view>
- </block>
- </view>
- <view class="right">
- <block v-for="(item, index) in goodsList" :key='index'>
- <view class="item" v-if="index%2==1" @tap="toGoodsDetail(item.goodsId)">
- <view class="image">
- <image :src="item.imgUrl" mode="aspectFill" class="img"></image>
- <image :src="item.logo" mode="aspectFill" class="water" v-if="item.isShowWater"></image>
- </view>
- <view class="content">
- <view class="title ellipsis-2">{{item.goodsName}}</view>
- <view class="tags" v-if="item.tags1 && item.tags1.length > 0">
- <view class="it" v-for="(it, idx) in item.tags1" :key="idx">{{it}}</view>
- </view>
- <view class="price">
- <view class="price-1">¥{{item.goodsPrice | numToFixed}}</view>
- <view class="price-2">¥{{item.orgGoodsPrice | numToFixed}}</view>
- </view>
- <view class="tags2" v-if="item.tags2 && item.tags2.length > 0">
- <view class="it" v-for="(it, idx) in item.tags2" :key="idx">{{it}}</view>
- </view>
- <view class="text">销量:{{item.soldNum}}</view>
- </view>
- </view>
- </block>
- </view>
- </view>
- <view class="goods-row-list" v-show="showType == 2">
- <block v-for="(item, index) in goodsList" :key='index'>
- <view class="item" @tap="toGoodsDetail(item.goodsId)">
- <view class="image">
- <image :src="item.imgUrl" mode="aspectFill" class="img"></image>
- <image :src="item.logo" mode="aspectFill" class="water" v-if="item.isShowWater"></image>
- </view>
- <view class="right">
- <view>
- <view class="title ellipsis-2">{{item.goodsName}}</view>
- <view class="tags" v-if="item.tags1 && item.tags1.length > 0">
- <view class="it" v-for="(it, idx) in item.tags1" :key="idx">{{it}}</view>
- </view>
- </view>
- <view>
- <view class="bottom">
- <view class="price">
- <view class="price-1">¥{{item.goodsPrice | numToFixed}}</view>
- <view class="price-2">¥{{item.orgGoodsPrice | numToFixed}}</view>
- </view>
- <view class="text">销量:{{item.soldNum}}</view>
- </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- <no-data v-if="!goodsList.length" :showText="'暂无商品'"></no-data>
- <loading-text v-if="goodsList.length" :loading="loading" :noMore="noMore"></loading-text>
- <!-- <drag-button :isDock="true" :customBar="true" ref="dragButton"></drag-button> -->
- <!-- <HomePageA :homePage="homePage" :templateInfo="templateInfo" /> -->
- <!-- <HomePageB :homePage="homePage" :templateInfo="templateInfo" /> -->
- <!-- <HomePageC :homePage="homePage" :templateInfo="templateInfo" /> -->
- <view v-if="isSharePyq">
- <image
- src="https://zfire-train.oss-cn-guangzhou.aliyuncs.com/train/pic/1657090568346be106ca9-dd33-48d2-b06b-e4a02b06f2a2.png"
- mode="widthFix" style="width: 100%" @tap="clickPyq"></image>
- </view>
- <!-- 购买弹窗 -->
- <view class="global-mask" v-show="isBuyDialog"></view>
- <view class="buyDialog" v-show="isBuyDialog">
- <view class="close">
- <image src="@/static/icon/close.png" @tap="isBuyDialog = false"></image>
- </view>
- <view class="goods" v-if="orderDetail.orderDetails && orderDetail.orderDetails.length == 1">
- <image :src="orderDetail.orderDetails[0].imgUrl" mode="aspectFill"></image>
- <view class="name ellipsis-2">{{orderDetail.orderDetails[0].goodsName}}</view>
- <view class="des ellipsis">{{orderDetail.orderDetails[0].goodsSpecValue}}</view>
- </view>
- <view class="goodsList" v-if="orderDetail.orderDetails && orderDetail.orderDetails.length > 1">
- <block v-for="(item, index) in orderDetail.orderDetails" :key='index'>
- <view class="item">
- <image :src="item.imgUrl" mode="aspectFill"></image>
- <view class="right">
- <view class="name ellipsis-2">{{item.goodsName}}</view>
- <view class="des ellipsis">{{item.goodsSpecValue}}</view>
- </view>
- </view>
- </block>
- </view>
- <view class="num">共<text>{{orderDetail.totalNum}}</text>件商品</view>
- <view class="price">需支付金额:<text>¥{{orderDetail.payAmount}}</text></view>
- <view class="button" @tap="payment">立即支付</view>
- </view>
- <!-- 优惠券提醒 -->
- <view class="global-mask" v-show="isCouponDialog"></view>
- <view class="couponDialog" v-show="isCouponDialog">
- <image src="@/static/home/cp_dialog.png" mode="widthFix"></image>
- <view class="bottom">
- <view class="text">你有优惠券即将到期,请尽快使用!</view>
- <view class="btn-group">
- <view class="button left" @tap="isCouponDialog = false">关闭</view>
- <view class="button right" @tap="toMyCoupon">去看看</view>
- </view>
- </view>
- </view>
- <!-- 领取优惠券弹窗 -->
- <view class="global-mask" v-show="isReceiveDialog"></view>
- <view class="couponDialog" v-show="isReceiveDialog">
- <image src="@/static/home/cp_dialog.png" mode="widthFix"></image>
- <view class="bottom">
- <view class="text">你有一张优惠券可领取!</view>
- <view class="btn-group onlyOne">
- <view class="button right" @tap="receiveCoupon">立即领取</view>
- </view>
- </view>
- </view>
- <modal-dialog showTitle="提示" showText="领取成功" :isShowDialog="isReceiveCouponDialog && isReceiveSuccess"
- @cancel="isReceiveCouponDialog = false" @confirm="toMyCoupon()" confirmText="去看看"></modal-dialog>
- <modal-dialog showTitle="提示" :showText="'领取失败:'+failMessage"
- :isShowDialog="isReceiveCouponDialog && !isReceiveSuccess" @cancel="isReceiveCouponDialog = false"
- :isShowConfirm="false" cancelText="关闭"></modal-dialog>
- </view>
- </template>
- <script>
- import HomePageA from "@/pages/index/components/home-page-a";
- import HomePageB from "@/pages/index/components/home-page-b";
- import HomePageC from "@/pages/index/components/home-page-c";
- import {
- mapState
- } from 'vuex';
- import {
- appId
- } from '@/utils/config.js';
- import modalDialog from '@/components/modalDialog.vue';
- export default {
- components: {
- HomePageA,
- HomePageB,
- HomePageC,
- modalDialog,
- },
- data() {
- return {
- configInfo: uni.getStorageSync('configInfo'),
- templateInfo: uni.getStorageSync('templateInfo'),
- isBuyDialog: false, // 是否显示购买弹窗(业务员代客下单时产生)
- orderDetail: {}, // 订单详情(购买弹窗需要)
- scene: { // 页面参数(扫码进入小程序时产生)
- type: '',
- goodsId: '',
- orderId: '',
- serviceId: '',
- couponId: '',
- },
- isCouponDialog: false, // 是否显示过期优惠券弹窗
- isReceiveCouponDialog: false,
- isReceiveSuccess: true,
- failMessage: '',
- isReceiveDialog: false,
- isSmsReceive: false,
- homePage: 0,
- isSharePyq: false,
- keyword: "",
- screenType: '',
- goodsList: [],
- pageNum: 1,
- pageSize: 8,
- noMore: false,
- loading: false,
- showType: 2,
- bannerList: [], // 轮播图列表
- bannerCurrent: 0, // 轮播图当前值
- distancess: "",
- currentPosition: ''
- }
- },
- computed: {
- ...mapState(['userInfo', 'isLogin', 'userId', 'websitData']),
- cuStyle() {
- return `height:${this.CustomBar-this.StatusBar}px; padding-top:${this.StatusBar}px;`
- },
- },
- watch: {
- nowDate() {
- let hh = this.nowDate.getHours(),
- mm = this.nowDate.getMinutes(),
- ss = this.nowDate.getSeconds();
- let hs = [10, 12, 15, 18, 20];
- if (mm == 0 && ss == 0 && hs.indexOf(hh) >= 0) {
- setTimeout(() => {
- this.getSeckillTimeList();
- }, 1000)
- }
- },
- websitData() {
- }
- },
- // 页面滚动
- onPageScroll(res) {
- uni.$emit('onPageScroll', res.scrollTop);
- },
- // // 下拉刷新
- // onPullDownRefresh() {
- // if (this.isSharePyq) {
- // return false;
- // }
- // uni.$emit('onPullDownRefresh');
- // // this.getHomePage();
- // },
- // // 上拉加载
- // onReachBottom() {
- // uni.$emit('onReachBottom');
- // },
- // 下拉刷新
- onPullDownRefresh() {
- if (this.isSharePyq) {
- return false;
- }
- uni.$emit('onPullDownRefresh');
- this.pageNum = 1;
- this.getGoodsList();
- this.getBannerList();
- this.chishuhuade();
- },
- // 上拉加载
- onReachBottom() {
- this.getGoodsList(1);
- uni.$emit('onReachBottom');
- },
- // 页面隐藏
- onHide() {
- uni.$emit('onHide');
- },
- // 页面显示
- async onShow() {
- this.chishuhuade()
- var obj = wx.getLaunchOptionsSync()
- if (obj.scene == 1154) {
- return this.isSharePyq = true;
- }
- await this.$onLaunched;
- },
- // 页面加载
- async onLoad({
- scene,
- goodsId,
- serviceId,
- mobile,
- smsServiceId,
- otherType,
- appOrderId
- }) {
- await this.$onLaunched;
- // uni.showLoading({
- // title: '加载中'
- // });
- this.getConfig();
- this.checkCoupon();
- this.getBannerList();
- // // 点击短信链接进入小程序
- // if (smsServiceId) {
- // this.bindUser(smsServiceId);
- // if (this.userInfo.type !== "SERVICE") {
- // this.isSmsReceive = true;
- // this.isReceiveDialog = true;
- // }
- // }
- // // 从师傅端app跳转进入小程序
- // if (appOrderId) {
- // this.appOrderPay(appOrderId);
- // }
- // if (otherType) {
- // if (otherType === 'groupbuyList') {
- // uni.navigateTo({
- // url: '/pages/mine/groupbuy/list'
- // })
- // }
- // }
- if (serviceId) {
- this.bindUser(serviceId);
- }
- // 点击商品链接进入小程序
- if (goodsId) {
- this.toGoodsDetail(goodsId);
- }
- // 扫码进入小程序
- if (scene) {
- // 拿scene的id去获取
- this.$axios({
- url: '/common/scene',
- method: 'get',
- params: {
- scene: scene,
- }
- }).then(res => {
- let newScene = res.data.split("&");
- this.scene.type = newScene[0];
- this.scene.serviceId = newScene[2];
- // 如果是商品
- if (newScene[0] == 'goods') {
- this.scene.goodsId = newScene[1];
- this.toGoodsDetail(this.scene.goodsId);
- }
- // 如果是商城分享码
- else if (newScene[0] == 'bind') {
- }
- // 如果是订单
- else if (newScene[0] == 'order') {
- this.scene.orderId = newScene[1];
- this.getOrderInfo();
- }
-
- // 如果是优惠券
- else if (newScene[0] == 'coupon') {
- this.scene.couponId = newScene[1];
- this.isReceiveDialog = true;
- // this.receiveCoupon(this.scene.couponId);
- }
- // // 如果是团购分享码
- // else if (newScene[0] == 'promotion_group') {
- // uni.navigateTo({
- // url: '/pages/mine/groupbuy/list'
- // })
- // }
- if (this.scene.serviceId) {
- this.bindUser(this.scene.serviceId);
- }
- })
- }
- this.getGoodsList();
- },
- // 分享
- onShareAppMessage(options) {
- if (options && options.from == 'button') {
- // 来自页面内的转发按钮
- } else {
- // 点击微信右上角的分享按钮
- }
- return {
- title: `${this.userInfo.nickName}向你推荐了「${this.configInfo.minAppName}」小程序`,
- path: '/pages/index/index?serviceId=' + this.userId,
- query: {},
- success: function(res) {
- if (res.errMsg == 'shareAppMessage:ok') {
- this.$successToast('分享完成');
- }
- }
- }
- },
- onShareTimeline() {
- return {
- title: `${this.userInfo.nickName}向你推荐了「${this.configInfo.minAppName}」小程序`,
- query: 'serviceId=' + this.userId,
- success: function(res) {
- if (res.errMsg == 'shareAppMessage:ok') {
- this.$successToast('分享完成');
- }
- }
- }
- },
- methods: {
-
- chakanyyzz(){
- uni.navigateTo({
- url: '/pages/index/chakanyyzz'
- })
- },
-
- chishuhuade(){
- uni.getLocation({
- type: 'gcj02',
- success: res => {
- this.$axios({
- url: '/user/user/detail',
- method: 'get',
- params: {
- userId: this.userId,
- lat: res.latitude,
- lng: res.longitude,
- },
- }).then((res) => {
- this.distancess = res.data.distance
- });
- this.$axios({
- url: '/user/address',
- method: 'post',
- params: {
- lat: res.latitude,
- lng: res.longitude,
- },
- }).then((res) => {
- var {
- provinceName,
- cityName,
- areaName,
- name
- } = res.data
- this.currentPosition = `${provinceName}${cityName}${areaName}${name}`
- });
- },
- fail: err => {
-
- }
- })
- },
- goodsClassify() {
- uni.switchTab({
- url: '/pages/goods/classify'
- });
- },
- couponList() {
- uni.navigateTo({
- url: '/pages/mine/coupon/list'
- })
- },
- orderListPage() {
- uni.navigateTo({
- url: '/pages/mine/order/list'
- })
- },
- // 打开导航
- dakaidaoh() {
- console.log(this.websitData.lat,this.websitData.lng)
- uni.openLocation({
- latitude: Number(this.websitData.lat),
- longitude: Number(this.websitData.lng),
- success: function() {
- console.log('success');
- }
- });
- },
- // 拨打商家电话
- bodasjdh(phoneNumber) {
- console.log(2222)
- if (phoneNumber) {
- uni.makePhoneCall({
- phoneNumber: phoneNumber
- });
- } else {
- uni.showModal({
- title: '提示',
- content: '商家没有手机号码!',
- success: (res) => {
- if (res.confirm) {} else if (res.cancel) {}
- }
- });
- }
- },
- // 获取轮播图列表
- getBannerList() {
- this.$axios({
- url: '/common/list/page',
- method: 'get',
- params: {
- pageNum: 1,
- pageSize: 10,
- state: true
- }
- }).then(res => {
- this.bannerList = res.data.records;
- }).finally(res => {})
- },
- // 切换广告图
- changeBanner(e) {
- this.bannerCurrent = e.detail.current;
- },
- // 跳转小程序
- toMiniProgram(appId, path) {
- wx.navigateToMiniProgram({
- appId,
- path,
- extraData: {},
- envVersion: 'release',
- success(res) {}
- });
- },
- // 进入活动列表
- toActivityList(type) {
- if (type == 2) {
- this.closeDialog();
- }
- uni.navigateTo({
- url: '/packageGoods/pages/activity?type=' + type
- })
- },
- getLocation() {
- if (!this.userInfo?.serviceWorkerBean?.websitId) {
- uni.navigateTo({
- url: '/pages/address/list'
- })
- }
- },
- searchSubmit() {
- if (this.keyword) {
- this.pageNum = 1;
- this.getGoodsList();
- }
- },
- // 获取页面模版
- async getHomePage() {
- const result = await new Promise((resolve, reject) => {
- this.$axios({
- url: '/renovation/detail',
- method: 'get',
- }).then(res => {
- if (res.data) {
- uni.setStorageSync('templateInfo', res.data);
- this.templateInfo = res.data;
- this.homePage = res.data.templateType;
- resolve(res.data.templateType);
- }
- }).catch(res => {
- this.homePage = 1;
- resolve(1);
- })
- })
- return result;
- },
- // 获取配置信息
- getConfig() {
- this.$axios({
- url: '/common/config/get',
- method: 'get',
- }).then(res => {
- if (res.data) {
- uni.setStorageSync('configInfo', res.data);
- }
- })
- },
- // 绑定用户关系
- bindUser(serviceId) {
- if (this.userInfo?.userId) {
- if (!this.userInfo?.serviceWorkerBean) {
- this.$axios({
- url: '/user/bind',
- params: {
- serviceId: serviceId,
- userId: this.userId,
- }
- }).then(res => {
- console.log('绑定成功:' + res.message);
- })
- }
- } else {
- setTimeout(() => {
- this.bindUser(serviceId)
- }, 100)
- }
- },
- // 点击分享朋友圈的图
- clickPyq() {
- this.$toast('请前往小程序使用完整服务');
- },
- // app订单支付
- appOrderPay(appOrderId) {
- let that = this;
- this.$axios({
- url: '/common/online/pay',
- method: 'post',
- params: {
- key: appOrderId,
- openId: uni.getStorageSync('userInfo').openId,
- }
- }).then(res => {
- if (!res.data) return false;
- let data = JSON.parse(res.data.codeUrl);
- wx.requestPayment({
- timeStamp: data.timeStamp,
- nonceStr: data.nonceStr,
- package: data.package,
- signType: 'RSA',
- paySign: data.paySign,
- success: (res) => {
- that.$successToast('支付成功');
- },
- fail: (err) => {
- that.$toast('支付失败');
- }
- })
- })
- },
- // 进入商品详情
- toGoodsDetail(id) {
- if (!id) {
- return false;
- }
- this.$axios({
- url: '/goods/detail',
- method: 'get',
- params: {
- goodsId: id,
- userId: this.userId,
- },
- })
- .then((res) => {
- uni.navigateTo({
- url: '/packageGoods/pages/detail?id=' + id
- })
- })
- .catch((res) => {
- uni.switchTab({
- url: '/pages/goods/all'
- });
- })
- .finally((res) => {});
- },
- // 检查是否有优惠券过期
- checkCoupon() {
- this.$axios({
- url: '/coupon/timeout',
- method: 'get',
- params: {},
- }).then(res => {
- if (res.data) {
- this.isCouponDialog = true;
- }
- })
- },
- // 进入我的优惠券
- toMyCoupon() {
- this.isCouponDialog = false;
- this.isReceiveCouponDialog = false;
- uni.navigateTo({
- url: '/pages/mine/coupon/list'
- })
- },
- // 领取优惠券
- receiveCoupon(id) {
- if (!this.isLogin) {
- return uni.navigateTo({
- url: '/pages/login/index'
- })
- }
- if (this.isSmsReceive) {
- this.$axios({
- url: '/coupon/obtain',
- method: 'get',
- params: {
- userId: '',
- couponId: ''
- }
- }).then(res => {
- this.isReceiveDialog = false;
- this.isReceiveSuccess = true;
- this.isReceiveCouponDialog = true;
- }).catch(res => {
- this.failMessage = res.message;
- this.isReceiveDialog = false;
- this.isReceiveSuccess = false;
- this.isReceiveCouponDialog = true;
- })
- } else {
- this.$axios({
- url: '/coupon/transfer/coupon',
- method: 'get',
- params: {
- userCouponId: this.scene.couponId
- }
- }).then(res => {
- this.isReceiveDialog = false;
- this.isReceiveSuccess = true;
- this.isReceiveCouponDialog = true;
- }).catch(res => {
- this.failMessage = res.message;
- this.isReceiveDialog = false;
- this.isReceiveSuccess = false;
- this.isReceiveCouponDialog = true;
- })
- }
- },
- // 获取订单信息
- getOrderInfo() {
- this.$axios({
- url: '/order/detail',
- method: 'get',
- params: {
- orderId: this.scene.orderId
- }
- }).then(res => {
- if (res.data && res.data.orderStatus === 'NOPAY') {
- this.orderDetail = res.data;
- this.isBuyDialog = true;
- } else {
- return this.$toast('二维码已失效,请重新生成');
- }
- })
- },
- // 支付
- payment() {
- let that = this;
- if (!this.isLogin) {
- uni.navigateTo({
- url: '/pages/login/index'
- })
- } else {
- this.$axios({
- url: '/order/wait/pay',
- params: {
- userId: this.userId,
- orderId: this.scene.orderId,
- },
- isLoading: 1,
- }).then(res => {
- uni.getProvider({
- service: 'payment',
- success: (e) => {
- uni.requestPayment({
- provider: e.provider[0],
- orderInfo: res.data,
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.payPackage,
- signType: 'MD5',
- paySign: res.data.paySign,
- success: (res) => {
- that.$successToast('支付成功');
- that.isBuyDialog = false;
- that.requestMessage();
- },
- fail: (err) => {
- that.$toast('支付失败');
- }
- })
- }
- })
- })
- }
- },
- // 消息推送
- requestMessage() {
- let that = this;
- uni.showModal({
- title: '温馨提示',
- content: '为更好的促进您与买家的交流,需要在您的订单成交时向您发送消息',
- confirmText: "同意",
- cancelText: "拒绝",
- success: function(res) {
- if (res.confirm) {
- let tmplIds = [that.configInfo.template];
- uni.requestSubscribeMessage({
- tmplIds: tmplIds,
- success(res) {
- let status = null;
- tmplIds.map((item, index) => {
- if (res[item] == 'accept') {
- status = 'accept';
- }
- })
- if (status == 'accept') {
- that.$successToast('订阅成功');
- } else {
- that.$toast('订阅取消');
- }
- },
- fail(res) {
- console.log(res);
- that.$toast('订阅失败');
- }
- })
- } else if (res.cancel) {
- uni.showModal({
- title: '温馨提示',
- content: '拒绝后您将无法获取实时的与卖家(买家)的交易消息',
- confirmText: "知道了",
- showCancel: false,
- success: function(res) {
- }
- });
- }
- }
- });
- },
- // ------------------------------------
- // 切换筛选类型
- changeScreen(type) {
- if (type != 2) {
- if (this.screenType !== type) {
- this.screenType = type;
- } else {
- this.screenType = '';
- }
- } else {
- if (this.screenType != 2 && this.screenType != 3) {
- this.screenType = 2;
- } else if (this.screenType == 2) {
- this.screenType = 3;
- } else {
- this.screenType = '';
- }
- }
- this.pageNum = 1;
- this.getGoodsList();
- },
- // 获取商品列表
- getGoodsList(loadMore) {
- if (this.noMore && loadMore) return;
- this.noMore = false
- if (!loadMore) {
- this.pageNum = 1;
- } else {
- this.loading = true;
- }
- this.$axios({
- url: '/goods/list/sort/page',
- method: 'get',
- params: {
- pageNum: this.pageNum,
- pageSize: this.pageSize,
- categoryId: '',
- sort: this.screenType,
- keyword: this.keyword
- },
- isLoading: !loadMore
- }).then(res => {
- res.data.records.forEach(item => {
- if (item.logo && item.logoStartTime) {
- item.isShowWater = this.$compareTime(item.logoStartTime, item.logoEndTime);
- } else {
- item.isShowWater = false;
- }
- })
- let _list = res.data.records;
- let pageTotal = res.data.pages;
- if (this.pageNum >= pageTotal) {
- this.noMore = true;
- }
- if (_list.length) {
- this.pageNum += 1
- }
- if (loadMore) {
- this.goodsList = this.goodsList.concat(_list);
- this.loading = false;
- } else {
- this.goodsList = _list;
- }
- uni.stopPullDownRefresh();
- })
- },
- }
- }
- </script>
- <style lang="scss">
- .shangjiakapian {
- width: 100%;
- height: auto;
- border-radius: 30rpx;
- overflow: hidden;
- background: #ffffff;
- margin-top: 30rpx;
- .shangjiatupiand {
- position: relative;
- .nirongdd {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- box-sizing: border-box;
- padding: 26rpx;
- }
- }
- .shangjiakapiandibubiaos {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .shangjiakapiandibuItem {
- width: 33.33%;
- height: auto;
- box-sizing: border-box;
- padding: 16rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 20rpx;
- color: red;
- }
- }
- }
- .header-container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 10rpx 10rpx;
- .left {
- display: flex;
- align-items: center;
- image {
- width: 48rpx;
- height: 48rpx;
- }
- }
- }
- .top-container {
- position: relative;
- .bg {
- display: block;
- width: 750rpx;
- position: absolute;
- top: 0;
- z-index: 0;
- }
- .content {
- width: 710rpx;
- padding: 0 20rpx;
- position: relative;
- z-index: 1;
- }
- .title {
- display: flex;
- align-items: center;
- justify-content: center;
- color: #FFFFFF;
- font-size: 36rpx;
- }
- .search {
- background: #FFFFFF;
- height: 64rpx;
- display: flex;
- align-items: center;
- border-radius: 64rpx;
- padding: 0 20rpx;
- margin-top: 20rpx;
- image {
- width: 28rpx;
- height: 28rpx;
- }
- input {
- width: 100%;
- padding-left: 15rpx;
- }
- }
- }
- .classify-container {
- margin-top: 40rpx;
- position: relative;
- z-index: 1;
- padding: 0 20rpx;
- .content {
- border-radius: 20rpx;
- padding-top: 30rpx;
- display: flex;
- flex-wrap: wrap;
- background: #FFFFFF;
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 142rpx;
- margin-bottom: 30rpx;
- image {
- width: 78rpx;
- height: 78rpx;
- display: block;
- border-radius: 50%;
- overflow: hidden;
- }
- text {
- font-size: 24rpx;
- color: #666666;
- margin-top: 10rpx;
- width: 150rpx;
- text-align: center;
- }
- }
- }
- }
- .notice-container {
- padding: 0 20rpx;
- margin-top: 20rpx;
- .content {
- display: flex;
- align-items: center;
- height: 100rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- }
- .left {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 96rpx;
- height: 48rpx;
- margin-right: 20rpx;
- border-right: 2rpx solid #E5E5E5;
- image {
- width: 60rpx;
- height: 30rpx;
- display: block;
- }
- }
- .swiper {
- height: 100rpx;
- flex: 1;
- padding-right: 20rpx;
- ::v-deep swiper-item {
- display: block;
- height: 100rpx;
- width: 100%;
- line-height: 100rpx;
- }
- }
- }
- .coupon-container {
- position: relative;
- margin-top: 20rpx;
- padding: 0 20rpx;
- .bg {
- display: block;
- width: 100%;
- }
- .list {
- position: absolute;
- top: 80rpx;
- z-index: 1;
- }
- .list1 {
- .item {
- position: relative;
- margin-bottom: 20rpx;
- margin-left: 16rpx;
- .cp {
- width: 688rpx;
- height: 178rpx;
- display: block;
- }
- .content {
- position: absolute;
- left: 0;
- top: 0;
- width: 710rpx;
- height: 160rpx;
- display: flex;
- align-items: center;
- .left {
- width: 210rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- .price {
- font-size: 48rpx;
- color: #FFFFFF;
- }
- .text {
- color: #FFFFFF;
- font-size: 28rpx;
- }
- }
- .right {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 20rpx;
- width: 470rpx;
- height: 150rpx;
- box-sizing: border-box;
- .main {
- width: 430rpx;
- height: 150rpx;
- padding: 16rpx 0 8rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .row1 {
- font-size: 28rpx;
- line-height: 32rpx;
- height: 64rpx;
- }
- .row2 {
- font-size: 24rpx;
- line-height: 28rpx;
- color: #999999;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- }
- }
- }
- }
- }
- .list2 {
- display: flex;
- .item {
- position: relative;
- margin-bottom: 20rpx;
- &:first-child {
- margin-left: 16rpx;
- }
- .cp {
- width: 342rpx;
- height: 308rpx;
- display: block;
- }
- .content {
- position: absolute;
- left: 0;
- top: 0;
- width: 342rpx;
- height: 328rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .top {
- width: 324rpx;
- height: 130rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- .price {
- font-size: 48rpx;
- color: #FFFFFF;
- line-height: 48rpx;
- margin-top: 16rpx;
- }
- .text {
- color: #FFFFFF;
- font-size: 28rpx;
- line-height: 28rpx;
- margin-top: 10rpx;
- }
- }
- .bottom {
- width: 324rpx;
- height: 160rpx;
- padding: 16rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- .name {
- font-size: 28rpx;
- text-align: left;
- line-height: 32rpx;
- width: 100%;
- }
- .date {
- font-size: 24rpx;
- color: #999999;
- text-align: left;
- width: 100%;
- line-height: 28rpx;
- }
- }
- }
- }
- }
- .list3 {
- display: flex;
- align-items: center;
- .left {
- display: flex;
- width: 630rpx;
- overflow-x: scroll;
- }
- .right {
- width: 80rpx;
- display: flex;
- justify-content: center;
- .text {
- width: 48rpx;
- height: 200rpx;
- border-radius: 48rpx;
- background: #FFFFFF;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text {
- font-size: 28rpx;
- color: #FF3F42;
- line-height: 32rpx;
- }
- image {
- width: 32rpx;
- height: 32rpx;
- display: block;
- flex-shrink: 0;
- margin-top: 10rpx;
- }
- }
- }
- .item {
- position: relative;
- margin-bottom: 20rpx;
- &:first-child {
- margin-left: 16rpx;
- }
- .cp {
- width: 278rpx;
- height: 308rpx;
- display: block;
- }
- .content {
- position: absolute;
- left: 0;
- top: 0;
- width: 278rpx;
- height: 328rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .top {
- width: 260rpx;
- height: 130rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- .price {
- font-size: 48rpx;
- color: #FFFFFF;
- line-height: 48rpx;
- margin-top: 16rpx;
- }
- .text {
- color: #FFFFFF;
- font-size: 28rpx;
- line-height: 28rpx;
- margin-top: 10rpx;
- }
- }
- .bottom {
- width: 260rpx;
- height: 160rpx;
- padding: 16rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- .name {
- font-size: 28rpx;
- text-align: left;
- line-height: 32rpx;
- width: 100%;
- }
- .date {
- font-size: 24rpx;
- color: #999999;
- text-align: left;
- width: 100%;
- line-height: 28rpx;
- }
- }
- }
- }
- }
- .button {
- width: 120rpx;
- height: 40rpx;
- border-radius: 40rpx;
- font-size: 24rpx;
- flex-shrink: 0;
- box-sizing: border-box;
- display: flex;
- justify-content: center;
- align-items: center;
- &.gary {
- background: #AAAAAA;
- color: #FFFFFF;
- border: 1px solid #AAAAAA;
- }
- &.red {
- background: #C434FF;
- color: #FFFFFF;
- border: 1px solid #C434FF;
- }
- &.white {
- color: #FF3F42;
- border: 1px solid #FF3F42;
- }
- }
- }
- .myManager-container {
- padding: 0 20rpx;
- .content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 20rpx;
- .left {
- display: flex;
- align-items: center;
- image {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- }
- .main {
- font-size: 28rpx;
- line-height: 48rpx;
- margin-left: 20rpx;
- }
- }
- .right {
- width: 160rpx;
- height: 60rpx;
- line-height: 60rpx;
- border-radius: 60rpx;
- text-align: center;
- font-size: 28rpx;
- color: #E43B38;
- border: 1px solid #E43B38;
- }
- }
- }
- .seckill-container {
- position: relative;
- margin-top: 20rpx;
- min-height: 340rpx;
- .bg {
- display: block;
- width: 750rpx;
- position: absolute;
- top: 0;
- z-index: 0;
- }
- .content {
- width: 710rpx;
- padding: 0 20rpx;
- position: relative;
- z-index: 1;
- }
- .time-list {
- display: flex;
- overflow-x: scroll;
- padding-top: 90rpx;
- padding-bottom: 40rpx;
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex-shrink: 0;
- width: 140rpx;
- margin-right: 48rpx;
- .time {
- font-size: 32rpx;
- color: #FFFFFF;
- }
- .tag {
- width: 140rpx;
- height: 44rpx;
- border-radius: 44rpx;
- border: 1px solid #FFFFFF;
- font-size: 24rpx;
- color: #FFFFFF;
- box-sizing: border-box;
- margin-top: 12rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- &.current {
- .tag {
- background: #FFFFFF;
- color: #FF3F42;
- }
- }
- }
- }
- .product-list {
- .item {
- background: #FFFFFF;
- border-radius: 10rpx;
- display: flex;
- padding: 20rpx;
- margin-bottom: 20rpx;
- image {
- display: block;
- width: 180rpx;
- height: 180rpx;
- flex-shrink: 0;
- }
- .right {
- width: 490rpx;
- box-sizing: border-box;
- padding-left: 20rpx;
- .title {
- font-size: 30rpx;
- color: #333333;
- line-height: 36rpx;
- font-weight: 600;
- }
- .des {
- font-size: 24rpx;
- line-height: 30rpx;
- color: #999999;
- margin-top: 6rpx;
- }
- .stock-sales {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10rpx;
- font-size: 24rpx;
- color: #666666;
- .stock {
- display: flex;
- align-items: center;
- text {
- font-size: 24rpx;
- color: #666666;
- }
- .progress-box {
- width: 140rpx;
- border-radius: 6px;
- overflow: hidden;
- margin-left: 10rpx;
- }
- }
- }
- .bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10rpx;
- .price {
- display: flex;
- flex-direction: column;
- }
- .price-1 {
- font-size: 32rpx;
- color: #FF3F42;
- line-height: 36rpx;
- }
- .price-2 {
- font-size: 26rpx;
- color: #666666;
- line-height: 30rpx;
- text-decoration: line-through;
- }
- .btn {
- width: 110rpx;
- height: 44rpx;
- background: #FF3F42;
- border-radius: 5rpx;
- font-size: 28rpx;
- color: #FFFFFF;
- text-align: center;
- line-height: 44rpx;
- }
- .btn2 {
- width: 110rpx;
- height: 44rpx;
- background: #AAAAAA;
- border-radius: 5rpx;
- font-size: 28rpx;
- color: #FFFFFF;
- text-align: center;
- line-height: 44rpx;
- }
- }
- }
- }
- }
- .loadmore {
- background: #FFFFFF;
- border-radius: 10rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 88rpx;
- }
- }
- .recom-container {
- margin-top: 30rpx;
- .top {
- background: #FFFFFF;
- padding: 30rpx 0 0;
- .title {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 10rpx;
- image {
- width: 300rpx;
- height: 40rpx;
- display: block;
- }
- }
- .tab {
- display: flex;
- margin-left: -10rpx;
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex-shrink: 0;
- font-size: 28rpx;
- color: #666666;
- height: 80rpx;
- line-height: 80rpx;
- position: relative;
- padding: 0 30rpx;
- &.current {
- color: #FF3F42;
- font-weight: 600;
- &::after {
- content: '';
- display: block;
- width: 50rpx;
- height: 6rpx;
- background: #FF3F42;
- position: absolute;
- bottom: 0;
- left: 50%;
- margin-left: -25rpx;
- }
- }
- }
- }
- }
- .list {
- display: flex;
- flex-wrap: wrap;
- padding: 20rpx;
- .item {
- width: 348rpx;
- background: #FFFFFF;
- margin-right: 14rpx;
- margin-bottom: 20rpx;
- border-radius: 20rpx;
- overflow: hidden;
- &:nth-child(2n) {
- margin-right: 0;
- }
- .image {
- width: 348rpx;
- height: 348rpx;
- flex-shrink: 0;
- position: relative;
- .img {
- width: 348rpx;
- height: 348rpx;
- display: block;
- }
- .water {
- width: 348rpx;
- height: 348rpx;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1;
- }
- }
- .content {
- padding: 15rpx 20rpx;
- .title {
- font-size: 30rpx;
- color: #333333;
- line-height: 36rpx;
- font-weight: 600;
- height: 72rpx;
- }
- .bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10rpx;
- .price {
- display: flex;
- flex-direction: column;
- }
- .price-1 {
- font-size: 32rpx;
- color: #FF3F42;
- line-height: 36rpx;
- }
- .price-2 {
- font-size: 26rpx;
- color: #666666;
- line-height: 30rpx;
- text-decoration: line-through;
- }
- .btn {
- width: 60rpx;
- height: 60rpx;
- background: #FE781F;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- image {
- width: 41rpx;
- height: 36rpx;
- display: block;
- }
- }
- }
- }
- }
- }
- }
- .app-container {
- background: #F4F2F2;
- box-sizing: border-box;
- }
- .couponDialog {
- position: fixed;
- top: 30%;
- left: 75rpx;
- z-index: 999;
- width: 600rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- image {
- width: 600rpx;
- }
- .bottom {
- padding: 0 40rpx 50rpx;
- .text {
- font-size: 32rpx;
- line-height: 48rpx;
- text-align: center;
- }
- .btn-group {
- display: flex;
- justify-content: space-between;
- margin-top: 50rpx;
- .button {
- width: 240rpx;
- height: 72rpx;
- border-radius: 72rpx;
- border: 1px solid #FF3F42;
- font-size: 32rpx;
- line-height: 72rpx;
- text-align: center;
- &.left {
- color: #FF3F42;
- }
- &.right {
- color: #FFFFFF;
- background: #FF3F42;
- }
- }
- &.onlyOne {
- justify-content: center;
- .button {
- width: 300rpx;
- }
- }
- }
- }
- }
- .buyDialog {
- position: fixed;
- top: 30%;
- left: 100rpx;
- z-index: 999;
- width: 550rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- box-sizing: border-box;
- padding: 20rpx 20rpx 30rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .close {
- width: 100%;
- display: flex;
- justify-content: flex-end;
- image {
- width: 32rpx;
- height: 32rpx;
- display: block;
- }
- }
- .goods {
- margin-top: 10rpx;
- image {
- width: 410rpx;
- height: 300rpx;
- display: block;
- }
- .name {
- font-size: 28rpx;
- line-height: 34rpx;
- margin-top: 16rpx;
- }
- .des {
- font-size: 26rpx;
- color: #666666;
- line-height: 30rpx;
- margin-top: 10rpx;
- }
- }
- .goodsList {
- max-height: 400rpx;
- overflow-y: scroll;
- margin-top: 10rpx;
- .item {
- display: flex;
- padding: 10rpx 20rpx;
- image {
- width: 120rpx;
- height: 120rpx;
- display: block;
- flex-shrink: 0;
- }
- .right {
- width: 334rpx;
- margin-left: 16rpx;
- .name {
- font-size: 28rpx;
- line-height: 34rpx;
- margin-top: 8rpx;
- }
- .des {
- font-size: 26rpx;
- color: #666666;
- line-height: 30rpx;
- margin-top: 10rpx;
- }
- }
- }
- }
- .num {
- margin-top: 10rpx;
- line-height: 40rpx;
- text {
- color: #FF3F42;
- font-size: 32rpx;
- font-weight: 600;
- margin: 0 10rpx;
- }
- }
- .price {
- margin-top: 8rpx;
- line-height: 40rpx;
- text {
- color: #FF3F42;
- font-size: 32rpx;
- font-weight: 600;
- }
- }
- .button {
- width: 300rpx;
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- background: #FF3F42;
- border-radius: 64rpx;
- font-size: 28rpx;
- color: #FFFFFF;
- margin-top: 20rpx;
- }
- }
- // ---------------------------------------------
- .swiper-container {
- position: relative;
- margin-top: 20rpx;
- swiper {
- height: 350rpx;
- }
- image {
- height: 350rpx;
- width: 710rpx;
- display: block;
- margin: 0 auto 0;
- border-radius: 15rpx;
- overflow: hidden;
- }
- .dots-conatiner {
- position: absolute;
- width: 100%;
- bottom: 40rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .con {
- border-radius: 4rpx;
- overflow: hidden;
- height: 4rpx;
- background-color: rgba($color: #FFFFFF, $alpha: 0.3);
- }
- .dot {
- width: 20rpx;
- height: 4rpx;
- background-color: #FFFFFF;
- transition: all .3s;
- }
- }
- }
- // ---------------------------------------------
- .caidanrukou {
- width: 95%;
- height: auto;
- border-radius: 30rpx;
- overflow: hidden;
- background: #ffffff;
- margin: 30rpx auto;
- padding: 30rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .dangecaidanrukou {
- width: 33.33%;
- height: auto;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- .tupiancaidan {
- width: 80rpx;
- height: 80rpx;
- }
- .dangecaidanrukouTitle {
- font-size: 28rpx;
- font-weight: 500;
- }
- }
- }
- // ---------------------------------------------
- .sptjyangshi {
- width: 100%;
- font-size: 34rpx;
- font-weight: bold;
- box-sizing: border-box;
- padding: 30rpx 20rpx;
- }
- .top-container2 {
- background: #FFFFFF;
- display: flex;
- padding: 0 20rpx;
- align-items: center;
- box-sizing: border-box;
- .tab {
- flex: 1;
- display: flex;
- // padding: 0 80rpx 0 30rpx;
- padding: 0 30rpx 0 30rpx;
- box-sizing: border-box;
- justify-content: space-between;
- .item {
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 30rpx;
- color: #666666;
- &.current {
- color: #FF3F42;
- }
- image {
- width: 18rpx;
- height: 30rpx;
- display: block;
- margin-left: 10rpx;
- }
- }
- }
- .icon {
- padding-right: 10rpx;
- image {
- width: 36rpx;
- height: 36rpx;
- display: block;
- }
- }
- }
- </style>
|