index.vue 11 KB

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