Browse Source

first submit

wangxx 4 months ago
parent
commit
0c5148f679
12 changed files with 781 additions and 0 deletions
  1. 16 0
      src/.gitignore
  2. 42 0
      src/App.vue
  3. 21 0
      src/LICENSE
  4. 51 0
      src/README.md
  5. 30 0
      src/config.js
  6. 23 0
      src/main.js
  7. 71 0
      src/manifest.json
  8. 16 0
      src/package.json
  9. 330 0
      src/pages.json
  10. 39 0
      src/permission.js
  11. 138 0
      src/uni.scss
  12. 4 0
      src/vue.config.js

+ 16 - 0
src/.gitignore

@@ -0,0 +1,16 @@
1
+######################################################################
2
+# Build Tools
3
+
4
+/unpackage/*
5
+/node_modules/*
6
+
7
+######################################################################
8
+# Development Tools
9
+
10
+/.idea/*
11
+/.vscode/*
12
+/.hbuilderx/*
13
+
14
+package-lock.json
15
+yarn.lock
16
+

+ 42 - 0
src/App.vue

@@ -0,0 +1,42 @@
1
+<script>
2
+import config from './config'
3
+import { getToken } from '@/utils/auth'
4
+import { showMessageTabRedDot } from "@/utils/common.js"
5
+export default {
6
+  onLaunch: function () {
7
+    this.initApp()
8
+    // 在应用启动时为消息tab显示红点
9
+    showMessageTabRedDot()
10
+  },
11
+  methods: {
12
+    // 初始化应用
13
+    initApp() {
14
+      // 初始化应用配置
15
+      this.initConfig()
16
+      // 检查用户登录状态
17
+      //#ifdef H5
18
+      this.checkLogin()
19
+      //#endif
20
+    },
21
+    initConfig() {
22
+      this.globalData.config = config
23
+    },
24
+    checkLogin() {
25
+      if (!getToken()) {
26
+        this.$tab.reLaunch('/pages/login')
27
+      }
28
+    },
29
+  }
30
+}
31
+</script>
32
+
33
+<style lang="scss">
34
+@import "uview-ui/index.scss";
35
+@import '@/static/scss/index.scss';
36
+
37
+uni-page-body {
38
+  height: 100%;
39
+  margin-bottom: 0 !important;
40
+  padding-bottom: 0 !important;
41
+}
42
+</style>

+ 21 - 0
src/LICENSE

@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2022 若依
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 51 - 0
src/README.md

@@ -0,0 +1,51 @@
1
+<p align="center">
2
+	<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-43e3941654fa3054c9684bf53d1b1d356a1.png">
3
+</p>
4
+<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v1.2.0</h1>
5
+<h4 align="center">基于UniApp开发的轻量级移动端框架</h4>
6
+<p align="center">
7
+	<a href="https://gitee.com/y_project/RuoYi-App/stargazers"><img src="https://gitee.com/y_project/RuoYi-App/badge/star.svg?theme=dark"></a>
8
+	<a href="https://gitee.com/y_project/RuoYi-App"><img src="https://img.shields.io/badge/RuoYi-v1.2.0-brightgreen.svg"></a>
9
+	<a href="https://gitee.com/y_project/RuoYi-App/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
10
+</p>
11
+
12
+## 平台简介
13
+
14
+RuoYi App 移动解决方案,采用uniapp框架,一份代码多终端适配,同时支持APP、小程序、H5!实现了与[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)、[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)完美对接的移动解决方案!目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
15
+
16
+* 配套后端代码仓库地址[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) 或 [RuoYi-Cloud](https://github.com/yangzongzhuan/RuoYi-Cloud) 版本。
17
+* 应用框架基于[uniapp](https://uniapp.dcloud.net.cn/),支持小程序、H5、Android和IOS。
18
+* 前端组件采用[uni-ui](https://github.com/dcloudio/uni-ui),全端兼容的高性能UI框架。
19
+* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp;
20
+
21
+
22
+## 技术文档
23
+
24
+- 官网网站:[http://ruoyi.vip](http://ruoyi.vip)
25
+- 文档地址:[http://doc.ruoyi.vip](http://doc.ruoyi.vip)
26
+- H5页体验:[http://h5.ruoyi.vip](http://h5.ruoyi.vip)
27
+- QQ交流群: ①133713780(满)、②146013835(满)、③189091635
28
+- 小程序体验
29
+
30
+<img src="https://oscimg.oschina.net/oscnet/up-26c76dc90b92acdbd9ac8cd5252f07c8ad9.jpg" alt="小程序演示"/>
31
+ 
32
+
33
+## 演示图
34
+
35
+<table>
36
+    <tr>
37
+        <td><img src="https://oscimg.oschina.net/oscnet/up-21f6f842fdc94540469b4eb43fdadbaf7f8.png"/></td>
38
+        <td><img src="https://oscimg.oschina.net/oscnet/up-a6f23cf9a371a30165e135eff6d9ae89a9d.png"/></td>
39
+		<td><img src="https://oscimg.oschina.net/oscnet/up-ff5f62016bf6624c1ff27eee57499dccd44.png"/></td>
40
+    </tr>
41
+	<tr>
42
+        <td><img src="https://oscimg.oschina.net/oscnet/up-b9a582fdb26ec69d407fabd044d2c8494df.png"/></td>
43
+        <td><img src="https://oscimg.oschina.net/oscnet/up-96427ee08fca29d77934cfc8d1b1a637cef.png"/></td>
44
+		<td><img src="https://oscimg.oschina.net/oscnet/up-5fdadc582d24cccd7727030d397b63185a3.png"/></td>
45
+    </tr>
46
+	<tr>
47
+        <td><img src="https://oscimg.oschina.net/oscnet/up-0a36797b6bcc50c36d40c3c782665b89efc.png"/></td>
48
+        <td><img src="https://oscimg.oschina.net/oscnet/up-d77995cc00687cedd00d5ac7d68a07ea276.png"/></td>
49
+		<td><img src="https://oscimg.oschina.net/oscnet/up-fa8f5ab20becf59b4b38c1b92a9989e7109.png"/></td>
50
+    </tr>
51
+</table>

+ 30 - 0
src/config.js

@@ -0,0 +1,30 @@
1
+// 应用全局配置
2
+module.exports = {
3
+   // 接口地址  本地调试使用 http://192.168.3.222:38080  打包使用 /prod-api
4
+  //  baseUrl: process.env.NODE_ENV === 'development' ? 'http://192.168.3.221:82/prod-api' : '/prod-api', //生产
5
+  //  baseUrl: process.env.NODE_ENV === 'development' ? 'http://192.168.3.221:8080' : '/prod-api',
6
+// baseUrl: process.env.NODE_ENV === 'development' ? 'http://guangxi.qinghe.sundot.cn:8088' : 'http://guangxi.qinghe.sundot.cn:8088/prod-api',
7
+   baseUrl: 'http://guangxi.qinghe.sundot.cn:8088',
8
+
9
+  // 应用信息
10
+  appInfo: {
11
+    // 应用名称
12
+    name: "airport-app",
13
+    // 应用版本
14
+    version: "1.2.0",
15
+    // 应用logo
16
+    logo: "/static/logo.png",
17
+    // 官方网站
18
+    site_url: "http://ruoyi.vip",
19
+    // 政策协议
20
+    agreements: [{
21
+        title: "隐私政策",
22
+        url: "https://ruoyi.vip/protocol.html"
23
+      },
24
+      {
25
+        title: "用户服务协议",
26
+        url: "https://ruoyi.vip/protocol.html"
27
+      }
28
+    ]
29
+  }
30
+}

+ 23 - 0
src/main.js

@@ -0,0 +1,23 @@
1
+import Vue from 'vue'
2
+import App from './App'
3
+import store from './store' // store
4
+import plugins from './plugins' // plugins
5
+import './permission' // permission
6
+import { getDicts } from "@/api/system/dict/data"
7
+import uView from "uview-ui";
8
+
9
+Vue.use(uView);
10
+Vue.use(plugins)
11
+
12
+Vue.config.productionTip = false
13
+Vue.prototype.$store = store
14
+Vue.prototype.getDicts = getDicts
15
+
16
+App.mpType = 'app'
17
+//为了兼容echarts在移动端的点击事件
18
+window.wx={}
19
+const app = new Vue({
20
+  ...App
21
+})
22
+
23
+app.$mount()

+ 71 - 0
src/manifest.json

@@ -0,0 +1,71 @@
1
+{
2
+    "name" : "安检分级质控系统移动端",
3
+    "appid" : "__UNI__25A9D80",
4
+    "description" : "",
5
+    "versionName" : "1.2.0",
6
+    "versionCode" : "100",
7
+    "transformPx" : false,
8
+    "app-plus" : {
9
+        "usingComponents" : true,
10
+        "nvueCompiler" : "uni-app",
11
+        "splashscreen" : {
12
+            "alwaysShowBeforeRender" : true,
13
+            "waiting" : true,
14
+            "autoclose" : true,
15
+            "delay" : 0
16
+        },
17
+        "modules" : {},
18
+        "distribute" : {
19
+            "android" : {
20
+                "permissions" : [
21
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
22
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
23
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
24
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
25
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
26
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
27
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
28
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
29
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
30
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
31
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
32
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
33
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
34
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
35
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
36
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
37
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
38
+                ]
39
+            },
40
+            "ios" : {},
41
+            "sdkConfigs" : {}
42
+        }
43
+    },
44
+    "quickapp" : {},
45
+    "mp-weixin" : {
46
+        "appid" : "wxccd7e2a0911b3397",
47
+        "setting" : {
48
+            "urlCheck" : false,
49
+            "es6" : false,
50
+            "minified" : true,
51
+            "postcss" : true
52
+        },
53
+        "optimization" : {
54
+            "subPackages" : true
55
+        },
56
+        "usingComponents" : true
57
+    },
58
+    "vueVersion" : "2",
59
+    "h5" : {
60
+        "template" : "static/index.html",
61
+        "devServer" : {
62
+            "port" : 9090,
63
+            "https" : false
64
+        },
65
+        "title" : "Airport-App",
66
+        "router" : {
67
+            "mode" : "hash",
68
+            "base" : "./"
69
+        }
70
+    }
71
+}

+ 16 - 0
src/package.json

@@ -0,0 +1,16 @@
1
+{
2
+    "id": "text-li-switch",
3
+    "name": "switch文字开关,v-model绑定状态,支持参数改变文字样式",
4
+    "displayName": "switch文字开关,v-model绑定状态,支持参数改变文字样式",
5
+    "version": "1.0.2",
6
+    "description": "switch文字开关,v-model绑定状态,支持参数改变文字样式",
7
+    "keywords": [
8
+        "switch文字开关,v-model绑定状态,支持参数改变文字样式"
9
+    ],
10
+    "dcloudext": {
11
+        "category": [
12
+            "前端组件",
13
+            "通用组件"
14
+        ]
15
+    }
16
+}

+ 330 - 0
src/pages.json

@@ -0,0 +1,330 @@
1
+{
2
+  "pages": [
3
+    {
4
+      "path": "pages/login",
5
+      "style": {
6
+        "navigationBarTitleText": "登录"
7
+      }
8
+    },
9
+    {
10
+      "path": "pages/eikonStatistics/index",
11
+      "style": {
12
+        "navigationBarTitleText": "组织画像"
13
+      }
14
+    },
15
+    {
16
+      "path": "pages/register",
17
+      "style": {
18
+        "navigationBarTitleText": "注册"
19
+      }
20
+    },
21
+    {
22
+      "path": "pages/home/index",
23
+      "style": {
24
+        "navigationBarTitleText": "安检分级质控系统移动端",
25
+        "navigationStyle": "custom"
26
+      }
27
+    },
28
+    {
29
+      "path": "pages/work/index",
30
+      "style": {
31
+        "navigationBarTitleText": "工作台"
32
+      }
33
+    },
34
+    {
35
+      "path": "pages/mine/index",
36
+      "style": {
37
+        "navigationBarTitleText": "我的"
38
+      }
39
+    },
40
+    {
41
+      "path": "pages/mine/avatar/index",
42
+      "style": {
43
+        "navigationBarTitleText": "修改头像"
44
+      }
45
+    },
46
+    {
47
+      "path": "pages/mine/info/index",
48
+      "style": {
49
+        "navigationBarTitleText": "个人信息"
50
+      }
51
+    },
52
+    {
53
+      "path": "pages/mine/info/edit",
54
+      "style": {
55
+        "navigationBarTitleText": "编辑资料"
56
+      }
57
+    },
58
+    {
59
+      "path": "pages/mine/pwd/index",
60
+      "style": {
61
+        "navigationBarTitleText": "修改密码"
62
+      }
63
+    },
64
+    {
65
+      "path": "pages/mine/setting/index",
66
+      "style": {
67
+        "navigationBarTitleText": "应用设置"
68
+      }
69
+    },
70
+    {
71
+      "path": "pages/mine/help/index",
72
+      "style": {
73
+        "navigationBarTitleText": "常见问题"
74
+      }
75
+    },
76
+    {
77
+      "path": "pages/mine/about/index",
78
+      "style": {
79
+        "navigationBarTitleText": "关于我们"
80
+      }
81
+    },
82
+    {
83
+      "path": "pages/common/webview/index",
84
+      "style": {
85
+        "navigationBarTitleText": "浏览网页"
86
+      }
87
+    },
88
+    {
89
+      "path": "pages/common/textview/index",
90
+      "style": {
91
+        "navigationBarTitleText": "浏览文本"
92
+      }
93
+    },
94
+    {
95
+      "path": "pages/attendance/index",
96
+      "style": {
97
+        "navigationBarTitleText": "勤务打卡"
98
+      }
99
+    },
100
+    {
101
+      "path": "pages/attendanceStatistics/index",
102
+      "style": {
103
+        "navigationBarTitleText": "考勤统计"
104
+      }
105
+    },
106
+    {
107
+      "path": "pages/workProfile/index",
108
+      "style": {
109
+        "navigationBarTitleText": "工作画像"
110
+      }
111
+    },
112
+    {
113
+      "path": "pages/seizedReported/index",
114
+      "style": {
115
+        "navigationBarTitleText": "违禁品查获上报"
116
+      }
117
+    },
118
+    {
119
+      "path": "pages/seizedReportedVoice/index",
120
+      "style": {
121
+        "navigationBarTitleText": "违禁品查获上报"
122
+      }
123
+    },
124
+    {
125
+      "path": "pages/train/index",
126
+      "style": {
127
+        "navigationStyle": "custom"
128
+      }
129
+    },
130
+    {
131
+      "path": "pages/attendance/stats",
132
+      "style": {
133
+        "navigationBarTitleText": "打卡统计"
134
+      }
135
+    },
136
+    {
137
+      "path": "pages/attendance/stats",
138
+      "style": {
139
+        "navigationBarTitleText": "打卡统计"
140
+      }
141
+    },
142
+    {
143
+      "path": "pages/home/index",
144
+      "style": {
145
+        "navigationBarTitleText": "首页"
146
+      }
147
+    },
148
+    {
149
+      "path": "pages/personal-center/index",
150
+      "style": {
151
+        "navigationBarTitleText": "个人中心"
152
+      }
153
+    },
154
+    {
155
+      "path": "pages/exam/index",
156
+      "style": {
157
+        "navigationBarTitleText": "测试"
158
+      }
159
+    },
160
+    {
161
+      "path": "pages/exam-list/index",
162
+      "style": {
163
+        "navigationBarTitleText": "测试列表"
164
+      }
165
+    },
166
+    {
167
+      "path": "pages/daily-exam/task-list/index",
168
+      "style": {
169
+        "navigationBarTitleText": "抽问抽答"
170
+      }
171
+    },
172
+    {
173
+      "path": "pages/daily-exam/answer/index",
174
+      "style": {
175
+        "navigationBarTitleText": "答题"
176
+      }
177
+    },
178
+    {
179
+      "path": "pages/inspectionRecord/index",
180
+      "style": {
181
+        "navigationBarTitleText": "巡检记录单"
182
+      }
183
+    },
184
+    {
185
+      "path": "pages/inspectionRecordList/index",
186
+      "style": {
187
+        "navigationBarTitleText": "巡检列表"
188
+      }
189
+    },
190
+    {
191
+      "path": "pages/checklist/index",
192
+      "style": {
193
+        "navigationBarTitleText": "检查单"
194
+      }
195
+    },
196
+    {
197
+      "path": "pages/announcement/index",
198
+      "style": {
199
+        "navigationBarTitleText": "公告"
200
+      }
201
+    },
202
+    {
203
+      "path": "pages/workDocu/index",
204
+      "style": {
205
+        "navigationBarTitleText": "工作手册"
206
+      }
207
+    },
208
+    {
209
+      "path": "pages/workDocu/workDocuDetail",
210
+      "style": {
211
+        "navigationBarTitleText": "工作手册详情"
212
+      }
213
+    },
214
+    {
215
+      "path": "pages/announcement/announcementDetail",
216
+      "style": {
217
+        "navigationBarTitleText": "公告详情"
218
+      }
219
+    },
220
+       {
221
+      "path": "pages/announcement/noticeDetail",
222
+      "style": {
223
+        "navigationBarTitleText": "通知详情"
224
+      }
225
+    },
226
+    {
227
+      "path": "pages/problemRect/index",
228
+      "style": {
229
+        "navigationBarTitleText": "问题记录及整改单"
230
+      }
231
+    },
232
+    {
233
+      "path": "pages/inspectionStatistics/index",
234
+      "style": {
235
+        "navigationBarTitleText": "巡检统计"
236
+      }
237
+    },
238
+    {
239
+      "path": "pages/questionStatistics/index",
240
+      "style": {
241
+        "navigationBarTitleText": "抽问抽答统计"
242
+      }
243
+    },
244
+    {
245
+      "path": "pages/myToDoList/index",
246
+      "style": {
247
+        "navigationBarTitleText": "我的事项"
248
+      }
249
+    },
250
+    {
251
+      "path": "pages/inspectionChecklist/index",
252
+      "style": {
253
+        "navigationBarTitleText": "巡视检查列表"
254
+      }
255
+    },
256
+    {
257
+      "path": "pages/voiceSubmissionDraft/index",
258
+      "style": {
259
+        "navigationBarTitleText": "草稿箱"
260
+      }
261
+    },
262
+    {
263
+      "path": "pages/inspectionRecord/detail",
264
+      "style": {
265
+        "navigationBarTitleText": "巡检单明细"
266
+      }
267
+    },
268
+    {
269
+      "path": "pages/seizureRecord/detail",
270
+      "style": {
271
+        "navigationBarTitleText": "查获明细"
272
+      }
273
+    },
274
+    {
275
+      "path": "pages/seizureRecord/index",
276
+      "style": {
277
+        "navigationBarTitleText": "查获记录"
278
+      }
279
+    },
280
+    {
281
+      "path": "pages/seizeStatistics/index",
282
+      "style": {
283
+        "navigationBarTitleText": "查获统计"
284
+      }
285
+    }
286
+  ],
287
+  "tabBar": {
288
+    "custom": true,
289
+    "color": "#000000",
290
+    "selectedColor": "#000000",
291
+    "borderStyle": "white",
292
+    "backgroundColor": "#ffffff",
293
+    "paddingBottom": "0px",
294
+    "marginBottom": "0px",
295
+    "list": [
296
+      {
297
+        "pagePath": "pages/home/index",
298
+        "iconPath": "static/images/tabbar/home.png",
299
+        "selectedIconPath": "static/images/tabbar/home_.png",
300
+        "text": "首页"
301
+      },
302
+      {
303
+        "pagePath": "pages/myToDoList/index",
304
+        "iconPath": "/static/images/tabbar/message.png",
305
+        "selectedIconPath": "/static/images/tabbar/message_.png",
306
+        "text": "消息"
307
+      },
308
+      {
309
+        "pagePath": "pages/work/index",
310
+        "iconPath": "static/images/tabbar/work.png",
311
+        "selectedIconPath": "static/images/tabbar/work_.png",
312
+        "text": "工作台"
313
+      },
314
+      {
315
+        "pagePath": "pages/mine/index",
316
+        "iconPath": "static/images/tabbar/mine.png",
317
+        "selectedIconPath": "static/images/tabbar/mine_.png",
318
+        "text": "我的"
319
+      }
320
+    ]
321
+  },
322
+  "easycom": {
323
+    "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
324
+  },
325
+  "globalStyle": {
326
+    "navigationBarTextStyle": "black",
327
+    "navigationBarTitleText": "Airport",
328
+    "navigationBarBackgroundColor": "#FFFFFF"
329
+  }
330
+}

+ 39 - 0
src/permission.js

@@ -0,0 +1,39 @@
1
+import { getToken } from '@/utils/auth'
2
+
3
+// 登录页面
4
+const loginPage = "/pages/login"
5
+  
6
+// 页面白名单
7
+const whiteList = [
8
+  '/pages/login', '/pages/register', '/pages/common/webview/index'
9
+]
10
+
11
+// 检查地址白名单
12
+function checkWhite(url) {
13
+  const path = url.split('?')[0]
14
+  return whiteList.indexOf(path) !== -1
15
+}
16
+
17
+// 页面跳转验证拦截器
18
+let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
19
+list.forEach(item => {
20
+  uni.addInterceptor(item, {
21
+    invoke(to) {
22
+      if (getToken()) {
23
+        if (to.url === loginPage) {
24
+          uni.reLaunch({ url: "/" })
25
+        }
26
+        return true
27
+      } else {
28
+        if (checkWhite(to.url)) {
29
+          return true
30
+        }
31
+        uni.reLaunch({ url: loginPage })
32
+        return false
33
+      }
34
+    },
35
+    fail(err) {
36
+      console.log(err)
37
+    }
38
+  })
39
+})

+ 138 - 0
src/uni.scss

@@ -0,0 +1,138 @@
1
+/**
2
+ * uni-app内置的常用样式变量
3
+ */
4
+
5
+@import 'uview-ui/theme.scss';
6
+
7
+/* 行为相关颜色 */
8
+$uni-color-primary: #007aff;
9
+$uni-color-success: #4cd964;
10
+$uni-color-warning: #f0ad4e;
11
+$uni-color-error: #dd524d;
12
+
13
+/* 文字基本颜色 */
14
+$uni-text-color: #333; //基本色
15
+$uni-text-color-inverse: #fff; //反色
16
+$uni-text-color-grey: #999; //辅助灰色,如加载更多的提示信息
17
+$uni-text-color-placeholder: #808080;
18
+$uni-text-color-disable: #c0c0c0;
19
+
20
+/* 背景颜色 */
21
+$uni-bg-color: #ffffff;
22
+$uni-bg-color-grey: #f8f8f8;
23
+$uni-bg-color-hover: #f1f1f1; //点击状态颜色
24
+$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
25
+
26
+/* 边框颜色 */
27
+$uni-border-color: #e5e5e5;
28
+
29
+/* 尺寸变量 */
30
+
31
+/* 文字尺寸 */
32
+$uni-font-size-sm: 12px;
33
+$uni-font-size-base: 14px;
34
+$uni-font-size-lg: 16px;
35
+
36
+/* 图片尺寸 */
37
+$uni-img-size-sm: 20px;
38
+$uni-img-size-base: 26px;
39
+$uni-img-size-lg: 40px;
40
+
41
+/* Border Radius */
42
+$uni-border-radius-sm: 2px;
43
+$uni-border-radius-base: 3px;
44
+$uni-border-radius-lg: 6px;
45
+$uni-border-radius-circle: 50%;
46
+
47
+/* 水平间距 */
48
+$uni-spacing-row-sm: 5px;
49
+$uni-spacing-row-base: 10px;
50
+$uni-spacing-row-lg: 15px;
51
+
52
+/* 垂直间距 */
53
+$uni-spacing-col-sm: 4px;
54
+$uni-spacing-col-base: 8px;
55
+$uni-spacing-col-lg: 12px;
56
+
57
+/* 透明度 */
58
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
59
+
60
+/* 文章场景相关 */
61
+$uni-color-title: #2C405A; // 文章标题颜色
62
+$uni-font-size-title: 20px;
63
+$uni-color-subtitle: #555555; // 二级标题颜色
64
+$uni-font-size-subtitle: 26px;
65
+$uni-color-paragraph: #3F536E; // 文章段落颜色
66
+$uni-font-size-paragraph: 15px;
67
+
68
+
69
+.custom-btn {
70
+  width: 100%;
71
+  height: 46px;
72
+  background: linear-gradient(135deg, #6E9BFC 0%, #496CF4 100%);
73
+  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.1);
74
+  border-radius: 40px 40px 40px 40px;
75
+  font-weight: 500;
76
+  font-size: 16px;
77
+  color: #FFFFFF;
78
+  line-height: 46px;
79
+  text-align: center;
80
+  font-style: normal;
81
+  text-transform: none;
82
+  margin-top: 26px;
83
+}
84
+
85
+.custom-btn.disabled {
86
+  opacity: 0.6;
87
+  cursor: not-allowed;
88
+}
89
+
90
+.custom-btn-normal {
91
+  @extend .custom-btn;
92
+  height: 34px;
93
+  line-height: 34px;
94
+  font-size: 14px;
95
+}
96
+
97
+.custom-btn-normal.disabled {
98
+  opacity: 0.6;
99
+  cursor: not-allowed;
100
+}
101
+
102
+.white-btn {
103
+  width: 100%;
104
+  height: 46px;
105
+  background: #ffffff;
106
+ 
107
+  border-radius: 40px 40px 40px 40px;
108
+  font-weight: 500;
109
+  font-size: 16px;
110
+  color: #666666;
111
+  line-height: 46px;
112
+  text-align: center;
113
+  font-style: normal;
114
+  text-transform: none;
115
+  margin-top: 26px;
116
+}
117
+
118
+.custom-btn-white {
119
+  @extend .white-btn;
120
+  color: #666666;
121
+  border: 1px solid #CECDCD;
122
+  height: 34px;
123
+  line-height: 34px;
124
+  font-size: 14px;
125
+}
126
+
127
+.custom-btn-white.disabled {
128
+  opacity: 0.6;
129
+  cursor: not-allowed;
130
+}
131
+
132
+.u-modal__content {
133
+  padding: 10px !important;
134
+}
135
+
136
+.uni-tag {
137
+  font-weight: 400;
138
+}

+ 4 - 0
src/vue.config.js

@@ -0,0 +1,4 @@
1
+
2
+module.exports = {
3
+    transpileDependencies: ['uview-ui']
4
+}