index.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <template>
  2. <view :style="colorStyle">
  3. <!-- #ifdef MP || APP -->
  4. <NavBar titleText="门店拼单" iconColor="#FFFFFF" textColor="#FFFFFF" :showBack="collage_uid == uid" :showHome="collage_uid != uid"></NavBar>
  5. <!-- #endif -->
  6. <view class="headerBg">
  7. <!-- #ifdef MP || APP -->
  8. <view :style="{ height: `${getHeight.barTop}px` }"></view>
  9. <view :style="{ height: `${getHeight.barHeight}px` }"></view>
  10. <!-- #endif -->
  11. <view class="inner">
  12. <image class="back" mode="aspectFit" :src="imgHost+'/statics/images/group-buy.png'"></image>
  13. <view class="text-box">
  14. <image :src="imgHost+'/statics/images/group-text.png'" class="text-image"></image>
  15. <view>一起拼单享满减活动</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="content">
  20. <view class="top-placeholder"></view>
  21. <template v-if="status != -1">
  22. <view class="simple">
  23. <view class="seller">
  24. <view class="head acea-row">
  25. <view class="headCon">
  26. <text class="tag acea-row row-center-wrapper">{{delivery_type == 3 ? '配送' : '自提'}}</text>
  27. {{storeInfo.name || ''}}
  28. </view>
  29. <view>距您{{ storeInfo.range || 0 }}km</view>
  30. </view>
  31. <view>{{ storeInfo.address }}{{ storeInfo.detailed_address }}</view>
  32. </view>
  33. <view class="buyer acea-row row-middle">
  34. <view v-if="plainPartake.length" class="avatar-group">
  35. <template v-for="(item, index) in plainPartake">
  36. <image v-if="index <= 6" :key="item.userInfo.uid" class="avatar" :src="item.userInfo.avatar || '/static/images/f.png'" mode="aspectFill"></image>
  37. </template>
  38. <view v-if="plainPartake.length > 7" class="gengduo"><text class="iconfont icon-gengduo"></text></view>
  39. </view>
  40. <view>{{ plainPartake.length }}人已点单</view>
  41. <!-- #ifdef MP -->
  42. <view v-if="status != 2" class="btn acea-row row-center row-middle" @click="refresh">
  43. <text class="iconfont icon-ic_Refresh"></text>刷新
  44. </view>
  45. <!-- #endif -->
  46. <!-- #ifdef H5 -->
  47. <view v-if="status != 2 && $wechat.isWeixin()" class="btn acea-row row-center row-middle" @click="refresh">
  48. <text class="iconfont icon-ic_Refresh"></text>刷新
  49. </view>
  50. <!-- #endif -->
  51. </view>
  52. <view v-if="collage_uid == uid && status != 2" class="btn-box acea-row row-center">
  53. <view class="btn acea-row row-center row-middle" @click="onCancel">取消拼单</view>
  54. <!-- #ifdef MP -->
  55. <button class="btn acea-row row-center row-middle primary" hover-class="none" open-type="share">邀请好友</button>
  56. <!-- #endif -->
  57. <!-- #ifdef H5 -->
  58. <button v-if="$wechat.isWeixin()" class="btn acea-row row-center row-middle primary" hover-class="none" @tap="onShare">邀请好友</button>
  59. <!-- #endif -->
  60. </view>
  61. </view>
  62. <view v-if="collage_uid != uid" class="status">
  63. <view class="head">当前拼单进度</view>
  64. <view class="body">
  65. <view v-for="(item, index) in statusList" :key="item.value" :class="{ active: item.value == status }" class="item">
  66. <view class="number">{{ index + 1 }}</view>
  67. <view>{{ item.name }}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="collagePartake.length" class="choice">
  72. <view v-for="item in collagePartake" :key="item.userInfo.uid" class="wrapper">
  73. <view class="head acea-row row-middle">
  74. <view>
  75. <image class="avatar" :src="item.userInfo.avatar || '/static/images/f.png'" mode="aspectFill"></image>
  76. </view>
  77. <view class="name">
  78. <view class="acea-row row-middle inner">
  79. <view class="line1 nickname">{{ item.userInfo.nickname }}</view>
  80. <text v-if="item.userInfo.uid == uid">(我)</text>
  81. <text v-else-if="item.userInfo.uid == collage_uid">(发起人)</text>
  82. <text v-if="!item.goods.length" class="tips">尚未选购</text>
  83. </view>
  84. </view>
  85. <template v-if="status != 2">
  86. <button v-if="item.userInfo.uid == uid && item.goods.length" class="button remove" hover-class="none" @tap="onRemove">清空</button>
  87. <button v-if="item.userInfo.uid == uid && item.goods.length" class="button" hover-class="none" @tap="onChange">修改</button>
  88. <button v-if="item.userInfo.uid != uid && item.goods.length" class="button" hover-class="none" @tap="onCopy(item.userInfo.uid)">跟TA选一样</button>
  89. <button v-if="item.userInfo.uid == uid && !item.goods.length" class="button select" hover-class="none" @tap="onChange">立即选购</button>
  90. </template>
  91. </view>
  92. <view v-if="item.goods.length" class="body">
  93. <view v-for="goods in item.goods" :key="goods.id" :class="{ gray: !goods.is_true_stock }" class="item acea-row">
  94. <view>
  95. <image class="image" :src="goods.productInfo.attrInfo.image" mode="aspectFill"></image>
  96. </view>
  97. <view class="text">
  98. <view class="name line2">{{ goods.productInfo.store_name }}</view>
  99. <view class="attr line1">{{ goods.productInfo.attrInfo.suk }}</view>
  100. </view>
  101. <view>
  102. <BaseMoney :money="goods.truePrice" symbolSize="20" integerSize="32" decimalSize="20" color="#333333"></BaseMoney>
  103. <view class="number">共{{ goods.cart_num }}件</view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view v-if="collage_uid == uid && status != 2" class="footer">
  110. <view class="footer-wrap acea-row row-middle">
  111. <view class="total">
  112. 最终优惠价:<BaseMoney :money="total" symbolSize="28" integerSize="44" decimalSize="28"></BaseMoney>
  113. </view>
  114. <button class="btn" hover-class="none" @tap="setting">去结算</button>
  115. </view>
  116. </view>
  117. </template>
  118. <view v-else class="empty">
  119. <emptyPage title="该订单已被发起人取消,返回重新选购">
  120. <template v-slot:bottom>
  121. <view class="btn" @click="goStore">返回门店</view>
  122. </template>
  123. </emptyPage>
  124. </view>
  125. </view>
  126. <!-- 发送给朋友图片 -->
  127. <view class="share-box" v-if="H5ShareBox">
  128. <image :src="imgHost + '/statics/images/share-info.png'" @click="H5ShareBox = false">
  129. </image>
  130. </view>
  131. <tuiModal :show="dialogShow" padding="40rpx" radius="32rpx" custom>
  132. <view class="dialog">
  133. <view class="title">确定要结算吗?</view>
  134. <view class="info">结算后,其他人无法再加入或修改商品</view>
  135. <view class="btn-box acea-row">
  136. <view class="btn" @click="dialogShow = false">取消</view>
  137. <view class="btn primary" @click="getCollagePartake(onSettle)">确认</view>
  138. </view>
  139. </view>
  140. </tuiModal>
  141. </view>
  142. </template>
  143. <script>
  144. import home from '@/components/home';
  145. import NavBar from '@/components/NavBar.vue';
  146. import emptyPage from '@/components/emptyPage.vue';
  147. import tuiModal from '@/components/tui-modal/index.vue';
  148. import {
  149. getnearbyStore
  150. } from '@/api/new_store.js';
  151. import {
  152. getCollage,
  153. cancelCollage,
  154. settleCollage,
  155. getCollagePartake,
  156. emptyCollagePartake,
  157. duplicateCollagePartake
  158. } from '@/api/store.js'
  159. import colors from '@/mixins/color.js';
  160. import {
  161. mapGetters
  162. } from 'vuex';
  163. import {
  164. HTTP_REQUEST_URL
  165. } from '@/config/app';
  166. export default {
  167. components: {
  168. home,
  169. NavBar,
  170. emptyPage,
  171. tuiModal,
  172. },
  173. mixins: [colors],
  174. data() {
  175. return {
  176. getHeight: this.$util.getWXStatusHeight(),
  177. storeInfo: {},
  178. delivery_type: 2,
  179. where: {
  180. latitude: 0,
  181. longitude: 0,
  182. store_id: 0
  183. },
  184. collage_uid: 0,
  185. status: null,
  186. statusBarHeight: 0,
  187. navBarHeight: 0,
  188. collagePartake: [],
  189. isShowAuth: false,
  190. imgHost: HTTP_REQUEST_URL,
  191. statusList: [{
  192. name: '完成选购',
  193. value: 0,
  194. },
  195. {
  196. name: '提交订单',
  197. value: 1,
  198. },
  199. {
  200. name: '完成拼单',
  201. value: 2,
  202. }
  203. ],
  204. H5ShareBox: false,
  205. dialogShow: false,
  206. }
  207. },
  208. computed: {
  209. ...mapGetters(['uid', 'isLogin']),
  210. total() {
  211. return this.collagePartake.reduce((total, {
  212. sum_price
  213. }) => {
  214. return this.$util.$h.Add(total, sum_price);
  215. }, 0);
  216. },
  217. plainPartake() {
  218. let partake = this.collagePartake.filter(item => {
  219. return item.goods.length;
  220. });
  221. return partake;
  222. },
  223. canCheckUser() {
  224. return {
  225. status: this.status,
  226. collagePartake: this.collagePartake
  227. }
  228. }
  229. },
  230. watch: {
  231. canCheckUser(value) {
  232. if (value.status == 2 || !value.collagePartake.length) {
  233. return;
  234. }
  235. let hasUser = false;
  236. for (let partakeItem of this.collagePartake) {
  237. hasUser = this.uid == partakeItem.userInfo.uid;
  238. if (hasUser) {
  239. break;
  240. }
  241. }
  242. if (!hasUser) {
  243. this.$util.Tips({
  244. title: '请去个人中心登录'
  245. });
  246. }
  247. }
  248. },
  249. onLoad(options) {
  250. this.collage_id = options.collage_id;
  251. // #ifdef MP
  252. let {
  253. top,
  254. height
  255. } = uni.getMenuButtonBoundingClientRect();
  256. uni.getSystemInfo({
  257. success: (res) => {
  258. const {
  259. statusBarHeight
  260. } = res;
  261. this.statusBarHeight = statusBarHeight;
  262. this.navBarHeight = (top - statusBarHeight) * 2 + height;
  263. }
  264. });
  265. // #endif
  266. },
  267. onShow() {
  268. if (this.isLogin) {
  269. this.getLocation();
  270. } else {
  271. toLogin();
  272. }
  273. },
  274. methods: {
  275. getLocation() {
  276. // #ifdef H5
  277. if (this.$wechat.isWeixin()) {
  278. this.$wechat.location().then(res => {
  279. try {
  280. uni.setStorageSync('user_latitude', res.latitude);
  281. uni.setStorageSync('user_longitude', res.longitude);
  282. this.getCollage();
  283. this.getCollagePartake();
  284. } catch (e) {
  285. //TODO handle the exception
  286. }
  287. }).catch(() => {
  288. this.getCollage();
  289. this.getCollagePartake();
  290. });
  291. }
  292. // #endif
  293. // #ifdef MP
  294. uni.getLocation({
  295. type: 'gcj02',
  296. success: (res) => {
  297. try {
  298. uni.setStorageSync('user_latitude', res.latitude);
  299. uni.setStorageSync('user_longitude', res.longitude);
  300. } catch (e) {
  301. //TODO handle the exception
  302. }
  303. },
  304. fail: (err) => {
  305. this.$util.Tips({
  306. title: err
  307. });
  308. },
  309. complete: () => {
  310. this.getCollage();
  311. this.getCollagePartake();
  312. }
  313. });
  314. // #endif
  315. },
  316. // 授权回调
  317. onLoadFun() {
  318. this.isShowAuth = false;
  319. this.getLocation();
  320. },
  321. // 授权关闭
  322. authColse: function(e) {
  323. this.isShowAuth = e
  324. },
  325. getCollage() {
  326. getCollage({
  327. collage_id: this.collage_id
  328. }).then(res => {
  329. const {
  330. shipping_type,
  331. address_id,
  332. status,
  333. uid,
  334. store_id
  335. } = res.data.collage;
  336. this.delivery_type = shipping_type;
  337. this.address_id = address_id;
  338. this.status = status;
  339. this.collage_uid = uid;
  340. this.where.store_id = store_id;
  341. this.getnearbyStore();
  342. });
  343. },
  344. // 获取门店信息
  345. getnearbyStore() {
  346. try {
  347. this.where.latitude = uni.getStorageSync('user_latitude');
  348. this.where.longitude = uni.getStorageSync('user_longitude');
  349. } catch (e) {
  350. //TODO handle the exception
  351. }
  352. getnearbyStore(this.where).then(res => {
  353. this.storeInfo = res.data.info;
  354. // #ifdef H5
  355. if (this.$wechat.isWeixin()) {
  356. let configAppMessage = {
  357. desc: this.storeInfo.detailed_address,
  358. title: this.storeInfo.name,
  359. link: window.location.href,
  360. imgUrl: this.imgHost + '/statics/images/group-text.png',
  361. };
  362. this.$wechat.wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage', 'onMenuShareTimeline'], configAppMessage);
  363. }
  364. // #endif
  365. });
  366. },
  367. // 拼单商品信息
  368. getCollagePartake(callback) {
  369. this.dialogShow = false;
  370. if (!callback) {
  371. uni.showLoading({
  372. title: '加载中'
  373. });
  374. }
  375. getCollagePartake({
  376. collage_id: this.collage_id
  377. }).then(res => {
  378. this.collagePartake = res.data;
  379. if (!callback) {
  380. return uni.hideLoading();
  381. }
  382. let is_true_stock = true;
  383. for (let partakeItem of this.collagePartake) {
  384. if (!is_true_stock) {
  385. break;
  386. }
  387. for (let goodsItem of partakeItem.goods) {
  388. is_true_stock = goodsItem.is_true_stock;
  389. if (!is_true_stock) {
  390. break;
  391. }
  392. }
  393. }
  394. if (!is_true_stock) {
  395. return this.$util.Tips({
  396. title: '存在库存不足的商品,请检查'
  397. });
  398. }
  399. callback();
  400. }).catch(() => {
  401. uni.hideLoading();
  402. });
  403. },
  404. // 清空
  405. onRemove() {
  406. emptyCollagePartake({
  407. collage_id: this.collage_id
  408. }).then(res => {
  409. this.$util.Tips({
  410. title: '清空成功',
  411. success: () => {
  412. this.getCollagePartake();
  413. }
  414. });
  415. });
  416. },
  417. // 修改、立即选购
  418. onChange() {
  419. uni.navigateTo({
  420. url: `/pages/store/group_cart/index?id=${this.where.store_id}&collage_id=${this.collage_id}&delivery_type=${this.delivery_type}`
  421. });
  422. },
  423. // 跟TA选一样
  424. onCopy(c_uid) {
  425. duplicateCollagePartake({
  426. collage_id: this.collage_id,
  427. c_uid
  428. }).then(res => {
  429. this.$util.Tips({
  430. title: '跟TA选一样成功',
  431. success: () => {
  432. this.getCollagePartake();
  433. }
  434. });
  435. }).catch(err => {
  436. this.$util.Tips({
  437. title: err
  438. });
  439. });
  440. },
  441. // 取消拼单
  442. onCancel() {
  443. cancelCollage({
  444. collage_id: this.collage_id
  445. }).then(res => {
  446. this.$util.Tips({
  447. title: '取消拼单成功'
  448. }, {
  449. tab: 3
  450. });
  451. });
  452. },
  453. // 去结算
  454. onSettle() {
  455. if (!this.plainPartake.length) {
  456. return this.$util.Tips({
  457. title: '暂无人点单'
  458. });
  459. }
  460. settleCollage({
  461. collage_id: this.collage_id
  462. }).then(res => {
  463. uni.navigateTo({
  464. url: `/pages/goods/order_confirm/index?new=1&collage_id=${this.collage_id}&addressId=${this.address_id}&cartId=${res.data.cartIds}&delivery_type=${this.delivery_type}&store_id=${this.where.store_id}&store_name=${this.storeInfo.name}`
  465. });
  466. }).catch(err => {
  467. this.$util.Tips({
  468. title: err
  469. });
  470. });
  471. // uni.showModal({
  472. // title: '确定要结算吗?',
  473. // content: '结算后,其他人无法再加入或修改商品',
  474. // success: (res) => {
  475. // if (res.confirm) {
  476. // settleCollage({
  477. // collage_id: this.collage_id
  478. // }).then(res => {
  479. // uni.navigateTo({
  480. // url: `/pages/goods/order_confirm/index?new=1&collage_id=${this.collage_id}&addressId=${this.address_id}&cartId=${res.data.cartIds}&delivery_type=${this.delivery_type}&store_id=${this.where.store_id}&store_name=${this.storeInfo.name}`
  481. // });
  482. // }).catch(err => {
  483. // this.$util.Tips({
  484. // title: err
  485. // });
  486. // });
  487. // }
  488. // }
  489. // });
  490. },
  491. goStore() {
  492. uni.reLaunch({
  493. url: `/pages/store/home/index?id=${this.where.store_id}`
  494. })
  495. },
  496. goBack() {
  497. let pages = getCurrentPages();
  498. if (pages.length > 1) {
  499. uni.navigateBack();
  500. } else {
  501. this.goStore();
  502. }
  503. },
  504. // 刷新
  505. refresh() {
  506. this.getCollage();
  507. this.getCollagePartake();
  508. },
  509. onShare() {
  510. this.H5ShareBox = true;
  511. },
  512. setting() {
  513. this.dialogShow = true;
  514. }
  515. },
  516. }
  517. </script>
  518. <style>
  519. page {
  520. padding-bottom: 100rpx;
  521. padding-bottom: calc(100rpx + constant(safe-area-inset-bottom));
  522. padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
  523. background-color: #F5F5F5;
  524. }
  525. </style>
  526. <style scoped lang="scss">
  527. .nav-bar {
  528. position: fixed;
  529. top: 0;
  530. right: 0;
  531. left: 0;
  532. z-index: 9;
  533. background-color: var(--view-theme);
  534. .content {
  535. position: relative;
  536. display: flex;
  537. justify-content: center;
  538. align-items: center;
  539. height: 100rpx;
  540. font-size: 30rpx;
  541. color: #FFFFFF;
  542. }
  543. .button {
  544. position: absolute;
  545. top: 0;
  546. bottom: 0;
  547. left: 0;
  548. display: flex;
  549. align-items: center;
  550. padding: 0 30rpx;
  551. background-color: transparent;
  552. font-size: 24rpx;
  553. color: #FFFFFF;
  554. }
  555. }
  556. .headerBg {
  557. position: absolute;
  558. top: 0;
  559. left: 0;
  560. width: 100%;
  561. background: linear-gradient(360deg, #F5F5F5 0%, rgba(245, 245, 245, 0) 100%), linear-gradient(-90deg, var(--view-gradient) 37%, var(--view-theme) 100%);
  562. background-position: left bottom;
  563. background-size: 100% 120rpx, 100% 100%;
  564. background-repeat: no-repeat;
  565. .inner {
  566. position: relative;
  567. height: 346rpx;
  568. }
  569. .back {
  570. position: absolute;
  571. top: 22rpx;
  572. right: 36rpx;
  573. width: 240rpx;
  574. height: 172rpx;
  575. }
  576. .text-box {
  577. position: absolute;
  578. bottom: 200rpx;
  579. left: 48rpx;
  580. font-size: 24rpx;
  581. color: rgba(255, 255, 255, 0.8);
  582. }
  583. .text-image {
  584. width: 322rpx;
  585. height: 46rpx;
  586. margin-bottom: 20rpx;
  587. }
  588. }
  589. .simple {
  590. position: relative;
  591. padding: 32rpx 24rpx;
  592. border-radius: 24rpx;
  593. margin: 0 20rpx;
  594. background: #FFFFFF;
  595. .seller {
  596. font-size: 22rpx;
  597. line-height: 30rpx;
  598. color: #999999;
  599. .head {
  600. margin-bottom: 12rpx;
  601. color: #666666;
  602. .headCon {
  603. flex: 1;
  604. min-width: 0;
  605. font-weight: 500;
  606. font-size: 28rpx;
  607. line-height: 30rpx;
  608. color: #333333;
  609. }
  610. }
  611. .tag {
  612. display: inline-flex;
  613. flex-wrap: nowrap;
  614. padding: 0 8rpx;
  615. border: 1rpx solid var(--view-theme);
  616. border-radius: 4rpx;
  617. margin-right: 10rpx;
  618. font-size: 20rpx;
  619. height: 30rpx;
  620. color: var(--view-theme);
  621. transform: rotateZ(360deg);
  622. vertical-align: middle;
  623. }
  624. }
  625. .buyer {
  626. height: 40rpx;
  627. margin-top: 32rpx;
  628. font-size: 24rpx;
  629. color: #888888;
  630. .avatar-group {
  631. margin-right: 10rpx;
  632. font-size: 0;
  633. .gengduo {
  634. display: inline-flex;
  635. justify-content: center;
  636. align-items: center;
  637. width: 40rpx;
  638. height: 40rpx;
  639. border-radius: 50%;
  640. margin-left: -12rpx;
  641. background-color: #EEEEEE;
  642. vertical-align: middle;
  643. .iconfont {
  644. font-size: 26rpx;
  645. color: #8E8E8E;
  646. }
  647. }
  648. }
  649. .avatar {
  650. width: 40rpx;
  651. height: 40rpx;
  652. border-radius: 50%;
  653. vertical-align: middle;
  654. +.avatar {
  655. margin-left: -12rpx;
  656. }
  657. }
  658. .btn {
  659. width: 88rpx;
  660. height: 32rpx;
  661. border: 1rpx solid #CCCCCC;
  662. border-radius: 16rpx;
  663. margin-left: 20rpx;
  664. font-size: 20rpx;
  665. color: #666666;
  666. .iconfont {
  667. margin-right: 8rpx;
  668. font-size: 16rpx;
  669. color: #666666;
  670. }
  671. }
  672. }
  673. .btn-box {
  674. margin-top: 32rpx;
  675. .btn {
  676. width: 200rpx;
  677. height: 72rpx;
  678. border-radius: 36rpx;
  679. background: #EEEEEE;
  680. font-size: 26rpx;
  681. color: #666666;
  682. +.btn {
  683. margin-left: 24rpx;
  684. }
  685. &.primary {
  686. background-color: var(--view-theme);
  687. color: #FFFFFF;
  688. }
  689. }
  690. }
  691. }
  692. .choice {
  693. .wrapper {
  694. border-radius: 24rpx;
  695. margin: 20rpx;
  696. background-color: #FFFFFF;
  697. }
  698. .head {
  699. height: 108rpx;
  700. padding: 0 24rpx;
  701. .name {
  702. flex: 1;
  703. min-width: 0;
  704. padding: 0 20rpx;
  705. font-size: 26rpx;
  706. color: #333333;
  707. .inner {
  708. display: inline-flex;
  709. max-width: 100%;
  710. }
  711. .nickname {
  712. flex: 1;
  713. min-width: 0;
  714. }
  715. .tips {
  716. font-size: 22rpx;
  717. color: #888888;
  718. }
  719. }
  720. }
  721. .avatar {
  722. display: block;
  723. width: 40rpx;
  724. height: 40rpx;
  725. border-radius: 50%;
  726. }
  727. .button {
  728. transform: rotateZ(360deg);
  729. height: 56rpx;
  730. padding: 0 24rpx;
  731. border: 1rpx solid #CCCCCC;
  732. border-radius: 28rpx;
  733. font-size: 24rpx;
  734. line-height: 56rpx;
  735. color: #333333;
  736. +.button {
  737. margin-left: 20rpx;
  738. }
  739. &.remove {
  740. color: #999999;
  741. }
  742. &.select {
  743. border-color: var(--view-theme);
  744. background-color: var(--view-minorColorT);
  745. color: var(--view-theme);
  746. }
  747. &.primary {
  748. border-color: var(--view-theme);
  749. background-color: var(--view-minorColorT);
  750. color: var(--view-theme);
  751. }
  752. }
  753. .body {
  754. position: relative;
  755. padding: 32rpx 24rpx;
  756. font-size: 24rpx;
  757. line-height: 34rpx;
  758. color: #333333;
  759. &::before {
  760. content: "";
  761. position: absolute;
  762. top: 0;
  763. right: 24rpx;
  764. left: 24rpx;
  765. border-top: 1rpx solid #F5F5F5;
  766. }
  767. .text {
  768. flex: 1;
  769. min-width: 0;
  770. padding: 0 20rpx;
  771. .name {
  772. font-size: 28rpx;
  773. color: #333333;
  774. }
  775. .attr {
  776. margin-top: 12rpx;
  777. font-size: 24rpx;
  778. color: #999999;
  779. }
  780. }
  781. }
  782. .item {
  783. margin-top: 32rpx;
  784. &:first-child {
  785. margin-top: 0;
  786. }
  787. &.gray {
  788. background-color: #EEEEEE;
  789. }
  790. }
  791. .image {
  792. width: 136rpx;
  793. height: 136rpx;
  794. border-radius: 16rpx;
  795. }
  796. .number {
  797. margin-top: 10rpx;
  798. text-align: right;
  799. color: #999999;
  800. }
  801. .total {
  802. display: flex;
  803. justify-content: flex-end;
  804. align-items: center;
  805. padding: 0 26rpx;
  806. margin-top: 30rpx;
  807. }
  808. .money {
  809. font-weight: 600;
  810. color: var(--view-theme);
  811. }
  812. }
  813. .footer {
  814. position: fixed;
  815. right: 0;
  816. bottom: 0;
  817. left: 0;
  818. z-index: 9;
  819. padding-bottom: constant(safe-area-inset-bottom);
  820. padding-bottom: env(safe-area-inset-bottom);
  821. background-color: #FFFFFF;
  822. .footer-wrap {
  823. padding: 12rpx 32rpx;
  824. }
  825. .total {
  826. flex: 1;
  827. min-width: 0;
  828. font-weight: 500;
  829. font-size: 28rpx;
  830. color: #333333;
  831. }
  832. .money {
  833. color: var(--view-theme);
  834. }
  835. .btn {
  836. width: 142rpx;
  837. height: 72rpx;
  838. border-radius: 36rpx;
  839. background: linear-gradient(-90deg, var(--view-gradient) 0%, var(--view-theme) 100%);
  840. font-weight: 500;
  841. font-size: 26rpx;
  842. line-height: 72rpx;
  843. color: #FFFFFF;
  844. }
  845. }
  846. .status {
  847. padding: 34rpx 0 32rpx;
  848. border-radius: 14rpx;
  849. margin: 20rpx 30rpx;
  850. background-color: #FFFFFF;
  851. .head {
  852. display: flex;
  853. justify-content: center;
  854. align-items: center;
  855. font-size: 28rpx;
  856. line-height: 28rpx;
  857. color: #333333;
  858. }
  859. .body {
  860. display: flex;
  861. .item {
  862. flex: 1;
  863. min-width: 0;
  864. margin-top: 40rpx;
  865. text-align: center;
  866. font-size: 24rpx;
  867. line-height: 24rpx;
  868. color: #888888;
  869. &:first-child .number::before {
  870. display: none;
  871. }
  872. &.active {
  873. color: #333333;
  874. .number {
  875. border-color: var(--view-theme);
  876. background-color: var(--view-theme);
  877. color: #FFFFFF;
  878. }
  879. }
  880. }
  881. .number {
  882. position: relative;
  883. display: inline-flex;
  884. justify-content: center;
  885. align-items: center;
  886. width: 36rpx;
  887. height: 36rpx;
  888. border: 1rpx solid #CCCCCC;
  889. border-radius: 50%;
  890. margin-bottom: 20rpx;
  891. &::before {
  892. content: "";
  893. position: absolute;
  894. top: 50%;
  895. right: 100%;
  896. width: 160rpx;
  897. height: 1rpx;
  898. border-top: 1rpx dashed #D8D8D8;
  899. margin-right: 18rpx;
  900. }
  901. }
  902. }
  903. }
  904. .empty {
  905. position: relative;
  906. border-radius: 24rpx;
  907. margin: 0 20rpx;
  908. background: #FFFFFF;
  909. .btn {
  910. transform: rotateZ(360deg);
  911. width: 500rpx;
  912. height: 88rpx;
  913. border: 1rpx solid var(--view-theme);
  914. border-radius: 44rpx;
  915. margin: 108rpx auto 0;
  916. text-align: center;
  917. font-weight: 500;
  918. font-size: 28rpx;
  919. line-height: 88rpx;
  920. color: var(--view-theme);
  921. }
  922. }
  923. .share-box {
  924. z-index: 1000;
  925. position: fixed;
  926. left: 0;
  927. top: 0;
  928. width: 100%;
  929. height: 100%;
  930. image {
  931. width: 100%;
  932. height: 100%;
  933. }
  934. }
  935. .dialog {
  936. .title {
  937. text-align: center;
  938. font-weight: 500;
  939. font-size: 32rpx;
  940. line-height: 52rpx;
  941. color: #333333;
  942. }
  943. .info {
  944. margin-top: 24rpx;
  945. text-align: center;
  946. font-size: 30rpx;
  947. line-height: 42rpx;
  948. color: #666666;
  949. }
  950. .btn-box {
  951. margin-top: 40rpx;
  952. }
  953. .btn {
  954. flex: 1;
  955. height: 72rpx;
  956. border-radius: 36rpx;
  957. border: 1rpx solid var(--view-theme);
  958. margin-left: 32rpx;
  959. text-align: center;
  960. font-weight: 500;
  961. font-size: 26rpx;
  962. line-height: 72rpx;
  963. color: var(--view-theme);
  964. transform: rotateZ(360deg);
  965. &:first-child {
  966. margin-left: 0;
  967. }
  968. &.primary {
  969. background: var(--view-theme);
  970. color: #FFFFFF;
  971. }
  972. }
  973. }
  974. .content {
  975. .top-placeholder {
  976. height: 194rpx;
  977. }
  978. }
  979. </style>