CommodityInfo.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. <template>
  2. <div>
  3. <div class="menu-com row">
  4. <div class="menu-title col-md-12">
  5. <nuxt-link to="/">商城首页</nuxt-link> >
  6. <nuxt-link to="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</nuxt-link>
  7. <nuxt-link to="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</nuxt-link>
  8. <nuxt-link :to="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</nuxt-link>
  9. >
  10. <span v-if="storeInfo.type != 'CONSIGNMENT'"><nuxt-link :to="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">storeInfo.storeName</nuxt-link>> </span>
  11. <span>产品详情</span>
  12. </div>
  13. </div>
  14. <div id="commodity-info-fragment">
  15. <div class="commodity-detail">
  16. <div class="img">
  17. <img src="/images/floor/specificPrice-store.png" alt="" class="specific-price" v-if="isConsignment && isSpecificPriceTag(commodity.tag)">
  18. <img :src="commodity.img || '/images/store/common/default.png'" style="width: 256px;height: 256px;"/>
  19. <div class="box">
  20. <img v-if="commodity.status === 602" src="/images/store/isSellOut.png" alt="">
  21. </div>
  22. </div>
  23. <div class="content">
  24. <div class="code">
  25. <span v-text="commodity.code"></span>
  26. </div>
  27. <div class="commodity-info-detail">
  28. <div class="com-info">
  29. <span class="name">价&nbsp;格</span>:
  30. <span class="money">
  31. <span v-if="fragment.currency == 'RMB'">¥</span>
  32. <span v-if="fragment.currency == 'USD'">$</span>
  33. <span>{{fragment.price | currency}}</span>
  34. </span>
  35. </div>
  36. <div class="com-info">
  37. <span class="name">品&nbsp;牌</span>:<span v-text="commodity.brandNameEn"></span>
  38. </div>
  39. <div class="com-info">
  40. <span class="name">类&nbsp;目</span>:<span v-text="commodity.kindNameCn"></span>
  41. </div>
  42. <div class="com-info">
  43. <span class="name">下&nbsp;载</span>:<a @click="toAttach(component.attach)" v-if="component.attach">规格书</a><span v-if="!component.attach">暂无信息</span>
  44. </div>
  45. <div class="com-info">
  46. <span class="name">包&nbsp;装</span>:<span v-text="commodity.packaging || '无包装信息'"></span>
  47. </div>
  48. <div class="com-info">
  49. <span class="name" style="letter-spacing: 1px;">最小包装数</span>:<span v-text="commodity.minPackQty || '无最小包装数信息'"></span>
  50. </div>
  51. <div class="com-info">
  52. <span class="name">规&nbsp;格</span>:<span v-text="commodity.spec || '无规格信息'"></span>
  53. </div>
  54. <div class="com-info">
  55. <span class="name">库&nbsp;存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
  56. (<span v-text="commodity.minBuyQty || 1"></span>个起订)
  57. <span :class="commodity.breakUp?'div-sell can-div-sell':'div-sell not-div-sell'" v-if="commodity.breakUp">可拆卖</span>
  58. </div>
  59. <div class="com-info">
  60. <span class="name">交&nbsp;期</span>:
  61. <div class="delivery">
  62. <span v-text="commodity.b2cMinDelivery || 0"></span>
  63. <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
  64. <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery" v-text="commodity.b2cMaxDelivery || 0"></span>
  65. <span>(天)</span>
  66. </div>
  67. </div>
  68. <div class="com-info form-inline" v-if="commodity.status !== 602 && commodity.status !== 612">
  69. <span class="name">数&nbsp;量</span>:
  70. <div class="input-group" style="width: 120px">
  71. <div :class="fragment.canSub ? ' input-group-addon operate':'input-group-addon'" @click="fragment.canSub ?subNum():''" :style="!fragment.canSub ?'cursor: not-allowed;':''">-</div>
  72. <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()" @input="onInput()" style="padding: 0;min-width: 100px;text-align: center;"/>
  73. <div :class="fragment.canAdd ?'input-group-addon operate':'input-group-addon'" @click="fragment.canAdd ?addNum():''" :style="!fragment.canAdd ?'cursor: not-allowed;':''">+</div>
  74. <!-- <div class="input-group-addon operate" @click="subNum()">-</div>
  75. <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"style="padding: 0;min-width: 100px;text-align: center;"/>
  76. <div class="input-group-addon operate" @click="addNum()">+</div>-->
  77. </div>
  78. ×
  79. <!--<div class="select">
  80. <select class="form-control" :disabled="commodity.currencyName != 'RMB-USD'" v-model="fragment.currency" @change="changeCurrency()">
  81. <option value="RMB">RMB</option>
  82. <option value="USD">USD</option>
  83. </select>
  84. </div>-->
  85. <div class="select">
  86. <span v-if="fragment.currency == 'RMB'">¥</span>
  87. <span v-if="fragment.currency == 'USD'">$</span>
  88. <span>{{(fragment.price || 0) | currency}}</span>
  89. <span v-if="fragment.currency == 'RMB'" class="tax"> ( 含税 ) </span>
  90. </div>
  91. <span class="money">
  92. <span v-if="fragment.currency == 'RMB'">¥</span>
  93. <span v-if="fragment.currency == 'USD'">$</span>
  94. <span>{{(calculate || 0) | currency}}</span>
  95. </span>
  96. </div>
  97. <div class="button" v-if="commodity.status !== 602 && commodity.status !== 612">
  98. <button class="btn btn-default btn-primary" @click="buyNow(false, commodity)">加入购物车</button>
  99. <button class="btn btn-default btn-now" @click="buyNow(true, commodity)">立即购买</button>
  100. </div>
  101. <div class="warn-area" v-if="commodity.status === 602 || commodity.status === 612" v-text="commodity.status === 602 ? '此产品已售罄':'此产品已下架'"></div>
  102. </div>
  103. <div class="price-block">
  104. <div class="commodity-price">
  105. <div class="title">价格梯度</div>
  106. <div class="table">
  107. <div class="head">
  108. <div class="fragment">梯度/pcs</div>
  109. <div class="price">单价¥(含税)</div>
  110. <div class="price">单价$</div>
  111. </div>
  112. <ul class="list-unstyled list-inline">
  113. <li v-for="price in commodity.prices">
  114. <div class="fragment">
  115. <span v-text="price.start"></span>+
  116. </div>
  117. <div class="price">
  118. <span v-if="price.rMBPrice">{{price.rMBPrice || 0 | currency}}</span>
  119. </div>
  120. <div class="price">
  121. <span v-if="price.uSDPrice">{{price.uSDPrice || 0 | currency}}</span>
  122. </div>
  123. </li>
  124. </ul>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </template>
  133. <script>
  134. function initFragment (commodity) {
  135. if (!commodity) {
  136. return {}
  137. }
  138. let fragment = {}
  139. let prices = commodity.prices[0]
  140. fragment.num = commodity.minBuyQty
  141. fragment.prices = prices
  142. if (commodity.currencyName !== 'USD') {
  143. fragment.currency = 'RMB'
  144. } else {
  145. fragment.currency = 'USD'
  146. }
  147. if (fragment.currency !== 'USD') {
  148. fragment.price = prices.rMBPrice
  149. } else {
  150. fragment.price = prices.uSDPrice
  151. }
  152. fragment.canAdd = true
  153. fragment.canSub = false
  154. return fragment
  155. }
  156. function getFragment (commodity, fragment) {
  157. // 判断是否小于第一分段的起订量
  158. if (commodity.prices[0].start > fragment.num) {
  159. fragment.num = commodity.prices[0].start
  160. }
  161. // 获取分段的信息
  162. let prices = commodity.prices
  163. for (let i = 0; i < prices.length; i++) {
  164. if (fragment.num <= prices[i].end) {
  165. fragment.prices = prices[i]
  166. break
  167. }
  168. }
  169. }
  170. import { enidfilter } from '~utils/baseUtils'
  171. export default {
  172. name: 'commodity-info',
  173. data () {
  174. return {
  175. fragment: {
  176. currency: 'RMB',
  177. num: 0,
  178. price: 0,
  179. canAdd: true,
  180. canSub: true}
  181. }
  182. },
  183. watch: {
  184. fragment: function (val, oldVal) {
  185. }
  186. },
  187. filters: {
  188. currency: function (num) {
  189. if (typeof num === 'number' && num > 0) {
  190. if (num <= 0.000001) {
  191. num = 0.000001
  192. } else {
  193. if (num.toString().indexOf('.') === -1) {
  194. num += '.00'
  195. } else {
  196. let inputStr = num.toString()
  197. let arr = inputStr.split('.')
  198. let floatNum = arr[1]
  199. if (floatNum.length > 6) {
  200. num = inputStr.substring(0, arr[0].length + 7)
  201. if (Number(floatNum.charAt(6)) > 4) {
  202. num = (Number(num) * 1000000 + 1) / 1000000
  203. }
  204. } else if (floatNum.length === 1) {
  205. num = num + '0'
  206. }
  207. }
  208. }
  209. }
  210. return num
  211. }
  212. },
  213. computed: {
  214. storeInfo () {
  215. return this.$store.state.shop.storeInfo.store.data
  216. },
  217. commodity () {
  218. console.log('commodity', this.$store.state.shop.storeInfo.commodity.data)
  219. let commodity = this.$store.state.shop.storeInfo.commodity.data
  220. this.fragment = initFragment(commodity)
  221. return commodity
  222. },
  223. component () {
  224. return this.$store.state.shop.storeInfo.component.data
  225. },
  226. calculate () {
  227. this.fragment.total = this.fragment.price * Math.pow(10, 6) * this.fragment.num
  228. return Math.ceil(this.fragment.total) / Math.pow(10, 6)
  229. },
  230. user () {
  231. return this.$store.state.option.user
  232. },
  233. isConsignment () {
  234. return this.storeInfo.type === 'CONSIGNMENT'
  235. }
  236. },
  237. mounted () {
  238. this.$nextTick(() => {
  239. this.loadSaveHistory()
  240. })
  241. },
  242. methods: {
  243. isSpecificPriceTag: function (tag) {
  244. return tag && tag.indexOf('特价') !== -1
  245. },
  246. onInput () {
  247. let prices = this.commodity.prices
  248. if (prices && prices.length) {
  249. let _this = this
  250. for (let i = 0; i < prices.length; i++) {
  251. if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
  252. _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
  253. break
  254. }
  255. }
  256. }
  257. },
  258. loadSaveHistory () {
  259. if (this.user.logged) {
  260. this.$store.dispatch('shop/saveHistory', {id: this.commodity.batchCode})
  261. }
  262. },
  263. changeCurrency () {
  264. if (this.fragment.currency === 'RMB') {
  265. this.fragment.price = this.fragment.prices.rMBPrice
  266. } else if (this.fragment.currency === 'USD') {
  267. this.fragment.price = this.fragment.prices.uSDPrice
  268. }
  269. },
  270. changeNum: function (newNum) {
  271. let pack = this.commodity.perQty || this.commodity.minPackQty
  272. let buy = this.commodity.minBuyQty
  273. let reserve = this.commodity.reserve
  274. let breakUp = this.commodity.breakUp
  275. if (!newNum) {
  276. this.fragment.num = buy
  277. } else {
  278. newNum = parseInt(newNum)
  279. if (breakUp) {
  280. if (newNum < buy) {
  281. this.$message.error('最小起订量为' + buy)
  282. this.fragment.num = buy
  283. this.fragment.canSub = false
  284. this.fragment.canAdd = true
  285. } else if (newNum > reserve) {
  286. this.$message.error('库存不足')
  287. this.fragment.num = reserve
  288. this.fragment.canAdd = false
  289. this.fragment.canSub = true
  290. } else {
  291. this.fragment.canSub = true
  292. this.fragment.canAdd = true
  293. this.fragment.num = newNum
  294. newNum === buy && (this.fragment.canSub = false)
  295. newNum === reserve && (this.fragment.canAdd = false)
  296. }
  297. } else {
  298. if (newNum < buy) {
  299. this.$message.error('最小起订量为' + buy)
  300. this.fragment.num = buy
  301. this.fragment.canSub = false
  302. if (newNum > reserve) {
  303. this.$message.error('库存不足')
  304. this.fragment.num = reserve - (reserve % pack)
  305. this.fragment.canAdd = false
  306. }
  307. } else if (newNum > reserve) {
  308. this.fragment.canSub = true
  309. this.fragment.canAdd = false
  310. this.$message.error('库存不足')
  311. this.fragment.num = reserve - (reserve % pack)
  312. } else {
  313. this.fragment.canSub = true
  314. this.fragment.canAdd = true
  315. let remainder = newNum % pack
  316. if (remainder !== 0) {
  317. // console.log(this.fragment.num)
  318. this.$message.error('不支持拆包且包装量为' + pack)
  319. // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
  320. let res = (Math.floor(newNum / pack) + 1) * pack
  321. this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
  322. } else {
  323. this.fragment.num = newNum
  324. }
  325. newNum === buy && (this.fragment.canSub = false)
  326. newNum === reserve && (this.fragment.canAdd = false)
  327. }
  328. }
  329. }
  330. },
  331. subNum () {
  332. let pack = this.commodity.perQty || this.commodity.minPackQty
  333. let newNum = 0
  334. if (this.commodity.breakUp) {
  335. newNum = this.fragment.num - 1
  336. } else {
  337. newNum = this.fragment.num - pack
  338. }
  339. this.changeNum(newNum)
  340. getFragment(this.commodity, this.fragment)
  341. this.onInput()
  342. },
  343. addNum () {
  344. let pack = this.commodity.perQty || this.commodity.minPackQty
  345. let newNum = 0
  346. if (this.commodity.breakUp) {
  347. newNum = this.fragment.num + 1
  348. } else {
  349. newNum = this.fragment.num + pack
  350. }
  351. this.changeNum(newNum)
  352. getFragment(this.commodity, this.fragment)
  353. this.onInput()
  354. },
  355. inputNum () {
  356. if ((/^[\d]*$/).test(this.fragment.num)) {
  357. this.changeNum(this.fragment.num)
  358. getFragment(this.commodity, this.fragment)
  359. } else {
  360. this.$message.error('请输入整数')
  361. this.fragment.num = this.commodity.minBuyQty
  362. }
  363. },
  364. buyNow: function (isBuy, item) {
  365. if (!this.$store.state.option.user.logged) {
  366. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  367. if (response.data) {
  368. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  369. }
  370. })
  371. } else {
  372. if (item) {
  373. if (isBuy) {
  374. this.$http.post('/trade/order/buyNow', [{
  375. uuid: item.uuid,
  376. batchCode: item.batchCode,
  377. number: this.fragment.num,
  378. storeid: item.storeid,
  379. storeUuid: item.storeid,
  380. currencyName: item.currencyName,
  381. minPackQty: item.minPackQty
  382. }])
  383. .then(response => {
  384. if (response.data.success) {
  385. if (response.data.message) {
  386. this.$message({
  387. message: response.data.message,
  388. type: 'success'
  389. })
  390. window.setTimeout(function () {
  391. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  392. }, 1000)
  393. } else {
  394. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  395. }
  396. } else {
  397. if (response.data.data && response.data.data.unvailable === 1) {
  398. this.$message.error('产品信息已失效,请刷新界面')
  399. } else {
  400. this.$message.error(response.data.message)
  401. }
  402. }
  403. }, err => {
  404. console.log(err)
  405. if (item.minBuyQty > item.reserve) {
  406. this.$message.error('商品' + item.code + '的库存已经不满足最小起订量')
  407. }
  408. })
  409. } else {
  410. // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
  411. this.$http.post('/trade/cart/add', {
  412. uuid: item.uuid,
  413. batchCode: item.batchCode,
  414. number: this.fragment.num,
  415. storeid: item.storeid,
  416. storeUuid: item.storeid,
  417. currencyName: item.currencyName,
  418. minPackQty: item.minPackQty
  419. })
  420. .then(response => {
  421. if (response.data.success) {
  422. if (response.data.message) {
  423. this.$message({
  424. message: '添加购物车成功,但商品信息有更新',
  425. type: 'success'
  426. })
  427. } else {
  428. this.$message({
  429. message: '添加购物车成功',
  430. type: 'success'
  431. })
  432. }
  433. } else {
  434. if (response.data.code === 2) {
  435. this.$message.error(response.data.message + ',请刷新页面')
  436. } else {
  437. this.$message.error(response.data.message)
  438. }
  439. }
  440. })
  441. }
  442. }
  443. }
  444. },
  445. toAttach: function (url) {
  446. if (this.user.logged) {
  447. if (url && url !== '1') {
  448. window.open(url)
  449. } else {
  450. this.$message.error('规格书地址错误')
  451. }
  452. } else {
  453. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  454. if (response.data) {
  455. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  456. }
  457. })
  458. }
  459. }
  460. }
  461. }
  462. </script>
  463. <style scoped>
  464. .container.commodity {
  465. width: 1190px;
  466. padding-left: 0;
  467. padding-right: 0;
  468. }
  469. .commodity .commodity-detail {
  470. width: 100%;
  471. display: inline-block;
  472. font-size: 0;
  473. }
  474. .commodity-detail .img{
  475. float: left;
  476. width: 258px;
  477. height: 320px;
  478. position: relative;
  479. }
  480. .commodity-detail .img >img {
  481. border: 1px solid #D6D3CE;
  482. }
  483. .commodity-detail .img .specific-price {
  484. position: absolute;
  485. left: 0;
  486. top: 0;
  487. border: none;
  488. }
  489. .commodity-detail .img .box {
  490. height: 62px;
  491. position: relative;
  492. }
  493. .commodity-detail .img .box img {
  494. position: absolute;
  495. right: 3px;
  496. bottom: 64px;
  497. }
  498. .commodity-detail .content {
  499. width: 932px;
  500. float: left;
  501. font-size: 14px;
  502. }
  503. .commodity-detail .content {
  504. padding-left: 20px;
  505. }
  506. .commodity-detail .content .code {
  507. font-size: 24px;
  508. color: rgb(50, 50, 50);
  509. font-weight: 600;
  510. border-bottom: 1px solid #D6D3CE;
  511. line-height: 40px;
  512. }
  513. .commodity-detail .content .com-info {
  514. font-size: 14px;
  515. line-height: 26px;
  516. }
  517. .commodity-detail .content .com-info em {
  518. font-size: 14px;
  519. line-height: 26px;
  520. font-style: normal;
  521. }
  522. .input-group .input-group-operate {
  523. padding: 6px 12px;
  524. font-size: 14px;
  525. font-weight: 400;
  526. line-height: 1;
  527. color: #555;
  528. text-align: center;
  529. background-color: #eee;
  530. border: 1px solid #ccc;
  531. border-radius: 4px;
  532. }
  533. .input-group .input-group-operate:last-child {
  534. border-bottom-left-radius: 0;
  535. border-top-left-radius: 0;
  536. }
  537. .input-group .input-group-operate:first-child {
  538. border-bottom-right-radius: 0;
  539. border-top-right-radius: 0;
  540. }
  541. .content .com-info .name {
  542. letter-spacing: 15px;
  543. }
  544. .content .com-info a{
  545. color: #1162a4;
  546. }
  547. .content .com-info:hover a{
  548. color: #23527c;
  549. }
  550. .content .warn-area {
  551. font-size: 16px;
  552. font-weight: bold;
  553. color: #333;
  554. margin-top: 15px;
  555. }
  556. .commodity-info-detail {
  557. float: left;
  558. padding-top: 10px;
  559. width: 582px;
  560. }
  561. .price-block {
  562. float: right;
  563. width: 330px;
  564. margin-top: 10px;
  565. height: 220px;
  566. }
  567. .commodity-price {
  568. line-height: 30px;
  569. text-align: center;
  570. border: 1px solid #D6D3CE;
  571. }
  572. .commodity-price .title {
  573. background-color: #f7f7f7;
  574. border-bottom: 1px solid #D6D3CE;
  575. }
  576. .commodity-price .head {
  577. border-bottom: 1px solid #D6D3CE;
  578. }
  579. .commodity-price .fragment {
  580. display: inline-block;
  581. width: 70px;
  582. }
  583. .commodity-price .price {
  584. width: 123px;
  585. display: inline-block;
  586. }
  587. .com-info div.select {
  588. display: inline-block;
  589. font-weight: 600;
  590. color: red;
  591. font-size: 14px;
  592. }
  593. .com-info div.select .tax {
  594. font-weight: normal;
  595. color: black;
  596. font-size: 12px;
  597. }
  598. .com-info .operate {
  599. cursor: pointer;
  600. }
  601. .com-info .operate:hover, .com-info .operate:link {
  602. background-color: #00B83F;
  603. color: white;
  604. }
  605. .com-info .money {
  606. font-weight: 600;
  607. color: red;
  608. font-size: 14px;
  609. }
  610. .com-info select {
  611. border-radius: 4px;
  612. width: 120px!important;
  613. }
  614. ul.list-inline {
  615. margin: 0;
  616. }
  617. .commodity-price ul.list-inline li {
  618. padding-left: 0;
  619. padding-right: 0;
  620. border-bottom: 1px dashed #D6D3CE;
  621. }
  622. .commodity-price .table {
  623. margin-bottom: 0;
  624. }
  625. .commodity-price ul>li:last-child {
  626. border-bottom: none;
  627. }
  628. div.button {
  629. padding-top: 20px;
  630. float: left;
  631. }
  632. button.btn-now {
  633. border: 1px solid #3D76C6;
  634. color: #3D76C6;
  635. margin-left: 30px;
  636. }
  637. .com-info .delivery {
  638. display: inline;
  639. }
  640. #commodity-info-fragment{
  641. margin-bottom: 20px;
  642. }
  643. .commodity-detail .content .com-info .div-sell {
  644. font-size: 12px;
  645. height: 16px;
  646. line-height: 16px;
  647. color: #fff;
  648. padding: 0 5px;
  649. display: inline-block;
  650. position: relative;
  651. }
  652. .commodity-detail .content .com-info .can-div-sell {
  653. background: #5078cb;
  654. }
  655. .commodity-detail .content .com-info .not-div-sell {
  656. background: #fc8200;
  657. }
  658. .commodity-detail .content .com-info .can-div-sell:before {
  659. content: '';
  660. position: absolute;
  661. left: -8px;
  662. top: 10px;
  663. border-left: 8px solid transparent;
  664. border-bottom: 6px solid #5078cb;
  665. }
  666. .commodity-detail .content .com-info .not-div-sell:before {
  667. content: '';
  668. position: absolute;
  669. left: -8px;
  670. top: 10px;
  671. border-left: 8px solid transparent;
  672. border-bottom: 6px solid #fc8200;
  673. }
  674. </style>