CommodityInfo.vue 26 KB

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