index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <template>
  2. <view>
  3. <public-module></public-module>
  4. <view class="headers " :style="headerStyle">
  5. <view class="dis a-c j-c">
  6. <text>首页</text>
  7. </view>
  8. </view>
  9. <!-- <image style="position: relative;height:230px" src="../../static/beijing.png"></image> -->
  10. <!-- <image v-if="type == 1" style="position: relative;height:230px" src="../../static/shouye1.png"></image> -->
  11. <view class="Personnel">
  12. <!-- <view class="avatar">
  13. <image src="/static/img/Frame (8).png" mode=""></image>
  14. <text>团队新人员加入信息/新出单信息</text>
  15. </view> -->
  16. <!-- <uni-notice-bar show-icon scrollable text="uni-app 版正式发布,开发一次,同时发布iOS、Android、H5、微信小程序、支付宝小程序、百度小程序、头条小程序等7大平台。" /> -->
  17. </view>
  18. <view class="insurance " >
  19. <view class="insurance-balance">
  20. <text>我的余额</text>
  21. <view style="font-weight: bold;font-size: 21px;line-height: 24px;">{{totalList.balanceFee || 0}}</view>
  22. </view>
  23. <view class="insurance-today">
  24. <view class="search" @click="searchPopup">
  25. <text>{{showData}}<i></i></text>
  26. </view>
  27. <view class=" dis a-c">
  28. <view class="today-data">
  29. <text>订单</text>
  30. <view>{{totalList.orderNumber || 0}}</view>
  31. </view>
  32. <view class="today-data">
  33. <text>保费</text>
  34. <view>{{totalList.sumPremium || 0}}</view>
  35. </view>
  36. </view>
  37. <view class=" dis a-c">
  38. <view class="today-data">
  39. <text>会员人数 </text>
  40. <view>{{totalList.teamManNum || 0}}</view>
  41. </view>
  42. <view class="today-data">
  43. <text>总佣金</text>
  44. <view>{{totalList.extractFee || 0}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- <view style="text-align: center;">
  49. <view class="insurance-cash">{{totalList.teamManNum || 0}}</view>
  50. <text class="insurance-text">会员总人数 </text>
  51. </view>
  52. <view style="text-align: center;">
  53. <view class="insurance-cash" >{{totalList.sumPremium || 0}}</view>
  54. <text class="insurance-text">总保费 </text>
  55. </view>
  56. <view style="text-align: center;">
  57. <view class="insurance-cash">{{totalList.extractFee || 0}}</view>
  58. <text class="insurance-text">我的佣金</text>
  59. </view> -->
  60. </view>
  61. <view >
  62. <view class="institutional-data dis j-s" v-if="type == 2 ||userInfo.sysUser.level==5">
  63. <view class="inst-con" @click="userInfo.sysUser.level==5 ?closeInstitution():closeStudion()">
  64. <view>{{ userInfo.sysUser.level==5 ?'我的工作室':'我的团队' }}</view>
  65. <text >{{userInfo.sysUser.level==5 ?totalList.workroomNum :totalList.workroomTeamNum}}</text>
  66. </view>
  67. <view class="inst-con" @click="userInfo.sysUser.level==5 ?recruitmentWorkCode() :recruitmentCode()">
  68. <view>我的招募码</view>
  69. <text >扫码加入</text>
  70. </view>
  71. </view>
  72. <view class="inst-data dis j-s" v-if="type == 1 && userInfo.sysUser.level!==5" >
  73. <view class="inst-con" @click="closePartner()">
  74. <view >我的合伙人</view>
  75. <text >{{totalList.partnerNum}}</text>
  76. </view>
  77. <view class="inst-con" @click="closeInstitution()">
  78. <view>我的工作室</view>
  79. <text >{{totalList.workroomNum}}</text>
  80. </view>
  81. </view>
  82. </view>
  83. <u-popup v-model="ShowModalCode" mode="bottom" border-radius="15" >
  84. <view class="ShowModalCode-style ">
  85. <text>团队招募码</text>
  86. <view class=" ShowModalCode-con">
  87. <view>扫码加入</view>
  88. <image :src="teamImg" mode="widthFix" lazy-load style="width: 150px;"></image>
  89. </view>
  90. </view>
  91. </u-popup>
  92. <u-popup v-model="ShowModalCodebusiness" mode="bottom" border-radius="15">
  93. <view>
  94. <text class=" ShowModalCode-business">工作室业务</text>
  95. <view>
  96. <radio-group class="uni-list" @change="styleChange">
  97. <view v-for="(item, index) in styles" :key="index" class="uni-list-item">
  98. <view class="uni-list-item__container">
  99. <view class="uni-list-item__content">
  100. <text class="uni-list-item__content-title">{{ item.text }}</text>
  101. </view>
  102. <view class="uni-list-item__extra">
  103. <radio :value="item.value" :checked="item.checked" />
  104. </view>
  105. </view>
  106. <view class="uni-list-item__notestext">{{ item.notestext }}</view>
  107. </view>
  108. </radio-group>
  109. </view>
  110. <view class="ShowModalCode-sumbit" @click="ShowModalCodeSumbit()">确定</view>
  111. </view>
  112. </u-popup>
  113. <u-popup v-model="ShowModalCode1" mode="bottom" border-radius="15">
  114. <view class="ShowModalCode-style ">
  115. <text>工作室招募码</text>
  116. <view class=" ShowModalCode-con">
  117. <view>扫码加入</view>
  118. <image :src="workImg" mode="widthFix" lazy-load style="width: 150px;"></image>
  119. </view>
  120. </view>
  121. </u-popup>
  122. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  123. </view>
  124. </template>
  125. <script>
  126. import myDatePicker from '../components/todaydate-picker.vue';
  127. import QR from "@/common/wxqrcode.js"
  128. import {
  129. mapState,
  130. mapMutations
  131. } from "vuex"
  132. import { vShow } from "vue"
  133. export default {
  134. computed: {
  135. ...mapState(['userInfo', "userCheckInfo", ]),
  136. },
  137. components: {
  138. myDatePicker
  139. },
  140. data() {
  141. return {
  142. showData:'全部数据',
  143. ShowModalCode:false,
  144. ShowModalCode1:false,
  145. ShowModalCodebusiness:false,
  146. teamImg:'',
  147. workImg:'',
  148. totalList:{},
  149. type: uni.getStorageSync('type'),
  150. headerStyle: {
  151. backgroundColor: 'transparent',
  152. backgroundImage: '',
  153. backgroundSize: '',
  154. backgroundPosition: '',
  155. boxShadow: ''
  156. // 其他样式属性...
  157. },
  158. styles: [{
  159. value: '1',
  160. text: '渠道',
  161. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  162. checked: true
  163. },
  164. {
  165. value: '2',
  166. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  167. text: '个代'
  168. }
  169. ],
  170. deptSource:1
  171. // type:JSON.parse(localStorage.getItem('type')).data
  172. }
  173. },
  174. async onShow(e) {
  175. this.type = uni.getStorageSync('type')
  176. this.showData='全部数据',
  177. this.getList()
  178. // let res = await this.$http.post('/APPPartner/getHomePage', {
  179. // type: uni.getStorageSync('type'),
  180. // });
  181. // if (res.code == '200') {
  182. // this.totalList = res.data
  183. // }
  184. },
  185. methods: {
  186. async getList(beginTime, endTime) {
  187. let params = {
  188. type: this.type,
  189. "endTime": endTime || '',
  190. "beginTime": beginTime || '',
  191. }
  192. let res = await this.$http.post('/APPPartner/getHomePage', params);
  193. if (res.code == '200') {
  194. this.totalList = res.data
  195. }
  196. },
  197. searchPopup() {
  198. this.$refs.datePicker.open()
  199. },
  200. confirmPickDate(dateStr, dateStr1,val) {
  201. if (dateStr) {
  202. dateStr += ' 00:00:01'
  203. }
  204. if (dateStr1) {
  205. dateStr1 += ' 23:59:59'
  206. }
  207. this.showData=val
  208. this.getList(dateStr, dateStr1)
  209. },
  210. styleChange(e) {
  211. this.deptSource = e.detail.value
  212. },
  213. recruitmentCode(){
  214. this.ShowModalCode=true
  215. this.teamImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applyteam?userId="+this.userInfo.sysUser.userId, {
  216. size: parseInt(200) //二维码大小
  217. })
  218. },
  219. ShowModalCodeSumbit(){
  220. console.log(this.deptSource,44444444);
  221. this.ShowModalCode1=true
  222. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this.deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  223. size: parseInt(200) //二维码大小
  224. })
  225. },
  226. recruitmentWorkCode(){
  227. this.ShowModalCodebusiness=true
  228. this.deptSource = 1
  229. },
  230. detail(id){
  231. uni.navigateTo({
  232. url: "/pages/institutional/walletDetail?id="+id
  233. })
  234. },
  235. closeDetailPro(val){
  236. uni.navigateTo({
  237. url: `/pages/institutional/detail?deptId=${val.deptId}&deptName=${val.deptName}&startTime=${val.startTime}`
  238. })
  239. },
  240. closeInstitution() {
  241. // if(this.totalList.workroomNum>0){
  242. // }
  243. // this.totalList.type=1
  244. uni.navigateTo({
  245. url: "/pages/institutional/institutionalTeam?key="+encodeURIComponent(JSON.stringify(this.totalList))
  246. })
  247. },
  248. closeStudion() {
  249. uni.navigateTo({
  250. url: "/pages/institutional/institutional?key="+encodeURIComponent(JSON.stringify(this.totalList))
  251. })
  252. },
  253. closePartner() {
  254. uni.navigateTo({
  255. url: "/pages/institutional/partner"
  256. })
  257. },
  258. viewTeam() {
  259. uni.navigateTo({
  260. url: "/pages/institutional/institutional"
  261. })
  262. },
  263. bankCard() {
  264. uni.navigateTo({
  265. url: "/pages/wallet/bankCard"
  266. })
  267. },
  268. bankwallet() {
  269. uni.navigateTo({
  270. url: "/pages/index/applystudio"
  271. })
  272. },
  273. }
  274. }
  275. </script>
  276. <style lang="scss" scoped>
  277. .homepage {
  278. display: flex;
  279. width: 100%;
  280. justify-content: space-between;
  281. }
  282. .homepage>view {
  283. width: 47%;
  284. height: 100px;
  285. // min-height: 18vh;
  286. // max-height: 22vh;
  287. background-size: contain;
  288. }
  289. .wallet {
  290. padding: 15upx 20upx;
  291. }
  292. .wallet>view:nth-child(1) {
  293. color: #333333;
  294. font-size: 14px;
  295. font-weight: bold;
  296. }
  297. .wallet>view:nth-child(2) {
  298. margin-top: 5upx;
  299. font-size: 12px;
  300. color: rgba(51, 51, 51, 0.8);
  301. }
  302. .homepage>view:nth-child(1) {
  303. background: url(../../static/qianbao.png) no-repeat;
  304. background-size: 100% 100%;
  305. }
  306. .homepage>view:nth-child(2) {
  307. background: url(../../static/yinhangka.png) no-repeat;
  308. background-size: 100% 100%;
  309. }
  310. .institutional-data {
  311. margin: 16px;
  312. }
  313. .institutional-data>view:nth-child(1) {
  314. background: url(../../static/work.png) no-repeat;
  315. background-size: 100% 100%;
  316. color: #009B9F;
  317. }
  318. .institutional-data>view:nth-child(2) {
  319. background: url(../../static/zhaomum.png) no-repeat;
  320. background-size: 100% 100%;
  321. color: #3168DA;
  322. }
  323. // .institutional-title {
  324. // padding: 10upx 10upx 20upx 10upx;
  325. // font-weight: bold;
  326. // text {
  327. // font-size: 14px;
  328. // }
  329. // }
  330. // .institutional-list {
  331. // background: #FFFFFF;
  332. // border-radius: 12px 12px 12px 12px;
  333. // padding: 0 20upx;
  334. // font-size: 38upx;
  335. // }
  336. .view-now {
  337. background: linear-gradient(90deg, #7E99D1 0%, #4F78B1 100%);
  338. border-radius: 20px 20px 20px 20px;
  339. color: #fff;
  340. font-size: 11px;
  341. padding: 2px 10px;
  342. }
  343. .view-now1{
  344. background-color: rgba(79, 120, 177, 0.1);
  345. color: #537BB4;
  346. border-radius: 20px 20px 20px 20px;
  347. font-size: 11px;
  348. padding: 2px 10px;
  349. }
  350. .homepage-title {
  351. margin-top: 5px;
  352. button {
  353. background-color: #FEF0E1;
  354. color: #FE8F1C;
  355. }
  356. }
  357. .homepage-title>button:last-child {
  358. background: #E6FAE3;
  359. color: #3AC716;
  360. margin-left: 10px;
  361. }
  362. .button1 {
  363. background-color: #FEF0E1;
  364. color: #FE8F1C;
  365. font-size: 11px;
  366. padding: 5px 10px
  367. }
  368. .button2 {
  369. background: #E6FAE3;
  370. color: #3AC716;
  371. margin-left: 10px;
  372. font-size: 11px;
  373. padding: 5px 10px
  374. }
  375. .inst-data {
  376. margin: 16px;
  377. }
  378. .inst-con {
  379. width: 47%;
  380. padding: 13px 16px;
  381. }
  382. .inst-con>view:nth-child(1) {
  383. font-size: 14px;
  384. font-weight: 700;
  385. }
  386. .inst-con>view:nth-child(2) {
  387. font-size: 13px;
  388. font-weight: 400;
  389. }
  390. .inst-data>view:nth-child(1) {
  391. background: url(../../static/hehuor.png) no-repeat;
  392. background-size: 100% 100%;
  393. color: #3168DA;
  394. }
  395. .inst-data>view:nth-child(2) {
  396. background: url(../../static/work.png) no-repeat;
  397. background-size: 100% 100%;
  398. color: #009B9F;
  399. }
  400. .headers {
  401. position: fixed;
  402. top: 0;
  403. left: 0;
  404. height: auto;
  405. width: 100%;
  406. z-index: 999999;
  407. padding: 16px;
  408. padding-top: 40px;
  409. >view {
  410. width: 100%;
  411. height: 100%;
  412. position: relative;
  413. }
  414. text {
  415. font-size: 18px;
  416. font-weight: 700;
  417. color: #333333;
  418. }
  419. }
  420. .Personnel {
  421. height: auto;
  422. width: 100%;
  423. background: #F7F7F7;
  424. background-image: url("/static/beijing.png");
  425. background-size: 100% 100%;
  426. padding: 235px 16px 15px 16px;
  427. // background-size: cover;
  428. // padding: 225px 16px 15px 16px;
  429. .avatar {
  430. background: #FFFFFF;
  431. box-shadow: 0px 0 8px 0px rgba(0,0,0,0.1);
  432. border-radius: 5px 5px 5px 5px;
  433. padding: 0 10px;
  434. line-height: 35px;
  435. height: 35px;
  436. image {
  437. display: inline-block;
  438. width: 16px;
  439. height: 16px;
  440. vertical-align: middle;
  441. margin-right: 5px;
  442. }
  443. }
  444. }
  445. .insurance{
  446. margin: -50px 16px 0 16px;
  447. background: #FFFFFF;
  448. box-shadow: 0px 0 8px 0px rgba(0,0,0,0.1);
  449. border-radius: 5px 5px 5px 5px;
  450. padding:13px 16px 16px;
  451. // padding: 200px 16px 15px 16px;
  452. .insurance-balance{
  453. text-align: center;
  454. margin-bottom: 10px;
  455. color: #333333;
  456. line-height: 24px;
  457. text{
  458. font-size: 10px;
  459. color: #999999;
  460. line-height: 12px;
  461. }
  462. }
  463. .insurance-today{
  464. background: #F7FBFF;
  465. border-radius: 5px 5px 5px 5px;
  466. padding: 8px 10px 16px 10px;
  467. .today-data{
  468. width: 50%;
  469. padding-left: 16px;
  470. text{
  471. font-size: 10px;
  472. color: #999999;
  473. line-height: 12px;
  474. }
  475. view{
  476. font-weight: 600;
  477. font-size: 17px;
  478. color: #333333;
  479. line-height: 20px;
  480. }
  481. }
  482. .search {
  483. text-align: center;
  484. text {
  485. font-size: 14px;
  486. color: #666666;
  487. }
  488. i {
  489. margin-left: 2px;
  490. display: inline-block;
  491. width: 0;
  492. height: 0;
  493. border: 4px solid;
  494. border-color: #666666;
  495. border-bottom: 4px solid transparent;
  496. border-right: 4px solid transparent;
  497. border-left: 4px solid transparent;
  498. }
  499. }
  500. }
  501. .insurance-cash{
  502. font-weight: 700;
  503. font-size: 21px;
  504. color: #333333;
  505. line-height: 24px;
  506. margin-bottom: 5px;
  507. }
  508. .insurance-text{
  509. font-weight: 300;
  510. font-size: 13px;
  511. color: #999999;
  512. line-height: 15px;
  513. }
  514. }
  515. .studio{
  516. margin:16px;
  517. }
  518. .ShowModalCode-style{
  519. text:first-child{
  520. display: block;
  521. font-weight: 600;
  522. font-size: 16px;
  523. color: #333333;
  524. border: 1px solid #EEEEEE;
  525. padding: 15px;
  526. text-align: center;
  527. }
  528. }
  529. .ShowModalCode-con{
  530. padding: 30px;
  531. text-align: center;
  532. image{
  533. margin: 0 auto;
  534. margin-top: 15px;
  535. }
  536. }
  537. .ShowModalCode-business {
  538. display: block;
  539. font-weight: 600;
  540. font-size: 16px;
  541. color: #333333;
  542. // border: 1px solid #EEEEEE;
  543. padding: 15px;
  544. text-align: center;
  545. }
  546. .ShowModalCode-sumbit {
  547. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  548. border-radius: 5px 5px 5px 5px;
  549. height: 40px;
  550. line-height: 40px;
  551. font-size: 16px;
  552. color: #FFFFFF;
  553. margin: 15px;
  554. text-align: center;
  555. }
  556. .uni-list {
  557. flex: 1;
  558. }
  559. .uni-list-item:first-child {
  560. /* #ifndef APP-NVUE */
  561. // display: flex;
  562. /* #endif */
  563. flex: 1;
  564. flex-direction: row;
  565. background-color: #FFFFFF;
  566. border-bottom-style: solid;
  567. border-bottom-width: 1px;
  568. border-bottom-color: #eee;
  569. }
  570. .uni-list-item__container {
  571. padding: 12px 15px;
  572. width: 100%;
  573. flex: 1;
  574. position: relative;
  575. /* #ifndef APP-NVUE */
  576. display: flex;
  577. box-sizing: border-box;
  578. /* #endif */
  579. flex-direction: row;
  580. justify-content: space-between;
  581. align-items: center;
  582. }
  583. .uni-list-item__notestext {
  584. padding: 0 15px 15px 15px;
  585. font-size: 15px;
  586. color: #666666;
  587. }
  588. .uni-list-item__content-title {
  589. font-size: 17px;
  590. color: #333333;
  591. }
  592. </style>