1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251 |
- <template>
- <div class="page" :class="{ page_red: theme === 1 }">
- <scroll-view
- class="page__scroll"
- :class="{ 'page__scroll--iphoneX': iphoneX }"
- :scroll-y="true"
- :refresher-enabled="true"
- :refresher-triggered="triggered"
- @refresherrefresh="refresherrefresh"
- @scrolltolower="getMoreGoods"
- :scroll-into-view="scroll"
- >
- <swiper
- class="swiper"
- :indicator-dots="true"
- @change="swiperChange($event)"
- >
- <swiper-item
- class="swiper__item"
- v-if="goods.videos.orgVideoUrl"
- >
- <video
- id="goodVideo"
- class="swiper__video"
- :src="goods.videos.orgVideoUrl"
- :poster="goods.videos.orgCoverUrl"
- :show-mute-btn="true"
- ></video>
- </swiper-item>
- <swiper-item
- class="swiper__item"
- v-for="(item, index) in goods.pictureUrls"
- :key="index"
- >
- <my-image class="swiper__img" :src="item"></my-image>
- </swiper-item>
- </swiper>
- <div class="info">
- <div class="info__top">
- <div class="price">
- <div class="price__present">
- <span class="price__rmb">¥</span>
- <span class="price__big">{{
- goods.minPrice / 100 || "0.00"
- }}</span>
- </div>
- <div
- class="price__original"
- v-if="goods.tagPrice !== '0.00'"
- >
- {{ "¥" + (goods.tagPrice / 100 || "0.00") }}
- </div>
- </div>
- <!-- <div class="info__num">
- {{ "销量" + (goods.weSold || "0") }}
- </div> -->
- </div>
- <div class="info__bottom">
- <div class="info__title">
- {{ goods.name || "" }}
- </div>
- <div class="share" @click="oprenShare">
- <img
- class="share__img"
- src="/static/goods/share.png"
- alt=""
- />
- <div class="share__text">分享</div>
- </div>
- </div>
- <div class="info__bottom">
- <div class="info__title info__deliveryDesc">
- 发货:{{ activityData.deliveryDesc }}
- </div>
- </div>
- <div
- class="info__tag"
- v-if="
- activityData.activityLabelBOList &&
- activityData.activityLabelBOList.length
- "
- >
- <span
- class="tag-item"
- v-for="item of activityData.activityLabelBOList"
- :key="item.prices"
- >{{ item.prices }}</span
- >
- </div>
- </div>
- <button
- v-if="user.login"
- class="button"
- @click="openSpec('spec', $event)"
- >
- <div class="specification" v-if="goods.skuList.length">
- <div class="specification__left">
- <img
- class="specification__img"
- src="/static/goods/specification.png"
- alt=""
- />
- <span class="specification__text">{{
- spec ? "已选择" : "请选择"
- }}</span>
- <span
- class="specification__text"
- v-for="(item, index) in sepcTextLsit"
- :key="index"
- >{{ item }}</span
- >
- </div>
- <i class="iconfont iconarrow specification__arrows"></i>
- </div>
- </button>
- <button
- v-if="!user.login"
- class="button"
- open-type="getUserInfo"
- lang="zh_CN"
- @getuserinfo="openSpec('spec', $event)"
- >
- <div class="specification" v-if="goods.skuList.length">
- <div class="specification__left">
- <img
- class="specification__img"
- src="/static/goods/specification.png"
- alt=""
- />
- <span class="specification__text">{{
- spec ? "已选择" : "请选择规格"
- }}</span>
- <span
- class="specification__text"
- v-for="(item, index) in sepcTextLsit"
- :key="index"
- >{{ item }}</span
- >
- </div>
- <i class="iconfont iconarrow specification__arrows"></i>
- </div>
- </button>
- <div class="activity">
- <div class="info">
- <my-image
- :src="activityData.brandLogo"
- class="shop-img"
- ></my-image>
- <div class="r">
- <div class="main">
- <div class="name">{{ activityData.brandName }}</div>
- <div class="other">
- <span class="tag"
- >{{
- activityData.onlineProductCount
- }}款</span
- >
- <span class="date">
- {{ activityData.endTime | viewDate2 }}</span
- >
- </div>
- </div>
- <span class="btn" @click="jumpList(activityData)"
- >进入会场</span
- >
- </div>
- </div>
- <div class="good-list">
- <section
- class="good-item"
- v-for="good of activityData.prods"
- :key="good.pid"
- @click="jumpDetail(good)"
- >
- <div class="box">
- <my-image
- mode="widthFix"
- :src="good.pictureUrls[0]"
- class="good-img"
- ></my-image>
- <div class="good-name">{{ good.name }}</div>
- <div class="price">
- ¥{{ good.minPrice | minuteToRmb2 }}
- </div>
- <div
- class="tag-price"
- v-if="
- good.maxPrice &&
- good.maxPrice !== good.minPrice
- "
- >
- ¥{{ good.maxPrice | minuteToRmb2 }}
- </div>
- </div>
- </section>
- </div>
- </div>
- <div class="describe" v-if="goods.itemInfo.desc">
- <!-- <div class="describe__title">商品描述</div> -->
- <ul class="describe__list">
- <li class="describe__item">{{ goods.itemInfo.desc }}</li>
- </ul>
- </div>
- <ul id="a" class="nav">
- <li
- class="nav__item"
- :class="{ 'nav__item--active': nav === 'a' }"
- @click="setNav('a')"
- >
- 图文详情
- </li>
- </ul>
- <div
- class="images"
- v-if="goods.detailUrlList && goods.detailUrlList.length"
- >
- <my-image
- class="images__item"
- mode="widthFix"
- :src="item"
- v-for="(item, index) in goods.detailUrlList"
- :key="index"
- ></my-image>
- </div>
- <div class="images" v-else>
- <my-image
- class="images__item"
- mode="widthFix"
- :src="item"
- v-for="(item, index) in goods.pictureUrls"
- :key="index"
- ></my-image>
- </div>
- <div class="explain">
- <ul class="explain-list">
- <li class="item">
- <div class="ex-des bold">划线价格</div>
- <div class="ex-des">
- 商品的专柜价、吊牌价、正品零售价、厂商指导价或该商品的曾经展示过的销售价等,<span
- class="bold"
- >并非原价</span
- >,仅供参考。
- </div>
- </li>
- <li class="item">
- <div class="ex-des bold">未划线价格</div>
- <div class="ex-des">
- 商品的<span class="bold">实时标价</span
- >,不因标书的差异改变性质,集体成交价格根据商品参加活动,或会员使用优惠券、积分等发生变化,最终以订单结算页价格为准。
- </div>
- </li>
- <li class="item">
- <div class="ex-des">
- 商家详情页(含主图)以图片或文字标注的一口价、促销价、优惠价等价格可能是在使用优惠券、满减或特定优惠活动和时段等情形下的价格,集体轻易结算页面的标价、优惠条件活动规则为准。
- </div>
- </li>
- <li class="item">
- <div class="ex-des">此说明仅当价格出现比较时有效。</div>
- </li>
- </ul>
- </div>
- <div class="bg-white">
- <div class="everybody">- 大家都在买 -</div>
- <ul class="goods">
- <li
- class="goods__item"
- v-for="(item, index) in goodsList"
- :key="index"
- >
- <my-image
- class="goods__img"
- :src="item.pictureUrls[0]"
- @click="jumpGoodsDetail(item)"
- ></my-image>
- <div
- class="goods__title"
- @click="jumpGoodsDetail(item)"
- >
- {{ item.name }}
- </div>
- <div
- class="goods__coupon"
- v-if="item.coupon"
- @click="jumpGoodsDetail(item)"
- >
- {{ item.coupon }}
- </div>
- <div class="goods__price">
- <div
- class="goods__present"
- @click="jumpGoodsDetail(item)"
- >
- <span class="goods__big"
- >¥{{ item.minPrice / 100 }}</span
- >
- </div>
- <div
- class="goods__original"
- @click="jumpGoodsDetail(item)"
- v-if="item.tagPrice !== 0"
- >
- {{ "¥" + item.tagPrice / 100 }}
- </div>
- </div>
- </li>
- </ul>
- <div
- class="more-text"
- v-if="goodsList.length && !isHaveMore && goodListLoading"
- >
- - 加载中 -
- </div>
- <div
- class="more-text"
- v-if="goodsList.length && !isHaveMore && !goodListLoading"
- >
- - 没有更多了 -
- </div>
- <div class="null" v-if="loading && !goodsList.length">
- <img
- class="null__img"
- src="/static/common/goods_null_2.jpg"
- alt
- />
- <div class="null__title">抱歉!没有找到相关商品~</div>
- </div>
- </div>
- </scroll-view>
- <!--<div class="back" @click="jump({isTabBer: true, path: '/pages/index/index'})">返回首页</div>-->
- <div class="navigation" :class="{ 'navigation--iphoneX': iphoneX }">
- <ul class="navigation__list">
- <button class="button" open-type="contact">
- <li class="navigation__item">
- <i class="iconfont iconkefu navigation__icon"></i>
- <div class="navigation__text">找客服</div>
- </li>
- </button>
- <li
- class="navigation__item"
- @click="
- jump({ isTabBer: true, path: '/pages/goods/index' })
- "
- >
- <i class="iconfont icondianpu navigation__icon"></i>
- <div class="navigation__text">首页</div>
- </li>
- <li class="navigation__item">
- <button v-if="user.login" class="button" @click="jumpCart">
- <i class="iconfont icongouwuche navigation__icon"></i>
- <div class="navigation__text">购物车</div>
- </button>
- <button
- v-else
- class="button"
- lang="zh_CN"
- open-type="getUserInfo"
- @getuserinfo="jumpCart"
- >
- <i class="iconfont icongouwuche navigation__icon"></i>
- <div class="navigation__text">购物车</div>
- </button>
- <div class="navigation__num" v-if="cartNum">
- {{ cartNum }}
- </div>
- </li>
- </ul>
- <div class="navigation__right">
- <button
- v-if="user.login"
- class="button"
- @click="openSpec('cart', $event)"
- >
- <div class="navigation__btn navigation__btn--cart">
- 加入购物车
- </div>
- </button>
- <button
- v-if="user.login"
- class="button"
- @click="openSpec('buy', $event)"
- >
- <div class="navigation__btn">立即购买</div>
- </button>
- <button
- v-if="!user.login"
- class="button"
- open-type="getUserInfo"
- lang="zh_CN"
- @getuserinfo="openSpec('cart', $event)"
- >
- <div class="navigation__btn navigation__btn--cart">
- 加入购物车
- </div>
- </button>
- <button
- v-if="!user.login"
- class="button"
- open-type="getUserInfo"
- lang="zh_CN"
- @getuserinfo="openSpec('buy', $event)"
- >
- <div class="navigation__btn">立即购买</div>
- </button>
- <div class="navigation__null" v-if="goods.totalInventory <= 0">
- 已售罄
- </div>
- </div>
- </div>
- <div
- class="canvas"
- v-show="canvasShow"
- @touchmove.stop=""
- @click="closeCanvas"
- >
- <div class="canvas__content">
- <div class="canvas__close">
- <img
- class="canvas__img"
- src="/static/live/close.png"
- alt=""
- />
- </div>
- <canvas
- class="canvas__box"
- canvas-id="canvas"
- :disable-scroll="true"
- @click.stop="viewImg()"
- ></canvas>
- </div>
- </div>
- <my-share ref="share" @share="saveImage" :hideMany="true"></my-share>
- <g-spec ref="spec" :goods="goods" :spec.sync="spec"></g-spec>
- <!-- <g-coupon ref="coupon" :goods-id="goodsId"></g-coupon> -->
- <canvas
- class="canvas__forward"
- canvas-id="canvas2"
- :disable-scroll="true"
- ></canvas>
- </div>
- </template>
- <script>
- import MyImage from "../../components/image/index";
- import GSpec from "./spec";
- import MyShare from "../../components/share/index";
- import config from "../../common/js/config";
- let app = getApp();
- export default {
- name: "",
- components: { MyImage, MyShare, GSpec },
- // 数据
- data() {
- return {
- roomId: "",
- videoId: "",
- goodsId: "",
- goods: "",
- nav: "a",
- scroll: "",
- cartNum: 0,
- spec: "",
- canvasShow: false,
- canvasHandleStatus: false,
- shoprRecommendList: [],
- couponText: "",
- canvasImgPath: "",
- deliveryConfig: null,
- layout: null,
- triggered: false,
- activityData: {},
- canvasforwardPath: "",
- page: 1,
- goodsList: [],
- loading: false,
- isHaveMore: false,
- goodListLoading: true,
- };
- },
- async onShow() {
- const self = this;
- console.log(1122);
- await self.fn.init();
- console.log("after");
- this.deliveryConfig = this.$store.state.common.storeConfig.deliveryConfig;
- self.fn.shareMenu();
- self.router.getScene(self.$mp.query).then((res) => {
- self.roomId = self.$mp.query.roomId || res.roomId;
- self.videoId = self.$mp.query.roomId || res.videoId;
- self.goodsId = self.$mp.query.goodsId || res.goodsId;
- self.getCartNumber();
- self.getGoodsDetail();
- });
- },
- onShareAppMessage() {
- const self = this;
- let obj = {
- ...self.$mp.query,
- // storeId: self.goods.storeInfo.storeId,
- shopId: this.activeShop.id,
- uid: this.user.user.id,
- };
- let title = self.goods.name;
- if (self.goods.skuList && self.goods.skuList.length) {
- title += " [" + self.goods.minPrice / 100 + "元起]";
- } else {
- title += " [" + self.goods.agentFee / 100 + "元]";
- }
- return {
- title: title,
- path: self.router.getPath(self.$mp.page.route, obj),
- imageUrl: self.canvasforwardPath || self.goods.pictureUrls[0],
- };
- },
- // 函数
- methods: {
- refresherrefresh() {
- const self = this;
- this.triggered = true;
- self.getCartNumber();
- self.getGoodsDetail();
- },
- // 获取商品详情
- getGoodsDetail() {
- const self = this;
- uni.showLoading({
- title: "加载中...",
- });
- self.api
- .get(
- "/Product/GetHHSGProduct",
- {
- pid: self.goodsId,
- },
- {
- pass: true,
- }
- )
- .then((res) => {
- uni.hideLoading();
- self.triggered = false;
- if (res.data) {
- let data = JSON.parse(res.data);
- self.goods = data;
- self.getActivity(data.activityNo);
- self.fn.setTitle(data.name);
- console.log(self.goods);
- self.creationShare2();
- self.getGoodsList();
- if (data.skuList && data.skuList.length === 1) {
- self.spec = data.skuList[0];
- self.spec.active = true;
- }
- } else {
- self.fn
- .showModal({
- title: "商品已下架",
- showCancel: false,
- })
- .then((res) => {
- if (res.confirm) {
- self.router.push({
- path: "/pages/goods/index",
- isTabBer: true,
- });
- }
- });
- }
- });
- },
- getActivity(aid) {
- this.api
- .get("/Product/GetActivity", {
- aid: aid,
- })
- .then((res) => {
- let data = JSON.parse(res.data);
- this.activityData = data;
- });
- },
- // 修改导航
- setNav(val) {
- const self = this;
- self.nav = val;
- self.scroll = val;
- },
- // 获取购物车数量
- getCartNumber() {
- const self = this;
- self.api.get("/Order/GetCartCount").then((res) => {
- self.cartNum = res.data;
- });
- },
- // 打开规则选项
- openSpec(type, user) {
- const self = this;
- let userInfo = user.detail.userInfo;
- if (!self.user.login) {
- self.$refs.spec.open(type, (res) => {
- if (type === "cart") {
- self.getCartNumber();
- self.fn.showToast("已成功加入购物车");
- } else if (type === "buy") {
- this.deliveryConfig = this.$store.state.common.storeConfig.deliveryConfig;
- if (this.deliveryConfig) {
- self.router.push({
- path: "/pages/order/affirm",
- query: {
- ids: res.data,
- productSource: 1,
- },
- });
- } else {
- self.fn
- .showModal({
- title: "提示",
- content: "你还未选择店铺,请选择店铺后购买",
- })
- .then((modal) => {
- if (modal.confirm) {
- self.router.push({
- path: "/pages/index/index",
- isTabBer: true,
- });
- }
- });
- }
- }
- });
- } else {
- if (userInfo) {
- self.api
- .post("/User/UpdateUserWechatInfo", userInfo)
- .then(() => {
- self.$store.commit("user/update", {
- login: true,
- userInfo: userInfo,
- });
- });
- self.$refs.spec.open(type, (res) => {
- if (type === "cart") {
- self.getCartNumber();
- } else if (type === "buy") {
- this.deliveryConfig = this.$store.state.common.storeConfig.deliveryConfig;
- if (this.deliveryConfig) {
- self.router.push({
- path: "/pages/order/affirm",
- query: {
- ids: res.data,
- productSource: 1,
- },
- });
- } else {
- self.fn
- .showModal({
- title: "提示",
- content:
- "你还未选择店铺,请选择店铺后购买",
- })
- .then((modal) => {
- if (modal.confirm) {
- self.router.push({
- path: "/pages/index/index",
- isTabBer: true,
- });
- }
- });
- }
- }
- });
- } else {
- self.fn.showToast("授权失败请重试");
- }
- }
- },
- jumpList(item) {
- this.router.replace({
- path: "/pages/recommend/list",
- query: {
- aid: item.activityNo,
- },
- });
- },
- jumpDetail(good) {
- this.router.replace({
- path: "/pages/recommend/detail",
- query: {
- goodsId: good.pid,
- },
- });
- },
- // 跳转到购物车
- jumpCart(user) {
- const self = this;
- let userInfo = user.detail.userInfo;
- if (self.user.login) {
- self.router.push({
- isTabBer: true,
- path: "/pages/cart/index",
- });
- } else {
- if (userInfo) {
- if (!self.user.login) {
- self.api
- .post("/User/UpdateUserWechatInfo", userInfo)
- .then(() => {
- self.$store.commit("user/update", {
- login: true,
- userInfo: userInfo,
- });
- });
- }
- self.router.push({
- isTabBer: true,
- path: "/pages/cart/index",
- });
- } else {
- self.fn.showToast("授权失败请重试");
- }
- }
- },
- // 跳转到商品详情
- // 打开分享
- oprenShare() {
- const self = this;
- self.$refs.share.open(() => {
- self.canvasShow = false;
- });
- },
- // 获取换算成画布使用的像素
- getPx(size) {
- let windowWidth = uni.getSystemInfoSync().windowWidth || 414;
- let multiple = (windowWidth / 1080) * (920 / 670);
- size = size * multiple;
- return Number(size.toFixed(2));
- },
- viewImg() {
- let self = this;
- //查看图片
- uni.previewImage({
- urls: self.canvasImgPath,
- longPressActions: true,
- });
- },
- // 关闭海报
- closeCanvas() {
- const self = this;
- self.canvasShow = false;
- },
- // swiper切换
- swiperChange(e) {
- let videoContext = uni.createVideoContext("goodVideo");
- let index = e.detail.current;
- if (videoContext) {
- if (index === 0) {
- videoContext.play();
- } else {
- videoContext.pause();
- }
- }
- },
- kefuTel() {
- if (this.activeShop.managerTelephone) {
- uni.makePhoneCall({
- phoneNumber: this.activeShop.managerTelephone,
- });
- } else {
- this.fn.showToast("当前店铺未设置客服手机号");
- }
- },
- // 保存图片到相册
- async saveImage(type) {
- const self = this;
- if (type === "single" && !self.canvasHandleStatus) {
- // 分享图
- self.canvasHandleStatus = true;
- // 获取用户设置
- uni.getSetting({
- success(res) {
- if (
- res.authSetting["scope.writePhotosAlbum"] === false
- ) {
- //用户拒绝权限打开设置界面
- self.fn
- .showModal({
- title: "图片保存失败",
- content:
- "需要你打开允许使用“相册”权限,才能成功保存图片",
- confirmText: "去设置",
- })
- .then((res) => {
- if (res.confirm) {
- self.canvasHandleStatus = false;
- self.fn.openSetting();
- }
- });
- } else {
- // 生成分享图
- self.creationShare().then((res) => {
- // 保存分享图到相册
- uni.saveImageToPhotosAlbum({
- filePath: res,
- success: function () {
- self.fn.showToast("保存成功");
- },
- complete: function () {
- self.canvasHandleStatus = false;
- },
- });
- });
- }
- },
- });
- }
- },
- // 创建分享图
- creationShare() {
- const self = this;
- const ctx = uni.createCanvasContext("canvas", self);
- uni.showLoading({
- title: "正在生成海报",
- });
- return new Promise((resolve) => {
- let logoUrl =
- "https://youxuan.ixiaokejia.com/home/forwardimg?url=" +
- encodeURI(self.goods.pictureUrls[0]);
- let brandLogo =
- "https://youxuan.ixiaokejia.com/home/forwardimg?url=" +
- encodeURI(self.goods.brandLogo);
- self.api.get(logoUrl).then((logoRes) => {
- self.api.get(brandLogo).then((brandLogoRes) => {
- self.router.getScene(self.$mp.query).then((res) => {
- res.uid = self.user.id;
- res.shopId = self.activeShop.id;
- Promise.all([
- uni.getImageInfo({
- src: brandLogoRes.data,
- }),
- uni.getImageInfo({
- src: logoRes.data,
- }),
- // 获取小程序吗
- self.api
- .get("/Share/GetQRCode", {
- path: self.$mp.page.route,
- paremeters: JSON.stringify(res),
- })
- .then((res) => {
- return uni.getImageInfo({
- src: res.data,
- });
- }),
- ]).then((res) => {
- // 背景
- ctx.setFillStyle("#fff");
- ctx.fillRect(
- 0,
- 0,
- self.getPx(670),
- self.getPx(1080)
- );
- // 头像
- if (res[0][1].path) {
- let avatarurl_width = self.getPx(70);
- let avatarurl_heigth = self.getPx(70);
- let avatarurl_x = self.getPx(30);
- let avatarurl_y = self.getPx(40);
- ctx.save();
- ctx.beginPath();
- ctx.arc(
- avatarurl_width / 2 + avatarurl_x,
- avatarurl_heigth / 2 + avatarurl_y,
- avatarurl_width / 2,
- 0,
- Math.PI * 2,
- true
- );
- ctx.clip();
- ctx.drawImage(
- res[0][1].path,
- avatarurl_x,
- avatarurl_y,
- avatarurl_width,
- avatarurl_heigth
- );
- ctx.restore();
- }
- // 昵称
- ctx.setFontSize(self.getPx(28));
- ctx.setFillStyle("#333");
- ctx.fillText(
- self.goods.brandName,
- self.getPx(115),
- self.getPx(90)
- );
- ctx.stroke();
- // // 商品图片
- ctx.drawImage(
- res[1][1].path,
- self.getPx(0),
- self.getPx(145),
- self.getPx(670),
- self.getPx(670)
- );
- // 商品标题,第一行
- let goodsName = self.goods.name;
- if (goodsName.length > 12) {
- goodsName = goodsName.substr(0, 12);
- }
- ctx.setFontSize(self.getPx(28));
- ctx.setFillStyle("#333");
- ctx.fillText(
- goodsName,
- self.getPx(50),
- self.getPx(880)
- );
- ctx.stroke();
- // 商品标题,第二行
- let goodsName2 = self.goods.name;
- if (goodsName2.length > 12) {
- goodsName2 =
- goodsName2.substr(12, 10) + "...";
- ctx.setFontSize(self.getPx(28));
- ctx.setFillStyle("#333");
- ctx.fillText(
- goodsName2,
- self.getPx(50),
- self.getPx(920)
- );
- ctx.stroke();
- }
- // 商品描述,第一行
- let descName = self.goods.description;
- if (descName.length > 14) {
- descName = descName.substr(0, 14);
- }
- ctx.setFontSize(self.getPx(24));
- ctx.setFillStyle("#666");
- ctx.fillText(
- descName,
- self.getPx(50),
- self.getPx(965)
- );
- ctx.stroke();
- // 商品描述,第二行
- let descName2 = self.goods.description;
- if (descName2.length > 14) {
- descName2 =
- descName2.substr(14, 14) + "...";
- ctx.setFontSize(self.getPx(24));
- ctx.setFillStyle("#666");
- ctx.fillText(
- descName2,
- self.getPx(50),
- self.getPx(995)
- );
- ctx.stroke();
- }
- // 商品价格符号
- ctx.setFontSize(self.getPx(20));
- ctx.setFillStyle("#f8662a");
- ctx.fillText(
- "¥",
- self.getPx(50),
- self.getPx(1050)
- );
- ctx.stroke();
- // 商品价格
- ctx.setFontSize(self.getPx(40));
- ctx.setFillStyle("#f8662a");
- ctx.fillText(
- self.goods.minPrice / 100,
- self.getPx(65),
- self.getPx(1050)
- );
- ctx.stroke();
- // 小程序吗
- ctx.drawImage(
- res[2][1].path,
- self.getPx(460),
- self.getPx(850),
- self.getPx(170),
- self.getPx(170)
- );
- // 长按扫码购买
- ctx.setFontSize(self.getPx(24));
- ctx.setFillStyle("#999");
- ctx.fillText(
- "长按扫码购买",
- self.getPx(470),
- self.getPx(1050)
- );
- ctx.stroke();
- ctx.draw();
- self.canvasShow = true;
- uni.hideLoading();
- setTimeout(() => {
- // 生成临时路径
- uni.canvasToTempFilePath({
- canvasId: "canvas",
- fileType: "jpg",
- success: function (res) {
- // self.canvasShow = false
- console.log(res.tempFilePath, 2222);
- self.canvasImgPath = [
- res.tempFilePath,
- ];
- resolve(res.tempFilePath);
- },
- });
- }, 100);
- });
- });
- });
- });
- });
- },
- // 创建分享图
- creationShare2() {
- const self = this;
- const ctx = uni.createCanvasContext("canvas2", self);
- return new Promise((resolve) => {
- self.router.getScene(self.$mp.query).then((res) => {
- res.uid = self.user.id;
- res.shopId = self.activeShop.id;
- Promise.all([
- uni.getImageInfo({
- src:
- "https://oss.ixiaokejia.com/images/common/share_bg.jpg",
- }),
- uni.getImageInfo({
- src:
- "https://oss.ixiaokejia.com/images/common/share_bg_box.png",
- }),
- uni.getImageInfo({
- src: self.goods.pictureUrls[0],
- }),
- uni.getImageInfo({
- src:
- "https://oss.ixiaokejia.com/images/common/share_tag1.jpg",
- }),
- uni.getImageInfo({
- src:
- "https://oss.ixiaokejia.com/images/common/share_tag2.png",
- }),
- ]).then((res) => {
- // 背景
- ctx.drawImage(res[0][1].path, 0, 0, 500, 400);
- // 标题
- ctx.setFontSize(28);
- ctx.setFillStyle("#fff");
- ctx.fillText("厂商直邮", 205, 40);
- ctx.stroke();
- ctx.setFontSize(24);
- ctx.setFillStyle("#fff");
- ctx.fillText("免费包邮,厂商快递直邮到家", 100, 75);
- ctx.stroke();
- // 背景box
- ctx.drawImage(res[1][1].path, 10, 92, 477, 292);
- // // 商品图片
- ctx.drawImage(res[2][1].path, 20, 100, 275, 275);
- // 特惠商品
- ctx.drawImage(res[3][1].path, 310, 110, 157, 46);
- ctx.setFontSize(28);
- ctx.setFillStyle("#fff");
- ctx.fillText("特惠商品", 330, 144);
- // 价格
- let minPrice = self.goods.minPrice / 100;
- ctx.setFontSize(38);
- ctx.setFillStyle("#f00");
- ctx.fillText("¥" + minPrice, 320, 220);
- ctx.stroke();
- // 价格2
- if (self.goods.tagPrice) {
- let tagPrice = self.goods.tagPrice / 100;
- ctx.setFontSize(28);
- ctx.setFillStyle("#999");
- ctx.fillText("¥" + tagPrice, 325, 265);
- ctx.fillRect(
- 328,
- 253,
- (String(tagPrice).length + 1) * 20,
- 2
- );
- ctx.stroke();
- }
- // buy
- ctx.drawImage(res[4][1].path, 307, 300, 170, 70);
- ctx.setFontSize(28);
- ctx.setFillStyle("#fff");
- ctx.fillText("立即购买", 335, 345);
- ctx.draw();
- setTimeout(() => {
- // 生成临时路径
- uni.canvasToTempFilePath({
- canvasId: "canvas2",
- fileType: "jpg",
- success: function (res) {
- // self.canvasShow = false
- self.canvasforwardPath = res.tempFilePath;
- },
- });
- }, 100);
- });
- });
- });
- },
- // 获取商品列表
- getGoodsList() {
- const self = this;
- self.page = 1;
- uni.showLoading({
- title: "加载中...",
- });
- this.goodListLoading = true;
- self.api
- .get("/Product/GetRelevant", {
- keyword: self.goods.name,
- pageIndex: self.page,
- pageSize: 20,
- })
- .then((res) => {
- this.goodListLoading = false;
- uni.hideLoading();
- uni.stopPullDownRefresh();
- let data = JSON.parse(res.data.list);
- if (data.length) {
- self.page++;
- } else {
- self.isHaveMore = false;
- }
- self.goodsList = data;
- self.loading = true;
- uni.hideLoading();
- });
- },
- // 获取更多商品
- getMoreGoods() {
- const self = this;
- this.goodListLoading = true;
- self.api
- .get("/Product/GetRelevant", {
- keyword: self.goods.name,
- pageIndex: self.page,
- pageSize: 20,
- })
- .then((res) => {
- this.goodListLoading = false;
- let data = JSON.parse(res.data.list);
- if (data.length) {
- self.page++;
- } else {
- self.isHaveMore = false;
- }
- self.goodsList = self.goodsList.concat(data);
- });
- },
- // 跳转到商品详情
- jumpGoodsDetail(val) {
- const self = this;
- self.router.replace({
- path: "/pages/recommend/detail",
- query: {
- goodsId: val.pid,
- },
- });
- },
- },
- // 数据计算
- computed: {
- activeShop() {
- return this.$store.state.common.activeShop;
- },
- // 判断主题 1:红色 2:绿色
- theme() {
- console.log(this.$store.state.common.theme, 111);
- return this.$store.state.common.theme;
- },
- user() {
- return this.$store.state.user;
- },
- distribution() {
- return this.$store.state.common.distribution;
- },
- sepcTextLsit() {
- const self = this;
- let list = [];
- if (self.spec) {
- list = [];
- list.push(self.spec.properties);
- }
- return list;
- },
- },
- // 数据监听
- watch: {},
- };
- </script>
- <style>
- page {
- height: 100%;
- }
- </style>
- <style lang="scss" scoped>
- .page {
- position: relative;
- height: 100%;
- &__scroll {
- position: absolute;
- top: 0;
- bottom: px(185);
- left: 0;
- right: 0;
- z-index: 1;
- &--iphoneX {
- bottom: px(215);
- }
- }
- }
- .swiper {
- width: 100%;
- height: px(1080);
- &__video {
- width: 100%;
- height: 100%;
- }
- &__img /deep/ img {
- width: px(1080);
- height: px(1080);
- }
- }
- .info {
- padding: px(40) 0 px(35) px(60);
- background-color: #fff;
- &__top {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- }
- &__num {
- display: flex;
- justify-content: center;
- align-items: center;
- width: px(165);
- height: px(56);
- font-size: px(30);
- color: #27a34f;
- border-radius: px(28) 0 0 px(28);
- background-color: #f8f8f8;
- }
- &__share {
- margin-top: px(40);
- font-size: px(44);
- color: #999;
- font-weight: 600;
- }
- &__bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: px(50);
- }
- &__title {
- @include omits(2);
- flex: 1;
- padding-right: px(35);
- font-size: px(44);
- color: #333;
- }
- }
- .price {
- display: flex;
- align-items: baseline;
- &__present {
- color: #27a34f;
- font-weight: 600;
- }
- &__rmb {
- font-size: px(38);
- }
- &__big {
- margin-left: px(10);
- font-size: px(68);
- }
- &__original {
- position: relative;
- margin-left: px(30);
- font-size: px(32);
- color: #999;
- &:after {
- content: "";
- position: absolute;
- top: 50%;
- left: 0;
- z-index: 1;
- width: 100%;
- height: px(1);
- transform: translateY(-100%);
- background-color: #999;
- }
- }
- }
- .share {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- padding: 0 px(60) 0 px(30);
- border-left: dashed px(3) #e7e7e7;
- &__icon {
- font-size: px(60);
- color: #262626;
- }
- &__img {
- width: px(50);
- height: px(50);
- object-fit: contain;
- }
- &__text {
- margin-top: px(10);
- font-size: px(30);
- color: #999;
- }
- }
- .specification {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: px(130);
- margin-top: px(30);
- padding: 0 px(60);
- background-color: #fff;
- &__left {
- display: flex;
- align-items: center;
- }
- &__img {
- width: px(34);
- height: px(34);
- margin-right: px(15);
- }
- &__text {
- margin-right: px(30);
- font-size: px(42);
- color: #333;
- }
- &__arrows {
- font-size: px(40);
- color: #999;
- }
- }
- .describe {
- // margin-top: px(30);
- padding: px(0) px(60) px(40);
- background-color: #fff;
- &__title {
- font-size: px(42);
- color: #333;
- font-weight: 700;
- }
- &__list {
- // margin-top: px(50);
- }
- &__item {
- // margin-top: px(15);
- font-size: px(36);
- color: #666;
- }
- }
- .nav {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: px(130);
- margin-top: px(30);
- background-color: #fff;
- &__item {
- font-size: px(44);
- color: #333;
- font-weight: 700;
- &:after {
- content: "";
- display: block;
- height: px(8);
- margin-top: px(20);
- background-color: #fff;
- }
- &--active {
- &:after {
- background-color: #333;
- }
- }
- }
- }
- .images {
- &__item /deep/ img {
- width: 100%;
- }
- }
- .recommend {
- margin-top: px(30);
- background-color: #fff;
- &__title {
- display: flex;
- align-items: center;
- padding: px(50) px(60);
- font-size: px(44);
- color: #333;
- font-weight: 700;
- }
- }
- .goods {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- padding: 0 px(25) px(30);
- &__item {
- width: px(500);
- padding-bottom: px(30);
- margin-top: px(25);
- overflow: hidden;
- border-radius: px(15);
- background-color: #fff;
- position: relative;
- &:nth-child(2n + 1) {
- margin-right: px(30);
- }
- }
- .button {
- // overflow: visible;
- // position: absolute;
- // bottom: 0;
- // right: 0;
- // z-index: 1;
- // padding: px(10) px(30) px(30) px(10);
- }
- .btns {
- overflow: visible;
- position: absolute;
- bottom: px(30);
- right: px(30);
- z-index: 1;
- display: flex;
- align-items: center;
- }
- .cart-num {
- // padding: px(30) px(10) px(10) px(30);
- padding: 0 px(30);
- box-sizing: border-box;
- min-width: px(60);
- }
- .num-input {
- overflow: visible;
- position: absolute;
- bottom: px(20);
- right: px(20);
- z-index: 1;
- }
- &__add-text {
- height: px(60);
- line-height: px(60);
- background-color: #27a34f;
- color: #fff;
- font-size: px(30);
- padding: 0 px(20);
- border-radius: px(30);
- }
- &__add {
- background-color: #27a34f;
- width: px(60);
- height: px(60);
- border-radius: 50%;
- // box-shadow: px(1) px(2) px(6) #27A34F;
- position: relative;
- &::after,
- &::before {
- content: "";
- position: absolute;
- top: 50%;
- left: 50%;
- z-index: 1;
- width: 60%;
- height: px(6);
- border-radius: px(6);
- background: #fff;
- }
- &::after {
- transform: translate(-50%, -50%);
- }
- &::before {
- transform-origin: center;
- transform: translate(-50%, -50%) rotate(90deg);
- }
- }
- &__remove {
- background-color: #fff;
- width: px(60);
- height: px(60);
- border-radius: 50%;
- border: 1px solid #999;
- position: relative;
- &::after {
- content: "";
- position: absolute;
- top: 50%;
- left: 50%;
- z-index: 1;
- width: 60%;
- height: px(6);
- border-radius: px(6);
- background: #999;
- transform: translate(-50%, -50%);
- }
- }
- &__img /deep/ img {
- width: px(500);
- height: px(500);
- }
- &__title {
- @include omits(2);
- height: px(100);
- margin: px(20);
- font-size: px(40);
- color: #333;
- }
- &__coupon {
- display: inline-flex;
- justify-content: center;
- align-items: center;
- height: px(40);
- padding: 0 px(15);
- margin: 0 px(20);
- font-size: px(30);
- color: #27a34f;
- border-radius: px(20);
- border: solid px(3) #27a34f;
- }
- &__price {
- display: flex;
- align-items: flex-end;
- padding: 0 px(20);
- margin-top: px(20);
- }
- &__present {
- color: #000;
- }
- &__rmb {
- font-size: px(30);
- }
- &__big {
- font-size: px(38);
- color: #27a34f;
- }
- &__original {
- position: relative;
- margin-left: px(20);
- font-size: px(32);
- color: #999;
- &:after {
- content: "";
- position: absolute;
- top: 50%;
- left: 0;
- z-index: 1;
- width: 100%;
- height: px(1);
- transform: translateY(-100%);
- background-color: #999;
- }
- }
- }
- .live {
- position: fixed;
- bottom: px(420);
- right: px(30);
- z-index: 995;
- width: px(150);
- height: px(150);
- }
- .back {
- position: fixed;
- bottom: px(290);
- right: 0;
- z-index: 995;
- display: flex;
- justify-content: center;
- align-items: center;
- width: px(225);
- height: px(90);
- font-size: px(36);
- color: #fff;
- border-radius: px(45) 0 0 px(45);
- background-color: #505050;
- }
- .navigation {
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 995;
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- height: px(185);
- padding: 0 px(40);
- background-color: #fff;
- &--iphoneX {
- height: px(215);
- padding-bottom: px(30);
- }
- &__list {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: px(400);
- }
- &__item {
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- &__icon {
- font-size: px(54);
- color: #666;
- }
- &__text {
- margin-top: px(20);
- font-size: px(32);
- color: #666;
- }
- &__num {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- min-width: px(40);
- height: px(40);
- padding: 0 px(15);
- transform: translate(30%, -30%);
- font-size: px(26);
- color: #fff;
- border-radius: px(20);
- background-color: #ff4421;
- }
- &__right {
- display: flex;
- justify-content: space-between;
- align-items: center;
- flex: 1;
- margin-left: px(40);
- }
- &__btn {
- display: flex;
- justify-content: center;
- align-items: center;
- width: px(270);
- height: px(110);
- font-size: px(40);
- color: #fff;
- border-radius: px(55);
- background-color: #27a34f;
- &--cart {
- color: #262626;
- background-color: #e5e5e5;
- }
- }
- &__null {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- height: px(110);
- font-size: px(40);
- color: #fff;
- border-radius: px(55);
- background-color: #e5e5e5;
- }
- }
- .null {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- padding-top: px(115);
- &__img {
- width: px(741);
- height: px(340);
- }
- &__title {
- margin-top: px(60);
- font-size: px(42);
- color: #666;
- }
- }
- .canvas {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 996;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.4);
- &__content {
- position: relative;
- width: 100%;
- height: 100%;
- padding: px(200) px(80) 0;
- z-index: 10;
- }
- &__close {
- position: absolute;
- top: px(50);
- right: px(120);
- z-index: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- width: px(100);
- height: px(100);
- border-radius: 50%;
- border: solid px(3) #fff;
- &:after {
- content: "";
- position: absolute;
- top: px(100);
- left: 50%;
- z-index: 1;
- display: block;
- width: px(3);
- height: px(50);
- transform: translateX(-50%);
- background-color: #fff;
- }
- }
- &__img {
- width: px(60);
- height: px(60);
- }
- &__box {
- width: px(920);
- height: px(1483);
- background-color: #fff;
- }
- }
- .canvas__forward {
- width: 500px;
- height: 400px;
- background-color: #fff;
- visibility: hidden;
- opacity: 0;
- position: fixed;
- left: -999px;
- top: -999px;
- z-index: -1;
- }
- .shop-recommend {
- margin-top: px(30);
- background-color: #fff;
- &__title {
- padding: px(50) px(55) 0;
- font-size: px(44);
- color: #333;
- font-weight: 700;
- }
- &__swiper {
- height: px(540);
- padding: 0 px(55);
- margin-top: px(50);
- }
- }
- .shop-goods {
- display: flex;
- height: 100%;
- &__item {
- width: px(305);
- height: 100%;
- margin-left: px(27.5);
- &:first-child {
- margin-left: 0;
- }
- }
- &__img /deep/ img {
- width: px(305);
- height: px(305);
- border-radius: px(10);
- }
- &__title {
- @include omits(2);
- height: px(100);
- margin-top: px(20);
- font-size: px(36);
- color: #333;
- font-weight: 700;
- }
- &__price {
- margin-top: px(25);
- font-size: px(36);
- font-weight: 600;
- }
- }
- .coupon {
- height: px(240);
- padding: 0 px(55);
- margin-top: px(30);
- background-color: #fff;
- &__title {
- display: flex;
- align-items: center;
- height: px(130);
- font-size: px(42);
- color: #333;
- font-weight: 700;
- border-bottom: solid px(3) #f8f8f8;
- }
- &__content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-top: px(30);
- }
- &__left {
- display: flex;
- align-items: center;
- flex: 1;
- margin-right: px(30);
- }
- &__label {
- display: flex;
- justify-content: center;
- align-items: center;
- width: px(155);
- height: px(50);
- font-size: px(36);
- color: #f66829;
- border-radius: px(25);
- border: solid px(3) #f66829;
- }
- &__text {
- @include omit(px(620));
- flex: 1;
- margin-left: px(30);
- font-size: px(36);
- color: #f66829;
- }
- &__right {
- display: flex;
- align-items: baseline;
- }
- &__btn {
- font-size: px(36);
- color: #999;
- }
- &__arrows {
- margin-left: px(30);
- font-size: px(40);
- color: #999;
- }
- }
- .coupon-info {
- display: flex;
- align-items: center;
- margin-top: px(40);
- &__label {
- width: px(33);
- height: px(33);
- }
- &__text {
- margin-left: px(10);
- font-size: px(36);
- color: #666;
- }
- &__price {
- margin-left: px(15);
- font-size: px(36);
- color: #f66829;
- }
- }
- .page_red {
- .info__num {
- color: #27a34f;
- }
- }
- .special {
- margin-top: px(10);
- background-color: #fff;
- padding: px(40);
- color: #666;
- .tit {
- font-size: px(44);
- text-align: center;
- }
- .des {
- font-size: px(38);
- padding-top: px(20);
- }
- }
- .info__tag {
- margin-top: px(40);
- .tag-item {
- font-size: px(36);
- margin: 0 px(16) px(16) 0;
- padding: 0 px(7);
- display: inline-block;
- line-height: px(56);
- border: 1px solid #d9d9d9;
- border-radius: px(4);
- opacity: 1;
- transition: all 0.3s;
- white-space: nowrap;
- color: #fa8c16;
- background: #fff7e6;
- border-color: #ffd591;
- }
- }
- .activity {
- padding: px(30);
- background-color: #fff;
- border-top: 1px solid #f1f1f1;
- margin-top: px(30);
- & ~ .shop-item {
- margin-top: px(30);
- }
- .info {
- display: flex;
- justify-content: space-between;
- .shop-img {
- width: px(110);
- margin-right: px(30);
- border: 1px solid #fafafa;
- flex-shrink: 0;
- /deep/ img {
- width: px(110);
- height: px(110);
- }
- }
- .r {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .main {
- width: 100%;
- }
- .btn {
- color: #fff;
- background-color: $color;
- padding: px(15) px(25);
- flex-shrink: 0;
- font-size: px(38);
- }
- .name {
- font-size: px(40);
- @include omits(2);
- }
- .other {
- margin-top: px(10);
- }
- .tag {
- height: px(44);
- font-size: px(32);
- line-height: px(44);
- padding: 0 px(8);
- display: inline-block;
- margin-right: px(15);
- color: $color;
- border: 1px solid $color;
- border-radius: px(5);
- }
- .date {
- display: inline-block;
- margin-left: px(10);
- font-size: px(38);
- color: #666;
- }
- }
- }
- .good-list {
- margin: px(30) px(20) 0;
- display: flex;
- .good-item {
- width: 33.333333%;
- padding: 0 px(20);
- }
- .good-img {
- width: 100%;
- /deep/ img {
- width: 100%;
- }
- }
- .good-name {
- margin-top: px(20);
- font-size: px(40);
- @include omits(2);
- }
- .price {
- margin-top: px(20);
- color: $color;
- font-size: px(42);
- }
- .tag-price {
- margin-top: px(10);
- color: #999;
- line-height: 1;
- font-size: px(36);
- text-decoration: line-through;
- }
- }
- }
- .info__deliveryDesc {
- font-size: px(42);
- color: #666;
- display: block;
- }
- .explain {
- padding: px(60) px(40);
- background-color: #fff;
- .item {
- margin-bottom: px(30);
- line-height: 1.4;
- font-size: px(38);
- color: #666;
- }
- .ex-des:first-child {
- position: relative;
- &::after {
- content: "";
- display: block;
- width: px(14);
- height: px(14);
- border-radius: 50%;
- position: absolute;
- top: px(23);
- left: px(-20);
- z-index: 10;
- background-color: rgb(152, 81, 84);
- }
- }
- .ex-des ~ .ex-des {
- margin-top: px(10);
- }
- }
- .bold {
- font-weight: bold;
- }
- .more-text {
- display: flex;
- justify-content: center;
- padding-bottom: px(60);
- font-size: px(34);
- color: #999;
- }
- .bg-white {
- background-color: #fff;
- margin-top: px(30);
- }
- .everybody {
- text-align: center;
- padding: px(30);
- font-size: px(44);
- }
- </style>
|