u-attr.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  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. this.service_label=null
  188. this.card_id=null
  189. }else{
  190. this.serviceId = index
  191. this.screenDescription=this.service_screen.screenList[index]['description']||''
  192. this.service_label = this.service_screen.screenList[index]
  193. this.card_id = this.service_screen.screenList['card_id']
  194. }
  195. // if(this.serviceId || this.serviceId===0){
  196. // this.service_screen.screenList.forEach((item,index)=>{
  197. // this.screenDescription=this.service_screen.screenList[index]['description']||''
  198. // })
  199. // }else{
  200. // this.service_label = null
  201. // }
  202. },
  203. getservice(copyGroup, attrNum_0, select){
  204. console.log('getservice,164')
  205. console.log(copyGroup, attrNum_0, select)
  206. console.log(this.goods.attr)
  207. console.log(select)
  208. let select_val = []
  209. this.goods.attr.forEach((item,index)=>{
  210. console.log(item)
  211. let select_item_list = []
  212. let select_item_value = ''
  213. let attrList=item.attr_list||[];
  214. attrList.forEach((value,key)=>{
  215. select_item_value = value.attr_group_id+'-'+value.attr_id
  216. select_item_list.push(select_item_value)
  217. })
  218. if(JSON.stringify(select) == JSON.stringify(select_item_list)){
  219. this.service_screen = item
  220. }
  221. })
  222. },
  223. getserviceByAttrId(){
  224. let that=this;
  225. this.goods.attr.forEach((item,index)=>{
  226. if(item.id==this.checked.id){
  227. that.service_screen = item
  228. that.select_service(0);
  229. }
  230. })
  231. },
  232. hasCurrentServiceData(){
  233. let that=this;
  234. let result=0;
  235. console.log(this.service_screen)
  236. if(this.service_screen&&this.service_screen.screenList
  237. &&this.service_screen.screenList.length>0){
  238. result=1;
  239. }
  240. else
  241. result=0;
  242. return result;
  243. },
  244. close: function() {
  245. this.$emit('input', false);
  246. },
  247. turnOn: function() {
  248. this.$emit('input', true);
  249. },
  250. inArray: function(newVal, arr) {
  251. return arr.some(v => {
  252. return newVal === v;
  253. });
  254. },
  255. identifier: function(copyGroup, attrNum_0, select) {
  256. console.log('identifier,175')
  257. copyGroup.forEach(f => {
  258. f.attr_list.forEach(c => {
  259. let param = `${f.attr_group_id}-${c.attr_id}`;
  260. this.inArray(param, attrNum_0) && !this.inArray(param, select) ? c.num_0 = true : c.num_0 = false;
  261. });
  262. });
  263. },
  264. selectCheck: function(copyAttr, attrNum_0, select) {
  265. copyAttr.forEach(f => {
  266. let arr = [];
  267. let sign = 0;
  268. let attrList=f.attr_list||[]
  269. attrList.forEach(c => {
  270. let param = `${c.attr_group_id}-${c.attr_id}`;
  271. if (!this.inArray(param, select)) {
  272. sign += 1;
  273. arr.push(param);
  274. }
  275. });
  276. if (f.stock === 0 && sign <= 1) Array.prototype.push.apply(attrNum_0, arr);
  277. console.log("eeeeeeeeeeeeeeeee")
  278. console.log(f)
  279. if (sign === 0) {
  280. this.$emit('check', f, 1);
  281. }
  282. });
  283. },
  284. storeAttr: function(attr_id, group_id, num_0) {
  285. console.log(201)
  286. if (num_0 === true) return;
  287. let newGroup = this.newGroup;
  288. let copyAttr = this.copyAttr;
  289. let select = [];
  290. console.log(newGroup)
  291. console.log(attr_id)
  292. console.log(group_id)
  293. newGroup.forEach((i, index) => {
  294. let attr_list = i.attr_list;
  295. attr_list.forEach((k) => {
  296. if (i.attr_group_id === group_id) {
  297. if (k.attr_id === attr_id) {
  298. if (k.select === true) {
  299. k.select = false;
  300. } else {
  301. k.select = true;
  302. }
  303. } else {
  304. k.select = false;
  305. }
  306. // k.attr_id === attr_id ? k.select = true : k.select = false;
  307. }
  308. if (k.select === true) {
  309. select.push(`${i.attr_group_id}-${k.attr_id}`);
  310. if (index === 0) this.picUrl = k.pic_url;
  311. }
  312. });
  313. });
  314. let attrNum_0 = [];
  315. console.log(230)
  316. console.log(copyAttr)
  317. console.log(attrNum_0)
  318. console.log(select)
  319. this.selectCheck(copyAttr, attrNum_0, select);
  320. this.$nextTick(() => {
  321. if (this.number > this.stock) this.number = this.stock;
  322. });
  323. this.identifier(newGroup, attrNum_0, select);
  324. this.getservice(newGroup, attrNum_0, select)
  325. if (select.length !== newGroup.length) {
  326. this.$emit('check', null, 1);
  327. }
  328. },
  329. firstSelect: function() {
  330. console.log("ddddd")
  331. console.log(this.copyAttr)
  332. console.log(this.copyGroup)
  333. if (!this.copyGroup || !this.copyAttr) return;
  334. let copyGroup = this.copyGroup;
  335. let copyAttr = this.copyAttr;
  336. let groupLength = copyGroup.length;
  337. let select = [];
  338. copyAttr.forEach(i => {
  339. let attr_list = i.attr_list||[];
  340. attr_list.forEach(j => {
  341. let attr_group_id = j.attr_group_id;
  342. copyGroup.forEach(k => {
  343. if (attr_group_id === k.attr_group_id) {
  344. let groups_attr_list = k.attr_list;
  345. groups_attr_list.forEach(g => {
  346. if (g.attr_id === j.attr_id) {
  347. if (i.stock > 0) {
  348. if (groupLength > 0) {
  349. g.select = true;
  350. select.push(`${k.attr_group_id}-${g.attr_id}`);
  351. if (groupLength === copyGroup.length) {
  352. this.picUrl = g.pic_url;
  353. }
  354. groupLength--;
  355. }
  356. }
  357. }
  358. });
  359. }
  360. });
  361. });
  362. });
  363. let attrNum_0 = [];
  364. this.selectCheck(copyAttr, attrNum_0, select);
  365. this.identifier(copyGroup, attrNum_0, select);
  366. this.getservice(copyGroup, attrNum_0, select); //getservice
  367. this.newGroup = copyGroup;
  368. console.log(this.newGroup)
  369. },
  370. numberBlur: function (e) {
  371. let value = parseInt(e.detail.value);
  372. if (!value) value = 1;
  373. if (value > this.stock) {
  374. value = this.stock;
  375. uni.showToast({
  376. title: '库存不足',
  377. icon: 'none'
  378. });
  379. }
  380. this.number = value;
  381. },
  382. numberSub:function() {
  383. let value = this.number;
  384. if (value > 1) {
  385. value--;
  386. this.number = value;
  387. }
  388. },
  389. numberAdd: function() {
  390. let value = this.number;
  391. value++;
  392. if (value > this.stock) {
  393. value = this.stock;
  394. uni.showToast({
  395. title: '库存不足',
  396. icon: 'none'
  397. });
  398. }
  399. this.number = value;
  400. },
  401. leftSubmit:function() {
  402. if (this.leftFunc === true) {
  403. this.$emit('leftFunc', this.number);
  404. } else {
  405. this.cart();
  406. }
  407. this.close();
  408. },
  409. rightSubmit:function() {
  410. let _this = this
  411. if (!this.checked) {
  412. uni.showToast({
  413. title: '请先选规格',
  414. icon: 'none'
  415. });
  416. return false;
  417. }
  418. // if (!this.service_label) {
  419. // uni.showModal({
  420. // title: '提示',
  421. // content: '确定不需要碎屏险吗?',
  422. // success: function (res) {
  423. // if (res.confirm) {
  424. // _this.submit()
  425. // } else if (res.cancel) {
  426. // return false
  427. // }
  428. // }
  429. // });
  430. // }else{
  431. // this.submit()
  432. // }
  433. this.submit()
  434. },
  435. submit(){
  436. if (this.$user.isLogin() && this.$store.state.user.info) {
  437. let member_level =this.$store.state.user.info.identity.member_level;
  438. if(member_level<this.goods.member_level){
  439. uni.showModal({
  440. title:"提示",
  441. content:"需达到"+this.goods.member_name+"会员才可购买",
  442. showCancel:true,
  443. buttonText: '升级',
  444. success:(res)=>{
  445. if (res.confirm) {
  446. uni.navigateTo({
  447. // url:"/pages/member/index/index",
  448. url: '/pages/member/upgrade/upgrade?level=' + member_level + '&other=' + this.goods.member_level
  449. })
  450. } else if (res.cancel) {
  451. console.log('用户点击取消');
  452. }
  453. }
  454. })
  455. return;
  456. }
  457. }
  458. let attrs = [];
  459. let _this = this
  460. let attrList=_this.checked.attr_list||[];
  461. attrList.forEach(item => {
  462. attrs.push({
  463. attr_id: item.attr_id,
  464. attr_group_id: item.attr_group_id
  465. });
  466. });
  467. let goods = {
  468. mch_id: _this.goods.mch_id ? _this.goods.mch_id : 0,
  469. hasScreen:_this.hasCurrentServiceData(),
  470. goods_list: [
  471. {
  472. id: _this.goods.id,
  473. attrs,
  474. num: _this.number,
  475. cat_id: 0,
  476. card_id:_this.card_id,
  477. goods_attr_id: _this.checked.id,
  478. service_label: _this.service_label
  479. }
  480. ]
  481. }
  482. if (_this.rightFunc === true) {
  483. console.log(333)
  484. _this.$emit('rightFunc', goods);
  485. } else {
  486. console.log(336)
  487. _this.shop(goods);
  488. }
  489. if(_this.service_label['id']||0)
  490. _this.close();
  491. },
  492. shop: function(goods) {
  493. console.log(342)
  494. console.log(goods)
  495. let hasScreen= this.hasCurrentServiceData();
  496. uni.navigateTo({
  497. url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify([goods])}&hasScreen=${hasScreen}`
  498. });
  499. },
  500. cart: function() {
  501. if (!this.checked) {
  502. uni.showToast({
  503. title: '请先选规格',
  504. icon: 'none'
  505. });
  506. return false;
  507. }
  508. if (this.goods.type === 'ecard') return;
  509. this.$request({
  510. url: this.$api.cart.add,
  511. method: 'post',
  512. data: {
  513. goods_id: this.checked.goods_id,
  514. attr: this.checked.id,
  515. num: this.number
  516. }
  517. }).then(res => {
  518. if (res.code === 0) {
  519. uni.showToast({
  520. title: res.msg,
  521. icon: 'none'
  522. });
  523. this.$emit('cart', this.checked, this.number);
  524. this.close();
  525. } else {
  526. uni.showToast({
  527. title: res.msg,
  528. icon: "none",
  529. duration: 2500
  530. });
  531. }
  532. });
  533. },
  534. clickImg(src) {
  535. uni.previewImage({
  536. current: 0,
  537. urls: [src]
  538. });
  539. }
  540. },
  541. components: {
  542. uPopup,
  543. appPrice,
  544. appMemberMark
  545. },
  546. computed: {
  547. imgUrl: function() {
  548. if (this.picUrl) {
  549. return this.picUrl;
  550. } else if (this.goods) {
  551. return this.goods.cover_pic;
  552. } else {
  553. return '';
  554. }
  555. },
  556. stock: function() {
  557. if (!this.$validation.isEmpty(this.checked)) {
  558. return this.checked.stock;
  559. } else if (!this.$validation.isEmpty(this.goods)) {
  560. return this.goods.goods_num;
  561. }
  562. },
  563. sellPrice: function() {
  564. if (!this.$validation.isEmpty(this.checked)) {
  565. return this.goods.level_show === 1 ? this.checked.price_member : this.checked.price;
  566. } else if (!this.$validation.isEmpty(this.goods)) {
  567. return this.goods.hasOwnProperty('price_min') ? this.goods.price_min : this.goods.price;
  568. }
  569. },
  570. copyGroup: function() {
  571. if (!this.goods) return;
  572. let group = this.$utils.deepClone(this.goods.attr_groups);
  573. for (let i = 0; i < group.length; i++) {
  574. group[i].attr_list.forEach(item => {
  575. item.select = false;
  576. item.num_0 = false;
  577. });
  578. }
  579. return group;
  580. },
  581. copyAttr: function() {
  582. if (!this.goods) return;
  583. return this.$utils.deepClone(this.goods.attr);
  584. },
  585. cartClass: function() {
  586. if (!this.$slots.left_slot) {
  587. if (this.themeObject.theme === 'a' || this.themeObject.theme === 'b' || this.themeObject.theme === 'f') {
  588. return this.themeObject.sBack + ' u-btn u-btn-color ';
  589. } else {
  590. return this.themeObject.sBack + ' u-btn ' + this.themeObject.color;
  591. }
  592. } else {
  593. return '';
  594. }
  595. }
  596. },
  597. watch: {
  598. value: {
  599. handler(newVal) {
  600. this.newValue = newVal;
  601. if (newVal === false) return;
  602. if (this.$validation.isEmpty(this.checked)||this.checked.first) this.$utils.throttle(this.firstSelect, 800);
  603. },
  604. immediate: true
  605. },
  606. number: {
  607. handler(newVal) {
  608. this.$emit('check', this.checked, newVal);
  609. }
  610. },
  611. again: {
  612. handler() {
  613. // this.firstSelect();
  614. }
  615. }
  616. }
  617. }
  618. </script>
  619. <style scoped >
  620. .u-model {
  621. width: 750upx;
  622. }
  623. .u-top {
  624. margin: 0 24upx;
  625. border-bottom: 1upx solid #e2e2e2;
  626. height: 140upx;
  627. }
  628. .u-close-image {
  629. width: 54upx;
  630. height: 78upx;
  631. padding: 24upx 0 24rpx 24rpx;
  632. margin-left: 24rpx;
  633. }
  634. .bd-close-image {
  635. width: 30upx;
  636. height: 30upx;
  637. }
  638. .u-pic {
  639. width: 200rpx;
  640. height: 200rpx;
  641. padding: 4upx;
  642. border-radius: 8rpx;
  643. position: relative;
  644. top: -64upx;
  645. background-color: #ffffff;
  646. }
  647. .u-img {
  648. width: 192rpx;
  649. height: 192rpx;
  650. background-color: #ffffff;
  651. }
  652. .u-info {
  653. width: 424upx;
  654. height: 136upx;
  655. padding: 45upx 0 0 24upx;
  656. }
  657. .u-scroll-view {
  658. width: 100%;
  659. max-height: calc(80vh - 154upx);
  660. }
  661. .u-attr-group {
  662. margin:24upx 32upx 0 32upx;
  663. border-bottom: 1upx solid #e2e2e2;
  664. }
  665. .u-number {
  666. height: 124upx;
  667. margin: 0 32upx;
  668. }
  669. .u-group-name {
  670. margin-bottom: 20upx;
  671. }
  672. .u-group-item {
  673. padding: 15upx 24upx;
  674. border-radius: 8upx;
  675. margin:0 20upx 20upx 0;
  676. font-size: 26upx;
  677. }
  678. .u-checked {
  679. color: #ffffff;
  680. }
  681. .u-unchecked {
  682. background-color: #f2f2f2;
  683. color: #353535;
  684. }
  685. .u-attr_num_0 {
  686. background-color: #f7f7f7;
  687. color: #cdcdcd;
  688. }
  689. .u-stock {
  690. font-size: 24upx;
  691. color: #999999;
  692. }
  693. .u-price {
  694. margin-right: 12upx;
  695. }
  696. .u-input {
  697. width: 88upx;
  698. height: 60upx;
  699. background-color: #f7f7f7;
  700. font-size: 20upx;
  701. color: #353535;
  702. text-align: center;
  703. }
  704. .u-input-box {
  705. width: 218upx;
  706. }
  707. .u-number-btn {
  708. height: 60upx;
  709. width: 60upx;
  710. background-repeat: no-repeat;
  711. background-size: 100% 100%;
  712. background-position: center;
  713. }
  714. .u-number-btn:first-child {
  715. margin-right: 5upx;
  716. }
  717. .u-number-btn:last-child {
  718. margin-left: 5upx;
  719. }
  720. .u-reduced-1 {
  721. background-image: url("../../../static/image/icon/can-be-reduced.png");
  722. }
  723. .u-reduced-0 {
  724. background-image: url("../../../static/image/cart/can-be-reduced.png");
  725. }
  726. .u-added-1 {
  727. background-image: url("../../../static/image/cart/can-be-added.png");
  728. }
  729. .u-text {
  730. font-size: 26upx;
  731. color: #666666;
  732. }
  733. .u-bottom {
  734. height: 110upx;
  735. }
  736. .u-btn {
  737. text-align: center;
  738. line-height: 110upx;
  739. }
  740. .u-btn-color {
  741. color: #ffffff;
  742. }
  743. .service_title{
  744. padding-top: 10px;
  745. margin:14px 10px 10px;
  746. font-weight: 700;
  747. font-size: 13px;
  748. }
  749. .service_item{
  750. margin:14px 10px 0px;
  751. font-size:26rpx;
  752. color:#666;
  753. display:flex;
  754. justify-content: space-between;
  755. }
  756. .service_value{
  757. display:flex;
  758. flex-wrap: wrap;
  759. padding:0px 10px;
  760. }
  761. .service_block{
  762. min-width:46%;
  763. height: 28px;
  764. line-height:26px;
  765. border: 1px solid #f5f5f5;
  766. border-radius: 16px;
  767. text-align:center;
  768. margin-right: 10px;
  769. margin-top: 10px;
  770. font-size: 12px;
  771. background-color: #f5f5f5;
  772. position: relative;
  773. }
  774. .service_block_active{
  775. color:#f21c1c;
  776. border:1px solid #f21c1c;
  777. }
  778. .slh{
  779. margin-left: 5upx;
  780. overflow : hidden;
  781. text-overflow: ellipsis;
  782. width: 460upx;
  783. white-space:nowrap;
  784. float:left;
  785. /* display: -webkit-box;
  786. -webkit-line-clamp: 1;
  787. -webkit-box-orient: vertical; */
  788. }
  789. </style>