12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270 |
- <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',
- isHighAccuracy: true,
- geocode: true,
- 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(1111)
- uni.openLocation({
- latitude: this.websitData.lat,
- longitude: 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>
|