diningCar.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view>
  3. <view class="boxWarp mb20px">
  4. <view class="box linear2" style="height:100vh;">
  5. <view class="boxContent2" style="margin-top:50%;">
  6. <view class="clearfix" style="margin-bottom: 10px;">
  7. <text class="fz26px" style="font-weight: bold;">{{dingName}}</text>
  8. <u-line dashed></u-line>
  9. </view>
  10. <view class="flex-container">
  11. <text class="flex-item">营业状态</text>
  12. <u-tag class="flex-item tag-item" plain :text="tags ? '营业中' : '离线'" :type="tags ? 'success' : 'error'" size="mini"></u-tag>
  13. </view>
  14. <text>客服电话:18011111111</text>
  15. </view>
  16. <view class="footer">
  17. <u-button type="primary" shape="circle" text="拨打客服电话"
  18. color="linear-gradient(to right, #F54319, #FF6D20)" @click="call()"></u-button>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. img: 'https://cdn.uviewui.com/uview/album/1.jpg',
  29. orderinfo: {},
  30. dinList: {},
  31. tags: 1,
  32. dingName: '23333'
  33. }
  34. },
  35. created() {
  36. this.fatchDate()
  37. },
  38. methods: {
  39. call() {
  40. if (this.orderinfo.shopCall) {
  41. uni.makePhoneCall({
  42. phoneNumber: this.orderinfo.shopCall
  43. });
  44. } else {
  45. uni.showToast({
  46. icon: 'none',
  47. title: '暂无商家电话'
  48. })
  49. }
  50. },
  51. fatchDate() {
  52. const params = {
  53. id: '1111'
  54. }
  55. //const result = await this.$request('get', '/diningCar/{id}')
  56. const result = this.$request('get', '/diningCar', params)
  57. if (result) {
  58. this.dinList = result.data
  59. }
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .font {
  66. font-family: "CustomFont";
  67. color: #fff;
  68. }
  69. .flex-container {
  70. display: flex;
  71. align-items: center;
  72. /* 垂直居中 */
  73. justify-content: flex-start;
  74. /* 水平左对齐 */
  75. }
  76. .flex-item {
  77. /* 根据需要设置text的宽度 */
  78. width: 100%;
  79. /* 或者其他适当的宽度 */
  80. }
  81. .tag-item {
  82. margin-left: auto;
  83. /* 将标签推到右边 */
  84. }
  85. .box {
  86. padding: 20rpx 0;
  87. // background-image: linear-gradient(#00a551 10%, #fff 30%);
  88. border-bottom-left-radius: 30rpx;
  89. border-bottom-right-radius: 30rpx;
  90. background-position: top;
  91. box-shadow: 0 0 5px 2px #ebebeb;
  92. background-repeat: no-repeat;
  93. }
  94. .linear2 {
  95. // background-image: linear-gradient(#00a551 20%, #fff 50%);
  96. background-image: url('https://cdn.uviewui.com/uview/album/1.jpg');
  97. }
  98. .boxText {
  99. font-size: 28rpx;
  100. line-height: 40rpx;
  101. color: #c8c9cc;
  102. }
  103. .tabFlexBox {
  104. display: flex;
  105. text-align: center;
  106. // background-color: #fff;
  107. padding-bottom: 10rpx;
  108. }
  109. .tabFlexBox .tabFlexBoxItem {
  110. flex: 1;
  111. position: relative;
  112. }
  113. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemTitle {
  114. font-size: 36rpx;
  115. font-weight: bold;
  116. line-height: 80rpx;
  117. }
  118. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemDes {
  119. color: #c8c9cc;
  120. font-size: 28rpx;
  121. line-height: 40rpx;
  122. display: inline-block;
  123. padding: 0 20rpx;
  124. }
  125. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemLine {
  126. width: 1px;
  127. height: 50rpx;
  128. background-color: #c8c9cc;
  129. position: absolute;
  130. top: 50%;
  131. transform: translateY(-50%);
  132. right: 0;
  133. }
  134. .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemTitle {
  135. color: #00a551;
  136. font-size: 40rpx;
  137. }
  138. .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemDes {
  139. background-color: #00a551;
  140. border-radius: 20rpx;
  141. color: #fff;
  142. }
  143. .boxContent2 {
  144. border-radius: 60rpx;
  145. background-color: #fff;
  146. padding: 40rpx;
  147. }
  148. .carList {
  149. display: flex;
  150. // flex-wrap: wrap;
  151. }
  152. .footer {
  153. flex-direction: column;
  154. position: fixed;
  155. left: 5px;
  156. right: 5px;
  157. bottom: 10px;
  158. }
  159. </style>