多租户商城-商户小程序端
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.

876 lines
24 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <!--
  2. * @FileDescription: sku选择器花呗拼团下单
  3. * @Author: kahu
  4. * @Date: 2022/11/7
  5. * @LastEditors: kahu
  6. * @LastEditTime: 2022/11/7
  7. -->
  8. <template>
  9. <div class="content">
  10. <u-popup
  11. v-model="goodsDetailShowFlag"
  12. mode="bottom"
  13. border-radius="60"
  14. >
  15. <view class="goosDetailshow-box">
  16. <view class="detailImg-box flex-row-plus">
  17. <image
  18. class="detailImg"
  19. :src="selectedSku.image"
  20. ></image>
  21. <view class="flex-column-plus mar-left-40">
  22. <view class="font-color-F54639">
  23. <label class="fs30 fs-bold">¥</label>
  24. <label
  25. class="fs30 fs-bold mar-left-5"
  26. v-text="selectedSku.activityType === 1 && btnType === 4 ? selectedSku['salePrice'] : selectedSku.price"
  27. ></label>
  28. </view>
  29. <label class="fs24 font-color-595B6B mar-top-10">{{$t('common.stocknum', {number:selectedSku.stockNumber})}}</label>
  30. <label class="fs24 font-color-595B6B mar-top-10">已选</label>
  31. </view>
  32. </view>
  33. <view class="color-box flex-column-plus">
  34. <view
  35. v-for="(skuRowItem,skuRowIndex) in productData['names']"
  36. :key="skuRowIndex"
  37. >
  38. <label
  39. class="fs26 font-color-333"
  40. v-if="skuRowItem['nameCode']"
  41. >{{ skuRowItem.skuName }}</label>
  42. <view class="colorName-box">
  43. <view
  44. class="pad-bot-30"
  45. v-for="(skuColItem, skuColIndex) in skuRowItem.values"
  46. :key="skuColIndex"
  47. >
  48. <view
  49. class="colorName"
  50. :class="{'colorName-on' : selectedAttr[skuRowItem['nameCode']] === skuColItem.valueCode}"
  51. @click="handleClickSkuItem(skuRowItem['nameCode'], skuColItem.valueCode)"
  52. >
  53. {{ skuColItem.skuValue }}
  54. </view>
  55. </view>
  56. </view>
  57. <scroll-view class="scroll-view_H" scroll-x="true">
  58. <view class="sku-box">
  59. <view class="sku-image-item">
  60. <image class="sku-image" :src="imageUrl"/>
  61. <label class="sku-name">浅绿色</label>
  62. </view>
  63. </view>
  64. <view class="sku-box">
  65. <view class="sku-image-item">
  66. <image class="sku-image-select" :src="imageUrl"/>
  67. <label class="sku-name">深灰色</label>
  68. </view>
  69. </view>
  70. <view class="sku-box">
  71. <view class="sku-image-item">
  72. <image class="sku-image" :src="imageUrl"/>
  73. <label class="sku-name">黄色</label>
  74. </view>
  75. </view>
  76. <view class="sku-box">
  77. <view class="sku-image-item">
  78. <image class="sku-image" :src="imageUrl"/>
  79. <label class="sku-name">蓝色</label>
  80. </view>
  81. </view>
  82. <view class="sku-box">
  83. <view class="sku-image-item">
  84. <image class="sku-image" :src="imageUrl"/>
  85. <label class="sku-name">军绿色</label>
  86. </view>
  87. </view>
  88. <view class="sku-box">
  89. <view class="sku-image-item">
  90. <image class="sku-image" :src="imageUrl"/>
  91. <label class="sku-name">黑色</label>
  92. </view>
  93. </view>
  94. <view class="sku-box">
  95. <view class="sku-image-item">
  96. <image class="sku-image" :src="imageUrl"/>
  97. <label class="sku-name">黑色1</label>
  98. </view>
  99. </view>
  100. <view class="sku-box">
  101. <view class="sku-image-item">
  102. <image class="sku-image" :src="imageUrl"/>
  103. <label class="sku-name">黑色2</label>
  104. </view>
  105. </view>
  106. </scroll-view>
  107. </view>
  108. </view>
  109. <view class="goodsNumCent">
  110. <view
  111. class="goodsNum-box flex-row-plus flex-sp-between"
  112. :class="{'bottom-line' :aliAgingObj.supportHanaUta}"
  113. >
  114. <label class="font-color-252744 fs28 fs-bold">数量</label>
  115. <view class="goodsNum">
  116. <image v-if="buyNum === 1" class="image-count-operate" @click="handleNumSub"
  117. src="https://wechat.hnthee.com/ceres-local-file/image/icon_cart_nosub.png"/>
  118. <image v-else @click="handleNumSub" class="image-count-operate" src="https://wechat.hnthee.com/ceres-local-file/image/icon_cart_sub.png"/>
  119. <view
  120. class="text-count-operate"
  121. v-model="buyNum"
  122. >{{ buyNum }}
  123. </view>
  124. <image class="image-count-operate" @click="handleNumAdd"
  125. src="https://wechat.hnthee.com/ceres-local-file/image/icon_cart_add.png"/>
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 花呗分期 -->
  130. <view
  131. class="huabei-box flex-column-plus"
  132. v-if="aliAgingObj.supportHanaUta"
  133. >
  134. <label class="font-color-999 fs24">花呗分期</label>
  135. <scroll-view
  136. class="fenqi-box"
  137. scroll-x="true"
  138. >
  139. <view
  140. class="huabei-item"
  141. :class="[{'fenqi-on' :aliAgingObj.selectIndex === 0},{'disabled' :aliAgingObj.disableSelectList[0]}]"
  142. @click="handleSelectAliAging(0)"
  143. >
  144. <label class="huabei-period">分3期(含手续费)</label>
  145. <label class="huabei-money">{{ aliAgingObj.agingMoneyList[0] }}/</label>
  146. </view>
  147. <view
  148. class="huabei-item"
  149. :class="[{'fenqi-on' :aliAgingObj.selectIndex === 1},{'disabled' :aliAgingObj.disableSelectList[1]}]"
  150. @click="handleSelectAliAging(1)"
  151. >
  152. <label class="huabei-period">分6期(含手续费)</label>
  153. <label class="huabei-money">{{ aliAgingObj.agingMoneyList[1] }}/</label>
  154. </view>
  155. <view
  156. class="huabei-item"
  157. :class="[{'fenqi-on' :aliAgingObj.selectIndex === 2},{'disabled' :aliAgingObj.disableSelectList[2]}]"
  158. @click="handleSelectAliAging(2)"
  159. >
  160. <label class="huabei-period">分12期(含手续费)</label>
  161. <label class="huabei-money">{{ aliAgingObj.agingMoneyList[2] }}/</label>
  162. </view>
  163. </scroll-view>
  164. </view>
  165. <view
  166. v-if="btnType===6"
  167. class="skuSelectBtn"
  168. >
  169. <view
  170. class="flex-row-plus offShelf"
  171. v-if="productData.shelveState === 0"
  172. >
  173. 商品已下架
  174. </view>
  175. <view
  176. class="flex-row-plus flex-items flex-sp-around"
  177. v-else-if="selectedSku.activityType === 1"
  178. >
  179. <view
  180. class="selectJoinShop selectBtn font-color-333"
  181. @click="handleBuyNow"
  182. >单独购买
  183. </view>
  184. <view
  185. class="selectBuyNow selectBtn font-color-FFEBC4"
  186. @click="handleBuyWithGroup(1)"
  187. >我要开团
  188. </view>
  189. </view>
  190. <view
  191. class="flex-row-plus flex-items flex-sp-around"
  192. v-else
  193. >
  194. <view
  195. class="selectJoinShop selectBtn font-color-333"
  196. @click="handleAddCart"
  197. >{{$t('common.addtocart')}}
  198. </view>
  199. <view
  200. class="selectBuyNow selectBtn font-color-FFEBC4"
  201. @click="handleBuyNow"
  202. >{{$t('common.buynow')}}
  203. </view>
  204. </view>
  205. </view>
  206. <view v-else>
  207. <view
  208. v-if="selectedSku.activityType === 1 && collageId !== 0"
  209. class="goosDetailbut-box flex-items-plus"
  210. :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
  211. >
  212. <view
  213. class="joinbuyBut"
  214. @click="handleBuyWithGroup(2)"
  215. >{{$t('common.sure')}}
  216. </view>
  217. </view>
  218. <view
  219. v-else-if="selectedSku.activityType === 1 && btnType === 3"
  220. class="goosDetailbut-box flex-row-plus"
  221. :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
  222. >
  223. <view
  224. class="buyNowBut"
  225. @click="handleBuyWithGroup(1)"
  226. >去拼团
  227. </view>
  228. </view>
  229. <view
  230. v-else
  231. class="goosDetailbut-box flex-row-plus"
  232. :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
  233. >
  234. <view
  235. v-if="btnType === 1"
  236. class="buyNowBut"
  237. @click="handleAddCart"
  238. >{{$t('common.sure')}}
  239. </view>
  240. <view
  241. v-else
  242. class="buyNowBut"
  243. @click="handleBuyNow(2)"
  244. >{{$t('common.sure')}}
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </u-popup>
  250. </div>
  251. </template>
  252. <script>
  253. import NET from "../../../utils/request";
  254. import API from "../../../config/api";
  255. export default {
  256. name: "GoodSkuSelect",
  257. data() {
  258. return {
  259. // 是否展示SKU弹窗
  260. goodsDetailShowFlag: false,
  261. // 已经选中的valueCode key => value names.nameCode=>values.valueCode 处理选中渲染
  262. selectedAttr: {},
  263. // 当前选中的skuMap对象(服务端数据)
  264. selectedSku: {},
  265. // 1加入购物车 2立即购买 3开团 4单独购买 6SKU选择
  266. btnType: 0,
  267. buyNum: 1,
  268. // 花呗对象
  269. aliAgingObj: {
  270. supportHanaUta: false,
  271. selectIndex: -1,
  272. disableSelectList: [true, true, true],
  273. agingMoneyList: ["0.00", "0.00", "0.00"]
  274. },
  275. imageUrl: 'http://122.9.152.120/ceres-local-file/file/2023/05/4237d7abe33d45a485a4b81c865e55bb_9344949001256.png'
  276. }
  277. },
  278. props: {
  279. productData: {
  280. type: Object,
  281. default: () => ({})
  282. },
  283. isIphone: {
  284. type: Boolean,
  285. default: () => false
  286. },
  287. collageId: {
  288. type: Number,
  289. default: () => 0
  290. }
  291. },
  292. methods: {
  293. /**
  294. * 当前SKU数量减少
  295. */
  296. handleNumSub() {
  297. if (this.buyNum > 1) {
  298. this.buyNum = this.buyNum - 1
  299. } else {
  300. uni.showToast({
  301. title: '亲!至少一件哦!',
  302. icon: "none"
  303. })
  304. }
  305. },
  306. /**
  307. * 当前SKU数量加
  308. */
  309. handleNumAdd() {
  310. if (this.buyNum < this.selectedSku.stockNumber) {
  311. this.buyNum = this.buyNum + 1
  312. } else {
  313. uni.showToast({
  314. title: this.$t('common.understock'),
  315. icon: "none"
  316. })
  317. }
  318. },
  319. /**
  320. * 根据skuId选择SKU
  321. * @param skuId SkuId
  322. */
  323. handleSelectBySkuId(skuId) {
  324. if (!skuId) return
  325. // 当前商品后端返回的所有sku的排列组合
  326. const allSkuValueGroupMap = this.productData.map
  327. for (const allSkuValueGroupMapKey in allSkuValueGroupMap) {
  328. if (parseInt(allSkuValueGroupMap[allSkuValueGroupMapKey].skuId) !== parseInt(skuId)) continue;
  329. this.selectedSku = allSkuValueGroupMap[allSkuValueGroupMapKey]
  330. this.echoFatherRowText(this.productData, this.selectedSku, this.buyNum)
  331. // 控制组件选中渲染
  332. const selectValueCodes = this.selectedSku['valueCodes'].split(',')
  333. for (const skuRow of this.productData.names) {
  334. for (const skuCol of skuRow.values) {
  335. if (!selectValueCodes.includes(skuCol['valueCode'])) continue;
  336. this.$set(this.selectedAttr, skuRow['nameCode'], skuCol['valueCode'])
  337. break; // 一行的sku只会有一个value
  338. }
  339. }
  340. }
  341. },
  342. /**
  343. * 点击sku的一项
  344. * @param nameCode SKU行的nameCode
  345. * @param valueCode SKU列的valueCode
  346. * nameCodeValueCodeClick
  347. */
  348. handleClickSkuItem(nameCode, valueCode) {
  349. // 当前选中
  350. this.$set(this.selectedAttr, nameCode, valueCode)
  351. // 获取到所有的sku的values.valueCode
  352. let values = []
  353. for (const key in this.selectedAttr) {
  354. values.push(this.selectedAttr[key])
  355. }
  356. // 当前选中的sku的key组合
  357. // 后端返回的productData.map中,排列组合了所有values[].valueCode的情况,使用逗号分隔
  358. const nowSelectSkuValueGroupKey = values.join(',') // 相较于allSkuValueGroupMap的key
  359. // 后端返回的所有sku组合(values.valueCode)
  360. const allSkuValueGroupMap = this.productData.map
  361. // 遍历后端数据
  362. for (const allSkuValueGroupMapKey in allSkuValueGroupMap) {
  363. // 当和当前选中的sku一致
  364. if (nowSelectSkuValueGroupKey === allSkuValueGroupMapKey) {
  365. this.selectedSku = allSkuValueGroupMap[allSkuValueGroupMapKey]
  366. this.echoFatherRowText(this.productData, this.selectedSku, this.buyNum)
  367. }
  368. }
  369. },
  370. /**
  371. * 回显父组件通讯
  372. * @param productData 当前商品对象
  373. * @param skuItem 当前选中的sku的后端数据
  374. * @param buyNum 当前sku购买数量
  375. */
  376. echoFatherRowText(productData, skuItem, buyNum) {
  377. // 获取到当前选中的sku的valueCode
  378. const currentSku = []
  379. // 取出所有的valueCode
  380. const nowSelectValueCodeList = skuItem['valueCodes'].split(',')
  381. const skuRows = productData.names
  382. for (const skuRow of skuRows) {
  383. const skuValues = skuRow.values
  384. for (const skuValue of skuValues) {
  385. if (!nowSelectValueCodeList.includes(skuValue.valueCode)) continue;
  386. const currentSkuItem = {skuText: ''}
  387. if (skuValue.valueCode === '单款项') {
  388. currentSkuItem['skuText'] = skuValue['skuValue']
  389. } else {
  390. currentSkuItem['skuText'] = `${ skuValue.skuName }:${ skuValue.skuValue }`
  391. }
  392. currentSku.push(currentSkuItem)
  393. break; // 只会对应一个value数据,找到就break减少循环
  394. }
  395. }
  396. this.$emit('getCurrentSku', {
  397. skuItem,
  398. currentSku,
  399. buyNum
  400. })
  401. // 选中sku之后,做一些相应的操作
  402. // postSelectSku依赖于getCurrentSku的数据
  403. this.$emit('postSelectSku')
  404. },
  405. //加入购物车
  406. async handleAddCart() {
  407. this.handleCheckIsLogin()
  408. if (this.selectedSku.stockNumber < 1) {
  409. return uni.showToast({
  410. title: this.$t('common.understock'),
  411. icon: "none"
  412. })
  413. }
  414. // uni.showLoading({
  415. // mask: true,
  416. // title: '添加中...',
  417. // })
  418. try {
  419. const postData = {
  420. skuId: this.selectedSku.skuId,
  421. number: this.buyNum,
  422. }
  423. await NET.request(API.ShoppingaddCart, postData, 'POST')
  424. // 埋点
  425. this.$store.dispatch('doPointer', {
  426. eventType: 2,
  427. productIds: this.productId
  428. })
  429. // 给购物车小图标赋值数量
  430. let newAllCartNum = uni.getStorageSync('allCartNum') + this.buyNum
  431. uni.setStorageSync('allCartNum', newAllCartNum)
  432. this.$emit('changeCartNum',newAllCartNum)
  433. uni.showToast({
  434. title: '添加成功',
  435. icon: 'none'
  436. })
  437. setTimeout(()=>{
  438. this.buyNum = 1
  439. this.goodsDetailShowFlag = false
  440. },2000)
  441. }finally {
  442. uni.hideLoading()
  443. }
  444. },
  445. /**
  446. * 立即购买下单
  447. */
  448. handleBuyNow() {
  449. this.handleCheckIsLogin()
  450. if (this.selectedSku.stockNumber < 1) {
  451. return uni.showToast({
  452. title: this.$t('common.understock'),
  453. icon: "none"
  454. })
  455. }
  456. if (this.buyNum > this.selectedSku.stockNumber && this.selectedSku.stockNumber !== 0) {
  457. return uni.showToast({
  458. title: '已超出最大数量限制',
  459. icon: "none"
  460. })
  461. }
  462. //组装后端数据
  463. let list = [{
  464. ifWork: 0,
  465. shopId: this.productData.shopId,
  466. shopName: this.productData.shopName,
  467. shopDiscountId: this.shopDiscountId > 0 ? this.shopDiscountId : null,
  468. shopSeckillId: this.shopSeckillId > 0 ? this.shopSeckillId : null,
  469. skus: [{
  470. productId: this.productData.productId,
  471. skuId: this.selectedSku.skuId,
  472. productName: this.productData.productName,
  473. image: this.selectedSku.image,
  474. price: this.selectedSku.price,
  475. weight: 0,
  476. number: this.buyNum,
  477. SKU: "",
  478. total: this.selectedSku.price * this.buyNum,
  479. ifLogistics: 1
  480. }]
  481. }]
  482. uni.setStorageSync('skuItemDTOList', list)
  483. this.buyNum = 1
  484. this.goodsDetailShowFlag = false
  485. uni.navigateTo({
  486. url: '../orderModule/orderConfirm?type=1',
  487. })
  488. },
  489. /**
  490. * 拼团下单
  491. * @param type 1单独开团2拼团
  492. */
  493. handleBuyWithGroup(type) {
  494. this.handleCheckIsLogin()
  495. if (this.selectedSku.stockNumber < 1) {
  496. return uni.showToast({
  497. title: this.$t('common.understock'),
  498. icon: "none"
  499. })
  500. }
  501. const data = {
  502. number: this.buyNum,
  503. productId: this.productId,
  504. shopId: this.shopId,
  505. skuId: this.selectedSku.skuId,
  506. shopGroupWorkId: this.selectedSku.shopGroupWorkId,
  507. type: type
  508. }
  509. if (type !== 1) {
  510. data.collageId = this.collageId
  511. }
  512. uni.removeStorageSync("skuItemDTOList")
  513. uni.setStorageSync('skuItemList', data)
  514. this.goodsDetailShowFlag = false
  515. this.buyNum = 1
  516. uni.navigateTo({
  517. url: '../orderModule/orderConfirm?type=1',
  518. })
  519. },
  520. /**
  521. * 是否登录
  522. * @return {boolean|void}
  523. */
  524. handleCheckIsLogin() {
  525. const userInfo = uni.getStorageSync('storage_key')
  526. if (!userInfo || (userInfo && JSON.stringify(userInfo) === '{}')) {
  527. return uni.navigateTo({
  528. url: '../../pages_category_page2/userModule/login'
  529. })
  530. }
  531. return true
  532. },
  533. /**
  534. * 选择分期
  535. * @param index 0:3 1:6 2:12
  536. */
  537. handleSelectAliAging(index) {
  538. const aliAgingObj = this.aliAgingObj
  539. if (aliAgingObj.selectIndex !== index && !aliAgingObj.disableSelectList[index]) {
  540. aliAgingObj.selectIndex = index;
  541. } else {
  542. aliAgingObj.selectIndex = -1;
  543. }
  544. },
  545. /**
  546. * 渲染是否支持花呗
  547. * @param productData 当前商品
  548. * @param skuPrice:number 选中SKU的价格
  549. */
  550. handleRenderAliAging(productData, skuPrice) {
  551. if (productData.ifHuabei !== 1) return
  552. const aliAgingObj = this.aliAgingObj
  553. if (skuPrice && skuPrice >= 0.03) {
  554. aliAgingObj.supportHanaUta = true
  555. aliAgingObj.disableSelectList[0] = false;
  556. aliAgingObj.agingMoneyList[0] = (parseInt((skuPrice / 3 * 100) / 100 + '')).toFixed(2) + ""
  557. }
  558. if (skuPrice && skuPrice >= 0.06) {
  559. aliAgingObj.supportHanaUta = false;
  560. aliAgingObj.disableSelectList[1] = false;
  561. aliAgingObj.agingMoneyList[1] = (parseInt((skuPrice / 6 * 100) / 100 + '')).toFixed(2) + ""
  562. }
  563. if (skuPrice && skuPrice >= 0.12) {
  564. aliAgingObj.supportHanaUta = true;
  565. aliAgingObj.disableSelectList[2] = false;
  566. aliAgingObj.agingMoneyList[2] = (parseInt((skuPrice / 12 * 100) / 100 + '')).toFixed(2) + ""
  567. }
  568. },
  569. }
  570. }
  571. </script>
  572. <style
  573. lang="scss"
  574. scoped
  575. >
  576. .goosDetailshow-box {
  577. margin-bottom: -5upx;
  578. .detailImg-box {
  579. margin-top: 30upx;
  580. margin-left: 30upx;
  581. border-bottom: 1upx solid #EDEDED;
  582. padding-bottom: 20upx;
  583. width: 690upx;
  584. .detailImg {
  585. width: 140upx;
  586. height: 140upx;
  587. border-radius: 20rpx;
  588. }
  589. }
  590. .color-box {
  591. padding: 30rpx 30rpx;
  592. width: 100%;
  593. .colorName-box {
  594. display: flex;
  595. flex-wrap: wrap;
  596. flex-direction: row;
  597. justify-content: flex-start;
  598. align-items: center;
  599. margin-top: 30upx;
  600. margin-left: -30upx;
  601. .colorName {
  602. background-color: #FFFFFF;
  603. margin-left: 30upx;
  604. padding: 10upx 32upx;
  605. font-size: 26upx;
  606. border: 2rpx solid #E4E5E6;
  607. z-index: 2;
  608. color: #333333;
  609. }
  610. .colorName-on {
  611. box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
  612. color: #C5AA7B;
  613. margin-left: 30upx;
  614. padding: 10upx 32upx;
  615. font-size: 26upx;
  616. text-align: center;
  617. z-index: 1;
  618. border: none;
  619. }
  620. }
  621. }
  622. .modelNum-box {
  623. padding: 30upx 30upx;
  624. border-bottom: 1upx solid #EDEDED;
  625. width: 690upx;
  626. .modelNumName-box {
  627. display: flex;
  628. flex-wrap: wrap;
  629. flex-direction: row;
  630. justify-content: flex-start;
  631. align-items: center;
  632. margin-top: 30upx;
  633. margin-left: -30upx;
  634. .modelNumName-on {
  635. background-color: #FFE4D0;
  636. color: #FF7800;
  637. margin-left: 30upx;
  638. padding: 10upx 32upx;
  639. border-radius: 28upx;
  640. border: 1upx solid #FF7800;
  641. font-size: 26upx;
  642. text-align: center;
  643. }
  644. .modelNumName {
  645. background-color: #F5F5F5;
  646. margin-left: 30upx;
  647. padding: 10upx 32upx;
  648. border-radius: 28upx;
  649. font-size: 26upx;
  650. }
  651. }
  652. }
  653. .goodsNumCent {
  654. padding: 0 30upx;
  655. .goodsNum-box {
  656. width: 100%;
  657. padding: 30rpx 0 180rpx 0;
  658. //border-top: 2rpx solid #EDEDED;
  659. .goodsNum {
  660. height: 50upx;
  661. display: flex;
  662. align-items: center;
  663. .item {
  664. width: 50upx;
  665. height: 50upx;
  666. line-height: 48rpx;
  667. border: 1upx solid #999999;
  668. text-align: center;
  669. }
  670. .subtract {
  671. border-right: 0upx;
  672. }
  673. .goodsNumber {
  674. line-height: 50rpx;
  675. }
  676. .add {
  677. border-left: 0upx;
  678. }
  679. }
  680. }
  681. }
  682. .image-count-operate{
  683. width: 40rpx;
  684. height: 40rpx;
  685. }
  686. .text-count-operate{
  687. width: 60rpx;
  688. text-align: center;
  689. font-size: 28rpx;
  690. color: #252744;
  691. font-weight: 400;
  692. }
  693. .bottom-line {
  694. border-bottom: 1upx solid #EDEDED;
  695. }
  696. .huabei-box {
  697. padding: 30upx 30upx;
  698. width: 690upx;
  699. .fenqi-box {
  700. margin-top: 15upx;
  701. width: 120%;
  702. .huabei-item {
  703. display: inline-block;
  704. background: #f3f3f3;
  705. padding: 16upx 24upx;
  706. margin: 5upx 10upx;
  707. border-radius: 15upx;
  708. text-align: center;
  709. font-size: 7upx;
  710. .huabei-period {
  711. display: block;
  712. }
  713. }
  714. .fenqi-on {
  715. border: 1px solid #EF7F93;
  716. color: #EF7F93;
  717. }
  718. .disabled {
  719. color: #cacaca;
  720. }
  721. }
  722. }
  723. .goosDetailbut-box {
  724. justify-content: center;
  725. .joinShopCartBut {
  726. width: 343upx;
  727. height: 80upx;
  728. border-radius: 40upx 0 0 40upx;
  729. background-color: #FFC300;
  730. color: #FFFEFE;
  731. font-size: 28upx;
  732. line-height: 80upx;
  733. text-align: center;
  734. margin-left: 30upx;
  735. }
  736. .buyNowBut {
  737. width: 90%;
  738. height: 90upx;
  739. background: linear-gradient(-10deg, #252744, #484A66);
  740. font-size: 32rpx;
  741. line-height: 90upx;
  742. text-align: center;
  743. color: #FFFFFF;
  744. border-radius: 50rpx;
  745. }
  746. }
  747. }
  748. .skuSelectBtn {
  749. padding-bottom: 30rpx;
  750. .selectBtn {
  751. width: 342rpx;
  752. height: 88rpx;
  753. line-height: 88rpx;
  754. color: #252744;
  755. text-align: center;
  756. border: 1px solid #252744;
  757. font-size: 32rpx;
  758. border-radius: 50rpx;
  759. }
  760. .selectBuyNow {
  761. color: #FFFFFF;
  762. background: linear-gradient(-10deg, #252744, #484A66);
  763. }
  764. }
  765. .couponItemimg {
  766. width: 150upx;
  767. height: 60upx;
  768. }
  769. .joinbuyBut {
  770. width: 190upx;
  771. height: 80upx;
  772. background: #333333;
  773. color: #FFEBC4;
  774. font-size: 28upx;
  775. line-height: 80upx;
  776. text-align: center;
  777. margin-left: 30upx;
  778. }
  779. .sku-box{
  780. display: inline-block;
  781. }
  782. .sku-image-item{
  783. display: flex;
  784. flex-direction: column;
  785. align-items: center;
  786. margin-right: 30rpx;
  787. .sku-image{
  788. width: 86rpx;
  789. height: 86rpx;
  790. border: 2px solid #D3D4DE;
  791. border-radius: 20rpx;
  792. }
  793. .sku-image-select{
  794. width: 86rpx;
  795. height: 86rpx;
  796. border: 2px solid #252744;
  797. border-radius: 20rpx;
  798. margin-right: 30rpx;
  799. }
  800. .sku-name{
  801. font-size: 24rpx;
  802. color: #595B6B;
  803. margin-top: 8rpx;
  804. }
  805. }
  806. .scroll-view_H {
  807. white-space: nowrap;
  808. width: 100%;
  809. }
  810. </style>