index.vue 10 KB

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