u-attr.vue 27 KB

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