product.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <template>
  2. <view class="container">
  3. <!-- 轮播图 -->
  4. <top-swiper :imgList="imgList"></top-swiper>
  5. <!-- 标题 -->
  6. <product-content :goodsObjact="goodsObjact"></product-content>
  7. <view class="c-list">
  8. <view class="c-row b-b" @click="toggleSpec">
  9. <text class="tit">购买数量</text>
  10. <view class="con">
  11. <text class="selected-text">{{ goodsNumber }}</text>
  12. </view>
  13. <text class="iconfont iconenter"></text>
  14. </view>
  15. <view class="c-row b-b" v-if="goodsObjact.give_integral != 0">
  16. <text>每购买一个送{{ goodsObjact.give_integral }}消费券</text>
  17. </view>
  18. <!-- <view class="c-row b-b" v-if="goodsObjact.business_integral != 0">
  19. <text>每购买一个送{{ goodsObjact.business_integral }}商家积分</text>
  20. </view> -->
  21. </view>
  22. <!-- 拼货时间及优惠 -->
  23. <!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
  24. <!-- 评价 -->
  25. <estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
  26. <!-- 规格信息 -->
  27. <fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
  28. <!-- 图文详情 -->
  29. <content-text :description="description"></content-text>
  30. <!-- 底部高度撑开 -->
  31. <view class="contentBottomHeight"></view>
  32. <!-- 底部操作菜单 -->
  33. <product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne" :isVip="isVip"></product-bottom>
  34. <!-- 规格-模态层弹窗 -->
  35. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
  36. <!-- 遮罩层 -->
  37. <view class="mask"></view>
  38. <view class="layer attr-content" @click.stop="stopPrevent">
  39. <view class="a-t">
  40. <image :src="actionImage"></image>
  41. <view class="right">
  42. <view class="good-name clamp">{{ goodsObjact.store_name }}</view>
  43. <text class="price" v-if="actionIntegral != 0">¥{{ actionPrice }}</text>
  44. <text class="price" v-else>¥{{ actionPrice }}</text>
  45. <!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
  46. <!-- <view class="selected" v-if="goodsType == 0">
  47. 已选:
  48. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
  49. </view> -->
  50. </view>
  51. </view>
  52. <view v-for="(item, index) in specList" :key="index" class="attr-list">
  53. <text>{{ item.attr_name }}</text>
  54. <view class="item-list">
  55. <text
  56. v-for="(childItem, childIndex) in item.attr_value"
  57. :key="childIndex"
  58. class="tit"
  59. :class="{ selected: childItem.check }"
  60. @click="selectSpec(childItem, item, index)"
  61. >
  62. {{ childItem.attr }}
  63. </text>
  64. </view>
  65. </view>
  66. <view class="flex">
  67. <view>购买数量</view>
  68. <view class="item-list">
  69. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
  70. </view>
  71. </view>
  72. <button class="btn" @click.stop="buy">确定</button>
  73. </view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. import uniNumberBox from '@/components/uni-number-box.vue';
  79. import { goodsDetail, cartAdd } from '@/api/product.js';
  80. import { mapState } from 'vuex';
  81. import store from '@/store/index.js';
  82. import { orderData, userinfo } from '@/api/user.js';
  83. import { saveUrl } from '@/utils/loginUtils.js';
  84. // #ifdef H5
  85. import { weixindata, shareLoad } from '@/utils/wxAuthorized';
  86. // #endif
  87. // 头部轮播图
  88. import topSwiper from './common/topSwiper.vue';
  89. // 标题
  90. import productContent from './common/productContent.vue';
  91. // 到货时间及优惠
  92. import discounts from './common/discounts.vue';
  93. // 规格信息
  94. import freshDetail from './common/freshDetail.vue';
  95. // 图文详情
  96. import contentText from './common/contentText.vue';
  97. // 底部按钮
  98. import productBottom from './common/productBottom.vue';
  99. // 猜你喜欢
  100. import guessLike from './common/guessLike.vue';
  101. // 评价
  102. import estimate from './common/estimate.vue';
  103. export default {
  104. components: {
  105. uniNumberBox,
  106. guessLike,
  107. topSwiper,
  108. productContent,
  109. discounts,
  110. freshDetail,
  111. contentText,
  112. productBottom,
  113. estimate
  114. },
  115. data() {
  116. return {
  117. goodsStore: 0, //选中库存
  118. specList: [],
  119. buys_show: true,
  120. buys_shows: false,
  121. specSelected: [], //选中的分类
  122. specClass: 'none', //显示隐藏弹窗
  123. many: 1, //1是单规格 2是多规格
  124. reply: '', //评论
  125. list: '', //商品详情的数据
  126. type: 1, //默认支付方式add为
  127. goodsType: 0,
  128. goodsNumber: 1, //购买数量
  129. goodsid: '', //商品id
  130. description: '', //商品描述
  131. goodsObjact: {
  132. percent: 1
  133. }, //保存商品数据
  134. //图片循环
  135. imgList: [],
  136. // 对比对象
  137. actionPrice: 0, //默认选中商品价格
  138. actionIntegral: 0, //默认选中商品积分
  139. actionImage: '', //默认选中图片
  140. good_list: '', //猜你喜欢列表
  141. goodsNumberMax: 0, //最大可购买数量
  142. // 倒计时数据保存
  143. seckillObj: {
  144. stopTime: 0, //结束时间
  145. stop: false, //是否结束
  146. stopTimeH: 0, //小时
  147. stopTimeM: 0, //分钟
  148. stopTimeS: 0, //秒钟
  149. stopTimeD: 0, //天
  150. upTime: 0 //更新组件内部组件用
  151. },
  152. // 拼团数据保存
  153. pink: {
  154. id: '', //拼团编号
  155. uid: '', //用户编号
  156. people: '', //拼团人数
  157. price: '', //拼团价格
  158. stop_time: '', //拼团结束时间
  159. nickname: '', //团长昵称
  160. avatar: '', //团长头像
  161. count: '', //拼团剩余人数
  162. h: '', //时
  163. i: '', //分
  164. s: '' //秒
  165. },
  166. userInfo: '',
  167. isVip: '0'
  168. };
  169. },
  170. filters: {
  171. parseIntTo(percent) {
  172. percent = +percent * 100;
  173. if (percent % 1 === 0) {
  174. return percent;
  175. } else {
  176. percent = percent.toFixed(1);
  177. return percent;
  178. }
  179. }
  180. },
  181. async onLoad(options) {
  182. let obj = this;
  183. userinfo({}).then(({ data }) => {
  184. obj.userInfo = data;
  185. console.log(data, '123456');
  186. });
  187. //保存商品id
  188. this.goodsid = options.id;
  189. this.goodsType = options.type;
  190. // 判断有无人邀请
  191. if (options.spread) {
  192. // 存储邀请人
  193. uni.setStorageSync('spread', options.spread);
  194. }
  195. if (options.isVip) {
  196. obj.isVip = options.isVip;
  197. }
  198. saveUrl();
  199. this.goodsDetail();
  200. // 注册邀请信息
  201. // #ifdef H5
  202. let bool = uni.getStorageSync('weichatBrowser') || '';
  203. if (bool) {
  204. weixindata();
  205. }
  206. // #endif
  207. },
  208. computed: {
  209. ...mapState(['weichatObj', 'baseURL', 'urlFile'])
  210. },
  211. methods: {
  212. //选择规格
  213. selectSpec(item, arr, ind) {
  214. arr.attr_value.forEach(function(e) {
  215. e.check = false;
  216. });
  217. item.check = true;
  218. let obj = this;
  219. obj.specSelected[ind] = item.attr;
  220. let str = obj.specSelected.join(',');
  221. // 获取当前选中的对象
  222. if (obj.productValue[str]) {
  223. obj.buys_show = true;
  224. obj.buys_shows = false;
  225. obj.actionPrice = obj.productValue[str].price;
  226. obj.actionIntegral = obj.productValue[str].integral; //保存默认选中商品积分
  227. obj.goodsNumberMax = obj.productValue[str].stock;
  228. obj.actionImage = obj.productValue[str].image;
  229. obj.uniqueId = obj.productValue[str].unique;
  230. obj.goodsStore = obj.productValue[str].stock;
  231. } else {
  232. (obj.buys_show = false), (obj.buys_shows = true);
  233. }
  234. if (obj.goodsStore == 0) {
  235. obj.buys_show = false;
  236. obj.buys_shows = true;
  237. }
  238. obj.specSelected[ind] = item.attr;
  239. },
  240. // 打開彈窗
  241. specOPne(type = 1) {
  242. let obj = this;
  243. obj.specClass = 'show';
  244. obj.type = type;
  245. },
  246. //规格弹窗开关
  247. toggleSpec(str) {
  248. if (this.specClass === 'show') {
  249. this.specClass = 'hide';
  250. setTimeout(() => {
  251. this.specClass = 'none';
  252. }, 250);
  253. } else if (this.specClass === 'none') {
  254. this.specClass = 'show';
  255. }
  256. // 保存当前购买类型
  257. this.type = str;
  258. },
  259. // 购买数量变化
  260. numberChange(e) {
  261. this.goodsNumber = e.number;
  262. },
  263. // #ifdef H5
  264. // 加载微信html5页面分享方法
  265. shareDate() {
  266. let obj = this;
  267. // 保存分享人id链接
  268. let url = window.location.href + '&spread=' + this.userInfo.uid;
  269. // 判断是否微信浏览器
  270. let bool = uni.getStorageSync('weichatBrowser') || '';
  271. if (bool) {
  272. // 过滤微信强制添加的链接地址
  273. url = url.replace(/[\?,&]from=singlemessage/g, '');
  274. let data = {
  275. link: url, // 分享链接
  276. imgUrl: obj.goodsObjact.image, // 分享图标
  277. desc: obj.goodsObjact.store_info,
  278. title: obj.goodsObjact.store_name,
  279. success: function(e) {
  280. console.log(e);
  281. }
  282. };
  283. console.log(data, '分享');
  284. shareLoad(data);
  285. }
  286. },
  287. // #endif
  288. // 跳转页面
  289. navTo(url) {
  290. uni.navigateTo({
  291. url: '/pages/product/reply?id=' + this.goodsid
  292. });
  293. },
  294. //加入购物车
  295. Addcar(item) {
  296. let obj = this;
  297. cartAdd({
  298. cartNum: '1', //商品数量
  299. uniqueId: '', //商品标签
  300. new: 0, //商品是否新增加到购物车1为不加入0为加入
  301. mer_id: '',
  302. productId: item.id //商品编号
  303. })
  304. .then(function(e) {
  305. uni.showToast({
  306. title: '成功加入购物车',
  307. type: 'top',
  308. duration: 500,
  309. icon: 'none'
  310. });
  311. obj.goodsDetail();
  312. })
  313. .catch(e => {
  314. console.log(e);
  315. });
  316. },
  317. goodsDetail() {
  318. let obj = this;
  319. // 获取普通商品信息
  320. goodsDetail({}, this.goodsid).then(function({ data }) {
  321. console.log(data, 'obj.data');
  322. obj.list = data;
  323. obj.good_list = data.good_list; //保存猜你喜欢列表
  324. obj.reply = data.reply; //保存评论列表
  325. let goods = data.storeInfo;
  326. obj.goodsObjact = goods;
  327. console.log(obj.goodsObjact, 'obj.goodsObjact');
  328. if (obj.goodsObjact.description != null) {
  329. obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
  330. } //小程序商品详情图超出屏幕问题
  331. obj.imgList = goods.slider_image; //保存轮播图
  332. obj.specList = data.productAttr; //保存分类列表
  333. if (Array.isArray(data.productValue) != true) {
  334. obj.many = 2;
  335. obj.specList = data.productAttr; //保存产品属性
  336. obj.productValue = data.productValue; //保存属性值
  337. obj.specSelected = []; //初始化默认选择对象
  338. for (let i = 0; i < obj.specList.length; i++) {
  339. // 设置默认数据
  340. let attrValue = obj.specList[i].attr_value[0];
  341. attrValue.check = true;
  342. obj.specSelected.push(attrValue.attr);
  343. }
  344. let str = obj.specSelected.join(',');
  345. console.log(str, 'str');
  346. // 设置默认值
  347. obj.actionPrice = obj.productValue[str].price;
  348. obj.actionIntegral = obj.productValue[str].integral; //保存默认选中商品积分
  349. obj.goodsObjact.integral = obj.actionIntegral;
  350. obj.goodsNumberMax = obj.productValue[str].stock;
  351. obj.actionImage = obj.productValue[str].image;
  352. obj.uniqueId = obj.productValue[str].unique;
  353. obj.goodsStore = obj.productValue[str].quota;
  354. } else {
  355. obj.many = 1;
  356. obj.productValue = data.productValue; //保存分类查询数据
  357. obj.actionPrice = goods.price; //保存默认选中商品价格
  358. obj.actionIntegral = goods.integral; //保存默认选中商品积分
  359. obj.actionImage = goods.image_base; //保存默认选中商品图片
  360. obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
  361. }
  362. obj.shopId = data.mer_id; //保存商店id
  363. // #ifdef H5
  364. obj.shareDate();
  365. // #endif
  366. });
  367. },
  368. // #ifdef H5
  369. // 加载微信html5页面分享方法
  370. shareDate() {
  371. let obj = this;
  372. // 保存分享人id链接
  373. let url = window.location.href + '&spread=' + this.userInfo.uid;
  374. // 判断是否微信浏览器
  375. let bool = uni.getStorageSync('weichatBrowser') || '';
  376. if (bool) {
  377. // 过滤微信强制添加的链接地址
  378. url = url.replace(/[\?,&]from=singlemessage/g, '');
  379. let data = {
  380. link: url, // 分享链接
  381. imgUrl: obj.goodsObjact.image, // 分享图标
  382. desc: obj.goodsObjact.store_info,
  383. title: obj.goodsObjact.store_name,
  384. success: function(e) {
  385. console.log(e);
  386. }
  387. };
  388. shareLoad(data);
  389. }
  390. },
  391. // #endif
  392. // 立即购买
  393. buy() {
  394. let obj = this;
  395. // 创建传值对象
  396. let data = {
  397. cartNum: obj.goodsNumber, //商品数量
  398. new: 1,
  399. productId: obj.goodsid, //商品编号
  400. uniqueId: obj.uniqueId
  401. };
  402. if (obj.type == 2) {
  403. data.new = 0;
  404. }
  405. cartAdd(data)
  406. .then(function(e) {
  407. let da = e.data;
  408. if (obj.type == 1) {
  409. // 跳转到支付页
  410. uni.navigateTo({
  411. url: '/pages/order/createOrder?id=' + da.cartId
  412. });
  413. }
  414. if (obj.type == 2) {
  415. uni.showToast({
  416. title: '成功加入购物车',
  417. type: 'top',
  418. duration: 2000,
  419. icon: 'none'
  420. });
  421. obj.goodsDetail();
  422. }
  423. obj.toggleSpec();
  424. })
  425. .catch(e => {
  426. console.log(e);
  427. });
  428. },
  429. buy1() {
  430. let obj = this;
  431. let data = {
  432. cartNum: obj.goodsNumber, //商品数量
  433. new: 1,
  434. productId: obj.goodsid, //商品编号
  435. uniqueId: obj.uniqueId
  436. };
  437. if (obj.type == 2) {
  438. data.new = 0;
  439. }
  440. cartAdd(data)
  441. .then(function(e) {
  442. let da = e.data;
  443. if (obj.type == 1) {
  444. // 跳转到支付页
  445. uni.navigateTo({
  446. url: '/pages/order/createOrder?id=' + da.cartId
  447. });
  448. }
  449. if (obj.type == 2) {
  450. uni.showToast({
  451. title: '成功加入购物车',
  452. type: 'top',
  453. duration: 2000,
  454. icon: 'none'
  455. });
  456. obj.goodsDetail();
  457. }
  458. obj.toggleSpec();
  459. })
  460. .catch(e => {
  461. console.log(e);
  462. });
  463. },
  464. // 阻止触发上级事件
  465. stopPrevent() {}
  466. }
  467. };
  468. </script>
  469. <style lang="scss">
  470. /* 弹出层 */
  471. .popup {
  472. position: fixed;
  473. left: 0;
  474. top: 0;
  475. right: 0;
  476. bottom: 0;
  477. z-index: 99;
  478. &.show {
  479. display: block;
  480. .mask {
  481. animation: showPopup 0.2s linear both;
  482. }
  483. .layer {
  484. animation: showLayer 0.2s linear both;
  485. }
  486. }
  487. &.hide {
  488. .mask {
  489. animation: hidePopup 0.2s linear both;
  490. }
  491. .layer {
  492. animation: hideLayer 0.2s linear both;
  493. }
  494. }
  495. &.none {
  496. display: none;
  497. }
  498. .mask {
  499. position: fixed;
  500. top: 0;
  501. width: 100%;
  502. height: 100%;
  503. z-index: 1;
  504. background-color: rgba(0, 0, 0, 0.4);
  505. }
  506. .layer {
  507. position: fixed;
  508. z-index: 99;
  509. bottom: 0;
  510. width: 100%;
  511. min-height: 30vh;
  512. border-radius: 10rpx 10rpx 0 0;
  513. background-color: #fff;
  514. .btn {
  515. height: 66rpx;
  516. line-height: 66rpx;
  517. border-radius: 100rpx;
  518. // background: $uni-color-primary;
  519. background: #ff4c4c;
  520. font-size: $font-base + 2rpx;
  521. color: #fff;
  522. margin: 30rpx auto 20rpx;
  523. }
  524. }
  525. @keyframes showPopup {
  526. 0% {
  527. opacity: 0;
  528. }
  529. 100% {
  530. opacity: 1;
  531. }
  532. }
  533. @keyframes hidePopup {
  534. 0% {
  535. opacity: 1;
  536. }
  537. 100% {
  538. opacity: 0;
  539. }
  540. }
  541. @keyframes showLayer {
  542. 0% {
  543. transform: translateY(120%);
  544. }
  545. 100% {
  546. transform: translateY(0%);
  547. }
  548. }
  549. @keyframes hideLayer {
  550. 0% {
  551. transform: translateY(0);
  552. }
  553. 100% {
  554. transform: translateY(120%);
  555. }
  556. }
  557. }
  558. /* 规格选择弹窗 */
  559. .attr-content {
  560. padding: 10rpx 30rpx;
  561. .a-t {
  562. display: flex;
  563. image {
  564. width: 170rpx;
  565. height: 170rpx;
  566. flex-shrink: 0;
  567. border-radius: 8rpx;
  568. }
  569. .right {
  570. display: flex;
  571. flex-direction: column;
  572. padding-left: 24rpx;
  573. font-size: $font-sm + 2rpx;
  574. color: $font-color-base;
  575. line-height: 42rpx;
  576. .good-name {
  577. padding-top: 20rpx;
  578. max-width: 320rpx;
  579. font-size: 30rpx;
  580. font-family: PingFang SC;
  581. font-weight: bold;
  582. color: #1d2023;
  583. line-height: 42rpx;
  584. margin-bottom: 15rpx;
  585. }
  586. .price {
  587. font-size: 40rpx;
  588. font-family: PingFang SC;
  589. font-weight: bold;
  590. color: #ff6f0f;
  591. // font-size: $font-lg;
  592. // color: $uni-color-primary;
  593. // margin-bottom: 10rpx;
  594. }
  595. .selected-text {
  596. margin-right: 10rpx;
  597. }
  598. }
  599. }
  600. .attr-list {
  601. display: flex;
  602. flex-direction: column;
  603. font-size: $font-base + 2rpx;
  604. color: $font-color-base;
  605. padding-top: 30rpx;
  606. padding-left: 10rpx;
  607. }
  608. .item-list {
  609. padding: 20rpx 0 0;
  610. display: flex;
  611. flex-wrap: wrap;
  612. .tit {
  613. display: flex;
  614. align-items: center;
  615. justify-content: center;
  616. background: #eee;
  617. // margin-left: 10rpx;
  618. margin-right: 20rpx;
  619. margin-bottom: 20rpx;
  620. border-radius: 100rpx;
  621. min-width: 60rpx;
  622. height: 60rpx;
  623. padding: 0 20rpx;
  624. font-size: $font-base;
  625. color: $font-color-dark;
  626. }
  627. .selected {
  628. background: #fceff1;
  629. border: 1px solid #ef041f;
  630. color: #ef041f;
  631. }
  632. }
  633. }
  634. //默认商品底部高度
  635. .goodsBottom {
  636. height: 160rpx;
  637. }
  638. page {
  639. background: #f0f0f0;
  640. }
  641. //秒杀、拼团底部高度
  642. .contentBottomHeight {
  643. height: 110rpx;
  644. }
  645. //默认商品底部高度
  646. .goodsBottom {
  647. height: 160rpx;
  648. }
  649. /deep/ .iconenter {
  650. font-size: $font-base + 2rpx;
  651. color: #888;
  652. }
  653. /deep/ .con_image {
  654. width: 130rpx;
  655. height: 130rpx;
  656. display: inline-block;
  657. padding: 15rpx;
  658. image {
  659. width: 100%;
  660. height: 100%;
  661. }
  662. }
  663. /* 商品详情中限制图片大小 */
  664. /deep/ .rich-img {
  665. width: 100% !important;
  666. height: auto;
  667. }
  668. .c-list {
  669. margin-top: 20rpx;
  670. font-size: $font-sm + 2rpx;
  671. color: $font-color-base;
  672. background: #fff;
  673. .c-row {
  674. display: flex;
  675. align-items: center;
  676. padding: 20rpx 30rpx;
  677. position: relative;
  678. }
  679. .tit {
  680. width: 140rpx;
  681. }
  682. .con {
  683. flex: 1;
  684. color: $font-color-dark;
  685. .selected-text {
  686. margin-right: 10rpx;
  687. }
  688. }
  689. .bz-list {
  690. height: 40rpx;
  691. font-size: $font-sm + 2rpx;
  692. color: $font-color-dark;
  693. text {
  694. display: inline-block;
  695. margin-right: 30rpx;
  696. }
  697. }
  698. .con-list {
  699. flex: 1;
  700. display: flex;
  701. flex-direction: column;
  702. color: $font-color-dark;
  703. line-height: 40rpx;
  704. }
  705. .red {
  706. color: $uni-color-primary;
  707. }
  708. }
  709. </style>