home.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <u-navbar bgColor="transparent">
  4. <view class="u-nav-slot" slot="left" style="display: flex;background-color: transparent;">
  5. <image :src="imgBase+'home_logo.png'" style="width: 200rpx;height: 54rpx;margin-left: 12rpx;"></image>
  6. </view>
  7. </u-navbar>
  8. <div class="lunbo">
  9. <u-swiper
  10. :list="bannarList"
  11. @change="e => current = e.current"
  12. :autoplay="false"
  13. height="368rpx"
  14. >
  15. <template #indicator>
  16. <view class="indicator adf">
  17. <view class="indicator__dot" v-for="(item, index) in bannarList" :key="index"
  18. :class="[index === current && 'indicator__dot--active']">
  19. </view>
  20. </view>
  21. </template>
  22. </u-swiper>
  23. </div>
  24. <div class="preill adfacjb">
  25. <div class="preill-box">
  26. <div class="preill-box-title">我的PREILL评估</div>
  27. <div class="preill-box-num">{{3}}</div>
  28. <div class="preill-box-state adfacjb">
  29. <div class="preill-box-state-pre adfac grey">已完成:<span>{{2}}</span></div>
  30. <div class="preill-box-state-pre adfac yellow">待完成:<span>{{1}}</span></div>
  31. </div>
  32. <div class="preill-box-progress">
  33. <div class="preill-box-progress-current pbp-yellow" :style="{'width':(2/(2+1)*100)+'%'}"></div>
  34. </div>
  35. </div>
  36. <div class="preill-box">
  37. <div class="preill-box-title">我的PREILL报告</div>
  38. <div class="preill-box-num">{{3}}</div>
  39. <div class="preill-box-state adfacjb">
  40. <div class="preill-box-state-pre adfac green">我收到:<span>{{2}}</span></div>
  41. <div class="preill-box-state-pre adfac grey">我发送:<span>{{1}}</span></div>
  42. </div>
  43. <div class="preill-box-progress">
  44. <div class="preill-box-progress-current pbp-green" :style="{'width':(2/(2+1)*100)+'%'}"></div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="boxs adfacjb">
  49. <div class="boxs-pre bp1" @click="toTurn('/pages/dialog')">
  50. <div class="boxs-pre-title">AI督导对话</div>
  51. <div class="boxs-pre-tip">全球顶尖团队教练</div>
  52. </div>
  53. <div class="boxs-pre bp2">
  54. <div class="boxs-pre-title">人工报告解读</div>
  55. <div class="boxs-pre-tip">团队诊断和提升</div>
  56. </div>
  57. </div>
  58. <div class="common">
  59. <div class="common-title">常用功能</div>
  60. <div class="common-menu adf">
  61. <div class="common-menu-pre adffcac">
  62. <image :src="imgBase+'home_img_pinggu.png'"></image>
  63. <text>PREILL评估</text>
  64. </div>
  65. <div class="common-menu-pre adffcac">
  66. <image :src="imgBase+'home_img_baogao.png'"></image>
  67. <text>PREILL报告</text>
  68. </div>
  69. <div class="common-menu-pre adffcac">
  70. <image :src="imgBase+'home_img_guanli.png'"></image>
  71. <text>问卷管理</text>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="new-user-free adffcacjc" v-if="newUserFreeShow">
  76. <div class="new-user-free-box1">
  77. <div class="new-user-free-box1-text">PERILL评估</div>
  78. <div class="new-user-free-box1-text" style="margin-top: 8rpx;">基础版免费体验1次</div>
  79. </div>
  80. <div class="new-user-free-box2 adffcac">
  81. <div class="new-user-free-box2-price adfacjb">
  82. <div class="new-user-free-box2-price-left adffc">
  83. <div class="new-user-free-box2-price-left-title">仅限个人创建使用</div>
  84. <div class="new-user-free-box2-price-left-tip">领取后1年有效</div>
  85. </div>
  86. <div class="new-user-free-box2-price-right adffcac">
  87. <div class="new-user-free-box2-price-right-top">1次</div>
  88. <div class="new-user-free-box2-price-right-bottom">原价99</div>
  89. </div>
  90. </div>
  91. <div class="new-user-free-box2-btn">免费体验</div>
  92. </div>
  93. <image class="new-user-free-close" :src="imgBase+'new_free_close.png'" @click="newUserFreeShow=false"></image>
  94. </div>
  95. <div class="kind-reminder adffcacjc" v-if="teamKindShow">
  96. <div class="kr-box adffcac">
  97. <image :src="imgBase+'remind_close.png'" @click="teamKindShow=false"></image>
  98. <div class="kr-title">温馨提示</div>
  99. <div class="kr-p" style="margin-top: 32rpx;">您尚未加入<span>(问卷ID:{{87999}})</span>的团队</div>
  100. <div class="kr-p">因此无法填写此问卷</div>
  101. <div class="kr-p">请联系问卷创建者<span>{{'刘怡然'}}</span>将您加入团队</div>
  102. <div class="kr-btn" @click="teamKindShow=false">我知道了</div>
  103. </div>
  104. </div>
  105. <div class="kind-reminder adffcacjc" v-if="questionnaireKindShow">
  106. <div class="kr-box adffcac">
  107. <image :src="imgBase+'remind_close.png'" @click="questionnaireKindShow=false"></image>
  108. <div class="kr-title">温馨提示</div>
  109. <div class="kr-p" style="margin-top: 32rpx;">您有一份<span>“PERILL团队评估初级”</span>问卷待完成,请及时填写,</div>
  110. <div class="kr-p">以便我们为您提供精准分析</div>
  111. <div class="kr-btn" @click="handleToFill">去填写</div>
  112. </div>
  113. </div>
  114. <Tabbar :tabbarIndex="0"></Tabbar>
  115. </view>
  116. </template>
  117. <script>
  118. import Tabbar from '@/components/CusTabbar/index.vue'
  119. export default {
  120. components:{ Tabbar },
  121. data(){
  122. return {
  123. current:0,
  124. bannarList:[
  125. this.$imgBase+'home_lb.png',
  126. this.$imgBase+'home_lb.png',
  127. this.$imgBase+'home_lb.png'
  128. ],
  129. newUserFreeShow:false,
  130. teamKindShow:false,
  131. questionnaireKindShow:false,
  132. }
  133. },
  134. onLoad(options) {
  135. if(options.q){
  136. try{
  137. const decodedUrl = decodeURIComponent(options.q);
  138. const codeMatch = decodedUrl.match(/type=([^&]+)/);
  139. const stationCode = codeMatch ? codeMatch[1] : null;
  140. if(stationCode) uni.setStorageSync('channelType',stationCode)
  141. }catch(e){
  142. console.log(e,'e');
  143. }
  144. }
  145. if(uni.getStorageSync('token')){
  146. this.getWjList();
  147. this.getReportList();
  148. }
  149. },
  150. methods:{
  151. toTurn(url){
  152. if(!url) return
  153. if(url!=='/pages/dialog'&&!this.isLogin()) return
  154. uni.navigateTo({
  155. url
  156. })
  157. },
  158. getWjList(){
  159. this.$api.get('/core/teammember/que/listByUser').then(res=>{
  160. if(res.data.code!==0) return
  161. this.wjDwc = res.data.data.filter(d=>d.status===0).length;
  162. this.wjYwc = res.data.data.filter(d=>d.status===1).length;
  163. })
  164. },
  165. getReportList(){
  166. this.$api.get('/core/report/member/personalReportList').then(res=>{
  167. if(res.data.code!==0) return
  168. this.reportCount = res.data.data.length;
  169. })
  170. },
  171. handleToFill(){
  172. this.questionnaireKindShow = false;
  173. }
  174. }
  175. }
  176. </script>
  177. <style scoped lang="scss">
  178. ::v-deep .indicator__dot{
  179. width: 12rpx;
  180. height: 12rpx;
  181. background: transparent;
  182. border: 2rpx solid #FFFFFF;
  183. border-radius: 6rpx;
  184. margin: 0 8rpx;
  185. }
  186. ::v-deep .indicator__dot--active{
  187. width: 12rpx;
  188. height: 12rpx;
  189. background: #FFFFFF;
  190. }
  191. .tabPage{
  192. background-image: linear-gradient(to bottom,#EAE7FC 500rpx,#F6F4FF 744rpx,#F7F7F7 100%);
  193. .topbg{
  194. width: 100%;
  195. height: 720rpx;
  196. position: fixed;
  197. top: 0;
  198. left: 0;
  199. }
  200. .lunbo{
  201. width: 100%;
  202. height: 368rpx;
  203. margin-top: 30rpx;
  204. position: relative;
  205. }
  206. .preill{
  207. margin-top: 30rpx;
  208. position: relative;
  209. &-box{
  210. width: calc(50% - 11rpx);
  211. background: #FFFFFF;
  212. border-radius: 24rpx;
  213. padding: 36rpx 24rpx 26rpx;
  214. box-sizing: border-box;
  215. &-title{
  216. font-family: PingFang-SC, PingFang-SC;
  217. font-weight: bold;
  218. font-size: 28rpx;
  219. color: #002846;
  220. line-height: 28rpx;
  221. }
  222. &-num{
  223. font-family: PingFang-SC, PingFang-SC;
  224. font-weight: 800;
  225. font-size: 40rpx;
  226. color: #002846;
  227. line-height: 40rpx;
  228. margin-top: 24rpx;
  229. }
  230. &-state{
  231. margin-top: 30rpx;
  232. &-pre{
  233. padding-left: 16rpx;
  234. position: relative;
  235. font-family: PingFangSC, PingFang SC;
  236. font-weight: 400;
  237. font-size: 24rpx;
  238. color: #657588;
  239. line-height: 20rpx;
  240. span{
  241. color: #1D2129;
  242. }
  243. &::before{
  244. content: '';
  245. width: 10rpx;
  246. height: 10rpx;
  247. border-radius: 5rpx;
  248. position: absolute;
  249. left: 0;
  250. top: 50%;
  251. margin-top: -5rpx;
  252. }
  253. &.grey{
  254. &::before{
  255. background: #DDE0E6;
  256. }
  257. }
  258. &.yellow{
  259. &::before{
  260. background: #FFD750;
  261. }
  262. }
  263. &.green{
  264. &::before{
  265. background: #31D1D6;
  266. }
  267. }
  268. }
  269. }
  270. &-progress{
  271. margin-top: 20rpx;
  272. width: 100%;
  273. height: 10rpx;
  274. background: #DFE5EE;
  275. border-radius: 5rpx;
  276. position: relative;
  277. &-current{
  278. height: 10rpx;
  279. border-radius: 4rpx;
  280. position: absolute;
  281. left: 0;
  282. top: 0;
  283. }
  284. .pbp-yellow{
  285. background: #FFD750;
  286. }
  287. .pbp-green{
  288. background: #31D1D6;
  289. }
  290. }
  291. }
  292. }
  293. .boxs{
  294. margin-top: 20rpx;
  295. &-pre{
  296. width: calc(50% -11rpx);
  297. padding: 36rpx 124rpx 36rpx 24rpx;
  298. box-sizing: border-box;
  299. height: 184rpx;
  300. &-title{
  301. font-family: PingFang-SC, PingFang-SC;
  302. font-weight: bold;
  303. font-size: 32rpx;
  304. color: #002846;
  305. line-height: 45rpx;
  306. }
  307. &-tip{
  308. font-family: PingFangSC, PingFang SC;
  309. font-weight: 400;
  310. font-size: 24rpx;
  311. color: #657588;
  312. line-height: 33rpx;
  313. margin-top: 20rpx;
  314. }
  315. &.bp1{
  316. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg1.png') no-repeat;
  317. background-size: 100% 100%;
  318. }
  319. &.bp2{
  320. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg2.png') no-repeat;
  321. background-size: 100% 100%;
  322. }
  323. }
  324. }
  325. .common{
  326. margin-top: 20rpx;
  327. background: #FFFFFF;
  328. border-radius: 24rpx;
  329. padding: 40rpx 24rpx 48rpx;
  330. &-title{
  331. font-family: PingFang-SC, PingFang-SC;
  332. font-weight: bold;
  333. font-size: 34rpx;
  334. color: #002846;
  335. line-height: 48rpx;
  336. }
  337. &-menu{
  338. margin-top: 45rpx;
  339. &-pre{
  340. width: calc(100% / 3);
  341. image{
  342. width: 62rpx;
  343. height: 62rpx;
  344. }
  345. text{
  346. font-family: PingFangSC, PingFang SC;
  347. font-weight: 400;
  348. font-size: 26rpx;
  349. color: #193D59;
  350. line-height: 26rpx;
  351. text-align: center;
  352. margin-top: 27rpx;
  353. }
  354. }
  355. }
  356. }
  357. .new-user-free{
  358. position: fixed;
  359. left: 0;
  360. right: 0;
  361. top: 0;
  362. bottom: 0;
  363. background: rgba(0, 0, 0, .6);
  364. z-index: 1000;
  365. &-box1{
  366. width: calc(100% - 180rpx);
  367. height: 280rpx;
  368. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_title.png') no-repeat;
  369. background-size: 100% 100%;
  370. padding-left: 53rpx;
  371. &-text{
  372. font-family: SourceHanSansCN, SourceHanSansCN;
  373. font-weight: bold;
  374. font-size: 36rpx;
  375. color: #874016;
  376. line-height: 54rpx;
  377. margin-top: 140rpx;
  378. }
  379. }
  380. &-box2{
  381. width: calc(100% - 140rpx);
  382. background: #FFFFFF;
  383. border-radius: 24rpx;
  384. padding: 45rpx 25rpx 42rpx;
  385. box-sizing: border-box;
  386. &-price{
  387. width: 100%;
  388. height: 132rpx;
  389. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_price.png') no-repeat;
  390. background-size: 100% 100%;
  391. padding: 27rpx 34rpx 27rpx 30rpx;
  392. box-sizing: border-box;
  393. &-left{
  394. &-title{
  395. font-family: PingFang-SC, PingFang-SC;
  396. font-weight: bold;
  397. font-size: 28rpx;
  398. color: #5E2E11;
  399. line-height: 36rpx;
  400. }
  401. &-tip{
  402. font-family: PingFangSC, PingFang SC;
  403. font-weight: 400;
  404. font-size: 24rpx;
  405. color: #808080;
  406. line-height: 32rpx;
  407. margin-top: 10rpx;
  408. }
  409. }
  410. &-right{
  411. &-top{
  412. font-family: PingFang-SC, PingFang-SC;
  413. font-weight: bold;
  414. font-size: 48rpx;
  415. color: #FF5A09;
  416. line-height: 67rpx;
  417. }
  418. &-bottom{
  419. font-family: PingFangSC, PingFang SC;
  420. font-weight: 400;
  421. font-size: 24rpx;
  422. color: #612D11;
  423. line-height: 33rpx;
  424. margin-top: 3rpx;
  425. }
  426. }
  427. }
  428. &-btn{
  429. width: calc(100% - 170rpx);
  430. height: 80rpx;
  431. border-radius: 40rpx;
  432. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_btn.png') no-repeat;
  433. background-size: 100% 100%;
  434. font-family: PingFang-SC, PingFang-SC;
  435. font-weight: bold;
  436. font-size: 32rpx;
  437. color: #5E2E11;
  438. line-height: 80rpx;
  439. text-align: center;
  440. letter-spacing: 2rpx;
  441. margin-top: 38rpx;
  442. }
  443. }
  444. &-close{
  445. width: 64rpx;
  446. height: 64rpx;
  447. margin-top: 48rpx;
  448. }
  449. }
  450. .kind-reminder{
  451. position: fixed;
  452. left: 0;
  453. right: 0;
  454. top: 0;
  455. bottom: 0;
  456. z-index: 1000;
  457. background: rgba(0, 0, 0, .6);
  458. .kr-box{
  459. width: calc(100% - 100rpx);
  460. padding: 54rpx 60rpx 48rpx;
  461. box-sizing: border-box;
  462. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/remind_bg.png') no-repeat;
  463. background-size: 100% 100%;
  464. position: relative;
  465. image{
  466. width: 48rpx;
  467. height: 48rpx;
  468. position: absolute;
  469. top: 40rpx;
  470. right: 30rpx;
  471. }
  472. .kr-title{
  473. font-family: PingFang-SC, PingFang-SC;
  474. font-weight: bold;
  475. font-size: 36rpx;
  476. color: #002846;
  477. line-height: 56rpx;
  478. text-align: center;
  479. }
  480. .kr-p{
  481. font-family: PingFangSC, PingFang SC;
  482. font-weight: 400;
  483. font-size: 30rpx;
  484. color: #002846;
  485. line-height: 48rpx;
  486. text-align: center;
  487. span{
  488. font-weight: bold;
  489. margin: 0 10rpx;
  490. }
  491. }
  492. .kr-btn{
  493. width: calc(100% - 80rpx);
  494. height: 88rpx;
  495. background: #904A87;
  496. border-radius: 44rpx;
  497. font-family: PingFang-SC, PingFang-SC;
  498. font-weight: bold;
  499. font-size: 32rpx;
  500. color: #FFFFFF;
  501. line-height: 88rpx;
  502. text-align: center;
  503. letter-spacing: 2rpx;
  504. margin-top: 66rpx;
  505. }
  506. }
  507. }
  508. }
  509. </style>