|
@@ -27,11 +27,12 @@
|
|
|
<Text :text="`${item.timeTypeText === '限时' ? `临时 ${item.days} 天管理员` : '永久'}`" :fontSize="32" :color="item.timeTypeText === '永久' ? 'warning' : 'success'" />
|
|
<Text :text="`${item.timeTypeText === '限时' ? `临时 ${item.days} 天管理员` : '永久'}`" :fontSize="32" :color="item.timeTypeText === '永久' ? 'warning' : 'success'" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FlexRow align="center" gap="gap.md">
|
|
<FlexRow align="center" gap="gap.md">
|
|
|
- <Tag v-if="item.pointsLimit > 0" :text="`${item.pointsLimit}积分/乡源果`" :type="isPointEnough(item.pointsLimit) ? 'success' : 'danger'" />
|
|
|
|
|
|
|
+ <Tag v-if="item.pointsLimit > 0" :text="`最低要求${item.pointsLimit}积分/乡源果`" :type="isPointEnough(item.pointsLimit) ? 'success' : 'danger'" />
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FlexRow align="center" gap="gap.lg">
|
|
<FlexRow align="center" gap="gap.lg">
|
|
|
- <Text :text="`¥${item.price}`" fontConfig="lightGoldTitle" :fontSize="40" />
|
|
|
|
|
|
|
+ <Icon icon="https://xy.wenlvti.net/app_static/images/village/IconFruit.png" :size="40" />
|
|
|
|
|
+ <Text :text="moneyToFruit(item.price)" fontConfig="lightGoldTitle" :fontSize="40" />
|
|
|
<FrameButton primary text="选择" @click="handleChoose(item)" />
|
|
<FrameButton primary text="选择" @click="handleChoose(item)" />
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
</BoxMid>
|
|
</BoxMid>
|
|
@@ -51,7 +52,7 @@
|
|
|
<BoxMid direction="row" justify="space-between" align="center" gap="gap.md">
|
|
<BoxMid direction="row" justify="space-between" align="center" gap="gap.md">
|
|
|
<FlexCol width="74%">
|
|
<FlexCol width="74%">
|
|
|
<Text text="在线支付" fontConfig="lightImportantTitle" :fontSize="42" />
|
|
<Text text="在线支付" fontConfig="lightImportantTitle" :fontSize="42" />
|
|
|
- <Text text="推荐使用微信线支付方式,方便快捷,立即生效" fontConfig="lightGoldTitle" :fontSize="30" />
|
|
|
|
|
|
|
+ <Text text="若乡源果不足,还支持微信线支付方式,立即生效" fontConfig="lightGoldTitle" :fontSize="30" />
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
<FrameButton primary text="选择" @click="handleDirectPay(1)" />
|
|
<FrameButton primary text="选择" @click="handleDirectPay(1)" />
|
|
|
</BoxMid>
|
|
</BoxMid>
|
|
@@ -85,11 +86,15 @@ import UpgradeManagementSuccessDialog from './dialogs/UpgradeManagementSuccess.v
|
|
|
import BuyFruitInfo from './components/BuyFruitInfo.vue';
|
|
import BuyFruitInfo from './components/BuyFruitInfo.vue';
|
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
import FlexRow from '@/components/layout/FlexRow.vue';
|
|
|
import Tag from '@/components/display/Tag.vue';
|
|
import Tag from '@/components/display/Tag.vue';
|
|
|
|
|
+import Icon from '@/components/basic/Icon.vue';
|
|
|
|
|
+import { useFruitConversion } from '../../composeabe/FruitConverit';
|
|
|
|
|
+import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
|
|
|
|
|
const upgradeManagementSuccessDialog = ref<InstanceType<typeof UpgradeManagementSuccessDialog>>();
|
|
const upgradeManagementSuccessDialog = ref<InstanceType<typeof UpgradeManagementSuccessDialog>>();
|
|
|
|
|
|
|
|
const { requireLoginAsync } = useRequireLogin();
|
|
const { requireLoginAsync } = useRequireLogin();
|
|
|
const { volunteerInfo } = useVolunteerInfo();
|
|
const { volunteerInfo } = useVolunteerInfo();
|
|
|
|
|
+const { moneyToFruit } = useFruitConversion();
|
|
|
|
|
|
|
|
function handlePaySuccess() {
|
|
function handlePaySuccess() {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -119,8 +124,7 @@ function handleBack() {
|
|
|
else
|
|
else
|
|
|
back();
|
|
back();
|
|
|
}
|
|
}
|
|
|
-function handleChoose(level: StaffLevelItem) {
|
|
|
|
|
- console.log(level,volunteerInfo.value );
|
|
|
|
|
|
|
+async function handleChoose(level: StaffLevelItem) {
|
|
|
if (level.pointsLimit > 0 && !isPointEnough(level.pointsLimit)) {
|
|
if (level.pointsLimit > 0 && !isPointEnough(level.pointsLimit)) {
|
|
|
showError(
|
|
showError(
|
|
|
'您的积分不足,现有 ' + (volunteerInfo.value?.points || 0) +
|
|
'您的积分不足,现有 ' + (volunteerInfo.value?.points || 0) +
|
|
@@ -128,8 +132,11 @@ function handleChoose(level: StaffLevelItem) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ uni.showLoading({ title: '请稍后...' });
|
|
|
step.value = 'pay';
|
|
step.value = 'pay';
|
|
|
choosedLevel.value = level;
|
|
choosedLevel.value = level;
|
|
|
|
|
+ await waitTimeOut(1000);
|
|
|
|
|
+ uni.hideLoading();
|
|
|
}
|
|
}
|
|
|
async function handleDirectPay(payType: 1 | 3) {
|
|
async function handleDirectPay(payType: 1 | 3) {
|
|
|
if (!requireLoginAsync('登录后为村社升级,做出你的贡献哦'))
|
|
if (!requireLoginAsync('登录后为村社升级,做出你的贡献哦'))
|