product-details.vue 33 KB

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