|
@@ -18,10 +18,12 @@ import { merchantPageHeaderBg, scanIcon, bookIcon } from '@designer-hub/assets/s
|
|
|
import { useUserStore } from '../../store'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { requestToast } from '@designer-hub/app/src/core/utils/common'
|
|
|
+import { useRouter } from '@designer-hub/app/src/core/utils/router'
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'Home',
|
|
|
})
|
|
|
+const router = useRouter()
|
|
|
const userStore = useUserStore()
|
|
|
const { isLogined, userInfo } = storeToRefs(userStore)
|
|
|
// 测试 uni API 自动引入
|
|
@@ -96,6 +98,8 @@ const { data } = useRequest(async () => ({ code: 0, msg: '', data: {} }) as IRes
|
|
|
},
|
|
|
})
|
|
|
const { data: circlesData, run } = useRequest(() => getCircles({}), { initialData: { list: [] } })
|
|
|
+const orderAmount = ref()
|
|
|
+const pointsAmount = computed(() => orderAmount.value * 10)
|
|
|
console.log(data.value)
|
|
|
const toDesigner = () => {
|
|
|
uni.navigateTo({ url: '/pages/designer/index' })
|
|
@@ -246,30 +250,42 @@ onShareAppMessage(() => ({}))
|
|
|
>
|
|
|
<wd-img width="36px" height="36px" :src="bookIcon"></wd-img>
|
|
|
</div>
|
|
|
- <div class="w-full flex items-center mt-[40px]">
|
|
|
+ <div class="w-full flex items-center mt-[40px] gap-5">
|
|
|
<div
|
|
|
- class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed width-[96px]"
|
|
|
+ class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed w-[96px]"
|
|
|
>
|
|
|
输入订单金额
|
|
|
</div>
|
|
|
- <div class="bg-[#f5f7f9] rounded-lg flex items-center flex-1 ml-[16px]">
|
|
|
- <wd-input type="number" no-border placeholder="请输金额" />
|
|
|
+ <div class="flex-1 bg-[#f5f7f9] rounded-lg flex items-center p-3.5">
|
|
|
+ <wd-input
|
|
|
+ custom-class="bg-transparent! flex-1"
|
|
|
+ type="number"
|
|
|
+ no-border
|
|
|
+ placeholder="请输金额"
|
|
|
+ v-model="orderAmount"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="w-full flex items-center mt-[20px]">
|
|
|
+ <div class="w-full flex items-center mt-[20px] gap-5">
|
|
|
<div
|
|
|
- class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed width-[96px]"
|
|
|
+ class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed w-[96px]"
|
|
|
>
|
|
|
需支付积分
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="text-[#ff2d2d] text-base font-normal font-['PingFang_SC'] leading-relaxed ml-[20px]"
|
|
|
- >
|
|
|
- 3400 积分
|
|
|
+ <div class="text-[#ff2d2d] text-base font-normal font-['PingFang_SC'] leading-relaxed">
|
|
|
+ {{ pointsAmount }} 积分
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="w-full mt-[45px]">
|
|
|
- <wd-button block :round="false" @click="toSettlement">
|
|
|
+ <wd-button
|
|
|
+ block
|
|
|
+ :round="false"
|
|
|
+ @click="
|
|
|
+ router.push(
|
|
|
+ `/pages/home/merchant/settlement?orderAmount=${orderAmount}&pointsAmount=${pointsAmount}`,
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
<div
|
|
|
class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
|
|
|
>
|