|
@@ -24,10 +24,12 @@ import { useRouter } from '../../core/utils/router'
|
|
|
import { NetImages } from '../../core/libs/net-images'
|
|
|
import { qrCodeString2Object, requestToast, toQrCodeString } from '../../core/utils/common'
|
|
|
import { QrCodeBusinessType } from '../../core/libs/enums'
|
|
|
+import { usePermissions } from '@/composables/permissions'
|
|
|
|
|
|
const router = useRouter()
|
|
|
const userStore = useUserStore()
|
|
|
const { isLogined, userInfo } = storeToRefs(userStore)
|
|
|
+const { features } = usePermissions()
|
|
|
const { setUserInfo } = userStore
|
|
|
const { data, run } = useRequest(getMemberUserInfo)
|
|
|
const { data: taskData, run: getTaskData } = useRequest(() => getTasks({}), {
|
|
@@ -47,7 +49,10 @@ const { data: taskStatusData, run: setTaskStatus } = useRequest(
|
|
|
{
|
|
|
btnProps: {
|
|
|
content: '去打卡',
|
|
|
- onClick: () => uni.showToast({ title: '请到店扫码完成', icon: 'none' }),
|
|
|
+ onClick: () =>
|
|
|
+ features.value.checkInAtStoreTask
|
|
|
+ ? uni.showToast({ title: '请到店扫码完成', icon: 'none' })
|
|
|
+ : router.push(`/pages/mine/authentication/index`),
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -152,8 +157,8 @@ const nickNameClickHandle = async () => {
|
|
|
uni.navigateTo({ url: '/pages/login/index' })
|
|
|
}
|
|
|
const handleToAuthentication = () => {
|
|
|
- if (!isLogined.value) return
|
|
|
- uni.navigateTo({ url: '/pages/mine/authentication/index' })
|
|
|
+ if (!isLogined.value) return router.push('/pages/login/index')
|
|
|
+ router.push('/pages/mine/authentication/index')
|
|
|
}
|
|
|
const handleToHomepage = () => {
|
|
|
uni.navigateTo({ url: '/pages/mine/homepage/index' })
|
|
@@ -170,6 +175,7 @@ const handleClickScan = async () => {
|
|
|
// console.log(qrCodeString2Object(toQrCodeString('到店', { a: 1, orderId: 2222 })))
|
|
|
const { type, options } = qrCodeString2Object(result)
|
|
|
if (type === QrCodeBusinessType.InStoreClockIn) {
|
|
|
+ if (!features.value.checkInAtStoreTask) return router.push('/pages/mine/authentication/index')
|
|
|
try {
|
|
|
await storeAndPunchIn({ id: options.id })
|
|
|
router.push(`/pages/mine/scan/result/index?result=${result}`)
|
|
@@ -282,8 +288,9 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
|
|
|
<div class="flex items-center">
|
|
|
<div class="text-white text-base font-normal font-['PingFang_SC'] leading-normal mr-1">
|
|
|
- 0
|
|
|
+ <!-- 0 -->
|
|
|
<!-- {{designerInfo.c}} -->
|
|
|
+ {{ designerInfo?.winCustomerCount || 0 }}
|
|
|
</div>
|
|
|
<div
|
|
|
class="text-center text-[#e9e7e4] text-xs font-normal font-['PingFang_SC'] leading-normal"
|
|
@@ -325,11 +332,16 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
@click="handleToAuthentication()"
|
|
|
>
|
|
|
<div
|
|
|
- class="text-[#9e5934] text-[13px] font-normal font-['PingFang_SC'] leading-relaxed"
|
|
|
+ class="text-[#9e5934] text-[13px] font-normal font-['PingFang_SC'] leading-relaxed flex items-center gap-1"
|
|
|
>
|
|
|
<!-- 去认证 -->
|
|
|
<!-- {{ !isCertified ? '去认证' : certificationStatusText }} -->
|
|
|
{{ certificationBtnText }}
|
|
|
+ <div
|
|
|
+ class="w-3.5 h-3.5 bg-gradient-to-tl from-[#773b19] to-[#9e5a34] rounded-full flex items-center justify-center"
|
|
|
+ >
|
|
|
+ <wd-icon name="play" size="12" color="#ffead2"></wd-icon>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|