commit 83eaa6fb8538f9c820dd0089402a07afd8cb3b9a Author: sa0ChunLuyu Date: Tue Apr 19 17:35:37 2022 +0800 no message diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79ee222 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ + +.hbuilderx +node_modules +uni_modules +unpackage diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..0f20f9e --- /dev/null +++ b/App.vue @@ -0,0 +1,30 @@ + + + diff --git a/api/index.js b/api/index.js new file mode 100644 index 0000000..8642ecb --- /dev/null +++ b/api/index.js @@ -0,0 +1,11 @@ +export function yo(then) { + lto.post({url: `${API_URL}/api/yo`, data: {}}).then((response) => { + $store.api_loading-- + if (response.data.code === API_CODE) then(response.data) + }).catch(() => { + $store.api_loading-- + layer.msg(ERROR_MESSAGE) + }) +} + + diff --git a/config.js b/config.js new file mode 100644 index 0000000..8f76374 --- /dev/null +++ b/config.js @@ -0,0 +1,3 @@ +export default { + title: '鹿和开发套件' +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..461a913 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + + + +
+ + + diff --git a/lu/index.js b/lu/index.js new file mode 100644 index 0000000..4c85eec --- /dev/null +++ b/lu/index.js @@ -0,0 +1,4 @@ +import toast from './toast.js'; +export default { + toast, +}; \ No newline at end of file diff --git a/lu/post.js b/lu/post.js new file mode 100644 index 0000000..1a07976 --- /dev/null +++ b/lu/post.js @@ -0,0 +1,33 @@ +import m from '../tool/member.js'; +const post = (e) => { + if (typeof e.url === 'undefined') return console.error({ + 'data': { + 'message': 'URL没有定义' + }, + 'state': 201 + }); + let url = e.url; + let data = typeof e.data === 'undefined' ? {} : e.data; + let done = typeof e.done === 'undefined' ? response => console.log(response) : e.done; + let then = typeof e.then === 'undefined' ? response => console.log(response) : e.then; + let error = typeof e.error === 'undefined' ? err => console.log(err) : e.error; + let token = m.getToken() ? m.getToken() : ''; + data.SYSTEM_TYPE = 'WMP'; + let header = typeof e.header === 'undefined' ? { + 'content-type': 'application/json', + 'Authorization': `Bearer ${token}` + } : { + 'content-type': 'application/json', + ...e.data + }; + uni.request({ + url: url, + method: 'POST', + data: data, + header: header, + success: (res) => then(res.data), + fail: (e) => error(e) + }); +} + +export default post; diff --git a/lu/toast.js b/lu/toast.js new file mode 100644 index 0000000..e437edd --- /dev/null +++ b/lu/toast.js @@ -0,0 +1,9 @@ +const toast = (title, duration = 1500) => { + uni.showToast({ + title: title, + icon: 'none', + duration: duration + }) +} + +export default toast diff --git a/main.js b/main.js new file mode 100644 index 0000000..1a6d8a4 --- /dev/null +++ b/main.js @@ -0,0 +1,20 @@ +import App from './App' + +import uView from './uni_modules/vk-uview-ui'; +import Store from './store' +import $lu from './lu' + +import { + createSSRApp +} from 'vue' +uni.$lu = $lu +export function createApp() { + const app = createSSRApp(App) + + app.use(uView) + app.use(Store) + + return { + app + } +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..7a770fd --- /dev/null +++ b/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "uniapp_default", + "appid" : "__UNI__4C3CB5F", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wxc90b858cee392865", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..dbd4e63 --- /dev/null +++ b/pages.json @@ -0,0 +1,56 @@ +{ + "pages": [{ + "path": "pages/main/home/home", + "style": { + "navigationBarTitleText": "鹿和开发套件", + "enablePullDownRefresh": false + } + }, { + "path": "pages/main/user/user", + "style": { + "navigationBarTitleText": "我的", + "enablePullDownRefresh": false + } + }], + "subPackages": [{ + "root": "pages/dev", + "pages": [{ + "path": "tool/tool", + "style": { + "navigationBarTitleText": "开发工具", + "enablePullDownRefresh": false + } + }, { + "path": "dev/dev", + "style": { + "navigationBarTitleText": "示例", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + + }] + }], + "tabBar": { + "color": "#7A7E83", + "selectedColor": "#333333", + "borderStyle": "white", + "backgroundColor": "#ffffff", + "list": [{ + "pagePath": "pages/main/home/home", + "iconPath": "static/tabbar/hof.png", + "selectedIconPath": "static/tabbar/hon.png", + "text": "YO" + }, { + "pagePath": "pages/main/user/user", + "iconPath": "static/tabbar/hof.png", + "selectedIconPath": "static/tabbar/hon.png", + "text": "HA" + }] + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + } +} diff --git a/pages/dev/dev/Api/Api.vue b/pages/dev/dev/Api/Api.vue new file mode 100644 index 0000000..bce639f --- /dev/null +++ b/pages/dev/dev/Api/Api.vue @@ -0,0 +1,10 @@ + + diff --git a/pages/dev/dev/Navbar/Navbar.vue b/pages/dev/dev/Navbar/Navbar.vue new file mode 100644 index 0000000..ea3c64a --- /dev/null +++ b/pages/dev/dev/Navbar/Navbar.vue @@ -0,0 +1,10 @@ + + diff --git a/pages/dev/dev/RouterQuery/RouterQuery.vue b/pages/dev/dev/RouterQuery/RouterQuery.vue new file mode 100644 index 0000000..e467bc0 --- /dev/null +++ b/pages/dev/dev/RouterQuery/RouterQuery.vue @@ -0,0 +1,26 @@ + + diff --git a/pages/dev/dev/dev.vue b/pages/dev/dev/dev.vue new file mode 100644 index 0000000..ff11303 --- /dev/null +++ b/pages/dev/dev/dev.vue @@ -0,0 +1,30 @@ + + diff --git a/pages/dev/tool/tool.vue b/pages/dev/tool/tool.vue new file mode 100644 index 0000000..92d13e4 --- /dev/null +++ b/pages/dev/tool/tool.vue @@ -0,0 +1,10 @@ + + diff --git a/pages/main/home/home.vue b/pages/main/home/home.vue new file mode 100644 index 0000000..e1b9a43 --- /dev/null +++ b/pages/main/home/home.vue @@ -0,0 +1,57 @@ + + + diff --git a/pages/main/user/user.vue b/pages/main/user/user.vue new file mode 100644 index 0000000..7795851 --- /dev/null +++ b/pages/main/user/user.vue @@ -0,0 +1,10 @@ + + diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..9a6c5cb Binary files /dev/null and b/static/logo.png differ diff --git a/static/tabbar/hof.png b/static/tabbar/hof.png new file mode 100644 index 0000000..ca1f6ab Binary files /dev/null and b/static/tabbar/hof.png differ diff --git a/static/tabbar/hon.png b/static/tabbar/hon.png new file mode 100644 index 0000000..ea4ba68 Binary files /dev/null and b/static/tabbar/hon.png differ diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..89c8232 --- /dev/null +++ b/store/index.js @@ -0,0 +1,13 @@ +import { + createStore +} from "vuex"; + +export default createStore({ + state: { + count: 1, + }, + mutations: {}, + actions: {}, + getters: {}, + modules: {} +}); diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..6f73231 --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +@import "@/uni_modules/vk-uview-ui/theme.scss"; +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px;