| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <template>
- <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true" :showClose="false">
- <view class="popup-content">
- <view class="icon">
- <cwg-icon name="loading" :size="64" color="#1e2a3a" />
- </view>
- <view class="des1">{{ t('news_add_field.ApplicationDialog.Des31') }}</view>
- <view class="des2">
- <text>{{ t('news_add_field.ApplicationDialog.Des32') }}</text>
- <text>{{ t('news_add_field.ApplicationDialog.Des33') }}</text>
- <text class="crm-cursor" @click="toHistory">{{ t('news_add_field.ApplicationDialog.Des34') }}</text>
- <text>{{ t('news_add_field.ApplicationDialog.Des35') }}</text>
- </view>
- <view class="GoPay" v-if="goPayLink">
- <view class="GoPay-btn">
- <button type="primary" @click="GoPayBtn">{{ t('Label.item3') }}</button>
- </view>
- <view class="GoPay-con">{{ t('Label.item4') }}</view>
- <view class="GoPay-copy">
- <text class="link-text">{{ goPayLink }}</text>
- <view class="btn">
- <text class="crm-cursor" @click="CopyShareLink('custom_link')">{{ t('Ib.Index.Copy') }}</text>
- </view>
- </view>
- </view>
- </view>
- <template #footer>
- <button @click="close">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="close">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- </template>
- <script setup>
- import { computed, ref } from 'vue';
- import { useI18n } from 'vue-i18n';
- const props = defineProps({
- visible: { type: Boolean, default: false },
- success: { type: Boolean, default: true },
- errorMsg: { type: String, default: '' },
- goPayLink: { type: String, default: '' },
- isWaiting: { type: Boolean, default: false }
- });
- const emit = defineEmits(['update:visible', 'close', 'toHistory', 'goPay', 'copy']);
- const { t } = useI18n();
- const visible = computed({
- get: () => props.visible,
- set: (val) => emit('update:visible', val)
- });
- const close = () => {
- visible.value = false;
- emit('close');
- };
- //支付历史
- const toHistory = () => {
- uni.navigateTo({ url: "/pages/customer/history" })
- }
- // 去支付
- const GoPayBtn = () => {
- window.open(props.goPayLink)
- }
- // 复制分享链接
- const CopyShareLink = (link) => {
- uni.setClipboardData({
- data: props.goPayLink,
- success: function () {
- uni.showToast({
- title: t('Ib.Index.CopySuccess'),
- icon: 'success',
- duration: 2000
- });
- }
- });
- emit('copy');
- }
- </script>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .popup-content {
- text-align: center;
- max-width: 500px;
- margin: 0 auto;
- .icon {
- margin-bottom: 24px;
- animation: pulse 1.5s ease-in-out infinite;
- }
- .des1 {
- font-size: 20px;
- font-weight: bold;
- color: #1e2a3a;
- margin: 0 0 20px 0;
- line-height: 1.4;
- }
- .des2 {
- font-size: 14px;
- color: #606266;
- margin-bottom: 24px;
- line-height: 1.6;
- text-align: left;
- text {
- display: inline-block;
- margin-right: 4px;
- }
- .crm-cursor {
- color: #409eff;
- text-decoration: underline;
- transition: color 0.3s;
- cursor: pointer;
- &:hover {
- color: #66b1ff;
- }
- }
- }
- .GoPay {
- margin-top: 24px;
- background-color: #f5f7fa;
- border-radius: 8px;
- padding: 20px;
- text-align: left;
- .GoPay-btn {
- margin-bottom: 16px;
- button {
- width: 100%;
- height: 44px;
- border-radius: 6px;
- font-size: 16px;
- }
- }
- .GoPay-con {
- font-size: 14px;
- color: #606266;
- margin-bottom: 16px;
- line-height: 1.5;
- }
- .GoPay-copy {
- display: flex;
- align-items: center;
- gap: 12px;
- background-color: #ffffff;
- border: 1px solid #e4e7ed;
- border-radius: 6px;
- padding: 12px;
- .link-text {
- flex: 1;
- font-size: 14px;
- color: #303133;
- word-break: break-all;
- line-height: 1.4;
- }
- .btn {
- min-width: 80px;
- text-align: right;
- .crm-cursor {
- display: inline-block;
- padding: 6px 12px;
- background-color: #f0f9eb;
- color: #67c23a;
- border-radius: 4px;
- font-size: 14px;
- transition: all 0.3s;
- cursor: pointer;
- &:hover {
- background-color: #e6f7ff;
- color: #409eff;
- }
- }
- }
- }
- }
- }
- @keyframes pulse {
- 0% {
- transform: scale(1);
- }
- 50% {
- transform: scale(1.05);
- }
- 100% {
- transform: scale(1);
- }
- }
- @media (max-width: 768px) {
- .popup-content {
- padding: 20px 16px;
- .des1 {
- font-size: 18px;
- }
- .des2 {
- font-size: 13px;
- }
- .GoPay {
- padding: 16px;
- .GoPay-btn button {
- height: 40px;
- font-size: 14px;
- }
- }
- }
- }
- </style>
|