|
@@ -39,25 +39,22 @@
|
|
|
<dd class="list-item">
|
|
<dd class="list-item">
|
|
|
<div class="list-item__title">
|
|
<div class="list-item__title">
|
|
|
<app-iconfont class="icon-title" icon="icon-meiriqiandao">每日签到</app-iconfont>
|
|
<app-iconfont class="icon-title" icon="icon-meiriqiandao">每日签到</app-iconfont>
|
|
|
- <app-iconfont class="icon-score" icon="icon-jifenyue">+20</app-iconfont>
|
|
|
|
|
|
|
+ <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(2) }}</app-iconfont>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <div class="list-item__button">
|
|
|
|
|
- <Button type="primary" v-if="userAccount.issigned" round>已完成</Button>
|
|
|
|
|
- </div> -->
|
|
|
|
|
</dd>
|
|
</dd>
|
|
|
<dd class="list-item">
|
|
<dd class="list-item">
|
|
|
<div class="list-item__title">
|
|
<div class="list-item__title">
|
|
|
<app-iconfont class="icon-title" icon="icon-yaoqingxinrenzhuce">邀请新人注册</app-iconfont>
|
|
<app-iconfont class="icon-title" icon="icon-yaoqingxinrenzhuce">邀请新人注册</app-iconfont>
|
|
|
- <app-iconfont class="icon-score" icon="icon-jifenyue">+50</app-iconfont>
|
|
|
|
|
|
|
+ <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(3) }}</app-iconfont>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-item__button">
|
|
<div class="list-item__button">
|
|
|
<Button type="primary" @click="routerTo('mine-generalize')" round>去完成</Button>
|
|
<Button type="primary" @click="routerTo('mine-generalize')" round>去完成</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</dd>
|
|
</dd>
|
|
|
- <dd class="list-item">
|
|
|
|
|
|
|
+ <!-- <dd class="list-item">
|
|
|
<div class="list-item__title">
|
|
<div class="list-item__title">
|
|
|
<app-iconfont class="icon-title" icon="icon-haoyouxiadan">好友下单每次</app-iconfont>
|
|
<app-iconfont class="icon-title" icon="icon-haoyouxiadan">好友下单每次</app-iconfont>
|
|
|
- <app-iconfont class="icon-score" icon="icon-jifenyue">+200</app-iconfont>
|
|
|
|
|
|
|
+ <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(4) }}</app-iconfont>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-item__button">
|
|
<div class="list-item__button">
|
|
|
<Button type="primary" round>去完成</Button>
|
|
<Button type="primary" round>去完成</Button>
|
|
@@ -66,7 +63,7 @@
|
|
|
<dd class="list-item">
|
|
<dd class="list-item">
|
|
|
<div class="list-item__title">
|
|
<div class="list-item__title">
|
|
|
<app-iconfont class="icon-title" icon="icon-caigouxiadan">采购下单每次</app-iconfont>
|
|
<app-iconfont class="icon-title" icon="icon-caigouxiadan">采购下单每次</app-iconfont>
|
|
|
- <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
|
|
|
|
|
|
|
+ <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(5) }}</app-iconfont>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-item__button">
|
|
<div class="list-item__button">
|
|
|
<Button type="primary" round>去完成</Button>
|
|
<Button type="primary" round>去完成</Button>
|
|
@@ -75,12 +72,12 @@
|
|
|
<dd class="list-item">
|
|
<dd class="list-item">
|
|
|
<div class="list-item__title">
|
|
<div class="list-item__title">
|
|
|
<app-iconfont class="icon-title" icon="icon-gongqiuxiadan">供求下单每次</app-iconfont>
|
|
<app-iconfont class="icon-title" icon="icon-gongqiuxiadan">供求下单每次</app-iconfont>
|
|
|
- <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
|
|
|
|
|
|
|
+ <app-iconfont class="icon-score" icon="icon-jifenyue">+{{ getScoreConfig(6) }}</app-iconfont>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-item__button">
|
|
<div class="list-item__button">
|
|
|
<Button type="primary" round>去完成</Button>
|
|
<Button type="primary" round>去完成</Button>
|
|
|
</div>
|
|
</div>
|
|
|
- </dd>
|
|
|
|
|
|
|
+ </dd> -->
|
|
|
</dl>
|
|
</dl>
|
|
|
</div>
|
|
</div>
|
|
|
</app-view>
|
|
</app-view>
|
|
@@ -92,20 +89,28 @@ import { Toast, Button } from 'vant'
|
|
|
import { fullloading } from '@/utils/vant'
|
|
import { fullloading } from '@/utils/vant'
|
|
|
import { useLoginStore } from '@/stores'
|
|
import { useLoginStore } from '@/stores'
|
|
|
import { queryUserAccount } from '@/services/api/account'
|
|
import { queryUserAccount } from '@/services/api/account'
|
|
|
|
|
+import { queryTHJScoreConfig } from '@/services/api/credit'
|
|
|
import { signin } from '@/services/api/common'
|
|
import { signin } from '@/services/api/common'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
import AppIconfont from '@mobile/components/base/iconfont/index.vue'
|
|
import AppIconfont from '@mobile/components/base/iconfont/index.vue'
|
|
|
|
|
|
|
|
const { getUserId } = useLoginStore()
|
|
const { getUserId } = useLoginStore()
|
|
|
const { routerTo } = useNavigation()
|
|
const { routerTo } = useNavigation()
|
|
|
-const userAccount = shallowRef<Partial<Model.UserAccount>>({})
|
|
|
|
|
const headerRef = shallowRef<HTMLDivElement>()
|
|
const headerRef = shallowRef<HTMLDivElement>()
|
|
|
|
|
+const userAccount = shallowRef<Partial<Model.UserAccount>>({})
|
|
|
|
|
+const scoreConfig = shallowRef<Model.THJScoreConfigRsp[]>([])
|
|
|
|
|
|
|
|
const onReady = (el: HTMLDivElement) => {
|
|
const onReady = (el: HTMLDivElement) => {
|
|
|
// 设置背景图位置
|
|
// 设置背景图位置
|
|
|
headerRef.value?.style.setProperty('background-position', `0 -${el.clientHeight}px`)
|
|
headerRef.value?.style.setProperty('background-position', `0 -${el.clientHeight}px`)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 获取积分配置
|
|
|
|
|
+const getScoreConfig = (value: number) => {
|
|
|
|
|
+ const item = scoreConfig.value.find((e) => e.scoreconfigtype === value)
|
|
|
|
|
+ return item?.parma1 ?? 0
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const userSignin = () => {
|
|
const userSignin = () => {
|
|
|
fullloading(() => {
|
|
fullloading(() => {
|
|
|
signin({
|
|
signin({
|
|
@@ -138,6 +143,12 @@ const getUserAccount = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+queryTHJScoreConfig({
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ scoreConfig.value = res.data
|
|
|
|
|
+ },
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
onActivated(() => getUserAccount())
|
|
onActivated(() => getUserAccount())
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|