CommodityInfo.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  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">规&nbsp;格</span>:<span v-text="commodity.spec || '无规格信息'"></span>
  50. </div>
  51. <div class="com-info">
  52. <span class="name" style="letter-spacing: 1.5px;">最小包装数</span>:<span v-text="commodity.minPackQty || '无最小包装数信息'"></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. let commodity = this.$store.state.shop.storeInfo.commodity.data
  219. this.fragment = initFragment(commodity)
  220. return commodity
  221. },
  222. component () {
  223. return this.$store.state.shop.storeInfo.component.data
  224. },
  225. calculate () {
  226. this.fragment.total = this.fragment.price * Math.pow(10, 6) * this.fragment.num
  227. return Math.ceil(this.fragment.total) / Math.pow(10, 6)
  228. },
  229. user () {
  230. return this.$store.state.option.user
  231. },
  232. isConsignment () {
  233. return this.storeInfo.type === 'CONSIGNMENT'
  234. }
  235. },
  236. mounted () {
  237. this.$nextTick(() => {
  238. this.loadSaveHistory()
  239. })
  240. },
  241. methods: {
  242. isSpecificPriceTag: function (tag) {
  243. return tag && tag.indexOf('特价') !== -1
  244. },
  245. onInput () {
  246. let prices = this.commodity.prices
  247. if (prices && prices.length) {
  248. let _this = this
  249. for (let i = 0; i < prices.length; i++) {
  250. if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
  251. _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
  252. break
  253. }
  254. }
  255. }
  256. },
  257. loadSaveHistory () {
  258. if (this.user.logged) {
  259. this.$store.dispatch('shop/saveHistory', {id: this.commodity.batchCode})
  260. }
  261. },
  262. changeCurrency () {
  263. if (this.fragment.currency === 'RMB') {
  264. this.fragment.price = this.fragment.prices.rMBPrice
  265. } else if (this.fragment.currency === 'USD') {
  266. this.fragment.price = this.fragment.prices.uSDPrice
  267. }
  268. },
  269. changeNum: function (newNum) {
  270. let pack = this.commodity.perQty || this.commodity.minPackQty
  271. let buy = this.commodity.minBuyQty
  272. let reserve = this.commodity.reserve
  273. let breakUp = this.commodity.breakUp
  274. if (!newNum) {
  275. this.fragment.num = buy
  276. } else {
  277. newNum = parseInt(newNum)
  278. if (breakUp) {
  279. if (newNum < buy) {
  280. this.$message.error('最小起订量为' + buy)
  281. this.fragment.num = buy
  282. this.fragment.canSub = false
  283. this.fragment.canAdd = true
  284. } else if (newNum > reserve) {
  285. this.$message.error('库存不足')
  286. this.fragment.num = reserve
  287. this.fragment.canAdd = false
  288. this.fragment.canSub = true
  289. } else {
  290. this.fragment.canSub = true
  291. this.fragment.canAdd = true
  292. this.fragment.num = newNum
  293. newNum === buy && (this.fragment.canSub = false)
  294. newNum === reserve && (this.fragment.canAdd = false)
  295. }
  296. } else {
  297. if (newNum < buy) {
  298. this.$message.error('最小起订量为' + buy)
  299. this.fragment.num = buy
  300. this.fragment.canSub = false
  301. if (newNum > reserve) {
  302. this.$message.error('库存不足')
  303. this.fragment.num = reserve - (reserve % pack)
  304. this.fragment.canAdd = false
  305. }
  306. } else if (newNum > reserve) {
  307. this.fragment.canSub = true
  308. this.fragment.canAdd = false
  309. this.$message.error('库存不足')
  310. this.fragment.num = reserve - (reserve % pack)
  311. } else {
  312. this.fragment.canSub = true
  313. this.fragment.canAdd = true
  314. let remainder = newNum % pack
  315. if (remainder !== 0) {
  316. // console.log(this.fragment.num)
  317. this.$message.error('不支持拆包且包装量为' + pack)
  318. // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
  319. let res = (Math.floor(newNum / pack) + 1) * pack
  320. this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
  321. } else {
  322. this.fragment.num = newNum
  323. }
  324. newNum === buy && (this.fragment.canSub = false)
  325. newNum === reserve && (this.fragment.canAdd = false)
  326. }
  327. }
  328. }
  329. },
  330. subNum () {
  331. let pack = this.commodity.perQty || this.commodity.minPackQty
  332. let newNum = 0
  333. if (this.commodity.breakUp) {
  334. newNum = this.fragment.num - 1
  335. } else {
  336. newNum = this.fragment.num - pack
  337. }
  338. this.changeNum(newNum)
  339. getFragment(this.commodity, this.fragment)
  340. this.onInput()
  341. },
  342. addNum () {
  343. let pack = this.commodity.perQty || this.commodity.minPackQty
  344. let newNum = 0
  345. if (this.commodity.breakUp) {
  346. newNum = this.fragment.num + 1
  347. } else {
  348. newNum = this.fragment.num + pack
  349. }
  350. this.changeNum(newNum)
  351. getFragment(this.commodity, this.fragment)
  352. this.onInput()
  353. },
  354. inputNum () {
  355. if ((/^[\d]*$/).test(this.fragment.num)) {
  356. this.changeNum(this.fragment.num)
  357. getFragment(this.commodity, this.fragment)
  358. } else {
  359. this.$message.error('请输入整数')
  360. this.fragment.num = this.commodity.minBuyQty
  361. }
  362. },
  363. buyNow: function (isBuy, item) {
  364. if (!this.$store.state.option.user.logged) {
  365. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  366. if (response.data) {
  367. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  368. }
  369. })
  370. } else {
  371. if (item) {
  372. if (isBuy) {
  373. this.$http.post('/trade/order/buyNow', [{
  374. uuid: item.uuid,
  375. batchCode: item.batchCode,
  376. number: this.fragment.num,
  377. storeid: item.storeid,
  378. storeUuid: item.storeid,
  379. currencyName: item.currencyName,
  380. minPackQty: item.minPackQty
  381. }])
  382. .then(response => {
  383. if (response.data.success) {
  384. if (response.data.message) {
  385. this.$message({
  386. message: response.data.message,
  387. type: 'success'
  388. })
  389. window.setTimeout(function () {
  390. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  391. }, 1000)
  392. } else {
  393. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  394. }
  395. } else {
  396. if (response.data.data && response.data.data.unvailable === 1) {
  397. this.$message.error('产品信息已失效,请刷新界面')
  398. } else {
  399. this.$message.error(response.data.message)
  400. }
  401. }
  402. }, err => {
  403. console.log(err)
  404. if (item.minBuyQty > item.reserve) {
  405. this.$message.error('商品' + item.code + '的库存已经不满足最小起订量')
  406. }
  407. })
  408. } else {
  409. // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
  410. this.$http.post('/trade/cart/add', {
  411. uuid: item.uuid,
  412. batchCode: item.batchCode,
  413. number: this.fragment.num,
  414. storeid: item.storeid,
  415. storeUuid: item.storeid,
  416. currencyName: item.currencyName,
  417. minPackQty: item.minPackQty
  418. })
  419. .then(response => {
  420. if (response.data.success) {
  421. if (response.data.message) {
  422. this.$message({
  423. message: '添加购物车成功,但商品信息有更新',
  424. type: 'success'
  425. })
  426. } else {
  427. this.$message({
  428. message: '添加购物车成功',
  429. type: 'success'
  430. })
  431. }
  432. } else {
  433. if (response.data.code === 2) {
  434. this.$message.error(response.data.message + ',请刷新页面')
  435. } else {
  436. this.$message.error(response.data.message)
  437. }
  438. }
  439. })
  440. }
  441. }
  442. }
  443. },
  444. toAttach: function (url) {
  445. if (this.user.logged) {
  446. if (url && url !== '1') {
  447. window.open(url)
  448. } else {
  449. this.$message.error('规格书地址错误')
  450. }
  451. } else {
  452. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  453. if (response.data) {
  454. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  455. }
  456. })
  457. }
  458. }
  459. }
  460. }
  461. </script>
  462. <style scoped>
  463. .container.commodity {
  464. width: 1190px;
  465. padding-left: 0;
  466. padding-right: 0;
  467. }
  468. .commodity .commodity-detail {
  469. width: 100%;
  470. display: inline-block;
  471. font-size: 0;
  472. }
  473. .commodity-detail .img{
  474. float: left;
  475. width: 258px;
  476. height: 320px;
  477. position: relative;
  478. }
  479. .commodity-detail .img >img {
  480. border: 1px solid #D6D3CE;
  481. }
  482. .commodity-detail .img .specific-price {
  483. position: absolute;
  484. left: 0;
  485. top: 0;
  486. border: none;
  487. }
  488. .commodity-detail .img .box {
  489. height: 62px;
  490. position: relative;
  491. }
  492. .commodity-detail .img .box img {
  493. position: absolute;
  494. right: 3px;
  495. bottom: 64px;
  496. }
  497. .commodity-detail .content {
  498. width: 932px;
  499. float: left;
  500. font-size: 14px;
  501. }
  502. .commodity-detail .content {
  503. padding-left: 20px;
  504. }
  505. .commodity-detail .content .code {
  506. font-size: 24px;
  507. color: rgb(50, 50, 50);
  508. font-weight: 600;
  509. border-bottom: 1px solid #D6D3CE;
  510. line-height: 40px;
  511. }
  512. .commodity-detail .content .com-info {
  513. font-size: 14px;
  514. line-height: 26px;
  515. }
  516. .commodity-detail .content .com-info em {
  517. font-size: 14px;
  518. line-height: 26px;
  519. font-style: normal;
  520. }
  521. .input-group .input-group-operate {
  522. padding: 6px 12px;
  523. font-size: 14px;
  524. font-weight: 400;
  525. line-height: 1;
  526. color: #555;
  527. text-align: center;
  528. background-color: #eee;
  529. border: 1px solid #ccc;
  530. border-radius: 4px;
  531. }
  532. .input-group .input-group-operate:last-child {
  533. border-bottom-left-radius: 0;
  534. border-top-left-radius: 0;
  535. }
  536. .input-group .input-group-operate:first-child {
  537. border-bottom-right-radius: 0;
  538. border-top-right-radius: 0;
  539. }
  540. .content .com-info .name {
  541. letter-spacing: 15px;
  542. }
  543. .content .com-info a{
  544. color: #1162a4;
  545. }
  546. .content .com-info:hover a{
  547. color: #23527c;
  548. }
  549. .content .warn-area {
  550. font-size: 16px;
  551. font-weight: bold;
  552. color: #333;
  553. margin-top: 15px;
  554. }
  555. .commodity-info-detail {
  556. float: left;
  557. padding-top: 10px;
  558. width: 582px;
  559. }
  560. .price-block {
  561. float: right;
  562. width: 330px;
  563. margin-top: 10px;
  564. height: 220px;
  565. }
  566. .commodity-price {
  567. line-height: 30px;
  568. text-align: center;
  569. border: 1px solid #D6D3CE;
  570. }
  571. .commodity-price .title {
  572. background-color: #f7f7f7;
  573. border-bottom: 1px solid #D6D3CE;
  574. }
  575. .commodity-price .head {
  576. border-bottom: 1px solid #D6D3CE;
  577. }
  578. .commodity-price .fragment {
  579. display: inline-block;
  580. width: 70px;
  581. }
  582. .commodity-price .price {
  583. width: 123px;
  584. display: inline-block;
  585. }
  586. .com-info div.select {
  587. display: inline-block;
  588. font-weight: 600;
  589. color: red;
  590. font-size: 14px;
  591. }
  592. .com-info div.select .tax {
  593. font-weight: normal;
  594. color: black;
  595. font-size: 12px;
  596. }
  597. .com-info .operate {
  598. cursor: pointer;
  599. }
  600. .com-info .operate:hover, .com-info .operate:link {
  601. background-color: #00B83F;
  602. color: white;
  603. }
  604. .com-info .money {
  605. font-weight: 600;
  606. color: red;
  607. font-size: 14px;
  608. }
  609. .com-info select {
  610. border-radius: 4px;
  611. width: 120px!important;
  612. }
  613. ul.list-inline {
  614. margin: 0;
  615. }
  616. .commodity-price ul.list-inline li {
  617. padding-left: 0;
  618. padding-right: 0;
  619. border-bottom: 1px dashed #D6D3CE;
  620. }
  621. .commodity-price .table {
  622. margin-bottom: 0;
  623. }
  624. .commodity-price ul>li:last-child {
  625. border-bottom: none;
  626. }
  627. div.button {
  628. padding-top: 20px;
  629. float: left;
  630. }
  631. button.btn-now {
  632. border: 1px solid #3D76C6;
  633. color: #3D76C6;
  634. margin-left: 30px;
  635. }
  636. .com-info .delivery {
  637. display: inline;
  638. }
  639. #commodity-info-fragment{
  640. margin-bottom: 20px;
  641. }
  642. .commodity-detail .content .com-info .div-sell {
  643. font-size: 12px;
  644. height: 16px;
  645. line-height: 16px;
  646. color: #fff;
  647. padding: 0 5px;
  648. display: inline-block;
  649. position: relative;
  650. }
  651. .commodity-detail .content .com-info .can-div-sell {
  652. background: #5078cb;
  653. }
  654. .commodity-detail .content .com-info .not-div-sell {
  655. background: #fc8200;
  656. }
  657. .commodity-detail .content .com-info .can-div-sell:before {
  658. content: '';
  659. position: absolute;
  660. left: -8px;
  661. top: 10px;
  662. border-left: 8px solid transparent;
  663. border-bottom: 6px solid #5078cb;
  664. }
  665. .commodity-detail .content .com-info .not-div-sell:before {
  666. content: '';
  667. position: absolute;
  668. left: -8px;
  669. top: 10px;
  670. border-left: 8px solid transparent;
  671. border-bottom: 6px solid #fc8200;
  672. }
  673. </style>