123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635 |
- <template>
- <div class="userCenterMyIntegral">
- <div class="user">
- <div class="head">
- <div class="headPortrait">
- <img
- v-if="!booleanFlag.headPortraitDefaultImg"
- :src="'api/file/pub/' + user.umsUser.userPic"
- alt=""
- style="width: 100%; height: 100%"
- @error="booleanFlag.headPortraitDefaultImg = true"
- />
- <img
- v-if="booleanFlag.headPortraitDefaultImg"
- :src="require('@/assets/img/userCenter/user.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <!-- <div class="level">
- <div v-if="isZh">
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/level02.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <div v-else>
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/黄金用户e.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div> -->
- <!-- 白银用户 -->
- <div v-if="userLevel1 == 2" class="level">
- <div v-if="isZh">
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/白银用户.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <div v-else>
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/@1白银用户.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- <!-- 黄金用户 -->
- <div v-if="userLevel1 == 3" class="level">
- <div v-if="isZh">
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/level02.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <div v-else>
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/黄金用户e.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- <!-- 白金用户 -->
- <div v-if="userLevel1 == 4" class="level">
- <div v-if="isZh">
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/白金用户.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <div v-else>
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/白金用户e.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- <!-- 钻石用户 -->
- <div v-if="userLevel1 == 5" class="level">
- <div v-if="isZh">
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/白金用户.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- <div v-else>
- <img
- v-if="!booleanFlag.levelDefaultImg"
- :src="require('@/assets/img/userCenter/白金用户e.png')"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- </div>
- <div class="content">
- <div class="name">
- <span>{{ realName }}</span>
- <span class="tag _568AD5" v-if="user.umsUser.realStatus">{{
- realStatusDicts[user.umsUser.realStatus]
- }}</span>
- <!-- <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus">{{
- userEmailStatusDicts[user.umsUser.userEmailStatus]
- }}</span> -->
- <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus == '0'">
- {{ $i18n.locale == 'zh' ? '邮箱已验证' : 'Email Verified' }}
- </span>
- <span class="tag _70D56F" v-if="user.umsUser.userEmailStatus == '1'">
- {{ $i18n.locale == 'zh' ? '邮箱未验证' : 'Email Not Verified' }}
- </span>
- <!-- <span class="tag _F9AF55" v-if="user.umsUser.userMobileStatus">{{
- userMobileStatusDicts[user.umsUser.userMobileStatus]
- }}</span> -->
- <span
- class="tag _F9AF55"
- v-if="user.umsUser.userMobileStatus == '0'"
- >{{ $i18n.locale == 'zh' ? '手机已验证' : 'Mobile Verified' }}</span
- >
- <span
- class="tag _F9AF55"
- v-if="user.umsUser.userMobileStatus == '1'"
- >{{
- $i18n.locale == 'zh' ? '手机未验证' : 'Mobile Not Verified'
- }}</span
- >
- </div>
- <div class="integral">
- <span
- >{{ $i18n.locale == 'zh' ? '可用积分' : 'Available Integral' }}:
- </span>
- <span style="font-size: 16px; color: #ef790c">{{ integral }}</span>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="margin-left: 60px; vertical-align: super"
- @click="booleanFlag.checkInsFlag = true"
- >
- {{ $i18n.locale == 'zh' ? '签到' : 'Sign In' }}
- </el-button>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="vertical-align: super"
- @click="
- toView('userCenterIntegralExchange', {
- key: '/userCenterIntegralExchange',
- })
- "
- >
- {{ $i18n.locale == 'zh' ? '积分兑换' : 'Integral Exchange' }}
- </el-button>
- </div>
- </div>
- </div>
- <div class="task">
- <div class="title">
- <span
- style="
- width: 7px;
- height: 19px;
- background-color: #265186;
- margin-left: 4px;
- "
- ></span>
- <span style="margin-left: 8px; color: #265186">{{
- $i18n.locale == 'zh' ? '新手任务' : 'New Task'
- }}</span>
- </div>
- <el-tabs v-model="activeName">
- <el-tab-pane
- :label="$i18n.locale === 'zh' ? '积分任务' : 'Integral Task'"
- name="first"
- >
- <div class="content">
- <div
- v-for="item in userTaskComplete.other.piont_newbie_task"
- class="card"
- >
- <div style="width: 126px; display: flex; align-items: center">
- <div style="margin-left: 30px">
- <div v-if="isZh">
- <img
- v-if="item.count == item.number"
- :src="newDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="newUnDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- <div v-else>
- <img
- v-if="item.count == item.number"
- :src="newDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="newUnDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- </div>
- </div>
- <div
- style="
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 16px;
- "
- >
- <div>
- <!-- <span style="font-weight: 600">{{ item.taskName }}</span> -->
- <span style="font-weight: 600">{{
- $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
- }}</span>
- </div>
- <div style="margin-top: 10px; display: flex">
- <div class="integral">
- <img
- style="width: 16px"
- src="../../../assets/img/userCenter/integral.png"
- alt=""
- />
- <span>{{
- $i18n.locale == 'zh' ? '积分' : 'Integral'
- }}</span>
- <span style="color: #e01729; margin-left: 5px"
- >+{{ item.taskPoint.day1 }}</span
- >
- </div>
- <div style="margin: 0 10px" class="grow">
- <span
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- {{ item.count }}/{{ item.number }}</span
- >
- </div>
- </div>
- </div>
- <div
- style="padding-right: 20px; display: flex; align-items: center"
- >
- <el-button
- type="primary"
- style="
- color: #858585;
- background-color: transparent;
- border-color: #858585;
- "
- v-if="item.count == item.number"
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- </el-button>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="color: #66b1ff; background-color: #fff"
- v-else
- @click="toCompleteTheTask(item)"
- >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
- </el-button>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- :label="$i18n.locale === 'zh' ? '成长值任务' : 'Growth Task'"
- name="second"
- >
- <div class="content">
- <div v-for="item in growNewTask" class="card">
- <div style="width: 126px; display: flex; align-items: center">
- <div style="margin-left: 30px">
- <div v-if="isZh">
- <img
- v-if="item.count == item.number"
- :src="newDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="newUnDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- <div v-else>
- <img
- v-if="item.count == item.number"
- :src="newDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="newUnDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- </div>
- </div>
- <div
- style="
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 16px;
- "
- >
- <div>
- <span style="font-weight: 600">{{
- $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
- }}</span>
- </div>
- <div style="margin-top: 10px; display: flex">
- <div style="margin: 0 10px" class="grow">
- <img
- style="width: 16px"
- src="../../../assets/img/userCenter/grow.png"
- alt=""
- />
- <span>{{
- $i18n.locale == 'zh' ? '成长值' : 'GrowthValue'
- }}</span>
- <span style="color: #2dc22b; margin-left: 5px"
- >+{{ item.growth }}</span
- >
- <span style="margin-left: 10px"
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- {{ item.count }}/{{ item.number }}</span
- >
- </div>
- </div>
- </div>
- <div
- style="padding-right: 20px; display: flex; align-items: center"
- >
- <el-button
- type="primary"
- style="
- color: #858585;
- background-color: transparent;
- border-color: #858585;
- "
- v-if="item.count == item.number"
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- </el-button>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="color: #66b1ff; background-color: #fff"
- v-else
- @click="toCompleteGrowthTask(item)"
- >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
- </el-button>
- </div>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div class="task" style="margin-bottom: 20px">
- <div class="title">
- <span
- style="
- width: 7px;
- height: 19px;
- background-color: #265186;
- margin-left: 4px;
- "
- ></span>
- <span style="margin-left: 8px; color: #265186">{{
- $i18n.locale == 'zh' ? '日常任务' : 'Daily Task'
- }}</span>
- </div>
- <el-tabs v-model="activeName1">
- <el-tab-pane
- :label="$i18n.locale === 'zh' ? '积分任务' : 'Integral Task'"
- name="first1"
- >
- <div class="content">
- <div
- v-for="item in userTaskComplete.other.point_daily_task"
- class="card"
- >
- <div style="width: 126px; display: flex; align-items: center">
- <div style="margin-left: 30px">
- <div v-if="isZh">
- <img
- v-if="item.count == item.number"
- :src="dayDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="dayUnDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- <div v-else>
- <img
- v-if="item.count == item.number"
- :src="dayDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="dayUnDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- </div>
- </div>
- <div
- style="
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 16px;
- "
- >
- <div>
- <span style="font-weight: 600">{{
- $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
- }}</span>
- </div>
- <div style="margin-top: 10px">
- <img
- style="width: 18px"
- src="../../../assets/img/userCenter/integral.png"
- alt=""
- />
- <span>{{ $i18n.locale == 'zh' ? '积分' : 'Integral' }}</span>
- <span>{{
- item.taskPoint.day1.indexOf('-') == -1 ? '+' : ''
- }}</span>
- <span style="color: #e01729; margin-left: 5px">{{
- item.taskPoint.day1
- }}</span>
- <span style="margin-left: 30px"
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- {{ item.count }}/{{ item.number }}</span
- >
- </div>
- </div>
- <div
- style="padding-right: 20px; display: flex; align-items: center"
- >
- <el-button
- type="primary"
- style="
- color: #858585;
- background-color: transparent;
- border-color: #858585;
- "
- v-if="item.count == item.number"
- >
- {{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- </el-button>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="color: #66b1ff; background-color: #fff"
- v-else
- @click="toCompleteTheTask(item)"
- >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
- </el-button>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- :label="$i18n.locale === 'zh' ? '成长值任务' : 'Growth Task'"
- name="second1"
- >
- <div class="content">
- <div v-for="item in growDailyTask" class="card">
- <div style="width: 126px; display: flex; align-items: center">
- <div style="margin-left: 30px">
- <div v-if="isZh">
- <img
- v-if="item.count == item.number"
- :src="dayDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="dayUnDoneTasks[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- <div v-else>
- <img
- v-if="item.count == item.number"
- :src="dayDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- <img
- v-else
- :src="dayUnDoneTasksEn[item.taskDict]"
- alt=""
- style="width: 68px"
- />
- </div>
- </div>
- </div>
- <div
- style="
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 16px;
- "
- >
- <div>
- <span style="font-weight: 600">{{
- $i18n.locale == 'zh' ? item.taskName : item.taskNameEn
- }}</span>
- </div>
- <div style="margin-top: 10px">
- <img
- style="width: 18px"
- src="../../../assets/img/userCenter/grow.png"
- alt=""
- />
- <span>{{ $i18n.locale == 'zh' ? '成长值' : 'Growth' }}</span>
- <span>{{ item.growth.indexOf('-') == -1 ? '+' : '' }}</span>
- <span style="color: #e01729; margin-left: 5px">{{
- item.growth
- }}</span>
- <span style="margin-left: 30px"
- >{{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- {{ item.count }}/{{ item.number }}</span
- >
- </div>
- </div>
- <div
- style="padding-right: 20px; display: flex; align-items: center"
- >
- <el-button
- type="primary"
- style="
- color: #858585;
- background-color: transparent;
- border-color: #858585;
- "
- v-if="item.count == item.number"
- >
- {{ $i18n.locale == 'zh' ? '已完成' : 'done' }}
- </el-button>
- <el-button
- :disabled="whetherFreez"
- type="primary"
- style="color: #66b1ff; background-color: #fff"
- v-else
- @click="toCompleteGrowthTask(item)"
- >{{ $i18n.locale == 'zh' ? '去完成' : 'unfinished' }}
- </el-button>
- </div>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- <!-- 签到dialog -->
- <el-dialog
- center
- :modal="false"
- custom-class="userCenterMyIntegralDialog"
- style="margin-top: 180px"
- :visible.sync="booleanFlag.checkInsFlag"
- width="480px"
- >
- <span slot="title">
- <i class="el-icon-present" style="color: #fb630d"></i>
- {{ $i18n.locale == 'zh' ? '签到领积分' : 'Sign in and get points' }}
- </span>
- <div class="content">
- <div
- style="display: flex; flex-wrap: wrap; justify-content: space-between"
- >
- <div
- class="item"
- :class="{ notSignIn: index >= userTaskComplete.sign.length }"
- v-for="(value, name, index) in userTaskComplete.signTask.taskPoint"
- :key="'userCenterMyIntegralDialog' + index"
- >
- <div class="title">
- <span>
- {{
- $i18n.locale == 'zh' ? `第${index + 1}天` : `Day ${index + 1}`
- }}
- </span>
- </div>
- <div class="integral">
- <div style="margin-top: 18px">
- <i class="el-icon-present"></i>
- </div>
- <div>
- <span
- >{{ value
- }}{{ $i18n.locale == 'zh' ? '积分' : 'points' }}</span
- >
- </div>
- </div>
- </div>
- </div>
- <div style="text-align: center">
- <el-button
- :disabled="isShow"
- type="primary"
- round
- style="width: 150px"
- @click="toSignIn"
- >
- {{ $i18n.locale == 'zh' ? '签到' : 'Sign In' }}
- </el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 分享dialog -->
- <el-dialog
- style="margin-top: 180px"
- :title="isZh ? '请登录App分享' : 'Please log in to the app to share'"
- :visible.sync="shareDialogVisible"
- width="15%"
- :before-close="shareDialogBeforeClose"
- >
- <div style="margin-left: 18%">
- <img src="../../../assets/img/userCenter/share.png" alt="" />
- </div>
- <div slot="footer">
- <el-button @click="shareDialogVisible = false"
- >{{ $i18n.locale == 'zh' ? '取 消' : 'Cancel' }}
- </el-button>
- <el-button type="primary" @click="shareDialogVisible = false"
- >{{ $i18n.locale == 'zh' ? '确 定' : 'Determine' }}
- </el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- addSignPointDetail,
- getUserPointPage,
- completeGrowthValue,
- growthValueTaskList,
- addPointDetailByTaskDict,
- } from '@/api/user'
- import { judgeLogin } from '@/api/login'
- import moment from 'moment'
- import { getToken } from '@/api/token'
- export default {
- name: 'userCenterMyIntegral',
- data() {
- return {
- isShow: null,
- shareDialogVisible: false,
- activeName: 'first',
- activeName1: 'first1',
- booleanFlag: {
- headPortraitDefaultImg: false,
- levelDefaultImg: false,
- checkInsFlag: false,
- },
- user: {
- umsUser: {},
- },
- phoneVervificationSuccess: {},
- integral: '',
- // 积分任务
- userTaskComplete: {
- other: {},
- sign: [],
- signTask: {},
- },
- clickTask: {},
- clickGrowthTask: {},
- // 成长值任务
- growTask: [],
- userTypeDicts: {
- 2: this.$t('common.UserUsertyp1'),
- 5: this.$t('common.UserUsertyp2'),
- 4: this.$t('common.UserUsertyp3'),
- },
- userMobileStatusDicts: {
- 0: this.$t('common.PhoneNumberVerified'),
- 1: this.$t('common.PhoneNumberNotVerified'),
- },
- userEmailStatusDicts: {
- 0: this.$t('common.EmailVerified'),
- 1: this.$t('common.EmailNotVerified'),
- },
- realStatusDicts: {
- true: this.$t('common.RealNameVerification'),
- false: this.$t('common.RealNameNotVerification'),
- },
- isZh: true,
- // 新手未完成任务
- newUnDoneTasks: {
- // 完善个人信息
- point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成个人信息完善.png'),
- // 实名认证
- point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成实名认证.png'),
- // 绑定邮箱
- point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成绑定邮箱.png'),
- // 设置昵称
- point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成设置昵称.png'),
- // 头像
- point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成上传头像.png'),
- // 绑定手机号
- point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/undone/未完成绑定手机号.png'),
- },
- // 新手未完成任务英文
- newUnDoneTasksEn: {
- // 完善个人信息
- point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/个人信息完善.png'),
- // 实名认证
- point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/完成实名认证E.png'),
- // 绑定邮箱
- point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/绑定邮箱E.png'),
- // 设置昵称
- point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/设置昵称E.png'),
- // 头像
- point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/上传头像.png'),
- // 绑定手机号
- point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/undoneEn/绑定收集好E.png'),
- },
- // 新手完成任务
- newDoneTasks: {
- // 完善个人信息
- point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成个人信息完善.png'),
- // 实名认证
- point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成实名认证.png'),
- // 绑定邮箱
- point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成绑定邮箱.png'),
- // 设置昵称
- point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成设置昵称.png'),
- // 头像
- point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成上传头像.png'),
- // 绑定手机号
- point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/done/完成绑定手机号.png'),
- },
- // 新手完成任务英文
- newDoneTasksEn: {
- // 完善个人信息
- point_task_complete_info: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/个人信息完善完成E.png'),
- // 实名认证
- point_task_verified_name: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/完成实名认证完成E.png'),
- // 绑定邮箱
- point_task_bind_email: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/绑定邮箱完成E.png'),
- // 设置昵称
- point_task_set_nickname: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/设置昵称完成E.png'),
- // 头像
- point_task_upload_head_portrait: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/上传头像完成E.png'),
- // 绑定手机号
- point_task_bind_phone: require('@/assets/img/userCenter/Pointsaccount/newMask/doneEn/绑定手机号完成E.png'),
- },
- // 日常未完成任务
- dayUnDoneTasks: {
- // 发布无效留言
- releasing_invalid_messages: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
- // 上传无效资料
- uploading_invalid_data: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
- // 阅读咨询
- point_read_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成阅读咨询.png'),
- // 分享咨询
- point_task_share_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成分享.png'),
- // 上传资源成果
- point_task_upload_resources_result: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 分享项目
- point_task_share_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成分享.png'),
- // 上传项目资源
- point_task_upload_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 上传咨询信息
- point_task_upload_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 上传期刊信息
- point_task_upload_journal: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 收藏项目、国别、企业
- point_task_collect: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成关注.png'),
- // 关注项目、国别、企业
- point_task_attention: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成关注.png'),
- // 查看资源项目
- point_task_view_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成查看项目资源.png'),
- // 平台问题反馈
- platform_problem_feedback: require('@/assets/img/userCenter/grow/undone/问题反馈_未完成.png'),
- // 参与合作交流活动报名成功
- activity_registration_successful: require('@/assets/img/userCenter/grow/undone/活动报名成功_未完成.png'),
- // 上传调研资源并审核通过
- point_task_upload_research_resources: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 提交留言一次
- aubmit_a_message_once: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成上传成果.png'),
- // 参与会议活动报名成功
- meeting_registration_successful: require('@/assets/img/userCenter/grow/undone/会议报名成功_未完成.png'),
- // 留言被点赞
- the_message_was_liked: require('@/assets/img/userCenter/grow/undone/留言被点赞_未完成.png'),
- // 登录打卡
- point_task_sign: require('@/assets/img/userCenter/grow/undone/登录打卡_未完成.png'),
- // 留言被收藏
- message_is_saved: require('@/assets/img/userCenter/grow/undone/留言被收藏_未完成.png'),
- // 项目被平台推荐
- project_recommended: require('@/assets/img/userCenter/grow/undone/项目被平台推荐_未完成.png'),
- // 发展合作留言
- point_task_development_cooperation_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成发展合作留言.png'),
- // 项目问询
- point_task_project_ask: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成项目问询.png'),
- // 项目留言
- point_task_project_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/undone/未完成项目留言.png'),
- },
- // 日常未完成任务英文
- dayUnDoneTasksEn: {
- // 发布无效留言
- // releasing_invalid_messages: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
- // 上传无效资料
- // uploading_invalid_data: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
- // 阅读咨询
- point_read_information: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
- // 分享咨询
- point_task_share_information: require('@/assets/img/userCenter/enIcon/undoneEn/分享资讯E.png'),
- // 上传资源成果
- point_task_upload_resources_result: require('@/assets/img/userCenter/enIcon/undoneEn/上传研究成果并审核通过E.png'),
- // 分享项目
- point_task_share_project: require('@/assets/img/userCenter/enIcon/undoneEn/分享项目E.png'),
- // 上传项目资源
- point_task_upload_resources_project: require('@/assets/img/userCenter/enIcon/undoneEn/上传项目资源并审核通过E.png'),
- // 上传咨询信息
- point_task_upload_information: require('@/assets/img/userCenter/enIcon/undoneEn/上传资讯信息并审核通过E.png'),
- // 上传期刊信息
- point_task_upload_journal: require('@/assets/img/userCenter/enIcon/undoneEn/上传期刊信息并审核通过E.png'),
- // 收藏项目、国别、企业
- point_task_collect: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
- // 关注项目、国别、企业
- point_task_attention: require('@/assets/img/userCenter/enIcon/undoneEn/关注项目国别企业E.png'),
- // 查看资源项目
- point_task_view_resources_project: require('@/assets/img/userCenter/enIcon/undoneEn/阅读资讯E.png'),
- // 平台问题反馈
- platform_problem_feedback: require('@/assets/img/userCenter/enIcon/undoneEn/平台问题反馈E.png'),
- // 参与合作交流活动报名成功
- activity_registration_successful: require('@/assets/img/userCenter/enIcon/undoneEn/参与合作交流活动报名成功E.png'),
- // 上传调研资源并审核通过
- point_task_upload_research_resources: require('@/assets/img/userCenter/enIcon/undoneEn/上传调研资源并审核通过E.png'),
- // 提交留言一次
- aubmit_a_message_once: require('@/assets/img/userCenter/enIcon/undoneEn/提交留言一次E.png'),
- // 参与会议活动报名成功
- meeting_registration_successful: require('@/assets/img/userCenter/enIcon/undoneEn/参与会议活动报名成功E.png'),
- // 留言被点赞
- the_message_was_liked: require('@/assets/img/userCenter/enIcon/undoneEn/留言被点赞E.png'),
- // 登录打卡
- point_task_sign: require('@/assets/img/userCenter/enIcon/undoneEn/登录打卡E.png'),
- // 留言被收藏
- message_is_saved: require('@/assets/img/userCenter/enIcon/undoneEn/留言被收藏E.png'),
- // 项目被平台推荐
- project_recommended: require('@/assets/img/userCenter/enIcon/undoneEn/项目被平台推荐E.png'),
- // 发展合作留言
- point_task_development_cooperation_message: require('@/assets/img/userCenter/enIcon/undoneEn/发展合作留言E.png'),
- // 项目问询
- point_task_project_ask: require('@/assets/img/userCenter/enIcon/undoneEn/项目问询E.png'),
- // 项目留言
- point_task_project_message: require('@/assets/img/userCenter/enIcon/undoneEn/项目留言E.png'),
- },
- // 日常完成任务
- dayDoneTasks: {
- // 发布无效留言
- releasing_invalid_messages: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
- // 上传无效资料
- uploading_invalid_data: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
- // 阅读咨询
- point_read_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成阅读咨询.png'),
- // 分享咨询
- point_task_share_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成分享.png'),
- // 上传资源成果
- point_task_upload_resources_result: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 分享项目
- point_task_share_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成分享.png'),
- // 上传项目资源
- point_task_upload_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 上传咨询信息
- point_task_upload_information: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 上传期刊信息
- point_task_upload_journal: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 收藏项目、国别、企业
- point_task_collect: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成关注.png'),
- // 关注项目、国别、企业
- point_task_attention: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成关注.png'),
- // 查看资源项目
- point_task_view_resources_project: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成查看项目资源.png'),
- // 平台问题反馈
- platform_problem_feedback: require('@/assets/img/userCenter/grow/done/问题反馈_已完成.png'),
- // 参与合作交流活动报名成功
- activity_registration_successful: require('@/assets/img/userCenter/grow/done/活动报名成功_已完成.png'),
- // 上传调研资源并审核通过
- point_task_upload_research_resources: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 提交留言一次
- aubmit_a_message_once: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成上传成果.png'),
- // 参与会议活动报名成功
- meeting_registration_successful: require('@/assets/img/userCenter/grow/done/会议报名成功_已完成.png'),
- // 留言被点赞
- the_message_was_liked: require('@/assets/img/userCenter/grow/done/留言被点赞_已完成.png'),
- // 登录打卡
- point_task_sign: require('@/assets/img/userCenter/grow/done/登录打卡_已完成.png'),
- // 留言被收藏
- message_is_saved: require('@/assets/img/userCenter/grow/done/留言被收藏_已完成.png'),
- // 项目被平台推荐
- project_recommended: require('@/assets/img/userCenter/grow/done/项目被平台推荐_已完成.png'),
- // 发展合作留言
- point_task_development_cooperation_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成发展合作留言.png'),
- // 项目问询
- point_task_project_ask: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成项目问询.png'),
- // 项目留言
- point_task_project_message: require('@/assets/img/userCenter/Pointsaccount/dayMask/done/完成项目留言.png'),
- },
- // 日常完成任务英文
- dayDoneTasksEn: {
- // 发布无效留言
- // releasing_invalid_messages: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
- // 上传无效资料
- // uploading_invalid_data: require("@/assets/img/userCenter/enIcon/undoneEn/未完成阅读咨询.png"),
- // 阅读咨询
- point_read_information: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
- // 分享咨询
- point_task_share_information: require('@/assets/img/userCenter/enIcon/doneEn/分享资讯完成E.png'),
- // 上传资源成果
- point_task_upload_resources_result: require('@/assets/img/userCenter/enIcon/doneEn/上传研究成果并审核通过完成E.png'),
- // 分享项目
- point_task_share_project: require('@/assets/img/userCenter/enIcon/doneEn/分享项目完成E.png'),
- // 上传项目资源
- point_task_upload_resources_project: require('@/assets/img/userCenter/enIcon/doneEn/上传项目资源并审核通过完成E.png'),
- // 上传咨询信息
- point_task_upload_information: require('@/assets/img/userCenter/enIcon/doneEn/上传资讯信息并审核通过完成E.png'),
- // 上传期刊信息
- point_task_upload_journal: require('@/assets/img/userCenter/enIcon/doneEn/上传期刊信息并审核通过完成E.png'),
- // 收藏项目、国别、企业
- point_task_collect: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
- // 关注项目、国别、企业
- point_task_attention: require('@/assets/img/userCenter/enIcon/doneEn/关注项目国别企业完成E.png'),
- // 查看资源项目
- point_task_view_resources_project: require('@/assets/img/userCenter/enIcon/doneEn/阅读资讯完成E.png'),
- // 平台问题反馈
- platform_problem_feedback: require('@/assets/img/userCenter/enIcon/doneEn/平台问题反馈完成E.png'),
- // 参与合作交流活动报名成功
- activity_registration_successful: require('@/assets/img/userCenter/enIcon/doneEn/参与合作交流活动报名成功完成E.png'),
- // 上传调研资源并审核通过
- point_task_upload_research_resources: require('@/assets/img/userCenter/enIcon/doneEn/上传调研资源并审核通过完成E.png'),
- // 提交留言一次
- aubmit_a_message_once: require('@/assets/img/userCenter/enIcon/doneEn/提交留言一次完成E.png'),
- // 参与会议活动报名成功
- meeting_registration_successful: require('@/assets/img/userCenter/enIcon/doneEn/参与会议活动报名成功完成E.png'),
- // 留言被点赞
- the_message_was_liked: require('@/assets/img/userCenter/enIcon/doneEn/留言被点赞完成E.png'),
- // 登录打卡
- point_task_sign: require('@/assets/img/userCenter/enIcon/doneEn/登录打卡完成E.png'),
- // 留言被收藏
- message_is_saved: require('@/assets/img/userCenter/enIcon/doneEn/留言被收藏完成E.png'),
- // 项目被平台推荐
- project_recommended: require('@/assets/img/userCenter/enIcon/doneEn/项目被平台推荐完成E.png'),
- // 发展合作留言
- point_task_development_cooperation_message: require('@/assets/img/userCenter/enIcon/doneEn/发展合作留言完成E.png'),
- // 项目问询
- point_task_project_ask: require('@/assets/img/userCenter/enIcon/doneEn/项目问询完成E.png'),
- // 项目留言
- point_task_project_message: require('@/assets/img/userCenter/enIcon/doneEn/项目留言完成E.png'),
- },
- growDailyTask: [],
- growNewTask: [],
- demo: null,
- growth: '',
- language: '',
- whetherFreez: null,
- }
- },
- watch: {
- '$i18n.locale'() {
- this.userTypeDicts = {
- 2: this.$t('common.UserUsertyp1'),
- 5: this.$t('common.UserUsertyp2'),
- 4: this.$t('common.UserUsertyp3'),
- }
- this.userMobileStatusDicts = {
- 0: this.$t('common.PhoneNumberVerified'),
- 1: this.$t('common.PhoneNumberNotVerified'),
- }
- this.userEmailStatusDicts = {
- 0: this.$t('common.EmailVerified'),
- 1: this.$t('common.EmailNotVerified'),
- }
- this.realStatusDicts = {
- true: this.$t('common.RealNameVerification'),
- false: this.$t('common.RealNameNotVerification'),
- }
- this.init()
- },
- '$i18n.locale': {
- handler: function () {
- if (this.$i18n.locale == 'zh') {
- this.isZh = true
- } else {
- this.isZh = false
- }
- },
- deep: true,
- },
- },
- mounted() {
- this.language = window.localStorage.getItem('locale')
- if (this.language == 'zh') {
- this.isZh = true
- } else {
- this.isZh = false
- }
- this.init()
- },
- methods: {
- init() {
- this.user = JSON.parse(window.localStorage.getItem('user'))
- if (this.user.umsUser.userPic == undefined) {
- this.user.umsUser.userPic = ''
- }
- this.growthForValue1()
- this.growthForValue()
- this.getUserTaskComplete()
- this.getUmsUserPoints()
- this.judgeWeek()
- // this.test()
- },
- // 获取成长值
- growthForValue1() {
- getUserPointPage().then((res) => {
- if (res) {
- this.demo = res.data
- if (JSON.stringify(this.demo) !== '{}') {
- this.growth = res.data.umsUserPoints[0].growthValue
- } else {
- this.growth = 6000
- }
- }
- })
- },
- // 获取积分任务信息
- getUserTaskComplete() {
- this.$store.dispatch('user/SAVE_USER_TASK_COMPLETE').then((res) => {
- Object.assign(
- this.userTaskComplete,
- JSON.parse(window.localStorage.getItem('userTaskComplete'))
- )
- })
- },
- // 获取成长值任务
- growthForValue() {
- growthValueTaskList().then((res) => {
- if (res) {
- this.growTask = res.data
- console.log(this.growTask)
- this.growDailyTask = this.growTask.point_daily_task
- this.growNewTask = this.growTask.piont_newbie_task
- }
- })
- },
- // 获取积分
- getUmsUserPoints() {
- getUserPointPage().then((res) => {
- if (res) {
- this.integral = res.data.umsUserPoints[0].point
- if (res.data.umsUserPoints[0].pointStatus == 'n') {
- this.$message({
- message:
- this.$i18n.locale == 'zh'
- ? '该用户积分已冻结,请联系客服'
- : "The user's points have been frozen, please contact customer service",
- type: 'error',
- })
- this.whetherFreez = true
- } else {
- this.whetherFreez = false
- }
- }
- })
- },
- // 完成积分任务
- toCompleteTheTask(task) {
- this.clickTask = task
- if (task.taskDict == 'point_read_information') {
- // 日常任务
- // 阅读咨询
- this.$router.push({ name: 'realTimeInfo1' })
- // this.addIntegral();
- } else if (task.taskDict == 'point_task_share_information') {
- // 分享咨询
- this.shareDialogVisible = true
- // this.$router.push({ name: "realTimeInfo1" });
- // this.addIntegral();
- } else if (task.taskDict == 'point_task_collect') {
- // 收藏
- this.$router.push({ name: 'myCollection' })
- this.addIntegral()
- } else if (task.taskDict == 'point_task_view_resources_project') {
- // 查看项目资源
- this.$router.push({ name: 'projectPresentation' })
- this.addIntegral()
- } else if (task.taskDict == 'point_task_share_project') {
- // 分享项目
- this.shareDialogVisible = true
- // this.$router.push({ name: "projectPresentation" });
- // this.addIntegral();
- } else if (task.taskDict == 'point_task_upload_resources_project') {
- // 上传项目资源
- this.$router.push({ name: 'addMyProject' })
- } else if (task.taskDict == 'point_task_upload_resources_result') {
- // 上传资源成果
- this.$router.push({ name: 'resourceform' })
- } else if (task.taskDict == 'point_task_upload_information') {
- // 上传咨询信息
- this.$router.push({ name: 'myInfoData' })
- } else if (task.taskDict == 'point_task_bind_phone') {
- // 新手任务
- // 绑定手机号
- this.$router.push({ name: 'securitySettingBindPhone' })
- } else if (task.taskDict == 'point_task_bind_email') {
- // 验证邮箱
- this.$router.push({ name: 'securitySettingChangeMail' })
- } else if (task.taskDict == 'point_task_complete_info') {
- // 完善个人信息
- this.$router.push({ name: 'information' })
- } else if (task.taskDict == 'point_task_upload_head_portrait') {
- // 上传头像
- this.$router.push({ name: 'information' })
- } else if (task.taskDict == 'point_task_verified_name') {
- // 完成实名认证
- this.$router.push({ name: 'authentication' })
- } else if (task.taskDict == 'point_task_attention') {
- // 关注项目、国别、企业等
- this.$router.push({ name: 'projectPresentation' })
- // this.addIntegral();
- } else if (task.taskDict == 'point_task_upload_journal') {
- // 上传期刊信息并审核通过
- this.$router.push({ name: 'myInfoData', params: { index: '6' } })
- } else if (task.taskDict == 'uploading_invalid_data') {
- // 上传无效资料
- // this.addIntegral();
- } else if (
- task.taskDict == 'point_task_development_cooperation_message'
- ) {
- // 发展合作留言
- // this.addIntegral();
- this.$router.push({ name: 'developmentCooperation' })
- } else if (task.taskDict == 'point_task_project_ask') {
- // 项目问询
- this.$router.push({ name: 'projectPresentation' })
- // this.addIntegral()
- } else if (task.taskDict == 'activity_registration_successful') {
- // 参与合作交流活动报名成功
- this.$router.push({
- name: 'cooperationExchange',
- query: { language: this.language },
- })
- // this.addIntegral()
- } else if (task.taskDict == 'meeting_registration_successful') {
- // 参与会议活动报名成功
- this.$router.push({ name: 'conferenceServices' })
- // this.addIntegral()
- } else if (task.taskDict == 'point_task_project_message') {
- // 项目留言
- this.$router.push({ name: 'projectPresentation' })
- // this.addIntegral();
- }
- },
- // 完成成长值任务
- toCompleteGrowthTask(task) {
- this.clickGrowthTask = task
- // 上传头像
- if (task.taskDict == 'point_task_upload_head_portrait') {
- this.$router.push({ name: 'information' })
- } else if (task.taskDict == 'point_task_complete_info') {
- // 完善个人信息
- this.$router.push({ name: 'information' })
- } else if (task.taskDict == 'platform_problem_feedback') {
- // 平台问题反馈
- this.$router.push({ name: 'Feedback' })
- } else if (task.taskDict == 'activity_registration_successful') {
- // 参与合作交流活动报名成功
- this.$router.push({ name: 'cooperationExchange' })
- } else if (task.taskDict == 'point_task_upload_resources_project') {
- // 发布项目
- this.$router.push({ name: 'addMyProject' })
- } else if (task.taskDict == 'point_task_upload_research_resources') {
- // 上传调研资源并审核通过
- this.$router.push({ name: 'resourceform' })
- } else if (task.taskDict == 'aubmit_a_message_once') {
- // 提交留言一次
- // this.addGrowth();
- this.$router.push({ name: 'projectPresentation' })
- } else if (task.taskDict == 'point_task_upload_journal') {
- // 上传期刊信息并审核通过
- this.$router.push({ name: 'myInfoData', params: { index: '6' } })
- } else if (task.taskDict == 'point_task_upload_resources_result') {
- // 上传(研究)资源成果并审核通过
- this.$router.push({ name: 'resourceform' })
- } else if (task.taskDict == 'point_task_share_project') {
- // 分享项目
- this.shareDialogVisible = true
- // this.$router.push({ name: "projectPresentation" });
- // this.addGrowth();
- } else if (task.taskDict == 'meeting_registration_successful') {
- // 参与会议活动报名成功
- this.$router.push({ name: 'conferenceServices' })
- } else if (task.taskDict == 'the_message_was_liked') {
- // 留言被点赞
- this.$router.push({ name: 'developmentCooperation' })
- } else if (task.taskDict == 'point_task_attention') {
- // 关注
- } else if (task.taskDict == 'point_task_sign') {
- // 登录打卡
- } else if (task.taskDict == 'message_is_saved') {
- // 留言被收藏
- this.$router.push({ name: 'developmentCooperation' })
- } else if (task.taskDict == 'point_task_upload_information') {
- // 上传资讯信息并审核通过
- this.$router.push({ name: 'myInfoData' })
- } else if (task.taskDict == 'project_recommended') {
- // 项目被平台推荐
- } else if (task.taskDict == 'point_task_share_information') {
- // 分享咨询
- // this.$router.push({ name: "realTimeInfo1" });
- // this.addGrowth();
- this.shareDialogVisible = true
- }
- },
- // 加积分
- addIntegral() {
- console.log(this.clickTask.taskDict)
- getToken().then((res) => {
- addPointDetailByTaskDict(
- {
- taskDict: this.clickTask.taskDict,
- // userId: this.user.userId,
- point: this.clickTask.taskPoint.day1,
- },
- res.data
- )
- .then((res) => {
- this.getUserTaskComplete()
- })
- .catch((error) => {})
- })
- },
- // 加成长值
- addGrowth() {
- getToken().then((res) => {
- completeGrowthValue(
- {
- taskDict: this.clickGrowthTask.taskDict,
- // userId: this.user.userId,
- },
- res.data
- ).then((res) => {
- this.growthForValue()
- })
- })
- },
- // 签到
- toSignIn() {
- this.isShow = true
- // 用户未签到过
- if (this.userTaskComplete.sign.length === 0) {
- console.log('未签到')
- getToken().then((res) => {
- addSignPointDetail(
- {
- taskDict: 'point_task_sign',
- point:
- this.userTaskComplete.signTask.taskPoint[
- `day${this.userTaskComplete.sign.length + 1}`
- ],
- // userId: this.user.userId,
- },
- res.data
- ).then((res) => {
- if (res.status == '200') {
- this.booleanFlag.checkInsFlag = false
- if (this.$i18n.locale == 'zh') {
- this.$message.success('签到成功')
- } else {
- this.$message.success('Sign in successfully')
- }
- // 手机号不能为空
- this.init()
- }
- })
- // .catch((error) => {
- // this.$message({
- // message: error.msg,
- // type: "error",
- // });
- // });
- })
- } else {
- // 用户已经签到了
- console.log('已经签到')
- let todayDate = moment(new Date()).format('YYYY-MM-DD')
- var length = this.userTaskComplete.sign.length
- var data = parseInt(length - 1)
- let lastSingIn = moment(
- this.userTaskComplete.sign[data].updateDate
- ).format('YYYY-MM-DD')
- console.log(todayDate)
- console.log(lastSingIn)
- if (todayDate != lastSingIn) {
- getToken().then((res) => {
- addSignPointDetail(
- {
- taskDict: 'point_task_sign',
- point:
- this.userTaskComplete.signTask.taskPoint[
- `day${this.userTaskComplete.sign.length + 1}`
- ],
- // userId: this.user.userId,
- },
- res.data
- ).then((res) => {
- console.log(res)
- if (res.status == '200') {
- this.booleanFlag.checkInsFlag = false
- if (this.$i18n.locale == 'zh') {
- this.$message.success('签到成功')
- } else {
- this.$message.success('Sign in successfully')
- } // 手机号不能为空
- this.init()
- }
- })
- // .catch((error) => {
- // this.$message({
- // message: error.msg,
- // type: "error",
- // });
- // });
- })
- } else {
- if (this.$i18n.locale == 'zh') {
- this.$message.success('今天已签到')
- } else {
- this.$message.success('I have signed in today')
- }
- this.booleanFlag.checkInsFlag = false
- }
- }
- },
- shareDialogBeforeClose() {
- this.shareDialogVisible = false
- },
- // 判断是周几
- judgeWeek() {
- var whatDay = new Date().getDay()
- if (whatDay == 1) {
- this.userTaskComplete.sign = []
- }
- console.log(whatDay)
- },
- getMyDate(str) {
- if (str == null) {
- return ''
- }
- var oDate = new Date(str),
- oYear = oDate.getFullYear(),
- oMonth = oDate.getMonth() + 1,
- oDay = oDate.getDate(),
- // oHour = oDate.getHours(),
- // oMin = oDate.getMinutes(),
- // oSen = oDate.getSeconds(),
- oTime = oYear + '-' + this.addZero(oMonth) + '-' + this.addZero(oDay)
- return oTime
- },
- //补零操作
- addZero(num) {
- if (parseInt(num) < 10) {
- num = '0' + num
- }
- return num
- },
- toView(route, params) {
- this.$router.push({ name: route, query: params })
- },
- },
- computed: {
- // 判断有无真名
- realName() {
- if (this.user.umsUser.userNickName) {
- return this.user.umsUser.userNickName
- } else {
- return this.user.username
- }
- },
- // 判断会员等级
- userLevel1() {
- if (this.growth >= 0 && this.growth < 1000) {
- return 2
- } else if (this.growth >= 1000 && this.growth < 3000) {
- return 3
- } else if (this.growth >= 3000 && this.growth < 6000) {
- return 4
- } else if (this.growth >= 6000) {
- return 5
- }
- },
- },
- }
- </script>
- <style scoped lang="less">
- .userCenterMyIntegral {
- width: 100%;
- padding: 0 18px;
- min-height: 700px;
- box-sizing: border-box;
- overflow: hidden;
- .user {
- display: flex;
- height: 190px;
- border-bottom: 1px solid #eeeff3;
- .head {
- width: 140px;
- .headPortrait {
- width: 82px;
- height: 82px;
- border-radius: 50%;
- margin: 27px auto 0;
- }
- .level {
- width: 108px;
- height: 28px;
- border-radius: 14px;
- margin: 8px auto 0;
- }
- }
- .content {
- flex: 1;
- .name {
- width: 100%;
- margin-top: 40px;
- margin-left: 23px;
- font-size: 22px;
- font-weight: 600;
- display: flex;
- align-items: center;
- .tag {
- font-size: 14px;
- line-height: 20px;
- padding: 0 8px;
- border-radius: 4px;
- height: 20px;
- margin-left: 18px;
- font-weight: 400;
- }
- ._568AD5 {
- background-color: #568ad53d;
- color: #568ad5;
- }
- ._70D56F {
- background-color: #70d56f3d;
- color: #70d56f;
- }
- ._F9AF55 {
- background-color: #f9af553d;
- color: #f9af55;
- }
- }
- .integral {
- margin-top: 40px;
- margin-left: 23px;
- font-size: 18px;
- }
- }
- }
- .task {
- .title {
- width: 100%;
- // border-bottom: 1px solid #eeeff3;
- > span {
- display: inline-block;
- font-size: 18px;
- font-weight: 600;
- line-height: 70px;
- vertical-align: middle;
- }
- }
- .content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .card {
- width: 460px;
- height: 100px;
- background-color: #f6f7f9;
- border-radius: 6px;
- margin-top: 17px;
- display: flex;
- }
- }
- }
- /deep/ .el-dialog__wrapper {
- background-color: transparent !important;
- }
- }
- .userCenterMyIntegralDialog {
- .content {
- .item {
- width: 100px;
- height: 92px;
- margin-bottom: 6px;
- .title {
- width: 56px;
- height: 24px;
- background-color: #73d502;
- text-align: center;
- border-radius: 12px;
- margin: 0 auto;
- z-index: 20;
- position: relative;
- span {
- font-size: 14px;
- color: #fff;
- line-height: 24px;
- }
- }
- .integral {
- text-align: center;
- width: 100%;
- height: 78px;
- border-radius: 7px;
- border: 1px solid #73d502;
- margin-top: -12px;
- z-index: 10;
- position: relative;
- background: linear-gradient(to bottom, #f4fffa, #c7f5db);
- color: #73d502;
- i {
- font-size: 22px;
- }
- span {
- font-size: 13px;
- }
- }
- &:last-child {
- width: 210px;
- }
- }
- .notSignIn {
- .title {
- background-color: #fbb086;
- }
- .integral {
- border: 1px solid #fbb086;
- background: linear-gradient(to bottom, #fef8ea, #fef8ea);
- color: #fbb086;
- }
- }
- }
- }
- </style>
|