diningCar.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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;">{{dinList.name ? dinList.name : '无'}}</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="dinList.openState ? '营业中' : '离线'" :type="dinList.openState ? '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" icon="phone" 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. name: '23333',
  32. openState: 1,
  33. },
  34. }
  35. },
  36. onLoad(e) {
  37. this.fatchDate(e);
  38. },
  39. // created() {
  40. // this.fatchDate(e.id)
  41. // },
  42. methods: {
  43. call() {
  44. if (this.orderinfo.shopCall) {
  45. uni.makePhoneCall({
  46. phoneNumber: this.orderinfo.shopCall
  47. });
  48. } else {
  49. uni.showToast({
  50. icon: 'none',
  51. title: '暂无商家电话'
  52. })
  53. }
  54. },
  55. fatchDate(e) {
  56. console.log('e===========================e', e)
  57. var queryParmas = {
  58. id : e.id
  59. }
  60. console.log('idididididid', queryParmas)
  61. const result = this.$request('post', '/sale/diningCar/queryDiningCarById', queryParmas)
  62. if (result) {
  63. this.dinList = result.data
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .font {
  71. font-family: "CustomFont";
  72. color: #fff;
  73. }
  74. .flex-container {
  75. display: flex;
  76. align-items: center;
  77. /* 垂直居中 */
  78. justify-content: flex-start;
  79. /* 水平左对齐 */
  80. }
  81. .flex-item {
  82. /* 根据需要设置text的宽度 */
  83. width: 100%;
  84. /* 或者其他适当的宽度 */
  85. }
  86. .tag-item {
  87. margin-left: auto;
  88. /* 将标签推到右边 */
  89. }
  90. .box {
  91. padding: 20rpx 0;
  92. // background-image: linear-gradient(#00a551 10%, #fff 30%);
  93. border-bottom-left-radius: 30rpx;
  94. border-bottom-right-radius: 30rpx;
  95. background-position: top;
  96. box-shadow: 0 0 5px 2px #ebebeb;
  97. background-repeat: no-repeat;
  98. }
  99. .linear2 {
  100. // background-image: linear-gradient(#00a551 20%, #fff 50%);
  101. background-image: url('https://cdn.uviewui.com/uview/album/1.jpg');
  102. }
  103. .boxText {
  104. font-size: 28rpx;
  105. line-height: 40rpx;
  106. color: #c8c9cc;
  107. }
  108. .tabFlexBox {
  109. display: flex;
  110. text-align: center;
  111. // background-color: #fff;
  112. padding-bottom: 10rpx;
  113. }
  114. .tabFlexBox .tabFlexBoxItem {
  115. flex: 1;
  116. position: relative;
  117. }
  118. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemTitle {
  119. font-size: 36rpx;
  120. font-weight: bold;
  121. line-height: 80rpx;
  122. }
  123. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemDes {
  124. color: #c8c9cc;
  125. font-size: 28rpx;
  126. line-height: 40rpx;
  127. display: inline-block;
  128. padding: 0 20rpx;
  129. }
  130. .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemLine {
  131. width: 1px;
  132. height: 50rpx;
  133. background-color: #c8c9cc;
  134. position: absolute;
  135. top: 50%;
  136. transform: translateY(-50%);
  137. right: 0;
  138. }
  139. .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemTitle {
  140. color: #00a551;
  141. font-size: 40rpx;
  142. }
  143. .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemDes {
  144. background-color: #00a551;
  145. border-radius: 20rpx;
  146. color: #fff;
  147. }
  148. .boxContent2 {
  149. border-radius: 60rpx;
  150. background-color: #fff;
  151. padding: 40rpx;
  152. }
  153. .carList {
  154. display: flex;
  155. // flex-wrap: wrap;
  156. }
  157. .footer {
  158. flex-direction: column;
  159. position: fixed;
  160. left: 5px;
  161. right: 5px;
  162. bottom: 10px;
  163. }
  164. </style>