| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316 |
- <template>
- <view :class="[AppTheme]" class="container" v-if="cache">
- <view class="carousel">
- <u-swiper :list="appalbum" indicator indicatorMode="line" circular radius="0" height="750rpx" showTitle
- :autoplay="true" @click="previewImage(index)">
- </u-swiper>
- </view>
- <view class="introduce-section">
- <text class="title">{{ cache.name }}</text>
- <view class="price-box">
- <text class="price-tip">¥</text>
- <text class="price text-neutral">{{ cache.price }}</text>
- <text class="m-price">¥{{ cache.oprice }}</text>
- <!-- <text class="coupon-tip">7折</text> -->
- </view>
- <view class="bot-row">
- <text>销量: {{ cache.dissells }}</text>
- <text>单位: {{ cache.unit }}</text>
- <text>库存: {{ cache.num }}</text>
- </view>
- </view>
- <!-- 分享 -->
- <view class="share-section">
- <view class="share-icon">
- <text class="yticon icon-xingxing"></text>
- 返
- </view>
- <text class="tit">该商品分享可得佣金</text>
- <text class="yticon icon-bangzhu1"></text>
- <view class="share-btn" @click="opensharebox">
- <u-icon name="share" :color="primary" size="20"></u-icon>
- </view>
- </view>
- <view class="c-list">
- <view class="c-row b-b" @click="toggleSpec(0)">
- <text class="tit">购买类型</text>
- <view class="con">
- <text class="selected-text" v-for="(sItem, sIndex) in specSelected"
- :key="sIndex">{{ sItem.name }}</text>
- </view>
- <text class="yticon icon-you"></text>
- </view>
- <view class="c-row b-b">
- <text class="tit">温馨提示</text>
- <view class="bz-list con">
- <text>{{ cache.title }}</text>
- </view>
- </view>
- <!-- <view class="c-row b-b">
- <text class="tit">促销活动</text>
- <view class="con-list">
- <text>新人首单送20元无门槛代金券</text>
- <text>订单满50减10</text>
- <text>订单满100减30</text>
- <text>单笔购买满两件免邮费</text>
- </view>
- </view>
- <view class="c-row b-b">
- <text class="tit">服务</text>
- <view class="bz-list con">
- <text>7天无理由退换货 ·</text>
- <text>假一赔十 ·</text>
- </view>
- </view> -->
- </view>
- <view v-if="ifpeon" class="sel">
- <view>
- <u-checkbox-group size='35rpx' active-color="green" @change="checkboxChange">
- <u-checkbox name='tgxy' shape="circle" :checked="isChecked"></u-checkbox>
- </u-checkbox-group>
- </view>
- <text class="text" @click="goContract(partyinfo.id, 2)">
- 阅读并同意
- <text class="text-primary">《{{ partyinfo != null ? partyinfo.name : '暂无' }}》</text>
- </text>
- </view>
- <!-- 评价 -->
- <!-- <view class="eva-section">
- <view class="e-header">
- <text class="tit">评价</text>
- <text>(86)</text>
- <text class="tip">好评率 100%</text>
- <text class="yticon icon-you"></text>
- </view>
- <view class="eva-box">
- <image class="portrait" src="http://img3.imgtn.bdimg.com/it/u=1150341365,1327279810&fm=26&gp=0.jpg" mode="aspectFill"></image>
- <view class="right">
- <text class="name">Leo yo</text>
- <text class="con">商品收到了,79元两件,质量不错,试了一下有点瘦,但是加个外罩很漂亮,我很喜欢</text>
- <view class="bot">
- <text class="attr">购买类型:XL 红色</text>
- <text class="time">2019-04-01 19:21</text>
- </view>
- </view>
- </view>
- </view>
- -->
- <view class="farm" v-if="cache.farm_id">
- <view class="text_area">
- <view class="shop_name">
- <image :src="farm_info.farm_logo" :lazy-load="true" class="shop_thumbnail"></image>
- <view class="right_shop_mess">
- <view class="shop_line">
- <view class="shop_line_p1">{{farm_info.farm_name}}
- </view>
- <view class="right_shop_mess_p2" @click="gostoredetail(farm_info.id)">
- 进店逛逛
- </view>
- </view>
- <view class="shop_line_fl">
- </view>
- <view class="shop_line">
- <view class="shop_line_p2">
- <u-icon name="map" size="20" color="#9C9C9C"></u-icon>
- <view class="address">
- {{farm_info.farm_address}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="shop_one">
- <view class="shop_one_1">
- <view class="view1">{{farm_info.page_view}}</view>
- <view class="view2">访客数</view>
- </view>
- <view>
- <u-line color="#999998" direction="col" length='60%'></u-line>
- </view>
-
- <view class="shop_one_1">
- <view class="view1">{{farm_info.shopnum}}</view>
- <view class="view2">全部商品</view>
- </view>
- <view>
- <u-line color="#999998" direction="col" length='60%'></u-line>
- </view>
-
- <view class="shop_one_1">
-
- <view class="view1">{{farm_info.shoporder}}</view>
-
- <view class="view2">已售出</view>
- </view>
- </view>
- <!-- <view style="padding: 0 0 20rpx 0;">
- <u-album singleSize="75" multipleSize='75' singleMode="aspectFill"
- multipleMode="aspectFill" :urls="farm_info.detail_img" maxCount="4" :showMore='true'
- rowCount="4"></u-album>
- </view> -->
- </view>
-
-
-
-
-
-
- <view class="detail-desc">
- <view class="d-header"><text>商品详情</text></view>
- <u-parse :content="cache.content" :lazy-load="true" :show-with-animation="true">
- </u-parse>
- </view>
- <!-- 底部操作菜单 -->
- <view class="page-bottom">
- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
- <u-icon labelSize="12" color="#909399" label="首页" labelPos="bottom" labelColor="#909399" size="25"
- name="home"></u-icon>
- </navigator>
- <view class="p-b-btn" @click="gouwuche">
- <view class="">
- <u-icon labelSize="12" color="#909399" label="购物车" labelPos="bottom" labelColor="#909399" size="25"
- name="shopping-cart"></u-icon>
- </view>
- <view class="badge">
- <u-badge v-if="list.count" :showZero="false" size="mini" bgColor="red" :offset="offset"
- type="success" :value="list.count"></u-badge>
- </view>
- </view>
- <view class="p-b-btn " :class="{ active: favorite }" @click="toFavorite">
- <u-icon labelSize="12" :color="favorite?primary:'#909399'" label="收藏" labelPos="bottom"
- :labelColor="favorite?primary:'#909399'" size="25" name="heart-fill"></u-icon>
- </view>
- <view class="action-btn-group bg-linear-gradient">
- <button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(1)">加入购物车</button>
- <button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(2)">立即购买</button>
- </view>
- </view>
- <!-- 规格-模态层弹窗 -->
- <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec(0)">
- <!-- 遮罩层 -->
- <view class="mask"></view>
- <view class="layer attr-content" @click.stop="stopPrevent">
- <view class="a-t">
- <image :src=" apppic" v-if="apppic"></image>
- <view class="right">
- <text class="price text-neutral">¥{{ cache.price }}</text>
- <text class="stock">库存:{{ cache.num }}件</text>
- <view class="selected" v-if="skujson.length>0">
- 已选:
- <text class="selected-text">{{ sku.skuattr }}</text>
- </view>
- </view>
- </view>
- <view v-for="(item, index) in list.skuinfo" :key="index" class="attr-list">
- <text>{{ item.attrlabel }}</text>
- <view class="item-list">
- <text v-for="(childItem, childIndex) in item.allitems" v-if="childItem.checked === 1"
- :key="childIndex" class="tit" :class="{ selected: childItem.selected }"
- @click="selectSpec(childIndex, childItem.pid, item)">
- {{ childItem.name }}
- </text>
- </view>
- </view>
- <view class="row-between">
- <text>数量</text>
- <u-number-box v-model="num" @change="valChange" :max="cache.num * 1"></u-number-box>
- </view>
- <button class="btn bg-linear-gradient" @click="toggleSpec(isOpen)">完成</button>
- </view>
- </view>
- <!-- #ifdef MP-WEIXIN -->
- <nologin ref="nologin" v-on:loginback="loginback"></nologin>
- <!-- #endif -->
- <!-- 分享 -->
- <sharebox ref="sbox" v-if="sharedata" :data="sharedata"></sharebox>
- <admyself :opshow="true"></admyself>
- <tarpty :list='parttext' :tarptyshow="tarptyshow" @tarptycolse='tarptycolse' :type='2'></tarpty>
- </view>
- </template>
- <script>
- import api from '@/api/mall/index.js';
- import nologin from '@/components/nologin/nologin.vue';
- import tarpty from '@/components/ui-tarpty/ui-tarpty.vue';
- export default {
- components: {
- nologin,
- tarpty
- },
- data() {
- return {
- parttext: '',
- isChecked: false,
- tarptyshow: false,
- tarpty: '',
- partyinfo: {},
- ifpeon: false,
- primary: this.$theme.primary,
- goodslike: false,
- specClass: 'none',
- specSelected: [],
- offset: [5, 496],
- num: 1, // 默认为1
- list: '',
- cache: '',
- apppic: '',
- skujson: '',
- sku: '',
- isOpen: 0,
- favorite: false,
- shareList: [],
- imgList: [],
- specList: [],
- specChildList: [],
- settingFile: getApp().globalData.siteinfo,
- timer: null,
- appalbum: [],
- isc: '',
- sharedata: null,
- farm_info:''
- };
- },
- onLoad(options) {
- //接收传值,id里面放的是标题,因为测试数据并没写id
- this.$bindid.getbindid(options, this.$store);
- let id = options.id;
- this.isc = options.isc;
- this.shoopgoods(id);
- },
- onShow() {
- },
- onShareAppMessage(res) {
- let that = this
- let data = {
- title: that.sharedata.title,
- imageUrl: that.sharedata.imageUrl,
- path: that.sharedata.path
- };
- return data;
- },
- onShareTimeline(res) {
- let that = this
- let data = {
- title: that.sharedata.title,
- imageUrl: that.sharedata.imageUrl,
- path: that.sharedata.path
- };
- return data;
- },
- methods: {
- checkboxChange(e) {
- this.tarpty = e
- },
- goContract(id, type) {
- console.log(id,type,'kkkkkk')
- if (!this.parttext) {
- this.$api.msg(`暂无租赁协议,联系客服添加`);
- return;
- } else {
- this.tarptyshow = true
- }
- console.log(this.tarptyshow,'this.tarptyshow')
- },
- gostoredetail(farmid) { //跳转店铺详情
-
- uni.navigateTo({
- url: "/pagesC/pages/merchantdetails/merchantdetails?id=" + farmid
- })
- },
- loginback() {
- //登录回调
- },
- previewImage(index) { //预览商品详情轮播图片
- uni.previewImage({
- current: index,
- urls: this.appalbum,
- indicator: 'number'
- })
- },
- //规格弹窗开关
- toggleSpec(index) {
- /* 如果只点击规格 则不进行购买 || 添加购物车 */
- if (index == 0) {
- this.isOpen = 0
- if (this.specClass === 'show') {
- this.specClass = 'hide';
- setTimeout(() => {
- this.specClass = 'none';
- }, 250);
- } else if (this.specClass === 'none') {
- this.specClass = 'show';
- }
- return
- }
- if (index == 1) {
- if (this.specClass === 'show') {
- this.stock();
- // #ifdef MP-WEIXIN
- let id = uni.getStorageSync('userInfo').id;
- // #endif
- // #ifdef H5
- try{
- let id = uni.getStorageSync('userInfo').userinfo.id || uni.getStorageSync('userInfo').id;
- }catch(e){
- //TODO handle the exception
- console.log(e,'eee');
- }
- // #endif
- let obj = {
- sid: 0,
- goodstype: this.cache.type,
- goodsid: this.cache.id,
- num: this.num,
- isame: this.list.isadmin,
- sku: this.sku.sku,
- vipid: id
- };
- api.addtobasket(obj).then(res => {
- uni.showToast({
- title: res.data.msg,
- icon: 'none', //如果要纯文本,不要icon,将值设为'none'
- duration: 2000 //持续时间为 2秒
- })
- if (res.status == 200) {
- this.list.count = this.list.count + this.num;
- uni.showToast({
- title: res.data.msg,
- icon: 'none', //如果要纯文本,不要icon,将值设为'none'
- duration: 2000 //持续时间为 2秒
- })
- }
- });
- this.specClass = 'hide';
- setTimeout(() => {
- this.specClass = 'none';
- }, 250);
- } else if (this.specClass === 'none') {
- this.specClass = 'show';
- }
- return
- }
- /* 如果点击立即购买则为 2 */
- if (index == 2) {
- if (this.specClass === 'show') {
- this.stock();
- let id
- // #ifdef MP-WEIXIN
- id = uni.getStorageSync('userInfo').id;
- // #endif
- // #ifdef H5
- try{
- id = uni.getStorageSync('userInfo').id || uni.getStorageSync('userInfo').userinfo.id;
- }catch(e){
- console.log(e,'eeee2e');
- console.log(uni.getStorageSync('userInfo'),'ddddddddddddddd');
- //TODO handle the exception
- }
- // #endif
- let obj = {
- sid: 0,
- goodstype: this.cache.type,
- goodsid: this.cache.id,
- num: this.num,
- isame: this.list.isadmin,
- sku: this.sku.sku,
- vipid: id
- };
- api.fastbuys(obj).then(res => {
- if (res.status == 200) {
- uni.showToast({
- icon: 'loading',
- title: '生成订单',
- duration: 2000
- });
- setTimeout(() => {
- this.$u.route('/pagesD/pages/order/createOrder', {
- id,
- sid: 0,
- goodstype: this.cache.type,
- lasturl: this.list.lasturl,
- ftype: 2,
- goodsid: this.cache.id,
- });
- }, 2000);
- } else {
- this.$u.toast(res.msg);
- }
- });
- this.specClass = 'hide';
- setTimeout(() => {
- this.isOpen = 0
- this.specClass = 'none';
- }, 250);
- } else if (this.specClass === 'none') {
- this.specClass = 'show';
- }
- return
- }
- },
- //选择规格
- selectSpec(index, pid, item) {
- let list = item.allitems;
- let arr_sku = this.cache.id;
- list.forEach(item => {
- this.$set(item, 'selected', false);
- });
- this.$set(list[index], 'selected', true);
- for (let cItem of this.list.skuinfo) {
- for (let cItem2 of cItem.allitems) {
- if (cItem2.checked == 1 && cItem2.selected == true) {
- arr_sku += '-' + cItem2.path
- }
- }
- }
- if (this.skujson) {
- this.sku = this.skujson[arr_sku];
- }
- },
- //分享
- opensharebox() {
- this.$refs.sbox.opensharebox(this.sharedata);
- },
- //收藏
- toFavorite() {
- if (this.timer) return
- this.timer = setTimeout(() => {}, 1000)
- this.favorite = !this.favorite;
- let data = {
- id: this.cache.id,
- status: Number(this.favorite),
- goodstype: this.cache.type
- }
- api.goodslike(data).then(res => {
- this.timer = null
- this.$u.toast(res.msg)
- if (res.msg == "收藏成功") {
- this.goodslike = true
- } else if (res.msg == "取消成功") {
- this.goodslike = false
- }
- if (this.isc) {
- let pages = getCurrentPages();
- let prevPage = pages[pages.length - 2]; //获取到A页面
- prevPage.onLoad(); // 执行前一个页面的onLoad方法
- }
- })
- },
- // 库存校验
- stock() {
- if (this.cache.issku == 1) {
- if (this.cache.num - this.num < 0) {
- this.$api.msg(`该属性产品库存不足!请调整购买数量或选择其他属性!`);
- return;
- }
- } else {
- if (this.cache.num - this.num < 0) {
- this.$api.msg(`该属性产品库存不足!请调整购买数量或选择其他属性!`);
- return;
- }
- }
- },
- // 购买
- buy(e) {
- let that = this;
- if(that.ifpeon) {
- if (this.tarpty[0]!='tgxy') {
- this.$api.msg(`请同意${that.partyinfo.name}`);
- return;
- }
- }
- that.isOpen = e
- // #ifdef MP-WEIXIN
- if (that.$store.state.islogin()) {
- that.toggleSpec(that.isOpen)
- } else {
- that.$refs.nologin.open();
- }
- // #endif
- // #ifdef H5 || APP-PLUS
- that.toggleSpec(that.isOpen)
- // #endif
- },
- // 计步器
- valChange(e) {
- },
- stopPrevent() {},
- shoopgoods(id) {
- let that = this;
- api.shoopgoods({
- id: id + ''
- }).then(res => {
- let arr = []; //创建空数组
- if (res.status == 200) {
- if(res.data.party && res.data.party.id) {
- that.ifpeon = true
- that.partyinfo = res.data.party
- that.parttext = that.partyinfo.content
- console.log(res.data.party,'res.data.party');
- }
- that.sharedata = res.data.sharedata;
- that.farm_info=res.data.farm;
- that.sharedata.title = res.data.cache.name;
- that.sharedata.path = '/pagesD/pages/product/product?pid=' + that.$getuid() + '&id=' + id;
- that.list = res.data;
- that.cache = res.data.cache;
- that.apppic = res.data.apppic;
- that.appalbum = res.data.appalbum
- that.$store.state.lasturl = res.data.lasturl
- if (res.data.cache.issku == 1 && res.data.skujson !== "") {
- that.skujson = JSON.parse(res.data.skujson);
- } else {
- that.sku = {
- num: that.cache.num,
- price: that.cache.price
- };
- }
- that.favorite = that.cache.islike == 1 ? true : false
- /* 处理富文本*/
- that.cache.content = that.cache.content.replace(/\<img src="/gi,
- `<img style='width:100%;display:block' src="${that.settingFile.root_rich_img}`);
- if (res.data.skuinfo) {
- for (let cItem of res.data.skuinfo) {
- let num = 1;
- for (let cItem2 of cItem.allitems) {
- if (num == 1) {
- that.$set(cItem2, 'selected', false);
- arr.push(cItem2);
- }
- num++;
- }
- }
- }
- if (arr && arr.length > 0) {
- let arr_sku = that.cache.id;
- arr.forEach(item => {
- arr_sku += '-' + item.path
- /* 默认取第一个*/
- that.$set(item, 'selected', true);
- that.specSelected.push(item);
- })
- if (that.skujson) {
- that.sku = that.skujson[arr_sku];
- }
- }
- } else {
- that.$u.toast(res.msg);
- }
- });
- },
- gouwuche() {
- this.$u.route('pagesE/pages/cart/cart')
- }
- }
- };
- </script>
- <style lang="scss">
- /deep/.buy-now-btn:after {
- border: 0rpx
- }
- /deep/.add-cart-btn:after {
- border: 0rpx
- }
- page {
- background: $page-color-base;
- padding-bottom: 160upx;
- }
- .icon-you {
- font-size: $font-base + 2upx;
- color: #888;
- }
- .row-between {
- display: flex;
- justify-content: space-between;
- padding: 20rpx;
- }
- .carousel {
- height: 750rpx;
- position: relative;
- swiper {
- height: 100%;
- }
- .image-wrapper {
- width: 100%;
- height: 100%;
- }
- .swiper-item {
- display: flex;
- justify-content: center;
- align-content: center;
- height:750rpx;
- overflow: hidden;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- /* 标题简介 */
- .introduce-section {
- background: #fff;
- padding: 20upx 30upx;
- .title {
- font-size: 32upx;
- color: $font-color-dark;
- height: 50upx;
- line-height: 50upx;
- }
- .price-box {
- display: flex;
- align-items: baseline;
- height: 64upx;
- padding: 10upx 0;
- font-size: 26upx;
- color: $uni-color-primary;
- }
- .price {
- font-size: $font-lg + 2upx;
- }
- .m-price {
- margin: 0 12upx;
- color: $font-color-light;
- text-decoration: line-through;
- }
- .coupon-tip {
- align-items: center;
- padding: 4upx 10upx;
- background: $uni-color-primary;
- font-size: $font-sm;
- color: #fff;
- border-radius: 6upx;
- line-height: 1;
- transform: translateY(-4upx);
- }
- .bot-row {
- display: flex;
- align-items: center;
- height: 50upx;
- font-size: $font-sm;
- color: $font-color-light;
- text {
- flex: 1;
- }
- }
- }
- /* 分享 */
- .share-section {
- display: flex;
- align-items: center;
- color: $font-color-base;
- background: linear-gradient(left, #fdf5f6, #fbebf6);
- padding: 12upx 30upx;
- .share-icon {
- display: flex;
- align-items: center;
- width: 70upx;
- height: 30upx;
- line-height: 1;
- border: 1px solid $uni-color-primary;
- border-radius: 4upx;
- position: relative;
- overflow: hidden;
- font-size: 22upx;
- color: $uni-color-primary;
- justify-content: center;
- display: flex;
- &:after {
- content: '';
- width: 50upx;
- height: 50upx;
- border-radius: 50%;
- left: -20upx;
- top: -12upx;
- position: absolute;
- // background: $uni-color-primary;
- }
- }
- .icon-xingxing {
- position: relative;
- z-index: 1;
- font-size: 24upx;
- color: #fff;
- line-height: 1;
- }
- .tit {
- font-size: $font-base;
- margin-left: 10upx;
- }
- .icon-bangzhu1 {
- padding: 10upx;
- font-size: 30upx;
- line-height: 1;
- }
- .share-btn {
- flex: 1;
- display: flex;
- display: flex;
- justify-content: flex-end;
- font-size: $font-sm;
- color: $uni-color-primary;
- }
- .icon-you {
- font-size: $font-sm;
- margin-left: 4upx;
- color: $uni-color-primary;
- }
- }
- .c-list {
- font-size: $font-sm + 2upx;
- color: $font-color-base;
- background: #fff;
- .c-row {
- display: flex;
- align-items: center;
- padding: 20upx 30upx;
- position: relative;
- }
- .tit {
- width: 140upx;
- }
- .con {
- flex: 1;
- color: $font-color-dark;
- .selected-text {
- margin-right: 10upx;
- }
- }
- .bz-list {
- font-size: $font-sm + 2upx;
- color: $font-color-dark;
- text {
- display: inline-block;
- margin-right: 30upx;
- line-height: 38upx;
- }
- }
- .con-list {
- flex: 1;
- display: flex;
- flex-direction: column;
- color: $font-color-dark;
- line-height: 40upx;
- }
- .red {
- color: $uni-color-primary;
- }
- }
- /* 评价 */
- .eva-section {
- display: flex;
- flex-direction: column;
- padding: 20upx 30upx;
- background: #fff;
- margin-top: 16upx;
- .e-header {
- display: flex;
- align-items: center;
- height: 70upx;
- font-size: $font-sm + 2upx;
- color: $font-color-light;
- .tit {
- font-size: $font-base + 2upx;
- color: $font-color-dark;
- margin-right: 4upx;
- }
- .tip {
- flex: 1;
- text-align: right;
- }
- .icon-you {
- margin-left: 10upx;
- }
- }
- }
- .eva-box {
- display: flex;
- padding: 20upx 0;
- .portrait {
- flex-shrink: 0;
- width: 80upx;
- height: 80upx;
- border-radius: 100px;
- }
- .right {
- flex: 1;
- display: flex;
- flex-direction: column;
- font-size: $font-base;
- color: $font-color-base;
- padding-left: 26upx;
- .con {
- font-size: $font-base;
- color: $font-color-dark;
- padding: 20upx 0;
- }
- .bot {
- display: flex;
- justify-content: space-between;
- font-size: $font-sm;
- color: $font-color-light;
- }
- }
- }
- /* 详情 */
- .detail-desc {
- background-color: #FFFFFF;
- margin-top: 16upx;
- line-height: 40rpx;
- box-sizing: border-box;
- .d-header {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 80upx;
- font-size: $font-base + 2upx;
- position: relative;
- text {
- padding: 0 20upx;
- background: #fff;
- position: relative;
- z-index: 1;
- }
- &:after {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translateX(-50%);
- width: 300upx;
- height: 0;
- content: '';
- border-bottom: 1px solid #ccc;
- }
- }
- }
- /* 规格选择弹窗 */
- .attr-content {
- padding: 10upx 30upx;
- .a-t {
- position: relative;
- display: flex;
- image {
- width: 170upx;
- height: 170upx;
- flex-shrink: 0;
- margin-top: -40upx;
- border-radius: 8upx;
- }
- .right {
- display: flex;
- flex-direction: column;
- padding-left: 24upx;
- font-size: $font-sm + 2upx;
- color: $font-color-base;
- line-height: 42upx;
- .price {
- font-size: $font-lg;
- margin-bottom: 10upx;
- }
- .selected-text {
- margin-right: 10upx;
- }
- }
- }
- .attr-list {
- display: flex;
- flex-direction: column;
- font-size: $font-base + 2upx;
- color: $font-color-base;
- padding-top: 30upx;
- padding-left: 10upx;
- }
- .item-list {
- padding: 20upx 0 0;
- display: flex;
- flex-wrap: wrap;
- text {
- display: flex;
- align-items: center;
- justify-content: center;
- background: #eee;
- margin-right: 20upx;
- margin-bottom: 20upx;
- border-radius: 100upx;
- min-width: 60upx;
- height: 60upx;
- padding: 0 20upx;
- font-size: $font-base;
- color: $font-color-dark;
- }
- .selected {
- background: $tab-color-2;
- color: #fff;
- }
- }
- }
- /* 弹出层 */
- .popup {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- z-index: 99;
- &.show {
- display: block;
- .mask {
- animation: showPopup 0.2s linear both;
- }
- .layer {
- animation: showLayer 0.2s linear both;
- }
- }
- &.hide {
- .mask {
- animation: hidePopup 0.2s linear both;
- }
- .layer {
- animation: hideLayer 0.2s linear both;
- }
- }
- &.none {
- display: none;
- }
- .mask {
- position: fixed;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
- background-color: rgba(0, 0, 0, 0.4);
- }
- .layer {
- position: fixed;
- z-index: 99;
- bottom: 0;
- width: 94%;
- min-height: 40vh;
- border-radius: 10upx 10upx 0 0;
- background-color: #fff;
- .btn {
- height: 66upx;
- line-height: 66upx;
- border-radius: 100upx;
- font-size: $font-base + 2upx;
- color: #fff;
- margin: 30upx auto 20upx;
- }
- }
- @keyframes showPopup {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- @keyframes hidePopup {
- 0% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
- }
- @keyframes showLayer {
- 0% {
- transform: translateY(120%);
- }
- 100% {
- transform: translateY(0%);
- }
- }
- @keyframes hideLayer {
- 0% {
- transform: translateY(0);
- }
- 100% {
- transform: translateY(120%);
- }
- }
- }
- /* 底部操作菜单 */
- .page-bottom {
- position: fixed;
- left: 30upx;
- bottom: 30upx;
- z-index: 95;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 690upx;
- height: 100upx;
- background: rgba(255, 255, 255, 0.9);
- box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.5);
- border-radius: 16upx;
- .p-b-btn {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-size: $font-sm;
- color: $font-color-base;
- width: 96upx;
- height: 80upx;
- .yticon {
- font-size: 40upx;
- line-height: 48upx;
- color: $font-color-light;
- }
- &.active,
- &.active .yticon {}
- .icon-fenxiang2 {
- font-size: 42upx;
- transform: translateY(-2upx);
- }
- .icon-shoucang {
- font-size: 46upx;
- }
- .badge {
- position: absolute;
- top: -10rpx;
- right: 8rpx;
- }
- }
- .action-btn-group {
- display: flex;
- height: 76upx;
- border-radius: 100px;
- overflow: hidden;
- margin-left: 20upx;
- position: relative;
- &:after {
- content: '';
- position: absolute;
- top: 50%;
- right: 50%;
- transform: translateY(-50%);
- height: 28upx;
- width: 0;
- border-right: 1px solid rgba(255, 255, 255, 0.5);
- }
- .action-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 180upx;
- height: 100%;
- font-size: $font-base;
- padding: 0;
- border-radius: 0;
- background: transparent;
- }
- }
- }
- .text_area {
- .shop_name {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .shop_thumbnail {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- }
-
- .right_shop_mess {
- width: calc(100% - 90rpx);
- // margin-left: 15rpx;
- .shop_line {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .shop_line_p1 {
- color: #1f1f1f;
- font-size: 32rpx;
- padding-left: 3rpx;
- font-weight: 300;
- }
-
- .shop_line_p2 {
- width: 100%;
- display: flex;
- align-items: center;
-
- .address {
- color: #333;
- font-size: 26rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
-
- .shop_line_fl {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin: 5rpx 0;
- }
-
- .right_shop_mess_p2 {
- border: 1rpx solid #cccccc;
- color: #666;
- font-size: 24rpx;
- padding: 12rpx 20rpx;
- border-radius: 40rpx;
- }
- }
- }
- }
-
- .shop_one {
- display: flex;
- justify-content: space-evenly;
- padding: 30rpx 0rpx;
-
- .shop_one_1 {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .view1 {
- font-size: 28rpx;
- margin-bottom: 10rpx;
-
- }
-
- .view2 {
- font-size: 24rpx;
- color: #999999;
- }
- }
- }
- .farm{
- background-color: #ffffff;
- margin-top: 20rpx;
- padding: 20rpx 20rpx 0rpx 20rpx;
- }
- .sel {
- height: 96rpx;
- padding: 0 20rpx;
- display: flex;
- align-items: center;
- border-bottom: 1px solid #f2f2f2;
- background-color: #ffffff;
- }
-
- .sel .ipt {
- height: 40rpx;
- width: 40rpx;
- border-radius: 10rpx;
- }
-
- .sel .text {
- position: relative;
- top: -2rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: rgba(0, 0, 0, 1);
- }
- </style>
|