home.vue 14 KB

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