CommodityInfo.vue 22 KB

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