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

1342 lines
44 KiB

  1. <template>
  2. <view class="goods-info" v-show="isShow">
  3. <view class="goods-info-banner m-b-20">
  4. <view class="position-relative m-b-10 overflow-hidden">
  5. <view class="w-100 goods-info-swiper">
  6. <swiper-video-image v-if="hackReset" :list="swiperData[swiperKey]" height="560rpx" autoplay circular
  7. autoPlayVideo ref="swiperVideoImage" @swiperClick="swiperClick" @swiperChange="swiperChange" />
  8. </view>
  9. <view class="position-absolute goods-info-segmented-control flex align-center" id="segmentedControl"
  10. v-if="goodsDetail.voType == 1">
  11. <view class="goods-info-segmented-control-item flex align-center justify-center flex-1"
  12. :class="{ 'goods-info-segmented-control-item--active': segmentedControlCurrent === index }"
  13. v-for="(item, index) in subsectionList" :key="index"
  14. @click.stop="onSegmentedControl(item, index)">
  15. {{ item.name }}
  16. </view>
  17. <view class="goods-info-segmented-control-bar" :style="[segmentedControlLeft]"></view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 价格展示 -->
  22. <template v-if="type">
  23. <!-- <view
  24. v-if="type =='membersArea' || type == 'ZeroMoneyBuy' || type == 'todayAllReturn'|| type == 'PreferentialSpellGroup' "
  25. class="goods-info-price" :style="'background-image: url('+IMG_URL+'goods/goodsInfoPriceBg.png);'">
  26. <view class="goods-info-price-box">
  27. 本网价<text class="font-42">{{goodsDetail.payMoney}}</text>
  28. <text v-if="type" class="goods-info-price-box-oldPrice">市场价{{goodsDetail.price}}</text>
  29. <text class="text-grey grey_one">{{ goodsDetail.sumShop }}盒起售</text>
  30. </view> -->
  31. <!-- 普通订单 -->
  32. <!-- <view class="towReturn"
  33. v-if="(type =='ZeroMoneyBuy' || type =='todayAllReturn' || type== 'membersArea') && goodsDetail.giveType == 1">
  34. <text class="goods-info-price-box"
  35. v-if="goodsDetail.oneMomey !== 0 || goodsDetail.oneInteger !== 0 ">次卡再返{{ goodsDetail.oneMomey == 0 ? '' : goodsDetail.oneMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.oneInteger == 0 ? '' : goodsDetail.oneInteger + '元兑购金' }}</text>
  36. <text class="goods-info-price-box"
  37. v-if="goodsDetail.twoMomey !== 0 || goodsDetail.twoInteger !== 0 ">银卡再返{{ goodsDetail.twoMomey == 0 ? '' : goodsDetail.twoMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.twoInteger == 0 ? '' : goodsDetail.twoInteger + '元兑购金' }}</text>
  38. <text class="goods-info-price-box"
  39. v-if="goodsDetail.threeMomey !== 0 || goodsDetail.threeInteger !== 0 ">金卡再返{{ goodsDetail.threeMomey == 0 ? '' : goodsDetail.threeMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.threeInteger == 0 ? '' : goodsDetail.threeInteger + '元兑购金' }}</text>
  40. <text class="goods-info-price-box"
  41. v-if="goodsDetail.fourMomey !== 0 || goodsDetail.fourInteger !== 0 ">钻石卡再返{{ goodsDetail.fourMomey == 0 ? '' : goodsDetail.fourMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.fourInteger == 0 ? '' : goodsDetail.fourInteger + '元兑购金' }}</text>
  42. </view>
  43. <view
  44. v-if="goodsDetail.giveType == 0">
  45. <text class="rebate font-36 flex flex-column" v-if="!(goodsDetail.allMoney==0 && goodsDetail.allInteger==0) ">
  46. 再返{{goodsDetail.allMoney==0? '':goodsDetail.allMoney+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.allInteger==0?'':goodsDetail.allInteger+'元兑购金'}}
  47. </text>
  48. </view> -->
  49. <!-- 拼团 -->
  50. <!-- <view class="towReturn" v-if="type =='PreferentialSpellGroup' && goodsDetail.giveType == 1">
  51. <text class="goods-info-price-alt"
  52. v-if="userInfo.level == 1 && goodsDetail.oneMomey !== 0">再返{{goodsDetail.oneMomey}}元消费金</text>
  53. <text class="goods-info-price-alt"
  54. v-if="userInfo.level == 2 && goodsDetail.threeMomey !== 0 ">再返{{goodsDetail.threeMomey}}元消费金</text>
  55. <text class="goods-info-price-alt"
  56. v-if="userInfo.level == 3 && goodsDetail.twoMomey !== 0 ">再返{{goodsDetail.twoMomey}}元消费金</text>
  57. <text class="goods-info-price-alt"
  58. v-if="userInfo.level == 4 && goodsDetail.fourMomey !== 0 ">再返{{goodsDetail.fourMomey}}元消费金</text>
  59. <text class="goods-info-price-alt"
  60. v-if="userInfo.level == 1 && !(goodsDetail.oneMomey==0 && goodsDetail.oneInteger==0)">
  61. 再返{{goodsDetail.oneMomey==0? '':goodsDetail.oneMomey+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.oneInteger==0?'':goodsDetail.oneInteger+'元兑购金'}}
  62. </text>
  63. <text class="goods-info-price-alt"
  64. v-if="userInfo.level == 2 && !(goodsDetail.twoMomey==0 && goodsDetail.twoInteger==0)">
  65. 再返{{goodsDetail.twoMomey==0? '':goodsDetail.twoMomey+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.twoInteger==0?'':goodsDetail.twoInteger+'元兑购金'}}
  66. </text>
  67. <text class="goods-info-price-alt"
  68. v-if="userInfo.level == 3 && !(goodsDetail.threeMomey==0 && goodsDetail.threeInteger==0)">
  69. 再返{{goodsDetail.threeMomey==0? '':goodsDetail.threeMomey+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.threeInteger==0?'':goodsDetail+'元兑购金'}}
  70. </text>
  71. <text class="goods-info-price-alt"
  72. v-if="userInfo.level == 4 && !(goodsDetail.fourMomey==0 && goodsDetail.fourInteger==0)">
  73. 再返{{goodsDetail.fourMomey==0? '':goodsDetail.fourMomey+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.fourInteger==0?'':goodsDetail.fourInteger+'元兑购金'}}
  74. </text>
  75. </view> -->
  76. <!-- <view class="towReturn" v-if="type =='PreferentialSpellGroup' && goods.giveType == 0">
  77. <text class="goods-info-price-alt"
  78. v-if="goods.allMoney == 0 && goods.allMoney == 0">再返{{goods.allMoney}}元消费金</text>
  79. <text class="goods-info-price-alt" v-if="!(goodsDetail.allMoney==0 && goodsDetail.allInteger==0) ">
  80. 再返{{goodsDetail.allMoney==0? '':goodsDetail.allMoney+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.allInteger==0?'':goodsDetail.allInteger+'元兑购金'}}
  81. </text>
  82. </view> -->
  83. <!-- <text class="goods-info-price-alt" v-if="(type == 'ZeroMoneyBuy' || type == 'membersArea'|| type == 'todayAllReturn') && goodsDetail.giveType == 0">
  84. 3 元消费金 +2.99 兑购金</text> -->
  85. <!-- <text class="goods-info-price-alt" v-else>50 元消费金</text> -->
  86. <!-- <view class="rebate font-30 flex flex-column" v-if="goodsDetail.giveType == 0">
  87. <text class="bg_style bgcolor1"
  88. v-if="goodsDetail.oneMomey !== 0 || goodsDetail.oneInteger !== 0 ">次卡再返{{ goodsDetail.oneMomey == 0 ? '' : goodsDetail.oneMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.oneInteger == 0 ? '' : goodsDetail.oneInteger + '元兑购金' }}</text>
  89. <text class="bg_style bgcolor2"
  90. v-if="userInfo.level == 2 && goodsDetail.threeMomey !== 0 ">银卡再返{{ goodsDetail.twoMomey == 0 ? '' : goodsDetail.twoMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.twoInteger == 0 ? '' : goodsDetail.twoInteger + '元兑购金' }}</text>
  91. <text class="bg_style bgcolor3"
  92. v-if="userInfo.level == 3 && goodsDetail.twoMomey !== 0 ">金卡再返{{ goodsDetail.threeMomey == 0 ? '' : goodsDetail.threeMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.threeInteger == 0 ? '' : goodsDetail.threeInteger + '元兑购金' }}</text>
  93. <text class="bg_style bgcolor4"
  94. v-if="userInfo.level == 4 && goodsDetail.fourMomey !== 0 ">钻石卡再返{{ goodsDetail.fourMomey == 0 ? '' : goodsDetail.fourMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.fourInteger == 0 ? '' : goodsDetail.fourInteger + '元兑购金' }}</text>
  95. </view>
  96. <view class="rebate font-30 flex flex-column" v-else>
  97. <text class="bg_style bgcolor1"
  98. v-if="goodsDetail.oneMomey !== 0 || goodsDetail.oneInteger !== 0 ">次卡再返{{ goodsDetail.oneMomey == 0 ? '' : goodsDetail.oneMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.oneInteger == 0 ? '' : goodsDetail.oneInteger + '元兑购金' }}</text>
  99. <text class="bg_style bgcolor2"
  100. v-if="userInfo.level == 2 && goodsDetail.threeMomey == 0 ">银卡再返{{ goodsDetail.twoMomey == 0 ? '' : goodsDetail.twoMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.twoInteger == 0 ? '' : goodsDetail.twoInteger + '元兑购金' }}</text>
  101. <text class="bg_style bgcolor3"
  102. v-if="userInfo.level == 3 && goodsDetail.twoMomey == 0 ">金卡再返{{ goodsDetail.threeMomey == 0 ? '' : goodsDetail.threeMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.threeInteger == 0 ? '' : goodsDetail.threeInteger + '元兑购金' }}</text>
  103. <text class="bg_style bgcolor4"
  104. v-if="userInfo.level == 4 && goodsDetail.fourMomey == 0 ">钻石卡再返{{ goodsDetail.fourMomey == 0 ? '' : goodsDetail.fourMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.fourInteger == 0 ? '' : goodsDetail.fourInteger + '元兑购金' }}</text>
  105. </view> -->
  106. <!-- </view> -->
  107. <view class="goods-info-price" :style="'background-image: url('+IMG_URL+'goods/goodsInfoPriceBg.png);'">
  108. <view v-if="
  109. type=='home'
  110. || type=='specialOfferArea'
  111. || type=='highReturn'
  112. || type=='festivaIActivity'
  113. || type=='scienceIsTie-in'
  114. || type=='sort'
  115. || type =='ZeroMoneyBuy'
  116. || type =='todayAllReturn'
  117. || type== 'membersArea'
  118. " class="goods-info-price-box box_centter">
  119. <text class="font-42" v-if="
  120. type=='home'
  121. || type=='highReturn'
  122. || type=='scienceIsTie-in'
  123. || type=='sort'
  124. || type =='ZeroMoneyBuy'
  125. || type =='todayAllReturn'
  126. || type== 'membersArea'
  127. ">本网价</text>
  128. <text v-if="type=='specialOfferArea' || type=='festivaIActivity'">特价</text>
  129. <text>{{goodsDetail.payMoney}}</text>
  130. <text class="goods-info-price-box-oldPrice"
  131. v-if="goodsDetail.price || goodsDetail.price == 0">市场价{{goodsDetail.price}}</text>
  132. <text class="text-grey"
  133. v-if="goodsDetail.sumShop || goodsDetail.sumShop == 0">{{ goodsDetail.sumShop }}盒起售</text>
  134. </view>
  135. <view v-if="type=='integralStore' " class="goods-info-price-integral_centter">
  136. <text>{{goodsDetail.integerPrice}}兑购金兑购</text>
  137. <text class="text-grey">{{ goodsDetail.sumShop }}盒起售</text>
  138. </view>
  139. <view class="rebate font-40 flex flex-column" v-if="goodsDetail.giveType == 1">
  140. <text class="bg_style bgcolor1"
  141. v-if="goodsDetail.oneMomey !== 0 || goodsDetail.oneInteger !== 0">次卡再返{{ goodsDetail.oneMomey == 0 ? '' : goodsDetail.oneMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.oneInteger == 0 ? '' : goodsDetail.oneInteger + '元兑购金' }}</text>
  142. <text class="bg_style bgcolor2"
  143. v-if="goodsDetail.twoMomey !== 0 || goodsDetail.twoInteger !== 0 ">银卡再返{{ goodsDetail.twoMomey == 0 ? '' : goodsDetail.twoMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.twoInteger == 0 ? '' : goodsDetail.twoInteger + '元兑购金' }}</text>
  144. <text class="bg_style bgcolor3"
  145. v-if="goodsDetail.threeMomey !== 0 || goodsDetail.threeInteger !== 0 ">金卡再返{{ goodsDetail.threeMomey == 0 ? '' : goodsDetail.threeMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.threeInteger == 0 ? '' : goodsDetail.threeInteger + '元兑购金' }}</text>
  146. <text class="bg_style bgcolor4"
  147. v-if="goodsDetail.fourMomey !== 0 || goodsDetail.fourInteger !== 0 ">钻石卡再返{{ goodsDetail.fourMomey == 0 ? '' : goodsDetail.fourMomey + '元消费金' }}&nbsp;&nbsp;{{ goodsDetail.fourInteger == 0 ? '' : goodsDetail.fourInteger + '元兑购金' }}</text>
  148. </view>
  149. <view class="rebate font-40 flex flex-colum" v-if="goodsDetail.endTime">
  150. <text class="bg_style bgcolor4">
  151. 活动结束时间 {{ goodsDetail.endTime }}</text>
  152. </view>
  153. <view class="rebate font-40 flex flex-column" v-if="goodsDetail.giveType == 0">
  154. <text class="bg_style bgcolor4" v-if="!(goodsDetail.allMoney==0 && goodsDetail.allInteger==0) ">
  155. 再返{{goodsDetail.allMoney==0? '':goodsDetail.allMoney+'元消费金'}}&nbsp;&nbsp;{{goodsDetail.allInteger==0?'':goodsDetail.allInteger+'元兑购金'}}
  156. </text>
  157. </view>
  158. <view class="flex flex-column m-b-10">
  159. <!-- <text class="return_text" v-if="goods.payMoney !== 0 && goods.bottonType == 0 && thereTo == 'sort'" >可用{{goods.payMoney}}元消费金兑购</text> -->
  160. <!-- 兑购专区不显示 消费金抵购-->
  161. {{}}
  162. <text class="return_text" v-if="goodsDetail.payMoney !== 0 && type !=='integralStore'">可用{{goodsDetail.payMoney}}元消费金抵购</text>
  163. <text class="return_text" v-if="goodsDetail.integerOldPrice !== 0 && type !=='integralStore'" >可用{{goodsDetail.integerOldPrice}}兑购金兑购</text>
  164. <div class="flex justify-between">
  165. <!-- <text class="return_text" v-if="goods.getInteger !== 0">推广可得兑购金{{goods.getInteger}}</text> -->
  166. <text class="return_text return_text_1"
  167. v-if="goodsDetail.getMoney!==0">推广可得兑购金{{goodsDetail.getMoney}}</text>
  168. <!-- <text class="return_text return_text_1"
  169. v-if="thereTo !== 'sort'">推广可得兑购金{{goodsDetail.getInteger}}</text> -->
  170. </div>
  171. </view>
  172. </view>
  173. </template>
  174. <!-- 选择是看评论 还是 商品详情 -->
  175. <view class="goods-info-select-show flex ">
  176. <view @click="isShowDetale = true;showComment=false"
  177. :class="isShowDetale?'goods-info-select-show-goods flex justify-center align-center selectactive':'goods-info-select-show-goods flex justify-center align-center'">
  178. 商品参数
  179. </view>
  180. <view @click="isShowDetale =false;showComment=true"
  181. :class="isShowDetale?'goods-info-select-show-comment flex justify-center align-center':'goods-info-select-show-comment flex justify-center align-center selectactive'">
  182. 评论
  183. </view>
  184. </view>
  185. <template v-if="isShowDetale">
  186. <!-- 商品详情 -->
  187. <view class="goods-info-container">
  188. <view class="goods-info-container-title flex align-end justify-between">
  189. <text
  190. class="font-36 text-black font-weight-bold">{{goodsDetail.subTitle}}{{goodsDetail.title}}</text>
  191. </view>
  192. <view class="goods-info-container-params">
  193. <!-- <view class="goods-info-container-params-image">
  194. <image :src="IMG_URL + 'goods/params.png'" mode="widthFix"></image>
  195. </view> -->
  196. <view class="goods-info-container-params-content">
  197. <!-- <view class="flex align-start m-b-20" v-for="item in 3" :key="item">
  198. <text class="goods-info-container-params-content-left text-grey font-28">功能主治</text>
  199. <text class="text-black font-28">成人儿童风热感冒用于感冒引起的头痛 发热鼻塞流涕喉咙痛</text>
  200. </view> -->
  201. <rich-text :nodes="goodsDetail.detail" image-menu-prevent></rich-text>
  202. <!-- <u-parse :html="goodsDetail.detail"></u-parse> -->
  203. </view>
  204. </view>
  205. </view>
  206. <view class="goods-info-other" v-if="goodsDetail.goodsRelationList.length !== 0">
  207. <view class="goods-info-other-image m-b-20">
  208. <image :src="IMG_URL + 'goods/test.png'" mode="widthFix"></image>
  209. </view>
  210. <view class="goods-info-other-item" v-for="(item2,index) in goodsDetail.goodsRelationList" :key="index">
  211. <goods-item :type='type' :thereTo="type" :goods="item2"></goods-item>
  212. </view>
  213. </view>
  214. </template>
  215. <template v-else>
  216. <!-- 评论 -->
  217. <view class="comment">
  218. <view class="comment-item" v-for="(item,index) in pingList" :key="index">
  219. <view class="comment-item-user-info">
  220. <img class="comment-item-user-info-userImg" :src="item.headUrl" alt="">
  221. <text>{{item.name}}</text>
  222. </view>
  223. <view class="comment-conter">
  224. {{item.connet}}
  225. </view>
  226. </view>
  227. </view>
  228. </template>
  229. <!-- <com-view class="goods-info-doctor position-fixed"> -->
  230. <button open-type="contact" bindcontact="handleContact" session-from="sessionFrom"
  231. class="wechatBtn goods-info-doctor position-fixed">
  232. <image :src="IMG_URL + 'goods/doctor.png'" mode="widthFix"></image>
  233. </button>
  234. <!-- </com-view> -->
  235. <view class="goods-info-footer position-fixed vw-100 left-0 bottom-0 flex align-center justify-between">
  236. <view class="flex showCommtBox" v-if="showComment">
  237. <input type="text" placeholder="发表评论" class="input-commit" indconfirm="toSendCommit"
  238. v-model="commitKey">
  239. <button class="flex font-24 send_commit_btn" @click="toSendCommit">发送</button>
  240. </view>
  241. <view class="flex align-center">
  242. <!-- <com-view @click="toHome">
  243. <view class="flex flex-column h-100 justify-between align-center m-r-50">
  244. <image class="goods-info-footer-icon" :src="IMG_URL + 'goods/home.png'">
  245. <text class="text-black font-24">分享</text>
  246. </view>
  247. </com-view> -->
  248. <button class="goods-info-footer-share" @click="showShare = true">
  249. <view class="flex flex-column h-100 justify-between align-center m-l-25 m-r-25">
  250. <image class="goods-info-footer-icon" :src="IMG_URL + 'goods/share.png'">
  251. <text class="text-black font-32">分享</text>
  252. </view>
  253. </button>
  254. <com-view @click="toCollection">
  255. <view class="flex flex-column h-100 justify-between align-center m-r-25">
  256. <image v-if="goodsDetail.skuListSku[0].collection" class="goods-info-footer-icon"
  257. :src="IMG_URL + 'goods/isCollection.png'">
  258. <!-- 已收藏 -->
  259. <image v-else class="goods-info-footer-icon" :src="IMG_URL + 'goods/collection.png'">
  260. <!-- 未收藏 -->
  261. <text class="text-black font-32">收藏</text>
  262. </view>
  263. </com-view>
  264. <!-- <com-view @click="toAddCart"
  265. v-if=" !(type == 'PreferentialSpellGroup' || type =='integralStore') && goodsDetail.payNum != 1">
  266. <view>
  267. <view class="flex flex-column h-100 justify-between align-center position-relative m-r-28"
  268. style="width: 120rpx; !important">
  269. <image class="goods-info-footer-icon" :src="IMG_URL + 'goods/cart.png'">
  270. <text class="text-black font-24">加入购物车</text>
  271. </view>
  272. </view>
  273. </com-view> -->
  274. <!-- 特惠拼团和兑购兑换商品详情太过空旷 增加购物车按钮 -->
  275. <!-- <com-view @click="toShoppingCart" v-else-if="goodsDetail.payNum != 1">
  276. <view>
  277. <view class="flex flex-column justify-between align-center position-relative m-r-28"
  278. style="width: 120rpx; !important">
  279. <image class="goods-info-footer-icon" :src="IMG_URL + 'goods/cart.png'">
  280. <text class="text-black font-24">购物车</text>
  281. <u-badge :offset="[-8,0]" type="error" :count="goodsDetail.shopCartNum"
  282. v-if="goodsDetail.shopCartNum"></u-badge>
  283. </view>
  284. </view>
  285. </com-view> -->
  286. </view>
  287. <!-- 老的逻辑 -->
  288. <!-- <u-button type="primary" shape="circle" @click="showParameter = true">查看参数</u-button> -->
  289. <!-- <u-button type="primary" shape="circle" @click="toAddCart" class="changeWidth" v-if="goodsDetail.payNum == 1 && !(type == 'PreferentialSpellGroup' && type =='integralStore')">加入购物车</u-button>
  290. <u-button type="primary" shape="circle" :class="textBtnPrimary=='立即购买'? 'changeColor': '' " @click="toShowS" v-else>{{textBtnPrimary}}</u-button>
  291. <!-- 加入购物车 -->
  292. <!-- <u-button type="primary" shape="circle" v-if="!(goodsDetail.payNum == 1 && !(type == 'PreferentialSpellGroup' && type =='integralStore'))" @click="toAddCart">加入购物车</u-button> -->
  293. <u-button type="primary" shape="circle"
  294. :class="[textBtnPrimary=='立即购买'||textBtnPrimary=='立即预约'? 'changeColor': '',textBtnPrimary=='立即兑换'? 'changeWidth': '','fontSize' ]"
  295. @click="toShowS">{{textBtnPrimary}}</u-button>
  296. <u-button type="primary" shape="circle" v-if="type !== 'integralStore'" @click="toAddCart" class='fontSize' >加入购物车</u-button>
  297. </view>
  298. <!-- 弹出查看参数 -->
  299. <u-popup v-model="showParameter" mode="bottom" border-radius="40" height="70%" @close="showParameter = false"
  300. @touchmove.prevent="">
  301. <scroll-view scroll-y="true">
  302. <rich-text :nodes="goodsDetail.parameter"></rich-text>
  303. </scroll-view>
  304. </u-popup>
  305. <!-- 分享选择 -->
  306. <u-popup v-model="showShare" mode="bottom" border-radius="20" height="15%" @close="showShare = false">
  307. <view class="flex align-center shareBox">
  308. <!-- 分享 -->
  309. <button class="imgwH" data-name="shareBtn" open-type="share">
  310. <image class="imgwH" :src="IMG_URL + 'goods/weixin.png'">
  311. </button>
  312. <!-- 海报 -->
  313. <image class="imgwH" :src="IMG_URL + 'goods/pic.png'" mode="" @click="toPages"></image>
  314. </view>
  315. </u-popup>
  316. <spec-popup ref="specPopup" :type="type" :goodsDetail="goodsDetail" @addShopping="addShoppingBefore" />
  317. <!-- 自定义提示组件 -->
  318. <view class="showToastStyle" v-if="isShowToast">
  319. <text class="showToastText">加入购物车成功</text>
  320. </view>
  321. <!-- 返回首页 -->
  322. <view class="showToBack" v-if="toBackHome" @click="toBachHome">
  323. 返回首页
  324. </view>
  325. </view>
  326. </template>
  327. <script>
  328. import SpecPopup from './components/specPopup'
  329. import {
  330. IMG_URL
  331. } from '@/env.js'
  332. let subsectionList = [{
  333. name: '图片',
  334. key: 'image'
  335. },
  336. {
  337. name: '视频',
  338. key: 'video'
  339. }
  340. ]
  341. export default {
  342. data() {
  343. return {
  344. isShowToast: false,
  345. toBackHome: false,
  346. pingList: [],
  347. IMG_URL,
  348. type: '',
  349. swiperData: {},
  350. swiperKey: 'image',
  351. hackReset: true,
  352. subsectionList,
  353. showParameter: false,
  354. segmentedControlCurrent: 0,
  355. show_pic_viode: 0,
  356. bannerList: [
  357. IMG_URL + 'home/test14.png',
  358. IMG_URL + 'home/test14.png',
  359. IMG_URL + 'home/test14.png'
  360. ],
  361. goodsDetail: {},
  362. goodsId: '',
  363. segmentedControlInfo: null,
  364. textBtnPrimary: '立即购买', // 加入按钮
  365. isShowDetale: true,
  366. showShare: false, // 分享选择显示
  367. showComment: false, // 显示输入框
  368. commitKey: '', //发送评论文字
  369. isLock: true, // 防止重复发评论
  370. shareInfo: {}, // 分享信息
  371. }
  372. },
  373. components: {
  374. SpecPopup
  375. },
  376. onShareAppMessage(res) {
  377. return {
  378. title: `【好友推荐】${this.goodsDetail.title}`,
  379. imageUrl: this.goodsDetail.pic[0],
  380. path: `/pagesC/goodsInfo/goodsInfo?id=${this.goodsId}&type=${this.type}&shareId=${this.userInfo.invitationCode}`
  381. }
  382. },
  383. computed: {
  384. segmentedControlLeft() {
  385. let width = this.segmentedControlInfo?.width ?? 0 / 2;
  386. let left = width * this.segmentedControlCurrent;
  387. return {
  388. transform: `translateX(${left}rpx)`
  389. };
  390. },
  391. isShow() {
  392. return Object.keys(this.goodsDetail).length
  393. },
  394. userInfo() {
  395. return this.$store.state.userInfo
  396. }
  397. },
  398. async onLoad(options) {
  399. console.log(options)
  400. uni.setStorageSync('shareId', options.shareId);
  401. this.type = options.type;
  402. this.goodsId = options.id;
  403. // 返回首页
  404. const pages = getCurrentPages();
  405. console.log(pages)
  406. this.toBackHome = pages[0].route == 'pagesC/goodsInfo/goodsInfo' ? true : false
  407. // 要么跳首页
  408. const token = this.$store.state.userToken
  409. if (options.shareId) {
  410. this.getGoodsdetail(options.id)
  411. } else {
  412. console.log(12313)
  413. await this.getGoodsdetail(options.id)
  414. await this.goodsFenGoods();
  415. // 获取分享信息
  416. }
  417. },
  418. onShow() {
  419. // 返回是提示 添加购物车成功
  420. uni.$on("isUpdataShowToast", (time = 1500) => {
  421. this.isShowToast = true;
  422. setTimeout(() => {
  423. this.isShowToast = false;
  424. }, time)
  425. })
  426. },
  427. onUnload() {
  428. uni.$off('isUpdataShowToast')
  429. const pages = getCurrentPages();
  430. if (pages[0].route == 'pagesC/goodsInfo/goodsInfo') {
  431. uni.switchTab({
  432. url: "/pages/home/home"
  433. })
  434. }
  435. },
  436. methods: {
  437. toBachHome() {
  438. uni.switchTab({
  439. url: "/pages/home/home"
  440. })
  441. },
  442. // 获取分享信息
  443. goodsFenGoods() {
  444. return new Promise((req, rej) => {
  445. this.$api('goodsFenGoods', {
  446. goodId: this.goodsId,
  447. type: this.type,
  448. path: '/pagesC/goodsInfo/goodsInfo',
  449. }).then(res => {
  450. let {
  451. code,
  452. result,
  453. message
  454. } = res;
  455. if (code == 200) {
  456. // console.log(result);
  457. this.shareInfo = result
  458. req(result)
  459. } else {
  460. this.$Toast(message);
  461. }
  462. })
  463. })
  464. },
  465. // 发送评论
  466. toSendCommit() {
  467. const keyName = this.commitKey
  468. if (keyName == "") {
  469. this.$Toast("请输入评论内容!")
  470. return
  471. }
  472. if (!this.isLock) {
  473. this.$Toast("请休息一下吧!")
  474. return
  475. }
  476. this.isLock = false
  477. const params = {
  478. goodId: this.goodsId,
  479. name: this.userInfo.nickName,
  480. headUrl: this.userInfo.headUrl,
  481. connet: keyName
  482. }
  483. // console.log(params)
  484. this.$api("setCommit", params).then(res => {
  485. const {
  486. code,
  487. result,
  488. message
  489. } = res;
  490. if (code !== 200) {
  491. this.$Toast(message)
  492. this.isLock = true;
  493. return
  494. }
  495. this.isLock = true;
  496. this.commitKey = '';
  497. this.$Toast(message);
  498. this.getPing(params.goodId);
  499. }).catch(err => {
  500. this.$Toast(err.message)
  501. this.isLock = true;
  502. })
  503. },
  504. // swiper切换时触发的回调
  505. swiperChange(index) {
  506. // console.log(index)
  507. },
  508. // 点击当前视频或图片的回调
  509. swiperClick(item, index) {
  510. item.type === 'video' && this.play(item.link)
  511. },
  512. // 暂停当前视频播放
  513. pause() {
  514. this.$refs.swiperVideoImage.pause()
  515. },
  516. toShowS() {
  517. this.$refs.specPopup.show(true, 'confirm', this.type)
  518. },
  519. onSegmentedControl(item, index) {
  520. // 显示图片还是视频
  521. this.swiperKey = item.key
  522. this.segmentedControlCurrent = index;
  523. this.hackReset = false;
  524. this.$nextTick(() => {
  525. console.log('---reset')
  526. this.hackReset = true;
  527. })
  528. // if (item.key === 'video') return this.$nextTick(() => console.log(this.$refs.swiperVideoImage.play),this.$refs.swiperVideoImage.play())
  529. },
  530. //加入购物车 之前判断条件
  531. addShoppingBefore(params, type) {
  532. let tips = ''
  533. console.log(params, type, '数据')
  534. for (let key in params.spec) {
  535. if (!params.spec[key]) {
  536. this.$Toast(`请选择${key}`)
  537. return
  538. }
  539. }
  540. if (this.type == 'integralStore') {
  541. // if (params.num * params.price > this.userInfo.integral) return this.$Toast('兑购金不足'); // 如果解开,请加上刷新个人信息,更新缓存
  542. console.log(params)
  543. uni.showModal({
  544. title: '确定使用消费' + parseFloat(params.price * params.num).toFixed(2) + '元兑购金兑购',
  545. success: (res) => {
  546. if (res.confirm) {
  547. if (type === 'confirm') return this.confirmShopping(params)
  548. this.confirmShopping(params);
  549. } else if (res.cancel) {
  550. this.$Toast("您取消了兑换")
  551. }
  552. },
  553. fail: () => {
  554. this.$Toast("您取消了兑换")
  555. }
  556. })
  557. } else {
  558. if (type === 'confirm') return this.confirmShopping(params)
  559. this.addShopping(params)
  560. }
  561. },
  562. confirmShopping(params) {
  563. let {
  564. num,
  565. price,
  566. spec
  567. } = params
  568. let arr = Object.values(spec)
  569. let goodSkuParam = arr.join(',')
  570. const payNum = this.goodsDetail.payNum
  571. // if (this.type == 'PreferentialSpellGroup' || this.type=='integralStore') { // 拼团 1 && 兑购金 2
  572. let orderType = this.type == 'PreferentialSpellGroup' ? 1 : this.type == 'integralStore' ? 2 : 3
  573. let payType = this.type == 'PreferentialSpellGroup' ? 0 : this.type == 'integralStore' ? 2 : 0
  574. if (payNum == 1) { // 处方药
  575. // 传递goodsId 和 type
  576. this.$tools.navigateTo({
  577. url: `/pagesC/subscribe/subscribe?goodsId=${this.goodsId}&orderType=${orderType}&isSituation=${this.goodsDetail.isSituation}&num=${num}&price=${price}&goodSkuParam=${goodSkuParam}&prescriptionId=${this.goodsDetail.payNum}&createOrderType=confirm&payType=${payType}&isZone=${this.goodsDetail.bottonType}`
  578. })
  579. } else {
  580. uni.showLoading()
  581. this.$api('teamCreateOrder', {
  582. type: payType,
  583. id: this.goodsDetail.id,
  584. goodsPrice: price,
  585. goodsNum: num,
  586. goodsSku: goodSkuParam,
  587. orderType
  588. })
  589. .then(res => {
  590. uni.hideLoading()
  591. let {
  592. code,
  593. message,
  594. result
  595. } = res
  596. if (code === 200) {
  597. this.$tools.navigateTo({
  598. url: `/pagesC/confirmOrder/confirmOrder?ids=${result.order.id}&orderType=${orderType}&payType=${payType}&isZone=${this.goodsDetail.bottonType}`
  599. })
  600. } else if (code === 902) {
  601. const that = this
  602. uni.showModal({
  603. title: "疫情防控药品登记提示",
  604. content: "您好,您购买的商品中含疫情防控类商品,请您登记用药人信息后下单",
  605. success(res) {
  606. if (res.confirm) {
  607. setTimeout(() => {
  608. that.$refs.specPopup.hide();
  609. that.$tools.navigateTo({
  610. url: `/pagesB/epidemicPrevention/index?goodsId=${that.goodsId}&orderType=${orderType}&isSituation=${that.goodsDetail.isSituation}&num=${num}&price=${price}&goodSkuParam=${goodSkuParam}&prescriptionId=${that.goodsDetail.payNum}&createOrderType=confirm&payType=${payType}&isZone=${that.goodsDetail.bottonType}`
  611. }, 800)
  612. })
  613. }
  614. }
  615. })
  616. } else {
  617. // this.$Toast(message)
  618. if(message == "兑购金不足"){
  619. uni.showModal({
  620. title: `兑购金不足,兑购失败`,
  621. content: '可以去充值/或分享推广/或答题有奖/或购物........获得兑购金',
  622. showCancel: false,
  623. confirmText: '我知道了',
  624. success(res) {
  625. }
  626. });
  627. }
  628. }
  629. }).catch(err => {
  630. this.$Toast(err.message)
  631. })
  632. }
  633. // } else {
  634. // }
  635. },
  636. // 加入购物车
  637. addShopping(params) {
  638. let {
  639. num,
  640. price,
  641. spec
  642. } = params
  643. let arr = Object.values(spec)
  644. let goodSkuParam = arr.join(',')
  645. const payNum = this.goodsDetail.payNum
  646. // 兑购金提示是否确定使用多少兑购金兑购
  647. // 防疫药
  648. if (payNum == 1) { // 处方药
  649. // 传递goodsId 和 type
  650. let orderType = this.type == 'PreferentialSpellGroup' ? 1 : this.type == 'integralStore' ? 2 : 0
  651. this.$refs.specPopup.hide();
  652. this.$tools.navigateTo({
  653. url: `/pagesC/subscribe/subscribe?goodsId=${this.goodsId}&orderType=${orderType}&isSituation=${this.goodsDetail.isSituation}&num=${num}&price=${price}&goodSkuParam=${goodSkuParam}&prescriptionId=${this.goodsDetail.payNum}&createOrderType=shoppingCart`
  654. })
  655. } else { // 加入购物车接口
  656. // if (this.type == 'PreferentialSpellGroup' || this.type=='integralStore') { // 拼团 1 && 兑购金 2
  657. // let orderType = this.type == 'PreferentialSpellGroup' ? 1 : this.type=='integralStore' ? 2 : 0
  658. // uni.showLoading()
  659. // this.$api('teamCreateOrder', {type:2, id: this.goodsDetail.id,goodsPrice: price, goodsNum: num, goodsSku: goodSkuParam, orderType })
  660. // .then(res => {
  661. // uni.hideLoading()
  662. // let { code, message, result } = res
  663. // if (code === 200) {
  664. // this.$tools.navigateTo({
  665. // url: `/pagesC/confirmOrder/confirmOrder?ids=${result.order.id}&type=${orderType}`
  666. // })
  667. // }else if(code === 902){
  668. // setTimeout(() => {
  669. // this.$tools.navigateTo({
  670. // url: `/pagesB/epidemicPrevention/index?goodsId=${this.goodsId}&orderType=${orderType}&isSituation=${this.goodsDetail.isSituation}&num=${num}&price=${price}&goodSkuParam=${goodSkuParam}&prescriptionId=${this.goodsDetail.payNum}`
  671. // }, 800)
  672. // })
  673. // } else {
  674. // this.$Toast(message)
  675. // }
  676. // }).catch(err => {
  677. // this.$Toast(err.message)
  678. // })
  679. // } else { // 购物车
  680. this.$api('addShoppingCart', {
  681. id: this.goodsDetail.id,
  682. num,
  683. price,
  684. goodSkuParam
  685. })
  686. .then(res => {
  687. this.$refs.specPopup.hide()
  688. // this.$Toast(res.message)
  689. if (res.code === 200) {
  690. uni.$emit('updateShoppingCartList')
  691. this.$Toast('加入成功')
  692. // setTimeout(() => {
  693. // this.$tools.switchTab({
  694. // url: '/pages/shoppingCart/shoppingCart'
  695. // }, 800)
  696. // })
  697. } else if (res.code === 902) {
  698. const that = this
  699. uni.showModal({
  700. title: "疫情防控药品登记提示",
  701. content: "您好,您购买的商品中含疫情防控类商品,请您登记用药人信息后下单",
  702. success(res) {
  703. if (res.confirm) {
  704. // 防疫药
  705. setTimeout(() => {
  706. that.$refs.specPopup.hide();
  707. that.$tools.navigateTo({
  708. url: `/pagesB/epidemicPrevention/index?goodsId=${that.goodsId}&isSituation=${that.goodsDetail.isSituation}&num=${num}&price=${price}&goodSkuParam=${goodSkuParam}&prescriptionId=${that.goodsDetail.payNum}&createOrderType=shoppingCart`
  709. }, 800)
  710. })
  711. }
  712. }
  713. })
  714. } else {
  715. this.$Toast(res.message)
  716. }
  717. }).catch(err => {
  718. this.$Toast(err.message)
  719. })
  720. // }
  721. }
  722. },
  723. // 获取商品详情
  724. getGoodsdetail(id) {
  725. uni.showLoading();
  726. this.$api('getGoodsdetail', {
  727. id
  728. })
  729. .then(res => {
  730. let {
  731. code,
  732. result,
  733. message
  734. } = res;
  735. uni.hideLoading();
  736. if (code == 200) {
  737. this.getPing(this.goodsId);
  738. result.pic = result.pic ? result.pic.split(',') : []
  739. result.picVo = result.picVo ? result.picVo.split(',') : []
  740. result.goodsRelationList.forEach(item => {
  741. if (item) {
  742. item.pic = item.pic.split(',')[0]
  743. }
  744. })
  745. this.swiperData = {
  746. video: result.picVo.map(item => ({
  747. type: 'video',
  748. link: item
  749. })),
  750. image: result.pic.map(item => ({
  751. type: 'img',
  752. link: item
  753. }))
  754. }
  755. let detail = result.detail.replace(/\<img/gi,
  756. `<img style="width:${uni.upx2px(750)}px;height:auto;display:block;"`)
  757. // .replace(/\<li style="[^"]+"/gi, `<li style="display:flex;flex-wrap:wrap"`)
  758. // .replace(/\<p class="drug-explain-txt" style="[^"]+"/gi, `<p style="flex:1"`)
  759. this.goodsDetail = {
  760. ...result,
  761. detail
  762. }
  763. // 处方显示立即预约 其他显示立即购买 .type== 'PreferentialSpellGroup' integralStore
  764. let btnTxt = this.textBtnPrimary
  765. // if (result.payNum == 1 && this.type !== 'PreferentialSpellGroup' && this.type !==
  766. // 'integralStore') {
  767. // btnTxt = "加入购物车"
  768. // } else
  769. if (result.payNum !== 1 && (this.type !== 'PreferentialSpellGroup' && this.type !==
  770. 'integralStore')) {
  771. btnTxt = "立即购买"
  772. } else if (this.type === 'PreferentialSpellGroup') {
  773. btnTxt = '立即参团'
  774. } else if (this.type == 'integralStore') {
  775. btnTxt = '立即兑换'
  776. }
  777. if (result.payNum == 1) {
  778. btnTxt = '立即预约'
  779. }
  780. this.$nextTick(async () => {
  781. this.segmentedControlInfo = await this.$util.getDomInfo(
  782. '#segmentedControl', this);
  783. this.textBtnPrimary = btnTxt
  784. console.log('this.segmentedControlInfo', this.segmentedControlInfo)
  785. })
  786. } else {
  787. let tips = message.indexOf('操作失败') > -1 ? '商品不存在' : message
  788. this.$Toast(tips);
  789. }
  790. }).catch(err => {
  791. uni.hideLoading();
  792. this.$Toast(err.message)
  793. })
  794. },
  795. //获取评论
  796. getPing(goodId) {
  797. let that = this;
  798. let pamas = {
  799. goodId: goodId
  800. }
  801. this.$api('getGoodsPing', pamas).then(res => {
  802. console.log(res)
  803. if (res.code == 200) {
  804. that.pingList = res.result;
  805. console.log(that.pingList)
  806. }
  807. }).catch(err => {
  808. uni.hideLoading();
  809. this.$Toast(err.message)
  810. })
  811. },
  812. play(picVo) {
  813. this.$tools.navigateTo({
  814. url: `/pagesC/videoPlay/videoPlay?picVo=${picVo}`
  815. });
  816. },
  817. toAddCart() {
  818. // uni.switchTab({
  819. // url: '/pages/shoppingCart/shoppingCart'
  820. // })
  821. // if (this.goodsDetail.shopCardType === 1 && this.goodsDetail.bottonType === 0 ) return this.$Toast('购物车中有专区商品,请先支付')
  822. // if (this.goodsDetail.shopCardType === 0 && this.goodsDetail.bottonType === 1 && this.goodsDetail.shopCartNum * 1 > 0 ) return this.$Toast('购物车中有普通商品,请先支付')
  823. this.$refs.specPopup.show(true, 'shoppingCart', this.type)
  824. },
  825. toShoppingCart() {
  826. uni.switchTab({
  827. url: '/pages/shoppingCart/shoppingCart'
  828. })
  829. },
  830. toCollection() {
  831. uni.showLoading();
  832. const params = {
  833. goodId: this.goodsDetail.id,
  834. thereTo: this.type // 从那元页面来的
  835. }
  836. this.$api('saveCollectionPage', params).then(res => {
  837. let {
  838. code,
  839. result,
  840. message
  841. } = res;
  842. uni.hideLoading();
  843. if (code == 200) {
  844. this.goodsDetail.skuListSku[0].collection = !this.goodsDetail.skuListSku[0].collection
  845. this.$Toast(result);
  846. } else {
  847. this.$Toast(message);
  848. }
  849. }).catch(err => {
  850. uni.hideLoading();
  851. this.$Toast(err.message);
  852. })
  853. },
  854. toHome() {
  855. this.$tools.switchTab({
  856. url: '/pages/home/home'
  857. })
  858. },
  859. // 分享海报
  860. toPages() {
  861. const goodsInfo = encodeURIComponent(JSON.stringify(this.goodsDetail));
  862. const shareInfo = encodeURIComponent(JSON.stringify(this.shareInfo));
  863. if (Object.keys(this.shareInfo).length == 0) {
  864. this.$Toast("请等会儿点击,资源正在加载!");
  865. return;
  866. }
  867. this.$tools.navigateTo({
  868. url: `/pagesC/sharePic/sharePic?goodsInfo=${goodsInfo}&shareInfo=${shareInfo}`,
  869. })
  870. }
  871. }
  872. }
  873. </script>
  874. <style lang="scss" scoped>
  875. .towReturn {
  876. padding-left: 40rpx;
  877. }
  878. .rebate {
  879. width: 100%;
  880. display: flex;
  881. flex-wrap: wrap;
  882. margin-top: 10rpx;
  883. margin-left: 20rpx;
  884. // margin-bottom: 6rpx;
  885. .bg_style {
  886. width: fit-content;
  887. font-size: 30rpx;
  888. font-weight: bold;
  889. padding-left: 20rpx;
  890. margin-bottom: 10rpx;
  891. border-radius: 12rpx;
  892. color: #fff;
  893. }
  894. // .bgcolor1 {
  895. // background-color: #58efa9;
  896. // display: inline-block;
  897. // }
  898. // .bgcolor2 {
  899. // background-color: #ffa952;
  900. // display: inline-block;
  901. // }
  902. // .bgcolor3 {
  903. // background-color: #f94343;
  904. // display: inline-block;
  905. // }
  906. // .bgcolor4 {
  907. // background-color: #000000;
  908. // display: inline-block;
  909. // }
  910. }
  911. .text-grey {
  912. font-size: 28rpx !important;
  913. }
  914. .goods-info {
  915. padding-bottom: 150rpx;
  916. &-swiper {
  917. width: 100%;
  918. height: 560rpx;
  919. }
  920. &-play {
  921. left: 50%;
  922. bottom: 50%;
  923. transform: translate(-50%, 50%);
  924. }
  925. &-segmented-control {
  926. width: 200rpx;
  927. height: 50rpx;
  928. background: #fff;
  929. border-radius: 40rpx;
  930. left: 50%;
  931. bottom: 20rpx;
  932. transform: translateX(-50%);
  933. &-item {
  934. position: relative;
  935. z-index: 1;
  936. color: #000;
  937. font-size: 34rpx;
  938. transition: all 0.2s linear;
  939. &--active {
  940. color: #fff;
  941. }
  942. }
  943. &-bar {
  944. width: 50%;
  945. height: 100%;
  946. border-radius: 40rpx;
  947. position: absolute;
  948. background-color: $u-type-primary;
  949. z-index: 0;
  950. transition: all 0.2s linear;
  951. }
  952. }
  953. &-price {
  954. width: 714rpx;
  955. // height: 176rpx;
  956. margin: 20rpx auto 20rpx;
  957. border-radius: 14rpx;
  958. box-shadow: 0 3rpx 6rpx 0 rgba(0, 0, 0, 0.16);
  959. background-size: 100% 100%;
  960. display: flex;
  961. flex-direction: column;
  962. justify-content: center;
  963. &-box {
  964. color: #fff;
  965. margin-top: 34rpx;
  966. padding-left: 40rpx;
  967. font-size: 30rpx;
  968. text {
  969. font-size: 36rpx;
  970. }
  971. width: 100%;
  972. &-oldPrice {
  973. text-decoration: line-through;
  974. color: #fff;
  975. font-size: 24rpx !important;
  976. margin-left: 12rpx;
  977. }
  978. .text-grey {
  979. display: inline-block;
  980. float: right;
  981. flex: 1;
  982. margin-right: 20rpx;
  983. font-size: 28rpx !important;
  984. vertical-align: initial;
  985. }
  986. .grey_one {
  987. margin-top: 8rpx;
  988. }
  989. }
  990. .box_centter {
  991. // line-height: 176rpx;
  992. padding-top: 10rpx;
  993. // padding-left: 40rpx;
  994. margin-top: 0rpx;
  995. padding-right: 20rpx;
  996. }
  997. &-integral_centter {
  998. flex: 1;
  999. line-height: 176rpx;
  1000. padding-left: 20rpx;
  1001. padding-top: 0rpx;
  1002. font-size: 43rpx;
  1003. color: #fff;
  1004. display: flex;
  1005. justify-content: space-between;
  1006. .text-grey {
  1007. margin-right: 20rpx;
  1008. }
  1009. }
  1010. &-alt {
  1011. margin-left: 37rpx;
  1012. margin-top: 13rpx;
  1013. display: inline-block;
  1014. height: 61rpx;
  1015. border-radius: 30rpx;
  1016. text-align: center;
  1017. line-height: 52rpx;
  1018. padding: 0 17rpx;
  1019. background-color: #fff;
  1020. color: #DB0618;
  1021. box-sizing: border-box;
  1022. font-size: 24rpx;
  1023. border: 1px solid #DB0618;
  1024. }
  1025. }
  1026. &-footer {
  1027. box-sizing: border-box;
  1028. padding: 0 20rpx;
  1029. height: 130rpx;
  1030. background-color: #fff;
  1031. box-shadow: 0px 2rpx 16rpx 4px #d9d9d9;
  1032. .showCommtBox {
  1033. width: 100%;
  1034. position: fixed;
  1035. left: 0;
  1036. padding: 10rpx 0;
  1037. height: 60rpx;
  1038. background-color: #fff;
  1039. margin-bottom: 180rpx;
  1040. justify-content: space-around;
  1041. .input-commit {
  1042. // width: 640rpx;
  1043. flex: 1;
  1044. margin-left: 30rpx;
  1045. }
  1046. .send_commit_btn {
  1047. width: 120rpx;
  1048. height: 50rpx;
  1049. display: flex;
  1050. align-items: center;
  1051. justify-content: center;
  1052. margin-right: 30rpx;
  1053. background-color: #01AEEA;
  1054. color: #fff;
  1055. }
  1056. }
  1057. &-share {
  1058. padding: 0;
  1059. border: 0;
  1060. background: transparent;
  1061. line-height: unset;
  1062. &::after {
  1063. border: 0;
  1064. background: transparent;
  1065. }
  1066. }
  1067. &-icon {
  1068. width: 80rpx;
  1069. height: 80rpx;
  1070. margin-bottom: 10rpx;
  1071. }
  1072. .changeWidth {
  1073. /deep/.u-btn {
  1074. width: 488rpx;
  1075. height: 90rpx;
  1076. font-size: 32rpx;
  1077. }
  1078. }
  1079. .fontSize{
  1080. /deep/ .u-btn {
  1081. font-size: 36rpx;
  1082. }
  1083. }
  1084. .changeColor {
  1085. /deep/ .u-btn {
  1086. background-color: #F8B66A;
  1087. }
  1088. }
  1089. /deep/.u-btn {
  1090. width: 236rpx;
  1091. height: 90rpx;
  1092. font-size: 32rpx;
  1093. }
  1094. }
  1095. &-select-show {
  1096. width: 500rpx;
  1097. margin: 0 auto;
  1098. height: 50rpx;
  1099. display: flex;
  1100. justify-content: center;
  1101. align-items: center;
  1102. margin-bottom: 20rpx;
  1103. &-goods {
  1104. display: flex;
  1105. margin-left: 20rpx;
  1106. padding: 10rpx 20rpx;
  1107. border-radius: 10rpx;
  1108. }
  1109. &-comment {
  1110. display: flex;
  1111. margin-left: 20rpx;
  1112. padding: 10rpx 20rpx;
  1113. border-radius: 10rpx;
  1114. }
  1115. .selectactive {
  1116. background-color: #01AEEA;
  1117. color: #fff;
  1118. }
  1119. }
  1120. &-container {
  1121. padding: 0 20rpx;
  1122. margin-bottom: 40rpx;
  1123. &-params {
  1124. &-image {
  1125. width: 280rpx;
  1126. margin: 20rpx auto;
  1127. }
  1128. &-content {
  1129. padding: 0 10rpx;
  1130. &-left {
  1131. min-width: 5em;
  1132. }
  1133. }
  1134. }
  1135. }
  1136. .comment {
  1137. padding-bottom: 50rpx;
  1138. &-item {
  1139. margin-left: 20rpx;
  1140. margin-bottom: 20rpx;
  1141. &-user-info {
  1142. display: flex;
  1143. align-items: center;
  1144. &-userImg {
  1145. width: 100rpx;
  1146. height: 100rpx;
  1147. border-radius: 50%;
  1148. margin-right: 20rpx;
  1149. }
  1150. }
  1151. &-conter {}
  1152. }
  1153. }
  1154. &-other {
  1155. &-image {
  1156. width: 560rpx;
  1157. margin: 0 auto;
  1158. }
  1159. &-item {
  1160. padding: 0 20rpx;
  1161. }
  1162. }
  1163. &-doctor {
  1164. right: -2%;
  1165. width: 200rpx;
  1166. top: 70%;
  1167. transform: translateY(-50%);
  1168. }
  1169. }
  1170. .goods-info-doctor {
  1171. z-index: 1000;
  1172. }
  1173. .wechatBtn {
  1174. background: transparent;
  1175. border: 0;
  1176. padding: 0;
  1177. &::after {
  1178. background: transparent;
  1179. border: 0;
  1180. }
  1181. }
  1182. // 分享弹出框
  1183. .shareBox {
  1184. width: 100%;
  1185. height: 100%;
  1186. justify-content: space-around;
  1187. }
  1188. .imgwH {
  1189. width: 94rpx;
  1190. height: 94rpx;
  1191. padding: 0;
  1192. border: none;
  1193. border-radius: 50%;
  1194. background-color: #fff;
  1195. margin: 0;
  1196. }
  1197. .return_text {
  1198. width: fit-content;
  1199. // border: 1px solid #01AEEA;
  1200. // background-color: #fff;
  1201. // color: #01AEEA;
  1202. color: #000;
  1203. font-weight: bold;
  1204. border-radius: 6rpx;
  1205. font-size: 30rpx;
  1206. // padding: 6rpx 12rpx;
  1207. padding-left: 40rpx;
  1208. margin-bottom: 10rpx;
  1209. }
  1210. .return_text_1 {
  1211. color: #fff;
  1212. }
  1213. // 自定义提示
  1214. .showToastStyle {
  1215. position: fixed;
  1216. top: 0%;
  1217. left: 0%;
  1218. width: 100%;
  1219. height: 100%;
  1220. display: flex;
  1221. justify-content: center;
  1222. align-items: center;
  1223. color: #fff;
  1224. font-size: 24rpx;
  1225. .showToastText {
  1226. border-radius: 20rpx;
  1227. padding: 20rpx 40rpx;
  1228. background-color: rgba(0, 0, 0, 0.3);
  1229. }
  1230. }
  1231. // 返回首页
  1232. .showToBack {
  1233. position: fixed;
  1234. top: 45%;
  1235. left: 0;
  1236. padding: 10rpx 20rpx;
  1237. border-radius: 20rpx;
  1238. background-color: #01AEEA;
  1239. color: #fff;
  1240. font-size: 36rpx;
  1241. }
  1242. </style>