xsh_1997 пре 1 недеља
родитељ
комит
c7e1582e0c

+ 1 - 1
ruoyi-ui/src/views/agri/seller/finance/payAccount/index.vue

@@ -120,7 +120,7 @@ export default {
120 120
       form: {},
121 121
       accountTypeOptions: [
122 122
         { value: "1", label: "银行卡" },
123
-        { value: "2", label: "支付宝" },
123
+        // { value: "2", label: "支付宝" },
124 124
         { value: "3", label: "微信" }
125 125
       ],
126 126
       rules: {

+ 9 - 0
shop-app/api/mallConfig.js

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+/** C 端商城公共配置(Anonymous) */
4
+export function getMallConfig() {
5
+  return request({
6
+    url: '/api/mall/config',
7
+    method: 'GET'
8
+  })
9
+}

+ 6 - 0
shop-app/pages.json

@@ -115,6 +115,12 @@
115 115
 					"style": {
116 116
 						"navigationBarTitleText": "消息详情"
117 117
 					}
118
+				},
119
+				{
120
+					"path": "about-mall",
121
+					"style": {
122
+						"navigationBarTitleText": "关于商城"
123
+					}
118 124
 				}
119 125
 			]
120 126
 		},

+ 7 - 1
shop-app/pages/mine/index.vue

@@ -98,7 +98,9 @@ import {
98 98
   PAGE_ENTRY_APPLY,
99 99
   PAGE_ENTRY_LIST,
100 100
   PAGE_SHOP_FOLLOW_LIST,
101
-  PAGE_MESSAGE_LIST
101
+  PAGE_MESSAGE_LIST,
102
+  PAGE_MESSAGE_DETAIL,
103
+  PAGE_ABOUT_MALL
102 104
 } from '@/utils/pageRoute'
103 105
 
104 106
 const loggedIn = ref(false)
@@ -156,6 +158,10 @@ const menuSections = [
156 158
       { label: '我要入驻', path: PAGE_ENTRY_APPLY, icon: 'home' },
157 159
       { label: '我的入驻申请', path: PAGE_ENTRY_LIST, icon: 'list' }
158 160
     ]
161
+  },
162
+  {
163
+    title: '关于',
164
+    items: [{ label: '关于商城', path: PAGE_ABOUT_MALL, icon: 'info-circle' }]
159 165
   }
160 166
 ]
161 167
 

+ 243 - 0
shop-app/subpackage/account/about-mall.vue

@@ -0,0 +1,243 @@
1
+<template>
2
+	<view class="about-mall-page">
3
+		<view v-if="pageLoading" class="about-mall-state">
4
+			<u-loading-icon mode="circle" />
5
+		</view>
6
+
7
+		<view v-else-if="pageError" class="about-mall-state">
8
+			<u-empty mode="page" :text="pageError" icon-size="80" />
9
+			<u-button type="primary" text="重试" size="small" custom-style="margin-top:24rpx" @click="loadConfig" />
10
+		</view>
11
+
12
+		<scroll-view v-else class="about-mall-scroll" scroll-y>
13
+			<view class="about-hero">
14
+				<image class="about-hero__logo" src="/static/logo.png" mode="aspectFit" />
15
+				<text class="about-hero__name">巴青农资商城</text>
16
+				<text class="about-hero__desc">专注农资供应,服务广大农户与经销商</text>
17
+			</view>
18
+
19
+			<view class="about-card">
20
+				<text class="about-card__title">商城信息</text>
21
+				<view class="about-row">
22
+					<text class="about-row__label">货币符号</text>
23
+					<text class="about-row__val">{{ about.currencySymbol }}</text>
24
+				</view>
25
+				<view class="about-row">
26
+					<text class="about-row__label">商品销量展示</text>
27
+					<text class="about-row__val">{{ about.showSales ? '展示' : '不展示' }}</text>
28
+				</view>
29
+			</view>
30
+
31
+			<view v-if="about.hasFiling" class="about-card">
32
+				<text class="about-card__title">备案信息</text>
33
+				<view
34
+					v-for="item in about.filings"
35
+					:key="item.key"
36
+					class="about-filing"
37
+					@click="onFilingClick(item)"
38
+				>
39
+					<text class="about-filing__label">{{ item.label }}</text>
40
+					<view class="about-filing__link">
41
+						<text class="about-filing__no">{{ item.no }}</text>
42
+						<u-icon name="arrow-right" color="#2e7d32" size="14" />
43
+					</view>
44
+				</view>
45
+				<text class="about-card__tip">点击备案号可在浏览器查看主管机关公示页</text>
46
+			</view>
47
+
48
+			<view v-else class="about-card about-card--empty">
49
+				<text class="about-card__title">备案信息</text>
50
+				<text class="about-empty-text">暂无备案信息</text>
51
+			</view>
52
+
53
+			<view class="about-footer">
54
+				<text class="about-footer__text">© 巴青农资商城</text>
55
+			</view>
56
+		</scroll-view>
57
+	</view>
58
+</template>
59
+
60
+<script setup>
61
+import { ref, reactive } from 'vue'
62
+import { onShow } from '@dcloudio/uni-app'
63
+import { getMallConfig } from '@/api/mallConfig'
64
+import { mapMallAboutPage, openExternalLink } from '@/utils/mallConfigDisplay'
65
+
66
+const pageLoading = ref(true)
67
+const pageError = ref('')
68
+const about = reactive({
69
+	currencySymbol: '¥',
70
+	showSales: true,
71
+	filings: [],
72
+	hasFiling: false
73
+})
74
+
75
+async function loadConfig() {
76
+	pageLoading.value = true
77
+	pageError.value = ''
78
+	try {
79
+		const res = await getMallConfig()
80
+		const mapped = mapMallAboutPage(res.data)
81
+		about.currencySymbol = mapped.currencySymbol
82
+		about.showSales = mapped.showSales
83
+		about.filings = mapped.filings
84
+		about.hasFiling = mapped.hasFiling
85
+	} catch (e) {
86
+		pageError.value = (e && e.message) || '加载失败'
87
+	} finally {
88
+		pageLoading.value = false
89
+	}
90
+}
91
+
92
+function onFilingClick(item) {
93
+	if (!item || !item.link) return
94
+	openExternalLink(item.link)
95
+}
96
+
97
+onShow(() => {
98
+	loadConfig()
99
+})
100
+</script>
101
+
102
+<style lang="scss" scoped>
103
+.about-mall-page {
104
+	min-height: 100vh;
105
+	background: #f5f6f8;
106
+}
107
+
108
+.about-mall-state {
109
+	display: flex;
110
+	flex-direction: column;
111
+	align-items: center;
112
+	justify-content: center;
113
+	min-height: 60vh;
114
+	padding: 48rpx;
115
+}
116
+
117
+.about-mall-scroll {
118
+	height: 100vh;
119
+	box-sizing: border-box;
120
+}
121
+
122
+.about-hero {
123
+	display: flex;
124
+	flex-direction: column;
125
+	align-items: center;
126
+	padding: 64rpx 32rpx 40rpx;
127
+	background: linear-gradient(145deg, #3d9b6e 0%, #22c55e 55%, #86efac 100%);
128
+}
129
+
130
+.about-hero__logo {
131
+	width: 120rpx;
132
+	height: 120rpx;
133
+	border-radius: 24rpx;
134
+	background: rgba(255, 255, 255, 0.9);
135
+}
136
+
137
+.about-hero__name {
138
+	margin-top: 24rpx;
139
+	font-size: 36rpx;
140
+	font-weight: 600;
141
+	color: #fff;
142
+}
143
+
144
+.about-hero__desc {
145
+	margin-top: 12rpx;
146
+	font-size: 26rpx;
147
+	color: rgba(255, 255, 255, 0.9);
148
+	text-align: center;
149
+}
150
+
151
+.about-card {
152
+	margin: 24rpx 24rpx 0;
153
+	padding: 28rpx 28rpx 20rpx;
154
+	background: #fff;
155
+	border-radius: 16rpx;
156
+}
157
+
158
+.about-card--empty {
159
+	padding-bottom: 28rpx;
160
+}
161
+
162
+.about-card__title {
163
+	display: block;
164
+	margin-bottom: 20rpx;
165
+	font-size: 30rpx;
166
+	font-weight: 600;
167
+	color: #333;
168
+}
169
+
170
+.about-card__tip {
171
+	display: block;
172
+	margin-top: 16rpx;
173
+	font-size: 22rpx;
174
+	color: #999;
175
+	line-height: 1.5;
176
+}
177
+
178
+.about-row {
179
+	display: flex;
180
+	align-items: center;
181
+	justify-content: space-between;
182
+	padding: 20rpx 0;
183
+	border-bottom: 1rpx solid #f0f0f0;
184
+}
185
+
186
+.about-row:last-child {
187
+	border-bottom: none;
188
+}
189
+
190
+.about-row__label {
191
+	font-size: 28rpx;
192
+	color: #666;
193
+}
194
+
195
+.about-row__val {
196
+	font-size: 28rpx;
197
+	color: #333;
198
+}
199
+
200
+.about-filing {
201
+	padding: 20rpx 0;
202
+	border-bottom: 1rpx solid #f0f0f0;
203
+}
204
+
205
+.about-filing:last-of-type {
206
+	border-bottom: none;
207
+}
208
+
209
+.about-filing__label {
210
+	display: block;
211
+	font-size: 26rpx;
212
+	color: #999;
213
+	margin-bottom: 8rpx;
214
+}
215
+
216
+.about-filing__link {
217
+	display: flex;
218
+	align-items: center;
219
+	justify-content: space-between;
220
+}
221
+
222
+.about-filing__no {
223
+	flex: 1;
224
+	font-size: 28rpx;
225
+	color: #2e7d32;
226
+	word-break: break-all;
227
+}
228
+
229
+.about-empty-text {
230
+	font-size: 28rpx;
231
+	color: #999;
232
+}
233
+
234
+.about-footer {
235
+	padding: 48rpx 32rpx 64rpx;
236
+	text-align: center;
237
+}
238
+
239
+.about-footer__text {
240
+	font-size: 24rpx;
241
+	color: #bbb;
242
+}
243
+</style>

+ 49 - 0
shop-app/utils/mallConfigDisplay.js

@@ -0,0 +1,49 @@
1
+/**
2
+ * C 端商城配置 → 关于页展示模型
3
+ * 数据来源:GET /api/mall/config(MallConfigAppVO)
4
+ */
5
+export function mapMallAboutPage(data) {
6
+  const raw = data || {}
7
+  const filings = []
8
+  if (raw.icpNo && raw.icpLink) {
9
+    filings.push({
10
+      key: 'icp',
11
+      label: 'ICP 备案',
12
+      no: raw.icpNo,
13
+      link: raw.icpLink
14
+    })
15
+  }
16
+  if (raw.psbNo && raw.psbLink) {
17
+    filings.push({
18
+      key: 'psb',
19
+      label: '公安备案',
20
+      no: raw.psbNo,
21
+      link: raw.psbLink
22
+    })
23
+  }
24
+  return {
25
+    currencySymbol: raw.currencySymbol || '¥',
26
+    showSales: raw.showSales === true,
27
+    filings,
28
+    hasFiling: filings.length > 0
29
+  }
30
+}
31
+
32
+/** 打开备案外链(H5 / App / 小程序降级复制) */
33
+export function openExternalLink(url) {
34
+  if (!url) return
35
+  // #ifdef H5
36
+  window.open(url, '_blank')
37
+  // #endif
38
+  // #ifdef APP-PLUS
39
+  plus.runtime.openURL(url)
40
+  // #endif
41
+  // #ifdef MP
42
+  uni.setClipboardData({
43
+    data: url,
44
+    success: () => {
45
+      uni.showToast({ title: '链接已复制,请在浏览器打开', icon: 'none' })
46
+    }
47
+  })
48
+  // #endif
49
+}

+ 2 - 0
shop-app/utils/pageRoute.js

@@ -42,6 +42,8 @@ export const PAGE_SHOP_FOLLOW_LIST = '/subpackage/account/shop-follow-list'
42 42
 export const PAGE_MESSAGE_LIST = '/subpackage/account/message-list'
43 43
 /** 站内消息详情 */
44 44
 export const PAGE_MESSAGE_DETAIL = '/subpackage/account/message-detail'
45
+/** 关于商城 */
46
+export const PAGE_ABOUT_MALL = '/subpackage/account/about-mall'
45 47
 
46 48
 // —— 分包:分类 ——
47 49