product.vue 34 KB

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