You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2016 lines
68 KiB

3 months ago
  1. <template>
  2. <view :data-theme="theme">
  3. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
  4. bgcolor="#FFF"></skeleton>
  5. <view class="skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  6. <!-- 头部 -->
  7. <view class='navbar' :class="opacity>0.6?'bgwhite':''">
  8. <view class='navbarH' :style='"height:"+navH+"rpx;"'>
  9. <view class='navbarCon acea-row' :style="{ paddingRight: navbarRight + 'px' }">
  10. <!-- #ifdef MP -->
  11. <view class="select_nav flex justify-center align-center" id="home" :style="{ top: homeTop + 'rpx' }">
  12. <text class="iconfont icon-fanhui2 px-20" @tap="returns"></text>
  13. <text class="iconfont icon-gengduo5 px-20" @tap="showNav"></text>
  14. <text class="nav_line"></text>
  15. </view>
  16. <!-- #endif -->
  17. <!-- #ifdef H5 || APP-PLUS -->
  18. <view id="home" class="home acea-row row-center-wrapper iconfont icon-xiangzuo h5_back" :class="opacity>0.5?'on':''"
  19. :style="{ top: homeTop + 'rpx' }" v-if="returnShow" @tap="returns">
  20. </view>
  21. <!-- #endif -->
  22. <view class="header flex justify-between align-center">
  23. <view class="item" :class="navActive === index ? 'on' : ''" v-for="(item,index) in navList"
  24. :key='index' @tap="tap(item,index)">
  25. {{ item }}
  26. </view>
  27. </view>
  28. <!-- #ifdef H5 || APP-PLUS -->
  29. <view class="right_select" :style="{ top: homeTop + 'rpx' }" @tap="showNav">
  30. <text class="iconfont icon-gengduo2"></text>
  31. </view>
  32. <!-- #endif -->
  33. </view>
  34. </view>
  35. </view>
  36. <view class="dialog_nav" :style='"top:"+navH+"rpx;"' v-show="currentPage">
  37. <view class="dialog_nav_item" :class="item.after" v-for="(item,index) in selectNavList" :key="index" @click="linkPage(item.url)">
  38. <text class="iconfont" :class="item.icon"></text>
  39. <text class="pl-20">{{item.name}}</text>
  40. </view>
  41. </view>
  42. <view class='product-con'>
  43. <scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
  44. :style="'height:'+height+'px;'" @scroll="scroll">
  45. <view id="past0">
  46. <productConSwiper :imgUrls="imgUrls" class="mb30 skeleton-rect" :videoline="videoLink"></productConSwiper>
  47. <view class="pad30">
  48. <view class='wrapper mb30'>
  49. <view class='share acea-row row-between row-bottom'>
  50. <view class='money font_color'>
  51. <text class='num skeleton-rect'>{{attribute.productSelect.price || 0}}</text><text
  52. class='y-money skeleton-rect'>{{storeInfo.otPrice || 0}}</text>
  53. </view>
  54. <view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
  55. </view>
  56. <view class='introduce line2 skeleton-rect'>{{storeInfo.storeName}}</view>
  57. <view class='label acea-row row-between-wrapper'>
  58. <view class='stock skeleton-rect'>类型{{storeInfo.people || 0}}人团</view>
  59. <view class="skeleton-rect">累计销量{{parseFloat(storeInfo.sales) + parseFloat(storeInfo.ficti)}} {{storeInfo.unitName || ''}}</view>
  60. <view class="skeleton-rect">限购: {{ attribute.productSelect.quotaShow ? attribute.productSelect.quotaShow : 0 }}
  61. {{storeInfo.unitName || ''}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class='attribute mb30 borRadius14' @click="selecAttr">
  66. <view class="acea-row row-between-wrapper">
  67. <view class="line1 skeleton-rect">{{attrTxt}}
  68. <text class='atterTxt'>{{attrValue}}</text>
  69. </view>
  70. <view class='iconfont icon-jiantou'></view>
  71. </view>
  72. <view class="acea-row row-between-wrapper" style="margin-top:7px;padding-left:55px;" v-if="skuArr.length > 1">
  73. <view class="flex">
  74. <image :src="item.image" v-for="(item,index) in skuArr.slice(0,4)" :key="index" class="attrImg"></image>
  75. </view>
  76. <view class="switchTxt">{{skuArr.length}}种规格可选</view>
  77. </view>
  78. </view>
  79. <view class='notice acea-row row-middle mb30 borRadius14' v-if="parseFloat(pinkOkSum) >0">
  80. <view class='num font-color skeleton-rect'>
  81. <text class='iconfont icon-laba'></text>
  82. 已拼{{pinkOkSum}}<text class='line'>|</text>
  83. </view>
  84. <view class='swiper'>
  85. <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500"
  86. duration="500" vertical="true" circular="true">
  87. <block v-for="(item,index) in itemNew" :key='index'>
  88. <swiper-item>
  89. <view class='line1'>{{item.nickname}}拼团成功</view>
  90. </swiper-item>
  91. </block>
  92. </swiper>
  93. </view>
  94. </view>
  95. <view v-if='attribute.productSelect.quota > 0' class='assemble mb30 borRadius14'>
  96. <view class='item acea-row row-between-wrapper' v-for='(item,index) in pink' :key='index'
  97. v-if="index < AllIndex">
  98. <view class='pictxt acea-row row-between-wrapper'>
  99. <view class='pictrue'>
  100. <image :src='item.avatar'></image>
  101. </view>
  102. <view class='text line1'>{{item.nickname}}</view>
  103. </view>
  104. <view class='right acea-row row-middle'>
  105. <view>
  106. <view class='lack'>还差<text class='font-color'>{{item.count}}</text>人成团</view>
  107. <view class='time acea-row'>
  108. <count-down :is-day="false" :tip-text="'剩余 '" :day-text="' '" :hour-text="':'"
  109. :minute-text="':'" :second-text="' '" :datatime="item.stopTime/1000" :bgColor="bgColor">
  110. </count-down>
  111. </view>
  112. </view>
  113. <navigator hover-class='none'
  114. :url="'/pages/activity/goods_combination_status/index?id='+item.id"
  115. class='spellBnt'>
  116. 去拼单
  117. <text class='iconfont icon-jiantou'></text>
  118. </navigator>
  119. </view>
  120. </view>
  121. <template v-if="pink.length">
  122. <view class='more' @tap='showAll' v-if="pink.length > AllIndex">查看更多<text
  123. class='iconfont icon-xiangxia'></text></view>
  124. <view class='more' @tap='hideAll'
  125. v-else-if="pink.length === AllIndex && pink.length !== AllIndexDefault">收起<text
  126. class='iconfont icon-xiangshang'></text></view>
  127. </template>
  128. </view>
  129. <view class='playWay mb30 borRadius14'>
  130. <view class='title acea-row row-between row-middle'>
  131. <view>拼团玩法</view>
  132. <!-- <navigator hover-class='none' class='font-color' url='/pages/activity/goods_combination_rule/index'>查看规则<text class="iconfont icon-jiantou"></text></navigator> -->
  133. </view>
  134. <view class='way acea-row row-middle'>
  135. <view class='item acea-row row-middle'>
  136. <text class='num mb-02'></text>
  137. 开团/参团
  138. </view>
  139. <view class='iconfont icon-arrow'></view>
  140. <view class='item'>
  141. <text class='num'></text>
  142. 邀请好友
  143. </view>
  144. <view class='iconfont icon-arrow'></view>
  145. <view class='item'>
  146. <view>
  147. <text class='num'></text>
  148. 满员发货
  149. </view>
  150. <!-- <view class='tip'>不满自动退款</view> -->
  151. </view>
  152. </view>
  153. </view>
  154. <view class='userEvaluation borRadius14' id="past1">
  155. <view class='title acea-row row-between-wrapper' :style="replyCount==0?'border-bottom-left-radius:14rpx;border-bottom-right-radius:14rpx;':''">
  156. <view>用户评价<i>({{replyCount}})</i></view>
  157. <navigator class='praise' hover-class='none'
  158. :url='"/pages/goods/goods_comment_list/index?productId="+storeInfo.productId'>
  159. <i>好评</i><text class='font_color pl-14'>{{replyChance || 0}}%</text>
  160. <text class='iconfont icon-jiantou'></text>
  161. </navigator>
  162. </view>
  163. <userEvaluation :reply="reply" v-if="reply.length>0"></userEvaluation>
  164. </view>
  165. </view>
  166. </view>
  167. <view class='product-intro' id="past2">
  168. <view class='title'>
  169. <image :src="urlDomain+'crmebimage/perset/staticImg/xzuo.png'"></image>
  170. <span class="sp">产品详情</span>
  171. <image :src="urlDomain+'crmebimage/perset/staticImg/xyou.png'"></image>
  172. </view>
  173. <view class='conter'>
  174. <jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
  175. </view>
  176. </view>
  177. <view style='height:120rpx;'></view>
  178. </scroll-view>
  179. <view class='footer acea-row row-between-wrapper'>
  180. <!-- #ifdef MP -->
  181. <button hover-class='none' class='item skeleton-rect' @click="onClickService"
  182. v-if="chatConfig.telephone_service_switch === 'open'">
  183. <view class='iconfont icon-kefu'></view>
  184. <view>客服</view>
  185. </button>
  186. <template v-else>
  187. <button open-type="contact" hover-class='none' class='item skeleton-rect' v-if="chatConfig.wx_chant_independent=='open'">
  188. <view class='iconfont icon-kefu'></view>
  189. <view>客服</view>
  190. </button>
  191. <button class="item" hover-class='none' @click="wxChatService" v-else>
  192. <view class='iconfont icon-kefu'></view>
  193. <text>联系客服</text>
  194. </button>
  195. </template>
  196. <!-- #endif -->
  197. <!-- #ifndef MP -->
  198. <navigator hover-class="none" class="item skeleton-rect" @click="onClickService">
  199. <view class="iconfont icon-kefu"></view>
  200. <view>客服</view>
  201. </navigator>
  202. <!-- #endif -->
  203. <view @tap='setCollect' class='item skeleton-rect'>
  204. <view class='iconfont icon-shoucang1' v-if="userCollect"></view>
  205. <view class='iconfont icon-shoucang' v-else></view>
  206. <view>收藏</view>
  207. </view>
  208. <view class="bnt acea-row skeleton-rect">
  209. <view class="joinCart bnts" @tap="goProduct" v-if="masterStatus !=='soldOut'">单独购买</view>
  210. <view class=" bg-color-hui bnts radius" v-if="masterStatus =='soldOut'">单独购买</view>
  211. <view class="buy bnts" @tap="goCat"
  212. v-if='attribute.productSelect.quota>0'>
  213. 立即开团
  214. </view>
  215. <view class="buy bnts bg-color-hui" v-if="!dataShow">
  216. 立即开团
  217. </view>
  218. <view class=" bnts buy-btns bg-color-hui"
  219. v-if='attribute.productSelect.quota <= 0'>
  220. 已售罄
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
  226. @closeChange="closeChange"></shareRedPackets>
  227. <!-- 分享按钮 -->
  228. <view class="generate-posters" :class="posters ? 'on' : ''">
  229. <view class="generateCon acea-row row-middle">
  230. <!-- #ifndef MP -->
  231. <button class="item" hover-class="none" v-if="weixinStatus === true" @click="H5ShareBox = true">
  232. <view class="pictrue">
  233. <image src="/static/images/weixin.png"></image>
  234. </view>
  235. <view class="">分享给好友</view>
  236. </button>
  237. <!-- #endif -->
  238. <!-- #ifdef MP -->
  239. <button class="item" open-type="share" hover-class="none">
  240. <view class="pictrue">
  241. <image src="/static/images/weixin.png"></image>
  242. </view>
  243. <view class="">分享给好友</view>
  244. </button>
  245. <!-- #endif -->
  246. <!-- #ifdef APP-PLUS -->
  247. <view class="item" @click="appShare('WXSceneSession')">
  248. <view class="iconfont icon-weixin3"></view>
  249. <view class="">微信好友</view>
  250. </view>
  251. <view class="item" @click="appShare('WXSenceTimeline')">
  252. <view class="iconfont icon-pengyouquan"></view>
  253. <view class="">微信朋友圈</view>
  254. </view>
  255. <!-- #endif -->
  256. <!-- #ifdef H5 || MP -->
  257. <view class="item" @click="getpreviewImage">
  258. <view class="pictrue">
  259. <image :src="urlDomain+'crmebimage/perset/staticImg/changan.png'"></image>
  260. </view>
  261. <view class="">预览发图</view>
  262. </view>
  263. <!-- #endif -->
  264. <!-- #ifdef MP -->
  265. <button class="item" hover-class="none" @click="savePosterPath">
  266. <view class="pictrue">
  267. <image src="/static/images/haibao.png"></image>
  268. </view>
  269. <view class="">保存海报</view>
  270. </button>
  271. <!-- #endif -->
  272. </view>
  273. <view class="generateClose acea-row row-center-wrapper" @click="posterImageClose">取消</view>
  274. </view>
  275. <cus-previewImg ref="cusPreviewImg" :list="skuArr" @changeSwitch="changeSwitch" />
  276. <view class="mask" v-if="posters" @click="closePosters"></view>
  277. <view class="mask" v-if="canvasStatus" @click="listenerActionClose"></view>
  278. <view class="mask_transparent" v-if="currentPage" @touchmove="hideNav" @click="hideNav()"></view>
  279. <!-- 海报展示 -->
  280. <view class='poster-pop' v-if="canvasStatus">
  281. <image :src='posterImage'></image>
  282. </view>
  283. <view class="canvas" v-else>
  284. <canvas style="width:750px;height:1190px;" canvas-id="firstCanvas"></canvas>
  285. <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
  286. </view>
  287. <!-- 发送给朋友图片 -->
  288. <view class="share-box" v-if="H5ShareBox">
  289. <image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
  290. </view>
  291. <product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
  292. @ChangeCartNum="ChangeCartNum" @iptCartNum="iptCartNum" @attrVal="attrVal" @getImg="showImg"></product-window>
  293. </view>
  294. </view>
  295. </template>
  296. <script>
  297. const app = getApp();
  298. import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
  299. import {mapGetters} from "vuex";
  300. import { silenceBindingSpread } from "@/utils";
  301. // #ifdef APP-PLUS
  302. import {HTTP_H5_URL} from '@/config/app.js';
  303. // #endif
  304. // #ifdef MP
  305. import {base64src} from '@/utils/base64src.js'
  306. import {getQrcode} from '@/api/api.js';
  307. // #endif
  308. import productConSwiper from '@/components/productConSwiper'
  309. import {toLogin} from '@/libs/login.js';
  310. import {getCombinationDetail} from '@/api/activity.js';
  311. import {
  312. postCartAdd,
  313. collectAdd,
  314. collectDel,
  315. getReplyList,
  316. getReplyConfig,
  317. getReplyProduct
  318. } from '@/api/store.js';
  319. import {imageBase64} from "@/api/public";
  320. import { spread } from "@/api/user";
  321. import parser from "@/components/jyf-parser/jyf-parser";
  322. import productWindow from '@/components/productWindow/index.vue'
  323. import userEvaluation from '@/components/userEvaluation/index.vue'
  324. import countDown from '@/components/countDown/index.vue'
  325. import shareRedPackets from '@/components/shareRedPackets';
  326. import cusPreviewImg from '@/components/cus-previewImg/cus-previewImg.vue'
  327. import {getProductCode} from '@/api/store.js'
  328. export default {
  329. components: {
  330. shareRedPackets,
  331. productConSwiper,
  332. "jyf-parser": parser,
  333. cusPreviewImg,
  334. "product-window": productWindow,
  335. userEvaluation,
  336. countDown
  337. },
  338. computed: mapGetters({
  339. 'isLogin': 'isLogin',
  340. 'userInfo': 'userInfo',
  341. 'uid': 'uid',
  342. 'chatUrl': 'chatUrl'
  343. }),
  344. data() {
  345. return {
  346. urlDomain: this.$Cache.get("imgHost"),
  347. showSkeleton: true, //骨架屏显示隐藏
  348. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  349. bgColor:{
  350. 'bgColor': '',
  351. 'Color': '#999999',
  352. 'isDay': true
  353. },
  354. userCollect:false,
  355. dataShow: 0,
  356. navH: '',
  357. id: 0,
  358. itemNew: [],
  359. indicatorDots: false,
  360. circular: true,
  361. autoplay: true,
  362. interval: 3000,
  363. duration: 500,
  364. attribute: {
  365. cartAttr: false,
  366. productAttr: [],
  367. productSelect: {}
  368. },
  369. productValue: [],
  370. isOpen: false,
  371. attr: '请选择',
  372. attrValue: '',
  373. AllIndex: 2,
  374. maxAllIndex: 0,
  375. replyChance: '',
  376. limitNum: 1,
  377. timeer: null,
  378. iSplus: false,
  379. navH: "",
  380. navList: ['商品', '评价', '详情'],
  381. opacity: 0,
  382. scrollY: 0,
  383. topArr: [],
  384. toView: '',
  385. height: 0,
  386. heightArr: [],
  387. lock: false,
  388. scrollTop: 0,
  389. storeInfo: {},
  390. pinkOkSum: 0,
  391. pink: [],
  392. replyCount: 0,
  393. reply: [],
  394. imgUrls: [],
  395. sharePacket: {
  396. isState: true, //默认不显示
  397. },
  398. tagStyle: {
  399. img: 'width:100%;display:block;',
  400. table: 'width:100%',
  401. video: 'width:100%'
  402. },
  403. posters: false,
  404. weixinStatus: false,
  405. posterImageStatus: false,
  406. canvasStatus: false, //海报绘图标签
  407. storeImage: '', //海报产品图
  408. PromotionCode: '', //二维码图片
  409. posterImage: '', //海报路径
  410. posterbackgd: `${this.$Cache.get("imgHost")}crmebimage/perset/staticImg/posterbackgd.png`,
  411. navActive: 0,
  412. actionSheetHidden: false,
  413. attrTxt: '',
  414. cart_num: '',
  415. isAuto: false, //没有授权的不会自动授权
  416. isShowAuth: false, //是否隐藏授权
  417. AllIndexDefault: 0,
  418. imgTop: '',
  419. qrcodeSize: 600,
  420. H5ShareBox: false, //公众号分享图片
  421. onceNum: 0, //一次可以购买几个
  422. errT: '',
  423. returnShow: true,
  424. homeTop: 20,
  425. navbarRight:0,
  426. theme:app.globalData.theme,
  427. skuArr:[],
  428. currentPage:false,
  429. selectSku:{},
  430. selectNavList:[
  431. {name:'首页',icon:'icon-shouye8',url:'/pages/index/index',after:'dialog_after'},
  432. {name:'搜索',icon:'icon-sousuo6',url:'/pages/goods/goods_search/index',after:'dialog_after'},
  433. {name:'购物车',icon:'icon-gouwuche7',url:'/pages/order_addcart/order_addcart',after:'dialog_after'},
  434. {name:'我的收藏',icon:'icon-shoucang3',url:'/pages/users/user_goods_collection/index',after:'dialog_after'},
  435. {name:'个人中心',icon:'icon-gerenzhongxin1',url:'/pages/user/index'},
  436. ],
  437. chatConfig:{
  438. consumer_hotline:'',
  439. telephone_service_switch:'close',
  440. wx_chant_independent:'open'
  441. }, //客服配置
  442. masterStatus:'',
  443. openPages: '' ,//分享地址
  444. videoLink: '',
  445. }
  446. },
  447. watch: {
  448. isLogin: {
  449. handler: function(newV, oldV) {
  450. if (newV) {
  451. this.combinationDetail();
  452. }
  453. },
  454. deep: true
  455. },
  456. },
  457. onLoad(options) {
  458. let that = this
  459. //用户从分享卡片进入的场景下获取主题色配置
  460. that.$set(that,'theme',that.$Cache.get('theme'));
  461. setTimeout(() => {
  462. that.isNodes++;
  463. }, 500);
  464. //重置商品类型
  465. this.$store.commit("PRODUCT_TYPE", 'normal');
  466. var pages = getCurrentPages();
  467. that.$set(that,'chatConfig',that.$Cache.getItem('chatConfig'));
  468. this.$nextTick(() => {
  469. // #ifdef MP
  470. const menuButton = uni.getMenuButtonBoundingClientRect();
  471. const query = uni.createSelectorQuery().in(this);
  472. query
  473. .select('#home')
  474. .boundingClientRect(data => {
  475. this.homeTop = menuButton.top * 2 + menuButton.height - data.height;
  476. })
  477. .exec();
  478. // #endif
  479. });
  480. // #ifdef MP
  481. this.navH = app.globalData.navHeight;
  482. // #endif
  483. // #ifndef MP
  484. this.navH = 96;
  485. // #endif
  486. //设置商品列表高度
  487. uni.getSystemInfo({
  488. success: function(res) {
  489. that.height = res.windowHeight
  490. //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
  491. },
  492. });
  493. //获取浏览器参数
  494. if(options.spread) app.globalData.spread = options.spread; //推广码
  495. if (options.id) this.id = options.id; // 商品id
  496. // 仅仅小程序扫码进入获取商品id,商品类型
  497. if (options.scene) {
  498. let qrCodeValue = this.$util.getUrlParams(decodeURIComponent(options.scene));
  499. let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue);
  500. this.id = mapeMpQrCodeValue.id ? mapeMpQrCodeValue.id : '';
  501. }
  502. this.combinationDetail();
  503. if(this.isLogin && parseInt(app.globalData.spread)>0){
  504. silenceBindingSpread()
  505. }
  506. // if (this.isLogin) {
  507. // this.combinationDetail();
  508. // if(parseInt(app.globalData.spread)>0) silenceBindingSpread()
  509. // } else {
  510. // this.$Cache.set('login_back_url',
  511. // `/pages/activity/goods_combination_details/index?id=${options.id}&spread=${app.globalData.spread?app.globalData.spread:0}`
  512. // );
  513. // toLogin();
  514. // }
  515. },
  516. methods: {
  517. wxChatService(){
  518. let chatUrlArr = this.chatUrl.split('?')
  519. uni.navigateTo({
  520. url:`/pages/users/web_page/index?webUel=${chatUrlArr[0]}&title=客服&${chatUrlArr[1]}`
  521. })
  522. },
  523. // app分享
  524. // #ifdef APP-PLUS
  525. appShare(scene) {
  526. let that = this
  527. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  528. let curRoute = routes[routes.length - 1].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
  529. uni.share({
  530. provider: "weixin",
  531. scene: scene,
  532. type: 0,
  533. href: `${HTTP_H5_URL}${curRoute}&spread=${that.uid}`,
  534. title: that.storeInfo.storeName,
  535. summary: app.globalData.companyName,
  536. imageUrl: that.storeInfo.image,
  537. success: function(res) {
  538. that.posters = false;
  539. },
  540. fail: function(err) {
  541. uni.showToast({
  542. title: '分享失败',
  543. icon: 'none',
  544. duration: 2000
  545. })
  546. that.posters = false;
  547. }
  548. });
  549. },
  550. // #endif
  551. getProductReplyCount: function() {
  552. let that = this;
  553. getReplyConfig(that.storeInfo.productId).then(res => {
  554. that.$set(that, 'replyChance', res.data.replyChance * 100);
  555. that.$set(that, 'replyCount', res.data.sumCount);
  556. });
  557. },
  558. getProductReplyList: function() {
  559. getReplyProduct(this.storeInfo.productId).then(res => {
  560. this.reply = res.data.productReply ? [res.data.productReply] : [];
  561. })
  562. },
  563. onClickService() {
  564. if(this.chatConfig.telephone_service_switch === 'open'){
  565. uni.makePhoneCall({
  566. phoneNumber: this.chatConfig.consumer_hotline //仅为示例
  567. });
  568. }else{
  569. // #ifdef APP-PLUS
  570. uni.navigateTo({
  571. url: '/pages/users/web_page/index?webUel=' + this.chatUrl + '&title=客服'
  572. })
  573. // #endif
  574. // #ifndef APP-PLUS
  575. location.href = this.chatUrl;
  576. // #endif
  577. }
  578. },
  579. closePosters: function() {
  580. this.posters = false;
  581. },
  582. closeChange: function() {
  583. this.$set(this.sharePacket, 'isState', true);
  584. },
  585. showAll: function() {
  586. this.AllIndexDefault = this.AllIndex;
  587. this.AllIndex = this.pink.length;
  588. },
  589. hideAll: function() {
  590. this.AllIndex = this.AllIndexDefault;
  591. },
  592. // 授权关闭
  593. authColse: function(e) {
  594. this.isShowAuth = e;
  595. },
  596. /**
  597. * 购物车手动填写
  598. *
  599. */
  600. iptCartNum: function(e) {
  601. if (e > this.onceNum) {
  602. this.$util.Tips({
  603. title: `该商品每次限购${this.onceNum}${this.storeInfo.unitName}`
  604. });
  605. this.$set(this.attribute.productSelect, 'cart_num', this.onceNum);
  606. this.$set(this, "cart_num", this.onceNum);
  607. } else {
  608. this.$set(this.attribute.productSelect, 'cart_num', e);
  609. this.$set(this, "cart_num", e);
  610. }
  611. },
  612. // 返回
  613. returns() {
  614. uni.navigateBack();
  615. },
  616. showNav(){
  617. this.currentPage = !this.currentPage;
  618. },
  619. // 获取详情
  620. combinationDetail() {
  621. var that = this;
  622. var data = that.id;
  623. getCombinationDetail(data).then(function(res) {
  624. //分享地址
  625. that.openPages = '/pages/activity/goods_combination_details/index?id=' + that.id + '&spread=' + that.uid;
  626. that.dataShow = 1;
  627. uni.setNavigationBarTitle({
  628. title: res.data.storeCombination.storeName.substring(0, 16)
  629. })
  630. that.masterStatus = res.data.masterStatus;
  631. that.storeInfo = res.data.storeCombination;
  632. that.getProductReplyList();
  633. that.getProductReplyCount();
  634. let sliderImage = JSON.parse(res.data.storeCombination.sliderImage);
  635. if (that.getFileType(sliderImage[0]) == 'video') {
  636. //判断轮播图第一张是否是视频,如果是,就赋值给videoLink,并且将其在轮播图中删除
  637. that.$set(that, 'videoLink', sliderImage[0]);
  638. sliderImage.splice(0, 1);
  639. }
  640. that.imgUrls = sliderImage || [];
  641. that.attribute.productSelect.num = res.data.storeCombination.onceNum;
  642. that.userCollect = res.data.userCollect;
  643. that.pink = res.data.pinkList || [];
  644. // that.pindAll = res.data.pindAll || [];
  645. that.itemNew = res.data.pinkOkList || [];
  646. that.pinkOkSum = res.data.pinkOkSum;
  647. that.attribute.productAttr = res.data.productAttr || [];
  648. that.productValue = res.data.productValue;
  649. for(let key in res.data.productValue){
  650. let obj = res.data.productValue[key];
  651. that.skuArr.push(obj)
  652. }
  653. that.$set(that, "selectSku", that.skuArr[0]);
  654. that.onceNum = res.data.storeCombination.onceNum;
  655. // that.PromotionCode = res.data.storeInfo.code_base
  656. // #ifdef H5
  657. that.setShare();
  658. that.storeImage = that.storeInfo.image;
  659. that.getImageBase64(that.storeInfo.image);
  660. that.make();
  661. // #endif
  662. // #ifdef APP-PLUS
  663. that.downloadFilestoreImage();
  664. that.downloadFileAppCode();
  665. // #endif
  666. // #ifdef MP
  667. that.getQrcode();
  668. that.imgTop = res.data.storeCombination.image;
  669. // #endif
  670. // #ifndef H5
  671. that.downloadFilestoreImage();
  672. // #endif
  673. // that.setProductSelect();
  674. let productAttr = res.data.productAttr.map(item => {
  675. return {
  676. attrName : item.attrName,
  677. attrValues: item.attrValues.split(','),
  678. id:item.id,
  679. isDel:item.isDel,
  680. productId:item.productId,
  681. type:item.type
  682. }
  683. });
  684. that.$set(that.attribute,'productAttr',productAttr);
  685. that.DefaultSelect();
  686. setTimeout(function() {
  687. that.infoScroll();
  688. }, 500);
  689. setTimeout(() => {
  690. that.showSkeleton = false
  691. }, 1000)
  692. }).catch(function(err) {
  693. that.$util.Tips({
  694. title: err
  695. }, {
  696. tab: 3
  697. })
  698. })
  699. },
  700. //#ifdef H5
  701. setShare: function() {
  702. this.$wechat.isWeixin() &&
  703. this.$wechat.wechatEvevt([
  704. "updateAppMessageShareData",
  705. "updateTimelineShareData",
  706. "onMenuShareAppMessage",
  707. "onMenuShareTimeline"
  708. ], {
  709. desc: app.globalData.companyName,
  710. title: this.storeInfo.storeName,
  711. link: location.href,
  712. imgUrl: this.storeInfo.image
  713. }).then(res => {
  714. }).catch(err => {
  715. console.log(err);
  716. });
  717. },
  718. //#endif
  719. /**
  720. * 默认选中属性
  721. *
  722. */
  723. DefaultSelect: function() {
  724. let self = this, productAttr = self.attribute.productAttr,value = [];
  725. for (var key in self.productValue) {
  726. if (self.productValue[key].quota > 0) {
  727. value = productAttr.length ? key.split(",") : [];
  728. break;
  729. }
  730. }
  731. for (let i = 0; i < value.length; i++) {
  732. self.$set(productAttr[i], "index", value[i]);
  733. }
  734. //sort();排序函数:数字-英文-汉字;
  735. let productSelect = self.productValue[value.join(",")];
  736. if (productSelect && productAttr.length) {
  737. self.$set(self.attribute.productSelect,"storeName",self.storeInfo.storeName);
  738. self.$set(self.attribute.productSelect, "image", productSelect.image);
  739. self.$set(self.attribute.productSelect, "price", productSelect.price);
  740. self.$set(self.attribute.productSelect, "unique", productSelect.id);
  741. self.$set(self.attribute.productSelect, "quota", productSelect.quota);
  742. self.$set(self.attribute.productSelect, "quotaShow", productSelect.quotaShow);
  743. self.$set(self.attribute.productSelect, "cart_num", 1);
  744. this.$set(this, "attrValue", value.join(","));
  745. this.$set(this, "attrTxt", "已选择");
  746. } else if (!productSelect && productAttr.length) {
  747. self.$set(self.attribute.productSelect,"storeName",self.storeInfo.storeName);
  748. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  749. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  750. self.$set(self.attribute.productSelect, "quota", 0);
  751. self.$set(self.attribute.productSelect, "quotaShow", 0);
  752. self.$set(self.attribute.productSelect, "unique", "");
  753. self.$set(self.attribute.productSelect, "cart_num", 0);
  754. self.$set(self, "attrValue", "");
  755. self.$set(self, "attrTxt", "请选择");
  756. } else if (!productSelect && !productAttr.length) {
  757. self.$set(self.attribute.productSelect,"storeName",self.storeInfo.storeName);
  758. self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
  759. self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
  760. self.$set(self.attribute.productSelect, "quota", self.storeInfo.quota);
  761. let uniId = self.skuArr[0].id;
  762. self.$set(self.attribute.productSelect,"unique", uniId);
  763. self.$set(self.attribute.productSelect, "cart_num", 1);
  764. self.$set(self, "attrValue", "");
  765. self.$set(self, "attrTxt", "请选择");
  766. }
  767. },
  768. infoScroll: function() {
  769. var that = this,
  770. topArr = [],
  771. heightArr = [];
  772. for (var i = 0; i < that.navList.length; i++) { //productList
  773. //获取元素所在位置
  774. var query = uni.createSelectorQuery().in(this);
  775. var idView = "#past" + i;
  776. // if (!that.data.good_list.length && i == 2) {
  777. // var idView = "#past" + 3;
  778. // }
  779. query.select(idView).boundingClientRect();
  780. query.exec(function(res) {
  781. var top = res[0].top;
  782. var height = res[0].height;
  783. topArr.push(top);
  784. heightArr.push(height);
  785. that.topArr = topArr
  786. that.heightArr = heightArr
  787. });
  788. };
  789. },
  790. selecAttr: function() {
  791. this.attribute.cartAttr = true
  792. },
  793. onMyEvent: function() {
  794. this.$set(this.attribute, 'cartAttr', false);
  795. this.$set(this, 'isOpen', false);
  796. },
  797. /**
  798. * 购物车数量加和数量减
  799. *
  800. */
  801. ChangeCartNum: function(changeValue) {
  802. //changeValue:是否 加|减
  803. //获取当前变动属性
  804. let productSelect = this.productValue[this.attrValue];
  805. if (this.buyNum === productSelect.quota) {
  806. return this.$util.Tips({
  807. title: '您已超出当前商品每人限购数量,请浏览其他商品'
  808. });
  809. }
  810. if (this.cart_num) {
  811. productSelect.cart_num = this.cart_num;
  812. this.attribute.productSelect.cart_num = this.cart_num;
  813. }
  814. //如果没有属性,赋值给商品默认库存
  815. if (productSelect === undefined && !this.attribute.productAttr.length) productSelect = this.attribute
  816. .productSelect;
  817. //无属性值即库存为0;不存在加减;
  818. if (productSelect === undefined) return;
  819. let quotaShow = productSelect.quota_show || 0;
  820. let quota = productSelect.quota || 0;
  821. let num = this.attribute.productSelect;
  822. let nums = this.storeInfo.onceNum || 0;
  823. //设置默认数据
  824. if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
  825. if (changeValue) {
  826. if (num.cart_num === this.onceNum) {
  827. return this.$util.Tips({
  828. title: `该商品每次限购${this.onceNum}${this.storeInfo.unitName}`
  829. });
  830. }
  831. num.cart_num++;
  832. let arrMin = [];
  833. arrMin.push(nums);
  834. arrMin.push(quota);
  835. // arrMin.push(stock);
  836. let minN = Math.min.apply(null, arrMin);
  837. if (num.cart_num >= minN) {
  838. this.$set(this.attribute.productSelect, "cart_num", minN ? minN : 1);
  839. this.$set(this, "cart_num", minN ? minN : 1);
  840. }
  841. this.$set(this, "cart_num", num.cart_num);
  842. this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
  843. } else {
  844. num.cart_num--;
  845. if (num.cart_num < 1) {
  846. this.$set(this.attribute.productSelect, "cart_num", 1);
  847. this.$set(this, "cart_num", 1);
  848. }
  849. this.$set(this, "cart_num", num.cart_num);
  850. this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
  851. }
  852. },
  853. attrVal(val) {
  854. this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attrValues[val
  855. .indexn];
  856. },
  857. /**
  858. * 属性变动赋值
  859. *
  860. */
  861. ChangeAttr: function(res) {
  862. this.$set(this, 'cart_num', 1);
  863. let productSelect = this.productValue[res];
  864. this.$set(this, "selectSku", productSelect);
  865. if (productSelect) {
  866. this.$set(this.attribute.productSelect, "image", productSelect.image);
  867. this.$set(this.attribute.productSelect, "price", productSelect.price);
  868. this.$set(this.attribute.productSelect, "unique", productSelect.id);
  869. this.$set(this.attribute.productSelect, "cart_num", 1);
  870. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  871. this.$set(this.attribute.productSelect, "quotaShow", productSelect.quotaShow);
  872. this.$set(this, "attrValue", res);
  873. this.attrTxt = "已选择"
  874. } else {
  875. this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
  876. this.$set(this.attribute.productSelect, "price", this.storeInfo.price);
  877. this.$set(this.attribute.productSelect, "unique", "");
  878. this.$set(this.attribute.productSelect, "cart_num", 0);
  879. this.$set(this.attribute.productSelect, "quota", 0);
  880. this.$set(this.attribute.productSelect, "quotaShow", 0);
  881. this.$set(this, "attrValue", "");
  882. this.attrTxt = "已选择"
  883. }
  884. },
  885. // 单独购买
  886. goProduct() {
  887. uni.navigateTo({
  888. url: '/pages/goods/goods_details/index?id=' + this.storeInfo.productId
  889. })
  890. },
  891. // 立即购买
  892. goCat() {
  893. var that = this;
  894. var productSelect = this.productValue[this.attrValue];
  895. //打开属性
  896. if (this.isOpen)
  897. this.attribute.cartAttr = true
  898. else
  899. this.attribute.cartAttr = !this.attribute.cartAttr
  900. //只有关闭属性弹窗时进行加入购物车
  901. if (this.attribute.cartAttr === true && this.isOpen == false) return this.isOpen = true
  902. //如果有属性,没有选择,提示用户选择
  903. if (this.attribute.productAttr.length && productSelect === undefined && this.isOpen == true) return that
  904. .$util.Tips({
  905. title: '请选择属性'
  906. });
  907. var data = {
  908. productId: that.storeInfo.productId,
  909. combinationId: parseFloat(that.id),
  910. cartNum: that.cart_num ? this.cart_num : this.attribute.productSelect.cart_num,
  911. productAttrUnique: productSelect !== undefined ? productSelect.id : '',
  912. isNew: true,
  913. };
  914. this.$Order.getPreOrder("buyNow",[{
  915. "attrValueId": parseFloat(this.attribute.productSelect.unique),
  916. "combinationId": parseFloat(this.id),
  917. "productNum": parseFloat(this.cart_num ? this.cart_num : this.attribute.productSelect.cart_num),
  918. "productId": parseFloat(this.storeInfo.productId)
  919. }]);
  920. },
  921. /**
  922. * 收藏商品
  923. */
  924. setCollect: function() {
  925. var that = this;
  926. if (this.userCollect) {
  927. collectDel(this.storeInfo.productId).then(res => {
  928. that.userCollect = !that.userCollect
  929. })
  930. } else {
  931. collectAdd(this.storeInfo.productId).then(res => {
  932. that.userCollect = !that.userCollect
  933. })
  934. }
  935. },
  936. /**
  937. * 分享打开
  938. *
  939. */
  940. listenerActionSheet: function() {
  941. if (this.isLogin == false) {
  942. toLogin();
  943. } else {
  944. // #ifdef H5
  945. if (this.$wechat.isWeixin() === true) {
  946. this.weixinStatus = true;
  947. }
  948. // #endif
  949. // #ifndef APP-PLUS
  950. this.goPoster()
  951. // #endif
  952. this.posters = true;
  953. }
  954. },
  955. // 分享关闭
  956. listenerActionClose: function() {
  957. this.canvasStatus = false;
  958. },
  959. //隐藏海报
  960. posterImageClose: function() {
  961. this.canvasStatus = false;
  962. this.posters = false;
  963. },
  964. //替换安全域名
  965. setDomain: function(url) {
  966. url = url ? url.toString() : '';
  967. //本地调试打开,生产请注销
  968. if (url.indexOf("https://") > -1) return url;
  969. else return url.replace('http://', 'https://');
  970. },
  971. //获取海报产品图
  972. downloadFilestoreImage: function() {
  973. let that = this;
  974. uni.downloadFile({
  975. url: that.setDomain(that.storeInfo.image),
  976. success: function(res) {
  977. that.storeImage = res.tempFilePath;
  978. },
  979. fail: function() {
  980. return that.$util.Tips({
  981. title: ''
  982. });
  983. that.storeImage = '';
  984. },
  985. });
  986. },
  987. getFileType(fileName) {
  988. // 后缀获取
  989. let suffix = '';
  990. // 获取类型结果
  991. let result = '';
  992. try {
  993. const flieArr = fileName.split('.');
  994. suffix = flieArr[flieArr.length - 1];
  995. } catch (err) {
  996. suffix = '';
  997. }
  998. // fileName无后缀返回 false
  999. if (!suffix) {
  1000. return false;
  1001. }
  1002. suffix = suffix.toLocaleLowerCase();
  1003. // 图片格式
  1004. const imglist = ['png', 'jpg', 'jpeg', 'bmp', 'gif'];
  1005. // 进行图片匹配
  1006. result = imglist.find(item => item === suffix);
  1007. if (result) {
  1008. return 'image';
  1009. }
  1010. // 匹配 视频
  1011. const videolist = ['mp4', 'm2v', 'mkv', 'rmvb', 'wmv', 'avi', 'flv', 'mov', 'm4v'];
  1012. result = videolist.find(item => item === suffix);
  1013. if (result) {
  1014. return 'video';
  1015. }
  1016. // 其他 文件类型
  1017. return 'other';
  1018. },
  1019. // app获取二维码
  1020. downloadFileAppCode() {
  1021. let that = this;
  1022. uni.downloadFile({
  1023. url: that.setDomain(that.storeInfo.code_base),
  1024. success: function(res) {
  1025. that.PromotionCode = res.tempFilePath;
  1026. },
  1027. fail: function() {
  1028. return that.$util.Tips({
  1029. title: ''
  1030. });
  1031. that.PromotionCode = '';
  1032. },
  1033. });
  1034. },
  1035. getImageBase64: function(images) {
  1036. let that = this;
  1037. imageBase64({
  1038. url: images
  1039. }).then(res => {
  1040. that.imgTop = res.data.code
  1041. })
  1042. },
  1043. // 小程序关闭分享弹窗;
  1044. goFriend: function() {
  1045. this.posters = false;
  1046. },
  1047. /**
  1048. * 生成海报
  1049. */
  1050. goPoster: function() {
  1051. let that = this;
  1052. uni.showLoading({
  1053. title: '海报生成中',
  1054. mask: true
  1055. });
  1056. that.posters = false;
  1057. let arrImagesUrl = '';
  1058. let arrImagesUrlTop = '';
  1059. if (!that.PromotionCode) {
  1060. uni.hideLoading();
  1061. that.$util.Tips({
  1062. title: that.errT
  1063. });
  1064. return
  1065. }
  1066. uni.downloadFile({
  1067. url: that.imgTop,
  1068. success: (res) => {
  1069. arrImagesUrlTop = res.tempFilePath;
  1070. let arrImages = [that.posterbackgd, arrImagesUrlTop, that.PromotionCode];
  1071. let storeName = that.storeInfo.storeName;
  1072. let price = that.storeInfo.price;
  1073. setTimeout(() => {
  1074. that.$util.PosterCanvas(arrImages, storeName, price, that.storeInfo
  1075. .otPrice,
  1076. function(tempFilePath) {
  1077. that.posterImage = tempFilePath;
  1078. that.canvasStatus = true;
  1079. uni.hideLoading();
  1080. });
  1081. }, 500);
  1082. }
  1083. });
  1084. },
  1085. // 图片预览;
  1086. getpreviewImage: function() {
  1087. if (this.posterImage) {
  1088. let photoList = [];
  1089. photoList.push(this.posterImage)
  1090. uni.previewImage({
  1091. urls: photoList,
  1092. current: this.posterImage
  1093. });
  1094. } else {
  1095. this.$util.Tips({
  1096. title: '您的海报尚未生成'
  1097. });
  1098. }
  1099. },
  1100. // 小程序二维码
  1101. getQrcode() {
  1102. let that = this;
  1103. let data = {
  1104. pid: that.uid,
  1105. id: that.id,
  1106. path: 'pages/activity/goods_combination_details/index'
  1107. }
  1108. getQrcode(data).then(res => {
  1109. base64src(res.data.code,Date.now(), res => {
  1110. that.PromotionCode = res;
  1111. });
  1112. }).catch(err => {
  1113. that.errT = err;
  1114. });
  1115. },
  1116. // 生成二维码;
  1117. make() {
  1118. let href = location.href.split('?')[0] + "?id="+ this.id + "&spread=" + this.uid;
  1119. uQRCode.make({
  1120. canvasId: 'qrcode',
  1121. text: href,
  1122. size: this.qrcodeSize,
  1123. margin: 10,
  1124. success: res => {
  1125. this.PromotionCode = res;
  1126. },
  1127. complete: (res) => {},
  1128. fail: res => {
  1129. this.$util.Tips({
  1130. title: '海报二维码生成失败!'
  1131. });
  1132. }
  1133. })
  1134. },
  1135. /*
  1136. * 保存到手机相册
  1137. */
  1138. // #ifdef MP
  1139. savePosterPath: function() {
  1140. let that = this;
  1141. uni.getSetting({
  1142. success(res) {
  1143. if (!res.authSetting['scope.writePhotosAlbum']) {
  1144. uni.authorize({
  1145. scope: 'scope.writePhotosAlbum',
  1146. success() {
  1147. uni.saveImageToPhotosAlbum({
  1148. filePath: that.posterImage,
  1149. success: function(res) {
  1150. that.posterImageClose();
  1151. that.$util.Tips({
  1152. title: '保存成功',
  1153. icon: 'success'
  1154. });
  1155. },
  1156. fail: function(res) {
  1157. that.$util.Tips({
  1158. title: '保存失败'
  1159. });
  1160. }
  1161. })
  1162. }
  1163. })
  1164. } else {
  1165. uni.saveImageToPhotosAlbum({
  1166. filePath: that.posterImage,
  1167. success: function(res) {
  1168. that.posterImageClose();
  1169. that.$util.Tips({
  1170. title: '保存成功',
  1171. icon: 'success'
  1172. });
  1173. },
  1174. fail: function(res) {
  1175. that.$util.Tips({
  1176. title: '保存失败'
  1177. });
  1178. },
  1179. })
  1180. }
  1181. }
  1182. })
  1183. },
  1184. // #endif
  1185. setShareInfoStatus: function() {
  1186. let data = this.storeInfo;
  1187. let href = location.href;
  1188. if (this.$wechat.isWeixin()) {
  1189. href =
  1190. href.indexOf("?") === -1 ?
  1191. href + "?spread=" + this.uid :
  1192. href + "&spread=" + this.uid;
  1193. let configAppMessage = {
  1194. desc: data.storeInfo,
  1195. title: data.storeName,
  1196. link: href,
  1197. imgUrl: data.image
  1198. };
  1199. this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
  1200. configAppMessage)
  1201. }
  1202. },
  1203. scroll: function(e) {
  1204. var that = this,
  1205. scrollY = e.detail.scrollTop;
  1206. var opacity = scrollY / 500;
  1207. opacity = opacity > 1 ? 1 : opacity;
  1208. that.opacity = opacity
  1209. that.scrollY = scrollY
  1210. if (that.lock) {
  1211. that.lock = false
  1212. return;
  1213. }
  1214. for (var i = 0; i < that.topArr.length; i++) {
  1215. if (scrollY < that.topArr[i] - (app.globalData.navHeight / 2) + that.heightArr[i]) {
  1216. that.navActive = i
  1217. break
  1218. }
  1219. }
  1220. },
  1221. tap: function(item, index) {
  1222. var id = item.id;
  1223. var index = index;
  1224. var that = this;
  1225. // if (!this.data.good_list.length && id == "past2") {
  1226. // id = "past3"
  1227. // }
  1228. this.toView = id;
  1229. this.navActive = index;
  1230. this.lock = true;
  1231. this.scrollTop = index > 0 ? that.topArr[index] - (app.globalData.navHeight / 2) : that.topArr[index]
  1232. },
  1233. hideNav(){
  1234. this.currentPage = false;
  1235. },
  1236. //下拉导航页面跳转
  1237. linkPage(url){
  1238. if(url == '/pages/index/index' || url == '/pages/order_addcart/order_addcart' || url == '/pages/user/index'){
  1239. uni.switchTab({
  1240. url
  1241. })
  1242. }else{
  1243. uni.navigateTo({
  1244. url
  1245. })
  1246. }
  1247. this.currentPage = false
  1248. },
  1249. showImg(index){
  1250. this.$refs.cusPreviewImg.open(this.selectSku.suk)
  1251. },
  1252. changeSwitch(e){
  1253. let productSelect = this.skuArr[e];
  1254. this.$set(this,'selectSku',productSelect);
  1255. var skuList = productSelect.suk.split(',');
  1256. skuList.forEach((i,index)=>{
  1257. this.$set(this.attribute.productAttr[index],'index',skuList[index]);
  1258. })
  1259. if (productSelect) {
  1260. this.$set(this.attribute.productSelect, "image", productSelect.image);
  1261. this.$set(this.attribute.productSelect, "price", productSelect.price);
  1262. this.$set(this.attribute.productSelect, "stock", productSelect.stock);
  1263. this.$set(this.attribute.productSelect, "unique", productSelect.id);
  1264. this.$set(this.attribute.productSelect, "quota", productSelect.quota);
  1265. this.$set(this.attribute.productSelect, "quotaShow", productSelect.quotaShow);
  1266. this.$set(this.attribute.productSelect, "cart_num", 1);
  1267. this.$set(this, "attrTxt", "已选择")
  1268. this.$set(this, "attrValue", productSelect.suk)
  1269. }
  1270. }
  1271. },
  1272. //#ifdef MP
  1273. onShareAppMessage() {
  1274. let that = this;
  1275. return {
  1276. title: that.storeInfo.storeName,
  1277. path: that.openPages,
  1278. imageUrl: that.storeInfo.image
  1279. };
  1280. }
  1281. //#endif
  1282. }
  1283. </script>
  1284. <style scoped lang="scss">
  1285. .pl-14{
  1286. padding-left: 14rpx;
  1287. }
  1288. .mb-02{
  1289. margin-bottom: 4rpx;
  1290. }
  1291. .select_nav{
  1292. width: 170rpx !important;
  1293. height: 60rpx !important;
  1294. border-radius: 33rpx;
  1295. background: rgba(255, 255, 255, 0.3);
  1296. border: 1px solid rgba(0,0,0,0.07);
  1297. color: #000;
  1298. position: fixed;
  1299. font-size: 18px;
  1300. line-height: 58rpx;
  1301. z-index: 1000;
  1302. left: 14rpx;
  1303. }
  1304. .px-20{
  1305. padding: 0 20rpx 0;
  1306. }
  1307. .justify-center{
  1308. justify-content: center;
  1309. }
  1310. .align-center {
  1311. align-items: center;
  1312. }
  1313. .nav_line{
  1314. content: '';
  1315. display: inline-block;
  1316. width: 1px;
  1317. height: 34rpx;
  1318. background: rgba(0, 0, 0, 0.2);
  1319. position: absolute;
  1320. left: 0;
  1321. right: 0;
  1322. margin: auto;
  1323. }
  1324. .bgwhite{
  1325. background: #fff;
  1326. }
  1327. .input {
  1328. display: flex;
  1329. align-items: center;
  1330. /* #ifdef MP */
  1331. width: 300rpx;
  1332. /* #endif */
  1333. /* #ifndef MP */
  1334. width: 460rpx;
  1335. /* #endif */
  1336. height: 58rpx;
  1337. padding: 0 0 0 30rpx;
  1338. border: 1px solid #E0E0E0;
  1339. border-radius: 29rpx;
  1340. color: #666;
  1341. font-size: 26rpx;
  1342. position: fixed;
  1343. left: 0;
  1344. right: 0;
  1345. margin: auto;
  1346. background: rgba(255, 255, 255, 0.3);
  1347. .iconfont {
  1348. margin-right: 20rpx;
  1349. font-size: 26rpx;
  1350. color: #666666;
  1351. }
  1352. }
  1353. .container_detail{
  1354. /* #ifdef MP */
  1355. margin-top:32rpx;
  1356. /* #endif */
  1357. }
  1358. .tab_nav{
  1359. width: 100%;
  1360. height: 48px;
  1361. padding:0 30rpx 0;
  1362. }
  1363. .right_select{
  1364. width: 58rpx;
  1365. height: 58rpx;
  1366. background: rgba(255, 255, 255, 0.3);
  1367. border: 1px solid rgba(0,0,0,0.1);
  1368. border-radius: 50%;
  1369. position: fixed;
  1370. right: 20rpx;
  1371. text-align: center;
  1372. line-height: 58rpx;
  1373. }
  1374. .dialog_nav{
  1375. position: absolute;
  1376. /* #ifdef MP */
  1377. left: 14rpx;
  1378. /* #endif */
  1379. /* #ifdef H5 || APP-PLUS*/
  1380. right: 14rpx;
  1381. /* #endif */
  1382. width: 240rpx;
  1383. background: #FFFFFF;
  1384. box-shadow: 0px 0px 16rpx rgba(0, 0, 0, 0.08);
  1385. z-index: 310;
  1386. border-radius: 14rpx;
  1387. &::before{
  1388. content: '';
  1389. width: 0;
  1390. height: 0;
  1391. position: absolute;
  1392. /* #ifdef MP */
  1393. left: 0;
  1394. right: 0;
  1395. margin:auto;
  1396. /* #endif */
  1397. /* #ifdef H5 || APP-PLUS */
  1398. right: 8px;
  1399. /* #endif */
  1400. top:-9px;
  1401. border-bottom: 10px solid #F5F5F5;
  1402. border-left: 10px solid transparent; /*transparent 表示透明*/
  1403. border-right: 10px solid transparent;
  1404. }
  1405. }
  1406. .dialog_nav_item{
  1407. width: 100%;
  1408. height: 84rpx;
  1409. line-height: 84rpx;
  1410. padding: 0 20rpx 0;
  1411. box-sizing: border-box;
  1412. border-bottom: #eee;
  1413. font-size: 28rpx;
  1414. color: #333;
  1415. position: relative;
  1416. .iconfont{
  1417. font-size: 32rpx;
  1418. }
  1419. }
  1420. .dialog_after{
  1421. ::after{
  1422. content: '';
  1423. position: absolute;
  1424. width:86px;
  1425. height: 1px;
  1426. background-color: #EEEEEE;
  1427. bottom: 0;
  1428. right: 0;
  1429. }
  1430. }
  1431. .pl-20{
  1432. padding-left: 20rpx;
  1433. }
  1434. .userEvaluation{
  1435. i{
  1436. display: inline-block;
  1437. }
  1438. }
  1439. .attribute{
  1440. .line1{
  1441. width: 600rpx;
  1442. }
  1443. }
  1444. .share-box {
  1445. z-index: 1000;
  1446. position: fixed;
  1447. left: 0;
  1448. top: 0;
  1449. width: 100%;
  1450. height: 100%;
  1451. image {
  1452. width: 100%;
  1453. height: 100%;
  1454. }
  1455. }
  1456. .generate-posters {
  1457. width: 100%;
  1458. height: 318rpx;
  1459. background-color: #fff;
  1460. position: fixed;
  1461. left: 0;
  1462. bottom: 0;
  1463. z-index: 388;
  1464. transform: translate3d(0, 100%, 0);
  1465. transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  1466. border-top: 1rpx solid #eee;
  1467. .generateCon {
  1468. height: 220rpx;
  1469. }
  1470. .generateClose {
  1471. height: 98rpx;
  1472. font-size: 28rpx;
  1473. color: #333333;
  1474. border-top: 1px solid #eee;
  1475. }
  1476. .item {
  1477. .pictrue {
  1478. width: 96rpx;
  1479. height: 96rpx;
  1480. border-radius: 50%;
  1481. margin: 0 auto 6rpx auto;
  1482. image {
  1483. width: 100%;
  1484. height: 100%;
  1485. border-radius: 50%;
  1486. }
  1487. }
  1488. }
  1489. }
  1490. .generate-posters.on {
  1491. transform: translate3d(0, 0, 0);
  1492. }
  1493. .generate-posters .item {
  1494. flex: 1;
  1495. text-align: center;
  1496. font-size: 30rpx;
  1497. }
  1498. .generate-posters .item .iconfont {
  1499. font-size: 80rpx;
  1500. color: #5eae72;
  1501. }
  1502. .generate-posters .item .iconfont.icon-haibao {
  1503. color: #5391f1;
  1504. }
  1505. .generate-posters .item .iconfont.icon-haowuquan1 {
  1506. color: #ff954d;
  1507. }
  1508. .navbar .header {
  1509. font-size: 30rpx;
  1510. color: #050505;
  1511. display: flex;
  1512. align-items: center;
  1513. /* #ifndef MP */
  1514. width: 460rpx;
  1515. /* #endif */
  1516. /* #ifdef MP */
  1517. width: 360rpx;
  1518. /* #endif */
  1519. height: 100rpx;
  1520. position: fixed;
  1521. left: 0;
  1522. right: 0;
  1523. margin: auto;
  1524. }
  1525. .icon-xiangzuo {
  1526. /* #ifdef H5 */
  1527. top: 20rpx !important;
  1528. /* #endif */
  1529. }
  1530. .navbar .header .item {
  1531. position: relative;
  1532. margin: 0 25rpx;
  1533. }
  1534. .navbar .header .item.on:before {
  1535. position: absolute;
  1536. width: 60rpx;
  1537. height: 5rpx;
  1538. background-repeat: no-repeat;
  1539. content: "";
  1540. @include linear-gradient(theme);
  1541. bottom: -10rpx;
  1542. left: 50%;
  1543. margin-left: -28rpx;
  1544. }
  1545. .navbar {
  1546. position: fixed;
  1547. top: 0;
  1548. left: 0;
  1549. z-index: 98;
  1550. width: 100%;
  1551. }
  1552. .navbar .navbarH {
  1553. position: relative;
  1554. }
  1555. .navbar .navbarH .navbarCon {
  1556. position: absolute;
  1557. bottom: 0;
  1558. height: 100rpx;
  1559. width: 100%;
  1560. }
  1561. .h5_back {
  1562. color: #000;
  1563. position: fixed;
  1564. left:20rpx;
  1565. font-size: 32rpx;
  1566. text-align: center;
  1567. width: 58rpx;
  1568. height: 58rpx;
  1569. background: rgba(255, 255, 255, 0.3);
  1570. border: 1px solid rgba(0,0,0,0.1);
  1571. border-radius: 50%;
  1572. }
  1573. .product-con .wrapper {
  1574. margin-top: 30rpx;
  1575. border-radius: 14rpx;
  1576. }
  1577. .product-con .wrapper .share .money .y-money {
  1578. color: #82848f;
  1579. margin-left: 13rpx;
  1580. text-decoration: line-through;
  1581. font-weight: normal;
  1582. }
  1583. .font_color{
  1584. @include main_color(theme);
  1585. }
  1586. .product-con .notice {
  1587. width: 100%;
  1588. height: 62rpx;
  1589. @include coupons_light_color(theme);
  1590. padding: 0 24rpx;
  1591. box-sizing: border-box;
  1592. }
  1593. .product-con .notice .num {
  1594. font-size: 24rpx;
  1595. @include main_color(theme);
  1596. }
  1597. .product-con .notice .num .iconfont {
  1598. font-size: 30rpx;
  1599. vertical-align: -3rpx;
  1600. margin-right: 20rpx;
  1601. }
  1602. .product-con .notice .num .line {
  1603. color: #333333;
  1604. margin-left: 15rpx;
  1605. }
  1606. .product-con .notice .swiper {
  1607. height: 100%;
  1608. width: 360rpx;
  1609. line-height: 62rpx;
  1610. overflow: hidden;
  1611. margin-left: 14rpx;
  1612. }
  1613. .product-con .notice .swiper swiper {
  1614. height: 100%;
  1615. width: 100%;
  1616. overflow: hidden;
  1617. font-size: 24rpx;
  1618. color: #333333;
  1619. }
  1620. .product-con .assemble {
  1621. background-color: #fff;
  1622. }
  1623. .product-con .assemble .item {
  1624. padding-right: 24rpx;
  1625. margin-left: 24rpx;
  1626. border-bottom: 1rpx solid #f0f0f0;
  1627. height: 130rpx;
  1628. }
  1629. .product-con .assemble .item .pictxt .text {
  1630. width: 172rpx;
  1631. margin-left: 16rpx;
  1632. }
  1633. .product-con .assemble .item .pictxt .pictrue {
  1634. width: 80rpx;
  1635. height: 80rpx;
  1636. background: #f0f0f0;
  1637. border-radius: 50%;
  1638. }
  1639. .product-con .assemble .item .pictxt .pictrue image {
  1640. width: 100%;
  1641. height: 100%;
  1642. border-radius: 50%;
  1643. }
  1644. .product-con .assemble .item .right .lack {
  1645. font-size: 24rpx;
  1646. color: #333333;
  1647. }
  1648. .product-con .assemble .item .right .time {
  1649. position: relative;
  1650. left: -10rpx;
  1651. font-size: 22rpx;
  1652. color: #82848f;
  1653. margin-top: 5rpx;
  1654. }
  1655. .product-con .assemble .item .right .spellBnt {
  1656. font-size: 24rpx;
  1657. color: #fff;
  1658. width: 140rpx;
  1659. height: 50rpx;
  1660. border-radius: 50rpx;
  1661. @include main_bg_color(theme);
  1662. text-align: center;
  1663. line-height: 50rpx;
  1664. margin-left: 16rpx;
  1665. }
  1666. .product-con .assemble .item .right .spellBnt .iconfont {
  1667. font-size: 25rpx;
  1668. margin-left: 5rpx;
  1669. }
  1670. .product-con .assemble .more {
  1671. font-size: 24rpx;
  1672. color: #333333;
  1673. text-align: center;
  1674. height: 90rpx;
  1675. line-height: 90rpx;
  1676. }
  1677. .product-con .assemble .more .iconfont {
  1678. margin-left: 13rpx;
  1679. font-size: 25rpx;
  1680. }
  1681. .product-con .playWay {
  1682. background-color: #fff;
  1683. padding: 0 24rpx;
  1684. margin-top: 20rpx;
  1685. font-size: 28rpx;
  1686. color: #333333;
  1687. }
  1688. .product-con .playWay .title {
  1689. height: 86rpx;
  1690. border-bottom: 1rpx solid #eee;
  1691. font-size: 28rpx;
  1692. }
  1693. .product-con .playWay .title .iconfont {
  1694. margin-left: 13rpx;
  1695. font-size: 26rpx;
  1696. color: #717171;
  1697. }
  1698. .product-con .playWay .way {
  1699. height: 110rpx;
  1700. line-height: 110rpx;
  1701. font-size: 26rpx;
  1702. color: #333333;
  1703. }
  1704. .product-con .playWay .way .iconfont {
  1705. color: #cdcdcd;
  1706. font-size: 26rpx;
  1707. margin: 0 35rpx;
  1708. }
  1709. .product-con .playWay .way .item .num {
  1710. font-size: 35rpx;
  1711. // vertical-align: 4rpx;
  1712. margin-right: 6rpx;
  1713. display: inline-block;
  1714. }
  1715. .product-con .playWay .way .item .tip {
  1716. font-size: 22rpx;
  1717. color: #a5a5a5;
  1718. margin-top: 7rpx;
  1719. }
  1720. .product-con .footer {
  1721. padding: 0 20rpx 0 30rpx;
  1722. position: fixed;
  1723. bottom:env(safe-area-inset-bottom);
  1724. width: 100%;
  1725. box-sizing: border-box;
  1726. height: 100rpx;
  1727. background-color: #fff;
  1728. z-index: 277;
  1729. border-top: 1rpx solid #f0f0f0;
  1730. text-align: center;
  1731. &:after{
  1732. content:'';
  1733. height:env(safe-area-inset-bottom); // 这里是重点
  1734. position: absolute;
  1735. top:100%;
  1736. left: 0;
  1737. right:0;
  1738. background-color: #fff;
  1739. }
  1740. }
  1741. .product-con .footer .item {
  1742. font-size: 18rpx;
  1743. color: #666;
  1744. }
  1745. .product-con .footer .item .iconfont {
  1746. text-align: center;
  1747. font-size: 40rpx;
  1748. }
  1749. .product-con .footer .item .iconfont.icon-shoucang1 {
  1750. @include main_color(theme);
  1751. }
  1752. .product-con .footer .item .iconfont.icon-gouwuche1 {
  1753. font-size: 40rpx;
  1754. position: relative;
  1755. }
  1756. .product-con .footer .item .iconfont.icon-gouwuche1 .num {
  1757. color: #fff;
  1758. position: absolute;
  1759. font-size: 18rpx;
  1760. padding: 2rpx 8rpx 3rpx;
  1761. border-radius: 200rpx;
  1762. top: -10rpx;
  1763. right: -10rpx;
  1764. }
  1765. .product-con .footer .bnt {
  1766. width: 540rpx;
  1767. height: 76rpx;
  1768. }
  1769. .product-con .footer .bnt .bnts {
  1770. width: 270rpx;
  1771. text-align: center;
  1772. line-height: 76rpx;
  1773. color: #fff;
  1774. font-size: 28rpx;
  1775. }
  1776. .product-con .footer .bnt .joinCart {
  1777. border-radius: 50rpx 0 0 50rpx;
  1778. @include left_color(theme);
  1779. }
  1780. .radius{
  1781. border-radius: 50rpx 0 0 50rpx;
  1782. }
  1783. .product-con .footer .bnt .buy {
  1784. border-radius: 0 50rpx 50rpx 0;
  1785. @include main_bg_color(theme);
  1786. }
  1787. .buy-btns{
  1788. border-radius: 0 50rpx 50rpx 0 !important;
  1789. }
  1790. .setCollectBox {
  1791. font-size: 18rpx;
  1792. color: #666;
  1793. }
  1794. .canvas {
  1795. position: fixed;
  1796. z-index: -5;
  1797. opacity: 0;
  1798. }
  1799. .poster-pop {
  1800. width: 450rpx;
  1801. height: 714rpx;
  1802. position: fixed;
  1803. left: 50%;
  1804. transform: translateX(-50%);
  1805. z-index: 99;
  1806. top: 50%;
  1807. margin-top: -357rpx;
  1808. }
  1809. .poster-pop image {
  1810. width: 100%;
  1811. height: 100%;
  1812. display: block;
  1813. }
  1814. .poster-pop .close {
  1815. width: 46rpx;
  1816. height: 75rpx;
  1817. position: fixed;
  1818. right: 0;
  1819. top: -73rpx;
  1820. display: block;
  1821. }
  1822. .poster-pop .save-poster {
  1823. background-color: #df2d0a;
  1824. font-size: 22rpx;
  1825. color: #fff;
  1826. text-align: center;
  1827. height: 76rpx;
  1828. line-height: 76rpx;
  1829. width: 100%;
  1830. }
  1831. .poster-pop .keep {
  1832. color: #fff;
  1833. text-align: center;
  1834. font-size: 25rpx;
  1835. margin-top: 10rpx;
  1836. }
  1837. .mask {
  1838. position: fixed;
  1839. top: 0;
  1840. left: 0;
  1841. right: 0;
  1842. bottom: 0;
  1843. background-color: rgba(0, 0, 0, 0.6);
  1844. z-index: 9;
  1845. }
  1846. .pro-wrapper .iconn {
  1847. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAYKElEQVR4nO2deXhTVfrHP0nTlpautHSjZSkt+x42UTYVF5C4gsKIOqOjIxJHZdTfyG+eEZ1xxgVHjeLo6KiIKKsYcAUEBQooASxQKC1QulPolm50S+aPJPXmZm2a3BTo53n6QM49956T+8259yzv+x7ZmC8WcbGjU2migBFAGpAK9AGSgBjzX3dAAYSbT6k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UBvS6rBaJR05Wh64ki38s1KGc+81GltYnVXdOOJoa79pBNDerB09AIiAkMBk7gPDZxFbDeboD82hAeGcGX8ELfq529ya4rF8Tp7A9EKRDEiSxoqaDJIs/IiQ8b4WKfR4azy/mnY7Tw48EZKGypJDo11FLXGhhuTx3JN0ijya8uIDg4jJti+uAajgZIGU5TaZkMrClmAy75BZ8EScTctwip6xnAFkC5MkXJyIyk0xm2RLEQEhra1xvYQJFeIvzxg6rxtKT7A/vIcsqsLaTG0Eh0URs9ukYQogjAYjfQPT+TshSpqmxvaXa6U5NaUiL/jIAXQV5iSX1smWYUSQ6MlK0uIESPfFOr4KHcrOfoiBkT0YnriSB4dfDNDono7/NGVN+rJrDjN3nPH2VGayfkLeolr7pxiWzeXVAWmTSzayJNQ4DCF9DNGx6sLeP7Qp+Toi7gxeRxLR9/tdEwsJCY4gumJI5meOJKnh8/hh9LDfJS7lcOVeb6ttJsU1Z0XJ/VWAPFWmeptMvmMZqN3g3i74pOT23nj2BeM7tGftdOX0CcszuNryWXyNrG3lRzi
  1848. width: 100rpx;
  1849. height: 100rpx;
  1850. background-repeat: no-repeat;
  1851. background-size: 100% 100%;
  1852. margin: 0 auto;
  1853. }
  1854. .pro-wrapper .iconn.iconn1 {
  1855. background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAR4ElEQVR4nO2deZgU5Z3HP1XVU9zDMYDcIDcaBjJQCsMhDy54crjhTMDEXKtE27gGn8TkiZpo8qgRQyeyq0924wKrgMawEDRuUBFkQBsQgVW5j8EBgeGYGRBqpqv2j6oeaqqqr+nu6eqZ/jxPP1BvvTVVXd9+r9/7e3+vMHLxFbKdoF9uBxQC/YG+QG+gG1BgfloBPqCNeUklUANcBMrNTxlwFDgEHAB2KQH1fMN9i/oR9MtRz/sa6DlSRtAvy8BIYDQwDigCeib4Z8JCtwd6RLlXKbAD2ARsAbYpAVVN9JkzSVYIHPTL1wBTgFuByVwVKN30ND/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fhdh0WOPTL3Wu2AwdPdsJjO0jMq9ItHr+N2rymzu+Z7kPqLMHbpeG2pk3Sdq3gPlFEvOLJHQMK85FVUcSoUMLoVFXxZFw0e5LH1Bnc6Zu+dn3axcwBG8fxcOjKeCi3RERu8Btm/ZLyma6O7U7LAL7rSn9PLzYK0d0XLTbJwJ7rCkJ7nydwyP4REM7G3tEJaCexRIOzydC/9ibH+fwGP0KHAXzGHA2nLTNeqawa64IZxsumm2Hq5bJEuuZYV1zJTjbGN7NoVkJXBV4s/VMUXchcmy8HJ5DAEb0iC7wNoz9bAHo2ErItcNZxKDOgt3JvxIIgimwElCrgXetOaLsXp3DY4zt49DqHaAa6s4OvmnNMbF/TuBswUWrdeH/WM+sBWq9xQd0FGKu/0k3urfnPDxB7/aCNT4HGBr+LXxQK7ASUE8C71tz3jY4s6V4/xnvK+wS
  1856. }
  1857. .home-nav {
  1858. /* #ifdef H5 */
  1859. top: 20rpx !important;
  1860. /* #endif */
  1861. }
  1862. .home-nav {
  1863. color: #fff;
  1864. position: fixed;
  1865. font-size: 33rpx;
  1866. width: 56rpx;
  1867. height: 56rpx;
  1868. z-index: 999;
  1869. left: 33rpx;
  1870. background: rgba(190, 190, 190, 0.5);
  1871. border-radius: 50%;
  1872. &.on {
  1873. background: unset;
  1874. color: #333;
  1875. }
  1876. }
  1877. .home-nav .line {
  1878. width: 1rpx;
  1879. height: 24rpx;
  1880. background: rgba(255, 255, 255, 0.25);
  1881. }
  1882. .home-nav .icon-xiangzuo {
  1883. width: auto;
  1884. font-size: 28rpx;
  1885. }
  1886. .share-box {
  1887. z-index: 1000;
  1888. position: fixed;
  1889. left: 0;
  1890. top: 0;
  1891. width: 100%;
  1892. height: 100%;
  1893. }
  1894. .share-box image {
  1895. width: 100%;
  1896. height: 100%;
  1897. }
  1898. .mask_transparent{
  1899. position: fixed;
  1900. top: 0;
  1901. left: 0;
  1902. right: 0;
  1903. bottom: 0;
  1904. background:transparent;
  1905. z-index: 300;
  1906. }
  1907. .attrImg{
  1908. width: 66rpx;
  1909. height: 66rpx;
  1910. border-radius: 6rpx;
  1911. display: block;
  1912. margin-right: 14rpx;
  1913. }
  1914. .switchTxt{
  1915. height: 60rpx;
  1916. flex: 1;
  1917. line-height: 60rpx;
  1918. box-sizing: border-box;
  1919. background: #EEEEEE;
  1920. padding-right: 0 24rpx 0;
  1921. border-radius: 8rpx;
  1922. text-align: center;
  1923. }
  1924. </style>