my.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <!-- #ifdef MP-WEIXIN -->
  3. <uv-navbar
  4. :fixed="false"
  5. :title="title"
  6. left-arrow
  7. @leftClick="$onClickLeft"
  8. />
  9. <!-- #endif -->
  10. <view class="p-3">
  11. <view class="card">
  12. <image class="headimg" :src="merchartShop.image" mode=""></image>
  13. <view class="left" @click="gopage('/pages/merchant/shopInfo/shopInfo')">
  14. <view class="one flex content-center">
  15. <view class="me-text-beyond" style="width: 440rpx;">
  16. {{merchartShop.name}}
  17. </view>
  18. </view>
  19. <view class="two flex content-center">
  20. <view class="flex content-center" style="margin-right: 20rpx;">
  21. <span v-if="isShow">营业中</span>
  22. <span v-else>歇业中</span>
  23. </view>
  24. <view class="flex content-center">
  25. 营业时间 {{formatDateTime(merchartShop.startTime,'hh:mm')}} - {{formatDateTime(merchartShop.endTime,'hh:mm')}}
  26. </view>
  27. </view>
  28. <view class="four flex flex-column">
  29. <view class="" style="margin-right: 20rpx;">
  30. 地址及电话:{{merchartShop.addressMap + ' ' + merchartShop.address + ' ' + merchartShop.mobile}}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="card_one">
  36. <view class="card_one_item flex content-center line" @click="gopage('/pages/components/pages/merchant/shopInfo')">
  37. <image src="/static/images/merchant/myshop.svg" mode=""></image>
  38. <view class="text">
  39. 店铺资料
  40. </view>
  41. </view>
  42. <view class="card_one_item flex content-center line"
  43. @click="gopage('/pages/components/pages/merchant/cashAccount')">
  44. <image src="/static/images/merchant/myaccount.svg" mode=""></image>
  45. <view class="text">
  46. 提现账号
  47. </view>
  48. </view>
  49. <view class="card_one_item flex content-center" @click="gopage('/pages/components/pages/merchant/withdrawal')">
  50. <image src="/static/images/merchant/mywith.png" mode=""></image>
  51. <view class="text">
  52. 提现明细
  53. </view>
  54. </view>
  55. </view>
  56. <uv-tabbar :value="value" @change="index=>value = index" activeColor="#059825">
  57. <uv-tabbar-item text="首页" icon="home" @click="gopage('/pages/components/pages/merchant/index')"></uv-tabbar-item>
  58. <uv-tabbar-item text="订单" icon="order" @click="gopage('/pages/components/pages/merchant/order')"></uv-tabbar-item>
  59. <uv-tabbar-item text="桌台" icon="bell" @click="gopage('/pages/components/pages/merchant/bell')"></uv-tabbar-item>
  60. <uv-tabbar-item text="我的" icon="account" @click="gopage('/pages/components/pages/merchant/my')"></uv-tabbar-item>
  61. <uv-tabbar-item text="返回" icon="arrow-leftward" @click="gopage2('/pages/index/index')"></uv-tabbar-item>
  62. </uv-tabbar>
  63. </view>
  64. </template>
  65. <script setup>
  66. import {
  67. ref
  68. } from 'vue'
  69. import {
  70. getRevenue
  71. } from '@/api/merchant'
  72. import { onLoad} from '@dcloudio/uni-app'
  73. import { useMainStore } from '@/store/store'
  74. import { storeToRefs } from 'pinia'
  75. import { formatDateTime } from '@/utils/util'
  76. const main = useMainStore()
  77. const { merchartShop } = storeToRefs(main)
  78. const title = ref('我的')
  79. const isShow = ref(true)
  80. const value = ref(3)
  81. const gopage = (url) =>{
  82. uni.navigateTo({
  83. url
  84. })
  85. }
  86. const getTime = () => {
  87. let date = new Date()
  88. let hour = date.getHours()
  89. let endHour= new Date(merchartShop.value.endTime).getHours()
  90. let startHour = new Date(merchartShop.value.startTime).getHours()
  91. if(merchartShop.value.status == 1){
  92. if (hour >= startHour && hour <= endHour ) {
  93. isShow.value = true
  94. }else{
  95. isShow.value = false
  96. }
  97. }else{
  98. isShow.value = false
  99. }
  100. }
  101. getTime()
  102. </script>
  103. <style lang="scss">
  104. .line {
  105. border-bottom: 1rpx solid #f3f3f3;
  106. }
  107. .card {
  108. position: relative;
  109. width: 700rpx;
  110. height: 280rpx;
  111. border-radius: 20rpx;
  112. //background: #24eb71;
  113. background: linear-gradient(180deg, #25140a 0, #402b16 100%, #402b16 100%) !important;
  114. .headimg {
  115. width: 124rpx;
  116. height: 124rpx;
  117. border-radius: 50%;
  118. position: absolute;
  119. top: 38rpx;
  120. left: 40rpx;
  121. }
  122. .left {
  123. position: absolute;
  124. top: 38rpx;
  125. left: 194rpx;
  126. .one {
  127. font-size: 40rpx;
  128. font-weight: 500;
  129. color: #FFFFFF;
  130. line-height: 56rpx;
  131. image {
  132. width: 42rpx;
  133. height: 42rpx;
  134. margin: 4rpx 0 0 10rpx;
  135. }
  136. }
  137. .two {
  138. font-size: 24rpx;
  139. color: #FFFFFF;
  140. margin: 16rpx 0;
  141. image {
  142. width: 30rpx;
  143. height: 30rpx;
  144. margin-right: 6rpx;
  145. }
  146. }
  147. .three {
  148. margin: 20rpx 0;
  149. .three_item {
  150. width: 114rpx;
  151. height: 44rpx;
  152. background: #93DBFF;
  153. border-radius: 4rpx;
  154. font-size: 24rpx;
  155. color: #0075AF;
  156. text-align: center;
  157. line-height: 44rpx;
  158. }
  159. }
  160. .four {
  161. font-size: 24rpx;
  162. color: #FFFFFF;
  163. }
  164. }
  165. }
  166. .card_one {
  167. border-radius: 14rpx;
  168. width: 700rpx;
  169. background-color: #fff;
  170. padding: 0rpx 40rpx;
  171. box-sizing: border-box;
  172. margin: 40rpx 0;
  173. .card_one_item {
  174. height: 110rpx;
  175. line-height: 110rpx;
  176. display: flex;
  177. align-items: center;
  178. image {
  179. width: 50rpx;
  180. height: 50rpx;
  181. margin-right: 20rpx;
  182. }
  183. .text {
  184. font-size: 28rpx;
  185. color: #333333;
  186. line-height: 50rpx;
  187. font-weight: 600;
  188. }
  189. }
  190. }
  191. </style>