product-details.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437
  1. <template>
  2. <view class="product" :style="{paddingBottom: userIdentity==1 ? '0rpx' :'188rpx'}">
  3. <view class="navbar" :class="navbarFiexd">
  4. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 0 }" @click="tabClick(0)">
  5. <text>详情</text>
  6. <text class="line"></text>
  7. </view>
  8. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 1 }" @click="tabClick(1)">
  9. <text>品牌</text>
  10. <text class="line"></text>
  11. </view>
  12. <view class="nav-item tui-skeleton-fillet" :class="{ current: tabCurrentIndex === 2 }" @click="tabClick(2)">
  13. <text>推荐</text>
  14. <text class="line"></text>
  15. </view>
  16. </view>
  17. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5"></tui-skeleton>
  18. <view class="container-product tui-skeleton">
  19. <view class="container-product-main">
  20. <view class="product-top">
  21. <view class="banner-section">
  22. <uni-swiper-dot :info="productImage" :current="current" field="content" :mode="mode" >
  23. <swiper class="banner tui-banner tui-skeleton-rect" @change="swiperChange" :duration='800' :autoplay="false" :circular="true" >
  24. <swiper-item v-for="(item, index) in product.imageList" :key="index" class="banner-item">
  25. <image :src="item" @click="previewImg(index)" class="product-img" />
  26. </swiper-item>
  27. </swiper>
  28. <view class="swiper__dots-box">
  29. <tui-tag padding="12rpx 24rpx" type="translucent" shape="circleLeft" size="32rpx" :scaleMultiple="0.82" originRight>{{ current + 1 }}/{{ product.imageList.length }}</tui-tag>
  30. </view>
  31. </uni-swiper-dot>
  32. </view>
  33. <view class="product-wrap clearfix">
  34. <view class="wrap-top" >
  35. <view class="wrap-top-price">
  36. <second-price :product="product"></second-price>
  37. </view>
  38. <view class="p-title tui-skeleton-fillet">
  39. <view class="p-title-name">
  40. {{product.name == undefined ? '' : product.name}}
  41. </view>
  42. <button open-type="share" class="p-title-share tui-share-position" @tap="onShare">
  43. <view class=""><text class="iconfont icon-fenxiang1"></text></view>
  44. <view class="">分享</view>
  45. </button>
  46. </view>
  47. <view class="productRemarks" v-if="product.productRemarks!=''&&product.productRemarks!=null">
  48. <text class="text">{{product.productRemarks}}</text>
  49. </view>
  50. <view class="wrap-label" v-if="product.tagsList.length>0">
  51. <view class="label-a tui-skeleton-fillet" v-for="(label,index) in product.tagsList" :key="index">{{label}}</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="product-seve">
  56. <text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">无忧退货</text></text>
  57. <text class="iconfont icon-wuyoutuihuoi tui-skeleton-rect"><text class="text">快速退款</text></text>
  58. <text class="iconfont icon-wuyoutuihuo tui-skeleton-rect"><text class="text">正品保证</text></text>
  59. </view>
  60. </view>
  61. <view class="product-parameter" @click="showPopup">
  62. <text class="title">参数:</text>
  63. <text class="name">品牌 起订量 分类...</text>
  64. <text class="iconfont icon-xiayibu"></text>
  65. </view>
  66. </view>
  67. <view class="product-details productDetails0">
  68. <!-- 商品详情 -->
  69. <view class="title">
  70. <view class="title-tab">商品详情</view>
  71. </view>
  72. <view class="Disclaimer">
  73. <span >免责声明</span>
  74. <text class="text">
  75. 鉴于本网站提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本网站对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!
  76. </text>
  77. </view>
  78. <view class="content tui-banner product-rich-text tui-skeleton-rect">
  79. <view class="contentHtml">
  80. <view class="detailsText" v-if="product.productDetails!=''||product.productDetails!=null" >{{product.productDetails}}</view>
  81. <view class="imgList" v-for="(item, index) in product.imageList" :key="index" :data-src="item">
  82. <img :src="item"/>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="product-details secondBrand productDetails1" v-if="product.brandInfo!=''&&product.brandInfo!=null">
  88. <!-- 品牌信息 -->
  89. <view class="title">
  90. <view class="title-tab">品牌信息</view>
  91. </view>
  92. <text class="brandinfo">
  93. {{product.brandInfo}}
  94. </text>
  95. </view>
  96. <view class="product-details recommend productDetails2">
  97. <!-- 相关推荐 -->
  98. <view class="title">
  99. <view class="title-tab">相关推荐</view>
  100. </view>
  101. <view class="content hot">
  102. <recommend :query-productid="product.productID" v-if="isRequest" ></recommend>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- 商品参数 -->
  107. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  108. <view class="tui-popup-box clearfix">
  109. <view class="title">商品参数</view>
  110. <cm-parameter :product="product" :goodsData="goodsData" ></cm-parameter>
  111. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
  112. <view class="tui-flex-1">
  113. <view class="tui-button" @click="hidePopup()">收起</view>
  114. </view>
  115. </view>
  116. </view>
  117. </tui-bottom-popup>
  118. <!-- 侧边 -->
  119. <scroll-top :isScrollTop="isScrollTop"></scroll-top>
  120. </view>
  121. </view>
  122. </template>
  123. <script>
  124. import { mapState,mapMutations } from 'vuex'
  125. import customP from '@/components/cm-module/headerNavbar/header-poduct' //自定义导航
  126. import secondPrice from "@/components/cm-module/productDetails/secondPrice.vue" //价格显示
  127. import authorize from '@/common/config/authorize.js'
  128. import uniStars from '@/components/uni-stars/uni-stars.vue'
  129. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  130. import recommend from "@/components/cm-module/productDetails/secondRecommend" //相关推荐
  131. import cmParameter from "@/components/cm-module/productDetails/secondParameters.vue" //相关参数
  132. import wxLogin from "@/common/config/wxLogin.js"
  133. import { debounce } from '@/common/config/common.js'
  134. var isPreviewImg;
  135. export default{
  136. components:{
  137. uniStars,
  138. customP,
  139. tuiSkeleton,
  140. recommend,
  141. secondPrice,
  142. cmParameter,
  143. },
  144. data(){
  145. return{
  146. disabledTabNavList:[{name:'相关推荐'}],
  147. mode:'round',
  148. iconClass:'icon-aixin',
  149. iconColor:'#ff9100',
  150. specClass: '',//规格弹窗css类,控制开关动画
  151. isRequest:false,
  152. isScrollTop:false,
  153. current:0,
  154. isShareType:'',
  155. isHeaderPoduct:false,
  156. navbarFiexd:'none',
  157. isRecommend:false,
  158. isRarameter:true,
  159. isService:false,
  160. skeletonShow:true,
  161. disabled:false,
  162. isNoneDisabled:false,
  163. tabCurrentIndex:0,
  164. userID:'',
  165. productID:0,
  166. userIdentity:'',//用户类型
  167. goodsData:{},//自定义数据
  168. shop:{},//供应商信息
  169. product:{},//采美
  170. productImage:[],
  171. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  172. systeminfo: this.setSysteminfo(), //获取设备信息
  173. isIphoneX:this.$store.state.isIphoneX,
  174. windowHeight: '',
  175. headerColor:false,
  176. backPage:1,
  177. nvabarData: { //顶部自定义导航
  178. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示
  179. title: '' // 导航栏 中间的标题
  180. },
  181. linkPath:'',
  182. popupShow:false,//参数弹窗
  183. CustomBar:this.CustomBar,// 顶部导航栏高度
  184. tabSelectFlag:false,
  185. sectionPropsArr: [],
  186. scrollTopArray:[],
  187. sectionTopRangeArr: [],
  188. winHeight:''
  189. }
  190. },
  191. onLoad(option) {
  192. this.productID = option.id;//获取商品ID
  193. this.isShareType = option.type
  194. this.linkPath = option.path
  195. this.isHeaderPoduct = true
  196. if(option.page == 2){
  197. this.backPage = option.page
  198. }
  199. if(this.isShareType =='share'){
  200. authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
  201. console.log(wxResponse)
  202. if(wxResponse == 1){
  203. wxLogin.wxLoginAuthorize()
  204. }else{
  205. console.log(new Date +'用户未授权微信信息')
  206. }
  207. })
  208. }
  209. this.SecondService.ProductCount({productId:this.productID}).then(res =>{
  210. console.log(res)
  211. }).catch(error =>{
  212. this.$util.msg(error.msg,2000);
  213. });
  214. },
  215. computed: {
  216. ...mapState(['hasLogin','isWxAuthorize'])
  217. },
  218. methods:{
  219. initData(){// 初始化商品详情查询
  220. this.SellerService.ProductDetail({productId:this.productID}).then(response =>{
  221. this.skeletonShow = false
  222. this.productImage=[];
  223. this.shop = response.data.shop
  224. this.product = response.data
  225. //处理商品图片列表
  226. this.product.imageList.forEach(item =>{
  227. this.productImage.push(item);
  228. })
  229. setTimeout(()=>{
  230. this.getSectionProps();
  231. },2000)
  232. this.isRequest = true
  233. }).catch(error =>{
  234. this.$util.msg(error.msg,2000);
  235. })
  236. },
  237. swiperChange(e) {//顶部商品图片切换
  238. const index = e.detail.current;
  239. this.current = index;
  240. },
  241. previewImg (index) {//顶部商品图片预览
  242. isPreviewImg = true
  243. let previewUrls = this.productImage
  244. uni.previewImage({
  245. current: index, //图片索引
  246. urls: previewUrls, //必须是http图片,本地图片无效
  247. longPressActions:''
  248. })
  249. },
  250. tabClick(index) {//商品详情&&供应商信息tab切换
  251. this.tabSelectFlag = true
  252. this.tabCurrentIndex = index;
  253. let classIndex = '.productDetails'+index;
  254. uni.createSelectorQuery().select('.container-product-main').boundingClientRect((data)=>{//最外层盒子节点
  255.   uni.createSelectorQuery().select(classIndex).boundingClientRect((res)=>{//最外层盒子节点
  256.     uni.pageScrollTo({
  257.       duration:300,//过渡时间必须为0,uniapp bug,否则运行到手机会报错
  258.       scrollTop:res.top - data.top - 150,//滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离
  259.     })
  260. setTimeout(()=>{
  261. this.tabSelectFlag = false;
  262. },500)
  263.   }).exec()
  264. }).exec()
  265. },
  266. handleContact(e){//跳转小程序客服
  267. },
  268. navToLogin(){
  269. authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
  270. if(wxResponse == 1){
  271. this.$store.commit('setLoginType',8)
  272. this.$store.commit('setLoginProductId',this.productID)
  273. this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
  274. }else{
  275. this.$api.navigateTo('/pages/authorization/authorization?type=1')
  276. }
  277. })
  278. },
  279. setHeaderBtnPosi(){
  280. // 获得胶囊按钮位置信息
  281. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  282. return headerBtnPosi
  283. },
  284. setSysteminfo(){
  285. let systeminfo;
  286. uni.getSystemInfo({ // 获取设备信息
  287. success: (res) => {
  288. systeminfo = res
  289. },
  290. })
  291. return systeminfo
  292. },
  293. getOptionFn(e){
  294. this.isShareType = e.type
  295. },
  296. discard(){
  297. //丢弃
  298. },
  299. onShare(res){//分享转发
  300. if (res.from === 'button') {
  301. // 来自页面内转发按钮
  302. }
  303. return {
  304. title: `${this.product.name}`,
  305. path: `second/pages/product/product-details?type=share&id=${this.productID}`,
  306. imageUrl:`${this.product.imageList[0]}`
  307. }
  308. },
  309. showPopup(){
  310. this.popupShow = true
  311. },
  312. hidePopup(){
  313. this.popupShow = false
  314. },
  315. getSectionProps() {//获取每个tab对应区域的scrollTop值
  316. let className = '.product-details',
  317. sectionPropsArr = [];
  318. uni.createSelectorQuery().select('.container-product-main').boundingClientRect((data)=>{//最外层盒子节点
  319.   uni.createSelectorQuery().selectAll(className).boundingClientRect((res)=>{//最外层盒子节点
  320. res.forEach((item, index) => {
  321. sectionPropsArr.push({
  322. className: `${className}${index}`,
  323. scrollTop: item.top - data.top - 150
  324. })
  325. })
  326. this.sectionPropsArr = sectionPropsArr;
  327. this.sectionTopRangeArr = this.getSectionRange(sectionPropsArr);
  328.   }).exec()
  329. }).exec()
  330. },
  331. getSectionRange(arr) {// 获取每个tab对应区域的区间
  332. let sectionScrollTopList = [];
  333. for(let i = 0; i < arr.length; i++) {
  334. let thisScrollTop = arr[i].scrollTop;
  335. if(i < arr.length - 1) {
  336. let nextScrollTop = arr[i+1].scrollTop;
  337. if(i == 0) {
  338. sectionScrollTopList.push(`0-${thisScrollTop}`);
  339. } else if(i == arr.length - 1){
  340. sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop - this.winHeight}`);
  341. } else {
  342. sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop}`);
  343. }
  344. } else {
  345. sectionScrollTopList.push(`${thisScrollTop}-${thisScrollTop+500}`);
  346. }
  347. }
  348. return sectionScrollTopList;
  349. },
  350. activeTab: debounce((top, _this)=> {//当滑动时也能同步激活tab
  351. const { sectionTopRangeArr } = _this;
  352. if(sectionTopRangeArr.length > 0) {
  353. sectionTopRangeArr.forEach((item, index) => {
  354. let splitItem = item.split('-'),
  355. openInterval = Number(splitItem[0]),
  356. closedInterval = Number(splitItem[1]);
  357. if(top >= openInterval && top < closedInterval) {
  358. _this.tabCurrentIndex = index;
  359. }
  360. })
  361. }
  362. },100, true),
  363. getWinHeight() {
  364. this.winHeight = wx.getSystemInfoSync().windowHeight;
  365. },
  366. },
  367. onPageScroll(e){//实时获取到滚动的值
  368. const { scrollTop } = e;
  369. if(!this.tabSelectFlag) {
  370. this.activeTab(scrollTop, this);
  371. }
  372. if(e.scrollTop>100){
  373. this.headerColor = true
  374. this.navbarFiexd = 'fixed'
  375. this.nvabarData={
  376. showCapsule: 1,
  377. title: '商品详情',
  378. }
  379. }else{
  380. this.headerColor = false
  381. this.navbarFiexd = 'none'
  382. this.nvabarData={
  383. showCapsule: 1,
  384. title: '',
  385. }
  386. }
  387. if(e.scrollTop>700){
  388. this.isScrollTop = true
  389. }else{
  390. this.isScrollTop = false
  391. }
  392. },
  393. onShareAppMessage(res){//分享转发
  394. if (res.from === 'button') {
  395. // 来自页面内转发按钮
  396. }
  397. return {
  398. title: `${this.product.name}`,
  399. path: `second/pages/product/product-details?type=share&id=${this.productID}`,
  400. imageUrl:`${this.product.imageList[0]}`
  401. }
  402. },
  403. onShow() {
  404. this.$api.getStorage().then((resolve) => {
  405. this.userID = resolve.userID ? resolve.userID : '';
  406. this.userIdentity = resolve.userIdentity ? resolve.userIdentity : 3
  407. if (isPreviewImg) {
  408. isPreviewImg = false;
  409. return;
  410. } else {
  411. this.initData();
  412. }
  413. }).catch(error =>{
  414. this.initData();
  415. })
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. page{
  421. background-color: #FFFFFF;
  422. }
  423. .navbar {
  424. width: 100%;
  425. height: 80rpx;
  426. box-sizing: border-box;
  427. padding: 0 24rpx;
  428. background: #fff;
  429. z-index: 10;
  430. display: flex;
  431. position: fixed;
  432. opacity: 0;
  433. left: 0;
  434. &.fixed{
  435. opacity: 1;
  436. }
  437. .nav-item {
  438. display: flex;
  439. flex: 1;
  440. justify-content: center;
  441. align-items: center;
  442. height: 80rpx;
  443. font-size: $font-size-28;
  444. color: $text-color;
  445. position: relative;
  446. float: left;
  447. position: relative;
  448. .line{
  449. width: 60rpx;
  450. height: 2px;
  451. border-radius: 1px;
  452. position: absolute;
  453. bottom: 0;
  454. left: 50%;
  455. margin-left: -30rpx;
  456. }
  457. &.current{
  458. color:$color-system;
  459. .line{
  460. background: $color-system;
  461. }
  462. }
  463. }
  464. }
  465. .productRemarks{
  466. height: 36rpx;
  467. margin: 8rpx 0;
  468. width: 100%;
  469. float: left;
  470. .text{
  471. display: inline-block;
  472. padding: 0 18rpx;
  473. line-height: 32rpx;
  474. font-size: 20rpx;
  475. color: #FF2A2A;
  476. text-align: center;
  477. border-radius: 4rpx;
  478. background: #FFFFFF;
  479. border: 1px solid #FF2A2A;
  480. float: left;
  481. opacity: 0.8;
  482. }
  483. }
  484. .banner-section{
  485. width: 100%;
  486. height: 750rpx;
  487. position: relative;
  488. }
  489. .banner{
  490. width: 100%;
  491. height: 750rpx;
  492. .product-img{
  493. width: 750rpx;
  494. }
  495. image {
  496. width: 100%;
  497. height: 100%;
  498. }
  499. }
  500. .swiper__dots-box{
  501. position: absolute;
  502. color: #fff;
  503. bottom: 30rpx;
  504. right: 0;
  505. }
  506. .product-wrap{
  507. width: 100%;
  508. height: auto;
  509. padding: 24rpx 0 0 0;
  510. background-color: #FFFFFF;
  511. .wrap-top{
  512. width: 702rpx;
  513. padding: 0 24rpx;
  514. height: auto;
  515. float: left;
  516. padding-bottom:20rpx;
  517. &.none{
  518. .p-title{
  519. color:#999999
  520. }
  521. }
  522. .p-title{
  523. width: 100%;
  524. height: auto;
  525. float: left;
  526. .p-title-name{
  527. width:602rpx;
  528. // height: 96rpx;
  529. float: left;
  530. line-height: 46rpx;
  531. font-size: $font-size-34;
  532. color: $text-color;
  533. // -o-text-overflow: ellipsis;
  534. // text-overflow: ellipsis;
  535. // display: -webkit-box;
  536. // word-break: break-all;
  537. // -webkit-box-orient: vertical;
  538. // -webkit-line-clamp: 2;
  539. // overflow: hidden;
  540. }
  541. .p-title-share{
  542. width: 96rpx;
  543. height: 96rpx;
  544. float: right;
  545. text-align: center;
  546. color: #999999;
  547. font-size: $font-size-24;
  548. box-sizing: border-box;
  549. padding: 8rpx 0;
  550. .icon-fenxiang1{
  551. font-size: $font-size-34;
  552. }
  553. }
  554. }
  555. .wrap-main-text{
  556. line-height: 56rpx;
  557. color: #FF2A2A;
  558. font-size: $font-size-26;
  559. display: block;
  560. float: left;
  561. font-weight: normal;
  562. }
  563. .wrap-main-none{
  564. display: block;
  565. width: 256rpx;
  566. height: 44rpx;
  567. padding-left: 20rpx;
  568. border-radius: 11rpx;
  569. background: $btn-confirm;
  570. float: right;
  571. line-height: 44rpx;
  572. color: #FFFFFF;
  573. text-align: center;
  574. font-size: $font-size-24;
  575. }
  576. .p-price-none{
  577. height: 44rpx;
  578. line-height: 44rpx;
  579. float: left;
  580. font-size: $font-size-24;
  581. color: #666;
  582. text-decoration: line-through;
  583. margin-left: 8rpx;
  584. }
  585. .p-minBuy{
  586. height: 44rpx;
  587. line-height: 44rpx;
  588. float: right;
  589. padding: 0 18rpx;
  590. border-radius: 22rpx;
  591. background-color: #f7f7f7;
  592. color: #7F7F7F;
  593. font-size: 24rpx;
  594. text-align: center;
  595. .min-text{
  596. margin: 0 6rpx;
  597. }
  598. }
  599. .p-login{
  600. height: 56rpx;
  601. line-height: 56rpx;
  602. color: $color-system;
  603. font-size: $font-size-24;
  604. &.grade{
  605. .price-left{
  606. float: left;
  607. .none{
  608. display: block;
  609. font-size: $font-size-20;
  610. line-height: 48rpx;
  611. color: #4A4B54;
  612. float: left;
  613. font-weight: bold;
  614. margin-left: 5rpx;
  615. text{
  616. letter-spacing: 4rpx;
  617. font-size: $font-size-32;
  618. }
  619. }
  620. }
  621. }
  622. .p-no{
  623. float: left;
  624. margin-right: 5rpx;
  625. font-size: $font-size-28;
  626. color: $text-color;
  627. }
  628. .p-login-btn{
  629. display: block;
  630. height: 44rpx;
  631. padding: 0 10rpx 0 20rpx;
  632. border-radius: 11rpx;
  633. background: $btn-confirm;
  634. float: right;
  635. line-height: 44rpx;
  636. color: #FFFFFF;
  637. text-align: center;
  638. font-size: $font-size-24;
  639. }
  640. }
  641. }
  642. .wrap-label{
  643. float: left;
  644. width: 100%;
  645. box-sizing: border-box;
  646. .label-a{
  647. padding: 0 18rpx;
  648. line-height: 32rpx;
  649. font-size: $font-size-20;
  650. color:$color-system;
  651. text-align: center;
  652. border-radius: 6rpx;
  653. background:#ffe6dc;
  654. margin: 0 20rpx 15rpx 0;
  655. display: inline-block;
  656. }
  657. }
  658. .wrap-top-price{
  659. float: left;
  660. width: 100%;
  661. box-sizing: border-box;
  662. .wrap-main-item{
  663. width: 100%;
  664. height: 56rpx;
  665. .p-price{
  666. height: 56rpx;
  667. line-height: 56rpx;
  668. float: left;
  669. color: #FF2A2A;
  670. font-weight: bold;
  671. &.none{
  672. text-decoration: line-through;
  673. color: #999999;
  674. font-weight: normal;
  675. }
  676. .txt{
  677. margin:0 2rpx;
  678. }
  679. .txt.sm{
  680. font-size: $font-size-26;
  681. }
  682. .txt.big{
  683. font-size: $font-size-34;
  684. }
  685. }
  686. }
  687. .floor-item-act{
  688. height: 56rpx;
  689. text-align: center;
  690. box-sizing: border-box;
  691. float: left;
  692. padding:10rpx 0;
  693. margin-left: 10rpx;
  694. .floor-tags{
  695. float: right;
  696. height: 36rpx;
  697. border-radius: 4rpx;
  698. background-color: rgba(225, 86, 22, 0.1);
  699. line-height: 36rpx;
  700. color: $color-system;
  701. text-align: center;
  702. display: inline-block;
  703. padding:0 16rpx;
  704. font-size: $font-size-20;
  705. }
  706. }
  707. .floor-item-btn{
  708. float: left;
  709. height: 40rpx;
  710. margin-top: 8rpx;
  711. .btn{
  712. line-height: 40rpx;
  713. padding: 0 20rpx;
  714. height: 40rpx;
  715. background: $btn-confirm;
  716. color: #FFFFFF;
  717. font-size: $font-size-20;
  718. border-radius: 4rpx;
  719. }
  720. }
  721. }
  722. .wrap-info{
  723. float: left;
  724. width: 702rpx;
  725. padding: 24rpx 24rpx 0 24rpx;
  726. border-bottom: 1px solid #F8F8F8;
  727. .info-viewT{
  728. width: 100%;
  729. min-height: 40rpx;
  730. font-size: $font-size-28;
  731. color: $text-color;
  732. line-height: 40rpx;
  733. text-align: left;
  734. &.none{
  735. color: #999999;
  736. }
  737. .info-viewL{
  738. min-width: 350rpx;
  739. float: left;
  740. margin-bottom: 24rpx;
  741. }
  742. .info-viewR{
  743. min-width: 352rpx;
  744. float: left;
  745. margin-bottom: 24rpx;
  746. }
  747. }
  748. .info-viewB{
  749. width: 100%;
  750. height: auto;
  751. }
  752. .info-f{
  753. width: 50%;
  754. float: left;
  755. font-size: $font-size-28;
  756. color: $text-color;
  757. line-height: 40rpx;
  758. margin-bottom: 24rpx;
  759. text-align: left;
  760. }
  761. }
  762. }
  763. .product-seve{
  764. width: 702rpx;
  765. height: 90rpx;
  766. padding: 0 24rpx;
  767. background-color: #FFFFFF;
  768. position: relative;
  769. display: flex;
  770. line-height: 90rpx;
  771. border-bottom: 20rpx solid #F7F7F7;
  772. .title{
  773. line-height: 90rpx;
  774. display: inline-block;
  775. float: left;
  776. font-size: $font-size-28;
  777. color: $text-color;
  778. }
  779. .iconfont{
  780. color: #fea785;
  781. margin-right: 40rpx;
  782. font-size: $font-size-26;
  783. }
  784. .text{
  785. font-size: $font-size-26;
  786. color: #fea785;
  787. margin-left: 10rpx;
  788. }
  789. }
  790. .product-parameter{
  791. width: 702rpx;
  792. height: 90rpx;
  793. padding: 0 24rpx;
  794. background-color: #FFFFFF;
  795. position: relative;
  796. display: flex;
  797. border-bottom: 20rpx solid #F7F7F7;
  798. .title{
  799. line-height: 90rpx;
  800. display: inline-block;
  801. float: left;
  802. font-size: $font-size-28;
  803. color: #666666;
  804. }
  805. .name{
  806. float: right;
  807. line-height: 90rpx;
  808. display: inline-block;
  809. float: left;
  810. font-size: $font-size-28;
  811. color: $text-color;
  812. float: right;
  813. padding-right: 48rpx;
  814. overflow: hidden;
  815. text-overflow:ellipsis;
  816. white-space: nowrap;
  817. text-align: right;
  818. }
  819. .icon-xiayibu{
  820. line-height: 90rpx;
  821. display: inline-block;
  822. position: absolute;
  823. width: 48rpx;
  824. top: 0;
  825. right: 0;
  826. color: #b2b2b2;
  827. }
  828. }
  829. .product-supplier{
  830. width: 100%;
  831. height: 174rpx;
  832. padding: 30rpx 24rpx;
  833. box-sizing: border-box;
  834. background-color: #FFFFFF;
  835. position: relative;
  836. box-sizing: border-box;
  837. border-bottom: 20rpx solid #F7F7F7;
  838. .logo{
  839. width: 128rpx;
  840. height: 92rpx;
  841. float: left;
  842. border: 1px solid #efefef;
  843. border-radius: 6rpx;
  844. image{
  845. width: 100%;
  846. height: 100%;
  847. display: block;
  848. border-radius: 6rpx;
  849. }
  850. }
  851. .main{
  852. width: 470rpx;
  853. height: 92rpx;
  854. float: left;
  855. margin-left: 20rpx;
  856. .name{
  857. width: 100%;
  858. line-height: 46rpx;
  859. float: left;
  860. font-size: $font-size-28;
  861. color: $text-color;
  862. float: right;
  863. overflow: hidden;
  864. text-overflow:ellipsis;
  865. white-space: nowrap;
  866. text-align: left;
  867. }
  868. .massgs{
  869. width: 100%;
  870. line-height: 46rpx;
  871. float: left;
  872. font-size: $font-size-24;
  873. color: #999999;
  874. .label{
  875. float: left;
  876. }
  877. .p-stars{
  878. float: left;
  879. margin-left: 20rpx;
  880. }
  881. .acount{
  882. float: right;
  883. text{
  884. color: $color-system;
  885. }
  886. }
  887. }
  888. }
  889. .icon-xiayibu{
  890. line-height: 154rpx;
  891. display: inline-block;
  892. position: absolute;
  893. width: 48rpx;
  894. top: 0;
  895. right: 0;
  896. color: #b2b2b2;
  897. }
  898. }
  899. .product-details {
  900. background: #FFFFFF;
  901. border-bottom: 20rpx solid #F7F7F7;
  902. padding: 24rpx;
  903. &.service{
  904. border-bottom: none;
  905. }
  906. &.recommend{
  907. background-color: #F7F7F7;
  908. border-bottom: none;
  909. padding: 0;
  910. .title{
  911. .title-tab{
  912. background-color: #F7F7F7;
  913. color: $text-color;
  914. padding: 0 24rpx;
  915. }
  916. }
  917. }
  918. .title{
  919. width: 100%;
  920. box-sizing: border-box;
  921. // padding: 0 24rpx;
  922. .title-tab{
  923. width: 100%;
  924. height: 100rpx;
  925. background: #fff;
  926. z-index: 10;
  927. font-size: $font-size-30;
  928. text-align: left;
  929. color: $text-color;
  930. line-height: 100rpx;
  931. font-weight: 600;
  932. }
  933. .title-msg{
  934. width: 100%;
  935. height: 236rpx;
  936. padding: 18rpx;
  937. background-color: rgba(225,86,22, 0.1);
  938. color: $color-system;
  939. box-sizing: border-box;
  940. margin-bottom: 30rpx;
  941. .tit{
  942. line-height: 46rpx;
  943. font-size: $font-size-24;
  944. text-align: left;
  945. }
  946. .txt{
  947. line-height: 38rpx;
  948. font-size: $font-size-20;
  949. text-align: justify;
  950. }
  951. }
  952. }
  953. .content{
  954. width: 100%;
  955. min-height: 750rpx;
  956. // background-color: #FFFFFF;
  957. }
  958. }
  959. .isLower{
  960. width: 100%;
  961. height: 116rpx;
  962. line-height: 116rpx;
  963. text-align: center;
  964. color: #000000;
  965. font-size: $font-size-32;
  966. font-weight: bold;
  967. }
  968. .bottom-btn{
  969. width: 100%;
  970. height: 110rpx;
  971. position: fixed;
  972. bottom: 0;
  973. left: 0;
  974. background: #FFFFFF;
  975. z-index: 99;
  976. .bottom-le{
  977. width: 302rpx;
  978. height: 86rpx;
  979. padding:12rpx 24rpx;
  980. float: left;
  981. .item-bt{
  982. width: 86rpx;
  983. height: 100%;
  984. margin-right:22rpx;
  985. display: flex;
  986. float: left;
  987. flex-direction: column;
  988. align-items: center;
  989. font-size: $font-size-24;
  990. color: $text-color;
  991. line-height: 34rpx;
  992. position: relative;
  993. .animation-num{
  994. font-size:$font-size-32 ;
  995. color: #FF2A2A;
  996. position: absolute;
  997. top: -12rpx;
  998. right: 4rpx;
  999. font-weight: bold;
  1000. }
  1001. .animation{
  1002. animation: showAmnation 2.2s ease-in-out both;
  1003. }
  1004. .restion{
  1005. animation: hideAmnation 1s ease-in-out both;
  1006. }
  1007. .icon-num{
  1008. position: absolute;
  1009. right:-12rpx;
  1010. top: -9rpx;
  1011. }
  1012. .icon-num.goleft{
  1013. right: 4rpx;
  1014. }
  1015. &:last-child{
  1016. margin-right: 0;
  1017. }
  1018. image {
  1019. width: 40rpx;
  1020. height: 40rpx;
  1021. margin-bottom: 8rpx;
  1022. }
  1023. button.contact-btn{
  1024. width: 100%;
  1025. height: 100%;
  1026. margin: 0;
  1027. padding: 0;
  1028. display: flex;
  1029. flex-direction: column;
  1030. align-items: center;
  1031. box-sizing: border-box;
  1032. font-size: $font-size-24;
  1033. text-align: center;
  1034. text-decoration: none;
  1035. line-height: 34rpx;
  1036. border-radius: 0;
  1037. -webkit-tap-highlight-color: transparent;
  1038. overflow: hidden;
  1039. color: $text-color;
  1040. background-color:#FFFFFF;
  1041. }
  1042. }
  1043. }
  1044. .bottom-ri{
  1045. width: 400rpx;
  1046. height: 100%;
  1047. float: right;
  1048. display: flex;
  1049. box-sizing: border-box;
  1050. padding: 13rpx 20rpx 13rpx 0;
  1051. .btn{
  1052. flex: 1;
  1053. width: 200rpx;
  1054. line-height: 84rpx;
  1055. text-align: center;
  1056. font-size: $font-size-28;
  1057. color: #FFFFFF;
  1058. }
  1059. .btn-cart{
  1060. background-color: #ffe6dc;
  1061. color: $color-system;
  1062. border-radius: 42rpx 0 0 42rpx;
  1063. }
  1064. .btn-cart.disabled{
  1065. background-color: #E1E1E1;
  1066. }
  1067. .btn-bay{
  1068. background:linear-gradient(to right, #f28f31 0%, #e15616 100%);
  1069. border-radius: 0 42rpx 42rpx 0;
  1070. }
  1071. .btn-bay.disabled{
  1072. background-color: linear-gradient(135deg,rgba(242,143,49,0.5) 0%,rgba(225,86,22,0.5) 100%);;
  1073. }
  1074. }
  1075. }
  1076. .uni-badge--small {
  1077. -webkit-transform: scale(.8);
  1078. -ms-transform: scale(.8);
  1079. transform: scale(.8);
  1080. -webkit-transform-origin: center center;
  1081. -ms-transform-origin: center center;
  1082. transform-origin: center center;
  1083. }
  1084. .uni-badge {
  1085. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  1086. -webkit-box-sizing: border-box;
  1087. box-sizing: border-box;
  1088. font-size: 12px;
  1089. line-height: 1;
  1090. display: inline-block;
  1091. padding: 3px 6px;
  1092. color: #333;
  1093. border-radius: 100px;
  1094. background-color: #f1f1f1;
  1095. }
  1096. .uni-badge-error {
  1097. color: #fff;
  1098. background-color: #dd524d;
  1099. }
  1100. /* 加入购物模态层*/
  1101. @keyframes showPopup {
  1102. 0% {
  1103. opacity: 0;
  1104. }
  1105. 100% {
  1106. opacity: 1;
  1107. }
  1108. }
  1109. @keyframes hidePopup {
  1110. 0% {
  1111. opacity: 1;
  1112. }
  1113. 100% {
  1114. opacity: 0;
  1115. }
  1116. }
  1117. @keyframes showLayer {
  1118. 0% {
  1119. transform: translateY(0);
  1120. }
  1121. 100% {
  1122. transform: translateY(-100%);
  1123. }
  1124. }
  1125. @keyframes hideLayer {
  1126. 0% {
  1127. transform: translateY(-100%);
  1128. }
  1129. 100% {
  1130. transform: translateY(0);
  1131. }
  1132. }
  1133. @keyframes showAmnation {
  1134. 0% {
  1135. top: -12rpx;
  1136. opacity: 0;
  1137. }
  1138. 50% {
  1139. top: -60rpx;
  1140. opacity: 1;
  1141. }
  1142. 100% {
  1143. top: -100rpx;
  1144. opacity: 0;
  1145. }
  1146. }
  1147. @keyframes hideAmnation {
  1148. 0% {
  1149. top: -100rpx;
  1150. opacity: 0;
  1151. }
  1152. 100% {
  1153. top: -12rpx;
  1154. opacity: 0;
  1155. }
  1156. }
  1157. .popup {
  1158. position: fixed;
  1159. top: 0;
  1160. width: 100%;
  1161. height: 100%;
  1162. z-index: 999;
  1163. display: none;
  1164. .mask{
  1165. position: fixed;
  1166. top: 0;
  1167. width: 100%;
  1168. height: 100%;
  1169. z-index: 21;
  1170. background-color: rgba(0, 0, 0, 0.6);
  1171. }
  1172. .layer {
  1173. position: fixed;
  1174. z-index: 22;
  1175. bottom: -294rpx;
  1176. width: 702rpx;
  1177. padding: 24rpx 24rpx 36rpx 24rpx;
  1178. height: 260rpx;
  1179. border-radius: 20rpx 20rpx 0 0;
  1180. background-color: #fff;
  1181. display: flex;
  1182. flex-wrap: wrap;
  1183. align-content: space-between;
  1184. .content {
  1185. width: 100%;
  1186. }
  1187. .btn {
  1188. width: 100%;
  1189. height: 88rpx;
  1190. margin-top: 20rpx;
  1191. .button {
  1192. width: 100%;
  1193. height: 88rpx;
  1194. color: #fff;
  1195. display: flex;
  1196. align-items: center;
  1197. justify-content: center;
  1198. background: $btn-confirm;
  1199. font-size: $font-size-28;
  1200. border-radius: 14rpx;
  1201. }
  1202. }
  1203. }
  1204. &.show {
  1205. display: block;
  1206. .mask{
  1207. animation: showPopup 0.2s linear both;
  1208. }
  1209. .layer {
  1210. animation: showLayer 0.2s linear both;
  1211. }
  1212. }
  1213. &.hide {
  1214. display: block;
  1215. .mask{
  1216. animation: hidePopup 0.2s linear both;
  1217. }
  1218. .layer {
  1219. animation: hideLayer 0.2s linear both;
  1220. }
  1221. }
  1222. &.none {
  1223. display: none;
  1224. }
  1225. &.service {
  1226. .row {
  1227. margin: 30upx 0;
  1228. .title {
  1229. font-size: 30upx;
  1230. margin: 10upx 0;
  1231. }
  1232. .description {
  1233. font-size: 28upx;
  1234. color: #999;
  1235. }
  1236. }
  1237. }
  1238. .layer-smimg{
  1239. width: 114rpx;
  1240. height: 114rpx;
  1241. float: left;
  1242. border-radius: 10rpx;
  1243. margin-right: 24rpx;
  1244. image{
  1245. width: 114rpx;
  1246. height: 114rpx;
  1247. border-radius: 10rpx;
  1248. }
  1249. }
  1250. .layer-nunbox{
  1251. justify-content: space-between;
  1252. align-items: center;
  1253. width: 536rpx;
  1254. height: auto;
  1255. float: left;
  1256. .layer-nunbox-t{
  1257. width: 100%;
  1258. height:44rpx;
  1259. position:relative;
  1260. display: flex;
  1261. margin-bottom: 10rpx;
  1262. .text{
  1263. font-size: $font-size-24;
  1264. line-height: 48rpx;
  1265. color: #999999;
  1266. }
  1267. .layer-nunbox-text{
  1268. line-height: 44rpx;
  1269. font-size: $font-size-28;
  1270. }
  1271. .number-box{
  1272. display: flex;
  1273. justify-content: center;
  1274. align-items: center;
  1275. .iconfont{
  1276. font-size: $font-size-32;
  1277. padding:0 20rpx;
  1278. font-size: $text-color;
  1279. }
  1280. .btn-input{
  1281. width: 62rpx;
  1282. height: 48rpx;
  1283. line-height: 48rpx;
  1284. background: #F8F8F8;
  1285. border-radius: 4rpx;
  1286. text-align: center;
  1287. font-size: $font-size-28;
  1288. }
  1289. }
  1290. .product-step{
  1291. position: absolute;
  1292. left: 45rpx;
  1293. bottom: 0;
  1294. height: 44rpx;
  1295. background: #FFFFFF;
  1296. }
  1297. }
  1298. .layer-nunbox-b{
  1299. width: 100%;
  1300. height:44rpx;
  1301. margin-top: 13rpx;
  1302. }
  1303. .text{
  1304. line-height: 44rpx;
  1305. font-size: $font-size-28;
  1306. .p{
  1307. color: #FF2A2A;
  1308. }
  1309. .p:first-child{
  1310. margin-left: 30rpx;
  1311. }
  1312. .p.sm{
  1313. font-size: $font-size-24;
  1314. }
  1315. }
  1316. }
  1317. }
  1318. .tui-popup-box {
  1319. position: relative;
  1320. box-sizing: border-box;
  1321. min-height: 220rpx;
  1322. padding:0rpx 24rpx 0 24rpx;
  1323. .title{
  1324. font-size: $font-size-34;
  1325. color: $text-color;
  1326. line-height: 88rpx;
  1327. text-align: center;
  1328. float: left;
  1329. width: 100%;
  1330. height: 88rpx;
  1331. }
  1332. .content{
  1333. width: 100%;
  1334. height: auto;
  1335. float: left;
  1336. .content-tr{
  1337. width: 100%;
  1338. height: 58rpx;
  1339. line-height: 58rpx;
  1340. display: flex;
  1341. .content-td{
  1342. display: flex;
  1343. flex: 3;
  1344. font-size: $font-size-26;
  1345. color: #999999;
  1346. line-height: 58rpx;
  1347. text-align: left;
  1348. }
  1349. .content-th{
  1350. display: flex;
  1351. flex: 7;
  1352. font-size: $font-size-26;
  1353. color: #333333;
  1354. line-height: 58rpx;
  1355. text-align: left;
  1356. }
  1357. }
  1358. }
  1359. }
  1360. .tui-popup-btn {
  1361. width: 100%;
  1362. height: auto;
  1363. float: left;
  1364. margin-top: 24rpx;
  1365. .tui-button{
  1366. width: 100%;
  1367. height: 88rpx;
  1368. background: $btn-confirm;
  1369. line-height: 88rpx;
  1370. text-align: center;
  1371. color: #FFFFFF;
  1372. font-size: $font-size-28;
  1373. border-radius: 44rpx;
  1374. }
  1375. }
  1376. /*富文本样式*/
  1377. rich-text.p{
  1378. width: 702rpx !important;
  1379. padding: 0 24rpx;
  1380. text-align: justify;
  1381. }
  1382. rich-text.img{
  1383. width: 100%;
  1384. height: auto;
  1385. }
  1386. .Disclaimer {
  1387. background: rgba(225,86,22,0.1);
  1388. border-radius:20rpx;
  1389. padding:0 20rpx 20rpx 20rpx;
  1390. font-size: 20rpx;
  1391. color: #e15616;
  1392. margin-bottom: 30rpx
  1393. }
  1394. .Disclaimer span {
  1395. display: block;
  1396. padding: 20rpx 0;
  1397. text-align: left;
  1398. font-size: 24rpx;
  1399. }
  1400. .Disclaimer .text {
  1401. line-height:48rpx;
  1402. }
  1403. .brandinfo{
  1404. color: #333333;
  1405. line-height: 46rpx;
  1406. font-size: 26rpx;
  1407. }
  1408. .imgList{
  1409. width: 702rpx;
  1410. margin: auto;
  1411. height: 710rpx;
  1412. margin-bottom: 20rpx;
  1413. }
  1414. .imgList img{
  1415. width: 100%;
  1416. height: 100%;
  1417. }
  1418. .detailsText{
  1419. padding: 0 30rpx 30rpx 30rpx;
  1420. color: #333333;
  1421. font-size: 24rpx;
  1422. text-align: left;
  1423. }
  1424. </style>