index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <view style="background-color: #FFFFFF;height: 100%;" class="u-skeleton">
  3. <view class="u-page status_bar">
  4. <view class="head">
  5. <view class="status_bar">
  6. <!-- 这里是状态栏 -->
  7. </view>
  8. <view class="u-flex u-row-between" style="padding: 30rpx 40rpx">
  9. <view class="u-flex">
  10. <view class="u-skeleton-circle">
  11. <u-image width="130rpx" height="130rpx" :src="userInfo.storeImageUrl" :lazy-load="true" shape="circle">
  12. <view slot="error" style="font-size: 24rpx;" :fade="true" duration="450">加载失败
  13. </view>
  14. </u-image>
  15. </view>
  16. <view class="u-margin-left-10 u-skeleton-fillet">
  17. <view style="color: #fff;font-size: 40rpx;" class="u-margin-bottom-20 ">
  18. <text class="more_text">{{userInfo.storeName}}</text>
  19. </view>
  20. <view style="border: 1rpx solid #E3E3E3;border-radius: 30rpx;font-size:24rpx;color:#fff;padding: 2rpx 20rpx;text-align: center;">
  21. {{userInfo.province}}{{userInfo.city}}{{userInfo.district}}{{userInfo.addressInfo}}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="u-skeleton-fillet" @click="showQr=!showQr">
  26. <!-- <u-icon name="qr" size="80rpx" custom-prefix="van-icon" color="#fff"></u-icon> -->
  27. <u-image width="60rpx" height="60rpx" src="../../static/sailun/qrcode.png" :lazy-load="true">
  28. </u-image>
  29. </view>
  30. </view>
  31. <view class="u-flex u-row-around u-m-t-20">
  32. <view class="u-text-center u-skeleton-fillet">
  33. <view style="font-size:34rpx; color: #FFFFFF;">
  34. {{userInfo.contactName}}
  35. </view>
  36. <view style="color: #B3DAFF;opacity: 0.9;">
  37. 联系人
  38. </view>
  39. </view>
  40. <view class="u-text-center u-skeleton-fillet">
  41. <view style="font-size:34rpx;color: #FFFFFF;">
  42. {{userInfo.district}}
  43. </view>
  44. <view style="color: #B3DAFF;opacity: 0.9;">
  45. 区域
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view style="position: relative;top:-110rpx;margin-bottom: 100rpx;">
  51. <u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false"
  52. :border="false" class="u-skeleton-fillet">
  53. <view slot="head" class="u-flex u-row-between u-col-bottom">
  54. <view style="font-size: 34rpx;">
  55. 结算中心
  56. </view>
  57. <view class="u-col-bottom" @click="insettlement" style="color: #4B4B4B;font-size: 24rpx;">
  58. 查看全部
  59. </view>
  60. </view>
  61. <view slot="body">
  62. <view class="u-flex u-row-around">
  63. <view class="u-text-center">
  64. <view style="color: #0095FF;font-size: 30rpx;">
  65. {{userInfo.usableMoney|numberFormat}}
  66. </view>
  67. <view style="color: #333333;">
  68. 我的奖励
  69. </view>
  70. </view>
  71. <view class="u-text-center">
  72. <view style="color: #0095FF;font-size: 30rpx;">
  73. {{userInfo.blockMoney|numberFormat}}
  74. </view>
  75. <view style="color: #333333;">
  76. 冻结奖励
  77. </view>
  78. </view>
  79. <view class="u-text-center">
  80. <view style="color: #0095FF;font-size: 30rpx;">
  81. {{userInfo.allBlockMoney|numberFormat}}
  82. </view>
  83. <view style="color: #333333;">
  84. 待核销
  85. </view>
  86. </view>
  87. <view class="u-text-center">
  88. <view style="color: #0095FF;font-size: 30rpx;">
  89. {{userInfo.storeTotalIntegral|numberFormat}}
  90. </view>
  91. <view style="color: #333333;">
  92. 可用积分
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </u-card>
  98. <u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false"
  99. :border="false" class="u-skeleton-fillet">
  100. <view slot="head" class="u-flex u-row-between u-col-bottom">
  101. <view style="font-size: 34rpx;">
  102. 我的服务
  103. </view>
  104. </view>
  105. <view slot="body">
  106. <view class="u-flex u-row-around u-flex-wrap u-col-between" style="height: 300rpx;font-size: 24rpx;">
  107. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inInstore">
  108. <view>
  109. <u-image width="80rpx" height="80rpx" src="../../static/sailun/instock.png" :lazy-load="true" shape="circle">
  110. </u-image>
  111. </view>
  112. <view style="color: #000000;" class="u-m-t-10">
  113. 入库明细
  114. </view>
  115. </view>
  116. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inOutstore">
  117. <view>
  118. <u-image width="80rpx" height="80rpx" src="../../static/sailun/outstock.png" :lazy-load="true" shape="circle">
  119. </u-image>
  120. </view>
  121. <view style="color: #000000;" class="u-m-t-10">
  122. 出库明细
  123. </view>
  124. </view>
  125. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inReward">
  126. <view>
  127. <u-image width="80rpx" height="80rpx" src="../../static/sailun/reward.png" :lazy-load="true" shape="circle">
  128. </u-image>
  129. </view>
  130. <view style="color: #000000;" class="u-m-t-10">
  131. 奖励明细
  132. </view>
  133. </view>
  134. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inStatistical">
  135. <view>
  136. <u-image width="80rpx" height="80rpx" src="../../static/sailun/task.png" :lazy-load="true" shape="circle">
  137. </u-image>
  138. </view>
  139. <view style="color: #000000;" class="u-m-t-10">
  140. 任务统计
  141. </view>
  142. </view>
  143. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inresult">
  144. <view>
  145. <u-image width="80rpx" height="80rpx" src="../../static/sailun/tirenum.png" :lazy-load="true" shape="circle">
  146. </u-image>
  147. </view>
  148. <view style="color: #000000;" class="u-m-t-10">
  149. 胎号查询
  150. </view>
  151. </view>
  152. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inorder">
  153. <view>
  154. <u-image width="80rpx" height="80rpx" src="../../static/sailun/me-order.png" :lazy-load="true" shape="circle">
  155. </u-image>
  156. </view>
  157. <view style="color: #000000;" class="u-m-t-10">
  158. 门店订单
  159. </view>
  160. </view>
  161. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inCoupon">
  162. <view>
  163. <u-image width="80rpx" height="80rpx" src="../../static/sailun/coupon.png" :lazy-load="true" shape="circle">
  164. </u-image>
  165. </view>
  166. <view style="color: #000000;" class="u-m-t-10">
  167. 我的优惠券
  168. </view>
  169. </view>
  170. <view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inSuppliers">
  171. <view>
  172. <u-image width="80rpx" height="80rpx" src="../../static/sailun/supplier.png" :lazy-load="true" shape="circle">
  173. </u-image>
  174. </view>
  175. <view style="color: #000000;" class="u-m-t-10">
  176. 我的供应商
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. </u-card>
  182. <u-cell-group>
  183. <u-cell-item title="核销记录" @click="inWrite">
  184. <u-icon slot="icon" size="42" name="balance-o" custom-prefix="van-icon"></u-icon>
  185. </u-cell-item>
  186. <u-cell-item title="兑换记录">
  187. <u-icon slot="icon" size="42" name="balance-list-o" custom-prefix="van-icon"></u-icon>
  188. </u-cell-item>
  189. <u-cell-item title="经销商库存" @click="inAgentStock">
  190. <u-icon slot="icon" size="42" name="points" custom-prefix="van-icon"></u-icon>
  191. </u-cell-item>
  192. <u-cell-item title="设置" @click="inSetting">
  193. <u-icon slot="icon" size="42" name="setting-o" custom-prefix="van-icon"></u-icon>
  194. </u-cell-item>
  195. </u-cell-group>
  196. </view>
  197. </view>
  198. <u-modal v-model="showQr" :show-title="false" :mask-close-able="true" :show-confirm-button="false" width="440">
  199. <view class="slot-content u-p-40 u-flex u-row-center">
  200. <u-image width="360rpx" height="360rpx" :src="userInfo.qrbarcodeSrc"></u-image>
  201. </view>
  202. </u-modal>
  203. <u-skeleton :loading="loading" :animation="true"></u-skeleton>
  204. </view>
  205. </template>
  206. <script>
  207. import {
  208. request
  209. } from '../../common/request/request'
  210. require("promise.prototype.finally").shim()
  211. export default {
  212. data() {
  213. return {
  214. userInfo: "",
  215. showQr: false,
  216. loading: true, // 是否显示骨架屏组件
  217. };
  218. },
  219. filters: {
  220. numberFormat(value) {
  221. let unit = '';
  222. if (value) {
  223. var k = 10000,
  224. sizes = ['', '万', '亿', '万亿'],
  225. i;
  226. if (value < k) {
  227. value = value;
  228. } else {
  229. i = Math.floor(Math.log(value) / Math.log(k));
  230. value = ((value / Math.pow(k, i))).toFixed(2);
  231. unit = sizes[i];
  232. }
  233. return value + unit;
  234. } else {
  235. return 0
  236. }
  237. }
  238. },
  239. created() {
  240. this.getMyinfo()
  241. },
  242. methods: {
  243. getMyinfo() {
  244. request({
  245. url: '/myapp/selectStore',
  246. method: 'post',
  247. data: {
  248. "storeId": this.$store.state.storeInfo.storeId,
  249. }
  250. }).then(res => {
  251. this.userInfo = res.data.data
  252. }).catch(err => {
  253. console.log(err)
  254. }).finally(() => {
  255. this.loading = false;
  256. uni.hideLoading();
  257. })
  258. },
  259. inInstore() {
  260. this.$u.route({
  261. url: 'pages/me/Warehousing-details/index',
  262. })
  263. },
  264. inOutstore() {
  265. this.$u.route({
  266. url: 'pages/me/Delivery-details/index',
  267. })
  268. },
  269. inReward() {
  270. this.$u.route({
  271. url: 'pages/me/Reward-details/index',
  272. })
  273. },
  274. inStatistical() {
  275. this.$u.route({
  276. url: 'pages/me/Statistical-task/index',
  277. })
  278. },
  279. inresult() {
  280. this.$u.route({
  281. url: 'pages/me/scancodequery/scan',
  282. })
  283. },
  284. inorder() {
  285. this.$u.route({
  286. url: 'pages/me/my-order/my-order',
  287. })
  288. },
  289. inCoupon() {
  290. this.$u.toast('我的优惠券暂不开放');
  291. // this.$u.route({
  292. // url: 'pages/me/coupon',
  293. // })
  294. },
  295. inSuppliers() {
  296. this.$u.route({
  297. url: 'pages/me/suppliers',
  298. })
  299. },
  300. inAgentStock() {
  301. this.$u.route({
  302. url: 'pages/me/agent-stock/agent-stock',
  303. })
  304. },
  305. inSetting() {
  306. this.$u.route({
  307. url: 'pages/me/setting/setting',
  308. })
  309. },
  310. // 核销管理
  311. inWrite() {
  312. this.$u.route({
  313. url: 'pages/me/Write-off-management/index',
  314. })
  315. },
  316. // 查看结算
  317. insettlement() {
  318. this.$u.route({
  319. url: 'pages/me/Settlement-center/index',
  320. })
  321. }
  322. }
  323. }
  324. </script>
  325. <style lang="scss" scoped>
  326. .status_bar {
  327. height: var(--status-bar-height);
  328. }
  329. .head {
  330. width: 750rpx;
  331. min-height: 460rpx;
  332. background-image: url(../../static/sailun/mebg.png);
  333. background-size: 100% 100%;
  334. }
  335. .more_text {
  336. text-overflow: ellipsis;
  337. overflow: hidden;
  338. display: -webkit-box;
  339. -webkit-line-clamp: 1;
  340. /*设置显示行数,此处为2行*/
  341. -webkit-box-orient: vertical;
  342. width: 450rpx;
  343. }
  344. </style>