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