business.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <div class="myBusiness">
  3. <uni-easyinput prefixIcon="search" v-model="Query.name" placeholder="店铺名称" @confirm="onsearch" confirmType="search"/>
  4. <div class="tabs flex_r flex_jb">
  5. <div v-for="(i,s) in tabs" :key="s"
  6. :class="{active:Query.status==i.status}"
  7. @click="ontab(i.status)">{{i.text}}</div>
  8. </div>
  9. <div class="list" v-if="list.length">
  10. <div class="list-item" v-for="(i,s) in list" :key="s">
  11. <div class="flex_r flex_ac flex_jb">
  12. <div class="head_info_row flex_r flex_ac">
  13. <image class="logo" :src="i.logo" />
  14. <div class="head_name">
  15. <div class="name">{{ i.name }}</div>
  16. <div class="flex_r flex_ac">
  17. <uni-rate :max="5" :value="i.score" :size="12" allow-half />
  18. <span class="commentScore">{{i.score}}分</span>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="twocode iconfont" @click="goto('/pagesC/invi-img/index',{merchant_id:i.merchant_id,shop_id:i.id,name:i.name})" v-if="i.status == 2">&#xe635;</div>
  23. </div>
  24. <div class="p1 flex_r">
  25. <div>商户姓名:{{i.contact}}</div>
  26. <div>商户电话:{{i.phone}}</div>
  27. </div>
  28. <div class="p1 flex_r">
  29. <div>今日流水:{{i.day_stream || "0.00"}}</div>
  30. <div>总流水:{{i.total_stream || "0.00"}}</div>
  31. </div>
  32. </div>
  33. </div>
  34. <empty v-else/>
  35. </div>
  36. </template>
  37. <script>
  38. import empty from "@/pagesC/components/empty/empty"
  39. import { post } from "@/request/api.js";
  40. export default {
  41. name: "myBusiness",
  42. props: {},
  43. components: {empty},
  44. data() {
  45. return {
  46. tabs: [
  47. { status: 2, text: "已审核" },
  48. { status: 1, text: "待审核" },
  49. { status: 3, text: "未通过" },
  50. ],
  51. list: [],
  52. Query: {
  53. page: 1,
  54. rows: 20,
  55. status: 2,
  56. operate: uni.getStorageSync("localInfo").operate
  57. },
  58. pageData: {},
  59. };
  60. },
  61. methods: {
  62. getList(page) {
  63. console.log(page);
  64. if (page) {
  65. this.list = []
  66. this.Query.page = 1
  67. }
  68. post("v1/merchant/region", this.Query).then(res => {
  69. if (res.code == 0) {
  70. let da = res.data.data
  71. delete res.data.data
  72. this.pageData = res.data
  73. this.list = [...this.list, ...da]
  74. this.Query.page++
  75. uni.hideLoading()
  76. }
  77. })
  78. },
  79. ontab(va){
  80. uni.showLoading({title: '加载中'})
  81. this.Query.status = va;
  82. this.getList(1)
  83. },
  84. onsearch(){
  85. uni.showLoading({title: '加载中'})
  86. this.getList(1)
  87. }
  88. },
  89. onLoad(da) {
  90. uni.showLoading({title: '加载中'})
  91. this.getList()
  92. },
  93. onShow() {},
  94. mounted() {},
  95. onReachBottom() {
  96. if (this.Query.page < this.pageData.last_page) this.getList();
  97. },
  98. };
  99. </script>
  100. <style scoped lang='scss'>
  101. .myBusiness {
  102. padding: 28rpx 32rpx;
  103. }
  104. .tabs {
  105. padding: 0 30rpx;
  106. font-size: 30rpx;
  107. font-weight: 600;
  108. margin-bottom: 18rpx;
  109. margin-top: 18rpx;
  110. .active {
  111. position: relative;
  112. &::after {
  113. content: "";
  114. width: 88rpx;
  115. height: 6rpx;
  116. background-color: #2E57FD;
  117. border-radius: 5rpx;
  118. position: absolute;
  119. left: 2rpx;
  120. bottom: -8rpx;
  121. }
  122. }
  123. }
  124. .list{
  125. padding: 30rpx 0;
  126. .list-item{
  127. padding: 28rpx 30rpx;
  128. margin-bottom: 50rpx;
  129. border-radius: 12rpx;
  130. background-color: #fff;
  131. box-shadow: 4rpx 4rpx 8rpx 4rpx rgba(0, 0, 0, 0.12);
  132. }
  133. .twocode {
  134. font-size: 60rpx;
  135. }
  136. .head_info_row {
  137. margin-bottom: 20rpx;
  138. .logo {
  139. width: 120rpx;
  140. height: 110rpx;
  141. border-radius: 12rpx;
  142. margin-right: 25rpx;
  143. border: 1px solid #e5e5e5;
  144. }
  145. .head_name {
  146. .name {
  147. font-size: 36rpx;
  148. font-weight: 600;
  149. margin-bottom: 12rpx;
  150. }
  151. .commentScore {
  152. margin-left: 10rpx;
  153. font-size: 24rpx;
  154. }
  155. }
  156. }
  157. .p1{
  158. font-size: 24rpx;
  159. margin-top: 6rpx;
  160. div{
  161. width: 50%;
  162. }
  163. }
  164. }
  165. </style>