my.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <!-- 头部信息Start -->
  6. <view class="headers " :style="headerStyle">
  7. <view class="dis a-c j-c">
  8. <text>我的</text>
  9. <view class="headers-right">
  10. <view style="margin-left:15px">
  11. <image @tap="tool" src="/static/image/my/Frame.png" mode=""></image>
  12. <text>设置</text>
  13. </view>
  14. <!-- <view style="margin-left:15px">
  15. <image @tap="logout" src="/static/image/my/tichu.png" mode="">
  16. </image>
  17. <text>退出</text>
  18. </view> -->
  19. </view>
  20. </view>
  21. </view>
  22. <image :src="backImage" mode="" style="width: 100%;height: 738rpx;position: absolute;"></image>
  23. <view class="Personnel">
  24. <view class="dis a-c Personnel-info">
  25. <view class="Personnel-img" @click="updateAvatar">
  26. <image :src="avatar" class="avatar" mode=""></image>
  27. <image src="/static/image/my/updateAvatar.png" mode=""></image>
  28. </view>
  29. <view class="dis f-c ml-3">
  30. <view class="full-name">
  31. <text>{{ userInfo.sysUser.userName }}</text>
  32. </view>
  33. <view class=" dis f-c digit">
  34. <text>手机号:{{userInfo.sysUser.userId}}</text>
  35. <text>工号:{{ userInfo.sysUser.mobile }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 权益 -->
  40. <view class="benefits mt-3 dis f-c">
  41. <view class="dis j-s a-c header">
  42. <view class="dis title">
  43. <image :src="backLogo" mode=""></image>
  44. <text class="ml-1"
  45. v-if="superiorIdentityData.lockingState==0 && !superiorIdentityData.upgrade || superiorIdentityData.lockingState==2">解锁成为“{{superiorIdentityData.gradeName}}”获取更多权益</text>
  46. <text class="ml-1"
  47. v-if="superiorIdentityData.lockingState==0 && superiorIdentityData.upgrade">恭喜您已达成升级为{{superiorIdentityData.gradeName}}的条件</text>
  48. <text class="ml-1"
  49. v-if="superiorIdentityData.lockingState==1">恭喜您成为{{superiorIdentityData.gradeName}}</text>
  50. </view>
  51. <view
  52. v-if="superiorIdentityData.lockingState==0 && !superiorIdentityData.upgrade || superiorIdentityData.lockingState==2 && !superiorIdentityData.upgrade"
  53. class="tag" @click="upgradeTask">完成任务</view>
  54. <view
  55. v-if="superiorIdentityData.lockingState==0 && superiorIdentityData.upgrade && !superiorIdentityData.upgradeStatus || superiorIdentityData.lockingState==2 && superiorIdentityData.upgrade && !superiorIdentityData.upgradeStatus"
  56. class="tag" @click="requestUnlock">申请解锁</view>
  57. <view v-if="superiorIdentityData.upgradeStatus" class="tag">申请中</view>
  58. <view v-if="superiorIdentityData.lockingState==1" class="tag" @click="benefitsNavigate">查看权益</view>
  59. </view>
  60. <view class="content">
  61. <view class="item dis f-c ">
  62. <view class="dis a-c">
  63. <text>发展{{superiorIdentityData.gradeName}}团队</text>
  64. <u-icon name="arrow-right" color="#333" size="26"></u-icon>
  65. </view>
  66. <text>横向扩展团队,为收益添薪</text>
  67. </view>
  68. <view class="item dis f-c ml-3">
  69. <view class="dis a-c ">
  70. <text
  71. v-if="superiorIdentityData.lockingState==2">{{superiorIdentityData.lockCommission || 0}}元佣金</text>
  72. <text v-else>{{superiorIdentityData.ratio}}%</text>
  73. <u-icon name="arrow-right" color="#333" size="26"></u-icon>
  74. </view>
  75. <text v-if="superiorIdentityData.lockingState==2">{{superiorIdentityData.zeroDays}}天后清0</text>
  76. <text v-else>每单保费的佣金比例</text>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 身份解锁进度条 -->
  81. <view class="multiIdentityUnlockProgress dis ">
  82. <view class="step dis f-c" v-for="(item,index) in filteredBackLogoList" :key="index"
  83. v-if="item.grade!=1">
  84. <view class="dis a-c">
  85. <!-- 进度指示条 -->
  86. <view class="progressBar">
  87. <view class="sche-bg-jindu"
  88. :style="{width:progressBarClass(item),borderRadius:borderRadiusClass(item)}">
  89. </view>
  90. </view>
  91. <!-- 身份显示 -->
  92. <view class=" dis a-c j-c " :class="roleStatusClass(item)">
  93. <image class="rolelogo" :src="getRoleImage(item)" mode="">
  94. </image>
  95. </view>
  96. </view>
  97. <text class="title dis j-end">{{item.gradeName}}</text>
  98. </view>
  99. </view>
  100. <!-- 身份解锁进度条 -->
  101. <view class="withdrawal-box">
  102. <view class="dis a-c j-c withdrawal-title">
  103. <text>可提现总金额</text>
  104. <text @tap="accountTool('/pages/wallet/bankCard')">银行卡</text>
  105. </view>
  106. <view class="dis a-s j-c withdrawal-sum">
  107. <text>¥</text>
  108. <text>{{ getApplication.cashFee || 0 }} </text>
  109. </view>
  110. <view class="withdrawal-income dis">
  111. <view style="border-right: 1px solid #C5E7FF;">
  112. <text @click="incomeClick">佣金总收入金额
  113. <image style="display: inline-block; width: 9px;height:9px;vertical-align: -1px;"
  114. src="/static/icon/right.png" mode=""></image>
  115. </text>
  116. <text>¥{{ getApplication.extractFee || 0 }} </text>
  117. </view>
  118. <view>
  119. <text>已经提现金额</text>
  120. <text>¥{{ getApplication.historyFee || 0 }}</text>
  121. </view>
  122. </view>
  123. <view class="withdrawal-fun" @click="toWithdraw">提现</view>
  124. </view>
  125. </view>
  126. <!-- <view class=" dis a-c j-s" style="margin: 0px 16px;">
  127. <view class="withdrawal-record">
  128. <i></i>
  129. <text>提现记录</text>
  130. </view>
  131. <view class="search" @click="searchPopup">
  132. <text>自定义时间</text>
  133. <i></i>
  134. </view>
  135. </view> -->
  136. <!-- <view class="withdrawal-flow">
  137. <view class="withdrawal-card" v-for="(val,index) in withdrawalData" :key="index"
  138. @click="viewWithdrawal(val)">
  139. <view class="dis j-s">
  140. <view>
  141. <view style="line-height: 18px;">提现</view>
  142. <text style="font-size: 10px;color: #999999;">{{ val.createTime }}</text>
  143. </view>
  144. <view class="dis a-c">
  145. <view style="text-align: right;">
  146. <view style="line-height: 18px;">-{{ val.cashFee }}</view>
  147. <text class="withdrawal-status" v-if="val.status == '0'"
  148. style="background: #EAF0FF;color: #2D6DFF;">提现中</text>
  149. <text class="withdrawal-status" v-if="val.status == '1'"
  150. style="background: #E3FBE7;color: #18B63B;">已提现</text>
  151. <text class="withdrawal-status" v-if="val.status == '2'"
  152. style="background: #FFECEC ;color: #F74141;">提现失败</text>
  153. </view>
  154. <image src="/static/icon/you.png" mode=""></image>
  155. </view>
  156. </view>
  157. </view>
  158. </view> -->
  159. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  160. <u-popup v-model="ShowModalCode" mode="center" border-radius="15">
  161. <view style="width: 323px;" id="pdfContentsDiv">
  162. <view class="ShowModalCode-style">
  163. <text>推广码</text>
  164. <text @tap="ShowModalCode = false">×</text>
  165. </view>
  166. <view class="ShowModalCode-con">
  167. <text v-if="userInfo.sysUser.grade==4">请扫码下载掌柜科技APP</text>
  168. <text v-else>请扫码下载掌柜合伙人APP</text>
  169. <image :src="workImg" mode="widthFix" lazy-load style="width: 150px;"></image>
  170. </view>
  171. <view class="dis" style="justify-content: space-around;padding:0 60px 20px 60px;">
  172. <view class="share-style" @click="sendPayCode">
  173. <image src="/static/image/my/weixin.png" mode="">
  174. <text>微信好友</text>
  175. </view>
  176. <view class="share-style" @tap="saveImage()">
  177. <image src="/static/image/my/baocun.png" mode="">
  178. <text>保存图片</text>
  179. </view>
  180. <view class="share-style" @click="duplicate">
  181. <image src="/static/image/my/fenxiang.png" mode="">
  182. <text>链接分享</text>
  183. </view>
  184. </view>
  185. </view>
  186. </u-popup>
  187. <!-- <view class="Personnel-title" @click="promotionCode">
  188. <image src="/static/icon/code.png" mode="">
  189. </image>
  190. 推广码
  191. </view> -->
  192. <u-action-sheet :list="Avatarlist" v-model="updateAvatarShow" border-radius="20"></u-action-sheet>
  193. </view>
  194. </template>
  195. <script>
  196. import myDatePicker from '../components/date-picker.vue';
  197. import QR from "@/common/wxqrcode.js"
  198. import html2canvas from 'html2canvas'
  199. import store from '@/store';
  200. import {
  201. mapState,
  202. mapMutations
  203. } from "vuex"
  204. export default {
  205. components: {
  206. myDatePicker
  207. },
  208. data() {
  209. return {
  210. updateAvatarShow: false, //头像工具
  211. Avatarlist: [{
  212. text: '点赞',
  213. color: 'blue',
  214. fontSize: 28,
  215. subText: '感谢您的点赞'
  216. }, {
  217. text: '分享'
  218. }, ],
  219. supportStaffUrl: '',
  220. ShowModalCode: false,
  221. info: ["", ""],
  222. current: 0,
  223. mode: 'default',
  224. headerStyle: {
  225. backgroundColor: 'transparent',
  226. backgroundImage: '',
  227. backgroundSize: '',
  228. backgroundPosition: '',
  229. boxShadow: ''
  230. // 其他样式属性...
  231. },
  232. showBackground: false,
  233. prevScrollTop: 0,
  234. avatar: "/static/image/my/wuxingb.png",
  235. getApplication: {},
  236. withdrawalData: [],
  237. backImage: '',
  238. backLogo: '',
  239. workImg: '',
  240. pathUrl: '',
  241. type: uni.getStorageSync('type'),
  242. roleIdentityList: [], //角色身份列表
  243. //身份图片list
  244. gradeimageList: [{
  245. grade: 1,
  246. backImageurl: "/static/image/my/grade1.png", //身份背景图
  247. logourl: "/static/image/my/benefits/active1.png", //身份logo
  248. isUnlockedurl: '/static/image/my/benefits/isUnlocked.png', //身份未解锁
  249. waitingToUnlockurl: '/static/image/my/benefits/waitingToUnlock1.png', //身份待解锁
  250. isLockedurl: '/static/image/my/benefits/isLocked2.png', //身份锁定
  251. },
  252. {
  253. grade: 2,
  254. backImageurl: "/static/image/my/grade2.png",
  255. logourl: "/static/image/my/benefits/active2.png",
  256. isUnlockedurl: '/static/image/my/benefits/isUnlocked.png',
  257. waitingToUnlockurl: '/static/image/my/benefits/waitingToUnlock2.png',
  258. isLockedurl: '/static/image/my/benefits/isLocked2.png',
  259. },
  260. {
  261. grade: 3,
  262. backImageurl: "/static/image/my/grade3.png",
  263. logourl: "/static/image/my/benefits/active3.png",
  264. isUnlockedurl: '/static/image/my/benefits/isUnlocked.png',
  265. waitingToUnlockurl: '/static/image/my/benefits/waitingToUnlock3.png',
  266. isLockedurl: '/static/image/my/benefits/isLocked3.png',
  267. },
  268. {
  269. grade: 4,
  270. backImageurl: "/static/image/my/grade4.png",
  271. logourl: "/static/image/my/benefits/active4.png",
  272. isUnlockedurl: '/static/image/my/benefits/isUnlocked.png',
  273. waitingToUnlockurl: '/static/image/my/benefits/waitingToUnlock4.png',
  274. isLockedurl: '/static/image/my/benefits/isLocked4.png',
  275. }
  276. ],
  277. superiorIdentityData: {},
  278. }
  279. },
  280. computed: {
  281. ...mapState(['userInfo', "userCheckInfo", ]),
  282. gradeText() {
  283. const gradeMap = {
  284. 1: '创始人',
  285. 2: '管理人',
  286. 3: '合伙人',
  287. 4: '工作室'
  288. }
  289. return gradeMap[this.userInfo.sysUser.grade] || ''
  290. },
  291. //过滤数组
  292. filteredBackLogoList() {
  293. return this.roleIdentityList.filter(item => item.grade != 1)
  294. },
  295. //获取上级
  296. },
  297. async onLoad() {
  298. await this.queryIdentityInformation(); //获取身份列表
  299. this.backImage = this.roleIdentityList.find(val => val.grade == this.userInfo.sysUser.grade)
  300. .backImageurl; //获取背景图
  301. this.backLogo = this.roleIdentityList.find(val => val.grade == this.userInfo.sysUser.grade)
  302. .logourl; //获取logo
  303. },
  304. async onShow() {
  305. let userInfoRes = await this.$http.get('/newAppPartner/getUserInfo', {
  306. type: uni.getStorageSync('type')
  307. });
  308. if (userInfoRes) {
  309. store.commit('setUserModules', {
  310. title: 'userInfo',
  311. data: {
  312. sysUser: {
  313. ...userInfoRes.data
  314. }
  315. }
  316. })
  317. }
  318. this.queryIdentityInformation();
  319. let res = await this.$http.get('/newAppPartner/newGetFee'); //获取账户金额
  320. if (res.code == 200) {
  321. this.getApplication = res.data || [];
  322. }
  323. if (this.userInfo.sysUser.sex == 'F') {
  324. this.avatar = "/static/image/my/nv.png"
  325. }
  326. if (this.userInfo.sysUser.sex == 'M') {
  327. this.avatar = "/static/image/my/nan.png"
  328. }
  329. if (this.userInfo.sysUser.insUploadFiles && this.userInfo.sysUser.insUploadFiles.url) {
  330. this.avatar = this.$base.baseUrl + this.userInfo.sysUser.insUploadFiles.url;
  331. }
  332. // this.WithdrawalqueryData()
  333. },
  334. onPageScroll(e) {
  335. this.handleScroll(e);
  336. },
  337. mounted() {
  338. this.getWechatData()
  339. uni.pageScrollTo({
  340. scrollTop: 0,
  341. duration: 0
  342. });
  343. uni.$on('scroll', this.handleScroll);
  344. },
  345. destroyed() {
  346. uni.$off('scroll', this.handleScroll);
  347. },
  348. methods: {
  349. ...mapMutations(['emptyUserInfo']),
  350. async queryIdentityInformation() {
  351. let res = await this.$http.get('/newAppPartner/queryIdentityInformation'); //获取各级身份
  352. if (res.code == 200) {
  353. const merged = res.data.map(itemA => {
  354. const gradeimageinfo = this.gradeimageList.find(itemB => itemB.grade === itemA.grade);
  355. return {
  356. ...itemA,
  357. ...gradeimageinfo
  358. }; // 合并两个对象
  359. });
  360. this.roleIdentityList = merged;
  361. const isLocked = this.roleIdentityList[0].lockingState; //获取最低身份锁定状态
  362. console.log(isLocked);
  363. let grade = this.userInfo.sysUser.grade == 1 ? this.userInfo.sysUser
  364. .grade : this.userInfo.sysUser.grade == 4 && isLocked == 2 ? this.userInfo.sysUser.grade : this
  365. .userInfo.sysUser.grade - 1;
  366. this.superiorIdentityData = this.roleIdentityList.find(item => item.grade == grade)
  367. console.log(this.superiorIdentityData);
  368. } else {
  369. uni.showToast({
  370. title: res.msg,
  371. icon: 'none'
  372. })
  373. }
  374. },
  375. //申请解锁
  376. async requestUnlock() {
  377. console.log(this.superiorIdentityData);
  378. let res = await this.$http.post('/partner/submitLiftingRecord', {
  379. grade: this.superiorIdentityData.grade,
  380. upgradeType: this.superiorIdentityData.lockingState == 2 ? '1' : '0'
  381. });
  382. if (res.code == '200') {
  383. uni.showToast({
  384. title: res.msg,
  385. icon: 'none',
  386. });
  387. this.queryIdentityInformation() //申请解锁后更新身份
  388. } else {
  389. uni.showToast({
  390. title: res.msg,
  391. icon: 'none',
  392. });
  393. }
  394. },
  395. // 获取角色状态类名
  396. roleStatusClass(item) {
  397. return item.lockingState == 0 ? 'role-unlocked' : 'role-isUnlocked'
  398. },
  399. // 获取角色图片
  400. getRoleImage(item) {
  401. if (item.lockingState == 0) {
  402. return item.upgrade ? item.waitingToUnlockurl : item.isUnlockedurl
  403. } else if (item.lockingState == 1) {
  404. return item.logourl
  405. }
  406. return item.isLockedurl
  407. },
  408. //控制进度条占比
  409. progressBarClass(item) {
  410. if (item.progressBar == 0) {
  411. return '0%'
  412. } else if (item.progressBar == 1) {
  413. return '50%'
  414. } else {
  415. return '100%'
  416. }
  417. },
  418. //控制进度条圆角
  419. borderRadiusClass(item) {
  420. const {
  421. grade,
  422. progressBar
  423. } = item;
  424. if (grade == 4) {
  425. return progressBar == 1 ? '100px' : '100px 0 0 100px';
  426. }
  427. return progressBar == 1 ? '0 100px 100px 0' : '0';
  428. },
  429. // 权益跳转
  430. benefitsNavigate() {
  431. uni.navigateTo({
  432. url: "/pages/my/benefits?grade=" + this.userInfo.sysUser.grade,
  433. })
  434. },
  435. //完成任务
  436. upgradeTask() {
  437. uni.navigateTo({
  438. url: "/pages/my/upgradeTask?info=" + JSON.stringify(this.superiorIdentityData),
  439. })
  440. },
  441. //修改头像
  442. async updateAvatar() {
  443. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  444. count: 1,
  445. sizeType: ['compressed']
  446. });
  447. if (chooseImageRes) {
  448. console.log(chooseImageRes);
  449. this.chooseAvatar(chooseImageRes.tempFilePaths[0]);
  450. } else {}
  451. },
  452. chooseAvatar(src) {
  453. uni.navigateTo({
  454. url: '/pages/my/avatarCropper?src=' + src,
  455. })
  456. },
  457. searchPopup() {
  458. this.$refs.datePicker.open()
  459. },
  460. sendPayCode() {
  461. if (this.pathUrl) {
  462. uni.share({
  463. provider: "weixin",
  464. scene: "WXSceneSession",
  465. type: 2,
  466. imageUrl: this.pathUrl
  467. })
  468. }
  469. },
  470. showLoading() {
  471. uni.showLoading({
  472. title: '正在生成图片'
  473. });
  474. },
  475. hideLoading() {
  476. uni.hideLoading();
  477. this.loading = false;
  478. },
  479. //页面截图转路径
  480. receiveRenderData(val) {
  481. uni.downloadFile({
  482. url: val,
  483. success(res) {
  484. // 这时会产生一个临时路径,在应用本次启动期间可以正常使用。
  485. if (res.statusCode == 200) {
  486. // 需要将图片保存到相册
  487. uni.saveImageToPhotosAlbum({
  488. filePath: res
  489. .tempFilePath, // 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
  490. success(res) {
  491. uni.showToast({
  492. title: '保存成功',
  493. icon: 'none'
  494. })
  495. // 如果保存成功需要打开查看,请使用以下方法,同时也支持打开文件
  496. uni.openDocument({
  497. filePath: res.savedFilePath,
  498. success(res) {},
  499. fail(err) {
  500. uni.showToast({
  501. title: '手机不支持该文件类型,请安装wps或office应用',
  502. icon: 'none'
  503. })
  504. }
  505. })
  506. },
  507. fail(err) {
  508. uni.showToast({
  509. title: '图片保存失败',
  510. icon: 'none'
  511. })
  512. }
  513. })
  514. } else {
  515. uni.showToast({
  516. title: '下载失败,请稍后再试',
  517. icon: 'none'
  518. })
  519. }
  520. },
  521. fail(err) {
  522. uni.showToast({
  523. title: '下载失败,请稍后再试',
  524. icon: 'none'
  525. })
  526. }
  527. })
  528. },
  529. saveImage() {
  530. setTimeout(() => {
  531. this.$ownerInstance.callMethod('showLoading')
  532. const dom = document.getElementById('pdfContentsDiv') // 需要生成图片内容的 dom 节点
  533. html2canvas(dom, {
  534. width: dom.clientWidth, //dom 原始宽度
  535. height: dom.clientHeight,
  536. scrollY: 0, // html2canvas默认绘制视图内的页面,需要把scrollY,scrollX设置为0
  537. scrollX: 0,
  538. useCORS: true, //支持跨域
  539. // allowTaint: false,
  540. scale: 2, // 设置生成图片的像素比例,默认是1,如果生成的图片模糊的话可以开启该配置项
  541. }).then((canvas) => {
  542. // 生成成功
  543. this.$ownerInstance.callMethod('hideLoading')
  544. this.$ownerInstance.callMethod('receiveRenderData', canvas.toDataURL(
  545. 'image/png'))
  546. console.log()
  547. }).catch(err => {
  548. // 生成失败 弹出提示弹窗
  549. this.$ownerInstance.callMethod('_errAlert', `【生成图片失败,请重试】${err}`)
  550. })
  551. }, 300)
  552. },
  553. // 链接分享
  554. duplicate() {
  555. uni.setClipboardData({
  556. data: this.pathUrl,
  557. success: function() {
  558. console.log('复制成功');
  559. uni.showToast({
  560. title: '链接已复制成功',
  561. icon: 'success',
  562. duration: 2000
  563. });
  564. },
  565. fail: function() {
  566. console.log('复制失败');
  567. // 可以添加错误处理或用户友好的提示
  568. }
  569. });
  570. },
  571. async promotionCode() {
  572. this.ShowModalCode = true
  573. let pageRequest = {
  574. pageNum: 1,
  575. pageSize: 50,
  576. columnFilters: {
  577. apptype: {
  578. name: "apptype",
  579. value: "apk",
  580. },
  581. appid: {
  582. name: "appid",
  583. value: this.userInfo.sysUser.grade == 4 ? "__UNI__D4FE29A" : '__UNI__2041321',
  584. }
  585. }
  586. }
  587. let res = await this.$http.post('/sysVersion/findPage', pageRequest);
  588. if (res.code == 200) {
  589. this.ShowModalCode = true
  590. this.pathUrl = res.data.content[0].path
  591. this.workImg = QR.createQrCodeImg(res.data.content[0].path, {
  592. size: parseInt(200) //二维码大小
  593. })
  594. }
  595. },
  596. confirmPickDate(dateStr, dateStr1) {
  597. console.log(dateStr, dateStr1);
  598. if (dateStr) {
  599. dateStr += ' 00:00:01'
  600. }
  601. if (dateStr1) {
  602. dateStr1 += ' 23:59:59'
  603. }
  604. this.WithdrawalqueryData(dateStr, dateStr1)
  605. },
  606. viewWithdrawal(item) {
  607. uni.navigateTo({
  608. url: "/pages/my/withdrawalDetail?key=" + encodeURIComponent(JSON.stringify(item))
  609. })
  610. },
  611. async toWithdraw() {
  612. let res = await this.$http.post('/userBank/getUserBankList', {
  613. auditStatus: "1",
  614. delFlag: '0'
  615. });
  616. if (res.data.length) {
  617. this.navigate({
  618. url: `/pages/wallet/withdraw?amount=${this.getApplication.cashFee}`,
  619. }, "navigateTo", true)
  620. } else {
  621. uni.showToast({
  622. title: '暂无审核通过的银行卡,不可提现',
  623. duration: 3000,
  624. icon: "none"
  625. });
  626. }
  627. },
  628. async accountTool(path) {
  629. if (path) {
  630. if (path == '/pages/wallet/bankCard') {
  631. let res = await this.$http.post('/userBank/getUserBankList', {
  632. auditStatus: '',
  633. });
  634. if (!res.data.length) {
  635. this.navigate({
  636. url: '/pages/wallet/bindBank',
  637. complete: () => {
  638. setTimeout(() => {
  639. uni.showToast({
  640. title: '请先绑定银行卡',
  641. duration: 3000,
  642. icon: "none"
  643. });
  644. }, 500);
  645. }
  646. }, "navigateTo", true)
  647. } else {
  648. this.navigate({
  649. url: path,
  650. }, "navigateTo", true)
  651. }
  652. } else {
  653. this.navigate({
  654. url: path,
  655. }, "navigateTo", true)
  656. }
  657. } else {
  658. uni.showToast({
  659. title: '功能待开发...',
  660. icon: "none"
  661. });
  662. }
  663. },
  664. async WithdrawalqueryData(beginTime, endTime) {
  665. let params = {
  666. "endTime": endTime || '',
  667. "beginTime": beginTime || '',
  668. }
  669. let res = await this.$http.post('/sysAgencyFeeApproval/queryOperateInfo', params);
  670. if (res.code == '200') {
  671. this.withdrawalData = res.data
  672. }
  673. },
  674. handleScroll(e) {
  675. const scrollTop = e.scrollTop;
  676. if (scrollTop > this.prevScrollTop) {
  677. // 向下滚动
  678. this.showBackground = true; // 显示背景图
  679. } else if (scrollTop < 50) {
  680. // 在顶部附近,隐藏背景图
  681. this.showBackground = false;
  682. } else {
  683. // 向上滚动
  684. this.showBackground = true; // 显示背景图
  685. }
  686. this.headerStyle.backgroundColor = this.showBackground ? '#fff' : 'transparent';
  687. this.headerStyle.backgroundImage = this.showBackground ?
  688. 'url("/static/image/my/beijing.png")' : '';
  689. this.headerStyle.backgroundSize = this.showBackground ? 'cover' : '';
  690. // this.headerStyle.backgroundPosition = this.showBackground ? 'center' : '';
  691. this.prevScrollTop = scrollTop;
  692. },
  693. //跳转设置
  694. tool() {
  695. uni.navigateTo({
  696. url: "/pages/set/set"
  697. })
  698. },
  699. logout() {
  700. this.emptyUserInfo();
  701. uni.clearStorage({
  702. success: function() {}
  703. });
  704. setTimeout(() => {
  705. uni.reLaunch({
  706. url: "/pages/login/login"
  707. })
  708. return true;
  709. }, 500);
  710. },
  711. incomeClick() {
  712. let info = this.roleIdentityList.find(item => item.grade == this.userInfo.sysUser.grade)
  713. uni.navigateTo({
  714. url: '/pages/institutional/myEarnings?info=' + JSON.stringify(info)
  715. })
  716. // uni.navigateTo({
  717. // url: "/pages/my/commission"
  718. // })
  719. },
  720. // 去账单明细
  721. toBillDetails(type) {
  722. this.navigate({
  723. url: `/pages/wallet/billDetails${type}`,
  724. }, "navigateTo", true)
  725. },
  726. // 去账单明细
  727. toWallet(type) {
  728. this.navigate({
  729. url: "/pages/wallet/wallet"
  730. }, "navigateTo", true)
  731. },
  732. //获取企业微信客服地址,是否展示
  733. getWechatData() {
  734. this.$http.get('/sys/qy/wechat/find/picture').then(res => {
  735. this.supportStaffUrl = res.data.supportStaffUrl
  736. })
  737. },
  738. //点击跳转企业微信客服
  739. weChatService() {
  740. uni.share({
  741. provider: "weixin",
  742. openCustomerServiceChat: true,
  743. customerUrl: this.supportStaffUrl, //企业微信地址
  744. corpid: 'wwfe67d19509d43ec5', //企业id
  745. success: (res) => {},
  746. fail: (err) => {}
  747. });
  748. },
  749. }
  750. }
  751. </script>
  752. <style lang="scss" scoped>
  753. * {
  754. // outline: 1px solid red !important;
  755. }
  756. .headers {
  757. position: fixed;
  758. top: 0;
  759. left: 0;
  760. height: auto;
  761. width: 100%;
  762. z-index: 999999;
  763. padding: 16px;
  764. padding-top: 40px;
  765. text {
  766. font-size: 18px;
  767. font-weight: 700;
  768. color: #333333;
  769. }
  770. .headers-right {
  771. // width: 100%;
  772. // height: 100%;
  773. // position: relative;
  774. position: absolute;
  775. right: 15px;
  776. // width: 70px;
  777. display: flex;
  778. justify-content: space-between;
  779. view {
  780. line-height: 8px;
  781. }
  782. text {
  783. font-size: 9px;
  784. color: #666666;
  785. }
  786. image {
  787. // position: absolute;
  788. // right: 0;
  789. width: 16px;
  790. height: 16px;
  791. }
  792. }
  793. }
  794. .Personnel {
  795. height: auto;
  796. width: 100%;
  797. background: transparent;
  798. background-size: 100% 100%;
  799. padding: 90px 30rpx 20rpx 30rpx;
  800. position: relative;
  801. }
  802. .Personnel-title {
  803. position: absolute;
  804. right: 0;
  805. top: 135px;
  806. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  807. border-radius: 16px 0px 0px 16px;
  808. color: #fff;
  809. padding: 2px 6px 2px 10px;
  810. image {
  811. display: inline-block;
  812. width: 15px;
  813. height: 15px;
  814. vertical-align: -2px;
  815. margin-right: 3px;
  816. }
  817. }
  818. .Personnel-img {
  819. position: relative;
  820. .avatar {
  821. width: 60px;
  822. height: 60px;
  823. border-radius: 50%;
  824. }
  825. image:last-child {
  826. display: inline-block;
  827. width: 40rpx;
  828. height: 40rpx;
  829. position: absolute;
  830. bottom: 0;
  831. right: 0;
  832. }
  833. }
  834. /* 我的钱包Start */
  835. .my-wallet {
  836. .wallet-body {
  837. width: 100%;
  838. height: auto;
  839. padding: 8px 16px;
  840. background: #FFFFFF;
  841. box-shadow: 0px 4px 10px 0px #DAE3F4;
  842. border-radius: 6px;
  843. margin-top: 10px;
  844. .route {
  845. text {
  846. font-size: 12px;
  847. color: #333;
  848. font-weight: 400;
  849. }
  850. image {
  851. width: 45px;
  852. height: 40px;
  853. }
  854. }
  855. .money {
  856. padding: 8px 0;
  857. background-color: #F9F8FD;
  858. border-radius: 4px;
  859. margin-top: 8px;
  860. text {
  861. font-size: 12px;
  862. color: #333;
  863. font-weight: 400;
  864. }
  865. }
  866. }
  867. }
  868. .Personnel-info {
  869. font-size: 14px;
  870. color: #152F63;
  871. }
  872. .full-name {
  873. margin-top: 10rpx;
  874. color: #152F63;
  875. font-weight: bold;
  876. font-size: 36rpx;
  877. line-height: 1;
  878. }
  879. .digit {
  880. box-sizing: border-box;
  881. width: 100%;
  882. font-size: 24rpx;
  883. color: #152F63;
  884. margin-top: 26rpx;
  885. line-height: 1;
  886. text:first-child {
  887. margin-bottom: 20rpx;
  888. }
  889. }
  890. .withdrawal-box {
  891. margin-top: 13px;
  892. background: #FFFFFF;
  893. border-radius: 5px 5px 5px 5px;
  894. padding: 18px 16px;
  895. .withdrawal-title {
  896. width: 100%;
  897. height: 100%;
  898. position: relative;
  899. text:first-child {
  900. font-weight: 400;
  901. font-size: 12px;
  902. color: #999999;
  903. }
  904. text:last-child {
  905. position: absolute;
  906. right: 0;
  907. font-size: 10px;
  908. color: #2D6DFF;
  909. line-height: 12px;
  910. }
  911. }
  912. .withdrawal-sum {
  913. color: #333333;
  914. font-weight: bold;
  915. line-height: 32px;
  916. text:first-child {
  917. font-size: 17px;
  918. line-height: 38px;
  919. }
  920. text:last-child {
  921. font-size: 26px;
  922. }
  923. }
  924. .withdrawal-income {
  925. margin: 10px 0;
  926. background: rgba(240, 248, 255, 0.5);
  927. border-radius: 2px 2px 2px 2px;
  928. padding: 10px;
  929. view {
  930. width: 50%;
  931. text-align: center;
  932. text:first-child {
  933. font-weight: 400;
  934. font-size: 10px;
  935. color: #666666;
  936. display: block;
  937. }
  938. text:last-child {
  939. margin-top: 3px;
  940. font-weight: 700;
  941. font-size: 17px;
  942. color: #333333;
  943. line-height: 20px;
  944. display: block;
  945. }
  946. }
  947. }
  948. .withdrawal-fun {
  949. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  950. border-radius: 5px 5px 5px 5px;
  951. color: #fff;
  952. font-size: 16px;
  953. text-align: center;
  954. line-height: 42px;
  955. }
  956. }
  957. .withdrawal-record {
  958. font-weight: 700;
  959. font-size: 16px;
  960. color: #333333;
  961. i {
  962. display: inline-block;
  963. margin-right: 5px;
  964. width: 2px;
  965. height: 20px;
  966. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  967. }
  968. }
  969. .withdrawal-flow {
  970. margin: 8px 16px;
  971. overflow: hidden;
  972. background: #FFFFFF;
  973. border-radius: 5px 5px 5px 5px;
  974. font-size: 16px;
  975. color: #333333;
  976. .withdrawal-card {
  977. border-bottom: 1px solid #EEEEEE;
  978. padding: 15px 0;
  979. margin: 0 15px;
  980. image {
  981. display: inline-block;
  982. width: 11px;
  983. height: 11px;
  984. margin-left: 5px;
  985. }
  986. .withdrawal-status {
  987. padding: 2px 5px;
  988. font-size: 10px;
  989. border-radius: 1px 1px 1px 1px;
  990. }
  991. }
  992. }
  993. .search {
  994. text {
  995. font-size: 14px;
  996. color: #666666;
  997. }
  998. i {
  999. margin-left: 2px;
  1000. display: inline-block;
  1001. width: 0;
  1002. height: 0;
  1003. border: 4px solid;
  1004. border-color: #666666;
  1005. border-bottom: 4px solid transparent;
  1006. border-right: 4px solid transparent;
  1007. border-left: 4px solid transparent;
  1008. }
  1009. }
  1010. .ShowModalCode-style {
  1011. // display: block;
  1012. font-weight: 600;
  1013. font-size: 16px;
  1014. color: #333333;
  1015. border-bottom: 1px solid #EEEEEE;
  1016. padding: 15px;
  1017. text-align: center;
  1018. position: relative;
  1019. text:last-child {
  1020. position: absolute;
  1021. right: 20px;
  1022. color: #999999;
  1023. font-size: 24px;
  1024. line-height: 26px;
  1025. }
  1026. }
  1027. .ShowModalCode-con {
  1028. padding: 20px;
  1029. text-align: center;
  1030. font-size: 16px;
  1031. color: #333333;
  1032. image {
  1033. margin: 0 auto;
  1034. margin-top: 15px;
  1035. }
  1036. }
  1037. .share-style {
  1038. image {
  1039. width: 45px;
  1040. height: 45px
  1041. }
  1042. text {
  1043. font-size: 12px;
  1044. }
  1045. }
  1046. // 权益
  1047. .benefits {
  1048. background: #FFFFFF;
  1049. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1050. padding: 20rpx 0 0;
  1051. box-sizing: border-box;
  1052. .header {
  1053. padding: 0 30rpx;
  1054. box-sizing: border-box;
  1055. image {
  1056. width: 37rpx;
  1057. height: 42rpx;
  1058. }
  1059. .tag {
  1060. padding: 3rpx 17rpx;
  1061. box-sizing: border-box;
  1062. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  1063. border-radius: 4rpx 4rpx 4rpx 4rpx;
  1064. font-size: 24rpx;
  1065. color: #FFFFFF;
  1066. }
  1067. .title {
  1068. font-size: 28rpx;
  1069. color: #333;
  1070. }
  1071. }
  1072. .content {
  1073. width: 100%;
  1074. padding: 20rpx 30rpx 30rpx;
  1075. box-sizing: border-box;
  1076. background: linear-gradient(180deg, #F0F8FF 0%, rgba(240, 248, 255, 0) 100%);
  1077. border-radius: 0rpx 0rpx 10rpx 10rpx;
  1078. margin-top: 16rpx;
  1079. display: grid;
  1080. grid-template-columns: repeat(2, 1fr);
  1081. grid-template-rows: auto;
  1082. .item {
  1083. text:first-child {
  1084. font-size: 30rpx;
  1085. color: #333;
  1086. font-weight: bold;
  1087. }
  1088. text:last-child {
  1089. font-size: 24rpx;
  1090. color: #666;
  1091. }
  1092. }
  1093. .item:first-child {
  1094. border-right: 1rpx solid #E0F2FF;
  1095. }
  1096. }
  1097. }
  1098. ///////
  1099. .multiIdentityUnlockProgress {
  1100. background-color: #fff;
  1101. padding: 20rpx 46rpx 20rpx 30rpx;
  1102. box-sizing: border-box;
  1103. border-radius: 10rpx;
  1104. margin: 10px 0;
  1105. .step {
  1106. width: 38%;
  1107. height: auto;
  1108. .progressBar {
  1109. position: relative;
  1110. background-color: #F0F0F0;
  1111. height: 14rpx;
  1112. flex: 1;
  1113. .sche-bg-jindu {
  1114. position: absolute;
  1115. left: 0;
  1116. top: 0;
  1117. height: 14rpx;
  1118. background: #2DD9FF;
  1119. }
  1120. }
  1121. //已解锁
  1122. .role-isUnlocked {
  1123. width: 66rpx;
  1124. height: 66rpx;
  1125. border-radius: 50%;
  1126. background: #F0F7FF;
  1127. border: 4rpx solid #2DD9FF;
  1128. padding: 7rpx 10rpx;
  1129. box-sizing: border-box;
  1130. }
  1131. //未解锁
  1132. .role-unlocked {
  1133. width: 66rpx;
  1134. height: 66rpx;
  1135. border-radius: 50%;
  1136. background: #F0F0F0;
  1137. padding: 7rpx 10rpx;
  1138. box-sizing: border-box;
  1139. }
  1140. .rolelogo {
  1141. width: 38rpx;
  1142. height: 43rpx;
  1143. }
  1144. .title {
  1145. font-size: 30rpx;
  1146. color: #333;
  1147. margin-top: 20rpx;
  1148. margin-right: -12rpx;
  1149. }
  1150. }
  1151. .step:first-child {
  1152. width: 24%;
  1153. .progressBar {
  1154. border-radius: 100px 0 0 100px;
  1155. .sche-bg-jindu {
  1156. border-radius: 100px 0 0 100px;
  1157. }
  1158. }
  1159. }
  1160. .step:last-child {
  1161. .role-isUnlocked {}
  1162. }
  1163. }
  1164. </style>