@uxda/appkit 4.2.82 → 4.2.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.mjs +7 -7
- package/README.md +187 -187
- package/babel.config.js +12 -12
- package/dist/appkit.css +41 -3
- package/dist/index.js +994 -535
- package/package.json +81 -81
- package/project.config.json +15 -15
- package/project.tt.json +13 -13
- package/rollup.config.mjs +77 -77
- package/src/Appkit.ts +67 -67
- package/src/balance/api/endpoints.ts +133 -133
- package/src/balance/api/index.ts +112 -106
- package/src/balance/components/AccountView.vue +773 -773
- package/src/balance/components/BalanceCard.vue +210 -210
- package/src/balance/components/BalanceReminder.vue +84 -84
- package/src/balance/components/ConsumptionFilter.vue +218 -218
- package/src/balance/components/ConsumptionRules.vue +68 -68
- package/src/balance/components/DateFilter.vue +259 -259
- package/src/balance/components/DateRange.vue +111 -111
- package/src/balance/components/ListFilter.vue +62 -62
- package/src/balance/components/ListFilterPicker.vue +191 -191
- package/src/balance/components/PromoterCard.vue +310 -310
- package/src/balance/components/SecondBalance.vue +77 -77
- package/src/balance/components/Tip.vue +45 -45
- package/src/balance/components/index.ts +8 -8
- package/src/balance/types.ts +99 -99
- package/src/components/bt-cropper/index.vue +730 -730
- package/src/components/bt-cropper/utils/calcCropper.js +42 -42
- package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
- package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
- package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
- package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
- package/src/components/bt-cropper/utils/ratio.js +3 -3
- package/src/components/bt-cropper/utils/tools.js +25 -25
- package/src/components/dd-area/index.vue +225 -225
- package/src/components/dd-icon/doc.md +21 -21
- package/src/components/dd-icon/index.vue +23 -23
- package/src/components/dd-notice-bar/index.vue +78 -78
- package/src/components/dd-search/doc.md +34 -34
- package/src/components/dd-search/index.vue +168 -168
- package/src/components/dd-selector/index.vue +124 -124
- package/src/components/dd-skeleton/doc.md +19 -19
- package/src/components/dd-skeleton/index.vue +36 -36
- package/src/global.ts +6 -6
- package/src/index.ts +93 -93
- package/src/main.scss +1 -1
- package/src/notice/api/endpoints.ts +54 -17
- package/src/notice/api/index.ts +115 -106
- package/src/notice/components/NoticeBanner.vue +247 -247
- package/src/notice/components/NoticeEntry.vue +99 -99
- package/src/notice/components/NoticeList.vue +311 -311
- package/src/notice/components/NoticeList2.vue +243 -0
- package/src/notice/components/NoticePopup.vue +163 -163
- package/src/notice/components/index.ts +6 -5
- package/src/notice/components/useCommonList.ts +86 -86
- package/src/notice/components/useNotice.ts +35 -35
- package/src/notice/index.ts +1 -1
- package/src/notice/types.ts +25 -25
- package/src/payment/api/config.ts +7 -7
- package/src/payment/api/endpoints.ts +95 -95
- package/src/payment/api/index.ts +101 -101
- package/src/payment/components/AmountPicker.vue +90 -90
- package/src/payment/components/RechargeResult.vue +69 -69
- package/src/payment/components/RechargeView.vue +190 -190
- package/src/payment/components/RightsPicker.vue +105 -105
- package/src/payment/components/TradeView.vue +363 -363
- package/src/payment/components/UserAgreement.vue +234 -234
- package/src/payment/components/index.ts +22 -22
- package/src/payment/index.ts +5 -5
- package/src/payment/services/index.ts +16 -16
- package/src/payment/services/invoke-recharge.ts +25 -25
- package/src/payment/services/request-payment.ts +130 -130
- package/src/payment/types.ts +32 -32
- package/src/register/components/SelfRegistration.vue +233 -233
- package/src/register/components/index.ts +2 -2
- package/src/scenarios/components/SharePoster.vue +364 -364
- package/src/scenarios/components/index.ts +2 -2
- package/src/scenarios/components/poster-paste.vue +93 -93
- package/src/scenarios/components/share-poster.md +273 -273
- package/src/shared/components/AppDrawer.vue +53 -53
- package/src/shared/components/AppVerify.vue +128 -128
- package/src/shared/components/DeviceVersion.vue +78 -78
- package/src/shared/components/EmptyView.vue +33 -33
- package/src/shared/components/OcrBusinessLicense.vue +137 -137
- package/src/shared/components/OcrIcon.vue +229 -229
- package/src/shared/components/PageHeader.vue +84 -84
- package/src/shared/components/index.ts +8 -8
- package/src/shared/composables/index.ts +9 -9
- package/src/shared/composables/useAmount.ts +46 -46
- package/src/shared/composables/useCountdown.ts +46 -46
- package/src/shared/composables/useCrypto.ts +76 -76
- package/src/shared/composables/useDeviceEnv.ts +11 -11
- package/src/shared/composables/useDragBox.ts +97 -97
- package/src/shared/composables/useEncode.ts +43 -43
- package/src/shared/composables/useLogger.ts +131 -131
- package/src/shared/composables/useSafeArea.ts +46 -46
- package/src/shared/composables/useTabbar.ts +24 -24
- package/src/shared/composables/useUpload.ts +61 -61
- package/src/shared/composables/useValidator.ts +32 -32
- package/src/shared/composables/useWxAuth.ts +48 -48
- package/src/shared/http/Http.ts +148 -146
- package/src/shared/http/index.ts +1 -1
- package/src/shared/http/types.ts +163 -160
- package/src/shared/index.ts +8 -8
- package/src/shared/weixin/index.ts +9 -9
- package/src/shared/weixin/jssdk.ts +103 -103
- package/src/shared/weixin/payment.ts +38 -38
- package/src/styles/vars.scss +3 -3
- package/src/user/api/endpoints.ts +17 -17
- package/src/user/api/index.ts +117 -111
- package/src/user/components/LoginSetting.vue +114 -114
- package/src/user/components/UserAuth.vue +220 -220
- package/src/user/components/UserBinding.vue +277 -277
- package/src/user/components/UserBindingSuccess.vue +80 -80
- package/src/user/components/UserEntry.vue +139 -139
- package/src/user/components/UserFeedback.vue +427 -427
- package/src/user/components/UserFeedbackEntry.vue +175 -175
- package/src/user/components/UserHeadCrop.vue +65 -65
- package/src/user/components/UserInfo.vue +708 -708
- package/src/user/components/UserResourceEmpty.vue +75 -75
- package/src/user/components/index.ts +23 -23
- package/src/user/index.ts +1 -1
- package/src/utils/utils.ts +28 -28
- package/tsconfig.json +30 -30
- package/types/global.d.ts +22 -22
- package/types/vue.d.ts +10 -10
- /package/dist/assets/{asset-DcH8Kg-2 → asset-3B_CoPto} +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ns-page class="news-list">
|
|
3
|
+
<div class="tabContainer" :class="{ inH5: isWeb() }">
|
|
4
|
+
<!-- <ns-search
|
|
5
|
+
v-track-search="{
|
|
6
|
+
trackInput: false,
|
|
7
|
+
trackSubmit: true,
|
|
8
|
+
minLength: 2,
|
|
9
|
+
}"
|
|
10
|
+
style="margin: 0 12px"
|
|
11
|
+
placeholder="请输入关键字搜索"
|
|
12
|
+
v-model="state.search"
|
|
13
|
+
></ns-search> -->
|
|
14
|
+
<ns-tabs v-model="state.tab" fill="#fff" square size="xl" style="height: 46px" @change="onTabChange">
|
|
15
|
+
<ns-tabs-item key="全部" tab="全部"></ns-tabs-item>
|
|
16
|
+
<ns-tabs-item key="业务消息" tab="业务消息"></ns-tabs-item>
|
|
17
|
+
<ns-tabs-item key="系统公告" tab="系统公告"></ns-tabs-item>
|
|
18
|
+
<ns-tabs-item key="未读" tab="未读"></ns-tabs-item>
|
|
19
|
+
</ns-tabs>
|
|
20
|
+
<div v-if="state.list.length > 0" class="read-all">
|
|
21
|
+
<div v-track-click="'click'" class="btn" @click="readAll">全部已读</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<ns-page-content class="mt-68px" scrollable refreshable :refresh-triggered="isRefresh"
|
|
25
|
+
@pull-down-refresh="onRefresh" @bottom-reached="nextPage">
|
|
26
|
+
<ns-skeleton :row="8" v-if="显示骨架屏" />
|
|
27
|
+
|
|
28
|
+
<template v-else>
|
|
29
|
+
<ns-repeator v-slot="item" align="stretch" direction="column" :gap="10" :data="state.list"
|
|
30
|
+
:show-no-more="paging.isLastPage">
|
|
31
|
+
<ns-card v-track-click="{
|
|
32
|
+
event: 'click',
|
|
33
|
+
elementText: '消息详情',
|
|
34
|
+
}" :r="5" fill="#fff" class="news-item w-full" @click="itemClick(item)">
|
|
35
|
+
<div v-if="item.标题" :style="{ color: item.已读 ? '#35353599' : '#353535' }" class="news-item-title">
|
|
36
|
+
<img v-if="item.是公告" class="news-item-title-icon"
|
|
37
|
+
src="https://cdn.ddjf.com/static/images/loan-manage-app/ic_msg_system_notice.webp" />
|
|
38
|
+
{{ item.标题 }}
|
|
39
|
+
</div>
|
|
40
|
+
<nut-ellipsis :style="{ color: item.已读 ? '#35353566' : '#353535CC' }" class="news-item-content"
|
|
41
|
+
direction="end" rows="3" expand-text="展开" collapse-text="收起" :content="item.内容"></nut-ellipsis>
|
|
42
|
+
<div class="news-item-time">{{ item.时间 }}</div>
|
|
43
|
+
</ns-card>
|
|
44
|
+
</ns-repeator>
|
|
45
|
+
<ns-empty v-if="state.list.length == 0" />
|
|
46
|
+
<div class="safe-area-space"></div>
|
|
47
|
+
</template>
|
|
48
|
+
</ns-page-content>
|
|
49
|
+
</ns-page>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import { useDidShow } from '@tarojs/taro'
|
|
54
|
+
import Taro from '@tarojs/taro'
|
|
55
|
+
import { type WithPaging, usePaging } from '@uxda/nutshell/taro'
|
|
56
|
+
import { useHttp, endpoints } from '../api'
|
|
57
|
+
import { reactive, ref } from 'vue'
|
|
58
|
+
import { useAppKitOptions } from '../../Appkit'
|
|
59
|
+
import {
|
|
60
|
+
NsTabs,
|
|
61
|
+
NsTabsItem,
|
|
62
|
+
NsRepeator,
|
|
63
|
+
NsCard,
|
|
64
|
+
NsPage,
|
|
65
|
+
NsPageContent,
|
|
66
|
+
NsSkeleton,
|
|
67
|
+
NsEmpty,
|
|
68
|
+
} from "@uxda/nutshell/taro";
|
|
69
|
+
import { isWeb } from '../../utils/utils';
|
|
70
|
+
|
|
71
|
+
const props = withDefaults(
|
|
72
|
+
defineProps<{
|
|
73
|
+
deviceType?: string;
|
|
74
|
+
userId: string;
|
|
75
|
+
app: string;
|
|
76
|
+
}>(),
|
|
77
|
+
{
|
|
78
|
+
deviceType: "2",
|
|
79
|
+
userId: "",
|
|
80
|
+
app: "",
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const $http = useHttp(),
|
|
85
|
+
显示骨架屏 = ref(true)
|
|
86
|
+
|
|
87
|
+
useDidShow(() => {
|
|
88
|
+
nextPage(1)
|
|
89
|
+
})
|
|
90
|
+
const state = reactive({
|
|
91
|
+
search: '',
|
|
92
|
+
tab: '全部',
|
|
93
|
+
list: [] as any[],
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
async function load(page: number) {
|
|
97
|
+
if (!props.app?.replace(',cloudkitPro', '')) {
|
|
98
|
+
state.list = []
|
|
99
|
+
return { paging: { page: 1, pageSize: 10, total: 0 }, data: [] }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const appkitOptions = useAppKitOptions()
|
|
103
|
+
const data = {
|
|
104
|
+
page,
|
|
105
|
+
pageSize: 10,
|
|
106
|
+
appCode: props.app,
|
|
107
|
+
tenantId: appkitOptions.tenant(),
|
|
108
|
+
userId: props.userId,
|
|
109
|
+
deviceType: props.deviceType,
|
|
110
|
+
readOrderStatus: '1',
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (state.tab == '业务消息') {
|
|
114
|
+
data['msgType'] = '1'
|
|
115
|
+
} else if (state.tab == '系统公告') {
|
|
116
|
+
data['msgType'] = '3'
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (state.tab == '未读') {
|
|
120
|
+
data['isRead'] = '0'
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const ep = endpoints['消息列表']
|
|
124
|
+
return $http.post<WithPaging<any[]>>(ep, data).then((res) => {
|
|
125
|
+
显示骨架屏.value = false
|
|
126
|
+
if (page === 1) {
|
|
127
|
+
state.list = []
|
|
128
|
+
}
|
|
129
|
+
state.list = [...state.list, ...res.data]
|
|
130
|
+
return { paging: res.paging, data: res.data }
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const { paging, nextPage } = usePaging(load)
|
|
135
|
+
|
|
136
|
+
function onTabChange() {
|
|
137
|
+
显示骨架屏.value = true
|
|
138
|
+
nextPage(1)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const isRefresh = ref(false)
|
|
142
|
+
async function onRefresh() {
|
|
143
|
+
isRefresh.value = true
|
|
144
|
+
await nextPage(1)
|
|
145
|
+
isRefresh.value = false
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function itemClick(item: any) {
|
|
149
|
+
read(item)
|
|
150
|
+
|
|
151
|
+
emits('itemClick', item)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function read(item: any) {
|
|
155
|
+
if (item.isRead == '1') return
|
|
156
|
+
const ep = endpoints['已读']
|
|
157
|
+
$http.post(ep, [item.id]).then(() => {
|
|
158
|
+
item['已读'] = true
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async function readAll() {
|
|
163
|
+
try {
|
|
164
|
+
Taro.showLoading({
|
|
165
|
+
title: '请稍后...',
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
const appkitOptions = useAppKitOptions()
|
|
169
|
+
const ep = endpoints['全部已读']
|
|
170
|
+
const data = {
|
|
171
|
+
tenantId: appkitOptions.tenant(),
|
|
172
|
+
userId: props.userId,
|
|
173
|
+
deviceType: props.deviceType,
|
|
174
|
+
}
|
|
175
|
+
$http.post(ep, data).then(() => {
|
|
176
|
+
state.list.forEach((item) => {
|
|
177
|
+
item['已读'] = true
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
} finally {
|
|
181
|
+
Taro.hideLoading()
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const emits = defineEmits(['itemClick'])
|
|
186
|
+
|
|
187
|
+
defineExpose({
|
|
188
|
+
readAll,
|
|
189
|
+
})
|
|
190
|
+
</script>
|
|
191
|
+
|
|
192
|
+
<style lang="scss">
|
|
193
|
+
.news-list {
|
|
194
|
+
.safe-area-space {
|
|
195
|
+
padding-bottom: calc(var(--bottom) + 60px);
|
|
196
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + 60px);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.tabContainer {
|
|
200
|
+
.read-all {
|
|
201
|
+
width: 100%;
|
|
202
|
+
text-align: end;
|
|
203
|
+
height: 22px;
|
|
204
|
+
line-height: 22px;
|
|
205
|
+
padding: 5px 0;
|
|
206
|
+
background-color: var(--fill, var(--ns-background));
|
|
207
|
+
|
|
208
|
+
.btn {
|
|
209
|
+
color: #017fff;
|
|
210
|
+
font-size: 14px;
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
margin-right: 16px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.news-item {
|
|
218
|
+
&-title {
|
|
219
|
+
font-size: 16px;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
display: flex;
|
|
222
|
+
flex-direction: row;
|
|
223
|
+
align-items: center;
|
|
224
|
+
|
|
225
|
+
&-icon {
|
|
226
|
+
width: 20px;
|
|
227
|
+
height: 20px;
|
|
228
|
+
margin-right: 4px;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&-content {
|
|
233
|
+
font-size: 14px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&-time {
|
|
237
|
+
font-size: 13px;
|
|
238
|
+
color: #35353566;
|
|
239
|
+
text-align: end;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
</style>
|
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nut-popup pop-class="notice-popup" :close-on-click-overlay="false" v-model:visible="showPopup" round>
|
|
3
|
-
<div class="notice-popup-hd">
|
|
4
|
-
<img class="notice-popup-hd-icon" src="https://cdn.ddjf.com/static/images/customer-center/system-notice-1.png"
|
|
5
|
-
alt="" />系统公告
|
|
6
|
-
</div>
|
|
7
|
-
<div class="notice-popup-bd">
|
|
8
|
-
<div style="white-space: pre-wrap">{{ message.context.replace('【系统公告】 ', '') }}</div>
|
|
9
|
-
<div v-if="message.jumpUrl || message.link" class="notice-popup-bd-link" @click="toViewAttachment">
|
|
10
|
-
点击查看附件
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="notice-popup-ft">
|
|
14
|
-
<div class="notice-popup-ft-btn" @click="onClose">我知道了</div>
|
|
15
|
-
</div>
|
|
16
|
-
</nut-popup>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script lang="ts" setup>
|
|
20
|
-
import { onMounted, ref } from 'vue'
|
|
21
|
-
import { useHttp } from '../api'
|
|
22
|
-
|
|
23
|
-
const props = withDefaults(
|
|
24
|
-
defineProps<{
|
|
25
|
-
message: any
|
|
26
|
-
device?: string
|
|
27
|
-
}>(),
|
|
28
|
-
{
|
|
29
|
-
message: {},
|
|
30
|
-
device: 'MINI',
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
const showPopup = ref(true)
|
|
35
|
-
|
|
36
|
-
onMounted(() => { })
|
|
37
|
-
|
|
38
|
-
// 关闭
|
|
39
|
-
function onCancel() {
|
|
40
|
-
showPopup.value = false
|
|
41
|
-
|
|
42
|
-
emits('close')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 查看附件
|
|
46
|
-
function toViewAttachment() {
|
|
47
|
-
onClose()
|
|
48
|
-
|
|
49
|
-
emits('view', props.message.jumpUrl || props.message.link)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// 关闭弹框
|
|
53
|
-
async function onClose() {
|
|
54
|
-
const $http = useHttp()
|
|
55
|
-
|
|
56
|
-
$http
|
|
57
|
-
.post('/cas/msg/setMsgStatus', {
|
|
58
|
-
device: props.device || 'MINI',
|
|
59
|
-
noticeStatus: 0,
|
|
60
|
-
receiveId: props.message.id,
|
|
61
|
-
})
|
|
62
|
-
.then(() => {
|
|
63
|
-
// if (props.message.isRead === 0) {
|
|
64
|
-
// toReadFun([props.message.id])
|
|
65
|
-
// }
|
|
66
|
-
onCancel()
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const emits = defineEmits(['close', 'view'])
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<style lang="scss">
|
|
74
|
-
.notice-popup {
|
|
75
|
-
width: 280px;
|
|
76
|
-
padding: 20px 15px;
|
|
77
|
-
border-radius: 10px !important;
|
|
78
|
-
background: linear-gradient(136.72deg, #d0fdfe 6.02%, #a2b9ff 59.97%, #6593ff 108.78%);
|
|
79
|
-
|
|
80
|
-
&::after {
|
|
81
|
-
content: '';
|
|
82
|
-
position: absolute;
|
|
83
|
-
width: 100%;
|
|
84
|
-
height: 100%;
|
|
85
|
-
left: 0;
|
|
86
|
-
top: 0;
|
|
87
|
-
background: linear-gradient(360deg, #ffffff 4.73%, rgba(255, 255, 255, 0) 85.82%);
|
|
88
|
-
z-index: 1;
|
|
89
|
-
border-radius: 10px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&::before {
|
|
93
|
-
content: '';
|
|
94
|
-
width: 236px;
|
|
95
|
-
height: 241px;
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: 0;
|
|
98
|
-
right: 40px;
|
|
99
|
-
background: url('https://cdn.ddjf.com/static/images/customer-center/notice-modal-bg.png');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.nutui-popup__content-wrapper {
|
|
103
|
-
position: relative;
|
|
104
|
-
z-index: 2;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&-hd {
|
|
108
|
-
color: #0a2668;
|
|
109
|
-
font-size: 17px;
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
margin-bottom: 20px;
|
|
113
|
-
font-weight: 600;
|
|
114
|
-
|
|
115
|
-
&-icon {
|
|
116
|
-
width: 20px;
|
|
117
|
-
height: 20px;
|
|
118
|
-
margin-right: 4px;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&-bd {
|
|
123
|
-
position: relative;
|
|
124
|
-
z-index: 10;
|
|
125
|
-
color: #353535;
|
|
126
|
-
box-shadow: 0px 2px 8px 0px #ffffff33 inset, 0px 1px 1px 0px #ffffff80 inset,
|
|
127
|
-
0px 0px 1px 0px #ffffffb2;
|
|
128
|
-
border-radius: 3px;
|
|
129
|
-
background: rgba(255, 255, 255, 0.6);
|
|
130
|
-
min-height: 160px;
|
|
131
|
-
margin-bottom: 20px;
|
|
132
|
-
padding: 15px 10px;
|
|
133
|
-
box-sizing: border-box;
|
|
134
|
-
font-size: 10px;
|
|
135
|
-
|
|
136
|
-
&-link {
|
|
137
|
-
color: #007fff;
|
|
138
|
-
margin-top: 2px;
|
|
139
|
-
font-weight: 600;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&-ft {
|
|
144
|
-
position: relative;
|
|
145
|
-
z-index: 10;
|
|
146
|
-
display: flex;
|
|
147
|
-
align-items: center;
|
|
148
|
-
justify-content: center;
|
|
149
|
-
|
|
150
|
-
&-btn {
|
|
151
|
-
background: #007fff;
|
|
152
|
-
color: #fff;
|
|
153
|
-
width: 128px;
|
|
154
|
-
height: 30px;
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
justify-content: center;
|
|
158
|
-
border-radius: 15px;
|
|
159
|
-
z-index: 10;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<nut-popup pop-class="notice-popup" :close-on-click-overlay="false" v-model:visible="showPopup" round>
|
|
3
|
+
<div class="notice-popup-hd">
|
|
4
|
+
<img class="notice-popup-hd-icon" src="https://cdn.ddjf.com/static/images/customer-center/system-notice-1.png"
|
|
5
|
+
alt="" />系统公告
|
|
6
|
+
</div>
|
|
7
|
+
<div class="notice-popup-bd">
|
|
8
|
+
<div style="white-space: pre-wrap">{{ message.context.replace('【系统公告】 ', '') }}</div>
|
|
9
|
+
<div v-if="message.jumpUrl || message.link" class="notice-popup-bd-link" @click="toViewAttachment">
|
|
10
|
+
点击查看附件
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="notice-popup-ft">
|
|
14
|
+
<div class="notice-popup-ft-btn" @click="onClose">我知道了</div>
|
|
15
|
+
</div>
|
|
16
|
+
</nut-popup>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { onMounted, ref } from 'vue'
|
|
21
|
+
import { useHttp } from '../api'
|
|
22
|
+
|
|
23
|
+
const props = withDefaults(
|
|
24
|
+
defineProps<{
|
|
25
|
+
message: any
|
|
26
|
+
device?: string
|
|
27
|
+
}>(),
|
|
28
|
+
{
|
|
29
|
+
message: {},
|
|
30
|
+
device: 'MINI',
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const showPopup = ref(true)
|
|
35
|
+
|
|
36
|
+
onMounted(() => { })
|
|
37
|
+
|
|
38
|
+
// 关闭
|
|
39
|
+
function onCancel() {
|
|
40
|
+
showPopup.value = false
|
|
41
|
+
|
|
42
|
+
emits('close')
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 查看附件
|
|
46
|
+
function toViewAttachment() {
|
|
47
|
+
onClose()
|
|
48
|
+
|
|
49
|
+
emits('view', props.message.jumpUrl || props.message.link)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 关闭弹框
|
|
53
|
+
async function onClose() {
|
|
54
|
+
const $http = useHttp()
|
|
55
|
+
|
|
56
|
+
$http
|
|
57
|
+
.post('/cas/msg/setMsgStatus', {
|
|
58
|
+
device: props.device || 'MINI',
|
|
59
|
+
noticeStatus: 0,
|
|
60
|
+
receiveId: props.message.id,
|
|
61
|
+
})
|
|
62
|
+
.then(() => {
|
|
63
|
+
// if (props.message.isRead === 0) {
|
|
64
|
+
// toReadFun([props.message.id])
|
|
65
|
+
// }
|
|
66
|
+
onCancel()
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const emits = defineEmits(['close', 'view'])
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style lang="scss">
|
|
74
|
+
.notice-popup {
|
|
75
|
+
width: 280px;
|
|
76
|
+
padding: 20px 15px;
|
|
77
|
+
border-radius: 10px !important;
|
|
78
|
+
background: linear-gradient(136.72deg, #d0fdfe 6.02%, #a2b9ff 59.97%, #6593ff 108.78%);
|
|
79
|
+
|
|
80
|
+
&::after {
|
|
81
|
+
content: '';
|
|
82
|
+
position: absolute;
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
left: 0;
|
|
86
|
+
top: 0;
|
|
87
|
+
background: linear-gradient(360deg, #ffffff 4.73%, rgba(255, 255, 255, 0) 85.82%);
|
|
88
|
+
z-index: 1;
|
|
89
|
+
border-radius: 10px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&::before {
|
|
93
|
+
content: '';
|
|
94
|
+
width: 236px;
|
|
95
|
+
height: 241px;
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: 0;
|
|
98
|
+
right: 40px;
|
|
99
|
+
background: url('https://cdn.ddjf.com/static/images/customer-center/notice-modal-bg.png');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.nutui-popup__content-wrapper {
|
|
103
|
+
position: relative;
|
|
104
|
+
z-index: 2;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&-hd {
|
|
108
|
+
color: #0a2668;
|
|
109
|
+
font-size: 17px;
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
margin-bottom: 20px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
|
|
115
|
+
&-icon {
|
|
116
|
+
width: 20px;
|
|
117
|
+
height: 20px;
|
|
118
|
+
margin-right: 4px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&-bd {
|
|
123
|
+
position: relative;
|
|
124
|
+
z-index: 10;
|
|
125
|
+
color: #353535;
|
|
126
|
+
box-shadow: 0px 2px 8px 0px #ffffff33 inset, 0px 1px 1px 0px #ffffff80 inset,
|
|
127
|
+
0px 0px 1px 0px #ffffffb2;
|
|
128
|
+
border-radius: 3px;
|
|
129
|
+
background: rgba(255, 255, 255, 0.6);
|
|
130
|
+
min-height: 160px;
|
|
131
|
+
margin-bottom: 20px;
|
|
132
|
+
padding: 15px 10px;
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
font-size: 10px;
|
|
135
|
+
|
|
136
|
+
&-link {
|
|
137
|
+
color: #007fff;
|
|
138
|
+
margin-top: 2px;
|
|
139
|
+
font-weight: 600;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&-ft {
|
|
144
|
+
position: relative;
|
|
145
|
+
z-index: 10;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
|
|
150
|
+
&-btn {
|
|
151
|
+
background: #007fff;
|
|
152
|
+
color: #fff;
|
|
153
|
+
width: 128px;
|
|
154
|
+
height: 30px;
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
justify-content: center;
|
|
158
|
+
border-radius: 15px;
|
|
159
|
+
z-index: 10;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import NoticeBanner from './NoticeBanner.vue'
|
|
2
|
-
import NoticeEntry from './NoticeEntry.vue'
|
|
3
|
-
import NoticeList from './NoticeList.vue'
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import NoticeBanner from './NoticeBanner.vue'
|
|
2
|
+
import NoticeEntry from './NoticeEntry.vue'
|
|
3
|
+
import NoticeList from './NoticeList.vue'
|
|
4
|
+
import NoticeList2 from './NoticeList2.vue'
|
|
5
|
+
|
|
6
|
+
export { NoticeBanner, NoticeEntry, NoticeList, NoticeList2 }
|