transfer.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item5')" />
  4. <view id="custom_Transfer" class="transfer-page">
  5. <view class="main-content">
  6. <!-- 步骤1:选择转出账户 -->
  7. <view class="box box-step1">
  8. <view class="b-card">
  9. <view class="card-top">
  10. <view class="card-row">
  11. <view class="tit">
  12. <text class="iconfont icon-caret-right"></text>
  13. <span>{{ t('Custom.Transfer.Title1') }}</span>
  14. </view>
  15. </view>
  16. <view class="card-row">
  17. <cwg-combox v-model:value="loginValue" :clearable="false" :options="withdrawDisplayList"
  18. :placeholder="t('placeholder.choose')" />
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 步骤2:转账表单 -->
  24. <view class="box box-step2" v-if="step2">
  25. <view class="b-card">
  26. <view class="card-top">
  27. <view class="card-row card-tit">
  28. <view class="title-wrapper">
  29. <view class="tit">
  30. <text class="iconfont icon-caret-right"></text>
  31. <span>{{ t('Custom.Transfer.Title2') }}</span>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="card-row">
  36. <cwg-combox v-model:value="transferType" :clearable="false"
  37. :options="transferTypeOptions" :placeholder="t('placeholder.choose')" />
  38. </view>
  39. <uni-forms ref="formRef" :model="form" :rules="rules" label-position="top"
  40. validate-trigger="submit">
  41. <view class="card-row card-tit">
  42. <view class="title-wrapper">
  43. <view class="tit">
  44. <text class="iconfont icon-caret-right"></text>
  45. <span>{{ t('Custom.Transfer.IntoAccount') }}</span>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="card-row">
  50. <uni-forms-item name="depositLogin">
  51. <cwg-combox v-model:value="form.depositLogin" :clearable="false"
  52. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  53. </uni-forms-item>
  54. </view>
  55. <view class="card-row card-tit">
  56. <view class="title-wrapper">
  57. <view class="tit">
  58. <text class="iconfont icon-caret-right"></text>
  59. <span>{{ t('Custom.Transfer.Amount') }}</span>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="card-row">
  64. <uni-forms-item name="amount" :error-message="amountErrorMessage">
  65. <uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
  66. @blur="validateAmount" />
  67. </uni-forms-item>
  68. </view>
  69. <view class="form-row">
  70. <view class="form-col-full">
  71. <uni-forms-item>
  72. <view class="tips">
  73. <view class="title">{{ t('Custom.Transfer.Tips') }}</view>
  74. <view>{{ t('Custom.Transfer.Tips1') }}</view>
  75. <view>{{ t('Custom.Transfer.Tips2') }}</view>
  76. <view>{{ t('Custom.Transfer.Tips3') }}</view>
  77. <view>{{ t('Custom.Transfer.Tips4') }}</view>
  78. </view>
  79. </uni-forms-item>
  80. </view>
  81. </view>
  82. <view class="form-row">
  83. <button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
  84. ?
  85. 'Enviar solicitud' : t('Btn.Submit') }}</button>
  86. </view>
  87. </uni-forms>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 失败弹窗 -->
  93. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  94. <!-- 成功弹窗 -->
  95. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  96. <!-- 等待弹窗 -->
  97. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  98. </view>
  99. </cwg-page-wrapper>
  100. </template>
  101. <script setup>
  102. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  103. import { useI18n } from 'vue-i18n'
  104. import { onLoad, onReady } from '@dcloudio/uni-app'
  105. import { getCurrentInstance } from 'vue'
  106. import { isAfterJuly28 } from '@/utils/dateUtils'
  107. import { customApi } from '@/service/custom'
  108. import { financialApi } from '@/service/financial'
  109. import { ibApi } from '@/service/ib'
  110. // import ServiceA from "@/service/activity"; // 原注释保留
  111. import useUserStore from '@/stores/use-user-store'
  112. const userStore = useUserStore()
  113. const customInfo = computed(() => {
  114. return userStore?.userInfo?.customInfo || {}
  115. })
  116. import Config from '@/config/index'
  117. const { Code } = Config
  118. const { t } = useI18n()
  119. // 获取全局实例(用于访问 Session、$pigeon 等)
  120. const { proxy } = getCurrentInstance()
  121. const Session = proxy?.Session
  122. const $pigeon = proxy?.$pigeon
  123. // 响应式数据
  124. const loginValue = ref(null)
  125. const flag = ref(false)
  126. const RES = ref('') // 弹窗响应信息
  127. const loginOptions = ref([])
  128. const toOptions = ref([])
  129. // 跨系统内转下拉数据
  130. const accountList = ref([])
  131. const systemTransferType = ref(0)
  132. const step2 = ref(false)
  133. const transferType = ref('internal')
  134. const amountLimits = reactive({
  135. minAmount: '',
  136. maxAmount: '',
  137. })
  138. const form = reactive({
  139. currency: 'USD',
  140. depositLogin: null,
  141. withdrawLogin: null,
  142. amount: ''
  143. })
  144. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  145. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  146. const dialogCheck = ref(false)
  147. const dialogVisible = ref(false)
  148. const dialogCheckWait = ref(false)
  149. const pageQuery = ref({})
  150. const rules = {
  151. withdrawLogin: {
  152. rules: [
  153. {
  154. required: true,
  155. errorMessage: t('vaildate.select.empty')
  156. },
  157. ],
  158. },
  159. depositLogin: {
  160. rules: [
  161. {
  162. required: true,
  163. errorMessage: t('vaildate.select.empty')
  164. },
  165. ],
  166. },
  167. amount: {
  168. rules: [
  169. {
  170. required: true,
  171. errorMessage: t('vaildate.amount.format'),
  172. },
  173. {
  174. validateFunction: (rule, value, data, callback) => {
  175. console.log(rule, value, data, callback, 2121212);
  176. if (!value) {
  177. callback(t('vaildate.amount.format'))
  178. } else if (
  179. amountLimits.minAmount &&
  180. amountLimits.maxAmount &&
  181. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  182. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  183. ) {
  184. callback(t('vaildate.amount.amount') +
  185. amountLimits.minAmount +
  186. '-' +
  187. amountLimits.maxAmount)
  188. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  189. callback(t('vaildate.amount.format'))
  190. }
  191. return true
  192. }
  193. },
  194. ],
  195. }
  196. }
  197. function validateAmount() {
  198. const amount = form.amount
  199. if (!amount) {
  200. amountErrorMessage.value = t('vaildate.amount.format')
  201. return false
  202. }
  203. const numValue = parseFloat(amount)
  204. if (isNaN(numValue)) {
  205. amountErrorMessage.value = t('vaildate.amount.format')
  206. return false
  207. }
  208. if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
  209. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  210. return false
  211. }
  212. if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
  213. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  214. return false
  215. }
  216. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  217. amountErrorMessage.value = t('vaildate.amount.format')
  218. return false
  219. }
  220. amountErrorMessage.value = ''
  221. return true
  222. }
  223. // 模板引用(对应原 this.$refs.form)
  224. const formRef = ref(null)
  225. // 计算属性
  226. const getInfoAgentTransfer = computed(() => {
  227. return customInfo.value?.agentTransfer
  228. })
  229. // 单位类型
  230. function groupCurrency(type) {
  231. const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
  232. return map[type] || ': $'
  233. }
  234. // 单位类型
  235. function groupCurrency1(type) {
  236. const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
  237. return map[type] || '$'
  238. }
  239. // 账户类型
  240. function groupTypeName(type) {
  241. const typeMap = {
  242. '1': t('AccountType.ClassicAccount'),
  243. '2': t('AccountType.SeniorAccount'),
  244. '3': isAfterJuly28() ? '--' : t('AccountType.AgencyAccount'),
  245. '5': t('AccountType.SpeedAccount'),
  246. '6': t('AccountType.SpeedAccount'),
  247. '7': t('AccountType.StandardAccount'),
  248. '8': t('AccountType.CentAccount')
  249. }
  250. return typeMap[type] || ''
  251. }
  252. const closeDia = () => {
  253. formRef.value?.clearValidate()
  254. step2.value = false
  255. loginValue.value = null
  256. form.depositLogin = null
  257. form.withdrawLogin = null
  258. form.amount = ''
  259. transferType.value = 'internal'
  260. dialogCheck.value = false
  261. dialogVisible.value = false
  262. }
  263. const submitting = ref(false);
  264. const toTransfer = async () => {
  265. // 防止重复提交
  266. if (submitting.value) return;
  267. submitting.value = true;
  268. try {
  269. // 表单验证(验证失败会抛出异常)
  270. await formRef.value?.validate()
  271. // 检查活动参与情况(仅内部转账检查转出账户)[保留注释]
  272. if (transferType.value === 'internal') {
  273. // 活动检查代码已注释,保留原样
  274. }
  275. dialogCheckWait.value = true;
  276. let res;
  277. if (transferType.value === 'internal') {
  278. res = await financialApi.TransferApply({ ...form });
  279. } else if (transferType.value === 'agent') {
  280. res = await ibApi.agentTransCtaferApply({ ...form });
  281. } else if (transferType.value === 'system') {
  282. const selectedAccount = accountList.value.find(item => item.login === form.depositLogin);
  283. res = await financialApi.transferSystemApply({
  284. currency: form.currency,
  285. depositLogin: form.depositLogin,
  286. withdrawLogin: form.withdrawLogin,
  287. amount: form.amount,
  288. depositPlatform: selectedAccount?.platform || 'MT4',
  289. depositCurrency: selectedAccount?.currency || form.currency,
  290. depositType: selectedAccount?.type || 2,
  291. });
  292. }
  293. dialogCheckWait.value = false;
  294. if (res.code == Code.StatusOK) {
  295. dialogCheck.value = true;
  296. dialogVisible.value = true;
  297. } else {
  298. RES.value = res.msg;
  299. dialogCheck.value = true;
  300. dialogVisible.value = false;
  301. }
  302. } catch (error) {
  303. console.log(error, 12121);
  304. if (error instanceof Array) {
  305. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  306. return
  307. } else {
  308. console.log(232312);
  309. RES.value = error.msg;
  310. dialogCheck.value = true;
  311. dialogVisible.value = false;
  312. resetForm()
  313. }
  314. } finally {
  315. submitting.value = false;
  316. flag.value = false;
  317. if (dialogCheckWait.value) dialogCheckWait.value = false;
  318. }
  319. };
  320. const cancle = () => {
  321. step2.value = false
  322. loginValue.value = null
  323. transferType.value = 'internal'
  324. }
  325. // 转出账户列表
  326. const withdrawDisplayList = computed(() => {
  327. return loginOptions.value.map(item => ({
  328. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  329. value: item.login,
  330. disable: isWithdrawDisabled(item)
  331. }))
  332. })
  333. const transferTypeOptions = computed(() => [
  334. { value: 'internal', text: t('Home.page_customer.item5') },
  335. ...(getInfoAgentTransfer.value ? [{ value: 'agent', text: t('Home.page_ib.item9') }] : []),
  336. // ...(systemTransferType.value === 1 ? [{ value: 'system', text: t('Home.page_ib.item9') }] : []),
  337. ]);
  338. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  339. // 转入账户列表
  340. const depositDisplayList = computed(() => {
  341. return toOptions.value.map(item => ({
  342. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  343. value: item.login,
  344. disable: isDepositDisabled(item)
  345. }))
  346. })
  347. // 转出账户是否禁用
  348. const isWithdrawDisabled = (item) => {
  349. const closeFunc = item.closeFunctions || []
  350. const transType = transferType.value // transferType 是 ref
  351. return (
  352. closeFunc.indexOf('5') !== -1 || // 包含'5'时禁用
  353. closeFunc.indexOf('6') !== -1 || // 包含'6'时禁用
  354. (transType === 'agent' && closeFunc.indexOf('3') !== -1) ||
  355. (transType === 'internal' && closeFunc.indexOf('7') !== -1) ||
  356. (transType === 'system' && closeFunc.indexOf('7') !== -1)
  357. )
  358. }
  359. // 转入账户是否禁用
  360. function isDepositDisabled(item) {
  361. const closeFunc = item.closeFunctions || []
  362. if (transferType.value === 'agent' && closeFunc.indexOf('3') !== -1) return true
  363. if (transferType.value === 'internal' && closeFunc.indexOf('7') !== -1) return true
  364. if (transferType.value === 'system' && closeFunc.indexOf('7') !== -1) return true
  365. return false
  366. }
  367. const getDateList = async () => {
  368. let res = await customApi.CustomDropdown({ platform: '' })
  369. if (res.code == Code.StatusOK) {
  370. loginOptions.value = res.data
  371. nextTick(() => {
  372. handleRouteParams()
  373. })
  374. } else {
  375. $pigeon?.MessageError(res.msg)
  376. }
  377. }
  378. // 获取代理列表
  379. const getAgentList = async () => {
  380. let res = await financialApi.getAgentList({})
  381. if (res.code == Code.StatusOK) {
  382. toOptions.value = res.data
  383. } else {
  384. $pigeon?.MessageError(res.msg)
  385. }
  386. }
  387. //获取内转数额区间
  388. const getAmount = async () => {
  389. let res = await financialApi.transferInfo({})
  390. if (res.code == Code.StatusOK) {
  391. Object.assign(amountLimits, res.data)
  392. } else {
  393. $pigeon?.MessageError(res.msg)
  394. }
  395. }
  396. // 获取跨系统转账下拉列表
  397. const getTransferSystemDropdown = async () => {
  398. let res = await financialApi.transferSystemDropdown({})
  399. if (res.code == Code.StatusOK && res.data) {
  400. systemTransferType.value = res.data.transferType ?? 0
  401. console.log(systemTransferType.value, 'systemTransferType')
  402. accountList.value = res.data.accountList || []
  403. }
  404. }
  405. // 生命周期
  406. onLoad((options) => {
  407. pageQuery.value = options
  408. })
  409. // 更新转出账户选项
  410. function updateToOptions() {
  411. toOptions.value = []
  412. if (transferType.value === 'internal') {
  413. loginOptions.value.forEach(item => {
  414. if (form.withdrawLogin != null || item.login != form.withdrawLogin) {
  415. toOptions.value.push(item)
  416. }
  417. })
  418. } else if (transferType.value === 'agent') {
  419. getAgentList()
  420. } else if (transferType.value === 'system') {
  421. toOptions.value = accountList.value.filter(item => form.withdrawLogin != null || item.login != form.withdrawLogin)
  422. }
  423. }
  424. // 处理路由参数
  425. function handleRouteParams() {
  426. nextTick(() => {
  427. const loginNum = pageQuery.value.login ? Number(pageQuery.value.login) : null
  428. form.withdrawLogin = loginNum
  429. step2.value = loginNum ? true : false
  430. loginValue.value = loginNum
  431. })
  432. updateToOptions()
  433. }
  434. onMounted(() => {
  435. getDateList()
  436. getAmount()
  437. getTransferSystemDropdown()
  438. })
  439. const resetForm = async () => {
  440. await nextTick();
  441. formRef.value?.clearValidate();
  442. form.customBankCode = ""
  443. form.depositLogin = null
  444. // form.withdrawLogin = null
  445. form.amount = ""
  446. amountErrorMessage.value = ""
  447. submitting.value = false;
  448. flag.value = false;
  449. // loginValue.value = null
  450. }
  451. // 侦听器
  452. watch(loginValue, (newVal) => {
  453. if (newVal != null) {
  454. step2.value = true
  455. form.withdrawLogin = Number(newVal)
  456. form.depositLogin = null
  457. form.amount = ''
  458. amountErrorMessage.value = ''
  459. toOptions.value = []
  460. if (transferType.value === 'internal') {
  461. // 内部转账逻辑
  462. loginOptions.value.forEach((item) => {
  463. if (item.login != newVal) {
  464. toOptions.value.push(item)
  465. }
  466. })
  467. } else if (transferType.value === 'agent') {
  468. // 代理内转逻辑
  469. getAgentList()
  470. } else if (transferType.value === 'system') {
  471. // 跨系统内转,排除当前选择的转出账户
  472. toOptions.value = accountList.value.filter(
  473. (item) => item.login != form.withdrawLogin
  474. )
  475. }
  476. }
  477. })
  478. watch(transferType, (newVal) => {
  479. if (form.depositLogin) {
  480. form.depositLogin = null
  481. }
  482. if (loginValue.value && step2.value) {
  483. toOptions.value = []
  484. if (newVal === 'internal') {
  485. // 内部转账逻辑
  486. loginOptions.value.forEach((item) => {
  487. if (item.login != loginValue.value) {
  488. toOptions.value.push(item)
  489. }
  490. })
  491. } else if (newVal === 'agent') {
  492. // 代理内转逻辑
  493. getAgentList()
  494. } else if (newVal === 'system') {
  495. // 跨系统内转,排除当前选择的转出账户
  496. toOptions.value = accountList.value.filter(
  497. (item) => item.login != form.withdrawLogin
  498. )
  499. }
  500. }
  501. })
  502. </script>
  503. <style lang="scss" scoped>
  504. @import "@/uni.scss";
  505. .transfer-page {
  506. width: 100%;
  507. padding-bottom: px2rpx(20);
  508. .main-content {
  509. text-align: left;
  510. .box {
  511. padding-top: px2rpx(5);
  512. color: #303133;
  513. .b-card {
  514. background-color: #fff;
  515. margin-bottom: px2rpx(10);
  516. border-radius: px2rpx(6);
  517. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  518. &:hover {
  519. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  520. }
  521. .card-top {
  522. padding: px2rpx(15) px2rpx(20);
  523. .card-row {
  524. margin-bottom: px2rpx(30);
  525. &:last-child {
  526. margin-bottom: 0;
  527. }
  528. }
  529. .card-tit{
  530. margin-bottom: px2rpx(0) !important;
  531. }
  532. .tit {
  533. font-size: px2rpx(16);
  534. margin-bottom: px2rpx(12) !important;
  535. font-weight: 600;
  536. .iconfont {
  537. font-size: px2rpx(18);
  538. margin-right: px2rpx(8);
  539. color: #409eff;
  540. }
  541. }
  542. .title-wrapper {
  543. display: flex;
  544. justify-content: space-between;
  545. align-items: center;
  546. }
  547. }
  548. }
  549. }
  550. .box-step2 {
  551. .form-row {
  552. display: flex;
  553. flex-wrap: wrap;
  554. margin-bottom: px2rpx(12);
  555. gap: px2rpx(12);
  556. &:last-child {
  557. margin-bottom: 0;
  558. }
  559. .form-col {
  560. flex: 1;
  561. min-width: px2rpx(140);
  562. @media screen and (max-width: 991px) {
  563. flex: 0 0 100%;
  564. width: 100%;
  565. }
  566. }
  567. .form-col-full {
  568. width: 100%;
  569. padding: 0 px2rpx(5);
  570. }
  571. }
  572. .tips {
  573. line-height: 1.8;
  574. font-size: px2rpx(12);
  575. color: #909399;
  576. background-color: #f9f9f9;
  577. padding: px2rpx(12);
  578. border-radius: px2rpx(4);
  579. border-left: px2rpx(2) solid #409eff;
  580. .title {
  581. font-weight: 600;
  582. margin-bottom: px2rpx(6);
  583. color: #606266;
  584. }
  585. }
  586. }
  587. }
  588. .picker-select {
  589. background-color: #f5f7fa;
  590. border: 1px solid #dcdfe6;
  591. border-radius: px2rpx(4);
  592. padding: px2rpx(12) px2rpx(14);
  593. font-size: px2rpx(14);
  594. color: #606266;
  595. line-height: 1.4;
  596. width: 100%;
  597. box-sizing: border-box;
  598. &:hover {
  599. border-color: #409eff;
  600. }
  601. &.picker-disabled {
  602. background-color: #f5f7fa;
  603. color: #c0c4cc;
  604. cursor: not-allowed;
  605. }
  606. }
  607. .disabled-input {
  608. background-color: #f5f7fa;
  609. border: 1px solid #dcdfe6;
  610. border-radius: px2rpx(4);
  611. padding: px2rpx(12) px2rpx(14);
  612. font-size: px2rpx(14);
  613. color: #606266;
  614. width: 100%;
  615. box-sizing: border-box;
  616. }
  617. .m-input {
  618. background-color: #f5f7fa;
  619. border: 1px solid #dcdfe6;
  620. border-radius: px2rpx(4);
  621. padding: px2rpx(12) px2rpx(14);
  622. font-size: px2rpx(14);
  623. width: 100%;
  624. box-sizing: border-box;
  625. &:focus {
  626. border-color: #409eff;
  627. outline: none;
  628. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  629. }
  630. }
  631. .popup-content {
  632. padding: px2rpx(30) px2rpx(20);
  633. text-align: center;
  634. min-width: px2rpx(250);
  635. max-width: 80%;
  636. margin: 0 auto;
  637. @media screen and (max-width: 991px) {
  638. min-width: 80%;
  639. max-width: 90%;
  640. margin: 0 px2rpx(10);
  641. }
  642. position: relative;
  643. .icon {
  644. .iconfont {
  645. font-size: px2rpx(60);
  646. display: block;
  647. margin: 0 auto;
  648. }
  649. .icon-chenggong {
  650. color: #67c23a;
  651. }
  652. .icon-jingshi {
  653. color: #f56c6c;
  654. }
  655. .icon-dengdai {
  656. color: #e6a23c;
  657. }
  658. }
  659. .des1 {
  660. font-weight: 600;
  661. font-size: px2rpx(16);
  662. margin: px2rpx(20) 0 px2rpx(15);
  663. color: #303133;
  664. line-height: 1.4;
  665. padding: 0 px2rpx(10);
  666. }
  667. .dialog-footer {
  668. display: flex;
  669. justify-content: center;
  670. gap: px2rpx(10);
  671. margin-top: px2rpx(10);
  672. @media (max-width: 750rpx) {
  673. flex-direction: column;
  674. align-items: center;
  675. gap: px2rpx(6);
  676. }
  677. button {
  678. min-width: px2rpx(90);
  679. padding: 0 px2rpx(12);
  680. border-radius: px2rpx(4);
  681. font-size: px2rpx(14);
  682. transition: all 0.3s ease;
  683. cursor: pointer;
  684. &[type="primary"] {
  685. background-color: #409eff;
  686. color: #fff;
  687. border: none;
  688. &:hover {
  689. background-color: #66b1ff;
  690. transform: translateY(px2rpx(-1));
  691. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  692. }
  693. &:active {
  694. background-color: #3a8ee6;
  695. transform: translateY(0);
  696. }
  697. }
  698. &:not([type="primary"]) {
  699. background-color: #fff;
  700. border: 1px solid #dcdfe6;
  701. color: #606266;
  702. &:hover {
  703. border-color: #409eff;
  704. color: #409eff;
  705. transform: translateY(px2rpx(-1));
  706. }
  707. &:active {
  708. transform: translateY(0);
  709. }
  710. }
  711. }
  712. }
  713. }
  714. .wait-popup {
  715. .des1 {
  716. margin-top: px2rpx(10);
  717. }
  718. .icon {
  719. .iconfont {
  720. animation: spin 1s linear infinite;
  721. }
  722. }
  723. }
  724. }
  725. // 动画
  726. @keyframes popupFadeIn {
  727. from {
  728. opacity: 0;
  729. transform: scale(0.9);
  730. }
  731. to {
  732. opacity: 1;
  733. transform: scale(1);
  734. }
  735. }
  736. @keyframes fadeIn {
  737. from {
  738. opacity: 0;
  739. transform: translateY(px2rpx(10));
  740. }
  741. to {
  742. opacity: 1;
  743. transform: translateY(0);
  744. }
  745. }
  746. @keyframes pulse {
  747. 0% {
  748. transform: scale(1);
  749. }
  750. 50% {
  751. transform: scale(1.05);
  752. }
  753. 100% {
  754. transform: scale(1);
  755. }
  756. }
  757. @keyframes spin {
  758. from {
  759. transform: rotate(0deg);
  760. }
  761. to {
  762. transform: rotate(360deg);
  763. }
  764. }
  765. // 表单错误信息样式
  766. .uni-forms-item__error {
  767. font-size: px2rpx(12);
  768. color: #f56c6c;
  769. margin-top: px2rpx(4);
  770. }
  771. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  772. @media (max-width: 750rpx) {
  773. .transfer-page {
  774. .main-content {
  775. padding: px2rpx(8);
  776. .box {
  777. .b-card {
  778. .card-top {
  779. padding: px2rpx(12) px2rpx(16);
  780. .tit {
  781. font-size: px2rpx(14);
  782. .iconfont {
  783. font-size: px2rpx(16);
  784. }
  785. }
  786. }
  787. }
  788. }
  789. }
  790. .s-btn {
  791. font-size: px2rpx(14);
  792. padding: px2rpx(10) px2rpx(16);
  793. }
  794. .popup-content {
  795. padding: px2rpx(20) px2rpx(16);
  796. .icon {
  797. .iconfont {
  798. font-size: px2rpx(50);
  799. }
  800. }
  801. .des1 {
  802. font-size: px2rpx(14);
  803. margin: px2rpx(15) 0 px2rpx(10);
  804. }
  805. .dialog-footer {
  806. button {
  807. min-width: px2rpx(80);
  808. font-size: px2rpx(13);
  809. }
  810. }
  811. }
  812. }
  813. }
  814. </style>