index.vue 12 KB

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