userCenterMyIntegral.vue 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635
  1. <template>
  2. <div class="userCenterMyIntegral">
  3. <div class="user">
  4. <div class="head">
  5. <div class="headPortrait">
  6. <img
  7. v-if="!booleanFlag.headPortraitDefaultImg"
  8. :src="'api/file/pub/' + user.umsUser.userPic"
  9. alt=""
  10. style="width: 100%; height: 100%"
  11. @error="booleanFlag.headPortraitDefaultImg = true"
  12. />
  13. <img
  14. v-if="booleanFlag.headPortraitDefaultImg"
  15. :src="require('@/assets/img/userCenter/user.png')"
  16. alt=""
  17. style="width: 100%; height: 100%"
  18. />
  19. </div>
  20. <!-- <div class="level">
  21. <div v-if="isZh">
  22. <img
  23. v-if="!booleanFlag.levelDefaultImg"
  24. :src="require('@/assets/img/userCenter/level02.png')"
  25. alt=""
  26. style="width: 100%; height: 100%"
  27. />
  28. </div>
  29. <div v-else>
  30. <img
  31. v-if="!booleanFlag.levelDefaultImg"
  32. :src="require('@/assets/img/userCenter/黄金用户e.png')"
  33. alt=""
  34. style="width: 100%; height: 100%"
  35. />
  36. </div>
  37. </div> -->
  38. <!-- 白银用户 -->
  39. <div v-if="userLevel1 == 2" class="level">
  40. <div v-if="isZh">
  41. <img
  42. v-if="!booleanFlag.levelDefaultImg"
  43. :src="require('@/assets/img/userCenter/白银用户.png')"
  44. alt=""
  45. style="width: 100%; height: 100%"
  46. />
  47. </div>
  48. <div v-else>
  49. <img
  50. v-if="!booleanFlag.levelDefaultImg"
  51. :src="require('@/assets/img/userCenter/@1白银用户.png')"
  52. alt=""
  53. style="width: 100%; height: 100%"
  54. />
  55. </div>
  56. </div>
  57. <!-- 黄金用户 -->
  58. <div v-if="userLevel1 == 3" class="level">
  59. <div v-if="isZh">
  60. <img
  61. v-if="!booleanFlag.levelDefaultImg"
  62. :src="require('@/assets/img/userCenter/level02.png')"
  63. alt=""
  64. style="width: 100%; height: 100%"
  65. />
  66. </div>
  67. <div v-else>
  68. <img
  69. v-if="!booleanFlag.levelDefaultImg"
  70. :src="require('@/assets/img/userCenter/黄金用户e.png')"
  71. alt=""
  72. style="width: 100%; height: 100%"
  73. />
  74. </div>
  75. </div>
  76. <!-- 白金用户 -->
  77. <div v-if="userLevel1 == 4" class="level">
  78. <div v-if="isZh">
  79. <img
  80. v-if="!booleanFlag.levelDefaultImg"
  81. :src="require('@/assets/img/userCenter/白金用户.png')"
  82. alt=""
  83. style="width: 100%; height: 100%"
  84. />
  85. </div>
  86. <div v-else>
  87. <img
  88. v-if="!booleanFlag.levelDefaultImg"
  89. :src="require('@/assets/img/userCenter/白金用户e.png')"
  90. alt=""
  91. style="width: 100%; height: 100%"
  92. />
  93. </div>
  94. </div>
  95. <!-- 钻石用户 -->
  96. <div v-if="userLevel1 == 5" class="level">
  97. <div v-if="isZh">
  98. <img
  99. v-if="!booleanFlag.levelDefaultImg"
  100. :src="require('@/assets/img/userCenter/白金用户.png')"
  101. alt=""
  102. style="width: 100%; height: 100%"
  103. />
  104. </div>
  105. <div v-else>
  106. <img
  107. v-if="!booleanFlag.levelDefaultImg"
  108. :src="require('@/assets/img/userCenter/白金用户e.png')"
  109. alt=""
  110. style="width: 100%; height: 100%"
  111. />
  112. </div>
  113. </div>
  114. </div>
  115. <div class="content">
  116. <div class="name">
  117. <span>{{ realName }}</span>
  118. <span class="tag _568AD5" v-if="user.umsUser.realStatus">{{
  119. realStatusDicts[user.umsUser.realStatus]
  120. }}</span>
  121. <!-- <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus">{{
  122. userEmailStatusDicts[user.umsUser.userEmailStatus]
  123. }}</span> -->
  124. <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus == '0'">
  125. {{ $i18n.locale == 'zh' ? '邮箱已验证' : 'Email Verified' }}
  126. </span>
  127. <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus == '1'">
  128. {{ $i18n.locale == 'zh' ? '邮箱未验证' : 'Email Not Verified' }}
  129. </span>
  130. <!-- <span class="tag _F9AF55" v-if="user.umsUser.userMobileStatus">{{
  131. userMobileStatusDicts[user.umsUser.userMobileStatus]
  132. }}</span> -->
  133. <span
  134. class="tag _F9AF55"
  135. v-if="user.umsUser.userMobileStatus == '0'"
  136. >{{ $i18n.locale == 'zh' ? '手机已验证' : 'Mobile Verified' }}</span
  137. >
  138. <span
  139. class="tag _F9AF55"
  140. v-if="user.umsUser.userMobileStatus == '1'"
  141. >{{
  142. $i18n.locale == 'zh' ? '手机未验证' : 'Mobile Not Verified'
  143. }}</span
  144. >
  145. </div>
  146. <div class="integral">
  147. <span
  148. >{{ $i18n.locale == 'zh' ? '可用积分' : 'Available Integral' }}:
  149. </span>
  150. <span style="font-size: 16px; color: #ef790c">{{ integral }}</span>
  151. <el-button
  152. :disabled="whetherFreez"
  153. type="primary"
  154. style="margin-left: 60px; vertical-align: super"
  155. @click="booleanFlag.checkInsFlag = true"
  156. >
  157. {{ $i18n.locale == 'zh' ? '签到' : 'Sign In' }}
  158. </el-button>
  159. <el-button
  160. :disabled="whetherFreez"
  161. type="primary"
  162. style="vertical-align: super"
  163. @click="
  164. toView('userCenterIntegralExchange', {
  165. key: '/userCenterIntegralExchange',
  166. })
  167. "
  168. >
  169. {{ $i18n.locale == 'zh' ? '积分兑换' : 'Integral Exchange' }}
  170. </el-button>
  171. </div>
  172. </div>
  173. </div>
  174. <div class="task">
  175. <div class="title">
  176. <span
  177. style="
  178. width: 7px;
  179. height: 19px;
  180. background-color: #265186;
  181. margin-left: 4px;
  182. "
  183. ></span>
  184. <span style="margin-left: 8px; color: #265186">{{
  185. $i18n.locale == 'zh' ? '新手任务' : 'New Task'
  186. }}</span>
  187. </div>
  188. <el-tabs v-model="activeName">
  189. <el-tab-pane
  190. :label="$i18n.locale === 'zh' ? '积分任务' : 'Integral Task'"
  191. name="first"
  192. >
  193. <div class="content">
  194. <div
  195. v-for="item in userTaskComplete.other.piont_newbie_task"
  196. class="card"
  197. >
  198. <div style="width: 126px; display: flex; align-items: center">
  199. <div style="margin-left: 30px">
  200. <div v-if="isZh">
  201. <img
  202. v-if="item.count == item.number"
  203. :src="newDoneTasks[item.taskDict]"
  204. alt=""
  205. style="width: 68px"
  206. />
  207. <img
  208. v-else
  209. :src="newUnDoneTasks[item.taskDict]"
  210. alt=""
  211. style="width: 68px"
  212. />
  213. </div>
  214. <div v-else>
  215. <img
  216. v-if="item.count == item.number"
  217. :src="newDoneTasksEn[item.taskDict]"
  218. alt=""
  219. style="width: 68px"
  220. />
  221. <img
  222. v-else
  223. :src="newUnDoneTasksEn[item.taskDict]"
  224. alt=""
  225. style="width: 68px"
  226. />
  227. </div>
  228. </div>
  229. </div>
  230. <div
  231. style="
  232. flex: 1;
  233. display: flex;
  234. flex-direction: column;
  235. justify-content: center;
  236. font-size: 16px;
  237. "
  238. >
  239. <div>
  240. <!-- <span style="font-weight: 600">{{ item.taskName }}</span> -->
  241. <span style="font-weight: 600">{{
  242. $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
  243. }}</span>
  244. </div>
  245. <div style="margin-top: 10px; display: flex">
  246. <div class="integral">
  247. <img
  248. style="width: 16px"
  249. src="../../../assets/img/userCenter/integral.png"
  250. alt=""
  251. />
  252. <span>{{
  253. $i18n.locale == 'zh' ? '积分' : 'Integral'
  254. }}</span>
  255. <span style="color: #e01729; margin-left: 5px"
  256. >+{{ item.taskPoint.day1 }}</span
  257. >
  258. </div>
  259. <div style="margin: 0 10px" class="grow">
  260. <span
  261. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  262. {{ item.count }}/{{ item.number }}</span
  263. >
  264. </div>
  265. </div>
  266. </div>
  267. <div
  268. style="padding-right: 20px; display: flex; align-items: center"
  269. >
  270. <el-button
  271. type="primary"
  272. style="
  273. color: #858585;
  274. background-color: transparent;
  275. border-color: #858585;
  276. "
  277. v-if="item.count == item.number"
  278. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  279. </el-button>
  280. <el-button
  281. :disabled="whetherFreez"
  282. type="primary"
  283. style="color: #66b1ff; background-color: #fff"
  284. v-else
  285. @click="toCompleteTheTask(item)"
  286. >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
  287. </el-button>
  288. </div>
  289. </div>
  290. </div>
  291. </el-tab-pane>
  292. <el-tab-pane
  293. :label="$i18n.locale === 'zh' ? '成长值任务' : 'Growth Task'"
  294. name="second"
  295. >
  296. <div class="content">
  297. <div v-for="item in growNewTask" class="card">
  298. <div style="width: 126px; display: flex; align-items: center">
  299. <div style="margin-left: 30px">
  300. <div v-if="isZh">
  301. <img
  302. v-if="item.count == item.number"
  303. :src="newDoneTasks[item.taskDict]"
  304. alt=""
  305. style="width: 68px"
  306. />
  307. <img
  308. v-else
  309. :src="newUnDoneTasks[item.taskDict]"
  310. alt=""
  311. style="width: 68px"
  312. />
  313. </div>
  314. <div v-else>
  315. <img
  316. v-if="item.count == item.number"
  317. :src="newDoneTasksEn[item.taskDict]"
  318. alt=""
  319. style="width: 68px"
  320. />
  321. <img
  322. v-else
  323. :src="newUnDoneTasksEn[item.taskDict]"
  324. alt=""
  325. style="width: 68px"
  326. />
  327. </div>
  328. </div>
  329. </div>
  330. <div
  331. style="
  332. flex: 1;
  333. display: flex;
  334. flex-direction: column;
  335. justify-content: center;
  336. font-size: 16px;
  337. "
  338. >
  339. <div>
  340. <span style="font-weight: 600">{{
  341. $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
  342. }}</span>
  343. </div>
  344. <div style="margin-top: 10px; display: flex">
  345. <div style="margin: 0 10px" class="grow">
  346. <img
  347. style="width: 16px"
  348. src="../../../assets/img/userCenter/grow.png"
  349. alt=""
  350. />
  351. <span>{{
  352. $i18n.locale == 'zh' ? '成长值' : 'GrowthValue'
  353. }}</span>
  354. <span style="color: #2dc22b; margin-left: 5px"
  355. >+{{ item.growth }}</span
  356. >
  357. <span style="margin-left: 10px"
  358. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  359. {{ item.count }}/{{ item.number }}</span
  360. >
  361. </div>
  362. </div>
  363. </div>
  364. <div
  365. style="padding-right: 20px; display: flex; align-items: center"
  366. >
  367. <el-button
  368. type="primary"
  369. style="
  370. color: #858585;
  371. background-color: transparent;
  372. border-color: #858585;
  373. "
  374. v-if="item.count == item.number"
  375. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  376. </el-button>
  377. <el-button
  378. :disabled="whetherFreez"
  379. type="primary"
  380. style="color: #66b1ff; background-color: #fff"
  381. v-else
  382. @click="toCompleteGrowthTask(item)"
  383. >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
  384. </el-button>
  385. </div>
  386. </div>
  387. </div>
  388. </el-tab-pane>
  389. </el-tabs>
  390. </div>
  391. <div class="task" style="margin-bottom: 20px">
  392. <div class="title">
  393. <span
  394. style="
  395. width: 7px;
  396. height: 19px;
  397. background-color: #265186;
  398. margin-left: 4px;
  399. "
  400. ></span>
  401. <span style="margin-left: 8px; color: #265186">{{
  402. $i18n.locale == 'zh' ? '日常任务' : 'Daily Task'
  403. }}</span>
  404. </div>
  405. <el-tabs v-model="activeName1">
  406. <el-tab-pane
  407. :label="$i18n.locale === 'zh' ? '积分任务' : 'Integral Task'"
  408. name="first1"
  409. >
  410. <div class="content">
  411. <div
  412. v-for="item in userTaskComplete.other.point_daily_task"
  413. class="card"
  414. >
  415. <div style="width: 126px; display: flex; align-items: center">
  416. <div style="margin-left: 30px">
  417. <div v-if="isZh">
  418. <img
  419. v-if="item.count == item.number"
  420. :src="dayDoneTasks[item.taskDict]"
  421. alt=""
  422. style="width: 68px"
  423. />
  424. <img
  425. v-else
  426. :src="dayUnDoneTasks[item.taskDict]"
  427. alt=""
  428. style="width: 68px"
  429. />
  430. </div>
  431. <div v-else>
  432. <img
  433. v-if="item.count == item.number"
  434. :src="dayDoneTasksEn[item.taskDict]"
  435. alt=""
  436. style="width: 68px"
  437. />
  438. <img
  439. v-else
  440. :src="dayUnDoneTasksEn[item.taskDict]"
  441. alt=""
  442. style="width: 68px"
  443. />
  444. </div>
  445. </div>
  446. </div>
  447. <div
  448. style="
  449. flex: 1;
  450. display: flex;
  451. flex-direction: column;
  452. justify-content: center;
  453. font-size: 16px;
  454. "
  455. >
  456. <div>
  457. <span style="font-weight: 600">{{
  458. $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
  459. }}</span>
  460. </div>
  461. <div style="margin-top: 10px">
  462. <img
  463. style="width: 18px"
  464. src="../../../assets/img/userCenter/integral.png"
  465. alt=""
  466. />
  467. <span>{{ $i18n.locale == 'zh' ? '积分' : 'Integral' }}</span>
  468. <span>{{
  469. item.taskPoint.day1.indexOf('-') == -1 ? '+' : ''
  470. }}</span>
  471. <span style="color: #e01729; margin-left: 5px">{{
  472. item.taskPoint.day1
  473. }}</span>
  474. <span style="margin-left: 30px"
  475. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  476. {{ item.count }}/{{ item.number }}</span
  477. >
  478. </div>
  479. </div>
  480. <div
  481. style="padding-right: 20px; display: flex; align-items: center"
  482. >
  483. <el-button
  484. type="primary"
  485. style="
  486. color: #858585;
  487. background-color: transparent;
  488. border-color: #858585;
  489. "
  490. v-if="item.count == item.number"
  491. >
  492. {{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  493. </el-button>
  494. <el-button
  495. :disabled="whetherFreez"
  496. type="primary"
  497. style="color: #66b1ff; background-color: #fff"
  498. v-else
  499. @click="toCompleteTheTask(item)"
  500. >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
  501. </el-button>
  502. </div>
  503. </div>
  504. </div>
  505. </el-tab-pane>
  506. <el-tab-pane
  507. :label="$i18n.locale === 'zh' ? '成长值任务' : 'Growth Task'"
  508. name="second1"
  509. >
  510. <div class="content">
  511. <div v-for="item in growDailyTask" class="card">
  512. <div style="width: 126px; display: flex; align-items: center">
  513. <div style="margin-left: 30px">
  514. <div v-if="isZh">
  515. <img
  516. v-if="item.count == item.number"
  517. :src="dayDoneTasks[item.taskDict]"
  518. alt=""
  519. style="width: 68px"
  520. />
  521. <img
  522. v-else
  523. :src="dayUnDoneTasks[item.taskDict]"
  524. alt=""
  525. style="width: 68px"
  526. />
  527. </div>
  528. <div v-else>
  529. <img
  530. v-if="item.count == item.number"
  531. :src="dayDoneTasksEn[item.taskDict]"
  532. alt=""
  533. style="width: 68px"
  534. />
  535. <img
  536. v-else
  537. :src="dayUnDoneTasksEn[item.taskDict]"
  538. alt=""
  539. style="width: 68px"
  540. />
  541. </div>
  542. </div>
  543. </div>
  544. <div
  545. style="
  546. flex: 1;
  547. display: flex;
  548. flex-direction: column;
  549. justify-content: center;
  550. font-size: 16px;
  551. "
  552. >
  553. <div>
  554. <span style="font-weight: 600">{{
  555. $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
  556. }}</span>
  557. </div>
  558. <div style="margin-top: 10px">
  559. <img
  560. style="width: 18px"
  561. src="../../../assets/img/userCenter/grow.png"
  562. alt=""
  563. />
  564. <span>{{ $i18n.locale == 'zh' ? '成长值' : 'Growth' }}</span>
  565. <span>{{ item.growth.indexOf('-') == -1 ? '+' : '' }}</span>
  566. <span style="color: #e01729; margin-left: 5px">{{
  567. item.growth
  568. }}</span>
  569. <span style="margin-left: 30px"
  570. >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  571. {{ item.count }}/{{ item.number }}</span
  572. >
  573. </div>
  574. </div>
  575. <div
  576. style="padding-right: 20px; display: flex; align-items: center"
  577. >
  578. <el-button
  579. type="primary"
  580. style="
  581. color: #858585;
  582. background-color: transparent;
  583. border-color: #858585;
  584. "
  585. v-if="item.count == item.number"
  586. >
  587. {{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
  588. </el-button>
  589. <el-button
  590. :disabled="whetherFreez"
  591. type="primary"
  592. style="color: #66b1ff; background-color: #fff"
  593. v-else
  594. @click="toCompleteGrowthTask(item)"
  595. >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
  596. </el-button>
  597. </div>
  598. </div>
  599. </div>
  600. </el-tab-pane>
  601. </el-tabs>
  602. </div>
  603. <!-- 签到dialog -->
  604. <el-dialog
  605. center
  606. :modal="false"
  607. custom-class="userCenterMyIntegralDialog"
  608. style="margin-top: 180px"
  609. :visible.sync="booleanFlag.checkInsFlag"
  610. width="480px"
  611. >
  612. <span slot="title">
  613. <i class="el-icon-present" style="color: #fb630d"></i>
  614. {{ $i18n.locale == 'zh' ? '签到领积分' : 'Sign in and get points' }}
  615. </span>
  616. <div class="content">
  617. <div
  618. style="display: flex; flex-wrap: wrap; justify-content: space-between"
  619. >
  620. <div
  621. class="item"
  622. :class="{ notSignIn: index >= userTaskComplete.sign.length }"
  623. v-for="(value, name, index) in userTaskComplete.signTask.taskPoint"
  624. :key="'userCenterMyIntegralDialog' + index"
  625. >
  626. <div class="title">
  627. <span>
  628. {{
  629. $i18n.locale == 'zh' ? `第${index + 1}天` : `Day ${index + 1}`
  630. }}
  631. </span>
  632. </div>
  633. <div class="integral">
  634. <div style="margin-top: 18px">
  635. <i class="el-icon-present"></i>
  636. </div>
  637. <div>
  638. <span
  639. >{{ value
  640. }}{{ $i18n.locale == 'zh' ? '积分' : 'points' }}</span
  641. >
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. <div style="text-align: center">
  647. <el-button
  648. :disabled="isShow"
  649. type="primary"
  650. round
  651. style="width: 150px"
  652. @click="toSignIn"
  653. >
  654. {{ $i18n.locale == 'zh' ? '签到' : 'Sign In' }}
  655. </el-button>
  656. </div>
  657. </div>
  658. </el-dialog>
  659. <!-- 分享dialog -->
  660. <el-dialog
  661. style="margin-top: 180px"
  662. :title="isZh ? '请登录App分享' : 'Please log in to the app to share'"
  663. :visible.sync="shareDialogVisible"
  664. width="15%"
  665. :before-close="shareDialogBeforeClose"
  666. >
  667. <div style="margin-left: 18%">
  668. <img src="../../../assets/img/userCenter/share.png" alt="" />
  669. </div>
  670. <div slot="footer">
  671. <el-button @click="shareDialogVisible = false"
  672. >{{ $i18n.locale == 'zh' ? '取 消' : 'Cancel' }}
  673. </el-button>
  674. <el-button type="primary" @click="shareDialogVisible = false"
  675. >{{ $i18n.locale == 'zh' ? '确 定' : 'Determine' }}
  676. </el-button>
  677. </div>
  678. </el-dialog>
  679. </div>
  680. </template>
  681. <script>
  682. import {
  683. addSignPointDetail,
  684. getUserPointPage,
  685. completeGrowthValue,
  686. growthValueTaskList,
  687. addPointDetailByTaskDict,
  688. } from '@/api/user'
  689. import { judgeLogin } from '@/api/login'
  690. import moment from 'moment'
  691. import { getToken } from '@/api/token'
  692. export default {
  693. name: 'userCenterMyIntegral',
  694. data() {
  695. return {
  696. isShow: null,
  697. shareDialogVisible: false,
  698. activeName: 'first',
  699. activeName1: 'first1',
  700. booleanFlag: {
  701. headPortraitDefaultImg: false,
  702. levelDefaultImg: false,
  703. checkInsFlag: false,
  704. },
  705. user: {
  706. umsUser: {},
  707. },
  708. phoneVervificationSuccess: {},
  709. integral: '',
  710. // 积分任务
  711. userTaskComplete: {
  712. other: {},
  713. sign: [],
  714. signTask: {},
  715. },
  716. clickTask: {},
  717. clickGrowthTask: {},
  718. // 成长值任务
  719. growTask: [],
  720. userTypeDicts: {
  721. 2: this.$t('common.UserUsertyp1'),
  722. 5: this.$t('common.UserUsertyp2'),
  723. 4: this.$t('common.UserUsertyp3'),
  724. },
  725. userMobileStatusDicts: {
  726. 0: this.$t('common.PhoneNumberVerified'),
  727. 1: this.$t('common.PhoneNumberNotVerified'),
  728. },
  729. userEmailStatusDicts: {
  730. 0: this.$t('common.EmailVerified'),
  731. 1: this.$t('common.EmailNotVerified'),
  732. },
  733. realStatusDicts: {
  734. true: this.$t('common.RealNameVerification'),
  735. false: this.$t('common.RealNameNotVerification'),
  736. },
  737. isZh: true,
  738. // 新手未完成任务
  739. newUnDoneTasks: {
  740. // 完善个人信息
  741. point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成个人信息完善.png'),
  742. // 实名认证
  743. point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成实名认证.png'),
  744. // 绑定邮箱
  745. point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成绑定邮箱.png'),
  746. // 设置昵称
  747. point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成设置昵称.png'),
  748. // 头像
  749. point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成上传头像.png'),
  750. // 绑定手机号
  751. point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成绑定手机号.png'),
  752. },
  753. // 新手未完成任务英文
  754. newUnDoneTasksEn: {
  755. // 完善个人信息
  756. point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/个人信息完善.png'),
  757. // 实名认证
  758. point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/完成实名认证E.png'),
  759. // 绑定邮箱
  760. point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/绑定邮箱E.png'),
  761. // 设置昵称
  762. point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/设置昵称E.png'),
  763. // 头像
  764. point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/上传头像.png'),
  765. // 绑定手机号
  766. point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/绑定收集好E.png'),
  767. },
  768. // 新手完成任务
  769. newDoneTasks: {
  770. // 完善个人信息
  771. point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成个人信息完善.png'),
  772. // 实名认证
  773. point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成实名认证.png'),
  774. // 绑定邮箱
  775. point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成绑定邮箱.png'),
  776. // 设置昵称
  777. point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成设置昵称.png'),
  778. // 头像
  779. point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成上传头像.png'),
  780. // 绑定手机号
  781. point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成绑定手机号.png'),
  782. },
  783. // 新手完成任务英文
  784. newDoneTasksEn: {
  785. // 完善个人信息
  786. point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/个人信息完善完成E.png'),
  787. // 实名认证
  788. point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/完成实名认证完成E.png'),
  789. // 绑定邮箱
  790. point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/绑定邮箱完成E.png'),
  791. // 设置昵称
  792. point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/设置昵称完成E.png'),
  793. // 头像
  794. point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/上传头像完成E.png'),
  795. // 绑定手机号
  796. point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/绑定手机号完成E.png'),
  797. },
  798. // 日常未完成任务
  799. dayUnDoneTasks: {
  800. // 发布无效留言
  801. releasing_invalid_messages: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
  802. // 上传无效资料
  803. uploading_invalid_data: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
  804. // 阅读咨询
  805. point_read_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
  806. // 分享咨询
  807. point_task_share_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成分享.png'),
  808. // 上传资源成果
  809. point_task_upload_resources_result: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  810. // 分享项目
  811. point_task_share_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成分享.png'),
  812. // 上传项目资源
  813. point_task_upload_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  814. // 上传咨询信息
  815. point_task_upload_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  816. // 上传期刊信息
  817. point_task_upload_journal: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  818. // 收藏项目、国别、企业
  819. point_task_collect: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成关注.png'),
  820. // 关注项目、国别、企业
  821. point_task_attention: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成关注.png'),
  822. // 查看资源项目
  823. point_task_view_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成查看项目资源.png'),
  824. // 平台问题反馈
  825. platform_problem_feedback: require('@/assets/img/userCenter/grow/undone/问题反馈_未完成.png'),
  826. // 参与合作交流活动报名成功
  827. activity_registration_successful: require('@/assets/img/userCenter/grow/undone/活动报名成功_未完成.png'),
  828. // 上传调研资源并审核通过
  829. point_task_upload_research_resources: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  830. // 提交留言一次
  831. aubmit_a_message_once: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
  832. // 参与会议活动报名成功
  833. meeting_registration_successful: require('@/assets/img/userCenter/grow/undone/会议报名成功_未完成.png'),
  834. // 留言被点赞
  835. the_message_was_liked: require('@/assets/img/userCenter/grow/undone/留言被点赞_未完成.png'),
  836. // 登录打卡
  837. point_task_sign: require('@/assets/img/userCenter/grow/undone/登录打卡_未完成.png'),
  838. // 留言被收藏
  839. message_is_saved: require('@/assets/img/userCenter/grow/undone/留言被收藏_未完成.png'),
  840. // 项目被平台推荐
  841. project_recommended: require('@/assets/img/userCenter/grow/undone/项目被平台推荐_未完成.png'),
  842. // 发展合作留言
  843. point_task_development_cooperation_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成发展合作留言.png'),
  844. // 项目问询
  845. point_task_project_ask: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成项目问询.png'),
  846. // 项目留言
  847. point_task_project_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成项目留言.png'),
  848. },
  849. // 日常未完成任务英文
  850. dayUnDoneTasksEn: {
  851. // 发布无效留言
  852. // releasing_invalid_messages: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
  853. // 上传无效资料
  854. // uploading_invalid_data: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
  855. // 阅读咨询
  856. point_read_information: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
  857. // 分享咨询
  858. point_task_share_information: require('@/assets/img/userCenter/enIcon/undoneEn/分享资讯E.png'),
  859. // 上传资源成果
  860. point_task_upload_resources_result: require('@/assets/img/userCenter/enIcon/undoneEn/上传研究成果并审核通过E.png'),
  861. // 分享项目
  862. point_task_share_project: require('@/assets/img/userCenter/enIcon/undoneEn/分享项目E.png'),
  863. // 上传项目资源
  864. point_task_upload_resources_project: require('@/assets/img/userCenter/enIcon/undoneEn/上传项目资源并审核通过E.png'),
  865. // 上传咨询信息
  866. point_task_upload_information: require('@/assets/img/userCenter/enIcon/undoneEn/上传资讯信息并审核通过E.png'),
  867. // 上传期刊信息
  868. point_task_upload_journal: require('@/assets/img/userCenter/enIcon/undoneEn/上传期刊信息并审核通过E.png'),
  869. // 收藏项目、国别、企业
  870. point_task_collect: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
  871. // 关注项目、国别、企业
  872. point_task_attention: require('@/assets/img/userCenter/enIcon/undoneEn/关注项目国别企业E.png'),
  873. // 查看资源项目
  874. point_task_view_resources_project: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
  875. // 平台问题反馈
  876. platform_problem_feedback: require('@/assets/img/userCenter/enIcon/undoneEn/平台问题反馈E.png'),
  877. // 参与合作交流活动报名成功
  878. activity_registration_successful: require('@/assets/img/userCenter/enIcon/undoneEn/参与合作交流活动报名成功E.png'),
  879. // 上传调研资源并审核通过
  880. point_task_upload_research_resources: require('@/assets/img/userCenter/enIcon/undoneEn/上传调研资源并审核通过E.png'),
  881. // 提交留言一次
  882. aubmit_a_message_once: require('@/assets/img/userCenter/enIcon/undoneEn/提交留言一次E.png'),
  883. // 参与会议活动报名成功
  884. meeting_registration_successful: require('@/assets/img/userCenter/enIcon/undoneEn/参与会议活动报名成功E.png'),
  885. // 留言被点赞
  886. the_message_was_liked: require('@/assets/img/userCenter/enIcon/undoneEn/留言被点赞E.png'),
  887. // 登录打卡
  888. point_task_sign: require('@/assets/img/userCenter/enIcon/undoneEn/登录打卡E.png'),
  889. // 留言被收藏
  890. message_is_saved: require('@/assets/img/userCenter/enIcon/undoneEn/留言被收藏E.png'),
  891. // 项目被平台推荐
  892. project_recommended: require('@/assets/img/userCenter/enIcon/undoneEn/项目被平台推荐E.png'),
  893. // 发展合作留言
  894. point_task_development_cooperation_message: require('@/assets/img/userCenter/enIcon/undoneEn/发展合作留言E.png'),
  895. // 项目问询
  896. point_task_project_ask: require('@/assets/img/userCenter/enIcon/undoneEn/项目问询E.png'),
  897. // 项目留言
  898. point_task_project_message: require('@/assets/img/userCenter/enIcon/undoneEn/项目留言E.png'),
  899. },
  900. // 日常完成任务
  901. dayDoneTasks: {
  902. // 发布无效留言
  903. releasing_invalid_messages: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
  904. // 上传无效资料
  905. uploading_invalid_data: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
  906. // 阅读咨询
  907. point_read_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
  908. // 分享咨询
  909. point_task_share_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成分享.png'),
  910. // 上传资源成果
  911. point_task_upload_resources_result: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  912. // 分享项目
  913. point_task_share_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成分享.png'),
  914. // 上传项目资源
  915. point_task_upload_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  916. // 上传咨询信息
  917. point_task_upload_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  918. // 上传期刊信息
  919. point_task_upload_journal: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  920. // 收藏项目、国别、企业
  921. point_task_collect: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成关注.png'),
  922. // 关注项目、国别、企业
  923. point_task_attention: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成关注.png'),
  924. // 查看资源项目
  925. point_task_view_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成查看项目资源.png'),
  926. // 平台问题反馈
  927. platform_problem_feedback: require('@/assets/img/userCenter/grow/done/问题反馈_已完成.png'),
  928. // 参与合作交流活动报名成功
  929. activity_registration_successful: require('@/assets/img/userCenter/grow/done/活动报名成功_已完成.png'),
  930. // 上传调研资源并审核通过
  931. point_task_upload_research_resources: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  932. // 提交留言一次
  933. aubmit_a_message_once: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
  934. // 参与会议活动报名成功
  935. meeting_registration_successful: require('@/assets/img/userCenter/grow/done/会议报名成功_已完成.png'),
  936. // 留言被点赞
  937. the_message_was_liked: require('@/assets/img/userCenter/grow/done/留言被点赞_已完成.png'),
  938. // 登录打卡
  939. point_task_sign: require('@/assets/img/userCenter/grow/done/登录打卡_已完成.png'),
  940. // 留言被收藏
  941. message_is_saved: require('@/assets/img/userCenter/grow/done/留言被收藏_已完成.png'),
  942. // 项目被平台推荐
  943. project_recommended: require('@/assets/img/userCenter/grow/done/项目被平台推荐_已完成.png'),
  944. // 发展合作留言
  945. point_task_development_cooperation_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成发展合作留言.png'),
  946. // 项目问询
  947. point_task_project_ask: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成项目问询.png'),
  948. // 项目留言
  949. point_task_project_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成项目留言.png'),
  950. },
  951. // 日常完成任务英文
  952. dayDoneTasksEn: {
  953. // 发布无效留言
  954. // releasing_invalid_messages: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
  955. // 上传无效资料
  956. // uploading_invalid_data: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
  957. // 阅读咨询
  958. point_read_information: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
  959. // 分享咨询
  960. point_task_share_information: require('@/assets/img/userCenter/enIcon/doneEn/分享资讯完成E.png'),
  961. // 上传资源成果
  962. point_task_upload_resources_result: require('@/assets/img/userCenter/enIcon/doneEn/上传研究成果并审核通过完成E.png'),
  963. // 分享项目
  964. point_task_share_project: require('@/assets/img/userCenter/enIcon/doneEn/分享项目完成E.png'),
  965. // 上传项目资源
  966. point_task_upload_resources_project: require('@/assets/img/userCenter/enIcon/doneEn/上传项目资源并审核通过完成E.png'),
  967. // 上传咨询信息
  968. point_task_upload_information: require('@/assets/img/userCenter/enIcon/doneEn/上传资讯信息并审核通过完成E.png'),
  969. // 上传期刊信息
  970. point_task_upload_journal: require('@/assets/img/userCenter/enIcon/doneEn/上传期刊信息并审核通过完成E.png'),
  971. // 收藏项目、国别、企业
  972. point_task_collect: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
  973. // 关注项目、国别、企业
  974. point_task_attention: require('@/assets/img/userCenter/enIcon/doneEn/关注项目国别企业完成E.png'),
  975. // 查看资源项目
  976. point_task_view_resources_project: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
  977. // 平台问题反馈
  978. platform_problem_feedback: require('@/assets/img/userCenter/enIcon/doneEn/平台问题反馈完成E.png'),
  979. // 参与合作交流活动报名成功
  980. activity_registration_successful: require('@/assets/img/userCenter/enIcon/doneEn/参与合作交流活动报名成功完成E.png'),
  981. // 上传调研资源并审核通过
  982. point_task_upload_research_resources: require('@/assets/img/userCenter/enIcon/doneEn/上传调研资源并审核通过完成E.png'),
  983. // 提交留言一次
  984. aubmit_a_message_once: require('@/assets/img/userCenter/enIcon/doneEn/提交留言一次完成E.png'),
  985. // 参与会议活动报名成功
  986. meeting_registration_successful: require('@/assets/img/userCenter/enIcon/doneEn/参与会议活动报名成功完成E.png'),
  987. // 留言被点赞
  988. the_message_was_liked: require('@/assets/img/userCenter/enIcon/doneEn/留言被点赞完成E.png'),
  989. // 登录打卡
  990. point_task_sign: require('@/assets/img/userCenter/enIcon/doneEn/登录打卡完成E.png'),
  991. // 留言被收藏
  992. message_is_saved: require('@/assets/img/userCenter/enIcon/doneEn/留言被收藏完成E.png'),
  993. // 项目被平台推荐
  994. project_recommended: require('@/assets/img/userCenter/enIcon/doneEn/项目被平台推荐完成E.png'),
  995. // 发展合作留言
  996. point_task_development_cooperation_message: require('@/assets/img/userCenter/enIcon/doneEn/发展合作留言完成E.png'),
  997. // 项目问询
  998. point_task_project_ask: require('@/assets/img/userCenter/enIcon/doneEn/项目问询完成E.png'),
  999. // 项目留言
  1000. point_task_project_message: require('@/assets/img/userCenter/enIcon/doneEn/项目留言完成E.png'),
  1001. },
  1002. growDailyTask: [],
  1003. growNewTask: [],
  1004. demo: null,
  1005. growth: '',
  1006. language: '',
  1007. whetherFreez: null,
  1008. }
  1009. },
  1010. watch: {
  1011. '$i18n.locale'() {
  1012. this.userTypeDicts = {
  1013. 2: this.$t('common.UserUsertyp1'),
  1014. 5: this.$t('common.UserUsertyp2'),
  1015. 4: this.$t('common.UserUsertyp3'),
  1016. }
  1017. this.userMobileStatusDicts = {
  1018. 0: this.$t('common.PhoneNumberVerified'),
  1019. 1: this.$t('common.PhoneNumberNotVerified'),
  1020. }
  1021. this.userEmailStatusDicts = {
  1022. 0: this.$t('common.EmailVerified'),
  1023. 1: this.$t('common.EmailNotVerified'),
  1024. }
  1025. this.realStatusDicts = {
  1026. true: this.$t('common.RealNameVerification'),
  1027. false: this.$t('common.RealNameNotVerification'),
  1028. }
  1029. this.init()
  1030. },
  1031. '$i18n.locale': {
  1032. handler: function () {
  1033. if (this.$i18n.locale == 'zh') {
  1034. this.isZh = true
  1035. } else {
  1036. this.isZh = false
  1037. }
  1038. },
  1039. deep: true,
  1040. },
  1041. },
  1042. mounted() {
  1043. this.language = window.localStorage.getItem('locale')
  1044. if (this.language == 'zh') {
  1045. this.isZh = true
  1046. } else {
  1047. this.isZh = false
  1048. }
  1049. this.init()
  1050. },
  1051. methods: {
  1052. init() {
  1053. this.user = JSON.parse(window.localStorage.getItem('user'))
  1054. if (this.user.umsUser.userPic == undefined) {
  1055. this.user.umsUser.userPic = ''
  1056. }
  1057. this.growthForValue1()
  1058. this.growthForValue()
  1059. this.getUserTaskComplete()
  1060. this.getUmsUserPoints()
  1061. this.judgeWeek()
  1062. // this.test()
  1063. },
  1064. // 获取成长值
  1065. growthForValue1() {
  1066. getUserPointPage().then((res) => {
  1067. if (res) {
  1068. this.demo = res.data
  1069. if (JSON.stringify(this.demo) !== '{}') {
  1070. this.growth = res.data.umsUserPoints[0].growthValue
  1071. } else {
  1072. this.growth = 6000
  1073. }
  1074. }
  1075. })
  1076. },
  1077. // 获取积分任务信息
  1078. getUserTaskComplete() {
  1079. this.$store.dispatch('user/SAVE_USER_TASK_COMPLETE').then((res) => {
  1080. Object.assign(
  1081. this.userTaskComplete,
  1082. JSON.parse(window.localStorage.getItem('userTaskComplete'))
  1083. )
  1084. })
  1085. },
  1086. // 获取成长值任务
  1087. growthForValue() {
  1088. growthValueTaskList().then((res) => {
  1089. if (res) {
  1090. this.growTask = res.data
  1091. console.log(this.growTask)
  1092. this.growDailyTask = this.growTask.point_daily_task
  1093. this.growNewTask = this.growTask.piont_newbie_task
  1094. }
  1095. })
  1096. },
  1097. // 获取积分
  1098. getUmsUserPoints() {
  1099. getUserPointPage().then((res) => {
  1100. if (res) {
  1101. this.integral = res.data.umsUserPoints[0].point
  1102. if (res.data.umsUserPoints[0].pointStatus == 'n') {
  1103. this.$message({
  1104. message:
  1105. this.$i18n.locale == 'zh'
  1106. ? '该用户积分已冻结,请联系客服'
  1107. : "The user's points have been frozen, please contact customer service",
  1108. type: 'error',
  1109. })
  1110. this.whetherFreez = true
  1111. } else {
  1112. this.whetherFreez = false
  1113. }
  1114. }
  1115. })
  1116. },
  1117. // 完成积分任务
  1118. toCompleteTheTask(task) {
  1119. this.clickTask = task
  1120. if (task.taskDict == 'point_read_information') {
  1121. // 日常任务
  1122. // 阅读咨询
  1123. this.$router.push({ name: 'realTimeInfo1' })
  1124. // this.addIntegral();
  1125. } else if (task.taskDict == 'point_task_share_information') {
  1126. // 分享咨询
  1127. this.shareDialogVisible = true
  1128. // this.$router.push({ name: "realTimeInfo1" });
  1129. // this.addIntegral();
  1130. } else if (task.taskDict == 'point_task_collect') {
  1131. // 收藏
  1132. this.$router.push({ name: 'myCollection' })
  1133. this.addIntegral()
  1134. } else if (task.taskDict == 'point_task_view_resources_project') {
  1135. // 查看项目资源
  1136. this.$router.push({ name: 'projectPresentation' })
  1137. this.addIntegral()
  1138. } else if (task.taskDict == 'point_task_share_project') {
  1139. // 分享项目
  1140. this.shareDialogVisible = true
  1141. // this.$router.push({ name: "projectPresentation" });
  1142. // this.addIntegral();
  1143. } else if (task.taskDict == 'point_task_upload_resources_project') {
  1144. // 上传项目资源
  1145. this.$router.push({ name: 'addMyProject' })
  1146. } else if (task.taskDict == 'point_task_upload_resources_result') {
  1147. // 上传资源成果
  1148. this.$router.push({ name: 'resourceform' })
  1149. } else if (task.taskDict == 'point_task_upload_information') {
  1150. // 上传咨询信息
  1151. this.$router.push({ name: 'myInfoData' })
  1152. } else if (task.taskDict == 'point_task_bind_phone') {
  1153. // 新手任务
  1154. // 绑定手机号
  1155. this.$router.push({ name: 'securitySettingBindPhone' })
  1156. } else if (task.taskDict == 'point_task_bind_email') {
  1157. // 验证邮箱
  1158. this.$router.push({ name: 'securitySettingChangeMail' })
  1159. } else if (task.taskDict == 'point_task_complete_info') {
  1160. // 完善个人信息
  1161. this.$router.push({ name: 'information' })
  1162. } else if (task.taskDict == 'point_task_upload_head_portrait') {
  1163. // 上传头像
  1164. this.$router.push({ name: 'information' })
  1165. } else if (task.taskDict == 'point_task_verified_name') {
  1166. // 完成实名认证
  1167. this.$router.push({ name: 'authentication' })
  1168. } else if (task.taskDict == 'point_task_attention') {
  1169. // 关注项目、国别、企业等
  1170. this.$router.push({ name: 'projectPresentation' })
  1171. // this.addIntegral();
  1172. } else if (task.taskDict == 'point_task_upload_journal') {
  1173. // 上传期刊信息并审核通过
  1174. this.$router.push({ name: 'myInfoData', params: { index: '6' } })
  1175. } else if (task.taskDict == 'uploading_invalid_data') {
  1176. // 上传无效资料
  1177. // this.addIntegral();
  1178. } else if (
  1179. task.taskDict == 'point_task_development_cooperation_message'
  1180. ) {
  1181. // 发展合作留言
  1182. // this.addIntegral();
  1183. this.$router.push({ name: 'developmentCooperation' })
  1184. } else if (task.taskDict == 'point_task_project_ask') {
  1185. // 项目问询
  1186. this.$router.push({ name: 'projectPresentation' })
  1187. // this.addIntegral()
  1188. } else if (task.taskDict == 'activity_registration_successful') {
  1189. // 参与合作交流活动报名成功
  1190. this.$router.push({
  1191. name: 'cooperationExchange',
  1192. query: { language: this.language },
  1193. })
  1194. // this.addIntegral()
  1195. } else if (task.taskDict == 'meeting_registration_successful') {
  1196. // 参与会议活动报名成功
  1197. this.$router.push({ name: 'conferenceServices' })
  1198. // this.addIntegral()
  1199. } else if (task.taskDict == 'point_task_project_message') {
  1200. // 项目留言
  1201. this.$router.push({ name: 'projectPresentation' })
  1202. // this.addIntegral();
  1203. }
  1204. },
  1205. // 完成成长值任务
  1206. toCompleteGrowthTask(task) {
  1207. this.clickGrowthTask = task
  1208. // 上传头像
  1209. if (task.taskDict == 'point_task_upload_head_portrait') {
  1210. this.$router.push({ name: 'information' })
  1211. } else if (task.taskDict == 'point_task_complete_info') {
  1212. // 完善个人信息
  1213. this.$router.push({ name: 'information' })
  1214. } else if (task.taskDict == 'platform_problem_feedback') {
  1215. // 平台问题反馈
  1216. this.$router.push({ name: 'Feedback' })
  1217. } else if (task.taskDict == 'activity_registration_successful') {
  1218. // 参与合作交流活动报名成功
  1219. this.$router.push({ name: 'cooperationExchange' })
  1220. } else if (task.taskDict == 'point_task_upload_resources_project') {
  1221. // 发布项目
  1222. this.$router.push({ name: 'addMyProject' })
  1223. } else if (task.taskDict == 'point_task_upload_research_resources') {
  1224. // 上传调研资源并审核通过
  1225. this.$router.push({ name: 'resourceform' })
  1226. } else if (task.taskDict == 'aubmit_a_message_once') {
  1227. // 提交留言一次
  1228. // this.addGrowth();
  1229. this.$router.push({ name: 'projectPresentation' })
  1230. } else if (task.taskDict == 'point_task_upload_journal') {
  1231. // 上传期刊信息并审核通过
  1232. this.$router.push({ name: 'myInfoData', params: { index: '6' } })
  1233. } else if (task.taskDict == 'point_task_upload_resources_result') {
  1234. // 上传(研究)资源成果并审核通过
  1235. this.$router.push({ name: 'resourceform' })
  1236. } else if (task.taskDict == 'point_task_share_project') {
  1237. // 分享项目
  1238. this.shareDialogVisible = true
  1239. // this.$router.push({ name: "projectPresentation" });
  1240. // this.addGrowth();
  1241. } else if (task.taskDict == 'meeting_registration_successful') {
  1242. // 参与会议活动报名成功
  1243. this.$router.push({ name: 'conferenceServices' })
  1244. } else if (task.taskDict == 'the_message_was_liked') {
  1245. // 留言被点赞
  1246. this.$router.push({ name: 'developmentCooperation' })
  1247. } else if (task.taskDict == 'point_task_attention') {
  1248. // 关注
  1249. } else if (task.taskDict == 'point_task_sign') {
  1250. // 登录打卡
  1251. } else if (task.taskDict == 'message_is_saved') {
  1252. // 留言被收藏
  1253. this.$router.push({ name: 'developmentCooperation' })
  1254. } else if (task.taskDict == 'point_task_upload_information') {
  1255. // 上传资讯信息并审核通过
  1256. this.$router.push({ name: 'myInfoData' })
  1257. } else if (task.taskDict == 'project_recommended') {
  1258. // 项目被平台推荐
  1259. } else if (task.taskDict == 'point_task_share_information') {
  1260. // 分享咨询
  1261. // this.$router.push({ name: "realTimeInfo1" });
  1262. // this.addGrowth();
  1263. this.shareDialogVisible = true
  1264. }
  1265. },
  1266. // 加积分
  1267. addIntegral() {
  1268. console.log(this.clickTask.taskDict)
  1269. getToken().then((res) => {
  1270. addPointDetailByTaskDict(
  1271. {
  1272. taskDict: this.clickTask.taskDict,
  1273. // userId: this.user.userId,
  1274. point: this.clickTask.taskPoint.day1,
  1275. },
  1276. res.data
  1277. )
  1278. .then((res) => {
  1279. this.getUserTaskComplete()
  1280. })
  1281. .catch((error) => {})
  1282. })
  1283. },
  1284. // 加成长值
  1285. addGrowth() {
  1286. getToken().then((res) => {
  1287. completeGrowthValue(
  1288. {
  1289. taskDict: this.clickGrowthTask.taskDict,
  1290. // userId: this.user.userId,
  1291. },
  1292. res.data
  1293. ).then((res) => {
  1294. this.growthForValue()
  1295. })
  1296. })
  1297. },
  1298. // 签到
  1299. toSignIn() {
  1300. this.isShow = true
  1301. // 用户未签到过
  1302. if (this.userTaskComplete.sign.length === 0) {
  1303. console.log('未签到')
  1304. getToken().then((res) => {
  1305. addSignPointDetail(
  1306. {
  1307. taskDict: 'point_task_sign',
  1308. point:
  1309. this.userTaskComplete.signTask.taskPoint[
  1310. `day${this.userTaskComplete.sign.length + 1}`
  1311. ],
  1312. // userId: this.user.userId,
  1313. },
  1314. res.data
  1315. ).then((res) => {
  1316. if (res.status == '200') {
  1317. this.booleanFlag.checkInsFlag = false
  1318. if (this.$i18n.locale == 'zh') {
  1319. this.$message.success('签到成功')
  1320. } else {
  1321. this.$message.success('Sign in successfully')
  1322. }
  1323. // 手机号不能为空
  1324. this.init()
  1325. }
  1326. })
  1327. // .catch((error) => {
  1328. // this.$message({
  1329. // message: error.msg,
  1330. // type: "error",
  1331. // });
  1332. // });
  1333. })
  1334. } else {
  1335. // 用户已经签到了
  1336. console.log('已经签到')
  1337. let todayDate = moment(new Date()).format('YYYY-MM-DD')
  1338. var length = this.userTaskComplete.sign.length
  1339. var data = parseInt(length - 1)
  1340. let lastSingIn = moment(
  1341. this.userTaskComplete.sign[data].updateDate
  1342. ).format('YYYY-MM-DD')
  1343. console.log(todayDate)
  1344. console.log(lastSingIn)
  1345. if (todayDate != lastSingIn) {
  1346. getToken().then((res) => {
  1347. addSignPointDetail(
  1348. {
  1349. taskDict: 'point_task_sign',
  1350. point:
  1351. this.userTaskComplete.signTask.taskPoint[
  1352. `day${this.userTaskComplete.sign.length + 1}`
  1353. ],
  1354. // userId: this.user.userId,
  1355. },
  1356. res.data
  1357. ).then((res) => {
  1358. console.log(res)
  1359. if (res.status == '200') {
  1360. this.booleanFlag.checkInsFlag = false
  1361. if (this.$i18n.locale == 'zh') {
  1362. this.$message.success('签到成功')
  1363. } else {
  1364. this.$message.success('Sign in successfully')
  1365. } // 手机号不能为空
  1366. this.init()
  1367. }
  1368. })
  1369. // .catch((error) => {
  1370. // this.$message({
  1371. // message: error.msg,
  1372. // type: "error",
  1373. // });
  1374. // });
  1375. })
  1376. } else {
  1377. if (this.$i18n.locale == 'zh') {
  1378. this.$message.success('今天已签到')
  1379. } else {
  1380. this.$message.success('I have signed in today')
  1381. }
  1382. this.booleanFlag.checkInsFlag = false
  1383. }
  1384. }
  1385. },
  1386. shareDialogBeforeClose() {
  1387. this.shareDialogVisible = false
  1388. },
  1389. // 判断是周几
  1390. judgeWeek() {
  1391. var whatDay = new Date().getDay()
  1392. if (whatDay == 1) {
  1393. this.userTaskComplete.sign = []
  1394. }
  1395. console.log(whatDay)
  1396. },
  1397. getMyDate(str) {
  1398. if (str == null) {
  1399. return ''
  1400. }
  1401. var oDate = new Date(str),
  1402. oYear = oDate.getFullYear(),
  1403. oMonth = oDate.getMonth() + 1,
  1404. oDay = oDate.getDate(),
  1405. // oHour = oDate.getHours(),
  1406. // oMin = oDate.getMinutes(),
  1407. // oSen = oDate.getSeconds(),
  1408. oTime = oYear + '-' + this.addZero(oMonth) + '-' + this.addZero(oDay)
  1409. return oTime
  1410. },
  1411. //补零操作
  1412. addZero(num) {
  1413. if (parseInt(num) < 10) {
  1414. num = '0' + num
  1415. }
  1416. return num
  1417. },
  1418. toView(route, params) {
  1419. this.$router.push({ name: route, query: params })
  1420. },
  1421. },
  1422. computed: {
  1423. // 判断有无真名
  1424. realName() {
  1425. if (this.user.umsUser.userNickName) {
  1426. return this.user.umsUser.userNickName
  1427. } else {
  1428. return this.user.username
  1429. }
  1430. },
  1431. // 判断会员等级
  1432. userLevel1() {
  1433. if (this.growth >= 0 && this.growth < 1000) {
  1434. return 2
  1435. } else if (this.growth >= 1000 && this.growth < 3000) {
  1436. return 3
  1437. } else if (this.growth >= 3000 && this.growth < 6000) {
  1438. return 4
  1439. } else if (this.growth >= 6000) {
  1440. return 5
  1441. }
  1442. },
  1443. },
  1444. }
  1445. </script>
  1446. <style scoped lang="less">
  1447. .userCenterMyIntegral {
  1448. width: 100%;
  1449. padding: 0 18px;
  1450. min-height: 700px;
  1451. box-sizing: border-box;
  1452. overflow: hidden;
  1453. .user {
  1454. display: flex;
  1455. height: 190px;
  1456. border-bottom: 1px solid #eeeff3;
  1457. .head {
  1458. width: 140px;
  1459. .headPortrait {
  1460. width: 82px;
  1461. height: 82px;
  1462. border-radius: 50%;
  1463. margin: 27px auto 0;
  1464. }
  1465. .level {
  1466. width: 108px;
  1467. height: 28px;
  1468. border-radius: 14px;
  1469. margin: 8px auto 0;
  1470. }
  1471. }
  1472. .content {
  1473. flex: 1;
  1474. .name {
  1475. width: 100%;
  1476. margin-top: 40px;
  1477. margin-left: 23px;
  1478. font-size: 22px;
  1479. font-weight: 600;
  1480. display: flex;
  1481. align-items: center;
  1482. .tag {
  1483. font-size: 14px;
  1484. line-height: 20px;
  1485. padding: 0 8px;
  1486. border-radius: 4px;
  1487. height: 20px;
  1488. margin-left: 18px;
  1489. font-weight: 400;
  1490. }
  1491. ._568AD5 {
  1492. background-color: #568ad53d;
  1493. color: #568ad5;
  1494. }
  1495. ._70D56F {
  1496. background-color: #70d56f3d;
  1497. color: #70d56f;
  1498. }
  1499. ._F9AF55 {
  1500. background-color: #f9af553d;
  1501. color: #f9af55;
  1502. }
  1503. }
  1504. .integral {
  1505. margin-top: 40px;
  1506. margin-left: 23px;
  1507. font-size: 18px;
  1508. }
  1509. }
  1510. }
  1511. .task {
  1512. .title {
  1513. width: 100%;
  1514. // border-bottom: 1px solid #eeeff3;
  1515. > span {
  1516. display: inline-block;
  1517. font-size: 18px;
  1518. font-weight: 600;
  1519. line-height: 70px;
  1520. vertical-align: middle;
  1521. }
  1522. }
  1523. .content {
  1524. display: flex;
  1525. flex-wrap: wrap;
  1526. justify-content: space-between;
  1527. .card {
  1528. width: 460px;
  1529. height: 100px;
  1530. background-color: #f6f7f9;
  1531. border-radius: 6px;
  1532. margin-top: 17px;
  1533. display: flex;
  1534. }
  1535. }
  1536. }
  1537. /deep/ .el-dialog__wrapper {
  1538. background-color: transparent !important;
  1539. }
  1540. }
  1541. .userCenterMyIntegralDialog {
  1542. .content {
  1543. .item {
  1544. width: 100px;
  1545. height: 92px;
  1546. margin-bottom: 6px;
  1547. .title {
  1548. width: 56px;
  1549. height: 24px;
  1550. background-color: #73d502;
  1551. text-align: center;
  1552. border-radius: 12px;
  1553. margin: 0 auto;
  1554. z-index: 20;
  1555. position: relative;
  1556. span {
  1557. font-size: 14px;
  1558. color: #fff;
  1559. line-height: 24px;
  1560. }
  1561. }
  1562. .integral {
  1563. text-align: center;
  1564. width: 100%;
  1565. height: 78px;
  1566. border-radius: 7px;
  1567. border: 1px solid #73d502;
  1568. margin-top: -12px;
  1569. z-index: 10;
  1570. position: relative;
  1571. background: linear-gradient(to bottom, #f4fffa, #c7f5db);
  1572. color: #73d502;
  1573. i {
  1574. font-size: 22px;
  1575. }
  1576. span {
  1577. font-size: 13px;
  1578. }
  1579. }
  1580. &:last-child {
  1581. width: 210px;
  1582. }
  1583. }
  1584. .notSignIn {
  1585. .title {
  1586. background-color: #fbb086;
  1587. }
  1588. .integral {
  1589. border: 1px solid #fbb086;
  1590. background: linear-gradient(to bottom, #fef8ea, #fef8ea);
  1591. color: #fbb086;
  1592. }
  1593. }
  1594. }
  1595. }
  1596. </style>