myShop.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="myshop">
  3. <div class="card">
  4. <div class="money" @click="goto('/pagesC/settledMerchant/balanceLog',{s:0})">¥{{money.withdraw_money || "0.00"}}</div>
  5. <div class="msg">可提现金额(元)</div>
  6. <div class="btn" @click="getToCash">
  7. <span>去提现</span>
  8. <span class="iconfont">&#xe62e;</span>
  9. </div>
  10. </div>
  11. <div class="elseMoney flex_r flex_jb flex_ac">
  12. <div class="total_money" @click="goto('/pagesC/settledMerchant/balanceLog',{s:1})">总收入<span>¥{{money.total_money || "0.00"}}</span></div>
  13. <div class="day_income" @click="goto('/pagesC/settledMerchant/balanceLog',{s:1})">今日收入<span>¥{{money.day_income || "0.00"}}</span></div>
  14. </div>
  15. <div class="list" v-if="list.length">
  16. <div class="list-item" v-for="(i,s) in list" :key="s" @click="goDetail(i.shop_id)">
  17. <div class="head_info_row flex_r flex_ac flex_jb">
  18. <image class="logo" :src="i.logo" />
  19. <div class="head_name">
  20. <div class="name">{{ i.name }}</div>
  21. <div class="flex_r flex_ac">
  22. <uni-rate :max="5" :value="i.score" :size="12" allow-half />
  23. <span class="commentScore">{{i.score}}分</span>
  24. </div>
  25. </div>
  26. <div class="twocode iconfont" @click.stop="showcode({id:i.shop_id,name:i.name})">&#xe635;</div>
  27. </div>
  28. <div class="p1 flex_r flex_jb flex_ac">
  29. <div class="l"><span class="iconfont">&#xe9d2;</span>业务员:{{i.nickname}}</div>
  30. <div class="r" @click.stop="copyText(i.mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{i.mobile}}<span class="iconfont copy">&#xe602;</span></div>
  31. </div>
  32. <div class="p1 flex_r flex_jb flex_ac" v-if="i.user_nickname">
  33. <div class="l"><span class="iconfont">&#xe9b9;</span>区域商:{{i.user_nickname}}</div>
  34. <div class="r" @click.stop="copyText(i.user_mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{i.user_mobile}}<span class="iconfont copy">&#xe602;</span></div>
  35. </div>
  36. </div>
  37. </div>
  38. <empty v-else />
  39. <create-code ref="createCode" />
  40. </div>
  41. </template>
  42. <script>
  43. import uniCopy from "@/utils/copy";
  44. import empty from "@/pagesC/components/empty/empty"
  45. import createCode from "@/pagesC/components/createCode/index"
  46. import { post } from "@/request/api.js";
  47. export default {
  48. name: "myshop",
  49. props: {},
  50. components: { empty, createCode },
  51. data() {
  52. return {
  53. list: [],
  54. money: {}
  55. };
  56. },
  57. methods: {
  58. getList(page) {
  59. uni.showLoading({ title: '加载中' })
  60. post("v1/merchant/myShop").then(res => {
  61. if (res.code == 0) {
  62. this.list = res.data.list.data
  63. let { day_income, total_money, withdraw_money } = res.data
  64. this.money = { day_income, total_money, withdraw_money }
  65. uni.hideLoading()
  66. }
  67. })
  68. },
  69. // 跳转到提现页面
  70. getToCash(type) {
  71. this.goto("/pages/cash/index", { type })
  72. },
  73. // 跳转到店铺详情
  74. goDetail(id) {
  75. // this.goto("/pagesC/settledMerchant/merchantDetail", { id })
  76. },
  77. showcode(da) {
  78. if(da.id) this.$refs.createCode.showCanvas(da)
  79. },
  80. // 复制账号
  81. copyText(e) {
  82. uniCopy({
  83. content: e,
  84. success: (res) => {},
  85. error: (e) => {},
  86. });
  87. },
  88. },
  89. onLoad(da) {
  90. this.getList()
  91. },
  92. onShow() {},
  93. mounted() {},
  94. };
  95. </script>
  96. <style scoped lang='scss'>
  97. .myshop {
  98. padding: 28rpx 32rpx;
  99. min-height: 100vh;
  100. background-color: #fff;
  101. }
  102. .card {
  103. height: 260rpx;
  104. border-radius: 30rpx;
  105. background: linear-gradient(to right, #696EFD, #2E57FD);
  106. position: relative;
  107. color: #fff;
  108. .money {
  109. font-size: 56rpx;
  110. font-weight: 600;
  111. padding-left: 35rpx;
  112. height: 55rpx;
  113. line-height: 55rpx;
  114. position: absolute;
  115. left: 0;
  116. top: calc(50% - 50rpx);
  117. }
  118. .msg {
  119. position: absolute;
  120. bottom: 30rpx;
  121. left: 0;
  122. padding-left: 38rpx;
  123. font-size: 26rpx;
  124. }
  125. .btn {
  126. color: #2E57FD;
  127. position: absolute;
  128. right: 0;
  129. top: calc(50% - 50rpx);
  130. width: 170rpx;
  131. text-align: center;
  132. height: 55rpx;
  133. line-height: 55rpx;
  134. font-size: 30rpx;
  135. background-color: #fff;
  136. border-radius: 28rpx 0 0 28rpx;
  137. .iconfont {
  138. font-size: 25rpx;
  139. margin-left: 12rpx;
  140. }
  141. }
  142. }
  143. .elseMoney {
  144. height: 120rpx;
  145. background-color: #ECECEC;
  146. border-radius: 0 0 30rpx 30rpx;
  147. margin-top: -30rpx;
  148. padding: 30rpx 32rpx 0;
  149. font-size: 26rpx;
  150. color: #666;
  151. div:last-child {
  152. text-align: right;
  153. }
  154. span {
  155. color: #2E57FD;
  156. font-size: 28rpx;
  157. margin-left: 8rpx;
  158. }
  159. }
  160. .list {
  161. padding: 60rpx 0 30rpx;
  162. .list-item {
  163. margin-bottom: 50rpx;
  164. border-radius: 16rpx;
  165. padding: 28rpx 32rpx;
  166. border: 2rpx solid rgba(0, 0, 0, 0.12);
  167. box-shadow: 4rpx 4rpx 8rpx 4rpx rgba(0, 0, 0, 0.12);
  168. }
  169. .head_info_row {
  170. .logo {
  171. width: 120rpx;
  172. height: 110rpx;
  173. border-radius: 12rpx;
  174. margin-right: 25rpx;
  175. border: 1px solid #e5e5e5;
  176. }
  177. .head_name {
  178. width: calc(100% - 220rpx);
  179. .name {
  180. font-size: 36rpx;
  181. font-weight: 600;
  182. margin-bottom: 12rpx;
  183. }
  184. .commentScore {
  185. margin-left: 10rpx;
  186. font-size: 24rpx;
  187. }
  188. }
  189. .twocode {
  190. font-size: 60rpx;
  191. }
  192. }
  193. .p1 {
  194. font-size: 26rpx;
  195. margin-top: 20rpx;
  196. .iconfont {
  197. font-size: 26rpx;
  198. color: #2E57FD;
  199. margin-right: 10rpx;
  200. }
  201. .copy{
  202. color: #333;
  203. margin-left: 6rpx;
  204. }
  205. }
  206. }
  207. </style>