diff --git a/README/1.3.4.md b/README/1.3.4.md new file mode 100644 index 0000000000000000000000000000000000000000..b83fe51394a4b97d5041e79a361843ac58497d98 --- /dev/null +++ b/README/1.3.4.md @@ -0,0 +1,8 @@ +#### uniCloud 云函数路由研究群:22466457 如有问题或建议可以在群内讨论。 +###### gitee公共仓库地址:https://gitee.com/vk-uni/vk-uni-cloud-router.git +### 更新内容 +##### 1、【优化】将演示页面移至分包`pages_template`目录中,不占用主包大小。 +##### 2、【优化】为了方便新手快速上手此框架,写一个简单的演示页面(`pages/test/test`) +###### 为了符合uniapp官方规范,你自己写的页面均写在`pages`目录下 故此`pages/test/test`页面未移至`pages_template`目录 + +### 你也可以在评论区发布留言交流心得。 \ No newline at end of file diff --git a/cloudfunctions-aliyun/router/service/test/pub/addition.js b/cloudfunctions-aliyun/router/service/test/pub/addition.js new file mode 100644 index 0000000000000000000000000000000000000000..3e10be1e5246fc0f701bfa20110efe53671c59ca --- /dev/null +++ b/cloudfunctions-aliyun/router/service/test/pub/addition.js @@ -0,0 +1,38 @@ +module.exports = { + /** + * 此函数名称 + * @url test/pub/addition 前端调用的url参数地址 + * @description 此函数描述 + * @params {Object} data 请求参数 + * @params {String} uniIdToken 用户token + * @params {String} userInfo 当前登录用户信息(同理,是可信任的)(只有kh函数才带此参数) + * @params {Object} util 公共工具包 + * @params {Object} originalParam 原始请求参数(包含了原始event和context) + * data 请求参数 说明 + * @params {String} uid 当前登录用户id,若用户已登录且token有效,则data中会带uid参数 + * (此参数是后端过滤器通过token获取并添加到data中的,是可信任的)(只有kh函数才带此参数) + * res 返回参数说明 + * @params {Number} code 错误码,0表示成功 + * @params {String} msg 详细信息 + */ + main: async (event) => { + let { data = {}, userInfo, util, originalParam } = event; + let { uniID, config, pubFun, vk , db, _ } = util; + let { uid } = data; + let res = { code : 0, msg : '' }; + // 业务逻辑开始----------------------------------------------------------- + // 可写与数据库的交互逻辑等等 + let { num1 , num2 } = data; + if(!num1 || !num2){ + return { + code : -1, + msg : "参数不能为空!" + } + } + num1 = parseFloat(num1); + num2 = parseFloat(num2); + res.value = parseFloat((num1 + num2).toFixed(2)); + // 业务逻辑结束----------------------------------------------------------- + return res; + } +} \ No newline at end of file diff --git a/pages/test/test.vue b/pages/test/test.vue new file mode 100644 index 0000000000000000000000000000000000000000..43dcdfb8d371e3153a32315457d6cbe55c455b34 --- /dev/null +++ b/pages/test/test.vue @@ -0,0 +1,88 @@ + + + + \ No newline at end of file diff --git a/pages_template/components-dynamic/index/index.vue b/pages_template/components-dynamic/index/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..e6e66a85852d78a1b9996735cda9c4d7f02458c4 --- /dev/null +++ b/pages_template/components-dynamic/index/index.vue @@ -0,0 +1,100 @@ + + + + diff --git a/pages_template/components-dynamic/vk-u-grid-button/vk-u-grid-button.vue b/pages_template/components-dynamic/vk-u-grid-button/vk-u-grid-button.vue new file mode 100644 index 0000000000000000000000000000000000000000..cd4f8b17df543deb434093a56d651206584a5486 --- /dev/null +++ b/pages_template/components-dynamic/vk-u-grid-button/vk-u-grid-button.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/pages_template/components-dynamic/vk-u-notice-bar/vk-u-notice-bar.vue b/pages_template/components-dynamic/vk-u-notice-bar/vk-u-notice-bar.vue new file mode 100644 index 0000000000000000000000000000000000000000..1ffb60d5dea712694eac9e5467db2502266d0ce8 --- /dev/null +++ b/pages_template/components-dynamic/vk-u-notice-bar/vk-u-notice-bar.vue @@ -0,0 +1,276 @@ + + + + + + + diff --git a/pages_template/components-dynamic/vk-u-swiper/vk-u-swiper.vue b/pages_template/components-dynamic/vk-u-swiper/vk-u-swiper.vue new file mode 100644 index 0000000000000000000000000000000000000000..1051b341ca74f0e90b9e0b1bd8ce6bc52a9d1bf1 --- /dev/null +++ b/pages_template/components-dynamic/vk-u-swiper/vk-u-swiper.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/pages_template/db-test/db-test.vue b/pages_template/db-test/db-test.vue new file mode 100644 index 0000000000000000000000000000000000000000..1927f55d43c3db5aa89911ff4b6db9a004b43e6c --- /dev/null +++ b/pages_template/db-test/db-test.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/pages_template/db-test/list/list.vue b/pages_template/db-test/list/list.vue new file mode 100644 index 0000000000000000000000000000000000000000..a1cf6e0d67827024f0d969e213994e1e295c99a8 --- /dev/null +++ b/pages_template/db-test/list/list.vue @@ -0,0 +1,201 @@ + + + + diff --git a/pages_template/uni-id/alipay/alipay.vue b/pages_template/uni-id/alipay/alipay.vue new file mode 100644 index 0000000000000000000000000000000000000000..730b31f4c1f953c0a071d964ab5faeabd43a53ee --- /dev/null +++ b/pages_template/uni-id/alipay/alipay.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/pages_template/uni-id/email/email.vue b/pages_template/uni-id/email/email.vue new file mode 100644 index 0000000000000000000000000000000000000000..6d4afbcd5836e42b9d905d2e11488408495a837b --- /dev/null +++ b/pages_template/uni-id/email/email.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/pages_template/uni-id/index/index.vue b/pages_template/uni-id/index/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..01d8eb38612c8f2c2f1dbcbfd5cb950fe5d640d5 --- /dev/null +++ b/pages_template/uni-id/index/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/pages_template/uni-id/login/css/main.css b/pages_template/uni-id/login/css/main.css new file mode 100644 index 0000000000000000000000000000000000000000..19eb21d2d4a59949842dc6ef83c4e429c840deae --- /dev/null +++ b/pages_template/uni-id/login/css/main.css @@ -0,0 +1,145 @@ +.content { + display: flex; + flex-direction: column; + justify-content:center; +} + +/* 头部 logo */ +.header { + width:161rpx; + height:161rpx; + box-shadow:0rpx 0rpx 60rpx 0rpx rgba(0,0,0,0.1); + border-radius:50%; + background-color: #000000; + margin-top: 40rpx; + margin-bottom: 40rpx; + margin-left: auto; + margin-right: auto; +} +.header image{ + width:161rpx; + height:161rpx; + border-radius:50%; +} + +/* 主体 */ +.main { + display: flex; + flex-direction: column; + padding-left: 70rpx; + padding-right: 70rpx; +} +.tips { + color: #999999; + font-size: 28rpx; + margin-top: 64rpx; + margin-left: 48rpx; +} + +/* 登录按钮 */ +.wbutton{ + margin-top: 96rpx; +} + +/* 其他登录方式 */ +.other_login{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-top: 256rpx; + text-align: center; +} +.login_icon{ + border: none; + font-size: 64rpx; + margin: 0 64rpx 0 64rpx; + color: rgba(0,0,0,0.7) +} +.wechat_color{ + color: #83DC42; +} +.weibo_color{ + color: #F9221D; +} +.github_color{ + color: #24292E; +} + +/* 底部 */ +.footer{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + font-size: 28rpx; + margin-top: 50rpx; + color: rgba(0,0,0,0.7); + text-align: center; + height: 40rpx; + line-height: 40rpx; +} +.footer text{ + font-size: 24rpx; + margin-left: 15rpx; + margin-right: 15rpx; +} + +.main-list{ + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + color: #333333; + padding: 24rpx 32rpx; + margin:26rpx 0; + } + .img{ + width: 32rpx; + height: 32rpx; + font-size: 32rpx; + } + .main-input{ + flex: 1; + text-align: left; + font-size: 28rpx; + padding-right: 10rpx; + margin-left: 20rpx; + } + .vercode { + color: rgba(0,0,0,0.7); + font-size: 24rpx; + /* line-height: 100rpx; */ + } + .vercode-run { + color: rgba(0,0,0,0.4) !important; + } + .oBorder{ + border: none; + border-radius: 2.5rem ; + -webkit-box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ; + box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ; + } + .login-btn{ + margin-top: 60rpx; + width: 80%; + height: 100rpx; + margin-left: auto; + margin-right: auto; + } + .login-btn2{ + margin-top: 60rpx; + width: 80%; + height: 100rpx; + background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.6)); + color: rgb(255, 255, 255); + margin-left: auto; + margin-right: auto; + } + + .other_login{ + margin-top: 150rpx; + } + .login .footer{ + margin-top: 80rpx; + } diff --git a/pages_template/uni-id/login/forget/forget.vue b/pages_template/uni-id/login/forget/forget.vue new file mode 100644 index 0000000000000000000000000000000000000000..be9691675c26bc9c694014ce9d2836860c51414b --- /dev/null +++ b/pages_template/uni-id/login/forget/forget.vue @@ -0,0 +1,206 @@ + + + + diff --git a/pages_template/uni-id/login/index/index.vue b/pages_template/uni-id/login/index/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..0345163bb1e8ab7ea2eaaa8c5b80c9b37620ff4f --- /dev/null +++ b/pages_template/uni-id/login/index/index.vue @@ -0,0 +1,222 @@ + + + + diff --git a/pages_template/uni-id/login/register/register.vue b/pages_template/uni-id/login/register/register.vue new file mode 100644 index 0000000000000000000000000000000000000000..cba946085c0ed07fd091e646aba35deca2a6ae5a --- /dev/null +++ b/pages_template/uni-id/login/register/register.vue @@ -0,0 +1,225 @@ + + + + diff --git a/pages_template/uni-id/mobile/mobile.vue b/pages_template/uni-id/mobile/mobile.vue new file mode 100644 index 0000000000000000000000000000000000000000..cb75dec74aeb1b9b555da47655aa89d9e751b5ed --- /dev/null +++ b/pages_template/uni-id/mobile/mobile.vue @@ -0,0 +1,179 @@ + + + + + \ No newline at end of file diff --git a/pages_template/uni-id/password/password.vue b/pages_template/uni-id/password/password.vue new file mode 100644 index 0000000000000000000000000000000000000000..f728fc29f6dc0f90a99ced06d549539ab66e1339 --- /dev/null +++ b/pages_template/uni-id/password/password.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/pages_template/uni-id/util/util.vue b/pages_template/uni-id/util/util.vue new file mode 100644 index 0000000000000000000000000000000000000000..b22643729b1afcbe66b34e0f14ec833bcbdad37b --- /dev/null +++ b/pages_template/uni-id/util/util.vue @@ -0,0 +1,125 @@ + + + + + \ No newline at end of file diff --git a/pages_template/uni-id/weixin/weixin.vue b/pages_template/uni-id/weixin/weixin.vue new file mode 100644 index 0000000000000000000000000000000000000000..7e2e87030a62fc80c7a669a73ade852a10a54f76 --- /dev/null +++ b/pages_template/uni-id/weixin/weixin.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file