my.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. <template>
  2. <view class="page">
  3. <view class="header dis f-c ">
  4. <view class="person dis a-start j-s " @click="checkInfo">
  5. <view class="dis ">
  6. <view class="avatar">
  7. <image
  8. :src="userInfo.sysUser.headSculpture? userInfo.sysUser.headSculpture :'/static/image/avatar.png'"
  9. mode="">
  10. </image>
  11. </view>
  12. <view class="relatedInfo dis f-c ">
  13. <view class="title dis a-c mb-1">
  14. <text>{{this.userInfo.sysUser.name}}</text>
  15. <image src="/static/image/my/tag1.png" mode=""></image>
  16. <image src="/static/image/my/tag2.png" mode=""></image>
  17. </view>
  18. <text>{{this.userInfo.sysUser.deptName || '暂无机构'}}</text>
  19. </view>
  20. </view>
  21. <image class="edit mt-1 mr-1" src="/static/icon/my/icon9.png" mode=""></image>
  22. </view>
  23. <view class="walletContent mt-2" @click="walletBalance">
  24. <view class="title">
  25. <text>我的钱包</text>
  26. </view>
  27. <view class="balance dis j-s a-c">
  28. <view class="item dis f-c a-c">
  29. <text>余额(元)</text>
  30. <text>{{walletInfo.walletBalanceRemoveWithdraw}}</text>
  31. </view>
  32. <u-line length="35" color="#EEEEEE" direction="col" :hairline="false"></u-line>
  33. <view class="item dis f-c a-c">
  34. <text>提现中(元)</text>
  35. <text>{{walletInfo.withdrawingBalance}}</text>
  36. </view>
  37. <u-line length="35" color="#EEEEEE" direction="col" :hairline="false"></u-line>
  38. <view class="item dis f-c a-c">
  39. <text>积分</text>
  40. <text>{{walletInfo.integral}}</text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 占位 -->
  46. <view class="placeholder"></view>
  47. <view class="p-3" style="padding-bottom: 50px;">
  48. <!-- 业绩 -->
  49. <view class="myPerformance dis f-c a-c">
  50. <text class="title">我的业绩</text>
  51. <view class="totalPremium dis f-c a-c j-end">
  52. <text>签单保费(元)</text>
  53. <text>{{walletInfo.signPremium}}</text>
  54. <view class="tag"></view>
  55. <view class="tag2"></view>
  56. </view>
  57. <view class="Details dis a-c j-s">
  58. <view class="item">
  59. <text>{{walletInfo.orderCount}}</text>
  60. <text>车险订单(笔)</text>
  61. </view>
  62. <view class="item">
  63. <text>{{walletInfo.totalIncome}}</text>
  64. <text>累计收入(元)</text>
  65. </view>
  66. <view class="item">
  67. <text>{{walletInfo.totalInviteCount}}</text>
  68. <text>累计邀请(人)</text>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 工具 -->
  73. <view class="myTools mt-2">
  74. <view class="toolsItem dis f-c a-c j-c" v-for="(item,index) in ToolsList" :key="index"
  75. @click="toolClick(item)">
  76. <image :src="item.icon" mode=""></image>
  77. <text>{{item.text}}</text>
  78. </view>
  79. </view>
  80. <view class=" mt-2 ">
  81. <uni-Cell :celllist="celllist" round="20rpx">
  82. <template #customContent="{ item }">
  83. <view v-if="item.title=='新版本'" class="dis a-c customContent">
  84. <template v-if="hasUpdate">
  85. <view class="newtag dis a-c j-c">
  86. New
  87. </view>
  88. <text style="font-size: 28rpx;color: #666;">{{version || '1.0.0'}}</text>
  89. </template>
  90. </view>
  91. </template>
  92. </uni-Cell>
  93. </view>
  94. </view>
  95. <!-- app版本更新组件-->
  96. <app-update ref="app_update" @status="updateStatus"></app-update>
  97. </view>
  98. </template>
  99. <script>
  100. import appUpdate from "@/components/yzhua006-update/app-update.vue"; //app更新组件
  101. import {
  102. mapState,
  103. mapMutations
  104. } from "vuex"
  105. export default {
  106. components: {
  107. appUpdate,
  108. },
  109. data() {
  110. return {
  111. version: "", //版本
  112. dateShow: false,
  113. hasUpdate: false, //有无更新
  114. ToolsList: [{
  115. text: "邀请码",
  116. url: "/pages/tool/invitationCode",
  117. icon: "/static/icon/my/icon1.png",
  118. },
  119. {
  120. text: "分销中心",
  121. url: "/pages/tool/distributionCenter",
  122. icon: "/static/icon/my/icon2.png",
  123. },
  124. {
  125. text: "订单管理",
  126. url: "",
  127. icon: "/static/icon/my/icon3.png",
  128. },
  129. {
  130. text: "保单查询",
  131. url: "",
  132. icon: "/static/icon/my/icon4.png",
  133. },
  134. {
  135. text: "自主报案",
  136. url: "/pages/tool/selfReport",
  137. icon: "/static/icon/my/icon5.png",
  138. },
  139. {
  140. text: "海报管理",
  141. url: "/pages/tool/poster",
  142. icon: "/static/icon/my/icon6.png",
  143. },
  144. {
  145. text: "佣金测算",
  146. url: "",
  147. icon: "/static/icon/my/icon7.png",
  148. },
  149. {
  150. text: "帮助与客服",
  151. url: "/pages/tool/helpAndSupport",
  152. icon: "/static/icon/my/icon8.png",
  153. },
  154. ],
  155. celllist: [{
  156. title: "设置",
  157. icon: "/static/icon/my/icon10.png",
  158. useSlot: false, //是否插槽,
  159. url: "/pages/set/set",
  160. clickType: 'navigate',
  161. },
  162. {
  163. title: "新版本",
  164. icon: "/static/icon/my/icon11.png",
  165. useSlot: true,
  166. url: "/pages/quote/quoteInfo",
  167. clickType: 'checkVersion',
  168. }, {
  169. title: "关于我们",
  170. icon: "/static/icon/my/icon12.png",
  171. useSlot: false,
  172. url: "/pages/set/aboutSet",
  173. clickType: 'navigate',
  174. }
  175. ],
  176. walletInfo: {},
  177. }
  178. },
  179. async onLoad() {
  180. // #ifdef APP-PLUS
  181. plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
  182. this.version = widgetInfo.version;
  183. })
  184. setTimeout(() => {
  185. this.$refs.app_update.update(); //调用子组件检查更新方法
  186. }, 500)
  187. // #endif
  188. },
  189. onShow() {
  190. this.getUserInfo();
  191. this.userPerformance();
  192. },
  193. computed: {
  194. ...mapState(['userInfo']),
  195. },
  196. methods: {
  197. updateStatus(item) {
  198. this.hasUpdate = item;
  199. },
  200. //我的业绩
  201. async userPerformance() {
  202. let res = await this.$http.get('/userAccount/userWallet'); //获取钱包信息
  203. if (res.code == '200') {
  204. this.walletInfo = res.data;
  205. }
  206. },
  207. async getUserInfo() {
  208. let res = await this.$http.get('/appUser/userInfoGet'); //获取人员信息
  209. if (res.code == '200') {
  210. }
  211. },
  212. //个人信息
  213. checkInfo() {
  214. uni.navigateTo({
  215. url: '/pages/my/userInfo'
  216. })
  217. },
  218. //工具跳转
  219. toolClick(item) {
  220. uni.navigateTo({
  221. url: item.url,
  222. })
  223. },
  224. //跳转钱包
  225. walletBalance() {
  226. uni.navigateTo({
  227. url: '/pages/wallet/myWallet?info=' + JSON.stringify(this.walletInfo)
  228. })
  229. }
  230. }
  231. }
  232. </script>
  233. <style lang="scss" scoped>
  234. .page {
  235. background-color: #F8F8F8;
  236. height: 100%;
  237. }
  238. .header {
  239. width: 100%;
  240. height: 420rpx;
  241. background: white;
  242. background-image: url('/static/image/my/bg1.png');
  243. background-size: 100% 100%;
  244. aspect-ratio: 25 / 14;
  245. padding: 176rpx 30rpx 0;
  246. box-sizing: border-box;
  247. position: fixed;
  248. top: 0;
  249. left: 0;
  250. z-index: 999;
  251. //头部信息
  252. .person {
  253. .avatar {
  254. width: 80rpx;
  255. height: 80rpx;
  256. border-radius: 50%;
  257. border: 4rpx solid #fff;
  258. margin-left: 7rpx;
  259. image {
  260. width: 100%;
  261. height: 100%;
  262. border-radius: 50%;
  263. }
  264. }
  265. .relatedInfo {
  266. color: #1F1F1F;
  267. margin-left: 25rpx;
  268. .title {
  269. font-size: 36rpx;
  270. font-weight: bold;
  271. image:nth-child(2) {
  272. width: 95rpx;
  273. height: 40rpx;
  274. margin: 0 10rpx;
  275. }
  276. image:nth-child(3) {
  277. width: 62rpx;
  278. height: 26rpx;
  279. }
  280. }
  281. >text {
  282. font-size: 22rpx;
  283. }
  284. }
  285. .edit {
  286. width: 30rpx;
  287. height: 30rpx;
  288. }
  289. }
  290. //钱包
  291. .walletContent {
  292. width: 100%;
  293. height: 207rpx;
  294. position: relative;
  295. .title {
  296. width: 180rpx;
  297. height: 105rpx;
  298. padding: 13rpx 24rpx;
  299. box-sizing: border-box;
  300. color: #333;
  301. font-size: 32rpx;
  302. position: relative;
  303. border-top-left-radius: 20rpx;
  304. border-bottom-left-radius: 20rpx;
  305. background: #FDE935;
  306. border-top: 2rpx solid #fff;
  307. border-left: 2rpx solid #fff;
  308. &::after {
  309. content: "";
  310. position: absolute;
  311. top: 1px;
  312. right: -48px;
  313. height: 100%;
  314. width: 50px;
  315. z-index: 2;
  316. background-color: #FDE935;
  317. clip-path: path("M0 0 C12.5 0 10.5 25 25 50 L0 50 Z");
  318. // clip-path: path("M0 0 C17.5 0 13.5 25 25 50 L0 50 Z");
  319. }
  320. }
  321. .balance {
  322. position: absolute;
  323. top: 66rpx;
  324. width: 100%;
  325. padding: 30rpx;
  326. box-sizing: border-box;
  327. z-index: 2;
  328. background: linear-gradient(to left,
  329. #fff 60%,
  330. rgba(255, 255, 255, 0.7) 70%);
  331. border-radius: 20rpx;
  332. border: 2rpx solid #FFFFFF;
  333. backdrop-filter: blur(30rpx);
  334. /* 背景模糊 */
  335. .item {
  336. width: 32%;
  337. text:first-child {
  338. font-size: 24rpx;
  339. color: #666;
  340. margin-bottom: 10rpx;
  341. }
  342. text:last-child {
  343. color: #333;
  344. font-size: 36rpx;
  345. font-weight: bold;
  346. }
  347. }
  348. }
  349. }
  350. }
  351. .placeholder {
  352. width: 100%;
  353. height: 420rpx;
  354. }
  355. //我的业绩
  356. .myPerformance {
  357. width: 100%;
  358. margin-top: 72rpx;
  359. background: linear-gradient(180deg, rgba(253, 233, 53, 0.05) 0%, rgba(253, 233, 53, 0) 100%), #FFFFFF;
  360. border-radius: 20rpx;
  361. padding: 72rpx 30rpx 20rpx;
  362. box-sizing: border-box;
  363. position: relative;
  364. .title {
  365. position: absolute;
  366. top: 27rpx;
  367. left: 20rpx;
  368. font-size: 32rpx;
  369. color: #333;
  370. }
  371. .totalPremium {
  372. position: relative;
  373. width: 390rpx;
  374. height: 180rpx;
  375. background: transparent;
  376. padding: 0 62rpx;
  377. box-sizing: border-box;
  378. >text:nth-child(1) {
  379. font-size: 28rpx;
  380. color: #666;
  381. margin-bottom: 8rpx;
  382. }
  383. >text:nth-child(2) {
  384. font-size: 50rpx;
  385. color: #333;
  386. font-weight: bold;
  387. margin-bottom: 8rpx;
  388. }
  389. .tag {
  390. content: "";
  391. position: absolute;
  392. bottom: -7rpx;
  393. left: 0;
  394. width: 14rpx;
  395. height: 14rpx;
  396. border-radius: 50%;
  397. background: rgba(253, 233, 53, 0.4);
  398. }
  399. .tag2 {
  400. content: "";
  401. position: absolute;
  402. bottom: -7rpx;
  403. right: 0;
  404. width: 14rpx;
  405. height: 14rpx;
  406. border-radius: 50%;
  407. background-color: rgba(253, 233, 53, 0.4);
  408. }
  409. }
  410. .totalPremium::before {
  411. content: "";
  412. position: absolute;
  413. top: 0;
  414. left: 0;
  415. width: 100%;
  416. height: 100%;
  417. border: 7px solid rgba(253, 233, 53, 0.5);
  418. border-radius: 195rpx 195rpx 0 0;
  419. box-sizing: border-box;
  420. border-bottom: transparent;
  421. }
  422. .Details {
  423. width: 100%;
  424. height: 152rpx;
  425. background-image: url('/static/image/my/bg2.png');
  426. background-size: 100% 100%;
  427. padding: 48rpx 30rpx 20rpx;
  428. box-sizing: border-box;
  429. .item {
  430. width: 33%;
  431. display: flex;
  432. flex-direction: column;
  433. align-items: center;
  434. justify-content: center;
  435. text:first-child {
  436. font-size: 36rpx;
  437. color: #333;
  438. font-weight: bold;
  439. margin-bottom: 6rpx;
  440. }
  441. text:last-child {
  442. font-size: 24rpx;
  443. color: #666;
  444. }
  445. }
  446. }
  447. }
  448. //工具
  449. .myTools {
  450. padding: 35rpx 30rpx;
  451. box-sizing: border-box;
  452. background: #fff;
  453. border-radius: 20rpx;
  454. display: grid;
  455. /* 启用网格布局 */
  456. grid-template-columns: repeat(4, 1fr);
  457. /* 3 列,每列等宽 */
  458. grid-template-rows: auto;
  459. /* 行高自适应 */
  460. row-gap: 40rpx;
  461. /* 只设置行间距(上下) */
  462. column-gap: 10px;
  463. /* 列间距设为 0(可选) */
  464. /* 网格间距 */
  465. .toolsItem {
  466. image {
  467. width: 58rpx;
  468. height: 58rpx;
  469. margin-bottom: 6rpx;
  470. }
  471. text {
  472. font-size: 28rpx;
  473. color: #333;
  474. }
  475. }
  476. }
  477. .customContent {
  478. .newtag {
  479. width: auto;
  480. height: 100%;
  481. padding: 5rpx 12rpx;
  482. box-sizing: border-box;
  483. background: #FF4545;
  484. border-radius: 20rpx 20rpx 20rpx 20rpx;
  485. font-size: 18rpx;
  486. color: #fff;
  487. margin-right: 18rpx;
  488. }
  489. }
  490. </style>