index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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 {mapState,mapMutations} from 'vuex'
  208. import {
  209. request
  210. } from '../../common/request/request'
  211. require("promise.prototype.finally").shim()
  212. export default {
  213. data() {
  214. return {
  215. userInfo: "",
  216. showQr: false,
  217. loading: true, // 是否显示骨架屏组件
  218. };
  219. },
  220. filters: {
  221. numberFormat(value) {
  222. let unit = '';
  223. if (value) {
  224. var k = 10000,
  225. sizes = ['', '万', '亿', '万亿'],
  226. i;
  227. if (value < k) {
  228. value = value;
  229. } else {
  230. i = Math.floor(Math.log(value) / Math.log(k));
  231. value = ((value / Math.pow(k, i))).toFixed(2);
  232. unit = sizes[i];
  233. }
  234. return value + unit;
  235. } else {
  236. return 0
  237. }
  238. }
  239. },
  240. computed: {
  241. ...mapState(['undataStore'])
  242. },
  243. created() {
  244. this.getMyinfo()
  245. },
  246. onShow() {
  247. if(this.undataStore){
  248. this.getMyinfo()
  249. }
  250. },
  251. methods: {
  252. ...mapMutations(["outStore"]),
  253. getMyinfo() {
  254. request({
  255. url: '/myapp/selectStore',
  256. method: 'post',
  257. data: {
  258. "storeId": this.$store.state.storeInfo.storeId,
  259. }
  260. }).then(res => {
  261. this.userInfo = res.data.data
  262. }).catch(err => {
  263. console.log(err)
  264. }).finally(() => {
  265. this.loading = false;
  266. this.outStore();
  267. uni.hideLoading();
  268. })
  269. },
  270. inInstore() {
  271. this.$u.route({
  272. url: 'pages/me/Warehousing-details/index',
  273. })
  274. },
  275. inOutstore() {
  276. this.$u.route({
  277. url: 'pages/me/Delivery-details/index',
  278. })
  279. },
  280. inReward() {
  281. this.$u.route({
  282. url: 'pages/me/Reward-details/index',
  283. })
  284. },
  285. inStatistical() {
  286. this.$u.route({
  287. url: 'pages/me/Statistical-task/index',
  288. })
  289. },
  290. inresult() {
  291. this.$u.route({
  292. url: 'pages/me/scancodequery/result',
  293. })
  294. },
  295. inorder() {
  296. this.$u.toast('门店订单暂不开放');
  297. // this.$u.route({
  298. // url: 'pages/me/my-order/my-order',
  299. // })
  300. },
  301. inCoupon() {
  302. this.$u.toast('我的优惠券暂不开放');
  303. // this.$u.route({
  304. // url: 'pages/me/coupon',
  305. // })
  306. },
  307. inSuppliers() {
  308. this.$u.route({
  309. url: 'pages/me/suppliers',
  310. })
  311. },
  312. inAgentStock() {
  313. this.$u.route({
  314. url: 'pages/me/agent-stock/agent-stock',
  315. })
  316. },
  317. inSetting() {
  318. this.$u.route({
  319. url: 'pages/me/setting/setting',
  320. })
  321. },
  322. // 核销管理
  323. inWrite() {
  324. this.$u.route({
  325. url: 'pages/me/Write-off-management/index',
  326. })
  327. },
  328. // 查看结算
  329. insettlement() {
  330. this.$u.route({
  331. url: 'pages/me/Settlement-center/index',
  332. })
  333. }
  334. }
  335. }
  336. </script>
  337. <style lang="scss" scoped>
  338. .status_bar {
  339. height: var(--status-bar-height);
  340. }
  341. .head {
  342. width: 750rpx;
  343. min-height: 460rpx;
  344. background-image: url(../../static/sailun/mebg.png);
  345. background-size: 100% 100%;
  346. }
  347. .more_text {
  348. text-overflow: ellipsis;
  349. overflow: hidden;
  350. display: -webkit-box;
  351. -webkit-line-clamp: 1;
  352. /*设置显示行数,此处为2行*/
  353. -webkit-box-orient: vertical;
  354. width: 450rpx;
  355. }
  356. </style>