home.vue 15 KB

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