123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794 |
- <template>
-
- <view class="goodCate">
-
- <view class="mp-header">
- <view class="sys-head" :style="{ height: sysHeight }"></view>
- <view class="serch-box" style="height: 43px;">
- <view class="serch-wrapper acea-row row-middle">
- <button v-if="info.store_splicing_switch" class="group-button" hover-class="none" @tap="onCollage">
- <text class="iconfont icon-pindan"></text>拼单
- </button>
- <navigator url="/pages/goods/goods_search/index" class="input acea-row row-center-wrapper" hover-class="none">
- <text class="iconfont icon-xiazai5"></text>
- 搜索商品信息
- </navigator>
- </view>
- </view>
-
- <view class="store-address">
- <view class="address acea-row row-middle" @click="goMap()">
- <view class="name line1">{{info.name || '暂无门店'}}</view>
- <text class="iconfont icon-xiangyou" />
- </view>
- <view class="distance">
- 门店距您{{info.range||0}}km
- </view>
- <view class="time">
- 营业时间:{{info.day_time || '-'}}
- </view>
- <view class="switch acea-row row-between-wrapper">
- <view class="title" :class="{'on': switchNum == item.key,'onLeft':switchNum != 1 && switchNum == item.key}"
- v-for="(item, index) in deliveryList" :key="item.key" @click="swithFn(item.key)">{{item.name}}</view>
- </view>
- </view>
-
- </view>
-
-
- <view class="header acea-row row-center-wrapper">
- <view class="search-box acea-row row-middle">
- <button v-if="isSplicingPlatform && info.store_splicing_switch" class="group-button" hover-class="none" @tap="onCollage">
- <text class="iconfont icon-pindan"></text>拼单
- </button>
- <navigator url="/pages/goods/goods_search/index" class="search acea-row row-middle" hover-class="none">
- <text class="iconfont icon-sousuo5"></text>
- 搜索商品信息
- </navigator>
- </view>
- <view class="store-address">
- <view class="address acea-row row-middle" @click="goMap()">
- <view class="name line1">{{info.name || '暂无门店'}}</view>
- <text class="iconfont icon-xiangyou" />
- </view>
- <view class="distance">
- 门店距您{{info.range||0}}km
- </view>
- <view class="time">
- 营业时间:{{info.day_time || '-'}}
- </view>
- <view class="switch acea-row row-between-wrapper">
- <view class="title" :class="{'on': switchNum == item.key,'onLeft':switchNum != 1}"
- v-for="(item, index) in deliveryList" :key="item.key" @click="swithFn(item.key)">{{item.name}}</view>
- </view>
- </view>
- </view>
- <view class="conter">
-
-
- <view class="conter" :style="'padding-top:'+marTop+'px'">
-
-
- <view class='aside' :style="'top:'+marTop+'px'">
-
-
- <view class='aside'>
-
- <view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""'
- v-for="(item,index) in categoryList" :key="index" @click="tapNav(index,item)">
- <text>{{item.cate_name}}</text>
- </view>
- </view>
- <view class="wrapper">
- <view class="bgcolor" v-if="iSlong">
-
- <view class="longTab acea-row row-middle" :style="'top:'+marTop+'px'">
-
-
- <view class="longTab acea-row row-middle">
-
- <scroll-view scroll-x="true" style="white-space: nowrap; display: flex;height:44rpx;"
- scroll-with-animation :scroll-left="tabLeft" show-scrollbar="true">
- <view class="longItem" :style='"width:"+isWidth+"px"' :class="index===tabClick?'click':''"
- v-for="(item,index) in categoryErList" :key="index" @click="longClick(index)">
- {{item.cate_name}}
- </view>
- </scroll-view>
- </view>
-
- <view class="openList" :style="'top:'+marTop+'px'" @click="openTap"><text
- class="iconfont icon-xiangxia"></text></view>
-
-
- <view class="openList" @click="openTap"><text class="iconfont icon-xiangxia"></text></view>
-
- </view>
- <view v-else>
-
- <view class="downTab" :style="'margin-top:'+marTop+'px'">
-
-
- <view class="downTab">
-
- <view class="title acea-row row-between-wrapper">
- <view>{{categoryTitle}}</view>
- <view class="closeList" @click="closeTap"><text class="iconfont icon-xiangxia"></text>
- </view>
- </view>
- <view class="children">
- <view class="acea-row row-middle">
- <view class="item line1" :class="index===tabClick?'click':''"
- v-for="(item,index) in categoryErList" :key="index" @click="longClick(index)">
- {{item.cate_name}}
- </view>
- </view>
- </view>
- </view>
- <view class="mask" @click="closeTap"></view>
- </view>
-
- <goodClass :tempArr="tempArr" :isLogin="isLogin" @gocartduo="goCartDuo" @gocartdan="goCartDan"
- @ChangeCartNumDan="ChangeCartNumDan" @detail="goDetail"></goodClass>
- <view class='loadingicon acea-row row-center-wrapper'>
- <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
- </view>
- </view>
- </view>
- <view class="footer acea-row row-between-wrapper" :class="isFooter?'':'on'">
- <view class="cartIcon acea-row row-center-wrapper" @click="getCartList(0)" v-if="cartNum>0">
-
- {{cartNum}}
- <uni-badge class="uni-badge-left-margin" :text="cartNum" absolute="rightTop">
- <view class="iconfont icon-gouwuche-yangshi2"></view>
- </uni-badge>
- </view>
- <view class="cartIcon acea-row row-center-wrapper noCart" v-else>
- <view class="iconfont icon-gouwuche-yangshi2"></view>
- </view>
- <view class="acea-row row-middle" :class="cartNum>0?'':'noCart'">
- <view class="money">¥<text class="num">{{totalPrice}}</text></view>
- <view class="bnt" @click="subOrder">去结算</view>
- </view>
- </view>
-
- <view v-if="isSplicingPlatform" :class="{ mask: collageVisible }" @tap="onCollageClose"></view>
- <view v-if="isSplicingPlatform" :class="{ 'dialog-footer': isFooter, active: collageVisible }" class="dialog">
- <view class="dialog-head">
- <view v-for="item in deliveryList" :key="item.key" :class="{ active: collageDelivery == item.key }" class="button" @tap="collageDeliveryChange(item.key)">
- <text :class="['iconfont', item.icon]"></text>{{ item.name }}
- </view>
- </view>
- <view class="dialog-body">
- <view class="">{{ collageDelivery == 1 ? '配送地址' : '自提门店' }}</view>
- <view class="dialog-body-main">
- <view class="dialog-body-main-inner">
- <view v-if="collageDelivery == 2 || collageAddress.id" class="dialog-body-left">
- <view class="dialog-body-name">
- {{ collageDelivery == 1 ? `${collageAddress.province}${collageAddress.city}${collageAddress.district}${collageAddress.detail}` : collageStore.name }}
- <text v-if="collageDelivery == 2" class="tag">距离{{ collageStore.range || 0 }}km</text>
- </view>
- <view class="dialog-body-info">
- <view v-if="collageDelivery == 2" class="item">
- <text class="iconfont icon-weizhi"></text>{{ collageStore.detailed_address }}
- </view>
- <view v-if="collageDelivery == 1" class="item">
- {{ collageAddress.real_name }} {{ collageAddress.phone }}
- </view>
- <view v-else class="item">
- <text class="iconfont icon-shijian"></text>营业时间:{{ collageStore.day_time || '-' }}
- </view>
- </view>
- </view>
- <view v-if="collageDelivery == 1 && !collageAddress.id" class="dialog-body-left">您还未选择配送地址,先去选择您的收货地址再下单吧~</view>
- <view v-if="collageDelivery == 2" class="dialog-body-right" @tap="showMaoLocation"><text class="iconfont icon-dingwei2"></text></view>
- </view>
- <view class="dialog-body-main-btn">
- <view v-if="collageDelivery == 1" class="" @tap="onAddress">{{ collageAddress.id ? '切换地址' : '选择地址' }}<text class="iconfont icon-xiangyou" /></view>
- <view v-if="collageDelivery == 2" class="" @tap="goMap(1)">切换门店<text class="iconfont icon-xiangyou" /></view>
- </view>
- </view>
- </view>
- <view class="dialog-foot">
- <button class="button" hover-class="none" @tap="onCollageClose">我再想想</button>
- <button class="button primary" hover-class="none" @tap="initCollage">发起拼单</button>
- </view>
- </view>
- <addressWindow v-if="isSplicingPlatform" ref="addressWindow" :isFooter='isFooter' :address="address" :pagesUrl="pagesUrl" @changeClose="onAddress" @OnChangeAddress="onAddressChange"></addressWindow>
-
-
- <cartList :cartData="cartData" :isFooter='isFooter' @closeList="closeList" @ChangeCartNumDan="ChangeCartList"
- @ChangeSubDel="ChangeSubDel" @ChangeOneDel="ChangeOneDel"></cartList>
-
- <productWindow :isFooter="isFooter" :attr="attr" :isShow='1' :iSplus='1' :iScart='1' @myevent="onMyEvent"
- @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNumDuo" @attrVal="attrVal" @iptCartNum="iptCartNum"
- @goCat="goCatNum" :is_vip="is_vip" id='product-window'></productWindow>
-
-
-
- </view>
- </template>
- <script>
- let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
- import {
- vcartList,
- getCartCounts,
- cartDel
- } from '@/api/order.js';
- import {
- getCategoryList,
- getAttr,
- postCartNum,
- initCollage,
- hasCollage,
- isWithin,
- } from '@/api/store.js';
- import {
- getProducts,
- getCustomerList,
- getStoreCategory,
- getStoreBrand
- } from '@/api/new_store.js';
- import productWindow from '@/components/productWindow/index';
- import goodClass from '@/components/goodClass';
- import cartList from '@/components/cartList';
-
- import { getAddressDefault } from '@/api/user.js';
- import addressWindow from '@/components/addressWindow';
-
- import {
- mapState,
- mapGetters
- } from 'vuex';
- import {
- goShopDetail
- } from '@/libs/order.js';
- import {
- toLogin
- } from '@/libs/login.js';
- export default {
- computed: {
- ...mapState({
- cartNum: state => state.indexData.cartNum
- }),
- ...mapGetters(['isLogin', 'uid', 'cartNum'])
- },
- components: {
- productWindow,
- goodClass,
- cartList,
-
- addressWindow
-
- },
- props: {
- isFooter: {
- type: Boolean,
- default: false
- },
- info: {
- type: Object,
- default: {}
- },
-
- },
- data() {
- return {
-
-
-
-
- deliveryList:[
- {name:'自提',key:2,icon:'icon-ziti'},
- {name:'配送',key:1,icon:'icon-peisong1'},
- ],
- marTop: 0,
- switchNum: 1,
- sysHeight: sysHeight,
- categoryList: [],
- navActive: 0,
- categoryTitle: '',
- categoryErList: [],
- tabLeft: 0,
- isWidth: 0,
- tabClick: 0,
- iSlong: true,
- tempArr: [],
- loading: false,
- loadend: false,
- loadTitle: '加载更多',
- page: 1,
- limit: 10,
- cid: 0,
- sid: 0,
- delivery_type:3,
- isAuto: false,
- isShowAuth: false,
- attr: {
- cartAttr: false,
- productAttr: [],
- productSelect: {}
- },
- productValue: [],
- attrValue: '',
- storeName: '',
- id: 0,
- cartData: {
- cartList: [],
- iScart: false
- },
- totalPrice: 0.00,
- lengthCart: 0,
- is_vip: 0,
- cart_num: 0,
- storeInfo: {},
-
- collageVisible: false,
- collageDelivery: 2,
- address: {
- address: false,
- },
- pagesUrl: '',
- collageStore: this.info,
- collageAddress: {},
- isSplicingPlatform: true,
-
- }
- },
- watch: {
-
- collageDelivery() {
- this.collageStore = this.info;
- }
-
- },
- mounted() {
- let that = this;
-
-
- uni.getSystemInfo({
- success(e) {
- that.isWidth = e.windowWidth / 5
- }
- });
- uni.$on('newAttrNum',(data)=>{
- if(data.length){
- this.tempArr.forEach((item)=>{
- data.forEach(j=>{
- if(item.id == j.id){
- item.cart_num = j.num
- }
- })
- })
- this.getCartList(1);
- }
- })
- uni.$on('newCartNum',(data)=>{
- if(data.length){
- this.tempArr.forEach((item)=>{
- data.forEach(j=>{
- if(item.id == j.product_id){
- item.cart_num = 0
- }
- })
- })
- this.getCartList(1);
- }
- })
-
- this.isSplicingPlatform = this.$wechat.isWeixin();
-
-
- if (this.isSplicingPlatform && this.info.store_splicing_switch) {
- this.collageDelivery = this.info.is_store ? 2 : 1;
- uni.$on('activeFn', data => {
- this.collageStore = data;
- });
- uni.$on('addressChange', data => {
- this.collageAddress = data;
- this.address.addressId = data.id;
- });
- }
-
- },
- methods: {
-
- showMaoLocation() {
- let data = {
- latitude: Number(this.collageStore.latitude),
- longitude: Number(this.collageStore.longitude),
- name: this.collageStore.name,
- address: `${this.collageStore.address}-${this.collageStore.detailed_address}`,
- };
-
- if (this.$wechat.isWeixin()) {
- data.scale = 13;
- return this.$wechat.seeLocation(data);
- }
-
- uni.openLocation(data);
- },
-
- getAddressDefault() {
- getAddressDefault().then(res => {
- const data = res.data;
- if (Array.isArray(data)) {
- return;
- }
- this.onAddressChange(data.id, data, true);
- });
- },
-
- onCollage() {
- if (!this.isLogin) {
- return toLogin();
- }
- hasCollage().then(res => {
- const collageId = res.data.collageId;
- if (collageId) {
- uni.navigateTo({
- url: `/pages/store/group_buy/index?collage_id=${collageId}`
- });
- } else{
- this.getAddressDefault();
- this.$refs.addressWindow.getAddressList();
- this.collageVisible = true;
- }
- });
- },
-
- initCollage() {
- let data = {
- store_id: this.collageStore.id,
- address_id: this.collageAddress.id || 0,
- shipping_type: this.collageDelivery == 1 ? 3 : 2
- };
- initCollage(data).then(res => {
- this.collageVisible = false;
- uni.navigateTo({
- url: `/pages/store/group_buy/index?collage_id=${res.data.collageId}`
- });
- }).catch(err => {
- this.$util.Tips({
- title: err
- });
- });
- },
-
- onAddressChange(id, data, isInit) {
- isWithin({
- store_id: this.collageStore.id,
- address_id: id
- }).then(() => {
- if (!isInit) {
- this.onAddress();
- }
- this.collageAddress = data;
- this.address.addressId = data;
- }).catch(() => {
- if (!isInit) {
- this.$util.Tips({
- title: '您选择的地址超出门店配送范围,请重新选择'
- });
- }
- });
- },
- onCollageClose() {
- this.collageVisible = false;
- },
-
- collageDeliveryChange(key) {
- if (key != 2 || this.info.is_store) {
- this.collageDelivery = key;
- }
- },
-
- onAddress() {
- this.address.address = !this.address.address;
- this.pagesUrl = '/pages/users/user_address_list/index?isCollage=1&store_id='+this.info.id
- this.$refs.addressWindow.getAddressList();
- },
-
- getNoCart(){
- if(this.cartNum<=0){
- this.tempArr.forEach((item)=>{
- item.cart_num = 0
- })
- this.totalPrice = 0;
- }
- },
-
- onLoadFun() {
- setTimeout(function(){
- this.isShowAuth = false;
- },10)
- },
-
- authColse: function(e) {
- this.isShowAuth = e
- },
- updateFun(e) {
- if (e.cartNum) {
- this.tempArr.forEach((item) => {
- if (item.id == e.id) {
- item.cart_num = e.cartNum
- }
- })
- }
- },
-
- getProducts() {
- let that = this;
- if (that.loadend) return;
- if (that.loading) return;
- that.loading = true;
- getProducts({
- page: that.page,
- limit: that.limit,
- type: 1,
- cid: that.cid,
- sid: that.sid,
- store_id: that.info.id,
- delivery_type:that.delivery_type,
- }).then(res => {
- let list = res.data,
- loadend = list.length < that.limit;
- that.tempArr = that.$util.SplitArray(list, that.tempArr);
- that.$set(that, 'tempArr', that.tempArr);
- that.loading = false;
- that.loadend = loadend;
- that.loadTitle = loadend ? "没有更多内容啦~" : "加载更多";
- that.page = that.page + 1;
- }).catch(err => {
- that.loading = false;
- that.loadTitle = '加载更多'
- });
- },
-
- swithFn(num) {
- this.switchNumFun(num);
- this.page = 1;
- this.loadend = false;
- this.tempArr = []
- this.getProducts()
- },
- switchNumFun(num){
- switch (num) {
- case 1:
- this.switchNum = 1
- this.delivery_type = '3'
- break;
- case 2:
- this.switchNum = 2
- this.delivery_type='2'
- break;
- }
- },
-
- goMap(val = 0) {
- uni.navigateTo({
-
- url: `/pages/store/store_list/index?storeFrom=1&type=1&storeId=${val ? this.collageStore.id : this.info.id}&isCollage=${val}`,
- success(res) {
- console.log('成功啦', res);
- },
- fail(err) {
- console.log('失败啦', err);
- }
- })
- },
- getMarTop() {
-
- let that = this;
- setTimeout(() => {
-
- let info = uni.createSelectorQuery().in(this).select(".mp-header");
- info.boundingClientRect(function(data) {
- that.marTop = data.height
- }).exec()
- }, 100)
-
- },
-
- subOrder: function() {
- let that = this,
- list = that.cartData.cartList,
- ids = [];
- if (list.length) {
- list.forEach(item => {
- if(item.attrStatus && item.status){
- ids.push(item.id)
- }
- });
- uni.navigateTo({
- url: '/pages/goods/order_confirm/index?cartId=' + ids.join(',')+'&delivery_type='+that.delivery_type + '&store_id=' + that.info.id
- });
- that.cartData.iScart = false;
- } else {
- return that.$util.Tips({
- title: '请选择产品'
- });
- }
- },
-
- getTotalPrice: function() {
- let that = this,
- list = that.cartData.cartList,
- totalPrice = 0.00;
- list.forEach(item => {
- if (item.attrStatus && item.status) {
- totalPrice = that.$util.$h.Add(totalPrice, that.$util.$h.Mul(item.cart_num, item
- .truePrice));
- }
- })
-
-
-
-
-
- that.$set(that, 'totalPrice', totalPrice);
- },
- ChangeSubDel: function(event) {
- let that = this,
- list = that.cartData.cartList,
- ids = [],
- storeId = uni.getStorageSync('user_store_id');
- list.forEach(item => {
- ids.push(item.id)
- });
- cartDel(ids.join(","),storeId).then(res => {
- that.$set(that.cartData, 'cartList', []);
- that.cartData.iScart = false;
- that.totalPrice = 0.00;
- that.page = 1;
- that.loadend = false;
- that.tempArr = [];
- that.getProducts();
- that.getCartNum();
- })
- },
- ChangeOneDel: function(id, index) {
- let that = this,
- list = that.cartData.cartList,
- storeId = uni.getStorageSync('user_store_id');
- cartDel(id.toString(),storeId).then(res => {
- list.splice(index, 1);
- if (!list.length) {
- that.cartData.iScart = false;
- that.page = 1;
- that.loadend = false;
- that.tempArr = [];
- that.getProducts();
- };
- that.getCartNum();
- })
- },
- getCartList(iSshow) {
- let that = this;
- let data = {
- store_id:that.info.id
- };
- vcartList(data).then(res => {
- that.$set(that.cartData, 'cartList', res.data);
- if (res.data.length) {
- that.$set(that.cartData, 'iScart', iSshow ? false : !that.cartData.iScart);
- } else {
- that.$set(that.cartData, 'iScart', false);
- }
- that.getTotalPrice();
- })
- },
- closeList(e) {
- this.$set(this.cartData, 'iScart', e);
- },
- getCartNum: function() {
- let that = this;
- getCartCounts(0,that.info.id).then(res => {
- this.$store.commit('indexData/setCartNum', res.data.count)
- });
- },
- onMyEvent: function() {
- this.$set(this.attr, 'cartAttr', false);
- },
-
- DefaultSelect: function() {
- let productAttr = this.attr.productAttr;
- let value = [];
- for (let key in this.productValue) {
- if (this.productValue[key].stock > 0) {
- value = this.attr.productAttr.length ? key.split(",") : [];
- break;
- }
- }
- for (let i = 0; i < productAttr.length; i++) {
- this.$set(productAttr[i], "index", value[i]);
- }
-
- let productSelect = this.productValue[value.join(",")];
- if (productSelect && productAttr.length) {
- this.$set(
- this.attr.productSelect,
- "store_name",
- this.storeName
- );
- this.$set(this.attr.productSelect, "image", productSelect.image);
- this.$set(this.attr.productSelect, "price", productSelect.price);
- this.$set(this.attr.productSelect, "stock", productSelect.stock);
- this.$set(this.attr.productSelect, "unique", productSelect.unique);
- this.$set(this.attr.productSelect, "cart_num", 1);
- this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
- this.$set(this, "attrValue", value.join(","));
- } else if (!productSelect && productAttr.length) {
- this.$set(
- this.attr.productSelect,
- "store_name",
- this.storeName
- );
- this.$set(this.attr.productSelect, "image", this.storeInfo.image);
- this.$set(this.attr.productSelect, "price", this.storeInfo.price);
- this.$set(this.attr.productSelect, "stock", 0);
- this.$set(this.attr.productSelect, "unique", "");
- this.$set(this.attr.productSelect, "cart_num", 0);
- this.$set(this, "attrValue", "");
- this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
- } else if (!productSelect && !productAttr.length) {
- this.$set(
- this.attr.productSelect,
- "store_name",
- this.storeName
- );
- this.$set(this.attr.productSelect, "image", this.storeInfo.image);
- this.$set(this.attr.productSelect, "price", this.storeInfo.price);
- this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
- this.$set(
- this.attr.productSelect,
- "unique",
- this.storeInfo.unique || ""
- );
- this.$set(this.attr.productSelect, "cart_num", 1);
- this.$set(this, "attrValue", "");
- this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
- }
- },
-
- ChangeAttr: function(res) {
- let productSelect = this.productValue[res];
- if (productSelect && productSelect.stock > 0) {
- this.$set(this.attr.productSelect, "image", productSelect.image);
- this.$set(this.attr.productSelect, "price", productSelect.price);
- this.$set(this.attr.productSelect, "stock", productSelect.stock);
- this.$set(this.attr.productSelect, "unique", productSelect.unique);
- this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
- this.$set(this.attr.productSelect, "cart_num", 1);
- this.$set(this, "attrValue", res);
- } else if (productSelect && productSelect.stock == 0) {
- this.$set(this.attr.productSelect, "image", productSelect.image);
- this.$set(this.attr.productSelect, "price", productSelect.price);
- this.$set(this.attr.productSelect, "stock", 0);
- this.$set(this.attr.productSelect, "unique", "");
- this.$set(this.attr.productSelect, 'vip_price', productSelect.vip_price);
- this.$set(this.attr.productSelect, "cart_num", 0);
- this.$set(this, "attrValue", "");
- } else {
- this.$set(this.attr.productSelect, "image", this.storeInfo.image);
- this.$set(this.attr.productSelect, "price", this.storeInfo.price);
- this.$set(this.attr.productSelect, "stock", 0);
- this.$set(this.attr.productSelect, "unique", "");
- this.$set(this.attr.productSelect, 'vip_price', this.storeInfo.vip_price);
- this.$set(this.attr.productSelect, "cart_num", 0);
- this.$set(this, "attrValue", "");
- }
- },
- attrVal(val) {
- this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
- .indexn]);
- },
-
- iptCartNum: function(e) {
- this.$set(this.attr.productSelect, 'cart_num', e);
- },
-
- goCartDan(item, index) {
- if (!this.isLogin) {
- this.getIsLogin();
- } else {
- this.tempArr[index].cart_num = 1;
- this.$set(this, 'tempArr', this.tempArr);
- this.goCat(0, item.id, 1);
- }
- },
-
- ChangeCartNumDan(changeValue, index, item) {
- let num = this.tempArr[index];
- let stock = this.tempArr[index].stock;
- this.ChangeCartNum(changeValue, num, stock, 0, item.id);
- },
-
- ChangeCartNumDuo(changeValue) {
-
- let productSelect = this.productValue[this.attrValue];
-
- if (productSelect === undefined && !this.attr.productAttr.length)
- productSelect = this.attr.productSelect;
-
- if (productSelect === undefined) return;
- let stock = productSelect.stock || 0;
- let num = this.attr.productSelect;
- this.ChangeCartNum(changeValue, num, stock, 1);
- },
-
- ChangeCartList(changeValue, index) {
- let list = this.cartData.cartList;
- let num = list[index];
- let stock = list[index].trueStock;
- this.ChangeCartNum(changeValue, num, stock, 0, num.product_id, index, 1);
- if (!list.length) {
- this.cartData.iScart = false;
- this.page = 1;
- this.loadend = false;
- this.tempArr = [];
- this.getProducts();
- }
- },
-
- ChangeCartNum(changeValue, num, stock, isDuo, id, index, cart) {
- if (changeValue) {
- num.cart_num++;
- if (num.cart_num > stock) {
- if (isDuo) {
- this.$set(this.attr.productSelect, "cart_num", stock ? stock : 1);
- this.$set(this, "cart_num", stock ? stock : 1);
- } else {
- num.cart_num = stock ? stock : 0;
- this.$set(this, 'tempArr', this.tempArr);
- this.$set(this.cartData, 'cartList', this.cartData.cartList);
- }
- return this.$util.Tips({
- title: "该产品没有更多库存了"
- });
- } else {
- if (!isDuo) {
- if (cart) {
- this.goCat(0, id, 1, 1, num.product_attr_unique);
- this.getTotalPrice();
- this.tempArr.forEach((item) => {
- if (item.id == id) {
- item.cart_num++;
- }
- })
- } else {
- this.goCat(0, id, 1);
- }
- } else {
- this.tempArr.forEach((item) => {
- if (item.id == id) {
- item.cart_num++;
- }
- })
- }
- }
- } else {
- num.cart_num--;
- if (num.cart_num == 0) {
- this.cartData.cartList.splice(index, 1);
- if (isDuo) {
- this.$set(this.attr.productSelect, "cart_num", 1);
- this.$set(this, "cart_num", 1);
- }
- }
- if (num.cart_num < 0) {
- if (isDuo) {
- this.$set(this.attr.productSelect, "cart_num", 1);
- this.$set(this, "cart_num", 1);
- } else {
- num.cart_num = 0;
- this.$set(this, 'tempArr', this.tempArr);
- this.$set(this.cartData, 'cartList', this.cartData.cartList);
- }
- } else {
- if (!isDuo) {
- if (cart) {
- this.goCat(0, id, 0, 1, num.product_attr_unique);
- this.getTotalPrice();
- this.tempArr.forEach((item) => {
- if (item.id == id) {
- item.cart_num--;
- }
- })
- } else {
- this.goCat(0, id, 0);
- }
- } else {
- this.tempArr.forEach((item) => {
- if (item.id == id) {
- item.cart_num--;
- }
- })
- }
- }
- }
- },
-
- goCatNum() {
- this.goCat(1, this.id, 1);
- },
-
- goCat: function(duo, id, type, cart, unique) {
- let that = this;
- if (duo) {
- let productSelect = that.productValue[this.attrValue];
-
- if (
- that.attr.productAttr.length &&
- productSelect === undefined
- )
- return that.$util.Tips({
- title: "产品库存不足,请选择其它属性"
- });
- }
- let q = {
- product_id: id,
- num: duo ? that.attr.productSelect.cart_num : 1,
- type: type,
- unique: duo ? that.attr.productSelect.unique : cart ? unique : ""
- };
- postCartNum(q)
- .then(function(res) {
- if (duo) {
- that.attr.cartAttr = false;
- that.$util.Tips({
- title: "添加购物车成功"
- });
-
-
- that.tempArr.forEach((item, index) => {
- if (item.id == that.id) {
- let arrtStock = that.attr.productSelect.stock
- let objNum = parseInt(item.cart_num) + parseInt(that.attr.productSelect.cart_num);
- item.cart_num = objNum > arrtStock ? arrtStock : objNum
- }
- })
-
- }
- that.getCartNum();
- if (!cart) {
- that.getCartList(1);
- }
- })
- .catch(err => {
- return that.$util.Tips({
- title: err
- });
- });
- },
- goCartDuo(item) {
- if (!this.isLogin) {
- this.getIsLogin();
- } else {
-
-
-
- this.storeName = item.store_name;
- this.getAttrs(item.id);
- this.$set(this, 'id', item.id);
- this.$set(this.attr, 'cartAttr', true);
- }
- },
- getIsLogin() {
- toLogin();
- },
-
- getAttrs(id) {
- let that = this;
- getAttr(id, 0).then(res => {
-
- that.$set(that.attr, 'productAttr', res.data.productAttr);
- that.$set(that, 'productValue', res.data.productValue);
- that.$set(that, 'is_vip', res.data.storeInfo.is_vip);
- that.$set(that, 'storeInfo', res.data.storeInfo);
- that.DefaultSelect();
- })
- },
-
- goDetail(item) {
- goShopDetail(item, this.uid).then(res => {
- uni.navigateTo({
- url: `/pages/goods_details/index?id=${item.id}&fromType=1`
- });
- });
- },
- openTap() {
- this.iSlong = false
- },
- closeTap() {
- this.iSlong = true
- },
-
- getAllCategory: function() {
- let that = this;
- getStoreCategory().then(res => {
- let data = res.data;
- data.forEach(item => {
- item.children.unshift({
- 'id': 0,
- 'cate_name': '全部'
- })
- })
- that.categoryTitle = data[0].cate_name;
- that.cid = data[0].id;
- that.sid = 0;
- that.navActive = 0;
- that.tabClick = 0;
- that.categoryList = data;
- that.categoryErList = res.data[0].children ? res.data[0].children : [];
- that.page = 1;
- that.loadend = false;
- that.loading = false;
- that.tempArr = [];
- that.info.default_delivery
- that.switchNumFun(that.info.default_delivery);
- that.getProducts();
- })
- },
- tapNav(index, item) {
- uni.pageScrollTo({
- duration: 0,
- scrollTop: 0
- })
- let list = this.categoryList[index];
- this.navActive = index;
- this.categoryTitle = list.cate_name;
- this.categoryErList = item.children ? item.children : [];
- this.tabClick = 0;
- this.tabLeft = 0;
- this.cid = list.id;
- this.sid = 0;
- this.page = 1;
- this.loadend = false;
- this.tempArr = [];
- this.getProducts();
- },
-
- longClick(index) {
- if (this.categoryErList.length > 3) {
- this.tabLeft = (index - 1) * (this.isWidth + 6)
- };
- this.tabClick = index;
- this.iSlong = true;
- this.sid = this.categoryErList[index].id;
- this.page = 1;
- this.loadend = false;
- this.tempArr = [];
- this.getProducts();
- },
- },
- onReachBottom: function() {
- this.getProducts();
- }
- }
- </script>
- <style lang="scss">
- /* #ifdef MP || APP-PLUS */
- .mp-header {
- z-index: 30;
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- background: #fff;
- border-bottom: 1px solid #F0F0F0;
- .serch-wrapper {
- height: 100%;
- /* #ifdef MP */
- padding: 0 220rpx 0 30rpx;
- /* #endif */
- /* #ifdef APP-PLUS */
- padding: 0 50rpx 0 40rpx;
- /* #endif */
- .input {
- flex: 1;
- height: 55rpx;
- // padding: 0 0 0 30rpx;
- background: #F8F8F8;
- color: #ADADAD;
- font-size: 26rpx;
- /* #ifdef MP */
- width: 70%;
- /* #endif */
- /* #ifdef APP-PLUS */
- width: 100%;
- /* #endif */
- border-radius: 50rpx;
- .iconfont {
- margin-right: 20rpx;
- }
- }
- }
- }
- /* #endif */
- page {
- background-color: #fff;
- }
- /deep/.product-window.joinCart {
- z-index: 999;
- }
- ::-webkit-scrollbar {
- width: 0;
- height: 0;
- color: transparent;
- display: none
- }
- .goodCate {
- /deep/.mask {
- z-index: 99;
- }
- /deep/.attrProduct {
- .mask {
- z-index: 100;
- }
- }
- .header {
- position: fixed;
- background-color: #fff;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 99;
- border-bottom: 1px solid #F0F0F0;
- /* #ifdef H5 */
- padding-top: 20rpx;
- /* #endif */
- .pageIndex {
- width: 68rpx;
- height: 68rpx;
- border-radius: 50%;
- background-color: #F7F7F7;
- .iconfont {
- color: #666666;
- font-size: 30rpx;
- }
- // image{
- // width: 29rpx;
- // height: 30rpx;
- // }
- }
- .search {
- flex: 1;
- // width: 690rpx;
- height: 68rpx;
- border-radius: 36rpx;
- background-color: #F7F7F7;
- font-size: 26rpx;
- color: #cccccc;
- padding: 0 30rpx;
- box-sizing: border-box;
- .iconfont {
- font-size: 30rpx;
- margin-right: 18rpx;
- color: #666666;
- }
- }
- }
- .conter {
- /* #ifdef H5 */
- padding-top: 288rpx;
- /* #endif */
- height: 100vh;
- background-color: #fff;
- .aside {
- position: fixed;
- width: 23%;
- left: 0;
- bottom: 0;
- /* #ifdef H5 */
- top: 288rpx;
- /* #endif */
- background-color: #F7F7F7;
- overflow-y: auto;
- overflow-x: hidden;
- /* #ifdef H5 */
- // margin-top: 128rpx;
- /* #endif */
- z-index: 99;
- padding-bottom: 194rpx;
- .item {
- height: 100rpx;
- width: 100%;
- font-size: 26rpx;
- color: #333333;
- &.on {
- background-color: #FFFFFF;
- width: 100%;
- text-align: center;
- color: var(--view-theme);
- font-weight: 500;
- position: relative;
- &::after {
- content: "";
- position: absolute;
- width: 6rpx;
- height: 46rpx;
- background: var(--view-theme);
- border-radius: 0 4rpx 4rpx 0;
- left: 0
- }
- }
- }
- }
- .wrapper {
- margin-top: 104rpx;
- padding-bottom: 250rpx;
- /* #ifdef H5 */
- padding-bottom: 200rpx;
- /* #endif */
- width: 77%;
- float: right;
- background-color: #FFFFFF;
- // padding-bottom: 240rpx;
- .bgcolor {
- width: 100%;
- background-color: #FFFFFF;
- }
- // .goodsList {
- // margin-top: 0 !important;
- // }
- .mask {
- z-index: 9;
- }
- .longTab {
- width: 65%;
- position: fixed;
- /* #ifdef H5 */
- top: 288rpx;
- /* #endif */
- height: 100rpx;
- z-index: 99;
- background-color: #FFFFFF;
- .longItem {
- height: 44rpx;
- display: inline-block;
- line-height: 44rpx;
- text-align: center;
- font-size: 26rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- color: #333333;
- background-color: #F7F7F7;
- border-radius: 22rpx;
- margin-left: 12rpx;
- &.click {
- font-weight: bold;
- background-color: var(--view-theme);
- color: #ffffff;
- }
- }
- .underlineBox {
- height: 3px;
- width: 20%;
- display: flex;
- align-content: center;
- justify-content: center;
- transition: .5s;
- .underline {
- width: 33rpx;
- height: 4rpx;
- background-color: #FFFFFF;
- }
- }
- }
- .openList {
- width: 12%;
- height: 100rpx;
- background-color: #FFFFFF;
- line-height: 100rpx;
- padding-left: 30rpx;
- position: fixed;
- right: 0;
- /* #ifdef H5 */
- top: 288rpx;
- /* #endif */
- z-index: 99;
- .iconfont {
- font-size: 22rpx;
- color: #666666;
- }
- }
- .downTab {
- width: 78%;
- position: fixed;
- top: 0rpx;
- /* #ifdef H5 */
- top: 288rpx;
- /* #endif */
- z-index: 102;
- background-color: #FFFFFF;
- .title {
- height: 100rpx;
- font-size: 26rpx;
- color: #999999;
- padding-left: 20rpx;
- .closeList {
- width: 90rpx;
- height: 100%;
- line-height: 100rpx;
- padding-left: 30rpx;
- transform: rotate(180deg);
- .iconfont {
- font-size: 22rpx;
- color: #666666;
- }
- }
- }
- .children {
- max-height: 500rpx;
- overflow-x: hidden;
- overflow-y: auto;
- padding-bottom: 20rpx;
- .item {
- height: 60rpx;
- background-color: #F7F7F7;
- border-radius: 30rpx;
- line-height: 60rpx;
- padding: 0 15rpx;
- margin: 0 0 20rpx 20rpx;
- width: 165rpx;
- text-align: center;
- &.click {
- font-weight: bold;
- background-color: var(--view-theme);
- color: #ffffff;
- }
- }
- }
- }
- .goodsList {
- margin-top: 0rpx;
- padding: 0 30rpx 0 20rpx;
- /deep/.item {
- margin-bottom: 33rpx !important;
- .text {
- font-size: 26rpx;
- }
- .bottom {
- .sales {
- .money {
- font-size: 34rpx;
- text {
- font-size: 26rpx;
- }
- }
- }
- .cart {
- .pictrue {
- width: 50rpx;
- height: 50rpx;
- }
- }
- }
- }
- }
- }
- }
- .store-address {
- width: 100%;
- margin-top: 15rpx;
- position: relative;
- padding: 12rpx 30rpx 0 30rpx;
- height: 185rpx;
- background-color: #fff;
- .address {
- font-size: 32rpx;
- font-weight: 500;
- color: #333333;
- .name{
- max-width: 400rpx;
- }
- .icon-xiangyou {
- font-size: 24rpx;
- margin-left: 10rpx;
- }
- }
- .distance {
- margin-top: 16rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- }
- .time {
- margin-top: 16rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #333333;
- }
- .switch {
- position: absolute;
- top: 15rpx;
- /* #ifdef H5 */
- top: 20rpx;
- /* #endif */
- right: 30rpx;
- width: 194rpx;
- height: 58rpx;
- background: #F5F5F5;
- border-radius: 33rpx;
- .title {
- width: 94rpx;
- height: 100%;
- line-height: 58rpx;
- border-radius: 33rpx;
- text-align: center;
- // padding-right: 20rpx;
-
- &.onLeft {
- // padding-left: 20rpx;
- // padding-right: 0;
- }
-
- &.on {
- width: 100rpx;
- background-color: var(--view-theme) !important;
- color: #fff;
- padding: 0 !important;
- }
- }
- }
- }
- .footer {
- width: 100%;
- position: fixed;
- left: 0;
- background-color: #fff;
- box-shadow: 0px -3px 16px rgba(36, 12, 12, 0.05);
- z-index: 100;
- padding-left: 30rpx;
- box-sizing: border-box;
- height: 100rpx;
- // #ifdef H5
- bottom: 94rpx;
- bottom: calc(94rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
- bottom: calc(94rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
- // #endif
- // #ifndef H5
- bottom: 98rpx;
- bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
- bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
- // #endif
- &.on {
- // #ifndef H5
- bottom: 0rpx;
- // #endif
- }
- /deep/.cartIcon {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- position: relative;
- margin-top: -36rpx;
-
- .iconfont {
- font-size: 94rpx;
- margin-top: 12rpx;
- color: var(--view-theme);
- }
- &.noCart {
- .iconfont {
- color: #CBCBCB;
- }
- }
- .num {
- min-width: 14rpx;
- background-color: #fff;
- color: var(--view-theme);
- border-radius: 15px;
- position: absolute;
- right: -10rpx;
- top: 20rpx;
- font-size: 20rpx;
- padding: 0 10rpx;
- border: 1px solid var(--view-theme);
- }
- }
- .money {
- font-size: 26rpx;
- font-weight: bold;
- color: var(--view-priceColor);
- margin-right: 34rpx;
- .num {
- font-size: 34rpx;
- }
- }
- .bnt {
- width: 192rpx;
- height: 76rpx;
- background-color: var(--view-theme);
- border-radius: 46px;
- line-height: 76rpx;
- text-align: center;
- color: #fff;
- font-size: 28rpx;
- margin-right: 30rpx;
- }
- .noCart {
- .money {
- color: #CBCBCB;
- }
- .bnt {
- background-color: #CBCBCB;
- }
- }
- }
- }
- .group-button {
- transform: rotateZ(360deg);
- padding: 19rpx 24rpx;
- border: 1rpx solid #DDDDDD;
- border-radius: 32rpx;
- margin-right: 40rpx;
- font-weight: 500;
- font-size: 26rpx;
- line-height: 26rpx;
- color: #333333;
-
- .iconfont {
- margin-right: 10rpx;
- font-size: 26rpx;
- color: var(--view-theme);
- }
- }
-
- /* #ifdef H5 || MP */
- .dialog {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 101;
- padding: 36rpx 40rpx 40rpx;
- border-radius: 12rpx 12rpx 0 0;
- background-color: #FFFFFF;
- transform: translateY(100%);
- transition: 0.3s;
- /* #ifdef H5 */
- bottom: 94rpx;
- bottom: calc(94rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
- bottom: calc(94rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
- /* #endif */
- /* #ifdef MP */
- bottom: 0rpx;
- bottom: calc(0rpx + constant(safe-area-inset-bottom));
- bottom: calc(0rpx + env(safe-area-inset-bottom));
- /* #endif */
-
- &.dialog-footer {
- /* #ifdef MP */
- bottom: 98rpx;
- bottom: calc(98rpx + constant(safe-area-inset-bottom));
- bottom: calc(98rpx + env(safe-area-inset-bottom));
- /* #endif */
- }
-
- &.active {
- transform: translateY(0);
- }
- }
- .dialog-head {
- display: flex;
-
- .button {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 138rpx;
- border: 4rpx solid #DDDDDD;
- border-radius: 12rpx;
- font-weight: 500;
- font-size: 32rpx;
- color: #333333;
- cursor: pointer;
-
- +.button {
- margin-left: 46rpx;
- }
-
- .iconfont {
- margin-right: 40rpx;
- font-size: 80rpx;
- color: #999999;
- }
-
- &.active {
- border: 4rpx solid var(--view-theme);
-
- .iconfont {
- color: var(--view-theme);
- }
- }
- }
- }
- .dialog-body {
- margin-top: 60rpx;
- font-size: 24rpx;
- color: #999999;
-
- .dialog-body-main {
- .dialog-body-main-inner {
- display: flex;
- margin-top: 32rpx;
- }
- .dialog-body-main-btn {
- display: flex;
- justify-content: center;
- align-items: center;
- margin-top: 56rpx;
- .iconfont {
- margin-left: 12rpx;
- font-size: 22rpx;
- color: #666666;
- }
- }
- }
-
- .dialog-body-left {
- flex: 1;
- min-width: 0;
- margin-right: 20rpx;
- }
-
- .dialog-body-right {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 40rpx;
- height: 40rpx;
- border-radius: 50%;
- background-color: var(--view-minorColorT);
- font-size: 22rpx;
- color: var(--view-theme);
- cursor: pointer;
- }
-
- .dialog-body-name {
- font-weight: 500;
- font-size: 24rpx;
- line-height: 1.2;
- color: #333333;
-
- .tag {
- margin-left: 14rpx;
- font-size: 24rpx;
- color: #888888;
- }
- }
-
- .dialog-body-info {
- margin-top: 28rpx;
-
- .item {
- display: flex;
- font-size: 22rpx;
- line-height: 1.5;
- color: #888888;
-
- +.item {
- margin-top: 20rpx;
- }
-
- .iconfont {
- margin-right: 5rpx;
- font-size: 22rpx;
- line-height: 1.5;
- color: #CCCCCC;
- }
- }
- }
- }
- .dialog-foot {
- display: flex;
- margin-top: 78rpx;
-
- .button {
- display: flex;
- justify-content: center;
- align-items: center;
- flex: 1;
- min-width: 0;
- height: 92rpx;
- border-radius: 46rpx;
- background-color: #EEEEEE;
- font-size: 30rpx;
- color: #666666;
- cursor: pointer;
-
- +.button {
- margin-left: 46rpx;
- }
-
- &.primary {
- background-color: var(--view-theme);
- color: #FFFFFF;
- }
- }
- }
- /* #endif */
- .search-box {
- flex: 1;
- padding: 0 30rpx;
- }
- </style>
|