|
|
@@ -25,54 +25,62 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="form-row">
|
|
|
- <view class="form-col">
|
|
|
+ <view class="form-col amount-box">
|
|
|
<!-- 转账金额 -->
|
|
|
<uni-forms-item :label="t('Custom.Transfer.Amount')" name="amount"
|
|
|
- :error-message="amountErrorMessage">
|
|
|
+ :error-message="amountErrorMessage" class="amount-input">
|
|
|
<uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
|
|
|
@blur="validateAmount" />
|
|
|
</uni-forms-item>
|
|
|
+ <view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 20%赠金-年中赠金 -->
|
|
|
<view class="form-row" v-if="tableData4TwoFlag">
|
|
|
- <view class="form-col-full">
|
|
|
- <uni-forms-item class="agree" name="agree5">
|
|
|
- <view class="agree-content">
|
|
|
- <checkbox :checked="form.agree5" @click="form.agree5 = !form.agree5" />
|
|
|
- <view class="agree-text">
|
|
|
- <view class="agree-title">{{
|
|
|
- t('news_add_field1.activitiesNZTwo.itemDeposit1') }}</view>
|
|
|
+ <uni-forms-item class="agree" name="agree5">
|
|
|
+ <checkbox-group :value="form.agree5 ? ['1'] : []" @change="onAgree5Change">
|
|
|
+ <label class="checkbox">
|
|
|
+ <checkbox value="1" :checked="form.agree5" />
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
|
|
|
+ }}</text>
|
|
|
+
|
|
|
+ <view style="margin-top: 10px;line-height: 1.5; font-size: 14px">
|
|
|
+ <text class="crm-cursor" @click.stop="dialogCheckTip = true">{{
|
|
|
+ t('Custom.Withdraw.Des') }}</text>
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
|
|
|
+ }}</text>
|
|
|
+ <text class="clause crm-cursor" style="text-decoration: underline;"
|
|
|
+ @click.stop="dialogClauseNZTwo = true">{{
|
|
|
+ t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
|
|
|
+ <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
|
|
|
+ }}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </uni-forms-item>
|
|
|
- <view class="agree-detail">
|
|
|
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2') }}</text>
|
|
|
- <text class="clause" @click="dialogClauseNZTwo = true">{{
|
|
|
- t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
|
|
|
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4') }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+
|
|
|
+ </label>
|
|
|
+ </checkbox-group>
|
|
|
+ </uni-forms-item>
|
|
|
</view>
|
|
|
|
|
|
<!-- 赠送活动 -->
|
|
|
<view class="form-row" v-if="tableDataNewListFlag">
|
|
|
<view class="form-col-full">
|
|
|
- <uni-forms-item class="agree" name="agree6">
|
|
|
- <view class="agree-content">
|
|
|
- <checkbox :checked="form.agree6" @click="form.agree6 = !form.agree6" />
|
|
|
- <view class="agree-text">
|
|
|
- <view class="agree-title">{{ tableDataNewList.title }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <uni-forms-item name="agree6">
|
|
|
+ <checkbox-group :value="form.agree6 ? ['1'] : []" @change="onAgree6Change">
|
|
|
+ <label class="checkbox">
|
|
|
+ <checkbox value="1" :checked="form.agree6" />
|
|
|
+ <text @click.stop="dialogClauseNewList = true"
|
|
|
+ style="text-decoration: underline;">{{
|
|
|
+ tableDataNewList.title }}</text>
|
|
|
+ <view style="margin-top: 10px; line-height: 1.5; font-size: 14px">
|
|
|
+ <text> {{
|
|
|
+ t('news_add_field1.activitiesNewList.item1') }}{{
|
|
|
+ t('news_add_field1.activitiesNewList.item2') }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </label>
|
|
|
+ </checkbox-group>
|
|
|
</uni-forms-item>
|
|
|
- <view class="agree-detail">
|
|
|
- <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
|
|
|
- <text class="clause" @click="dialogClauseNewList = true">{{
|
|
|
- tableDataNewList.title }}</text>
|
|
|
- <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -235,9 +243,45 @@ const rules = {
|
|
|
}
|
|
|
},
|
|
|
],
|
|
|
+ },
|
|
|
+ agree5: {
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ validateFunction: (rule, value, data, callback) => {
|
|
|
+ if (form.agree5) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ callback(t('vaildate.agree.empty'));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: 'change',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+}
|
|
|
+const onAgree5Change = (e) => {
|
|
|
+ form.agree5 = e.detail.value.length > 0
|
|
|
+}
|
|
|
+const onAgree6Change = (e) => {
|
|
|
+ form.agree6 = e.detail.value.length > 0
|
|
|
+}
|
|
|
+const customAmount = ref(0)
|
|
|
+//获取基础信息
|
|
|
+const getDateList = async () => {
|
|
|
+ let res = await ibApi.IbData({});
|
|
|
+ if (res.code == Code.StatusOK) {
|
|
|
+ if (res.data != null) {
|
|
|
+ customAmount.value = res.data.customAmount
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+const setAllAmount = () => {
|
|
|
+ form.amount = customAmount
|
|
|
+ validateAmount()
|
|
|
+}
|
|
|
function validateAmount() {
|
|
|
const amount = form.amount
|
|
|
if (!amount) {
|
|
|
@@ -309,7 +353,7 @@ const ransferInfo = async function () {
|
|
|
": $" +
|
|
|
(res.data.balance ? res.data.balance : 0);
|
|
|
} else {
|
|
|
- $pigeon.MessageError(res.msg);
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
loading.value = false
|
|
|
}
|
|
|
@@ -336,7 +380,7 @@ const ransferToInfo = async function () {
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
- $pigeon.MessageError(res.msg);
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
//获取代理账户信息
|
|
|
@@ -345,7 +389,7 @@ const getAgentInfo = async function () {
|
|
|
if (res.code == Code.StatusOK) {
|
|
|
agentInfo.value = res.data || [];
|
|
|
} else {
|
|
|
- $pigeon.MessageError(res.msg);
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -438,7 +482,7 @@ async function Activity24nianzhongTwoInfo() {
|
|
|
if (res.code == Code.StatusOK) {
|
|
|
tableData4Two.value = res.data
|
|
|
} else {
|
|
|
- $pigeon?.MessageError(res.msg)
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
// 活动相关方法
|
|
|
@@ -460,7 +504,7 @@ async function get23nianzhongTwoLogin() {
|
|
|
tableData4TwoFlag.value = false
|
|
|
}
|
|
|
} else {
|
|
|
- $pigeon?.MessageError(res.msg)
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -476,7 +520,7 @@ async function getActivityExtensionGiveLogin() {
|
|
|
tableDataNewListFlag.value = false
|
|
|
}
|
|
|
} else {
|
|
|
- $pigeon?.MessageError(res.msg)
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -487,7 +531,7 @@ async function getActivityExtensionGiveLoginJoin() {
|
|
|
if (res.code == Code.StatusOK) {
|
|
|
giveLoginJoin.value = res.data
|
|
|
} else {
|
|
|
- $pigeon?.MessageError(res.msg)
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
giveLoginJoin.value = ''
|
|
|
}
|
|
|
}
|
|
|
@@ -551,7 +595,7 @@ watch(() => form.agree6, (newVal) => {
|
|
|
if (res.code == Code.StatusOK) {
|
|
|
$pigeon?.MessageOK(res.msg || t('Msg.Success'))
|
|
|
} else {
|
|
|
- $pigeon?.MessageError(res.msg)
|
|
|
+ uni.showToast({ title: res.msg, icon: 'none' })
|
|
|
}
|
|
|
} catch (error) {
|
|
|
$pigeon?.MessageError(t('Msg.Fail'))
|
|
|
@@ -584,7 +628,7 @@ onMounted(() => {
|
|
|
if (getInfoStatus5.value) {
|
|
|
InfoStatus5.value = true
|
|
|
}
|
|
|
-
|
|
|
+ getDateList()
|
|
|
ransferInfo();
|
|
|
ransferToInfo();
|
|
|
// Activity24nianzhongTwoInfo()
|
|
|
@@ -680,6 +724,37 @@ onLoad((options) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .amount-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: px2rpx(12);
|
|
|
+
|
|
|
+ .amount-input {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: px2rpx(14);
|
|
|
+ color: var(--color-zinc-600);
|
|
|
+ margin-bottom: px2rpx(20);
|
|
|
+ height: px2rpx(35);
|
|
|
+ background-color: #cf1322;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: px2rpx(4);
|
|
|
+ font-weight: 600;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ border: none;
|
|
|
+ padding: 0 px2rpx(20);
|
|
|
+ cursor: pointer;
|
|
|
+ margin-top: px2rpx(34);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.form-col-full {
|
|
|
width: 100%;
|
|
|
padding: 0 px2rpx(5);
|