home.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  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. if(uni.getStorageSync('newUser')) this.newUserFreeShow = true;
  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: #F7F7F7;
  193. .topbg{
  194. width: 100%;
  195. height: 720rpx;
  196. position: fixed;
  197. top: 0;
  198. left: 0;
  199. right: 0;
  200. }
  201. .lunbo{
  202. width: 100%;
  203. height: 368rpx;
  204. margin-top: 30rpx;
  205. position: relative;
  206. }
  207. .preill{
  208. margin-top: 30rpx;
  209. position: relative;
  210. &-box{
  211. width: calc(50% - 11rpx);
  212. background: #FFFFFF;
  213. border-radius: 24rpx;
  214. padding: 36rpx 24rpx 26rpx;
  215. box-sizing: border-box;
  216. &-title{
  217. font-family: PingFang-SC, PingFang-SC;
  218. font-weight: bold;
  219. font-size: 28rpx;
  220. color: #002846;
  221. line-height: 28rpx;
  222. span{
  223. font-size: 36rpx;
  224. }
  225. }
  226. &-num{
  227. font-family: PingFang-SC, PingFang-SC;
  228. font-weight: 800;
  229. font-size: 40rpx;
  230. color: #002846;
  231. line-height: 40rpx;
  232. margin-top: 24rpx;
  233. }
  234. &-state{
  235. margin-top: 40rpx;
  236. &-pre{
  237. padding-left: 16rpx;
  238. position: relative;
  239. font-family: PingFangSC, PingFang SC;
  240. font-weight: 400;
  241. font-size: 24rpx;
  242. color: #657588;
  243. line-height: 20rpx;
  244. span{
  245. color: #1D2129;
  246. }
  247. &::before{
  248. content: '';
  249. width: 10rpx;
  250. height: 10rpx;
  251. border-radius: 5rpx;
  252. position: absolute;
  253. left: 0;
  254. top: 50%;
  255. margin-top: -5rpx;
  256. }
  257. &.grey{
  258. &::before{
  259. background: #DDE0E6;
  260. }
  261. }
  262. &.yellow{
  263. &::before{
  264. background: #FFD750;
  265. }
  266. }
  267. &.green{
  268. &::before{
  269. background: #31D1D6;
  270. }
  271. }
  272. }
  273. }
  274. &-progress{
  275. margin-top: 20rpx;
  276. width: 100%;
  277. height: 10rpx;
  278. background: #DFE5EE;
  279. border-radius: 5rpx;
  280. position: relative;
  281. &-current{
  282. height: 10rpx;
  283. border-radius: 4rpx;
  284. position: absolute;
  285. left: 0;
  286. top: 0;
  287. }
  288. .pbp-yellow{
  289. background: #FFD750;
  290. }
  291. .pbp-green{
  292. background: #31D1D6;
  293. }
  294. }
  295. }
  296. }
  297. .boxs{
  298. margin-top: 20rpx;
  299. position: relative;
  300. &-pre{
  301. width: calc(50% - 11rpx);
  302. padding: 42rpx 0 0 20rpx;
  303. box-sizing: border-box;
  304. height: 184rpx;
  305. &-title{
  306. font-family: PingFang-SC, PingFang-SC;
  307. font-weight: bold;
  308. font-size: 32rpx;
  309. color: #E0EFEF;
  310. line-height: 45rpx;
  311. }
  312. &-tip{
  313. font-family: PingFangSC, PingFang SC;
  314. font-weight: 400;
  315. font-size: 24rpx;
  316. color: #E0EFEF;
  317. line-height: 33rpx;
  318. margin-top: 16rpx;
  319. image{
  320. width: 26rpx;
  321. height: 26rpx;
  322. margin-left: 12rpx;
  323. }
  324. }
  325. &.bp1{
  326. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg1.png') no-repeat;
  327. background-size: 100% 100%;
  328. }
  329. &.bp2{
  330. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg2.png') no-repeat;
  331. background-size: 100% 100%;
  332. }
  333. }
  334. }
  335. .common{
  336. margin-top: 20rpx;
  337. background: #FFFFFF;
  338. border-radius: 24rpx;
  339. padding: 40rpx 24rpx 48rpx;
  340. position: relative;
  341. &-title{
  342. font-family: PingFang-SC, PingFang-SC;
  343. font-weight: bold;
  344. font-size: 34rpx;
  345. color: #002846;
  346. line-height: 48rpx;
  347. }
  348. &-menu{
  349. margin-top: 45rpx;
  350. &-pre{
  351. width: calc(100% / 3);
  352. image{
  353. width: 62rpx;
  354. height: 62rpx;
  355. }
  356. text{
  357. font-family: PingFangSC, PingFang SC;
  358. font-weight: 400;
  359. font-size: 26rpx;
  360. color: #193D59;
  361. line-height: 26rpx;
  362. text-align: center;
  363. margin-top: 27rpx;
  364. }
  365. }
  366. }
  367. }
  368. .new-user-free{
  369. position: fixed;
  370. left: 0;
  371. right: 0;
  372. top: 0;
  373. bottom: 0;
  374. background: rgba(0, 0, 0, .6);
  375. z-index: 1000;
  376. &-box1{
  377. width: calc(100% - 180rpx);
  378. height: 280rpx;
  379. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_title.png') no-repeat;
  380. background-size: 100% 100%;
  381. padding-left: 53rpx;
  382. &-text{
  383. font-family: SourceHanSansCN, SourceHanSansCN;
  384. font-weight: bold;
  385. font-size: 36rpx;
  386. color: #874016;
  387. line-height: 54rpx;
  388. margin-top: 140rpx;
  389. }
  390. }
  391. &-box2{
  392. width: calc(100% - 140rpx);
  393. background: #FFFFFF;
  394. border-radius: 24rpx;
  395. padding: 45rpx 25rpx 42rpx;
  396. box-sizing: border-box;
  397. &-price{
  398. width: 100%;
  399. height: 132rpx;
  400. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_price.png') no-repeat;
  401. background-size: 100% 100%;
  402. padding: 27rpx 34rpx 27rpx 30rpx;
  403. box-sizing: border-box;
  404. &-left{
  405. &-title{
  406. font-family: PingFang-SC, PingFang-SC;
  407. font-weight: bold;
  408. font-size: 28rpx;
  409. color: #5E2E11;
  410. line-height: 36rpx;
  411. }
  412. &-tip{
  413. font-family: PingFangSC, PingFang SC;
  414. font-weight: 400;
  415. font-size: 24rpx;
  416. color: #808080;
  417. line-height: 32rpx;
  418. margin-top: 10rpx;
  419. }
  420. }
  421. &-right{
  422. &-top{
  423. font-family: PingFang-SC, PingFang-SC;
  424. font-weight: bold;
  425. font-size: 48rpx;
  426. color: #FF5A09;
  427. line-height: 67rpx;
  428. }
  429. &-bottom{
  430. font-family: PingFangSC, PingFang SC;
  431. font-weight: 400;
  432. font-size: 24rpx;
  433. color: #612D11;
  434. line-height: 33rpx;
  435. margin-top: 3rpx;
  436. text-decoration: line-through;
  437. }
  438. }
  439. }
  440. &-btn{
  441. width: calc(100% - 170rpx);
  442. height: 80rpx;
  443. border-radius: 40rpx;
  444. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_btn.png') no-repeat;
  445. background-size: 100% 100%;
  446. font-family: PingFang-SC, PingFang-SC;
  447. font-weight: bold;
  448. font-size: 32rpx;
  449. color: #5E2E11;
  450. line-height: 80rpx;
  451. text-align: center;
  452. letter-spacing: 2rpx;
  453. margin-top: 38rpx;
  454. }
  455. }
  456. &-close{
  457. width: 64rpx;
  458. height: 64rpx;
  459. margin-top: 48rpx;
  460. }
  461. }
  462. .kind-reminder{
  463. position: fixed;
  464. left: 0;
  465. right: 0;
  466. top: 0;
  467. bottom: 0;
  468. z-index: 1000;
  469. background: rgba(0, 0, 0, .6);
  470. .kr-box{
  471. width: calc(100% - 100rpx);
  472. padding: 54rpx 60rpx 48rpx;
  473. box-sizing: border-box;
  474. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/remind_bg.png') no-repeat;
  475. background-size: 100% 100%;
  476. position: relative;
  477. image{
  478. width: 48rpx;
  479. height: 48rpx;
  480. position: absolute;
  481. top: 40rpx;
  482. right: 30rpx;
  483. }
  484. .kr-title{
  485. font-family: PingFang-SC, PingFang-SC;
  486. font-weight: bold;
  487. font-size: 36rpx;
  488. color: #002846;
  489. line-height: 56rpx;
  490. text-align: center;
  491. }
  492. .kr-p{
  493. font-family: PingFangSC, PingFang SC;
  494. font-weight: 400;
  495. font-size: 30rpx;
  496. color: #002846;
  497. line-height: 48rpx;
  498. text-align: center;
  499. span{
  500. font-weight: bold;
  501. margin: 0 10rpx;
  502. }
  503. }
  504. .kr-btn{
  505. width: calc(100% - 80rpx);
  506. height: 88rpx;
  507. background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);;
  508. border-radius: 44rpx;
  509. font-family: PingFang-SC, PingFang-SC;
  510. font-weight: bold;
  511. font-size: 32rpx;
  512. color: #FFFFFF;
  513. line-height: 88rpx;
  514. text-align: center;
  515. letter-spacing: 2rpx;
  516. margin-top: 66rpx;
  517. }
  518. }
  519. }
  520. }
  521. </style>