home.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <!-- <cus-header title='创衡汇教练AI智能体' bgColor="transparent" :showback="false"></cus-header> -->
  4. <u-navbar bgColor="transparent">
  5. <view class="u-nav-slot" slot="left" style="display: flex;background-color: transparent;">
  6. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/01/ed8615d1-5cf5-4bfd-977a-c654b2eb6560.png" style="width: 200rpx;height: 54rpx;"></image>
  7. </view>
  8. </u-navbar>
  9. <image class="topbg" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/dbb693be-c302-4848-8e2e-a4eb263aa60c.png"></image>
  10. <div class="home_top">
  11. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/12c326b4-7328-4282-9175-a87903adbf12.png"></image>
  12. <p>Hi,我是AI团队教练助手</p>
  13. <p class="tip">可以为你提供全方位多角度的PREILL团队分析</p>
  14. </div>
  15. <div class="order">
  16. <div class="pre" @tap="toTurn('/pages/questionnaire')">
  17. <div class="top">
  18. <div class="left">
  19. <p>我的问卷</p>
  20. <p>{{wjDwc}}/{{wjYwc}}</p>
  21. </div>
  22. <div class="right">
  23. <p>待完成:<span>{{wjDwc}}</span></p>
  24. <p>已完成:<span>{{wjYwc}}</span></p>
  25. </div>
  26. </div>
  27. <div class="bottom">
  28. <div class="jd" :style="{'width':(wjDwc/(wjDwc+wjYwc)*100)+'%'}"></div>
  29. </div>
  30. </div>
  31. <div class="pre" @tap="toTurn('/pages/report')">
  32. <div class="top">
  33. <div class="left">
  34. <p>我的报告</p>
  35. <p>{{reportCount}}</p>
  36. </div>
  37. <div class="right"></div>
  38. </div>
  39. <div class="bottom" style="margin-top: 40rpx;">
  40. <div class="jd green" :style="{'width':(reportCount?100:0)+'%'}"></div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="title">快速访问</div>
  45. <div class="menus adfacjb">
  46. <div class="m_pre adffcacjc" @tap="toTurn('/pages/dialog')">
  47. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/b86ddd7a-6111-48d8-a9db-54a62a3446c4.png"></image>
  48. <p>智能问答</p>
  49. </div>
  50. <div class="m_pre adffcacjc" @tap="toTurn('/pages/report')">
  51. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/35023203-f2d3-4c09-bd13-31047ec68d9e.png"></image>
  52. <p>我的报告</p>
  53. </div>
  54. <div class="m_pre adffcacjc" @tap="toTurn('/pages/questionnaire')">
  55. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/79bf1765-b520-43c7-9ed0-ab1d1a84fe64.png"></image>
  56. <p>我的问卷</p>
  57. </div>
  58. </div>
  59. <Tabbar :tabbarIndex="0"></Tabbar>
  60. </view>
  61. </template>
  62. <script>
  63. import Tabbar from '@/components/CusTabbar/index.vue'
  64. export default {
  65. components:{ Tabbar },
  66. data(){
  67. return {
  68. wjDwc:0,
  69. wjYwc:0,
  70. reportCount:0
  71. }
  72. },
  73. onLoad(options) {
  74. if(options.q){
  75. try{
  76. console.log("扫码进入参数:", options.q);
  77. const decodedUrl = decodeURIComponent(options.q);
  78. console.log("decodedUrl:", decodedUrl);
  79. const codeMatch = decodedUrl.match(/type=([^&]+)/);
  80. console.log("codeMatch:", codeMatch);
  81. const stationCode = codeMatch ? codeMatch[1] : null;
  82. console.log("stationCode:", stationCode);
  83. if(stationCode) uni.setStorageSync('channelType',stationCode)
  84. }catch(e){
  85. console.log(e,'e');
  86. }
  87. }
  88. if(uni.getStorageSync('token')){
  89. this.getWjList();
  90. this.getReportList();
  91. }
  92. },
  93. methods:{
  94. toTurn(url){
  95. if(!url) return
  96. if(url!=='/pages/dialog'&&!this.isLogin()) return
  97. uni.navigateTo({
  98. url
  99. })
  100. },
  101. getWjList(){
  102. this.$api.get('/core/teammember/que/listByUser').then(res=>{
  103. if(res.data.code!==0) return
  104. this.wjDwc = res.data.data.filter(d=>d.status===0).length;
  105. this.wjYwc = res.data.data.filter(d=>d.status===1).length;
  106. })
  107. },
  108. getReportList(){
  109. this.$api.get('/core/report/member/personalReportList').then(res=>{
  110. if(res.data.code!==0) return
  111. this.reportCount = res.data.data.length;
  112. })
  113. }
  114. }
  115. }
  116. </script>
  117. <style scoped lang="less">
  118. .tabPage{
  119. background: #FFFFFF;
  120. padding: 0 30rpx 192rpx;
  121. box-sizing: border-box;
  122. .topbg{
  123. width: 100%;
  124. height: 720rpx;
  125. position: fixed;
  126. top: 0;
  127. left: 0;
  128. }
  129. .home_top{
  130. width: 100%;
  131. height: 288rpx;
  132. position: relative;
  133. background:url(https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/16/537756e6-f473-479e-ab0a-1a56cce38cd2.png) no-repeat;
  134. background-size: 100% 100%;
  135. padding-left: 275rpx;
  136. box-sizing: border-box;
  137. padding-top: 71rpx;
  138. margin-top: 52rpx;
  139. &>image{
  140. width: 184rpx;
  141. height: 312rpx;
  142. position: absolute;
  143. left: 31rpx;
  144. bottom: 19rpx;
  145. }
  146. &>p{
  147. font-family: PingFang-SC, PingFang-SC;
  148. font-weight: bold;
  149. font-size: 34rpx;
  150. color: #252525;
  151. line-height: 48rpx;
  152. &.tip{
  153. font-family: PingFangSC, PingFang SC;
  154. font-weight: 400;
  155. font-size: 28rpx;
  156. color: #6B7280;
  157. line-height: 40rpx;
  158. margin-top: 11rpx;
  159. }
  160. }
  161. }
  162. .order{
  163. display: flex;
  164. justify-content: space-between;
  165. position: relative;
  166. margin-top: 20rpx;
  167. position: relative;
  168. .pre{
  169. width: calc(50% - 9rpx);
  170. background: linear-gradient( 180deg, #FFFFFF 0%, #FFFFFF 100%);
  171. box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(131,52,120,0.08);
  172. border-radius: 12rpx;
  173. padding: 40rpx 24rpx;
  174. box-sizing: border-box;
  175. .top{
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. .left{
  180. p{
  181. font-family: PingFangSC, PingFang SC;
  182. font-weight: 400;
  183. font-size: 28rpx;
  184. color: #252525;
  185. line-height: 28rpx;
  186. &:last-child{
  187. font-family: DINAlternate, DINAlternate;
  188. font-weight: bold;
  189. font-size: 40rpx;
  190. color: #333333;
  191. line-height: 40rpx;
  192. margin-top: 30rpx;
  193. }
  194. }
  195. }
  196. .right{
  197. p{
  198. font-family: PingFangSC, PingFang SC;
  199. font-weight: 400;
  200. font-size: 24rpx;
  201. color: #657588;
  202. position: relative;
  203. padding-left: 16rpx;
  204. &::before{
  205. content: '';
  206. width: 10rpx;
  207. height: 10rpx;
  208. background: #FEA400;
  209. border-radius: 50%;
  210. position: absolute;
  211. left: 0;
  212. top: 50%;
  213. margin-top: -5rpx;
  214. }
  215. &.gr::before{
  216. background: #31D1D6;
  217. }
  218. &:last-child{
  219. margin-top: 44rpx;
  220. &::before{
  221. background: #DDE0E6;
  222. }
  223. }
  224. span{
  225. color: #1D2129;
  226. }
  227. }
  228. }
  229. }
  230. .bottom{
  231. width: 100%;
  232. height: 10rpx;
  233. background: #DFE5EE;
  234. border-radius: 3rpx;
  235. margin-top: 30rpx;
  236. position: relative;
  237. .jd{
  238. height: 10rpx;
  239. background: #FEA400;
  240. border-radius: 3rpx;
  241. position: absolute;
  242. left: 0;
  243. top: 0;
  244. &.green{
  245. background: #31D1D6;
  246. }
  247. }
  248. }
  249. }
  250. }
  251. &>.title{
  252. font-family: PingFang-SC, PingFang-SC;
  253. font-weight: bold;
  254. font-size: 34rpx;
  255. color: #111111;
  256. line-height: 48rpx;
  257. margin-top: 44rpx;
  258. }
  259. .menus{
  260. margin-top: 64rpx;
  261. .m_pre{
  262. width: calc(100% / 3);
  263. image{
  264. width: 110rpx;
  265. height: 110rpx;
  266. }
  267. p{
  268. font-family: PingFangSC, PingFang SC;
  269. font-weight: 400;
  270. font-size: 26rpx;
  271. color: #252525;
  272. line-height: 37rpx;
  273. text-align: center;
  274. margin-top: 24rpx;
  275. }
  276. }
  277. }
  278. }
  279. </style>