u-attr.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <template>
  2. <view class="u-attr">
  3. <view @click="turnOn">
  4. <slot name="btn"></slot>
  5. </view>
  6. <u-popup v-model="newValue" mode="bottom" border-radius="14" :safeAreaInsetBottom="true" @close="close">
  7. <view class="u-model" @touchmove.stop.prevent>
  8. <view class="u-top dir-left-nowrap u-border-box">
  9. <view class="u-pic u-border-box" @click="clickImg(imgUrl)">
  10. <image class="u-img" :src="imgUrl"></image>
  11. </view>
  12. <view class="u-info">
  13. <view :class="['cross-center', 'dir-left-nowrap', themeObject.color]">
  14. <view class="dir-left-nowrap">
  15. <slot name="priceBefore"></slot>
  16. <view class="u-price">
  17. <app-price
  18. v-if="is_show_price"
  19. :theme="themeObject.theme"
  20. :userTheme="themeObject.userTheme"
  21. :sign="sign"
  22. :price="sellPrice"
  23. :default-price="goods.price"
  24. ></app-price>
  25. </view>
  26. </view>
  27. <app-member-mark
  28. v-if="goods.level_show === 1"
  29. :theme="themeObject"
  30. ></app-member-mark>
  31. </view>
  32. <view class="u-stock">库存:{{stock}}</view>
  33. </view>
  34. <view class="u-close-image" @click="close">
  35. <image class="bd-close-image u-border-box" src="/static/image/icon/icon-close.png" ></image>
  36. </view>
  37. </view>
  38. <view class="u-center">
  39. <scroll-view class="u-scroll-view" scroll-y="true">
  40. <slot name="extra"></slot>
  41. <view v-if="goods.type === 'goods'" class="u-attr-group u-border-box" v-for="(item, index) in newGroup" :key="index">
  42. <view class="u-group-name u-text">{{item.attr_group_name}}</view>
  43. <view class="dir-left-wrap" >
  44. <view :class="['u-group-item', attr.select ? 'u-checked ' + themeObject.back : 'u-unchecked', attr.num_0 ? 'u-attr_num_0' : '']"
  45. @click="storeAttr(attr.attr_id, item.attr_group_id, attr.num_0)"
  46. v-for="(attr, key) in item.attr_list" :key="key">
  47. {{attr.attr_name}}
  48. </view>
  49. </view>
  50. </view>
  51. <view class="service" v-if="service_screen&&service_screen.screenList&&service_screen.screenList.length>0">
  52. <view class="service_title">全优汇服务</view>
  53. <view class="service_item">
  54. <image style="width: 26upx;height:26upx;" src="https://t12.9026.com/web/statics/icon1/sp.png"> </image>
  55. <view ><view style="float: left;">碎屏险</view><view class="slh">{{screenDescription}}</view>
  56. </view>
  57. <view style="color: red;" @click="gotoSpDetail">服务说明
  58. <image style="width: 26upx;height:26upx;" src="https://t12.9026.com/web/statics/icon1/问号.png"> </image>
  59. </view>
  60. <!-- <view>{{service_screen.screenList.intro}}</view> -->
  61. </view>
  62. <view class="service_value">
  63. <view class="service_block"
  64. v-for="(item,index) of service_screen.screenList"
  65. :class="{service_block_active:index == serviceId}"
  66. @click="select_service(index)">
  67. {{item.name}} ¥{{item.price}}
  68. </view>
  69. </view>
  70. </view>
  71. <view class="u-number dir-left-nowrap main-between cross-center">
  72. <view class="u-text">数量</view>
  73. <view class="dir-left-nowrap u-input-box">
  74. <view @click.stop="numberSub" :class="[number <=1 ? 'u-reduced-1' : 'u-reduced-0', 'u-number-btn']"></view>
  75. <input @blur="numberBlur" type="number" class="u-input" v-model="number">
  76. <view @click.stop="numberAdd" class="u-number-btn u-added-1"></view>
  77. </view>
  78. </view>
  79. </scroll-view>
  80. </view>
  81. <view class="u-bottom dir-left-nowrap">
  82. <view
  83. v-if="is_show_left && (goods.type === 'goods' || is_must_left)"
  84. class="box-grow-1"
  85. :class="cartClass"
  86. @click="leftSubmit">
  87. <slot name="left_slot"></slot>
  88. <template v-if="!$slots.left_slot">{{leftText}}</template>
  89. </view>
  90. <view
  91. v-if="is_show_right"
  92. class="box-grow-1"
  93. @click="rightSubmit"
  94. :class="[!$slots.right_slot ? themeObject.back + ' u-btn u-btn-color' : '']"
  95. >
  96. <slot name="right_slot"></slot>
  97. <template v-if="!$slots.right_slot">{{rightText}}</template>
  98. </view>
  99. <template v-if="$slots.right">
  100. <slot name="right"></slot>
  101. </template>
  102. </view>
  103. </view>
  104. </u-popup>
  105. </view>
  106. </template>
  107. <script>
  108. import { mapState } from 'vuex'
  109. import uPopup from '../../basic-component/u-popup/u-popup.vue';
  110. import appPrice from "../goods/app-price.vue";
  111. import appMemberMark from "../app-member-mark/app-member-mark.vue";
  112. export default {
  113. name: "u-attr",
  114. props: {
  115. value: {
  116. type: Boolean
  117. },
  118. goods: {
  119. type: Object
  120. },
  121. themeObject: {
  122. type: Object
  123. },
  124. checked: {
  125. type: Object
  126. },
  127. is_show_price: {
  128. type: Boolean,
  129. default: true
  130. },
  131. is_show_left: {
  132. type: Boolean,
  133. default: true
  134. },
  135. is_must_left: {
  136. type: Boolean,
  137. default: true
  138. },
  139. is_show_right: {
  140. type: Boolean,
  141. default: true
  142. },
  143. leftText: {
  144. type: String,
  145. default: '加入购物车'
  146. },
  147. rightText: {
  148. type: String,
  149. default: '立即购买'
  150. },
  151. leftFunc: {
  152. type: Boolean
  153. },
  154. rightFunc: {
  155. type: Boolean
  156. },
  157. sign: {
  158. type: String
  159. },
  160. again: {
  161. type: Number
  162. }
  163. },
  164. data() {
  165. return {
  166. newValue: false,
  167. picUrl: null,
  168. newGroup: [],
  169. number: 1,
  170. service_screen:null, //碎屏险
  171. service_label:null, //当前对屏对象
  172. serviceId:null, //碎屏险ID
  173. card_id:null,
  174. screenDescription:''
  175. }
  176. },
  177. methods: {
  178. gotoSpDetail(){
  179. uni.navigateTo({
  180. url:"/pages/goods/spDetail"
  181. })
  182. },
  183. select_service(index){
  184. if( this.serviceId == index){
  185. this.serviceId = null
  186. this.screenDescription=""
  187. }else{
  188. this.serviceId = index
  189. this.screenDescription=this.service_screen.screenList[index]['description']||''
  190. }
  191. // if(this.serviceId || this.serviceId===0){
  192. // this.service_screen.screenList.forEach((item,index)=>{
  193. // this.screenDescription=this.service_screen.screenList[index]['description']||''
  194. // })
  195. // }else{
  196. // this.service_label = null
  197. // }
  198. },
  199. getservice(copyGroup, attrNum_0, select){
  200. console.log('getservice,164')
  201. console.log(copyGroup, attrNum_0, select)
  202. console.log(this.goods.attr)
  203. console.log(select)
  204. let select_val = []
  205. this.goods.attr.forEach((item,index)=>{
  206. console.log(item)
  207. let select_item_list = []
  208. let select_item_value = ''
  209. let attrList=item.attr_list||[];
  210. attrList.forEach((value,key)=>{
  211. select_item_value = value.attr_group_id+'-'+value.attr_id
  212. select_item_list.push(select_item_value)
  213. })
  214. if(JSON.stringify(select) == JSON.stringify(select_item_list)){
  215. this.service_screen = item
  216. }
  217. })
  218. },
  219. getserviceByAttrId(){
  220. let that=this;
  221. this.goods.attr.forEach((item,index)=>{
  222. if(item.id==this.checked.id){
  223. that.service_screen = item
  224. that.select_service(0);
  225. }
  226. })
  227. },
  228. hasCurrentServiceData(){
  229. let that=this;
  230. let result=0;
  231. console.log(this.service_screen)
  232. if(this.service_screen&&this.service_screen.screenList
  233. &&this.service_screen.screenList.length>0){
  234. result=1;
  235. }
  236. else
  237. result=0;
  238. return result;
  239. },
  240. close: function() {
  241. this.$emit('input', false);
  242. },
  243. turnOn: function() {
  244. this.$emit('input', true);
  245. },
  246. inArray: function(newVal, arr) {
  247. return arr.some(v => {
  248. return newVal === v;
  249. });
  250. },
  251. identifier: function(copyGroup, attrNum_0, select) {
  252. console.log('identifier,175')
  253. copyGroup.forEach(f => {
  254. f.attr_list.forEach(c => {
  255. let param = `${f.attr_group_id}-${c.attr_id}`;
  256. this.inArray(param, attrNum_0) && !this.inArray(param, select) ? c.num_0 = true : c.num_0 = false;
  257. });
  258. });
  259. },
  260. selectCheck: function(copyAttr, attrNum_0, select) {
  261. copyAttr.forEach(f => {
  262. let arr = [];
  263. let sign = 0;
  264. let attrList=f.attr_list||[]
  265. attrList.forEach(c => {
  266. let param = `${c.attr_group_id}-${c.attr_id}`;
  267. if (!this.inArray(param, select)) {
  268. sign += 1;
  269. arr.push(param);
  270. }
  271. });
  272. if (f.stock === 0 && sign <= 1) Array.prototype.push.apply(attrNum_0, arr);
  273. console.log("eeeeeeeeeeeeeeeee")
  274. console.log(f)
  275. if (sign === 0) {
  276. this.$emit('check', f, 1);
  277. }
  278. });
  279. },
  280. storeAttr: function(attr_id, group_id, num_0) {
  281. console.log(201)
  282. if (num_0 === true) return;
  283. let newGroup = this.newGroup;
  284. let copyAttr = this.copyAttr;
  285. let select = [];
  286. console.log(newGroup)
  287. console.log(attr_id)
  288. console.log(group_id)
  289. newGroup.forEach((i, index) => {
  290. let attr_list = i.attr_list;
  291. attr_list.forEach((k) => {
  292. if (i.attr_group_id === group_id) {
  293. if (k.attr_id === attr_id) {
  294. if (k.select === true) {
  295. k.select = false;
  296. } else {
  297. k.select = true;
  298. }
  299. } else {
  300. k.select = false;
  301. }
  302. // k.attr_id === attr_id ? k.select = true : k.select = false;
  303. }
  304. if (k.select === true) {
  305. select.push(`${i.attr_group_id}-${k.attr_id}`);
  306. if (index === 0) this.picUrl = k.pic_url;
  307. }
  308. });
  309. });
  310. let attrNum_0 = [];
  311. console.log(230)
  312. console.log(copyAttr)
  313. console.log(attrNum_0)
  314. console.log(select)
  315. this.selectCheck(copyAttr, attrNum_0, select);
  316. this.$nextTick(() => {
  317. if (this.number > this.stock) this.number = this.stock;
  318. });
  319. this.identifier(newGroup, attrNum_0, select);
  320. this.getservice(newGroup, attrNum_0, select)
  321. if (select.length !== newGroup.length) {
  322. this.$emit('check', null, 1);
  323. }
  324. },
  325. firstSelect: function() {
  326. console.log("ddddd")
  327. console.log(this.copyAttr)
  328. console.log(this.copyGroup)
  329. if (!this.copyGroup || !this.copyAttr) return;
  330. let copyGroup = this.copyGroup;
  331. let copyAttr = this.copyAttr;
  332. let groupLength = copyGroup.length;
  333. let select = [];
  334. copyAttr.forEach(i => {
  335. let attr_list = i.attr_list||[];
  336. attr_list.forEach(j => {
  337. let attr_group_id = j.attr_group_id;
  338. copyGroup.forEach(k => {
  339. if (attr_group_id === k.attr_group_id) {
  340. let groups_attr_list = k.attr_list;
  341. groups_attr_list.forEach(g => {
  342. if (g.attr_id === j.attr_id) {
  343. if (i.stock > 0) {
  344. if (groupLength > 0) {
  345. g.select = true;
  346. select.push(`${k.attr_group_id}-${g.attr_id}`);
  347. if (groupLength === copyGroup.length) {
  348. this.picUrl = g.pic_url;
  349. }
  350. groupLength--;
  351. }
  352. }
  353. }
  354. });
  355. }
  356. });
  357. });
  358. });
  359. let attrNum_0 = [];
  360. this.selectCheck(copyAttr, attrNum_0, select);
  361. this.identifier(copyGroup, attrNum_0, select);
  362. this.getservice(copyGroup, attrNum_0, select); //getservice
  363. this.newGroup = copyGroup;
  364. console.log(this.newGroup)
  365. },
  366. numberBlur: function (e) {
  367. let value = parseInt(e.detail.value);
  368. if (!value) value = 1;
  369. if (value > this.stock) {
  370. value = this.stock;
  371. uni.showToast({
  372. title: '库存不足',
  373. icon: 'none'
  374. });
  375. }
  376. this.number = value;
  377. },
  378. numberSub:function() {
  379. let value = this.number;
  380. if (value > 1) {
  381. value--;
  382. this.number = value;
  383. }
  384. },
  385. numberAdd: function() {
  386. let value = this.number;
  387. value++;
  388. if (value > this.stock) {
  389. value = this.stock;
  390. uni.showToast({
  391. title: '库存不足',
  392. icon: 'none'
  393. });
  394. }
  395. this.number = value;
  396. },
  397. leftSubmit:function() {
  398. if (this.leftFunc === true) {
  399. this.$emit('leftFunc', this.number);
  400. } else {
  401. this.cart();
  402. }
  403. this.close();
  404. },
  405. rightSubmit:function() {
  406. let _this = this
  407. if (!this.checked) {
  408. uni.showToast({
  409. title: '请先选规格',
  410. icon: 'none'
  411. });
  412. return false;
  413. }
  414. // if (!this.service_label) {
  415. // uni.showModal({
  416. // title: '提示',
  417. // content: '确定不需要碎屏险吗?',
  418. // success: function (res) {
  419. // if (res.confirm) {
  420. // _this.submit()
  421. // } else if (res.cancel) {
  422. // return false
  423. // }
  424. // }
  425. // });
  426. // }else{
  427. // this.submit()
  428. // }
  429. this.submit()
  430. },
  431. submit(){
  432. if (this.$user.isLogin() && this.$store.state.user.info) {
  433. let member_level =this.$store.state.user.info.identity.member_level;
  434. if(member_level<this.goods.member_level){
  435. uni.showModal({
  436. title:"提示",
  437. content:"需达到"+this.goods.member_name+"会员才可购买",
  438. showCancel:true,
  439. buttonText: '升级',
  440. success:(res)=>{
  441. if (res.confirm) {
  442. uni.navigateTo({
  443. // url:"/pages/member/index/index",
  444. url: '/pages/member/upgrade/upgrade?level=' + member_level + '&other=' + this.goods.member_level
  445. })
  446. } else if (res.cancel) {
  447. console.log('用户点击取消');
  448. }
  449. }
  450. })
  451. return;
  452. }
  453. }
  454. let attrs = [];
  455. let _this = this
  456. let attrList=_this.checked.attr_list||[];
  457. attrList.forEach(item => {
  458. attrs.push({
  459. attr_id: item.attr_id,
  460. attr_group_id: item.attr_group_id
  461. });
  462. });
  463. let goods = {
  464. mch_id: _this.goods.mch_id ? _this.goods.mch_id : 0,
  465. hasScreen:_this.hasCurrentServiceData(),
  466. goods_list: [
  467. {
  468. id: _this.goods.id,
  469. attrs,
  470. num: _this.number,
  471. cat_id: 0,
  472. card_id:_this.card_id,
  473. goods_attr_id: _this.checked.id,
  474. service_label: _this.service_label
  475. }
  476. ]
  477. }
  478. if (_this.rightFunc === true) {
  479. console.log(333)
  480. _this.$emit('rightFunc', goods);
  481. } else {
  482. console.log(336)
  483. _this.shop(goods);
  484. }
  485. if(_this.service_label['id']||0)
  486. _this.close();
  487. },
  488. shop: function(goods) {
  489. console.log(342)
  490. console.log(goods)
  491. let hasScreen= this.hasCurrentServiceData();
  492. uni.navigateTo({
  493. url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify([goods])}&hasScreen=${hasScreen}`
  494. });
  495. },
  496. cart: function() {
  497. if (!this.checked) {
  498. uni.showToast({
  499. title: '请先选规格',
  500. icon: 'none'
  501. });
  502. return false;
  503. }
  504. if (this.goods.type === 'ecard') return;
  505. this.$request({
  506. url: this.$api.cart.add,
  507. method: 'post',
  508. data: {
  509. goods_id: this.checked.goods_id,
  510. attr: this.checked.id,
  511. num: this.number
  512. }
  513. }).then(res => {
  514. if (res.code === 0) {
  515. uni.showToast({
  516. title: res.msg,
  517. icon: 'none'
  518. });
  519. this.$emit('cart', this.checked, this.number);
  520. this.close();
  521. } else {
  522. uni.showToast({
  523. title: res.msg,
  524. icon: "none",
  525. duration: 2500
  526. });
  527. }
  528. });
  529. },
  530. clickImg(src) {
  531. uni.previewImage({
  532. current: 0,
  533. urls: [src]
  534. });
  535. }
  536. },
  537. components: {
  538. uPopup,
  539. appPrice,
  540. appMemberMark
  541. },
  542. computed: {
  543. imgUrl: function() {
  544. if (this.picUrl) {
  545. return this.picUrl;
  546. } else if (this.goods) {
  547. return this.goods.cover_pic;
  548. } else {
  549. return '';
  550. }
  551. },
  552. stock: function() {
  553. if (!this.$validation.isEmpty(this.checked)) {
  554. return this.checked.stock;
  555. } else if (!this.$validation.isEmpty(this.goods)) {
  556. return this.goods.goods_num;
  557. }
  558. },
  559. sellPrice: function() {
  560. if (!this.$validation.isEmpty(this.checked)) {
  561. return this.goods.level_show === 1 ? this.checked.price_member : this.checked.price;
  562. } else if (!this.$validation.isEmpty(this.goods)) {
  563. return this.goods.hasOwnProperty('price_min') ? this.goods.price_min : this.goods.price;
  564. }
  565. },
  566. copyGroup: function() {
  567. if (!this.goods) return;
  568. let group = this.$utils.deepClone(this.goods.attr_groups);
  569. for (let i = 0; i < group.length; i++) {
  570. group[i].attr_list.forEach(item => {
  571. item.select = false;
  572. item.num_0 = false;
  573. });
  574. }
  575. return group;
  576. },
  577. copyAttr: function() {
  578. if (!this.goods) return;
  579. return this.$utils.deepClone(this.goods.attr);
  580. },
  581. cartClass: function() {
  582. if (!this.$slots.left_slot) {
  583. if (this.themeObject.theme === 'a' || this.themeObject.theme === 'b' || this.themeObject.theme === 'f') {
  584. return this.themeObject.sBack + ' u-btn u-btn-color ';
  585. } else {
  586. return this.themeObject.sBack + ' u-btn ' + this.themeObject.color;
  587. }
  588. } else {
  589. return '';
  590. }
  591. }
  592. },
  593. watch: {
  594. value: {
  595. handler(newVal) {
  596. this.newValue = newVal;
  597. if (newVal === false) return;
  598. if (this.$validation.isEmpty(this.checked)||this.checked.first) this.$utils.throttle(this.firstSelect, 800);
  599. },
  600. immediate: true
  601. },
  602. number: {
  603. handler(newVal) {
  604. this.$emit('check', this.checked, newVal);
  605. }
  606. },
  607. again: {
  608. handler() {
  609. // this.firstSelect();
  610. }
  611. }
  612. }
  613. }
  614. </script>
  615. <style scoped >
  616. .u-model {
  617. width: 750upx;
  618. }
  619. .u-top {
  620. margin: 0 24upx;
  621. border-bottom: 1upx solid #e2e2e2;
  622. height: 140upx;
  623. }
  624. .u-close-image {
  625. width: 54upx;
  626. height: 78upx;
  627. padding: 24upx 0 24rpx 24rpx;
  628. margin-left: 24rpx;
  629. }
  630. .bd-close-image {
  631. width: 30upx;
  632. height: 30upx;
  633. }
  634. .u-pic {
  635. width: 200rpx;
  636. height: 200rpx;
  637. padding: 4upx;
  638. border-radius: 8rpx;
  639. position: relative;
  640. top: -64upx;
  641. background-color: #ffffff;
  642. }
  643. .u-img {
  644. width: 192rpx;
  645. height: 192rpx;
  646. background-color: #ffffff;
  647. }
  648. .u-info {
  649. width: 424upx;
  650. height: 136upx;
  651. padding: 45upx 0 0 24upx;
  652. }
  653. .u-scroll-view {
  654. width: 100%;
  655. max-height: calc(80vh - 154upx);
  656. }
  657. .u-attr-group {
  658. margin:24upx 32upx 0 32upx;
  659. border-bottom: 1upx solid #e2e2e2;
  660. }
  661. .u-number {
  662. height: 124upx;
  663. margin: 0 32upx;
  664. }
  665. .u-group-name {
  666. margin-bottom: 20upx;
  667. }
  668. .u-group-item {
  669. padding: 15upx 24upx;
  670. border-radius: 8upx;
  671. margin:0 20upx 20upx 0;
  672. font-size: 26upx;
  673. }
  674. .u-checked {
  675. color: #ffffff;
  676. }
  677. .u-unchecked {
  678. background-color: #f2f2f2;
  679. color: #353535;
  680. }
  681. .u-attr_num_0 {
  682. background-color: #f7f7f7;
  683. color: #cdcdcd;
  684. }
  685. .u-stock {
  686. font-size: 24upx;
  687. color: #999999;
  688. }
  689. .u-price {
  690. margin-right: 12upx;
  691. }
  692. .u-input {
  693. width: 88upx;
  694. height: 60upx;
  695. background-color: #f7f7f7;
  696. font-size: 20upx;
  697. color: #353535;
  698. text-align: center;
  699. }
  700. .u-input-box {
  701. width: 218upx;
  702. }
  703. .u-number-btn {
  704. height: 60upx;
  705. width: 60upx;
  706. background-repeat: no-repeat;
  707. background-size: 100% 100%;
  708. background-position: center;
  709. }
  710. .u-number-btn:first-child {
  711. margin-right: 5upx;
  712. }
  713. .u-number-btn:last-child {
  714. margin-left: 5upx;
  715. }
  716. .u-reduced-1 {
  717. background-image: url("../../../static/image/icon/can-be-reduced.png");
  718. }
  719. .u-reduced-0 {
  720. background-image: url("../../../static/image/cart/can-be-reduced.png");
  721. }
  722. .u-added-1 {
  723. background-image: url("../../../static/image/cart/can-be-added.png");
  724. }
  725. .u-text {
  726. font-size: 26upx;
  727. color: #666666;
  728. }
  729. .u-bottom {
  730. height: 110upx;
  731. }
  732. .u-btn {
  733. text-align: center;
  734. line-height: 110upx;
  735. }
  736. .u-btn-color {
  737. color: #ffffff;
  738. }
  739. .service_title{
  740. padding-top: 10px;
  741. margin:14px 10px 10px;
  742. font-weight: 700;
  743. font-size: 13px;
  744. }
  745. .service_item{
  746. margin:14px 10px 0px;
  747. font-size:26rpx;
  748. color:#666;
  749. display:flex;
  750. justify-content: space-between;
  751. }
  752. .service_value{
  753. display:flex;
  754. flex-wrap: wrap;
  755. padding:0px 10px;
  756. }
  757. .service_block{
  758. min-width:46%;
  759. height: 28px;
  760. line-height:26px;
  761. border: 1px solid #f5f5f5;
  762. border-radius: 16px;
  763. text-align:center;
  764. margin-right: 10px;
  765. margin-top: 10px;
  766. font-size: 12px;
  767. background-color: #f5f5f5;
  768. position: relative;
  769. }
  770. .service_block_active{
  771. color:#f21c1c;
  772. border:1px solid #f21c1c;
  773. }
  774. .slh{
  775. margin-left: 5upx;
  776. overflow : hidden;
  777. text-overflow: ellipsis;
  778. width: 460upx;
  779. white-space:nowrap;
  780. float:left;
  781. /* display: -webkit-box;
  782. -webkit-line-clamp: 1;
  783. -webkit-box-orient: vertical; */
  784. }
  785. </style>