home.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  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">点击开始</view>
  51. </view>
  52. <view class="boxs-pre bp2">
  53. <view class="boxs-pre-title">人工报告解读</view>
  54. <view class="boxs-pre-tip">添加客服微信预约</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: 36rpx 124rpx 36rpx 24rpx;
  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: #002846;
  309. line-height: 45rpx;
  310. }
  311. &-tip{
  312. font-family: PingFangSC, PingFang SC;
  313. font-weight: 400;
  314. font-size: 24rpx;
  315. color: #657588;
  316. line-height: 33rpx;
  317. margin-top: 20rpx;
  318. }
  319. &.bp1{
  320. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg1.png') no-repeat;
  321. background-size: 100% 100%;
  322. }
  323. &.bp2{
  324. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg2.png') no-repeat;
  325. background-size: 100% 100%;
  326. }
  327. }
  328. }
  329. .common{
  330. margin-top: 20rpx;
  331. background: #FFFFFF;
  332. border-radius: 24rpx;
  333. padding: 40rpx 24rpx 48rpx;
  334. position: relative;
  335. &-title{
  336. font-family: PingFang-SC, PingFang-SC;
  337. font-weight: bold;
  338. font-size: 34rpx;
  339. color: #002846;
  340. line-height: 48rpx;
  341. }
  342. &-menu{
  343. margin-top: 45rpx;
  344. &-pre{
  345. width: calc(100% / 3);
  346. image{
  347. width: 62rpx;
  348. height: 62rpx;
  349. }
  350. text{
  351. font-family: PingFangSC, PingFang SC;
  352. font-weight: 400;
  353. font-size: 26rpx;
  354. color: #193D59;
  355. line-height: 26rpx;
  356. text-align: center;
  357. margin-top: 27rpx;
  358. }
  359. }
  360. }
  361. }
  362. .new-user-free{
  363. position: fixed;
  364. left: 0;
  365. right: 0;
  366. top: 0;
  367. bottom: 0;
  368. background: rgba(0, 0, 0, .6);
  369. z-index: 1000;
  370. &-box1{
  371. width: calc(100% - 180rpx);
  372. height: 280rpx;
  373. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_title.png') no-repeat;
  374. background-size: 100% 100%;
  375. padding-left: 53rpx;
  376. &-text{
  377. font-family: SourceHanSansCN, SourceHanSansCN;
  378. font-weight: bold;
  379. font-size: 36rpx;
  380. color: #874016;
  381. line-height: 54rpx;
  382. margin-top: 140rpx;
  383. }
  384. }
  385. &-box2{
  386. width: calc(100% - 140rpx);
  387. background: #FFFFFF;
  388. border-radius: 24rpx;
  389. padding: 45rpx 25rpx 42rpx;
  390. box-sizing: border-box;
  391. &-price{
  392. width: 100%;
  393. height: 132rpx;
  394. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_price.png') no-repeat;
  395. background-size: 100% 100%;
  396. padding: 27rpx 34rpx 27rpx 30rpx;
  397. box-sizing: border-box;
  398. &-left{
  399. &-title{
  400. font-family: PingFang-SC, PingFang-SC;
  401. font-weight: bold;
  402. font-size: 28rpx;
  403. color: #5E2E11;
  404. line-height: 36rpx;
  405. }
  406. &-tip{
  407. font-family: PingFangSC, PingFang SC;
  408. font-weight: 400;
  409. font-size: 24rpx;
  410. color: #808080;
  411. line-height: 32rpx;
  412. margin-top: 10rpx;
  413. }
  414. }
  415. &-right{
  416. &-top{
  417. font-family: PingFang-SC, PingFang-SC;
  418. font-weight: bold;
  419. font-size: 48rpx;
  420. color: #FF5A09;
  421. line-height: 67rpx;
  422. }
  423. &-bottom{
  424. font-family: PingFangSC, PingFang SC;
  425. font-weight: 400;
  426. font-size: 24rpx;
  427. color: #612D11;
  428. line-height: 33rpx;
  429. margin-top: 3rpx;
  430. }
  431. }
  432. }
  433. &-btn{
  434. width: calc(100% - 170rpx);
  435. height: 80rpx;
  436. border-radius: 40rpx;
  437. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/new_free_btn.png') no-repeat;
  438. background-size: 100% 100%;
  439. font-family: PingFang-SC, PingFang-SC;
  440. font-weight: bold;
  441. font-size: 32rpx;
  442. color: #5E2E11;
  443. line-height: 80rpx;
  444. text-align: center;
  445. letter-spacing: 2rpx;
  446. margin-top: 38rpx;
  447. }
  448. }
  449. &-close{
  450. width: 64rpx;
  451. height: 64rpx;
  452. margin-top: 48rpx;
  453. }
  454. }
  455. .kind-reminder{
  456. position: fixed;
  457. left: 0;
  458. right: 0;
  459. top: 0;
  460. bottom: 0;
  461. z-index: 1000;
  462. background: rgba(0, 0, 0, .6);
  463. .kr-box{
  464. width: calc(100% - 100rpx);
  465. padding: 54rpx 60rpx 48rpx;
  466. box-sizing: border-box;
  467. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/remind_bg.png') no-repeat;
  468. background-size: 100% 100%;
  469. position: relative;
  470. image{
  471. width: 48rpx;
  472. height: 48rpx;
  473. position: absolute;
  474. top: 40rpx;
  475. right: 30rpx;
  476. }
  477. .kr-title{
  478. font-family: PingFang-SC, PingFang-SC;
  479. font-weight: bold;
  480. font-size: 36rpx;
  481. color: #002846;
  482. line-height: 56rpx;
  483. text-align: center;
  484. }
  485. .kr-p{
  486. font-family: PingFangSC, PingFang SC;
  487. font-weight: 400;
  488. font-size: 30rpx;
  489. color: #002846;
  490. line-height: 48rpx;
  491. text-align: center;
  492. span{
  493. font-weight: bold;
  494. margin: 0 10rpx;
  495. }
  496. }
  497. .kr-btn{
  498. width: calc(100% - 80rpx);
  499. height: 88rpx;
  500. background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);;
  501. border-radius: 44rpx;
  502. font-family: PingFang-SC, PingFang-SC;
  503. font-weight: bold;
  504. font-size: 32rpx;
  505. color: #FFFFFF;
  506. line-height: 88rpx;
  507. text-align: center;
  508. letter-spacing: 2rpx;
  509. margin-top: 66rpx;
  510. }
  511. }
  512. }
  513. }
  514. </style>