transfer.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="title" />
  4. <view id="custom_IbTransfer" class="transfer-page">
  5. <view class="main-content">
  6. <!-- 步骤1:选择转出账户 -->
  7. <cwg-asset-tabs v-model="activeTab" :tabs="tabsConfig" />
  8. <!-- 步骤2:转账表单 -->
  9. <view class="box box-step2">
  10. <view class="b-card">
  11. <view class="card-top">
  12. <uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
  13. validate-trigger="submit">
  14. <view class="form-row">
  15. <view class="form-col">
  16. <!-- 转入账户 -->
  17. <uni-forms-item :label="toLabel" name="to"
  18. :error-message="deposittoErrorMessage">
  19. <cwg-combox v-model:value="form.to" :clearable="false"
  20. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  21. </uni-forms-item>
  22. </view>
  23. </view>
  24. <view class="form-row">
  25. <view class="form-col">
  26. <!-- 转账金额 -->
  27. <uni-forms-item :label="t('Custom.Transfer.Amount')" name="amount"
  28. :error-message="amountErrorMessage">
  29. <uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
  30. @blur="validateAmount" />
  31. </uni-forms-item>
  32. </view>
  33. </view>
  34. <!-- 20%赠金-年中赠金 -->
  35. <view class="form-row" v-if="tableData4TwoFlag">
  36. <view class="form-col-full">
  37. <uni-forms-item class="agree" name="agree5">
  38. <view class="agree-content">
  39. <checkbox :checked="form.agree5" @click="form.agree5 = !form.agree5" />
  40. <view class="agree-text">
  41. <view class="agree-title">{{
  42. t('news_add_field1.activitiesNZTwo.itemDeposit1') }}</view>
  43. </view>
  44. </view>
  45. </uni-forms-item>
  46. <view class="agree-detail">
  47. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2') }}</text>
  48. <text class="clause" @click="dialogClauseNZTwo = true">{{
  49. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  50. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4') }}</text>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 赠送活动 -->
  55. <view class="form-row" v-if="tableDataNewListFlag">
  56. <view class="form-col-full">
  57. <uni-forms-item class="agree" name="agree6">
  58. <view class="agree-content">
  59. <checkbox :checked="form.agree6" @click="form.agree6 = !form.agree6" />
  60. <view class="agree-text">
  61. <view class="agree-title">{{ tableDataNewList.title }}</view>
  62. </view>
  63. </view>
  64. </uni-forms-item>
  65. <view class="agree-detail">
  66. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  67. <text class="clause" @click="dialogClauseNewList = true">{{
  68. tableDataNewList.title }}</text>
  69. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="form-row">
  74. <button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
  75. ?
  76. 'Enviar solicitud' : t('Btn.Submit') }}</button>
  77. </view>
  78. </uni-forms>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 失败弹窗 -->
  84. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  85. <!-- 成功弹窗 -->
  86. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  87. <!-- 等待弹窗 -->
  88. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  89. <!-- 不参加活动弹出框 -->
  90. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  91. <!-- 功能关闭弹出 -->
  92. <cwg-function-disabled-popup v-model:visible="InfoStatus5" :showFooters="false" @confirm="toHome" />
  93. <!-- 赠金协议20年中 -->
  94. <BonusAgreementPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  95. :type="nzTwo" :tableData4Two="tableData4Two" />
  96. <!-- 赠送活动协议 -->
  97. <BonusAgreementPopup v-model:visible="dialogClauseNewList" :title="tableDataNewList.title"
  98. :content="tableDataNewList.content" :type="newList" />
  99. </view>
  100. </cwg-page-wrapper>
  101. </template>
  102. <script setup>
  103. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  104. import { useI18n } from 'vue-i18n'
  105. import { onLoad } from '@dcloudio/uni-app'
  106. import { getCurrentInstance } from 'vue'
  107. import { ibApi } from '@/service/ib'
  108. import { activityApi } from '@/service/activity'
  109. import Config from '@/config/index'
  110. import useUserStore from '@/stores/use-user-store'
  111. import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
  112. const userStore = useUserStore()
  113. const ibInfo = computed(() => {
  114. return userStore?.userInfo?.ibInfo || {}
  115. })
  116. const { Code } = Config
  117. const { t, locale } = useI18n()
  118. const activeTab = ref(1)
  119. const tabsConfig = computed(() => [
  120. { text: t('Ib.Transfer.CommissionTransfer'), value: 1, type: 'commission' },
  121. { text: t('Ib.Transfer.CommissionIssue'), value: 2, type: 'commissionIssue' },
  122. { text: t('Ib.Transfer.IbAccountTransfer'), value: 3, type: 'ib' },
  123. ])
  124. const title = computed(() => tabsConfig.value.find(item => item.value == activeTab.value)?.text || '')
  125. const toLabel = computed(() => activeTab.value == '1' || activeTab.value == '2' ? t('Label.IntoAccount') : t('Ib.Transfer.IbAccountTransfer'))
  126. // 获取全局实例(用于访问 Session、$pigeon 等)
  127. const { proxy } = getCurrentInstance()
  128. const $pigeon = proxy?.$pigeon
  129. // 响应式数据
  130. const loginValue = ref('')
  131. const flag = ref(false)
  132. const RES = ref('') // 弹窗响应信息
  133. const giveLoginJoin = ref('')
  134. const step2 = ref(false)
  135. const amountLimits = reactive({
  136. minAmount: '',
  137. maxAmount: '',
  138. })
  139. const form = reactive({
  140. currency: 'USD',
  141. depositLogin: null,
  142. to: null,
  143. amount: '',
  144. agree5: false,
  145. agree6: false,
  146. })
  147. const resetForm = async () => {
  148. await nextTick();
  149. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  150. form.customBankCode = ""
  151. form.depositLogin = ""
  152. form.withdrawLogin = ""
  153. form.to = ""
  154. form.amount = ""
  155. form.agree5 = false
  156. form.agree6 = false
  157. amountErrorMessage.value = ""
  158. submitting.value = false
  159. flag.value = false
  160. }
  161. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  162. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  163. const dialogCheck = ref(false)
  164. const dialogVisible = ref(false)
  165. const dialogCheckWait = ref(false)
  166. const InfoStatus5 = ref(false)
  167. const dialogClauseNZTwo = ref(false)
  168. const tableData4TwoFlag = ref(false)
  169. const tableData4Two = ref({})
  170. const dialogClauseNewList = ref(false)
  171. const tableDataNewListFlag = ref(false)
  172. const tableDataNewList = ref({})
  173. const dialogDontActive = ref(false)
  174. const submitting = ref(false)
  175. // 错误信息
  176. const depositErrorMessage = ref('')
  177. const depositLogin1ErrorMessage = ref('')
  178. const amountErrorMessage = ref('')
  179. // 表单验证规则
  180. const rules = {
  181. withdrawLogin: {
  182. rules: [
  183. {
  184. required: true,
  185. errorMessage: t('vaildate.select.empty')
  186. },
  187. ],
  188. },
  189. to: {
  190. rules: [
  191. {
  192. required: true,
  193. errorMessage: t('vaildate.select.empty')
  194. },
  195. ],
  196. },
  197. amount: {
  198. rules: [
  199. {
  200. required: true,
  201. errorMessage: t('vaildate.amount.format'),
  202. },
  203. {
  204. validateFunction: (rule, value, data, callback) => {
  205. if (!value) {
  206. callback(t('vaildate.amount.format'))
  207. } else if (
  208. amountLimits.minAmount &&
  209. amountLimits.maxAmount &&
  210. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  211. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  212. ) {
  213. callback(t('vaildate.amount.amount') +
  214. amountLimits.minAmount +
  215. '-' +
  216. amountLimits.maxAmount)
  217. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  218. callback(t('vaildate.amount.format'))
  219. }
  220. return true
  221. }
  222. },
  223. ],
  224. }
  225. }
  226. function validateAmount() {
  227. const amount = form.amount
  228. if (!amount) {
  229. amountErrorMessage.value = t('vaildate.amount.format')
  230. return false
  231. }
  232. const numValue = parseFloat(amount)
  233. if (isNaN(numValue)) {
  234. amountErrorMessage.value = t('vaildate.amount.format')
  235. return false
  236. }
  237. if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
  238. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  239. return false
  240. }
  241. if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
  242. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  243. return false
  244. }
  245. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  246. amountErrorMessage.value = t('vaildate.amount.format')
  247. return false
  248. }
  249. amountErrorMessage.value = ''
  250. return true
  251. }
  252. // 模板引用
  253. const formRef = ref(null)
  254. // 计算属性
  255. const getInfoStatus5 = computed(() => {
  256. if (ibInfo.value?.closeFunctions) {
  257. return ibInfo.value.closeFunctions.indexOf('5') !== -1
  258. }
  259. return false
  260. })
  261. // 转入账户列表
  262. const depositDisplayList = computed(() => {
  263. if (activeTab.value != 3) {
  264. return toInfo.value.map(item => ({
  265. text: [item.login, item.platform, item.cId, item.balance, item.groupTypeName].filter(field => field !== null && field !== undefined && field !== '').join('-'),
  266. value: item.login,
  267. disabled: item.status
  268. }))
  269. } else {
  270. return agentInfo.value.map(item => ({
  271. text: `${item.ibNo} - ${item.name}`,
  272. value: item.id
  273. }))
  274. }
  275. })
  276. const fromInfo = ref('')
  277. const toInfo = ref([])
  278. const agentInfo = ref([])
  279. //转出账户信息
  280. const ransferInfo = async function () {
  281. let res = await ibApi.agentBalanceTransferFrom({});
  282. if (res.code == Code.StatusOK) {
  283. fromInfo.value =
  284. res.data.ibNo +
  285. " - " +
  286. t("Custom.Deposit.AvailableBalance") +
  287. ": $" +
  288. (res.data.balance ? res.data.balance : 0);
  289. } else {
  290. $pigeon.MessageError(res.msg);
  291. }
  292. }
  293. //转入账户信息
  294. const ransferToInfo = async function () {
  295. let res;
  296. // 佣金内转使用新接口 /account/dropdown
  297. if (activeTab.value == 1) {
  298. res = await ibApi.CustomDropdown({ platform: "" });
  299. } else {
  300. // 佣金下发和其他情况使用原接口
  301. res = await ibApi.agentTransferToList({});
  302. }
  303. if (res.code == Code.StatusOK) {
  304. toInfo.value = res.data || [];
  305. toInfo.value.forEach((item) => {
  306. if (item.closeFunctions && item.closeFunctions.length > 0) {
  307. const targetValues = ["7", "5", "9"];
  308. const hasTargetValue = item.closeFunctions.some(func => targetValues.includes(func));
  309. if (hasTargetValue) {
  310. item.status = true;
  311. }
  312. }
  313. })
  314. } else {
  315. $pigeon.MessageError(res.msg);
  316. }
  317. }
  318. //获取代理账户信息
  319. const getAgentInfo = async function () {
  320. let res = await ibApi.ibTreeForTransfer({});
  321. if (res.code == Code.StatusOK) {
  322. agentInfo.value = res.data || [];
  323. } else {
  324. $pigeon.MessageError(res.msg);
  325. }
  326. }
  327. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  328. function toHome() {
  329. uni.navigateTo({ url: '/pages/ib/index' })
  330. InfoStatus5.value = false
  331. }
  332. function closeDia() {
  333. resetForm()
  334. formRef.value?.resetFields?.()
  335. step2.value = false
  336. loginValue.value = ''
  337. dialogCheck.value = false
  338. dialogVisible.value = false
  339. tableData4TwoFlag.value = false
  340. tableDataNewListFlag.value = false
  341. }
  342. // 内转
  343. async function toTransfer() {
  344. if (submitting.value) return
  345. try {
  346. const valid = await formRef.value?.validate()
  347. if (!valid) {
  348. console.log('表单验证失败')
  349. return
  350. }
  351. openDontActive()
  352. } catch (error) {
  353. console.error('验证失败:', error)
  354. }
  355. }
  356. // 打开不参加活动弹窗
  357. function openDontActive() {
  358. tosubmitConfirm()
  359. }
  360. function tosubmitConfirm() {
  361. dialogDontActive.value = false
  362. transferConfig()
  363. }
  364. async function transferConfig() {
  365. if (submitting.value) return
  366. submitting.value = true
  367. try {
  368. if (flag.value) {
  369. return
  370. }
  371. flag.value = true
  372. form.activityTwoPercentGive = form.agree5 ? 1 : 0
  373. form.activityGive = form.agree6 ? 1 : 0
  374. dialogCheckWait.value = true
  375. let api
  376. if (activeTab.value != 3) {
  377. api = ibApi.agentBalanceTransfer
  378. } else {
  379. api = ibApi.agentBalanceCommissionAdd
  380. }
  381. const res = await api({ ...form })
  382. dialogCheckWait.value = false
  383. if (res.code == Code.StatusOK) {
  384. dialogCheck.value = true
  385. dialogVisible.value = true
  386. flag.value = false
  387. } else {
  388. RES.value = res.msg
  389. dialogCheck.value = true
  390. dialogVisible.value = false
  391. flag.value = false
  392. }
  393. } catch (error) {
  394. console.error('转账失败:', error)
  395. RES.value = error.msg || t('Msg.Fail')
  396. dialogCheck.value = true
  397. dialogVisible.value = false
  398. } finally {
  399. submitting.value = false
  400. flag.value = false
  401. resetForm()
  402. if (dialogCheckWait.value) dialogCheckWait.value = false
  403. }
  404. }
  405. async function Activity24nianzhongTwoInfo() {
  406. const res = await activityApi.Activity23nianzhongTwoInfo({})
  407. if (res.code == Code.StatusOK) {
  408. tableData4Two.value = res.data
  409. } else {
  410. $pigeon?.MessageError(res.msg)
  411. }
  412. }
  413. // 活动相关方法
  414. function togetActivity() {
  415. get23nianzhongTwoLogin()
  416. getActivityExtensionGiveLogin()
  417. getActivityExtensionGiveLoginJoin()
  418. }
  419. async function get23nianzhongTwoLogin() {
  420. const res = await activityApi.Activity23nianzhongTwoLogin({
  421. login: form.to,
  422. })
  423. if (res.code == Code.StatusOK) {
  424. tableData4Two.value = res.data
  425. if (tableData4Two.value.show == 1) {
  426. tableData4TwoFlag.value = true
  427. } else if (tableData4Two.value.show == 0) {
  428. tableData4TwoFlag.value = false
  429. }
  430. } else {
  431. $pigeon?.MessageError(res.msg)
  432. }
  433. }
  434. async function getActivityExtensionGiveLogin() {
  435. const res = await activityApi.ActivityExtensionGiveLogin({
  436. login: form.to,
  437. })
  438. if (res.code == Code.StatusOK) {
  439. tableDataNewList.value = res.data
  440. if (tableDataNewList.value.show == 1) {
  441. tableDataNewListFlag.value = true
  442. } else if (tableDataNewList.value.show == 0) {
  443. tableDataNewListFlag.value = false
  444. }
  445. } else {
  446. $pigeon?.MessageError(res.msg)
  447. }
  448. }
  449. async function getActivityExtensionGiveLoginJoin() {
  450. const res = await activityApi.ActivityExtensionGiveLoginJoin({
  451. login: form.to,
  452. })
  453. if (res.code == Code.StatusOK) {
  454. giveLoginJoin.value = res.data
  455. } else {
  456. $pigeon?.MessageError(res.msg)
  457. giveLoginJoin.value = ''
  458. }
  459. }
  460. // 监听 activeTab 变化
  461. watch(activeTab, (newVal) => {
  462. if (newVal) {
  463. console.log(newVal, 1212);
  464. if (newVal == 3) {
  465. getAgentInfo()
  466. } else {
  467. ransferToInfo()
  468. }
  469. form.to = ''
  470. form.amount = ''
  471. }
  472. })
  473. //
  474. watch(loginValue, (newVal) => {
  475. if (newVal) {
  476. step2.value = true
  477. form.withdrawLogin = newVal
  478. }
  479. })
  480. watch(() => form.to, (newVal) => {
  481. if (activeTab.value == 3) {
  482. getAgentInfo()
  483. } else {
  484. togetActivity()
  485. }
  486. })
  487. // 监听 agree6 变化
  488. watch(() => form.agree6, (newVal) => {
  489. if (newVal && giveLoginJoin.value?.flag === false) {
  490. let tips = ''
  491. if (giveLoginJoin.value.promptType == 1) {
  492. tips = t('surplusList.item10')
  493. } else {
  494. tips = t('surplusList.item11')
  495. }
  496. return
  497. // 活动相关方法,后续需要在调整
  498. if (giveLoginJoin.value.activityCategory == 1) {
  499. $pigeon?.MessageConfirm(
  500. tips,
  501. t('Msg.SystemPrompt'),
  502. t('surplusList.item12'),
  503. t('Home.msg.item3'),
  504. () => {
  505. $pigeon?.MessageConfirm(
  506. t('surplusList.item13'),
  507. t('Msg.SystemPrompt'),
  508. t('Btn.Confirm'),
  509. t('Btn.Cancel'),
  510. async () => {
  511. try {
  512. const res = await activityApi.ActivityGiveCancel({
  513. login: loginValue.value,
  514. })
  515. if (res.code == Code.StatusOK) {
  516. $pigeon?.MessageOK(res.msg || t('Msg.Success'))
  517. } else {
  518. $pigeon?.MessageError(res.msg)
  519. }
  520. } catch (error) {
  521. $pigeon?.MessageError(t('Msg.Fail'))
  522. }
  523. },
  524. () => {
  525. form.agree6 = false
  526. }
  527. )
  528. },
  529. () => {
  530. form.agree6 = false
  531. }
  532. )
  533. } else {
  534. $pigeon?.MessageConfirm(
  535. tips,
  536. t('Msg.SystemPrompt'),
  537. t('Btn.Confirm'),
  538. t('Btn.Cancel'),
  539. () => { },
  540. () => {
  541. form.agree6 = false
  542. }
  543. )
  544. }
  545. }
  546. })
  547. onMounted(() => {
  548. if (getInfoStatus5.value) {
  549. InfoStatus5.value = true
  550. }
  551. ransferInfo();
  552. ransferToInfo();
  553. // Activity24nianzhongTwoInfo()
  554. })
  555. onLoad((options) => {
  556. if (options?.login) {
  557. loginValue.value = options.login
  558. step2.value = true
  559. form.withdrawLogin = options.login
  560. }
  561. if (options?.tab) {
  562. activeTab.value = options?.tab
  563. }
  564. })
  565. </script>
  566. <style lang="scss" scoped>
  567. @import "@/uni.scss";
  568. .transfer-page {
  569. width: 100%;
  570. padding-bottom: px2rpx(20);
  571. .main-content {
  572. text-align: left;
  573. .box {
  574. padding-top: px2rpx(5);
  575. color: #303133;
  576. .b-card {
  577. background-color: #fff;
  578. margin-bottom: px2rpx(10);
  579. border-radius: px2rpx(6);
  580. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  581. &:hover {
  582. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  583. }
  584. .card-top {
  585. padding: px2rpx(15) px2rpx(20);
  586. box-sizing: border-box;
  587. .card-row {
  588. margin-bottom: px2rpx(12);
  589. &:last-child {
  590. margin-bottom: 0;
  591. }
  592. }
  593. .tit {
  594. font-size: px2rpx(16);
  595. margin-bottom: px2rpx(12);
  596. font-weight: 600;
  597. .iconfont {
  598. font-size: px2rpx(18);
  599. margin-right: px2rpx(8);
  600. color: #409eff;
  601. }
  602. }
  603. .title-wrapper {
  604. display: flex;
  605. justify-content: space-between;
  606. align-items: center;
  607. }
  608. }
  609. }
  610. }
  611. .box-step2 {
  612. .form-row {
  613. display: flex;
  614. flex-wrap: wrap;
  615. margin-bottom: px2rpx(12);
  616. gap: px2rpx(12);
  617. &:last-child {
  618. margin-bottom: 0;
  619. }
  620. .form-col {
  621. flex: 1;
  622. min-width: px2rpx(140);
  623. @media screen and (max-width: 991px) {
  624. flex: 0 0 100%;
  625. width: 100%;
  626. }
  627. }
  628. .form-col-full {
  629. width: 100%;
  630. padding: 0 px2rpx(5);
  631. }
  632. }
  633. .tips {
  634. line-height: 1.8;
  635. font-size: px2rpx(12);
  636. color: #909399;
  637. background-color: #f9f9f9;
  638. padding: px2rpx(12);
  639. border-radius: px2rpx(4);
  640. border-left: px2rpx(2) solid #409eff;
  641. .title {
  642. font-weight: 600;
  643. margin-bottom: px2rpx(6);
  644. color: #606266;
  645. }
  646. }
  647. }
  648. }
  649. .picker-select {
  650. background-color: #f5f7fa;
  651. border: 1px solid #dcdfe6;
  652. border-radius: px2rpx(4);
  653. padding: px2rpx(12) px2rpx(14);
  654. font-size: px2rpx(14);
  655. color: #606266;
  656. line-height: 1.4;
  657. width: 100%;
  658. box-sizing: border-box;
  659. &:hover {
  660. border-color: #409eff;
  661. }
  662. &.picker-disabled {
  663. background-color: #f5f7fa;
  664. color: #c0c4cc;
  665. cursor: not-allowed;
  666. }
  667. }
  668. .disabled-input {
  669. background-color: #f5f7fa;
  670. border: 1px solid #dcdfe6;
  671. border-radius: px2rpx(4);
  672. padding: px2rpx(12) px2rpx(14);
  673. font-size: px2rpx(14);
  674. color: #606266;
  675. width: 100%;
  676. box-sizing: border-box;
  677. }
  678. .m-input {
  679. background-color: #f5f7fa;
  680. border: 1px solid #dcdfe6;
  681. border-radius: px2rpx(4);
  682. padding: px2rpx(12) px2rpx(14);
  683. font-size: px2rpx(14);
  684. width: 100%;
  685. box-sizing: border-box;
  686. &:focus {
  687. border-color: #409eff;
  688. outline: none;
  689. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  690. }
  691. }
  692. }
  693. // 动画
  694. @keyframes popupFadeIn {
  695. from {
  696. opacity: 0;
  697. transform: scale(0.9);
  698. }
  699. to {
  700. opacity: 1;
  701. transform: scale(1);
  702. }
  703. }
  704. @keyframes fadeIn {
  705. from {
  706. opacity: 0;
  707. transform: translateY(px2rpx(10));
  708. }
  709. to {
  710. opacity: 1;
  711. transform: translateY(0);
  712. }
  713. }
  714. @keyframes pulse {
  715. 0% {
  716. transform: scale(1);
  717. }
  718. 50% {
  719. transform: scale(1.05);
  720. }
  721. 100% {
  722. transform: scale(1);
  723. }
  724. }
  725. @keyframes spin {
  726. from {
  727. transform: rotate(0deg);
  728. }
  729. to {
  730. transform: rotate(360deg);
  731. }
  732. }
  733. // 表单错误信息样式
  734. .uni-forms-item__error {
  735. font-size: px2rpx(12);
  736. color: #f56c6c;
  737. margin-top: px2rpx(4);
  738. }
  739. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  740. @media (max-width: 750rpx) {
  741. .transfer-page {
  742. .main-content {
  743. padding: px2rpx(8);
  744. .box {
  745. .b-card {
  746. .card-top {
  747. padding: px2rpx(12) px2rpx(16);
  748. .tit {
  749. font-size: px2rpx(14);
  750. .iconfont {
  751. font-size: px2rpx(16);
  752. }
  753. }
  754. }
  755. }
  756. }
  757. }
  758. .s-btn {
  759. font-size: px2rpx(14);
  760. padding: px2rpx(10) px2rpx(16);
  761. }
  762. }
  763. }
  764. </style>