agent-transfer.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_ib.item9')" />
  4. <uni-loading v-if="loading" />
  5. <view class="container" v-else>
  6. <view class="row">
  7. <view class="col-lg-8 col-sm-12">
  8. <view class="card">
  9. <view class="border-0 card-header">
  10. <uni-forms ref="formRef" :model="form" :rules="rules" label-position="top"
  11. validate-trigger="submit">
  12. <view class="row">
  13. <view class="col-lg-6">
  14. <h5 class="mb-3" v-t="'Custom.Transfer.Title1'"></h5>
  15. <uni-forms-item>
  16. <cwg-combox v-model:value="loginValue" :clearable="false"
  17. :options="withdrawDisplayList"
  18. :placeholder="t('placeholder.choose')" /></uni-forms-item>
  19. </view>
  20. <view class="col-lg-6">
  21. <h5 class="mb-3" v-t="'Custom.Transfer.IntoAccount'"></h5>
  22. <uni-forms-item name="depositLogin">
  23. <cwg-combox v-model:value="form.depositLogin" :clearable="false"
  24. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  25. </uni-forms-item>
  26. </view>
  27. <view class="col-lg-6">
  28. <h5 class="mb-3" v-t="'Custom.Transfer.ConfirmIntoAccount'"></h5>
  29. <uni-forms-item name="depositLogin1">
  30. <cwg-combox v-model:value="form.depositLogin1" :clearable="false"
  31. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  32. </uni-forms-item>
  33. </view>
  34. <view class="col-lg-6">
  35. <h5 class="mb-3" v-t="'Custom.Transfer.Amount'"></h5>
  36. <view class="card-row amount-box">
  37. <uni-forms-item name="amount" :error-message="amountErrorMessage"
  38. class="amount-input">
  39. <uni-easyinput v-model="form.amount"
  40. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  41. </uni-forms-item>
  42. <view class="btn btn-dark waves-effect waves-light" v-t="'State.All'"
  43. @click="setAllAmount"></view>
  44. </view>
  45. </view>
  46. <view class="col-lg-6">
  47. <!-- 20%赠金-年中赠金 -->
  48. <view class="form-row" v-if="tableData4TwoFlag">
  49. <view class="form-col-full">
  50. <uni-forms-item class="agree">
  51. <view class="agree-content">
  52. <checkbox :checked="form.agree5"
  53. @click="form.agree5 = !form.agree5" />
  54. <view class="agree-text">
  55. <view class="agree-title">{{
  56. t('news_add_field1.activitiesNZTwo.itemDeposit1') }}
  57. </view>
  58. </view>
  59. </view>
  60. </uni-forms-item>
  61. <view class="agree-detail">
  62. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2') }}</text>
  63. <text class="clause crm-cursor" style="text-decoration: underline;"
  64. @click="dialogClauseNZTwo = true">{{
  65. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  66. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4') }}</text>
  67. </view>
  68. </view>
  69. </view>
  70. <!-- 赠送活动 -->
  71. <view class="form-row" v-if="tableDataNewListFlag">
  72. <view class="form-col-full">
  73. <uni-forms-item class="agree">
  74. <view class="agree-content">
  75. <checkbox :checked="form.agree6"
  76. @click="form.agree6 = !form.agree6" />
  77. <view class="agree-text">
  78. <view class="agree-title">{{ tableDataNewList.title }}
  79. </view>
  80. </view>
  81. </view>
  82. </uni-forms-item>
  83. <view class="agree-detail">
  84. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  85. <text class="clause" @click="dialogClauseNewList = true">{{
  86. tableDataNewList.title }}</text>
  87. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <button @click="toTransfer" class="btn btn-dark waves-effect waves-light"><i
  93. class="fi fi-rs-check"></i> <text v-t="'Btn.Submit'"></text></button>
  94. </view>
  95. </uni-forms>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="col-lg-4 col-sm-12">
  100. <h4 v-t="'Custom.Transfer.Tips'"></h4>
  101. <view class="fs-6 fw-semibold lh-sm">
  102. <view v-t="'Custom.Transfer.Tips1'"></view>
  103. <view v-t="'Custom.Transfer.Tips5'"></view>
  104. <view v-t="'Custom.Transfer.Tips3'"></view>
  105. <view v-t="'Custom.Transfer.Tips4'"></view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 失败弹窗 -->
  111. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  112. <!-- 成功弹窗 -->
  113. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  114. <!-- 等待弹窗 -->
  115. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  116. <!-- 不参加活动弹出框 -->
  117. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  118. <!-- 功能关闭弹出 -->
  119. <cwg-function-disabled-popup v-model:visible="InfoStatus5" :showFooters="false" @confirm="toHome" />
  120. <!-- 赠金协议20年中 -->
  121. <BonusAgreementPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  122. type="nzTwo" :tableData4Two="tableData4Two" />
  123. <!-- 赠送活动协议 -->
  124. <BonusAgreementPopup v-model:visible="dialogClauseNewList" :title="tableDataNewList.title"
  125. :content="tableDataNewList.content" type="newList" />
  126. <cwg-confirm-popup />
  127. </cwg-page-wrapper>
  128. </template>
  129. <script setup>
  130. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  131. import { useI18n } from 'vue-i18n'
  132. import { onLoad } from '@dcloudio/uni-app'
  133. import { getCurrentInstance } from 'vue'
  134. import { ibApi } from '@/service/ib'
  135. import { activityApi } from '@/service/activity'
  136. import { financialApi } from '@/service/financial'
  137. import Config from '@/config/index'
  138. import useUserStore from '@/stores/use-user-store'
  139. import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
  140. import { useConfirm } from '@/hooks/useConfirm'
  141. const confirm = useConfirm()
  142. const userStore = useUserStore()
  143. const ibInfo = computed(() => {
  144. return userStore?.userInfo?.ibInfo || {}
  145. })
  146. const { Code } = Config
  147. const { t, locale } = useI18n()
  148. // 获取全局实例(用于访问 Session、$pigeon 等)
  149. const { proxy } = getCurrentInstance()
  150. const $pigeon = proxy?.$pigeon
  151. // 响应式数据
  152. const loginValue = ref(null)
  153. const flag = ref(false)
  154. const RES = ref('') // 弹窗响应信息
  155. const giveLoginJoin = ref('')
  156. const loginOptions = ref([])
  157. const toOptions = ref([])
  158. const step2 = ref(false)
  159. const amountLimits = reactive({
  160. minAmount: '',
  161. maxAmount: '',
  162. })
  163. const form = reactive({
  164. currency: 'USD',
  165. depositLogin: null,
  166. depositLogin1: null,
  167. withdrawLogin: null,
  168. amount: '',
  169. agree5: false,
  170. agree6: false,
  171. })
  172. const resetForm = async () => {
  173. await nextTick();
  174. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  175. form.customBankCode = ""
  176. form.depositLogin = null
  177. form.depositLogin1 = null
  178. form.withdrawLogin = null
  179. form.amount = ""
  180. form.agree5 = false
  181. form.agree6 = false
  182. amountErrorMessage.value = ""
  183. submitting.value = false
  184. flag.value = false
  185. }
  186. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  187. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  188. const dialogCheck = ref(false)
  189. const dialogVisible = ref(false)
  190. const dialogCheckWait = ref(false)
  191. const InfoStatus5 = ref(false)
  192. const dialogClauseNZTwo = ref(false)
  193. const tableData4TwoFlag = ref(false)
  194. const tableData4Two = ref({})
  195. const dialogClauseNewList = ref(false)
  196. const tableDataNewListFlag = ref(false)
  197. const tableDataNewList = ref({})
  198. const dialogDontActive = ref(false)
  199. const submitting = ref(false)
  200. // 错误信息
  201. const amountErrorMessage = ref('')
  202. // 表单验证规则
  203. const rules = {
  204. withdrawLogin: {
  205. rules: [
  206. {
  207. required: true,
  208. errorMessage: t('vaildate.select.empty')
  209. },
  210. ],
  211. },
  212. depositLogin: {
  213. rules: [
  214. {
  215. required: true,
  216. errorMessage: t('vaildate.select.empty')
  217. },
  218. ],
  219. },
  220. depositLogin1: {
  221. rules: [
  222. {
  223. required: true,
  224. errorMessage: t('Custom.Transfer.ConfirmIntoAccount1')
  225. },
  226. {
  227. validateFunction: (rule, value, data, callback) => {
  228. if (value !== form.depositLogin) {
  229. callback(t('Custom.Transfer.ConfirmIntoAccount1'))
  230. }
  231. return true
  232. }
  233. },
  234. ],
  235. },
  236. amount: {
  237. rules: [
  238. {
  239. required: true,
  240. errorMessage: t('vaildate.amount.format'),
  241. },
  242. {
  243. validateFunction: (rule, value, data, callback) => {
  244. value = Number(value)
  245. if (!value) {
  246. callback(t('vaildate.amount.format'))
  247. } else if (
  248. amountLimits.minAmount &&
  249. amountLimits.maxAmount &&
  250. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  251. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  252. ) {
  253. callback(t('vaildate.amount.amount') +
  254. amountLimits.minAmount +
  255. '-' +
  256. amountLimits.maxAmount)
  257. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  258. callback(t('vaildate.amount.format'))
  259. } else if (value > balance.value) {
  260. callback(t('Label.LoginBalance') + ':$' + balance.value);
  261. }
  262. return true
  263. }
  264. },
  265. ],
  266. }
  267. }
  268. function validateAmount() {
  269. const amount = Number(form.amount)
  270. if (!amount) {
  271. amountErrorMessage.value = t('vaildate.amount.format')
  272. return false
  273. }
  274. const numValue = parseFloat(amount)
  275. if (isNaN(numValue)) {
  276. amountErrorMessage.value = t('vaildate.amount.format')
  277. return false
  278. }
  279. if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
  280. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  281. return false
  282. }
  283. if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
  284. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  285. return false
  286. }
  287. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  288. amountErrorMessage.value = t('vaildate.amount.format')
  289. return false
  290. }
  291. if (amount > balance.value) {
  292. amountErrorMessage.value = t('Label.LoginBalance') + ':$' + balance.value
  293. return false
  294. }
  295. amountErrorMessage.value = ''
  296. return true
  297. }
  298. const balance = ref(0)
  299. const setAllAmount = () => {
  300. form.amount = balance.value
  301. validateAmount()
  302. }
  303. // 模板引用
  304. const formRef = ref(null)
  305. // 计算属性
  306. const getInfoStatus5 = computed(() => {
  307. if (ibInfo.value?.closeFunctions) {
  308. return ibInfo.value.closeFunctions.indexOf('5') !== -1
  309. }
  310. return false
  311. })
  312. // 单位类型
  313. function groupCurrency(type) {
  314. const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
  315. return map[type] || ': $'
  316. }
  317. function groupCurrency1(type) {
  318. const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
  319. return map[type] || '$'
  320. }
  321. // 账户类型
  322. function groupTypeName(type) {
  323. const typeMap = {
  324. '1': t('AccountType.ClassicAccount'),
  325. '2': t('AccountType.SeniorAccount'),
  326. '5': t('AccountType.SpeedAccount'),
  327. '6': t('AccountType.SpeedAccount'),
  328. '7': t('AccountType.StandardAccount'),
  329. '8': t('AccountType.CentAccount')
  330. }
  331. return typeMap[type] || ''
  332. }
  333. // 转出账户列表
  334. const withdrawDisplayList = computed(() => {
  335. return loginOptions.value.map(item => ({
  336. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  337. value: item.login,
  338. disable: item.closeFunctions?.indexOf('3') != -1 || item.closeFunctions?.indexOf('5') != -1
  339. }))
  340. })
  341. // 转入账户列表
  342. const depositDisplayList = computed(() => {
  343. return toOptions.value.map(item => ({
  344. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  345. value: item.login
  346. }))
  347. })
  348. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  349. function toHome() {
  350. uni.navigateTo({ url: '/pages/ib/index' })
  351. InfoStatus5.value = false
  352. }
  353. function closeDia() {
  354. resetForm()
  355. formRef.value?.resetFields?.()
  356. step2.value = false
  357. loginValue.value = null
  358. dialogCheck.value = false
  359. dialogVisible.value = false
  360. tableData4TwoFlag.value = false
  361. tableDataNewListFlag.value = false
  362. }
  363. // 内转
  364. async function toTransfer() {
  365. if (submitting.value) return
  366. try {
  367. const valid = await formRef.value?.validate()
  368. if (!valid) {
  369. console.log('表单验证失败')
  370. return
  371. }
  372. openDontActive()
  373. } catch (error) {
  374. console.error('验证失败:', error)
  375. }
  376. }
  377. // 打开不参加活动弹窗
  378. function openDontActive() {
  379. tosubmitConfirm()
  380. }
  381. function tosubmitConfirm() {
  382. dialogDontActive.value = false
  383. transferConfig()
  384. }
  385. async function transferConfig() {
  386. if (submitting.value) return
  387. submitting.value = true
  388. try {
  389. if (flag.value) {
  390. return
  391. }
  392. flag.value = true
  393. form.activityTwoPercentGive = form.agree5 ? 1 : 0
  394. form.activityGive = form.agree6 ? 1 : 0
  395. dialogCheckWait.value = true
  396. const res = await ibApi.agentTransferApply({ ...form })
  397. dialogCheckWait.value = false
  398. if (res.code == Code.StatusOK) {
  399. dialogCheck.value = true
  400. dialogVisible.value = true
  401. flag.value = false
  402. } else {
  403. RES.value = res.msg
  404. dialogCheck.value = true
  405. dialogVisible.value = false
  406. flag.value = false
  407. }
  408. } catch (error) {
  409. console.error('转账失败:', error)
  410. RES.value = error.msg
  411. dialogCheck.value = true
  412. dialogVisible.value = false
  413. } finally {
  414. resetForm()
  415. if (dialogCheckWait.value) dialogCheckWait.value = false
  416. }
  417. }
  418. // 取消
  419. function cancle() {
  420. step2.value = false
  421. loginValue.value = null
  422. }
  423. // 获取账户信息
  424. async function getDateList() {
  425. const res = await ibApi.CustomDropdown({ platform: '' })
  426. if (res.code == Code.StatusOK) {
  427. loginOptions.value = res.data
  428. } else {
  429. uni.showToast({ title: res.msg, icon: 'none' })
  430. }
  431. }
  432. const loading = ref(false)
  433. // 获取转入账户信息
  434. async function getToDateList() {
  435. loading.value = true
  436. const res = await ibApi.accountCustomList({})
  437. if (res.code == Code.StatusOK) {
  438. toOptions.value = res.data
  439. } else {
  440. uni.showToast({ title: res.msg, icon: 'none' })
  441. }
  442. loading.value = false
  443. }
  444. // 获取内转数额区间
  445. async function getAmount() {
  446. const res = await financialApi.transferInfo({})
  447. if (res.code == Code.StatusOK) {
  448. Object.assign(amountLimits, res.data)
  449. } else {
  450. uni.showToast({ title: res.msg, icon: 'none' })
  451. }
  452. }
  453. async function Activity24nianzhongTwoInfo() {
  454. const res = await activityApi.Activity23nianzhongTwoInfo({})
  455. if (res.code == Code.StatusOK) {
  456. tableData4Two.value = res.data
  457. } else {
  458. uni.showToast({ title: res.msg, icon: 'none' })
  459. }
  460. }
  461. // 活动相关方法
  462. function togetActivity() {
  463. get23nianzhongTwoLogin()
  464. getActivityExtensionGiveLogin()
  465. getActivityExtensionGiveLoginJoin()
  466. }
  467. async function get23nianzhongTwoLogin() {
  468. const res = await activityApi.Activity23nianzhongTwoLogin({
  469. login: form.depositLogin,
  470. })
  471. if (res.code == Code.StatusOK) {
  472. tableData4Two.value = res.data
  473. if (tableData4Two.value.show == 1) {
  474. tableData4TwoFlag.value = true
  475. } else if (tableData4Two.value.show == 0) {
  476. tableData4TwoFlag.value = false
  477. }
  478. } else {
  479. uni.showToast({ title: res.msg, icon: 'none' })
  480. }
  481. }
  482. async function getActivityExtensionGiveLogin() {
  483. const res = await activityApi.ActivityExtensionGiveLogin({
  484. login: form.depositLogin,
  485. })
  486. if (res.code == Code.StatusOK) {
  487. tableDataNewList.value = res.data
  488. if (tableDataNewList.value.show == 1) {
  489. tableDataNewListFlag.value = true
  490. } else if (tableDataNewList.value.show == 0) {
  491. tableDataNewListFlag.value = false
  492. }
  493. } else {
  494. uni.showToast({ title: res.msg, icon: 'none' })
  495. }
  496. }
  497. async function getActivityExtensionGiveLoginJoin() {
  498. const res = await activityApi.ActivityExtensionGiveLoginJoin({
  499. login: form.depositLogin,
  500. })
  501. if (res.code == Code.StatusOK) {
  502. giveLoginJoin.value = res.data
  503. } else {
  504. uni.showToast({ title: res.msg, icon: 'none' })
  505. giveLoginJoin.value = ''
  506. }
  507. }
  508. const showCentAccountTransferTip = (login) => {
  509. const selectedAccount = loginOptions.value.find(
  510. (item) => item.login == login,
  511. );
  512. if (!selectedAccount) {
  513. return;
  514. }
  515. const isCentAccount =
  516. selectedAccount.type == "8" || selectedAccount.currency === "USC";
  517. if (isCentAccount) {
  518. confirm({
  519. title: t("Msg.SystemPrompt"),
  520. content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
  521. confirmText: t("Btn.Confirm"),
  522. cancelText: t("Btn.Cancel"),
  523. })
  524. }
  525. }
  526. // 监听 loginValue 变化
  527. watch(loginValue, (newVal) => {
  528. if (newVal != null) {
  529. step2.value = true
  530. form.withdrawLogin = Number(newVal)
  531. showCentAccountTransferTip(newVal)
  532. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  533. balance.value = Number(found.balance)
  534. form.depositLogin = null
  535. form.depositLogin1 = null
  536. form.amount = ''
  537. form.agree5 = false
  538. form.agree6 = false
  539. amountErrorMessage.value = ''
  540. }
  541. })
  542. // 监听 loginValue 变化
  543. watch(form.depositLogin, (newVal) => {
  544. if (newVal) {
  545. togetActivity()
  546. }
  547. })
  548. // 监听 agree6 变化
  549. watch(() => form.agree6, (newVal) => {
  550. if (newVal && giveLoginJoin.value?.flag === false) {
  551. let tips = ''
  552. if (giveLoginJoin.value.promptType == 1) {
  553. tips = t('surplusList.item10')
  554. } else {
  555. tips = t('surplusList.item11')
  556. }
  557. return
  558. // 活动相关方法,后续需要在调整
  559. if (giveLoginJoin.value.activityCategory == 1) {
  560. $pigeon?.MessageConfirm(
  561. tips,
  562. t('Msg.SystemPrompt'),
  563. t('surplusList.item12'),
  564. t('Home.msg.item3'),
  565. () => {
  566. $pigeon?.MessageConfirm(
  567. t('surplusList.item13'),
  568. t('Msg.SystemPrompt'),
  569. t('Btn.Confirm'),
  570. t('Btn.Cancel'),
  571. async () => {
  572. try {
  573. const res = await activityApi.ActivityGiveCancel({
  574. login: loginValue.value,
  575. })
  576. if (res.code == Code.StatusOK) {
  577. $pigeon?.MessageOK(res.msg || t('Msg.Success'))
  578. } else {
  579. uni.showToast({ title: res.msg, icon: 'none' })
  580. }
  581. } catch (error) {
  582. $pigeon?.MessageError(t('Msg.Fail'))
  583. }
  584. },
  585. () => {
  586. form.agree6 = false
  587. }
  588. )
  589. },
  590. () => {
  591. form.agree6 = false
  592. }
  593. )
  594. } else {
  595. $pigeon?.MessageConfirm(
  596. tips,
  597. t('Msg.SystemPrompt'),
  598. t('Btn.Confirm'),
  599. t('Btn.Cancel'),
  600. () => { },
  601. () => {
  602. form.agree6 = false
  603. }
  604. )
  605. }
  606. }
  607. })
  608. onMounted(() => {
  609. if (getInfoStatus5.value) {
  610. InfoStatus5.value = true
  611. }
  612. getDateList()
  613. getToDateList()
  614. getAmount()
  615. // Activity24nianzhongTwoInfo()
  616. })
  617. onLoad((options) => {
  618. if (options?.login) {
  619. loginValue.value = Number(options.login)
  620. step2.value = true
  621. form.withdrawLogin = Number(options.login)
  622. }
  623. })
  624. </script>
  625. <style lang="scss" scoped>
  626. @import "@/uni.scss";
  627. .amount-box {
  628. display: flex;
  629. align-items: center;
  630. gap: px2rpx(12);
  631. .amount-input {
  632. flex: 1;
  633. }
  634. .btn {
  635. margin-bottom: px2rpx(20);
  636. }
  637. }
  638. .transfer-page {
  639. width: 100%;
  640. padding-bottom: px2rpx(20);
  641. .main-content {
  642. text-align: left;
  643. .box {
  644. padding-top: px2rpx(5);
  645. color: #303133;
  646. .b-card {
  647. border: 1px solid var(--bs-border-color);
  648. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  649. margin-bottom: px2rpx(10);
  650. border-radius: px2rpx(6);
  651. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  652. &:hover {
  653. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  654. }
  655. .card-top {
  656. padding: px2rpx(15) px2rpx(20);
  657. box-sizing: border-box;
  658. .card-row {
  659. margin-bottom: px2rpx(12);
  660. &:last-child {
  661. margin-bottom: 0;
  662. }
  663. }
  664. .tit {
  665. font-size: px2rpx(16);
  666. font-weight: 600;
  667. margin-bottom: px2rpx(16);
  668. display: flex;
  669. align-items: center;
  670. color: var(--bs-heading-color);
  671. position: relative;
  672. padding-left: 20px;
  673. &:after {
  674. content: '';
  675. position: absolute;
  676. left: 0;
  677. top: 50%;
  678. transform: translateY(-50%);
  679. width: 0;
  680. height: 0;
  681. border-top: 6px solid transparent;
  682. border-bottom: 6px solid transparent;
  683. border-left: 8px solid currentColor;
  684. }
  685. .iconfont {
  686. margin-right: px2rpx(8);
  687. color: var(--color-primary);
  688. font-size: px2rpx(18);
  689. }
  690. }
  691. .title-wrapper {
  692. display: flex;
  693. justify-content: space-between;
  694. align-items: center;
  695. }
  696. }
  697. }
  698. }
  699. .box-step2 {
  700. .form-row {
  701. display: flex;
  702. flex-wrap: wrap;
  703. margin-bottom: px2rpx(12);
  704. gap: px2rpx(12);
  705. &:last-child {
  706. margin-bottom: 0;
  707. }
  708. .form-col {
  709. flex: 1;
  710. min-width: px2rpx(140);
  711. @media screen and (max-width: 991px) {
  712. flex: 0 0 100%;
  713. width: 100%;
  714. }
  715. }
  716. .form-col-full {
  717. width: 100%;
  718. padding: 0 px2rpx(5);
  719. }
  720. }
  721. .tips {
  722. line-height: 1.8;
  723. font-size: px2rpx(12);
  724. color: var(--bs-heading-color);
  725. background-color: rgba(var(--bs-body-bg-rgb), 1) !important;
  726. padding: px2rpx(12);
  727. border-radius: px2rpx(4);
  728. border-left: px2rpx(2) solid #cf1322;
  729. .title {
  730. font-weight: 600;
  731. margin-bottom: px2rpx(6);
  732. color: var(--bs-heading-color);
  733. }
  734. }
  735. }
  736. }
  737. .picker-select {
  738. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  739. border: 1px solid #dcdfe6;
  740. border-radius: px2rpx(4);
  741. padding: px2rpx(12) px2rpx(14);
  742. font-size: px2rpx(14);
  743. color: #606266;
  744. line-height: 1.4;
  745. width: 100%;
  746. box-sizing: border-box;
  747. &:hover {
  748. border-color: #409eff;
  749. }
  750. &.picker-disabled {
  751. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  752. color: #c0c4cc;
  753. cursor: not-allowed;
  754. }
  755. }
  756. .disabled-input {
  757. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  758. border: 1px solid #dcdfe6;
  759. border-radius: px2rpx(4);
  760. padding: px2rpx(12) px2rpx(14);
  761. font-size: px2rpx(14);
  762. color: #606266;
  763. width: 100%;
  764. box-sizing: border-box;
  765. }
  766. .m-input {
  767. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  768. border: 1px solid #dcdfe6;
  769. border-radius: px2rpx(4);
  770. padding: px2rpx(12) px2rpx(14);
  771. font-size: px2rpx(14);
  772. width: 100%;
  773. box-sizing: border-box;
  774. &:focus {
  775. border-color: #409eff;
  776. outline: none;
  777. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  778. }
  779. }
  780. .popup-content {
  781. padding: px2rpx(30) px2rpx(20);
  782. text-align: center;
  783. min-width: px2rpx(250);
  784. max-width: 80%;
  785. margin: 0 auto;
  786. @media screen and (max-width: 991px) {
  787. min-width: 80%;
  788. max-width: 90%;
  789. margin: 0 px2rpx(10);
  790. }
  791. position: relative;
  792. .icon {
  793. .iconfont {
  794. font-size: px2rpx(60);
  795. display: block;
  796. margin: 0 auto;
  797. }
  798. .icon-chenggong {
  799. color: #67c23a;
  800. }
  801. .icon-jingshi {
  802. color: #f56c6c;
  803. }
  804. .icon-dengdai {
  805. color: #e6a23c;
  806. }
  807. }
  808. .des1 {
  809. font-weight: 600;
  810. font-size: px2rpx(16);
  811. margin: px2rpx(20) 0 px2rpx(15);
  812. color: #303133;
  813. line-height: 1.4;
  814. padding: 0 px2rpx(10);
  815. }
  816. .dialog-footer {
  817. display: flex;
  818. justify-content: center;
  819. gap: px2rpx(10);
  820. margin-top: px2rpx(10);
  821. @media (max-width: 750rpx) {
  822. flex-direction: column;
  823. align-items: center;
  824. gap: px2rpx(6);
  825. }
  826. button {
  827. min-width: px2rpx(90);
  828. padding: 0 px2rpx(12);
  829. border-radius: px2rpx(4);
  830. font-size: px2rpx(14);
  831. transition: all 0.3s ease;
  832. cursor: pointer;
  833. &[type="primary"] {
  834. background-color: #409eff;
  835. color: var(--bs-emphasis-color);
  836. border: none;
  837. &:hover {
  838. background-color: #66b1ff;
  839. transform: translateY(px2rpx(-1));
  840. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  841. }
  842. &:active {
  843. background-color: #3a8ee6;
  844. transform: translateY(0);
  845. }
  846. }
  847. &:not([type="primary"]) {
  848. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  849. border: 1px solid #dcdfe6;
  850. color: #606266;
  851. &:hover {
  852. border-color: #409eff;
  853. color: #409eff;
  854. transform: translateY(px2rpx(-1));
  855. }
  856. &:active {
  857. transform: translateY(0);
  858. }
  859. }
  860. }
  861. }
  862. }
  863. .wait-popup {
  864. .des1 {
  865. margin-top: px2rpx(10);
  866. }
  867. .icon {
  868. .iconfont {
  869. animation: spin 1s linear infinite;
  870. }
  871. }
  872. }
  873. }
  874. // 动画
  875. @keyframes popupFadeIn {
  876. from {
  877. opacity: 0;
  878. transform: scale(0.9);
  879. }
  880. to {
  881. opacity: 1;
  882. transform: scale(1);
  883. }
  884. }
  885. @keyframes fadeIn {
  886. from {
  887. opacity: 0;
  888. transform: translateY(px2rpx(10));
  889. }
  890. to {
  891. opacity: 1;
  892. transform: translateY(0);
  893. }
  894. }
  895. @keyframes pulse {
  896. 0% {
  897. transform: scale(1);
  898. }
  899. 50% {
  900. transform: scale(1.05);
  901. }
  902. 100% {
  903. transform: scale(1);
  904. }
  905. }
  906. @keyframes spin {
  907. from {
  908. transform: rotate(0deg);
  909. }
  910. to {
  911. transform: rotate(360deg);
  912. }
  913. }
  914. // 表单错误信息样式
  915. .uni-forms-item__error {
  916. font-size: px2rpx(12);
  917. color: #f56c6c;
  918. margin-top: px2rpx(4);
  919. }
  920. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  921. @media (max-width: 750rpx) {
  922. .transfer-page {
  923. .main-content {
  924. padding: px2rpx(8);
  925. .box {
  926. .b-card {
  927. .card-top {
  928. padding: px2rpx(12) px2rpx(16);
  929. .tit {
  930. font-size: px2rpx(14);
  931. .iconfont {
  932. font-size: px2rpx(16);
  933. }
  934. }
  935. }
  936. }
  937. }
  938. }
  939. .s-btn {
  940. font-size: px2rpx(14);
  941. padding: px2rpx(10) px2rpx(16);
  942. }
  943. .popup-content {
  944. padding: px2rpx(20) px2rpx(16);
  945. .icon {
  946. .iconfont {
  947. font-size: px2rpx(50);
  948. }
  949. }
  950. .des1 {
  951. font-size: px2rpx(14);
  952. margin: px2rpx(15) 0 px2rpx(10);
  953. }
  954. .dialog-footer {
  955. button {
  956. min-width: px2rpx(80);
  957. font-size: px2rpx(13);
  958. }
  959. }
  960. }
  961. }
  962. }
  963. </style>