├── .gitignore ├── unpackage └── dist │ └── dev │ ├── .automator │ └── mp-weixin │ │ └── .automator.json │ └── .sourcemap │ └── mp-weixin │ └── common │ └── main.js.map ├── uni_modules ├── uni-scss │ ├── index.scss │ ├── styles │ │ ├── setting │ │ │ ├── _border.scss │ │ │ ├── _text.scss │ │ │ ├── _space.scss │ │ │ ├── _radius.scss │ │ │ ├── _color.scss │ │ │ ├── _styles.scss │ │ │ └── _variables.scss │ │ ├── index.scss │ │ └── tools │ │ │ └── functions.scss │ ├── changelog.md │ ├── readme.md │ ├── theme.scss │ ├── variables.scss │ └── package.json ├── uni-id │ ├── uni-id.zip │ ├── uniCloud │ │ └── cloudfunctions │ │ │ └── common │ │ │ └── uni-id │ │ │ └── package.json │ ├── readme.md │ ├── package.json │ └── changelog.md ├── uni-icons │ ├── components │ │ └── uni-icons │ │ │ ├── uniicons.ttf │ │ │ └── uni-icons.vue │ ├── readme.md │ ├── changelog.md │ └── package.json ├── uni-config-center │ ├── changelog.md │ ├── uniCloud │ │ └── cloudfunctions │ │ │ └── common │ │ │ └── uni-config-center │ │ │ └── package.json │ ├── package.json │ └── readme.md ├── uni-popup │ ├── components │ │ ├── uni-popup │ │ │ ├── i18n │ │ │ │ ├── zh-Hans.json │ │ │ │ ├── zh-Hant.json │ │ │ │ ├── en.json │ │ │ │ └── index.js │ │ │ ├── popup.js │ │ │ └── keypress.js │ │ ├── uni-popup-dialog │ │ │ ├── keypress.js │ │ │ └── uni-popup-dialog.vue │ │ ├── uni-popup-message │ │ │ └── uni-popup-message.vue │ │ └── uni-popup-share │ │ │ └── uni-popup-share.vue │ ├── readme.md │ ├── package.json │ └── changelog.md ├── uni-row │ ├── readme.md │ ├── changelog.md │ ├── package.json │ └── components │ │ ├── uni-row │ │ └── uni-row.vue │ │ └── uni-col │ │ └── uni-col.vue ├── uni-transition │ ├── readme.md │ ├── changelog.md │ ├── package.json │ └── components │ │ └── uni-transition │ │ ├── createAnimation.js │ │ └── uni-transition.vue └── uni-open-bridge-common │ ├── readme.md │ ├── changelog.md │ ├── uniCloud │ ├── cloudfunctions │ │ └── common │ │ │ └── uni-open-bridge-common │ │ │ ├── bridge-error.js │ │ │ ├── package.json │ │ │ ├── consts.js │ │ │ ├── validator.js │ │ │ ├── config.js │ │ │ ├── storage.js │ │ │ ├── index.js │ │ │ ├── weixin-server.js │ │ │ └── uni-cloud-cache.js │ └── database │ │ └── opendb-open-data.schema.json │ └── package.json ├── static ├── logo.png ├── user.png ├── openai.png ├── openai1.png └── js │ └── share.js ├── README.md ├── App.vue ├── components └── u-parse │ ├── components │ ├── wxParseVideo.vue │ ├── wxParseAudio.vue │ ├── wxParseTemplate11.vue │ ├── wxParseImg.vue │ ├── wxParseTemplate10.vue │ ├── wxParseTemplate2.vue │ ├── wxParseTemplate3.vue │ ├── wxParseTemplate4.vue │ ├── wxParseTemplate5.vue │ ├── wxParseTemplate6.vue │ ├── wxParseTemplate7.vue │ ├── wxParseTemplate8.vue │ ├── wxParseTemplate9.vue │ ├── wxParseTemplate1.vue │ └── wxParseTemplate0.vue │ ├── readme.md │ ├── u-parse.vue │ ├── u-parse.css │ └── libs │ ├── htmlparser.js │ ├── wxDiscode.js │ └── html2json.js ├── .hbuilderx └── launch.json ├── main.js ├── pages.json ├── uniCloud-aliyun └── database │ └── JQL查询.jql ├── index.html ├── uni.scss └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unpackage/dist/dev/.automator/mp-weixin/.automator.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/index.scss: -------------------------------------------------------------------------------- 1 | @import './styles/index.scss'; 2 | -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/static/logo.png -------------------------------------------------------------------------------- /static/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/static/user.png -------------------------------------------------------------------------------- /static/openai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/static/openai.png -------------------------------------------------------------------------------- /static/openai1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/static/openai1.png -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_border.scss: -------------------------------------------------------------------------------- 1 | .uni-border { 2 | border: 1px $uni-border-1 solid; 3 | } -------------------------------------------------------------------------------- /uni_modules/uni-id/uni-id.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/uni_modules/uni-id/uni-id.zip -------------------------------------------------------------------------------- /uni_modules/uni-icons/components/uni-icons/uniicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w15565133664/chatgpt-uniapp/HEAD/uni_modules/uni-icons/components/uni-icons/uniicons.ttf -------------------------------------------------------------------------------- /uni_modules/uni-config-center/changelog.md: -------------------------------------------------------------------------------- 1 | ## 0.0.3(2022-11-11) 2 | - 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug 3 | ## 0.0.2(2021-04-16) 4 | - 修改插件package信息 5 | ## 0.0.1(2021-03-15) 6 | - 初始化项目 7 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.3(2022-01-21) 2 | - 优化 组件示例 3 | ## 1.0.2(2021-11-22) 4 | - 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 5 | ## 1.0.1(2021-11-22) 6 | - 修复 vue3中scss语法兼容问题 7 | ## 1.0.0(2021-11-18) 8 | - init 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # chatgpt-uniapp 2 | chatgpt-wxapp小程序 3 | 4 | 修改pages/index/index.vue下的apiurl 即可试用 5 | 6 | 后端API项目下载地址:https://github.com/quchuanping/chatgpt-php 7 | 8 | 小程序版本,需在hbuilderX编译器下运行 9 | 10 | 最简单版本,如有疑问+V:A785929720 11 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json: -------------------------------------------------------------------------------- 1 | { 2 | "uni-popup.cancel": "取消", 3 | "uni-popup.ok": "确定", 4 | "uni-popup.placeholder": "请输入", 5 | "uni-popup.title": "提示", 6 | "uni-popup.shareTitle": "分享到" 7 | } 8 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json: -------------------------------------------------------------------------------- 1 | { 2 | "uni-popup.cancel": "取消", 3 | "uni-popup.ok": "確定", 4 | "uni-popup.placeholder": "請輸入", 5 | "uni-popup.title": "提示", 6 | "uni-popup.shareTitle": "分享到" 7 | } 8 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/readme.md: -------------------------------------------------------------------------------- 1 | `uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 2 | 3 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) 4 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "uni-popup.cancel": "cancel", 3 | "uni-popup.ok": "ok", 4 | "uni-popup.placeholder": "pleace enter", 5 | "uni-popup.title": "Hint", 6 | "uni-popup.shareTitle": "Share to" 7 | } 8 | -------------------------------------------------------------------------------- /uni_modules/uni-icons/readme.md: -------------------------------------------------------------------------------- 1 | ## Icons 图标 2 | > **组件名:uni-icons** 3 | > 代码块: `uIcons` 4 | 5 | 用于展示 icons 图标 。 6 | 7 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) 8 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 9 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/i18n/index.js: -------------------------------------------------------------------------------- 1 | import en from './en.json' 2 | import zhHans from './zh-Hans.json' 3 | import zhHant from './zh-Hant.json' 4 | export default { 5 | en, 6 | 'zh-Hans': zhHans, 7 | 'zh-Hant': zhHant 8 | } 9 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-config-center", 3 | "version": "0.0.3", 4 | "description": "配置中心", 5 | "main": "index.js", 6 | "keywords": [], 7 | "author": "DCloud", 8 | "license": "Apache-2.0" 9 | } -------------------------------------------------------------------------------- /uni_modules/uni-row/readme.md: -------------------------------------------------------------------------------- 1 | ## Layout 布局 2 | 3 | > **组件名 uni-row、uni-col** 4 | > 代码块: `uRow`、`uCol` 5 | 6 | 7 | 流式栅格系统,随着屏幕或视口分为 24 份,可以迅速简便地创建布局。 8 | 9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-row) 10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './setting/_variables.scss'; 2 | @import './setting/_border.scss'; 3 | @import './setting/_color.scss'; 4 | @import './setting/_space.scss'; 5 | @import './setting/_radius.scss'; 6 | @import './setting/_text.scss'; 7 | @import './setting/_styles.scss'; 8 | -------------------------------------------------------------------------------- /uni_modules/uni-transition/readme.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Transition 过渡动画 4 | > **组件名:uni-transition** 5 | > 代码块: `uTransition` 6 | 7 | 8 | 元素过渡动画 9 | 10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) 11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/readme.md: -------------------------------------------------------------------------------- 1 | # uni-open-bridge-common 2 | 3 | `uni-open-bridge-common` 是统一接管微信等三方平台认证凭据(包括但不限于`access_token`、`session_key`、`encrypt_key`、`ticket`)的开源库。 4 | 5 | 文档链接 [https://uniapp.dcloud.net.cn/uniCloud/uni-open-bridge#common](https://uniapp.dcloud.net.cn/uniCloud/uni-open-bridge#common) 6 | -------------------------------------------------------------------------------- /App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/readme.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Popup 弹出层 4 | > **组件名:uni-popup** 5 | > 代码块: `uPopup` 6 | > 关联组件:`uni-transition` 7 | 8 | 9 | 弹出层组件,在应用中弹出一个消息提示窗口、提示框等 10 | 11 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) 12 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.4(2022-09-21) 2 | - 新增 支持使用阿里云固定IP获取微信公众号H5凭据 access_token、ticket,开发者需要在微信公众平台配置阿里云固定IP,[固定IP详情](https://uniapp.dcloud.net.cn/uniCloud/cf-functions.html#aliyun-eip) 3 | ## 1.0.3(2022-09-06) 4 | - 修复 过期时间问题,容错 AccessToken 默认 fallback 逻辑,当微信服务器没有返回过期时间时设置为2小时后过期 5 | ## 1.0.2(2022-09-02) 6 | - 新增 依赖数据表schema opendb-open-data 7 | ## 1.0.0(2022-08-22) 8 | - 首次发布 9 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseVideo.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | -------------------------------------------------------------------------------- /.hbuilderx/launch.json: -------------------------------------------------------------------------------- 1 | { // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ 2 | // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 3 | "version": "0.0", 4 | "configurations": [{ 5 | "default" : 6 | { 7 | "launchtype" : "local" 8 | }, 9 | "mp-weixin" : 10 | { 11 | "launchtype" : "local" 12 | }, 13 | "type" : "uniCloud" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import App from './App' 2 | 3 | // #ifndef VUE3 4 | import Vue from 'vue' 5 | import share from '@/static/js/share.js' 6 | Vue.config.productionTip = false 7 | App.mpType = 'app' 8 | Vue.mixin(share) 9 | const app = new Vue({ 10 | ...App, 11 | share 12 | }) 13 | app.$mount() 14 | // #endif 15 | // #ifdef VUE3 16 | import { createSSRApp } from 'vue' 17 | export function createApp() { 18 | const app = createSSRApp(App) 19 | return { 20 | app 21 | } 22 | } 23 | // #endif -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/bridge-error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | class BridgeError extends Error { 4 | 5 | constructor(code, message) { 6 | super(message) 7 | 8 | this._code = code 9 | } 10 | 11 | get code() { 12 | return this._code 13 | } 14 | 15 | get errCode() { 16 | return this._code 17 | } 18 | 19 | get errMsg() { 20 | return this.message 21 | } 22 | } 23 | 24 | module.exports = { 25 | BridgeError 26 | } 27 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-open-bridge-common", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" 14 | } 15 | } -------------------------------------------------------------------------------- /uni_modules/uni-row/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0(2021-11-19) 2 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) 3 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-row](https://uniapp.dcloud.io/component/uniui/uni-row) 4 | ## 0.1.0(2021-07-13) 5 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) 6 | ## 0.0.4(2021-05-12) 7 | - 新增 组件示例地址 8 | ## 0.0.3(2021-02-05) 9 | - 调整为uni_modules目录规范 10 | - 新增uni-row组件 11 | -------------------------------------------------------------------------------- /pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages 3 | { 4 | "path": "pages/index/index", 5 | "style": { 6 | "navigationBarTitleText": "Ai对话人工智能" 7 | // "navigationBarTitleText": "Ai聊天" 8 | } 9 | } 10 | ], 11 | "globalStyle": { 12 | "navigationBarTextStyle": "black", 13 | "navigationBarTitleText": "Ai对话人工智能", 14 | // "navigationBarTitleText": "Ai聊天", 15 | "navigationBarBackgroundColor": "#F8F8F8", 16 | "backgroundColor": "#F8F8F8" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_text.scss: -------------------------------------------------------------------------------- 1 | @mixin get-styles($k,$c) { 2 | @if $k == size or $k == weight{ 3 | font-#{$k}:#{$c} 4 | }@else{ 5 | #{$k}:#{$c} 6 | } 7 | } 8 | 9 | @each $key, $child in $uni-headings { 10 | /* #ifndef APP-NVUE */ 11 | .uni-#{$key} { 12 | @each $k, $c in $child { 13 | @include get-styles($k,$c) 14 | } 15 | } 16 | /* #endif */ 17 | /* #ifdef APP-NVUE */ 18 | .container .uni-#{$key} { 19 | @each $k, $c in $child { 20 | @include get-styles($k,$c) 21 | } 22 | } 23 | /* #endif */ 24 | } 25 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/popup.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | data() { 4 | return { 5 | 6 | } 7 | }, 8 | created(){ 9 | this.popup = this.getParent() 10 | }, 11 | methods:{ 12 | /** 13 | * 获取父元素实例 14 | */ 15 | getParent(name = 'uniPopup') { 16 | let parent = this.$parent; 17 | let parentName = parent.$options.name; 18 | while (parentName !== name) { 19 | parent = parent.$parent; 20 | if (!parent) return false 21 | parentName = parent.$options.name; 22 | } 23 | return parent; 24 | }, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /uniCloud-aliyun/database/JQL查询.jql: -------------------------------------------------------------------------------- 1 | // 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理 2 | // 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法 3 | // 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码 4 | // 如果文档中存在多条JQL语句,只有最后一条语句生效 5 | // 如果混写了普通js,最后一条语句需是数据库操作语句 6 | // 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission 7 | // 不支持clientDB的action 8 | // 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database?id=limit 9 | // 详细JQL语法,请参考 https://uniapp.dcloud.net.cn/uniCloud/clientdb?id=jsquery 10 | 11 | // 下面示例查询uni-id-users表的所有数据 12 | db.collection('uni-id-users').get(); 13 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/consts.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const TAG = "UNI_OPEN_BRIDGE" 4 | 5 | const HTTP_STATUS = { 6 | SUCCESS: 200 7 | } 8 | 9 | const PlatformType = { 10 | WEIXIN_MP: 'weixin-mp', 11 | WEIXIN_H5: 'weixin-h5', 12 | WEIXIN_APP: 'weixin-app', 13 | WEIXIN_WEB: 'weixin-web', 14 | QQ_MP: 'qq-mp', 15 | QQ_APP: 'qq-app' 16 | } 17 | 18 | const ErrorCodeType = { 19 | SYSTEM_ERROR: TAG + "_SYSTEM_ERROR" 20 | } 21 | 22 | module.exports = { 23 | HTTP_STATUS, 24 | PlatformType, 25 | ErrorCodeType 26 | } 27 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseAudio.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 28 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/database/opendb-open-data.schema.json: -------------------------------------------------------------------------------- 1 | // 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema 2 | { 3 | "bsonType": "object", 4 | "required": ["_id", "value"], 5 | "properties": { 6 | "_id": { 7 | "bsonType": "string", 8 | "description": "key,格式:uni-id:[dcloudAppid]:[platform]:[openid]:[access-token|user-access-token|session-key|encrypt-key-version|ticket]" 9 | }, 10 | "value": { 11 | "bsonType": "object", 12 | "description": "字段_id对应的值" 13 | }, 14 | "expired": { 15 | "bsonType": "date", 16 | "description": "过期时间" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-id", 3 | "version": "3.3.29", 4 | "description": "uni-id for uniCloud", 5 | "main": "index.js", 6 | "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://gitee.com/dcloud/uni-id.git" 10 | }, 11 | "author": "", 12 | "license": "Apache-2.0", 13 | "dependencies": { 14 | "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", 15 | "uni-open-bridge-common": "file:../../../../../uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common" 16 | } 17 | } -------------------------------------------------------------------------------- /uni_modules/uni-scss/theme.scss: -------------------------------------------------------------------------------- 1 | // 间距基础倍数 2 | $uni-space-root: 2; 3 | // 边框半径默认值 4 | $uni-radius-root:5px; 5 | // 主色 6 | $uni-primary: #2979ff; 7 | // 辅助色 8 | $uni-success: #4cd964; 9 | // 警告色 10 | $uni-warning: #f0ad4e; 11 | // 错误色 12 | $uni-error: #dd524d; 13 | // 描述色 14 | $uni-info: #909399; 15 | // 中性色 16 | $uni-main-color: #303133; 17 | $uni-base-color: #606266; 18 | $uni-secondary-color: #909399; 19 | $uni-extra-color: #C0C4CC; 20 | // 背景色 21 | $uni-bg-color: #f5f5f5; 22 | // 边框颜色 23 | $uni-border-1: #DCDFE6; 24 | $uni-border-2: #E4E7ED; 25 | $uni-border-3: #EBEEF5; 26 | $uni-border-4: #F2F6FC; 27 | 28 | // 常规色 29 | $uni-black: #000000; 30 | $uni-white: #ffffff; 31 | $uni-transparent: rgba($color: #000000, $alpha: 0); 32 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/tools/functions.scss: -------------------------------------------------------------------------------- 1 | // 合并 map 2 | @function map-deep-merge($parent-map, $child-map){ 3 | $result: $parent-map; 4 | @each $key, $child in $child-map { 5 | $parent-has-key: map-has-key($result, $key); 6 | $parent-value: map-get($result, $key); 7 | $parent-type: type-of($parent-value); 8 | $child-type: type-of($child); 9 | $parent-is-map: $parent-type == map; 10 | $child-is-map: $child-type == map; 11 | 12 | @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ 13 | $result: map-merge($result, ( $key: $child )); 14 | }@else { 15 | $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); 16 | } 17 | } 18 | @return $result; 19 | }; 20 | -------------------------------------------------------------------------------- /uni_modules/uni-transition/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.3.1(2021-11-23) 2 | - 修复 init 方法初始化问题 3 | ## 1.3.0(2021-11-19) 4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) 5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) 6 | ## 1.2.1(2021-09-27) 7 | - 修复 init 方法不生效的 Bug 8 | ## 1.2.0(2021-07-30) 9 | - 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) 10 | ## 1.1.1(2021-05-12) 11 | - 新增 示例地址 12 | - 修复 示例项目缺少组件的 Bug 13 | ## 1.1.0(2021-04-22) 14 | - 新增 通过方法自定义动画 15 | - 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 16 | - 优化 动画触发逻辑,使动画更流畅 17 | - 优化 支持单独的动画类型 18 | - 优化 文档示例 19 | ## 1.0.2(2021-02-05) 20 | - 调整为 uni_modules 目录规范 21 | -------------------------------------------------------------------------------- /uni_modules/uni-icons/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.3.5(2022-01-24) 2 | - 优化 size 属性可以传入不带单位的字符串数值 3 | ## 1.3.4(2022-01-24) 4 | - 优化 size 支持其他单位 5 | ## 1.3.3(2022-01-17) 6 | - 修复 nvue 有些图标不显示的bug,兼容老版本图标 7 | ## 1.3.2(2021-12-01) 8 | - 优化 示例可复制图标名称 9 | ## 1.3.1(2021-11-23) 10 | - 优化 兼容旧组件 type 值 11 | ## 1.3.0(2021-11-19) 12 | - 新增 更多图标 13 | - 优化 自定义图标使用方式 14 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) 15 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) 16 | ## 1.1.7(2021-11-08) 17 | ## 1.2.0(2021-07-30) 18 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) 19 | ## 1.1.5(2021-05-12) 20 | - 新增 组件示例地址 21 | ## 1.1.4(2021-02-05) 22 | - 调整为uni_modules目录规范 23 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/validator.js: -------------------------------------------------------------------------------- 1 | const Validator = { 2 | 3 | Key(keyArray, parameters) { 4 | for (let i = 0; i < keyArray.length; i++) { 5 | const keyName = keyArray[i] 6 | if (typeof parameters[keyName] !== 'string') { 7 | Validator.ThrowNewError(`Invalid ${keyName}`) 8 | } 9 | if (parameters[keyName].length < 1) { 10 | Validator.ThrowNewError(`Invalid ${keyName}`) 11 | } 12 | } 13 | }, 14 | 15 | Value(value) { 16 | if (value === undefined) { 17 | Validator.ThrowNewError('Invalid Value') 18 | } 19 | if (typeof value !== 'object') { 20 | Validator.ThrowNewError('Invalid Value Type') 21 | } 22 | }, 23 | 24 | ThrowNewError(message) { 25 | throw new Error(message) 26 | } 27 | } 28 | 29 | module.exports = { 30 | Validator 31 | } 32 | -------------------------------------------------------------------------------- /static/js/share.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "share", 3 | data() { 4 | return { 5 | 6 | } 7 | }, 8 | onLoad: function() { 9 | wx.showShareMenu({ 10 | withShareTicket: true, 11 | menus: ["shareAppMessage", "shareTimeline"] 12 | }) 13 | }, 14 | //发送给朋友 15 | onShareAppMessage(res) { 16 | let that = this; 17 | if (res.from === 'button') { 18 | let obj = res.target.dataset.obj // 获取 button 组件 自定义的data-obj值 19 | //这块需要传参,不然链接地址进去获取不到数据 20 | // let path = `/` + that.$scope.route + `?item=` + that.$scope.options.item; 21 | let path = '' 22 | return { 23 | title: `${obj.filename}`, 24 | path: path, 25 | imageUrl: '' 26 | }; 27 | } 28 | // 右上角三点 29 | if (res.from === 'menu') { 30 | return { 31 | title: 'Ai对话人工智能', 32 | path: '', 33 | imageUrl: '' 34 | }; 35 | } 36 | }, 37 | // 分享到朋友圈 38 | onShareTimeline() { 39 | return { 40 | title: 'Ai对话人工智能', 41 | path: '', 42 | imageUrl: '' 43 | }; 44 | }, 45 | methods: { 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /uni_modules/uni-id/readme.md: -------------------------------------------------------------------------------- 1 | **文档已移至[uni-id文档](https://uniapp.dcloud.net.cn/uniCloud/uni-id)** 2 | 3 | > 一般uni-id升级大版本时为不兼容更新,从低版本迁移到高版本请参考:[uni-id迁移指南](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=migration) 4 | 5 | ## 重要升级说明 6 | 7 | **uni-id 3.x版本,搭配的uniCloud admin版本需大于1.2.10。** 8 | 9 | ### 缓存角色权限 10 | 11 | 自`uni-id 3.0.0`起,支持在token内缓存用户的角色权限,默认开启此功能,各登录接口的needPermission参数不再生效。如需关闭请在config内配置`"removePermissionAndRoleFromToken": true`。 12 | 13 | 为什么要缓存角色权限?要知道云数据库是按照读写次数来收取费用的,并且读写数据库会拖慢接口响应速度。未配置`"removePermissionAndRoleFromToken": true`的情况下,可以在调用checkToken接口时不查询数据库获取用户角色权限。 14 | 15 | 详细checkToken流程如下: 16 | 17 | ![](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/ed45d350-5a4d-11eb-b997-9918a5dda011.jpg) 18 | 19 | 可以看出,旧版token(removePermissionAndRoleFromToken为true时生成的)在checkToken时如需返回权限需要进行两次数据库查询。新版token不需要查库即可返回权限信息。 20 | 21 | **注意** 22 | 23 | - 由于角色权限缓存在token内,可能会存在权限已经更新但是用户token未过期之前依然是旧版角色权限的情况。可以调短一些token过期时间来减少这种情况的影响。 24 | - admin角色token内不包含permission,如需自行判断用户是否有某个权限,要注意admin角色需要额外判断一下,写法如下 25 | ```js 26 | const { 27 | role, 28 | permission 29 | } = await uniID.checkToken(event.uniIdToken) 30 | if(role.includes('admin') || permission.includes('your permission id')) { 31 | // 当前角色拥有'your permission id'对应的权限 32 | } 33 | ``` -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup-dialog/keypress.js: -------------------------------------------------------------------------------- 1 | // #ifdef H5 2 | export default { 3 | name: 'Keypress', 4 | props: { 5 | disable: { 6 | type: Boolean, 7 | default: false 8 | } 9 | }, 10 | mounted () { 11 | const keyNames = { 12 | esc: ['Esc', 'Escape'], 13 | tab: 'Tab', 14 | enter: 'Enter', 15 | space: [' ', 'Spacebar'], 16 | up: ['Up', 'ArrowUp'], 17 | left: ['Left', 'ArrowLeft'], 18 | right: ['Right', 'ArrowRight'], 19 | down: ['Down', 'ArrowDown'], 20 | delete: ['Backspace', 'Delete', 'Del'] 21 | } 22 | const listener = ($event) => { 23 | if (this.disable) { 24 | return 25 | } 26 | const keyName = Object.keys(keyNames).find(key => { 27 | const keyName = $event.key 28 | const value = keyNames[key] 29 | return value === keyName || (Array.isArray(value) && value.includes(keyName)) 30 | }) 31 | if (keyName) { 32 | // 避免和其他按键事件冲突 33 | setTimeout(() => { 34 | this.$emit(keyName, {}) 35 | }, 0) 36 | } 37 | } 38 | document.addEventListener('keyup', listener) 39 | this.$once('hook:beforeDestroy', () => { 40 | document.removeEventListener('keyup', listener) 41 | }) 42 | }, 43 | render: () => {} 44 | } 45 | // #endif 46 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup/keypress.js: -------------------------------------------------------------------------------- 1 | // #ifdef H5 2 | export default { 3 | name: 'Keypress', 4 | props: { 5 | disable: { 6 | type: Boolean, 7 | default: false 8 | } 9 | }, 10 | mounted () { 11 | const keyNames = { 12 | esc: ['Esc', 'Escape'], 13 | tab: 'Tab', 14 | enter: 'Enter', 15 | space: [' ', 'Spacebar'], 16 | up: ['Up', 'ArrowUp'], 17 | left: ['Left', 'ArrowLeft'], 18 | right: ['Right', 'ArrowRight'], 19 | down: ['Down', 'ArrowDown'], 20 | delete: ['Backspace', 'Delete', 'Del'] 21 | } 22 | const listener = ($event) => { 23 | if (this.disable) { 24 | return 25 | } 26 | const keyName = Object.keys(keyNames).find(key => { 27 | const keyName = $event.key 28 | const value = keyNames[key] 29 | return value === keyName || (Array.isArray(value) && value.includes(keyName)) 30 | }) 31 | if (keyName) { 32 | // 避免和其他按键事件冲突 33 | setTimeout(() => { 34 | this.$emit(keyName, {}) 35 | }, 0) 36 | } 37 | } 38 | document.addEventListener('keyup', listener) 39 | // this.$once('hook:beforeDestroy', () => { 40 | // document.removeEventListener('keyup', listener) 41 | // }) 42 | }, 43 | render: () => {} 44 | } 45 | // #endif 46 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_space.scss: -------------------------------------------------------------------------------- 1 | 2 | @mixin fn($space,$direction,$size,$n) { 3 | @if $n { 4 | #{$space}-#{$direction}: #{$size*$uni-space-root}px 5 | } @else { 6 | #{$space}-#{$direction}: #{-$size*$uni-space-root}px 7 | } 8 | } 9 | @mixin get-styles($direction,$i,$space,$n){ 10 | @if $direction == t { 11 | @include fn($space, top,$i,$n); 12 | } 13 | @if $direction == r { 14 | @include fn($space, right,$i,$n); 15 | } 16 | @if $direction == b { 17 | @include fn($space, bottom,$i,$n); 18 | } 19 | @if $direction == l { 20 | @include fn($space, left,$i,$n); 21 | } 22 | @if $direction == x { 23 | @include fn($space, left,$i,$n); 24 | @include fn($space, right,$i,$n); 25 | } 26 | @if $direction == y { 27 | @include fn($space, top,$i,$n); 28 | @include fn($space, bottom,$i,$n); 29 | } 30 | @if $direction == a { 31 | @if $n { 32 | #{$space}:#{$i*$uni-space-root}px; 33 | } @else { 34 | #{$space}:#{-$i*$uni-space-root}px; 35 | } 36 | } 37 | } 38 | 39 | @each $orientation in m,p { 40 | $space: margin; 41 | @if $orientation == m { 42 | $space: margin; 43 | } @else { 44 | $space: padding; 45 | } 46 | @for $i from 0 through 16 { 47 | @each $direction in t, r, b, l, x, y, a { 48 | .uni-#{$orientation}#{$direction}-#{$i} { 49 | @include get-styles($direction,$i,$space,true); 50 | } 51 | .uni-#{$orientation}#{$direction}-n#{$i} { 52 | @include get-styles($direction,$i,$space,false); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_radius.scss: -------------------------------------------------------------------------------- 1 | @mixin radius($r,$d:null ,$important: false){ 2 | $radius-value:map-get($uni-radius, $r) if($important, !important, null); 3 | // Key exists within the $uni-radius variable 4 | @if (map-has-key($uni-radius, $r) and $d){ 5 | @if $d == t { 6 | border-top-left-radius:$radius-value; 7 | border-top-right-radius:$radius-value; 8 | }@else if $d == r { 9 | border-top-right-radius:$radius-value; 10 | border-bottom-right-radius:$radius-value; 11 | }@else if $d == b { 12 | border-bottom-left-radius:$radius-value; 13 | border-bottom-right-radius:$radius-value; 14 | }@else if $d == l { 15 | border-top-left-radius:$radius-value; 16 | border-bottom-left-radius:$radius-value; 17 | }@else if $d == tl { 18 | border-top-left-radius:$radius-value; 19 | }@else if $d == tr { 20 | border-top-right-radius:$radius-value; 21 | }@else if $d == br { 22 | border-bottom-right-radius:$radius-value; 23 | }@else if $d == bl { 24 | border-bottom-left-radius:$radius-value; 25 | } 26 | }@else{ 27 | border-radius:$radius-value; 28 | } 29 | } 30 | 31 | @each $key, $child in $uni-radius { 32 | @if($key){ 33 | .uni-radius-#{"" + $key} { 34 | @include radius($key) 35 | } 36 | }@else{ 37 | .uni-radius { 38 | @include radius($key) 39 | } 40 | } 41 | } 42 | 43 | @each $direction in t, r, b, l,tl, tr, br, bl { 44 | @each $key, $child in $uni-radius { 45 | @if($key){ 46 | .uni-radius-#{"" + $direction}-#{"" + $key} { 47 | @include radius($key,$direction,false) 48 | } 49 | }@else{ 50 | .uni-radius-#{$direction} { 51 | @include radius($key,$direction,false) 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_color.scss: -------------------------------------------------------------------------------- 1 | 2 | // TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 3 | // @mixin get-styles($k,$c) { 4 | // @if $k == size or $k == weight{ 5 | // font-#{$k}:#{$c} 6 | // }@else{ 7 | // #{$k}:#{$c} 8 | // } 9 | // } 10 | $uni-ui-color:( 11 | // 主色 12 | primary: $uni-primary, 13 | primary-disable: $uni-primary-disable, 14 | primary-light: $uni-primary-light, 15 | // 辅助色 16 | success: $uni-success, 17 | success-disable: $uni-success-disable, 18 | success-light: $uni-success-light, 19 | warning: $uni-warning, 20 | warning-disable: $uni-warning-disable, 21 | warning-light: $uni-warning-light, 22 | error: $uni-error, 23 | error-disable: $uni-error-disable, 24 | error-light: $uni-error-light, 25 | info: $uni-info, 26 | info-disable: $uni-info-disable, 27 | info-light: $uni-info-light, 28 | // 中性色 29 | main-color: $uni-main-color, 30 | base-color: $uni-base-color, 31 | secondary-color: $uni-secondary-color, 32 | extra-color: $uni-extra-color, 33 | // 背景色 34 | bg-color: $uni-bg-color, 35 | // 边框颜色 36 | border-1: $uni-border-1, 37 | border-2: $uni-border-2, 38 | border-3: $uni-border-3, 39 | border-4: $uni-border-4, 40 | // 黑色 41 | black:$uni-black, 42 | // 白色 43 | white:$uni-white, 44 | // 透明 45 | transparent:$uni-transparent 46 | ) !default; 47 | @each $key, $child in $uni-ui-color { 48 | .uni-#{"" + $key} { 49 | color: $child; 50 | } 51 | .uni-#{"" + $key}-bg { 52 | background-color: $child; 53 | } 54 | } 55 | .uni-shadow-sm { 56 | box-shadow: $uni-shadow-sm; 57 | } 58 | .uni-shadow-base { 59 | box-shadow: $uni-shadow-base; 60 | } 61 | .uni-shadow-lg { 62 | box-shadow: $uni-shadow-lg; 63 | } 64 | .uni-mask { 65 | background-color:$uni-mask; 66 | } 67 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/variables.scss: -------------------------------------------------------------------------------- 1 | @import './styles/setting/_variables.scss'; 2 | // 间距基础倍数 3 | $uni-space-root: 2; 4 | // 边框半径默认值 5 | $uni-radius-root:5px; 6 | 7 | // 主色 8 | $uni-primary: #2979ff; 9 | $uni-primary-disable:mix(#fff,$uni-primary,50%); 10 | $uni-primary-light: mix(#fff,$uni-primary,80%); 11 | 12 | // 辅助色 13 | // 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 14 | $uni-success: #18bc37; 15 | $uni-success-disable:mix(#fff,$uni-success,50%); 16 | $uni-success-light: mix(#fff,$uni-success,80%); 17 | 18 | $uni-warning: #f3a73f; 19 | $uni-warning-disable:mix(#fff,$uni-warning,50%); 20 | $uni-warning-light: mix(#fff,$uni-warning,80%); 21 | 22 | $uni-error: #e43d33; 23 | $uni-error-disable:mix(#fff,$uni-error,50%); 24 | $uni-error-light: mix(#fff,$uni-error,80%); 25 | 26 | $uni-info: #8f939c; 27 | $uni-info-disable:mix(#fff,$uni-info,50%); 28 | $uni-info-light: mix(#fff,$uni-info,80%); 29 | 30 | // 中性色 31 | // 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 32 | $uni-main-color: #3a3a3a; // 主要文字 33 | $uni-base-color: #6a6a6a; // 常规文字 34 | $uni-secondary-color: #909399; // 次要文字 35 | $uni-extra-color: #c7c7c7; // 辅助说明 36 | 37 | // 边框颜色 38 | $uni-border-1: #F0F0F0; 39 | $uni-border-2: #EDEDED; 40 | $uni-border-3: #DCDCDC; 41 | $uni-border-4: #B9B9B9; 42 | 43 | // 常规色 44 | $uni-black: #000000; 45 | $uni-white: #ffffff; 46 | $uni-transparent: rgba($color: #000000, $alpha: 0); 47 | 48 | // 背景色 49 | $uni-bg-color: #f7f7f7; 50 | 51 | /* 水平间距 */ 52 | $uni-spacing-sm: 8px; 53 | $uni-spacing-base: 15px; 54 | $uni-spacing-lg: 30px; 55 | 56 | // 阴影 57 | $uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); 58 | $uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); 59 | $uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); 60 | 61 | // 蒙版 62 | $uni-mask: rgba($color: #000000, $alpha: 0.4); 63 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-popup", 3 | "displayName": "uni-popup 弹出层", 4 | "version": "1.8.2", 5 | "description": " Popup 组件,提供常用的弹层", 6 | "keywords": [ 7 | "uni-ui", 8 | "弹出层", 9 | "弹窗", 10 | "popup", 11 | "弹框" 12 | ], 13 | "repository": "https://github.com/dcloudio/uni-ui", 14 | "engines": { 15 | "HBuilderX": "" 16 | }, 17 | "directories": { 18 | "example": "../../temps/example_temps" 19 | }, 20 | "dcloudext": { 21 | "sale": { 22 | "regular": { 23 | "price": "0.00" 24 | }, 25 | "sourcecode": { 26 | "price": "0.00" 27 | } 28 | }, 29 | "contact": { 30 | "qq": "" 31 | }, 32 | "declaration": { 33 | "ads": "无", 34 | "data": "无", 35 | "permissions": "无" 36 | }, 37 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", 38 | "type": "component-vue" 39 | }, 40 | "uni_modules": { 41 | "dependencies": [ 42 | "uni-scss", 43 | "uni-transition" 44 | ], 45 | "encrypt": [], 46 | "platforms": { 47 | "cloud": { 48 | "tcb": "y", 49 | "aliyun": "y" 50 | }, 51 | "client": { 52 | "App": { 53 | "app-vue": "y", 54 | "app-nvue": "y" 55 | }, 56 | "H5-mobile": { 57 | "Safari": "y", 58 | "Android Browser": "y", 59 | "微信浏览器(Android)": "y", 60 | "QQ浏览器(Android)": "y" 61 | }, 62 | "H5-pc": { 63 | "Chrome": "y", 64 | "IE": "y", 65 | "Edge": "y", 66 | "Firefox": "y", 67 | "Safari": "y" 68 | }, 69 | "小程序": { 70 | "微信": "y", 71 | "阿里": "y", 72 | "百度": "y", 73 | "字节跳动": "y", 74 | "QQ": "y" 75 | }, 76 | "快应用": { 77 | "华为": "u", 78 | "联盟": "u" 79 | }, 80 | "Vue": { 81 | "vue2": "y", 82 | "vue3": "y" 83 | } 84 | } 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-config-center", 3 | "displayName": "uni-config-center", 4 | "version": "0.0.3", 5 | "description": "uniCloud 配置中心", 6 | "keywords": [ 7 | "配置", 8 | "配置中心" 9 | ], 10 | "repository": "", 11 | "engines": { 12 | "HBuilderX": "^3.1.0" 13 | }, 14 | "dcloudext": { 15 | "sale": { 16 | "regular": { 17 | "price": "0.00" 18 | }, 19 | "sourcecode": { 20 | "price": "0.00" 21 | } 22 | }, 23 | "contact": { 24 | "qq": "" 25 | }, 26 | "declaration": { 27 | "ads": "无", 28 | "data": "无", 29 | "permissions": "无" 30 | }, 31 | "npmurl": "", 32 | "type": "unicloud-template-function" 33 | }, 34 | "directories": { 35 | "example": "../../../scripts/dist" 36 | }, 37 | "uni_modules": { 38 | "dependencies": [], 39 | "encrypt": [], 40 | "platforms": { 41 | "cloud": { 42 | "tcb": "y", 43 | "aliyun": "y" 44 | }, 45 | "client": { 46 | "App": { 47 | "app-vue": "u", 48 | "app-nvue": "u" 49 | }, 50 | "H5-mobile": { 51 | "Safari": "u", 52 | "Android Browser": "u", 53 | "微信浏览器(Android)": "u", 54 | "QQ浏览器(Android)": "u" 55 | }, 56 | "H5-pc": { 57 | "Chrome": "u", 58 | "IE": "u", 59 | "Edge": "u", 60 | "Firefox": "u", 61 | "Safari": "u" 62 | }, 63 | "小程序": { 64 | "微信": "u", 65 | "阿里": "u", 66 | "百度": "u", 67 | "字节跳动": "u", 68 | "QQ": "u" 69 | }, 70 | "快应用": { 71 | "华为": "u", 72 | "联盟": "u" 73 | }, 74 | "Vue": { 75 | "vue2": "y", 76 | "vue3": "u" 77 | } 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-scss", 3 | "displayName": "uni-scss 辅助样式", 4 | "version": "1.0.3", 5 | "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", 6 | "keywords": [ 7 | "uni-scss", 8 | "uni-ui", 9 | "辅助样式" 10 | ], 11 | "repository": "https://github.com/dcloudio/uni-ui", 12 | "engines": { 13 | "HBuilderX": "^3.1.0" 14 | }, 15 | "dcloudext": { 16 | "category": [ 17 | "JS SDK", 18 | "通用 SDK" 19 | ], 20 | "sale": { 21 | "regular": { 22 | "price": "0.00" 23 | }, 24 | "sourcecode": { 25 | "price": "0.00" 26 | } 27 | }, 28 | "contact": { 29 | "qq": "" 30 | }, 31 | "declaration": { 32 | "ads": "无", 33 | "data": "无", 34 | "permissions": "无" 35 | }, 36 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" 37 | }, 38 | "uni_modules": { 39 | "dependencies": [], 40 | "encrypt": [], 41 | "platforms": { 42 | "cloud": { 43 | "tcb": "y", 44 | "aliyun": "y" 45 | }, 46 | "client": { 47 | "App": { 48 | "app-vue": "y", 49 | "app-nvue": "u" 50 | }, 51 | "H5-mobile": { 52 | "Safari": "y", 53 | "Android Browser": "y", 54 | "微信浏览器(Android)": "y", 55 | "QQ浏览器(Android)": "y" 56 | }, 57 | "H5-pc": { 58 | "Chrome": "y", 59 | "IE": "y", 60 | "Edge": "y", 61 | "Firefox": "y", 62 | "Safari": "y" 63 | }, 64 | "小程序": { 65 | "微信": "y", 66 | "阿里": "y", 67 | "百度": "y", 68 | "字节跳动": "y", 69 | "QQ": "y" 70 | }, 71 | "快应用": { 72 | "华为": "n", 73 | "联盟": "n" 74 | }, 75 | "Vue": { 76 | "vue2": "y", 77 | "vue3": "y" 78 | } 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#c8c7cc; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:12px; 43 | $uni-font-size-base:14px; 44 | $uni-font-size-lg:16; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:20px; 48 | $uni-img-size-base:26px; 49 | $uni-img-size-lg:40px; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 2px; 53 | $uni-border-radius-base: 3px; 54 | $uni-border-radius-lg: 6px; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 5px; 59 | $uni-spacing-row-base: 10px; 60 | $uni-spacing-row-lg: 15px; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 4px; 64 | $uni-spacing-col-base: 8px; 65 | $uni-spacing-col-lg: 12px; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:20px; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:26px; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:15px; 77 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-open-bridge-common", 3 | "displayName": "uni-open-bridge-common", 4 | "version": "1.0.4", 5 | "description": "统一接管微信等三方平台认证凭据", 6 | "keywords": [ 7 | "uni-open-bridge-common", 8 | "access_token", 9 | "session_key", 10 | "ticket" 11 | ], 12 | "repository": "", 13 | "engines": { 14 | "HBuilderX": "^3.5.2" 15 | }, 16 | "dcloudext": { 17 | "type": "unicloud-template-function", 18 | "sale": { 19 | "regular": { 20 | "price": "0.00" 21 | }, 22 | "sourcecode": { 23 | "price": "0.00" 24 | } 25 | }, 26 | "contact": { 27 | "qq": "" 28 | }, 29 | "declaration": { 30 | "ads": "无", 31 | "data": "无", 32 | "permissions": "无" 33 | }, 34 | "npmurl": "" 35 | }, 36 | "uni_modules": { 37 | "dependencies": [], 38 | "encrypt": [], 39 | "platforms": { 40 | "cloud": { 41 | "tcb": "y", 42 | "aliyun": "y" 43 | }, 44 | "client": { 45 | "Vue": { 46 | "vue2": "u", 47 | "vue3": "u" 48 | }, 49 | "App": { 50 | "app-vue": "u", 51 | "app-nvue": "u" 52 | }, 53 | "H5-mobile": { 54 | "Safari": "u", 55 | "Android Browser": "u", 56 | "微信浏览器(Android)": "u", 57 | "QQ浏览器(Android)": "u" 58 | }, 59 | "H5-pc": { 60 | "Chrome": "u", 61 | "IE": "u", 62 | "Edge": "u", 63 | "Firefox": "u", 64 | "Safari": "u" 65 | }, 66 | "小程序": { 67 | "微信": "u", 68 | "阿里": "u", 69 | "百度": "u", 70 | "字节跳动": "u", 71 | "QQ": "u", 72 | "钉钉": "u", 73 | "快手": "u", 74 | "飞书": "u", 75 | "京东": "u" 76 | }, 77 | "快应用": { 78 | "华为": "u", 79 | "联盟": "u" 80 | } 81 | } 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /uni_modules/uni-icons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-icons", 3 | "displayName": "uni-icons 图标", 4 | "version": "1.3.5", 5 | "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", 6 | "keywords": [ 7 | "uni-ui", 8 | "uniui", 9 | "icon", 10 | "图标" 11 | ], 12 | "repository": "https://github.com/dcloudio/uni-ui", 13 | "engines": { 14 | "HBuilderX": "^3.2.14" 15 | }, 16 | "directories": { 17 | "example": "../../temps/example_temps" 18 | }, 19 | "dcloudext": { 20 | "category": [ 21 | "前端组件", 22 | "通用组件" 23 | ], 24 | "sale": { 25 | "regular": { 26 | "price": "0.00" 27 | }, 28 | "sourcecode": { 29 | "price": "0.00" 30 | } 31 | }, 32 | "contact": { 33 | "qq": "" 34 | }, 35 | "declaration": { 36 | "ads": "无", 37 | "data": "无", 38 | "permissions": "无" 39 | }, 40 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" 41 | }, 42 | "uni_modules": { 43 | "dependencies": ["uni-scss"], 44 | "encrypt": [], 45 | "platforms": { 46 | "cloud": { 47 | "tcb": "y", 48 | "aliyun": "y" 49 | }, 50 | "client": { 51 | "App": { 52 | "app-vue": "y", 53 | "app-nvue": "y" 54 | }, 55 | "H5-mobile": { 56 | "Safari": "y", 57 | "Android Browser": "y", 58 | "微信浏览器(Android)": "y", 59 | "QQ浏览器(Android)": "y" 60 | }, 61 | "H5-pc": { 62 | "Chrome": "y", 63 | "IE": "y", 64 | "Edge": "y", 65 | "Firefox": "y", 66 | "Safari": "y" 67 | }, 68 | "小程序": { 69 | "微信": "y", 70 | "阿里": "y", 71 | "百度": "y", 72 | "字节跳动": "y", 73 | "QQ": "y" 74 | }, 75 | "快应用": { 76 | "华为": "u", 77 | "联盟": "u" 78 | }, 79 | "Vue": { 80 | "vue2": "y", 81 | "vue3": "y" 82 | } 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /uni_modules/uni-id/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-id", 3 | "displayName": "uni-id", 4 | "version": "3.3.29", 5 | "description": "简单、统一、可扩展的用户中心", 6 | "keywords": [ 7 | "uniid", 8 | "uni-id", 9 | "用户管理", 10 | "用户中心", 11 | "短信验证码" 12 | ], 13 | "repository": "https://gitee.com/dcloud/uni-id.git", 14 | "engines": { 15 | "HBuilderX": "^3.1.0" 16 | }, 17 | "dcloudext": { 18 | "sale": { 19 | "regular": { 20 | "price": "0.00" 21 | }, 22 | "sourcecode": { 23 | "price": "0.00" 24 | } 25 | }, 26 | "contact": { 27 | "qq": "" 28 | }, 29 | "declaration": { 30 | "ads": "无", 31 | "data": "无", 32 | "permissions": "无" 33 | }, 34 | "npmurl": "", 35 | "type": "unicloud-template-function" 36 | }, 37 | "uni_modules": { 38 | "dependencies": ["uni-config-center", "uni-open-bridge-common"], 39 | "encrypt": [], 40 | "platforms": { 41 | "cloud": { 42 | "tcb": "y", 43 | "aliyun": "y" 44 | }, 45 | "client": { 46 | "App": { 47 | "app-vue": "u", 48 | "app-nvue": "u" 49 | }, 50 | "H5-mobile": { 51 | "Safari": "u", 52 | "Android Browser": "u", 53 | "微信浏览器(Android)": "u", 54 | "QQ浏览器(Android)": "u" 55 | }, 56 | "H5-pc": { 57 | "Chrome": "u", 58 | "IE": "u", 59 | "Edge": "u", 60 | "Firefox": "u", 61 | "Safari": "u" 62 | }, 63 | "小程序": { 64 | "微信": "u", 65 | "阿里": "u", 66 | "百度": "u", 67 | "字节跳动": "u", 68 | "QQ": "u", 69 | "钉钉": "u", 70 | "快手": "u", 71 | "飞书": "u", 72 | "京东": "u" 73 | }, 74 | "快应用": { 75 | "华为": "u", 76 | "联盟": "u" 77 | }, 78 | "Vue": { 79 | "vue2": "y", 80 | "vue3": "u" 81 | } 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /uni_modules/uni-transition/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-transition", 3 | "displayName": "uni-transition 过渡动画", 4 | "version": "1.3.1", 5 | "description": "元素的简单过渡动画", 6 | "keywords": [ 7 | "uni-ui", 8 | "uniui", 9 | "动画", 10 | "过渡", 11 | "过渡动画" 12 | ], 13 | "repository": "https://github.com/dcloudio/uni-ui", 14 | "engines": { 15 | "HBuilderX": "" 16 | }, 17 | "directories": { 18 | "example": "../../temps/example_temps" 19 | }, 20 | "dcloudext": { 21 | "category": [ 22 | "前端组件", 23 | "通用组件" 24 | ], 25 | "sale": { 26 | "regular": { 27 | "price": "0.00" 28 | }, 29 | "sourcecode": { 30 | "price": "0.00" 31 | } 32 | }, 33 | "contact": { 34 | "qq": "" 35 | }, 36 | "declaration": { 37 | "ads": "无", 38 | "data": "无", 39 | "permissions": "无" 40 | }, 41 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" 42 | }, 43 | "uni_modules": { 44 | "dependencies": ["uni-scss"], 45 | "encrypt": [], 46 | "platforms": { 47 | "cloud": { 48 | "tcb": "y", 49 | "aliyun": "y" 50 | }, 51 | "client": { 52 | "App": { 53 | "app-vue": "y", 54 | "app-nvue": "y" 55 | }, 56 | "H5-mobile": { 57 | "Safari": "y", 58 | "Android Browser": "y", 59 | "微信浏览器(Android)": "y", 60 | "QQ浏览器(Android)": "y" 61 | }, 62 | "H5-pc": { 63 | "Chrome": "y", 64 | "IE": "y", 65 | "Edge": "y", 66 | "Firefox": "y", 67 | "Safari": "y" 68 | }, 69 | "小程序": { 70 | "微信": "y", 71 | "阿里": "y", 72 | "百度": "y", 73 | "字节跳动": "y", 74 | "QQ": "y" 75 | }, 76 | "快应用": { 77 | "华为": "u", 78 | "联盟": "u" 79 | }, 80 | "Vue": { 81 | "vue2": "y", 82 | "vue3": "y" 83 | } 84 | } 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /uni_modules/uni-row/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-row", 3 | "displayName": "uni-row 布局-行", 4 | "version": "1.0.0", 5 | "description": "流式栅格系统,随着屏幕或视口分为 24 份,可以迅速简便地创建布局。", 6 | "keywords": [ 7 | "uni-ui", 8 | "uniui", 9 | "栅格", 10 | "布局", 11 | "layout" 12 | ], 13 | "repository": "https://github.com/dcloudio/uni-ui", 14 | "engines": { 15 | "HBuilderX": "" 16 | }, 17 | "directories": { 18 | "example": "../../temps/example_temps" 19 | }, 20 | "dcloudext": { 21 | "category": [ 22 | "前端组件", 23 | "通用组件" 24 | ], 25 | "sale": { 26 | "regular": { 27 | "price": "0.00" 28 | }, 29 | "sourcecode": { 30 | "price": "0.00" 31 | } 32 | }, 33 | "contact": { 34 | "qq": "" 35 | }, 36 | "declaration": { 37 | "ads": "无", 38 | "data": "无", 39 | "permissions": "无" 40 | }, 41 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" 42 | }, 43 | "uni_modules": { 44 | "dependencies": ["uni-scss"], 45 | "encrypt": [], 46 | "platforms": { 47 | "cloud": { 48 | "tcb": "y", 49 | "aliyun": "y" 50 | }, 51 | "client": { 52 | "App": { 53 | "app-vue": "y", 54 | "app-nvue": "y" 55 | }, 56 | "H5-mobile": { 57 | "Safari": "y", 58 | "Android Browser": "y", 59 | "微信浏览器(Android)": "y", 60 | "QQ浏览器(Android)": "y" 61 | }, 62 | "H5-pc": { 63 | "Chrome": "y", 64 | "IE": "y", 65 | "Edge": "y", 66 | "Firefox": "y", 67 | "Safari": "y" 68 | }, 69 | "小程序": { 70 | "微信": "y", 71 | "阿里": "y", 72 | "百度": "y", 73 | "字节跳动": "y", 74 | "QQ": "y" 75 | }, 76 | "快应用": { 77 | "华为": "u", 78 | "联盟": "u" 79 | }, 80 | "Vue": { 81 | "vue2": "y", 82 | "vue3": "u" 83 | } 84 | } 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /uni_modules/uni-popup/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.8.2(2023-02-02) 2 | - uni-popup-dialog 组件新增 inputType 属性 3 | ## 1.8.1(2022-12-01) 4 | - 修复 nvue 下 v-show 报错 5 | ## 1.8.0(2022-11-29) 6 | - 优化 主题样式 7 | ## 1.7.9(2022-04-02) 8 | - 修复 弹出层内部无法滚动的bug 9 | ## 1.7.8(2022-03-28) 10 | - 修复 小程序中高度错误的bug 11 | ## 1.7.7(2022-03-17) 12 | - 修复 快速调用open出现问题的Bug 13 | ## 1.7.6(2022-02-14) 14 | - 修复 safeArea 属性不能设置为false的bug 15 | ## 1.7.5(2022-01-19) 16 | - 修复 isMaskClick 失效的bug 17 | ## 1.7.4(2022-01-19) 18 | - 新增 cancelText \ confirmText 属性 ,可自定义文本 19 | - 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 20 | - 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 21 | ## 1.7.3(2022-01-13) 22 | - 修复 设置 safeArea 属性不生效的bug 23 | ## 1.7.2(2021-11-26) 24 | - 优化 组件示例 25 | ## 1.7.1(2021-11-26) 26 | - 修复 vuedoc 文字错误 27 | ## 1.7.0(2021-11-19) 28 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) 29 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) 30 | ## 1.6.2(2021-08-24) 31 | - 新增 支持国际化 32 | ## 1.6.1(2021-07-30) 33 | - 优化 vue3下事件警告的问题 34 | ## 1.6.0(2021-07-13) 35 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) 36 | ## 1.5.0(2021-06-23) 37 | - 新增 mask-click 遮罩层点击事件 38 | ## 1.4.5(2021-06-22) 39 | - 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug 40 | ## 1.4.4(2021-06-18) 41 | - 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug 42 | ## 1.4.3(2021-06-08) 43 | - 修复 错误的 watch 字段 44 | - 修复 safeArea 属性不生效的问题 45 | - 修复 点击内容,再点击遮罩无法关闭的Bug 46 | ## 1.4.2(2021-05-12) 47 | - 新增 组件示例地址 48 | ## 1.4.1(2021-04-29) 49 | - 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 50 | ## 1.4.0 (2021-04-29) 51 | - 新增 type 属性的 left\right 值,支持左右弹出 52 | - 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 53 | - 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 54 | - 新增 safeArea 属性,是否适配底部安全区 55 | - 修复 App\h5\微信小程序底部安全区占位不对的Bug 56 | - 修复 App 端弹出等待的Bug 57 | - 优化 提升低配设备性能,优化动画卡顿问题 58 | - 优化 更简单的组件自定义方式 59 | ## 1.2.9(2021-02-05) 60 | - 优化 组件引用关系,通过uni_modules引用组件 61 | ## 1.2.8(2021-02-05) 62 | - 调整为uni_modules目录规范 63 | ## 1.2.7(2021-02-05) 64 | - 调整为uni_modules目录规范 65 | - 新增 支持 PC 端 66 | - 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 67 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { 4 | PlatformType 5 | } = require('./consts.js') 6 | 7 | const configCenter = require('uni-config-center') 8 | 9 | const OauthConfig = { 10 | 'weixin-mp': ['mp-weixin', 'oauth', 'weixin'], 11 | 'weixin-h5': ['web', 'oauth', 'weixin-h5'] 12 | } 13 | 14 | class ConfigBase { 15 | 16 | constructor() { 17 | this._ready = false 18 | this._uniId = null 19 | 20 | const uniIdConfig = configCenter({ 21 | pluginId: 'uni-id' 22 | }) 23 | 24 | this._uniId = uniIdConfig.config() 25 | 26 | this._ready = true 27 | } 28 | 29 | getAppConfig(appid) { 30 | if (Array.isArray(this._uniId)) { 31 | return this._uniId.find((item) => { 32 | return (item.dcloudAppid === appid) 33 | }) 34 | } 35 | return this._uniId 36 | } 37 | 38 | get ready() { 39 | return this._ready 40 | } 41 | } 42 | 43 | class AppConfig extends ConfigBase { 44 | 45 | constructor() { 46 | super() 47 | } 48 | 49 | get(appid, platform) { 50 | if (!this.isSupport(platform)) { 51 | return null 52 | } 53 | 54 | let appConfig = this.getAppConfig(appid) 55 | if (!appConfig) { 56 | return null 57 | } 58 | 59 | return this.getOauthConfig(appConfig, platform) 60 | } 61 | 62 | isSupport(platformName) { 63 | return (AppConfig.Support_Platforms.indexOf(platformName) >= 0) 64 | } 65 | 66 | getOauthConfig(appConfig, platformName) { 67 | let tree = OauthConfig[platformName] 68 | let node = appConfig 69 | for (let i = 0; i < tree.length; i++) { 70 | let nodeName = tree[i] 71 | if (node[nodeName]) { 72 | node = node[nodeName] 73 | } else { 74 | node = null 75 | break 76 | } 77 | } 78 | 79 | if (node && node.appid && node.appsecret) { 80 | return { 81 | appid: node.appid, 82 | secret: node.appsecret 83 | } 84 | } 85 | 86 | return null 87 | } 88 | } 89 | 90 | AppConfig.Support_Platforms = [PlatformType.WEIXIN_MP, PlatformType.WEIXIN_H5] 91 | 92 | 93 | module.exports = { 94 | AppConfig 95 | }; 96 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate11.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 88 | -------------------------------------------------------------------------------- /uni_modules/uni-icons/components/uni-icons/uni-icons.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 80 | 81 | 97 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseImg.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 87 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate10.vue: -------------------------------------------------------------------------------- 1 | 65 | 66 | 98 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate2.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate3.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate4.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate5.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate6.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate7.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate8.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate9.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 99 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/storage.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { 4 | Validator 5 | } = require('./validator.js') 6 | 7 | const { 8 | CacheKeyCascade 9 | } = require('./uni-cloud-cache.js') 10 | 11 | class Storage { 12 | 13 | constructor(type, keys) { 14 | this._type = type || null 15 | this._keys = keys || [] 16 | } 17 | 18 | async get(key, fallback) { 19 | this.validateKey(key) 20 | const result = await this.create(key, fallback).get() 21 | return result.value 22 | } 23 | 24 | async set(key, value, expiresIn) { 25 | this.validateKey(key) 26 | this.validateValue(value) 27 | const expires_in = this.getExpiresIn(expiresIn) 28 | if (expires_in !== 0) { 29 | await this.create(key).set(this.getValue(value), expires_in) 30 | } 31 | } 32 | 33 | async remove(key) { 34 | this.validateKey(key) 35 | await this.create(key).remove() 36 | } 37 | 38 | async ttl(key) { 39 | this.validateKey(key) 40 | // 后续考虑支持 41 | } 42 | 43 | getKeyString(key) { 44 | const keyArray = [Storage.Prefix] 45 | this._keys.forEach((name) => { 46 | keyArray.push(key[name]) 47 | }) 48 | keyArray.push(this._type) 49 | return keyArray.join(':') 50 | } 51 | 52 | getValue(value) { 53 | return value 54 | } 55 | 56 | getExpiresIn(value) { 57 | if (value !== undefined) { 58 | return value 59 | } 60 | return -1 61 | } 62 | 63 | validateKey(key) { 64 | Validator.Key(this._keys, key) 65 | } 66 | 67 | validateValue(value) { 68 | Validator.Value(value) 69 | } 70 | 71 | create(key, fallback) { 72 | const keyString = this.getKeyString(key) 73 | const options = { 74 | layers: [{ 75 | type: 'database', 76 | key: keyString 77 | }, { 78 | type: 'redis', 79 | key: keyString 80 | }] 81 | } 82 | if (fallback !== null) { 83 | const fallbackFunction = fallback || this.fallback 84 | if (fallbackFunction) { 85 | options.fallback = async () => { 86 | return await fallbackFunction(key) 87 | } 88 | } 89 | } 90 | return new CacheKeyCascade(options) 91 | } 92 | } 93 | Storage.Prefix = "uni-id" 94 | 95 | const Factory = { 96 | 97 | async Get(T, key, fallback) { 98 | return await Factory.MakeUnique(T).get(key, fallback) 99 | }, 100 | 101 | async Set(T, key, value, expiresIn) { 102 | await Factory.MakeUnique(T).set(key, value, expiresIn) 103 | }, 104 | 105 | async Remove(T, key) { 106 | await Factory.MakeUnique(T).remove(key) 107 | }, 108 | 109 | MakeUnique(T) { 110 | return new T() 111 | } 112 | } 113 | 114 | module.exports = { 115 | Storage, 116 | Factory 117 | }; 118 | -------------------------------------------------------------------------------- /components/u-parse/readme.md: -------------------------------------------------------------------------------- 1 | ## uParse 适用于 uni-app/mpvue 的富文本解析组件 2 | 3 | > 支持 Html、Markdown 解析,Fork自: [mpvue-wxParse](https://github.com/F-loat/mpvue-wxParse) 4 | 5 | 6 | ## 属性 7 | 8 | | 名称 | 类型 | 默认值 | 描述 | 9 | | -----------------|--------------- | ------------- | ---------------- | 10 | | loading | Boolean | false | 数据加载状态 | 11 | | className | String | — | 自定义 class 名称 | 12 | | content | String | — | 渲染内容 | 13 | | noData | String | 数据不能为空 | 空数据时的渲染展示 | 14 | | startHandler | Function | 见源码 | 自定义 parser 函数 | 15 | | endHandler | Function | null | 自定义 parser 函数 | 16 | | charsHandler | Function | null | 自定义 parser 函数 | 17 | | imageProp | Object | 见下文 | 图片相关参数 | 18 | 19 | ### 自定义 parser 函数具体介绍 20 | 21 | * 传入的参数为当前节点 `node` 对象及解析结果 `results` 对象,例如 `startHandler(node, results)` 22 | * 无需返回值,通过对传入的参数直接操作来完成需要的改动 23 | * 自定义函数会在原解析函数处理之后执行 24 | 25 | ### imageProp 对象具体属性 26 | 27 | | 名称 | 类型 | 默认值 | 描述 | 28 | | -----------------|--------------- | ------------- | ------------------ | 29 | | mode | String | 'aspectFit' | 图片裁剪、缩放的模式 | 30 | | padding | Number | 0 | 图片内边距 | 31 | | lazyLoad | Boolean | false | 图片懒加载 | 32 | | domain | String | '' | 图片服务域名 | 33 | 34 | ## 事件 35 | 36 | | 名称 | 参数 | 描述 | 37 | | -----------------|----------------- | ---------------- | 38 | | preview | 图片地址,原始事件 | 预览图片时触发 | 39 | | navigate | 链接地址,原始事件 | 点击链接时触发 | 40 | 41 | ## 基本使用方法 42 | 43 | 44 | ``` vue 45 | 50 | 51 | 73 | 74 | 77 | ``` 78 | 79 | 80 | ## 渲染 Markdown 81 | 82 | > 先将 markdown 转换为 html 即可 83 | 84 | ``` 85 | npm install marked 86 | ``` 87 | 88 | ``` js 89 | import marked from 'marked' 90 | import uParse from '@/components/u-parse/u-parse.vue' 91 | 92 | export default { 93 | components: { 94 | uParse 95 | }, 96 | data () { 97 | return { 98 | article: marked(`#hello, markdown!`) 99 | } 100 | } 101 | } 102 | ``` 103 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate1.vue: -------------------------------------------------------------------------------- 1 | 67 | 68 | 100 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/readme.md: -------------------------------------------------------------------------------- 1 | # 为什么使用uni-config-center 2 | 3 | 实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构 4 | 5 | ```bash 6 | cloudfunctions 7 | └─────common 公共模块 8 | ├─plugin-a // 插件A对应的目录 9 | │ ├─index.js 10 | │ ├─config.json // plugin-a对应的配置文件 11 | │ └─other-file.cert // plugin-a依赖的其他文件 12 | └─plugin-b // plugin-b对应的目录 13 | ├─index.js 14 | └─config.json // plugin-b对应的配置文件 15 | ``` 16 | 17 | 假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。 18 | 19 | uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下 20 | 21 | ```bash 22 | cloudfunctions 23 | └─────common 公共模块 24 | ├─plugin-a // 插件A对应的目录 25 | │ └─index.js 26 | ├─plugin-b // plugin-b对应的目录 27 | │ └─index.js 28 | └─uni-config-center 29 | ├─index.js // config-center入口文件 30 | ├─plugin-a 31 | │ ├─config.json // plugin-a对应的配置文件 32 | │ └─other-file.cert // plugin-a依赖的其他文件 33 | └─plugin-b 34 | └─config.json // plugin-b对应的配置文件 35 | ``` 36 | 37 | 使用uni-config-center后的优势 38 | 39 | - 配置文件统一管理,分离插件主体和配置信息,更新插件更方便 40 | - 支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持) 41 | 42 | # 用法 43 | 44 | 在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common) 45 | 46 | ```js 47 | const createConfig = require('uni-config-center') 48 | 49 | const uniIdConfig = createConfig({ 50 | pluginId: 'uni-id', // 插件id 51 | defaultConfig: { // 默认配置 52 | tokenExpiresIn: 7200, 53 | tokenExpiresThreshold: 600, 54 | }, 55 | customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并 56 | // defaudltConfig 默认配置 57 | // userConfig 用户配置 58 | return Object.assign(defaultConfig, userConfig) 59 | } 60 | }) 61 | 62 | 63 | // 以如下配置为例 64 | // { 65 | // "tokenExpiresIn": 7200, 66 | // "passwordErrorLimit": 6, 67 | // "bindTokenToDevice": false, 68 | // "passwordErrorRetryTime": 3600, 69 | // "app-plus": { 70 | // "tokenExpiresIn": 2592000 71 | // }, 72 | // "service": { 73 | // "sms": { 74 | // "codeExpiresIn": 300 75 | // } 76 | // } 77 | // } 78 | 79 | // 获取配置 80 | uniIdConfig.config() // 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象 81 | uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置,返回:7200 82 | uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置,返回:300 83 | uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置,如果不存在则取传入的默认值,返回:600 84 | 85 | // 获取文件绝对路径 86 | uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径 87 | 88 | // 引用文件(require) 89 | uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。 90 | 91 | // 判断是否包含某文件 92 | uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件,true: 文件存在,false: 文件不存在 93 | ``` -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "chatgpt", 3 | "appid" : "__UNI__F590AE6", 4 | "description" : "", 5 | "versionName" : "1.0.0", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | /* 5+App特有相关 */ 9 | "app-plus" : { 10 | "usingComponents" : true, 11 | "nvueStyleCompiler" : "uni-app", 12 | "compilerVersion" : 3, 13 | "splashscreen" : { 14 | "alwaysShowBeforeRender" : true, 15 | "waiting" : true, 16 | "autoclose" : true, 17 | "delay" : 0 18 | }, 19 | /* 模块配置 */ 20 | "modules" : {}, 21 | /* 应用发布信息 */ 22 | "distribute" : { 23 | /* android打包配置 */ 24 | "android" : { 25 | "permissions" : [ 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "", 37 | "", 38 | "", 39 | "", 40 | "" 41 | ] 42 | }, 43 | /* ios打包配置 */ 44 | "ios" : {}, 45 | /* SDK配置 */ 46 | "sdkConfigs" : {} 47 | } 48 | }, 49 | /* 快应用特有相关 */ 50 | "quickapp" : {}, 51 | /* 小程序特有相关 */ 52 | "mp-weixin" : { 53 | "appid" : "wx65bc147a16159dcf", 54 | "setting" : { 55 | "urlCheck" : false 56 | }, 57 | "usingComponents" : true, 58 | "uniStatistics" : { 59 | "enable" : false 60 | } 61 | }, 62 | "mp-alipay" : { 63 | "usingComponents" : true 64 | }, 65 | "mp-baidu" : { 66 | "usingComponents" : true 67 | }, 68 | "mp-toutiao" : { 69 | "usingComponents" : true 70 | }, 71 | "uniStatistics" : { 72 | "enable" : false 73 | }, 74 | "vueVersion" : "2", 75 | "h5" : { 76 | "title" : "Ai对话人工智能" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /components/u-parse/u-parse.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 17 | 18 | 119 | -------------------------------------------------------------------------------- /components/u-parse/components/wxParseTemplate0.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 108 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 74 | 144 | -------------------------------------------------------------------------------- /uni_modules/uni-transition/components/uni-transition/createAnimation.js: -------------------------------------------------------------------------------- 1 | // const defaultOption = { 2 | // duration: 300, 3 | // timingFunction: 'linear', 4 | // delay: 0, 5 | // transformOrigin: '50% 50% 0' 6 | // } 7 | // #ifdef APP-NVUE 8 | const nvueAnimation = uni.requireNativePlugin('animation') 9 | // #endif 10 | class MPAnimation { 11 | constructor(options, _this) { 12 | this.options = options 13 | this.animation = uni.createAnimation(options) 14 | this.currentStepAnimates = {} 15 | this.next = 0 16 | this.$ = _this 17 | 18 | } 19 | 20 | _nvuePushAnimates(type, args) { 21 | let aniObj = this.currentStepAnimates[this.next] 22 | let styles = {} 23 | if (!aniObj) { 24 | styles = { 25 | styles: {}, 26 | config: {} 27 | } 28 | } else { 29 | styles = aniObj 30 | } 31 | if (animateTypes1.includes(type)) { 32 | if (!styles.styles.transform) { 33 | styles.styles.transform = '' 34 | } 35 | let unit = '' 36 | if(type === 'rotate'){ 37 | unit = 'deg' 38 | } 39 | styles.styles.transform += `${type}(${args+unit}) ` 40 | } else { 41 | styles.styles[type] = `${args}` 42 | } 43 | this.currentStepAnimates[this.next] = styles 44 | } 45 | _animateRun(styles = {}, config = {}) { 46 | let ref = this.$.$refs['ani'].ref 47 | if (!ref) return 48 | return new Promise((resolve, reject) => { 49 | nvueAnimation.transition(ref, { 50 | styles, 51 | ...config 52 | }, res => { 53 | resolve() 54 | }) 55 | }) 56 | } 57 | 58 | _nvueNextAnimate(animates, step = 0, fn) { 59 | let obj = animates[step] 60 | if (obj) { 61 | let { 62 | styles, 63 | config 64 | } = obj 65 | this._animateRun(styles, config).then(() => { 66 | step += 1 67 | this._nvueNextAnimate(animates, step, fn) 68 | }) 69 | } else { 70 | this.currentStepAnimates = {} 71 | typeof fn === 'function' && fn() 72 | this.isEnd = true 73 | } 74 | } 75 | 76 | step(config = {}) { 77 | // #ifndef APP-NVUE 78 | this.animation.step(config) 79 | // #endif 80 | // #ifdef APP-NVUE 81 | this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) 82 | this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin 83 | this.next++ 84 | // #endif 85 | return this 86 | } 87 | 88 | run(fn) { 89 | // #ifndef APP-NVUE 90 | this.$.animationData = this.animation.export() 91 | this.$.timer = setTimeout(() => { 92 | typeof fn === 'function' && fn() 93 | }, this.$.durationTime) 94 | // #endif 95 | // #ifdef APP-NVUE 96 | this.isEnd = false 97 | let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref 98 | if(!ref) return 99 | this._nvueNextAnimate(this.currentStepAnimates, 0, fn) 100 | this.next = 0 101 | // #endif 102 | } 103 | } 104 | 105 | 106 | const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 107 | 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 108 | 'translateZ' 109 | ] 110 | const animateTypes2 = ['opacity', 'backgroundColor'] 111 | const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] 112 | animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { 113 | MPAnimation.prototype[type] = function(...args) { 114 | // #ifndef APP-NVUE 115 | this.animation[type](...args) 116 | // #endif 117 | // #ifdef APP-NVUE 118 | this._nvuePushAnimates(type, args) 119 | // #endif 120 | return this 121 | } 122 | }) 123 | 124 | export function createAnimation(option, _this) { 125 | if(!_this) return 126 | clearTimeout(_this.timer) 127 | return new MPAnimation(option, _this) 128 | } 129 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_styles.scss: -------------------------------------------------------------------------------- 1 | /* #ifndef APP-NVUE */ 2 | 3 | $-color-white:#fff; 4 | $-color-black:#000; 5 | @mixin base-style($color) { 6 | color: #fff; 7 | background-color: $color; 8 | border-color: mix($-color-black, $color, 8%); 9 | &:not([hover-class]):active { 10 | background: mix($-color-black, $color, 10%); 11 | border-color: mix($-color-black, $color, 20%); 12 | color: $-color-white; 13 | outline: none; 14 | } 15 | } 16 | @mixin is-color($color) { 17 | @include base-style($color); 18 | &[loading] { 19 | @include base-style($color); 20 | &::before { 21 | margin-right:5px; 22 | } 23 | } 24 | &[disabled] { 25 | &, 26 | &[loading], 27 | &:not([hover-class]):active { 28 | color: $-color-white; 29 | border-color: mix(darken($color,10%), $-color-white); 30 | background-color: mix($color, $-color-white); 31 | } 32 | } 33 | 34 | } 35 | @mixin base-plain-style($color) { 36 | color:$color; 37 | background-color: mix($-color-white, $color, 90%); 38 | border-color: mix($-color-white, $color, 70%); 39 | &:not([hover-class]):active { 40 | background: mix($-color-white, $color, 80%); 41 | color: $color; 42 | outline: none; 43 | border-color: mix($-color-white, $color, 50%); 44 | } 45 | } 46 | @mixin is-plain($color){ 47 | &[plain] { 48 | @include base-plain-style($color); 49 | &[loading] { 50 | @include base-plain-style($color); 51 | &::before { 52 | margin-right:5px; 53 | } 54 | } 55 | &[disabled] { 56 | &, 57 | &:active { 58 | color: mix($-color-white, $color, 40%); 59 | background-color: mix($-color-white, $color, 90%); 60 | border-color: mix($-color-white, $color, 80%); 61 | } 62 | } 63 | } 64 | } 65 | 66 | 67 | .uni-btn { 68 | margin: 5px; 69 | color: #393939; 70 | border:1px solid #ccc; 71 | font-size: 16px; 72 | font-weight: 200; 73 | background-color: #F9F9F9; 74 | // TODO 暂时处理边框隐藏一边的问题 75 | overflow: visible; 76 | &::after{ 77 | border: none; 78 | } 79 | 80 | &:not([type]),&[type=default] { 81 | color: #999; 82 | &[loading] { 83 | background: none; 84 | &::before { 85 | margin-right:5px; 86 | } 87 | } 88 | 89 | 90 | 91 | &[disabled]{ 92 | color: mix($-color-white, #999, 60%); 93 | &, 94 | &[loading], 95 | &:active { 96 | color: mix($-color-white, #999, 60%); 97 | background-color: mix($-color-white,$-color-black , 98%); 98 | border-color: mix($-color-white, #999, 85%); 99 | } 100 | } 101 | 102 | &[plain] { 103 | color: #999; 104 | background: none; 105 | border-color: $uni-border-1; 106 | &:not([hover-class]):active { 107 | background: none; 108 | color: mix($-color-white, $-color-black, 80%); 109 | border-color: mix($-color-white, $-color-black, 90%); 110 | outline: none; 111 | } 112 | &[disabled]{ 113 | &, 114 | &[loading], 115 | &:active { 116 | background: none; 117 | color: mix($-color-white, #999, 60%); 118 | border-color: mix($-color-white, #999, 85%); 119 | } 120 | } 121 | } 122 | } 123 | 124 | &:not([hover-class]):active { 125 | color: mix($-color-white, $-color-black, 50%); 126 | } 127 | 128 | &[size=mini] { 129 | font-size: 16px; 130 | font-weight: 200; 131 | border-radius: 8px; 132 | } 133 | 134 | 135 | 136 | &.uni-btn-small { 137 | font-size: 14px; 138 | } 139 | &.uni-btn-mini { 140 | font-size: 12px; 141 | } 142 | 143 | &.uni-btn-radius { 144 | border-radius: 999px; 145 | } 146 | &[type=primary] { 147 | @include is-color($uni-primary); 148 | @include is-plain($uni-primary) 149 | } 150 | &[type=success] { 151 | @include is-color($uni-success); 152 | @include is-plain($uni-success) 153 | } 154 | &[type=error] { 155 | @include is-color($uni-error); 156 | @include is-plain($uni-error) 157 | } 158 | &[type=warning] { 159 | @include is-color($uni-warning); 160 | @include is-plain($uni-warning) 161 | } 162 | &[type=info] { 163 | @include is-color($uni-info); 164 | @include is-plain($uni-info) 165 | } 166 | } 167 | /* #endif */ 168 | -------------------------------------------------------------------------------- /uni_modules/uni-scss/styles/setting/_variables.scss: -------------------------------------------------------------------------------- 1 | // @use "sass:math"; 2 | @import '../tools/functions.scss'; 3 | // 间距基础倍数 4 | $uni-space-root: 2 !default; 5 | // 边框半径默认值 6 | $uni-radius-root:5px !default; 7 | $uni-radius: () !default; 8 | // 边框半径断点 9 | $uni-radius: map-deep-merge( 10 | ( 11 | 0: 0, 12 | // TODO 当前版本暂时不支持 sm 属性 13 | // 'sm': math.div($uni-radius-root, 2), 14 | null: $uni-radius-root, 15 | 'lg': $uni-radius-root * 2, 16 | 'xl': $uni-radius-root * 6, 17 | 'pill': 9999px, 18 | 'circle': 50% 19 | ), 20 | $uni-radius 21 | ); 22 | // 字体家族 23 | $body-font-family: 'Roboto', sans-serif !default; 24 | // 文本 25 | $heading-font-family: $body-font-family !default; 26 | $uni-headings: () !default; 27 | $letterSpacing: -0.01562em; 28 | $uni-headings: map-deep-merge( 29 | ( 30 | 'h1': ( 31 | size: 32px, 32 | weight: 300, 33 | line-height: 50px, 34 | // letter-spacing:-0.01562em 35 | ), 36 | 'h2': ( 37 | size: 28px, 38 | weight: 300, 39 | line-height: 40px, 40 | // letter-spacing: -0.00833em 41 | ), 42 | 'h3': ( 43 | size: 24px, 44 | weight: 400, 45 | line-height: 32px, 46 | // letter-spacing: normal 47 | ), 48 | 'h4': ( 49 | size: 20px, 50 | weight: 400, 51 | line-height: 30px, 52 | // letter-spacing: 0.00735em 53 | ), 54 | 'h5': ( 55 | size: 16px, 56 | weight: 400, 57 | line-height: 24px, 58 | // letter-spacing: normal 59 | ), 60 | 'h6': ( 61 | size: 14px, 62 | weight: 500, 63 | line-height: 18px, 64 | // letter-spacing: 0.0125em 65 | ), 66 | 'subtitle': ( 67 | size: 12px, 68 | weight: 400, 69 | line-height: 20px, 70 | // letter-spacing: 0.00937em 71 | ), 72 | 'body': ( 73 | font-size: 14px, 74 | font-weight: 400, 75 | line-height: 22px, 76 | // letter-spacing: 0.03125em 77 | ), 78 | 'caption': ( 79 | 'size': 12px, 80 | 'weight': 400, 81 | 'line-height': 20px, 82 | // 'letter-spacing': 0.03333em, 83 | // 'text-transform': false 84 | ) 85 | ), 86 | $uni-headings 87 | ); 88 | 89 | 90 | 91 | // 主色 92 | $uni-primary: #2979ff !default; 93 | $uni-primary-disable:lighten($uni-primary,20%) !default; 94 | $uni-primary-light: lighten($uni-primary,25%) !default; 95 | 96 | // 辅助色 97 | // 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 98 | $uni-success: #18bc37 !default; 99 | $uni-success-disable:lighten($uni-success,20%) !default; 100 | $uni-success-light: lighten($uni-success,25%) !default; 101 | 102 | $uni-warning: #f3a73f !default; 103 | $uni-warning-disable:lighten($uni-warning,20%) !default; 104 | $uni-warning-light: lighten($uni-warning,25%) !default; 105 | 106 | $uni-error: #e43d33 !default; 107 | $uni-error-disable:lighten($uni-error,20%) !default; 108 | $uni-error-light: lighten($uni-error,25%) !default; 109 | 110 | $uni-info: #8f939c !default; 111 | $uni-info-disable:lighten($uni-info,20%) !default; 112 | $uni-info-light: lighten($uni-info,25%) !default; 113 | 114 | // 中性色 115 | // 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 116 | $uni-main-color: #3a3a3a !default; // 主要文字 117 | $uni-base-color: #6a6a6a !default; // 常规文字 118 | $uni-secondary-color: #909399 !default; // 次要文字 119 | $uni-extra-color: #c7c7c7 !default; // 辅助说明 120 | 121 | // 边框颜色 122 | $uni-border-1: #F0F0F0 !default; 123 | $uni-border-2: #EDEDED !default; 124 | $uni-border-3: #DCDCDC !default; 125 | $uni-border-4: #B9B9B9 !default; 126 | 127 | // 常规色 128 | $uni-black: #000000 !default; 129 | $uni-white: #ffffff !default; 130 | $uni-transparent: rgba($color: #000000, $alpha: 0) !default; 131 | 132 | // 背景色 133 | $uni-bg-color: #f7f7f7 !default; 134 | 135 | /* 水平间距 */ 136 | $uni-spacing-sm: 8px !default; 137 | $uni-spacing-base: 15px !default; 138 | $uni-spacing-lg: 30px !default; 139 | 140 | // 阴影 141 | $uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; 142 | $uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; 143 | $uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; 144 | 145 | // 蒙版 146 | $uni-mask: rgba($color: #000000, $alpha: 0.4) !default; 147 | -------------------------------------------------------------------------------- /uni_modules/uni-row/components/uni-row/uni-row.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 81 | 82 | 191 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 106 | 188 | -------------------------------------------------------------------------------- /components/u-parse/u-parse.css: -------------------------------------------------------------------------------- 1 | /** 2 | * author: Di (微信小程序开发工程师) 3 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) 4 | * 垂直微信小程序开发交流社区 5 | * 6 | * github地址: https://github.com/icindy/wxParse 7 | * 8 | * for: 微信小程序富文本解析 9 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 10 | */ 11 | 12 | .wxParse { 13 | width: 100%; 14 | font-family: Helvetica, sans-serif; 15 | font-size: 30upx; 16 | color: #666; 17 | line-height: 1.8; 18 | } 19 | 20 | .wxParse view { 21 | word-break: hyphenate; 22 | } 23 | 24 | .wxParse .inline { 25 | display: inline; 26 | margin: 0; 27 | padding: 0; 28 | } 29 | 30 | .wxParse .div { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | 35 | .wxParse .h1 .text { 36 | font-size: 2em; 37 | margin: 0.67em 0; 38 | } 39 | .wxParse .h2 .text { 40 | font-size: 1.5em; 41 | margin: 0.83em 0; 42 | } 43 | .wxParse .h3 .text { 44 | font-size: 1.17em; 45 | margin: 1em 0; 46 | } 47 | .wxParse .h4 .text { 48 | margin: 1.33em 0; 49 | } 50 | .wxParse .h5 .text { 51 | font-size: 0.83em; 52 | margin: 1.67em 0; 53 | } 54 | .wxParse .h6 .text { 55 | font-size: 0.67em; 56 | margin: 2.33em 0; 57 | } 58 | 59 | .wxParse .h1 .text, 60 | .wxParse .h2 .text, 61 | .wxParse .h3 .text, 62 | .wxParse .h4 .text, 63 | .wxParse .h5 .text, 64 | .wxParse .h6 .text, 65 | .wxParse .b, 66 | .wxParse .strong { 67 | font-weight: bolder; 68 | } 69 | 70 | 71 | .wxParse .p { 72 | margin: 1em 0; 73 | } 74 | 75 | .wxParse .i, 76 | .wxParse .cite, 77 | .wxParse .em, 78 | .wxParse .var, 79 | .wxParse .address { 80 | font-style: italic; 81 | } 82 | 83 | .wxParse .pre, 84 | .wxParse .tt, 85 | .wxParse .code, 86 | .wxParse .kbd, 87 | .wxParse .samp { 88 | font-family: monospace; 89 | } 90 | .wxParse .pre { 91 | overflow: auto; 92 | background: #f5f5f5; 93 | padding: 16upx; 94 | white-space: pre; 95 | margin: 1em 0upx; 96 | } 97 | .wxParse .code { 98 | display: inline; 99 | background: #f5f5f5; 100 | } 101 | 102 | .wxParse .big { 103 | font-size: 1.17em; 104 | } 105 | 106 | .wxParse .small, 107 | .wxParse .sub, 108 | .wxParse .sup { 109 | font-size: 0.83em; 110 | } 111 | 112 | .wxParse .sub { 113 | vertical-align: sub; 114 | } 115 | .wxParse .sup { 116 | vertical-align: super; 117 | } 118 | 119 | .wxParse .s, 120 | .wxParse .strike, 121 | .wxParse .del { 122 | text-decoration: line-through; 123 | } 124 | 125 | .wxParse .strong, 126 | .wxParse .s { 127 | display: inline; 128 | } 129 | 130 | .wxParse .a { 131 | color: deepskyblue; 132 | } 133 | 134 | .wxParse .video { 135 | text-align: center; 136 | margin: 22upx 0; 137 | } 138 | 139 | .wxParse .video-video { 140 | width: 100%; 141 | } 142 | 143 | .wxParse .img { 144 | display: inline-block; 145 | width: 0; 146 | height: 0; 147 | max-width: 100%; 148 | overflow: hidden; 149 | } 150 | 151 | .wxParse .blockquote { 152 | margin: 10upx 0; 153 | padding: 22upx 0 22upx 22upx; 154 | font-family: Courier, Calibri, "宋体"; 155 | background: #f5f5f5; 156 | border-left: 6upx solid #dbdbdb; 157 | } 158 | .wxParse .blockquote .p { 159 | margin: 0; 160 | } 161 | 162 | .wxParse .ul, .wxParse .ol { 163 | display: block; 164 | margin: 1em 0; 165 | padding-left: 33upx; 166 | } 167 | .wxParse .ol { 168 | list-style-type: disc; 169 | } 170 | .wxParse .ol { 171 | list-style-type: decimal; 172 | } 173 | .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template { 174 | display: list-item; 175 | align-items: baseline; 176 | text-align: match-parent; 177 | } 178 | 179 | .wxParse .ol>.li,.wxParse .ul>.li { 180 | display: list-item; 181 | align-items: baseline; 182 | text-align: match-parent; 183 | } 184 | .wxParse .ul .ul, .wxParse .ol .ul { 185 | list-style-type: circle; 186 | } 187 | .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul { 188 | list-style-type: square; 189 | } 190 | 191 | .wxParse .u { 192 | text-decoration: underline; 193 | } 194 | .wxParse .hide { 195 | display: none; 196 | } 197 | .wxParse .del { 198 | display: inline; 199 | } 200 | .wxParse .figure { 201 | overflow: hidden; 202 | } 203 | 204 | .wxParse .table { 205 | width: 100%; 206 | } 207 | .wxParse .thead, .wxParse .tfoot, .wxParse .tr { 208 | display: flex; 209 | flex-direction: row; 210 | } 211 | .wxParse .tr { 212 | width:100%; 213 | display: flex; 214 | border-right: 2upx solid #e0e0e0; 215 | border-bottom: 2upx solid #e0e0e0; 216 | } 217 | .wxParse .th, 218 | .wxParse .td { 219 | display: flex; 220 | width: 1276upx; 221 | overflow: auto; 222 | flex: 1; 223 | padding: 11upx; 224 | border-left: 2upx solid #e0e0e0; 225 | } 226 | .wxParse .td:last { 227 | border-top: 2upx solid #e0e0e0; 228 | } 229 | .wxParse .th { 230 | background: #f0f0f0; 231 | border-top: 2upx solid #e0e0e0; 232 | } 233 | -------------------------------------------------------------------------------- /uni_modules/uni-id/changelog.md: -------------------------------------------------------------------------------- 1 | ## 3.3.29(2022-10-20) 2 | - 使用[uni-open-bridge-common](https://uniapp.dcloud.net.cn/uniCloud/uni-open-bridge.html#common)存储用户三方凭证,以便其他服务使用。 3 | ## 3.3.28(2022-07-27) 4 | - 修复 app端微信登录返回的accessToken过期时间(expired)不正确的Bug 5 | ## 3.3.27(2022-07-27) 6 | - 短信发送失败、微信登录失败等场景下输出原始错误方便排查错误 7 | ## 3.3.26(2022-07-08) 8 | - 兼容配置放在uni-id下的逻辑,但是仍推荐使用uni-config-center 9 | ## 3.3.25(2022-06-30) 10 | - 修复config文件不合法时未抛出具体错误的Bug 11 | ## 3.3.24(2022-06-28) 12 | - 修复3.3.12引出的使用多应用配置时报错的Bug 13 | ## 3.3.23(2022-06-13) 14 | - 修复上版本引出的部分依赖未找到的Bug 15 | ## 3.3.22(2022-06-13) 16 | - 新增 preferedWebPlatform 配置用于解决HBuilderX 3.4.9版本起web端platform不一致的问题 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-web-platform) 17 | ## 3.3.21(2022-05-24) 18 | - 修复createInstance传入clientInfo无效的Bug 19 | ## 3.3.20(2022-05-19) 20 | - 调整以下错误码(账号已注册[uni-id-account-exists]、账号不存在[uni-id-account-not-exists]、账号已绑定[uni-id-account-bound]) 21 | ## 3.3.19(2022-05-19) 22 | - 修复 addUser 部分情况下会创建出重复账号的Bug 23 | ## 3.3.18(2022-05-12) 24 | - 调整绑定、解绑邮箱手机号接口,只要传递code参数就进行验证码校验即使传递的值为undefined 25 | ## 3.3.17(2022-05-09) 26 | - register_env内增加os_name字段用于区分注册时的客户端系统类型 27 | ## 3.3.16(2022-05-09) 28 | - 修复 addUser接口添加的用户无法使用密码登录的Bug [详情](https://ask.dcloud.net.cn/question/144670) 29 | ## 3.3.15(2022-05-08) 30 | - 修复config文件语法错误时报`this.t is not a function`的Bug 感谢@寒暄 31 | ## 3.3.14(2022-05-08) 32 | - 新增 getWeixinUserInfo接口 用于获取app平台微信登录用户的用户信息 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#get-weixin-user-info) 33 | - 新增 addUser接口 用于手动添加用户 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#add-user) 34 | - 新增 resetPwdBySms接口 用于使用短信验证码重置密码 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#reset-pwd-by-sms) 35 | - 新增 refreshToken接口 用于主动刷新用户token [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#refresh-token) 36 | - 调整 用户注册时记录用户注册环境到 register_env 字段 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#user-table) 37 | - 调整 用户注册时将注册 ip 移至 register_env 内 38 | 39 | ## 3.3.13(2022-03-04) 40 | - createInstance方法支持传递clientInfo [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#create-instance) 41 | - 修复`this.t is not a function`报错 42 | ## 3.3.12(2022-01-15) 43 | - 新增 preferedAppPlatform 配置用于解决uni-app vue2版本vue3版本获取platform不一致的问题 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-app-platform) 44 | - 修复 checkToken 未返回自定义token内容的Bug 45 | ## 3.3.11(2022-01-11) 46 | - 修复用户名密码登录时多个应用出现重复用户名登录报错的Bug 47 | ## 3.3.10(2022-01-07) 48 | - 新增 自定义国际化语言支持 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=custom-i8n) 49 | - 修复 一键登录时未校验重复手机号是否已验证的Bug 50 | - 修复 Apple登录时用户邮箱为空时报错的Bug 51 | - 修复 登录接口未传username时错误提示不正确的Bug 52 | ## 3.3.9(2021-11-09) 53 | - 去除重复的context.xxx未找到的提示语 54 | ## 3.3.8(2021-10-28) 55 | - 新增 用户账户封禁接口 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=ban-account) 56 | - 新增 用户账户注销接口 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=close-account) 57 | - 修复 未传appid时用户重复注册的Bug 58 | ## 3.3.7(2021-10-08) 59 | - 移除部分接口的废弃提示 60 | ## 3.3.6(2021-09-08) 61 | - 修复 邀请码可能重复的Bug 62 | ## 3.3.5(2021-08-10) 63 | - 修复版本号错误 64 | ## 3.3.4(2021-08-10) 65 | - 微信、QQ、支付宝登录新增type参数用于指定当前是登录还是注册 66 | ## 3.3.3(2021-08-04) 67 | - 修复使用数组形式的配置文件报错的Bug 68 | ## 3.3.2(2021-08-03) 69 | - 修复上3.3.0版本引出的createInstance接口传入配置不生效的Bug 感谢[hmh](https://gitee.com/hmh) 70 | ## 3.3.1(2021-07-30) 71 | - 修复 将设置用户允许登录的应用列表时传入空数组报错的Bug 72 | ## 3.3.0(2021-07-30) 73 | - 新增 不同端应用配置隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-config) 74 | - 新增 不同端用户隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-user) 75 | + 此版本升级需要开发者处理一下用户数据,请参考 [补齐用户dcloud_appid字段](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=makeup-dcloud-appid) 76 | - 新增 QQ登录、注册相关功能 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=qq) 77 | - 调整 不再支持绑定手机、邮箱时不填验证码直接绑定 78 | ## 3.2.1(2021-07-09) 79 | - 撤销3.2.0版本所做的调整 80 | ## 3.2.0(2021-07-09) 81 | - 【重要】支持不同端(管理端、用户端等)用户隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-user) 82 | - 支持不同端(管理端、用户端等)配置文件隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-config) 83 | ## 3.1.3(2021-07-08) 84 | - 移除插件内误传的node_modules 85 | ## 3.1.2(2021-07-08) 86 | - 修复 微信小程序绑定微信账号时报错的Bug 87 | ## 3.1.1(2021-07-01) 88 | - 使用新的错误码规范,兼容旧版 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=errcode) 89 | - 修复微信登录、绑定时未返回用户accessToken的Bug 90 | ## 3.1.0(2021-04-19) 91 | - 增加对用户名、邮箱、密码字段的两端去空格 92 | - 默认忽略用户名、邮箱的大小写 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=case-sensitive) 93 | - 修复 customToken导出async方法报错的Bug 94 | ## 3.0.12(2021-04-13) 95 | - 调整bindTokenToDevice默认值为false 96 | ## 3.0.11(2021-04-12) 97 | - 修复3.0.7版本引出的多个用户访问时可能出现30201报错的Bug 98 | ## 3.0.10(2021-04-08) 99 | - 优化错误提示 100 | ## 3.0.9(2021-04-08) 101 | - bindMobile接口支持通过一键登录的方式绑定 102 | - 优化错误提示 103 | ## 3.0.8(2021-03-19) 104 | - 修复 3.0.7版本某些情况下生成token报错的Bug 105 | ## 3.0.7(2021-03-19) 106 | - 新增 支持uni-config-center,更新uni-id无须再担心配置被覆盖 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=uni-config-center) 107 | - 新增 自定义token内容,可以缓存角色权限之外的更多信息到客户端 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=custom-token) 108 | - 新增 支持传入context获取uni-id实例,防止单实例多并发时全局context混乱 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=create-instance) 109 | ## 3.0.6(2021-03-05) 110 | - 新增[uniID.wxBizDataCrypt](https://uniapp.dcloud.io/uniCloud/uni-id?id=%e5%be%ae%e4%bf%a1%e6%95%b0%e6%8d%ae%e8%a7%a3%e5%af%86)方法 111 | - 优化loginByApple方法,提高接口响应速度 112 | ## 3.0.5(2021-02-03) 113 | - 调整为uni_modules目录规范 114 | -------------------------------------------------------------------------------- /components/u-parse/libs/htmlparser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser 4 | * 5 | * author: Di (微信小程序开发工程师) 6 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) 7 | * 垂直微信小程序开发交流社区 8 | * 9 | * github地址: https://github.com/icindy/wxParse 10 | * 11 | * for: 微信小程序富文本解析 12 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 13 | */ 14 | // Regular Expressions for parsing tags and attributes 15 | 16 | const startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; 17 | const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; 18 | const attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; 19 | 20 | function makeMap(str) { 21 | const obj = {}; 22 | const items = str.split(','); 23 | for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; 24 | return obj; 25 | } 26 | 27 | // Empty Elements - HTML 5 28 | const empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); 29 | 30 | // Block Elements - HTML 5 31 | const block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); 32 | 33 | // Inline Elements - HTML 5 34 | const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); 35 | 36 | // Elements that you can, intentionally, leave open 37 | // (and which close themselves) 38 | const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); 39 | 40 | // Attributes that have their values filled in disabled="disabled" 41 | const fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); 42 | 43 | function HTMLParser(html, handler) { 44 | let index; 45 | let chars; 46 | let match; 47 | let last = html; 48 | const stack = []; 49 | 50 | stack.last = () => stack[stack.length - 1]; 51 | 52 | function parseEndTag(tag, tagName) { 53 | // If no tag name is provided, clean shop 54 | let pos; 55 | if (!tagName) { 56 | pos = 0; 57 | } else { 58 | // Find the closest opened tag of the same type 59 | tagName = tagName.toLowerCase(); 60 | for (pos = stack.length - 1; pos >= 0; pos -= 1) { 61 | if (stack[pos] === tagName) break; 62 | } 63 | } 64 | if (pos >= 0) { 65 | // Close all the open elements, up the stack 66 | for (let i = stack.length - 1; i >= pos; i -= 1) { 67 | if (handler.end) handler.end(stack[i]); 68 | } 69 | 70 | // Remove the open elements from the stack 71 | stack.length = pos; 72 | } 73 | } 74 | 75 | function parseStartTag(tag, tagName, rest, unary) { 76 | tagName = tagName.toLowerCase(); 77 | 78 | if (block[tagName]) { 79 | while (stack.last() && inline[stack.last()]) { 80 | parseEndTag('', stack.last()); 81 | } 82 | } 83 | 84 | if (closeSelf[tagName] && stack.last() === tagName) { 85 | parseEndTag('', tagName); 86 | } 87 | 88 | unary = empty[tagName] || !!unary; 89 | 90 | if (!unary) stack.push(tagName); 91 | 92 | if (handler.start) { 93 | const attrs = []; 94 | 95 | rest.replace(attr, function genAttr(matches, name) { 96 | const value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : ''); 97 | 98 | attrs.push({ 99 | name, 100 | value, 101 | escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // " 102 | }); 103 | }); 104 | 105 | if (handler.start) { 106 | handler.start(tagName, attrs, unary); 107 | } 108 | } 109 | } 110 | 111 | while (html) { 112 | chars = true; 113 | 114 | if (html.indexOf(' { 98 | return item.version = parameters.version 99 | }) 100 | 101 | const value = { 102 | encrypt_key: keyInfo.encrypt_key, 103 | iv: keyInfo.iv 104 | } 105 | 106 | return { 107 | value, 108 | duration: keyInfo.expire_in 109 | } 110 | } 111 | } 112 | 113 | class Ticket extends Storage { 114 | 115 | constructor() { 116 | super('ticket', ['dcloudAppid', 'platform']) 117 | } 118 | 119 | async fallback(parameters) { 120 | const accessToken = await Factory.Get(AccessToken, { 121 | dcloudAppid: parameters.dcloudAppid, 122 | platform: PlatformType.WEIXIN_H5 123 | }) 124 | 125 | const responseData = await WeixinServer.GetH5TicketData(accessToken) 126 | 127 | const duration = responseData.expires_in || (60 * 60 * 2) 128 | delete responseData.expires_in 129 | delete responseData.errcode 130 | delete responseData.errmsg 131 | 132 | return { 133 | value: responseData, 134 | duration 135 | } 136 | } 137 | } 138 | 139 | 140 | // exports 141 | 142 | async function getAccessToken(key, fallback) { 143 | return await Factory.Get(AccessToken, key, fallback) 144 | } 145 | 146 | async function setAccessToken(key, value, expiresIn) { 147 | await Factory.Set(AccessToken, key, value, expiresIn) 148 | } 149 | 150 | async function removeAccessToken(key) { 151 | await Factory.Remove(AccessToken, key) 152 | } 153 | 154 | async function getUserAccessToken(key, fallback) { 155 | return await Factory.Get(UserAccessToken, key, fallback) 156 | } 157 | 158 | async function setUserAccessToken(key, value, expiresIn) { 159 | await Factory.Set(UserAccessToken, key, value, expiresIn) 160 | } 161 | 162 | async function removeUserAccessToken(key) { 163 | await Factory.Remove(UserAccessToken, key) 164 | } 165 | 166 | async function getSessionKey(key, fallback) { 167 | return await Factory.Get(SessionKey, key, fallback) 168 | } 169 | 170 | async function setSessionKey(key, value, expiresIn) { 171 | await Factory.Set(SessionKey, key, value, expiresIn) 172 | } 173 | 174 | async function removeSessionKey(key) { 175 | await Factory.Remove(SessionKey, key) 176 | } 177 | 178 | async function getEncryptKey(key, fallback) { 179 | return await Factory.Get(Encryptkey, key, fallback) 180 | } 181 | 182 | async function setEncryptKey(key, value, expiresIn) { 183 | await Factory.Set(Encryptkey, key, value, expiresIn) 184 | } 185 | 186 | async function removeEncryptKey(key) { 187 | await Factory.Remove(Encryptkey, key) 188 | } 189 | 190 | async function getTicket(key, fallback) { 191 | return await Factory.Get(Ticket, key, fallback) 192 | } 193 | 194 | async function setTicket(key, value, expiresIn) { 195 | await Factory.Set(Ticket, key, value, expiresIn) 196 | } 197 | 198 | async function removeTicket(key) { 199 | await Factory.Remove(Ticket, key) 200 | } 201 | 202 | module.exports = { 203 | getAccessToken, 204 | setAccessToken, 205 | removeAccessToken, 206 | getUserAccessToken, 207 | setUserAccessToken, 208 | removeUserAccessToken, 209 | getSessionKey, 210 | setSessionKey, 211 | removeSessionKey, 212 | getEncryptKey, 213 | setEncryptKey, 214 | removeEncryptKey, 215 | getTicket, 216 | setTicket, 217 | removeTicket, 218 | PlatformType, 219 | WeixinServer, 220 | ErrorCodeType 221 | } 222 | -------------------------------------------------------------------------------- /unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["uni-app:///main.js","webpack:////Users/mac/chatgpt-uniapp/App.vue?4a09","webpack:////Users/mac/chatgpt-uniapp/App.vue?9482","uni-app:///App.vue","webpack:////Users/mac/chatgpt-uniapp/App.vue?1806","webpack:////Users/mac/chatgpt-uniapp/App.vue?580f"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","Vue","config","productionTip","App","mpType","mixin","share","app","$mount"],"mappings":";;;;;;;;;iDAAA,wCAA8E;;;AAG9E;AACA,yF,wnCAJmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAKnBC,aAAIC,MAAJ,CAAWC,aAAX,GAA2B,KAA3B;AACAC,aAAIC,MAAJ,GAAa,KAAb;AACAJ,aAAIK,KAAJ,CAAUC,cAAV;AACA,IAAMC,GAAG,GAAG,IAAIP,YAAJ;AACLG,YADK;AAEXG,OAAK,EAALA,cAFW,IAAZ;;AAIA,UAAAC,GAAG,EAACC,MAAJ,G;;;;;;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACuD;AACL;AACa;;;AAG/D;AACoM;AACpM,gBAAgB,iNAAU;AAC1B,EAAE,yEAAM;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACe,gF;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAqwB,CAAgB,iyBAAG,EAAC,C;;;;;;;;;;;;ACCzxB;AACA;AACA;AACA,GAHA;AAIA;AACA;AACA,GANA;AAOA;AACA;AACA,GATA,E;;;;;;;;;;;ACDA;AAAA;AAAA;AAAA;AAA0lC,CAAgB,8lCAAG,EAAC,C;;;;;;;;;;ACA9mC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"common/main.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;import App from './App'\n\n\nimport Vue from 'vue'\nimport share from '@/static/js/share.js'\nVue.config.productionTip = false\nApp.mpType = 'app'\nVue.mixin(share)\nconst app = new Vue({\n ...App,\n\tshare\n})\napp.$mount()","var render, staticRenderFns, recyclableRender, components\nvar renderjs\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"App.vue\"\nexport default component.exports","import mod from \"-!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=script&lang=js&\"","\r\n\r\n\n","import mod from \"-!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1676879311671\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/weixin-server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const crypto = require('crypto') 4 | 5 | const { 6 | HTTP_STATUS 7 | } = require('./consts.js') 8 | 9 | const { 10 | BridgeError 11 | } = require('./bridge-error.js') 12 | 13 | class WeixinServer { 14 | 15 | constructor(options = {}) { 16 | this._appid = options.appid 17 | this._secret = options.secret 18 | } 19 | 20 | getAccessToken() { 21 | return uniCloud.httpclient.request(WeixinServer.AccessToken_Url, { 22 | dataType: 'json', 23 | method: 'POST', 24 | data: { 25 | appid: this._appid, 26 | secret: this._secret, 27 | grant_type: "client_credential" 28 | } 29 | }) 30 | } 31 | 32 | // 使用客户端获取的 code 从微信服务器换取 openid,code 仅可使用一次 33 | codeToSession(code) { 34 | return uniCloud.httpclient.request(WeixinServer.Code2Session_Url, { 35 | dataType: 'json', 36 | data: { 37 | appid: this._appid, 38 | secret: this._secret, 39 | js_code: code, 40 | grant_type: 'authorization_code' 41 | } 42 | }) 43 | } 44 | 45 | getUserEncryptKey({ 46 | access_token, 47 | openid, 48 | session_key 49 | }) { 50 | console.log(access_token, openid, session_key); 51 | const signature = crypto.createHmac('sha256', session_key).update('').digest('hex') 52 | return uniCloud.httpclient.request(WeixinServer.User_Encrypt_Key_Url, { 53 | dataType: 'json', 54 | method: 'POST', 55 | dataAsQueryString: true, 56 | data: { 57 | access_token, 58 | openid: openid, 59 | signature: signature, 60 | sig_method: 'hmac_sha256' 61 | } 62 | }) 63 | } 64 | 65 | getH5AccessToken() { 66 | return uniCloud.httpclient.request(WeixinServer.AccessToken_H5_Url, { 67 | dataType: 'json', 68 | method: 'GET', 69 | data: { 70 | appid: this._appid, 71 | secret: this._secret, 72 | grant_type: "client_credential" 73 | } 74 | }) 75 | } 76 | 77 | getH5Ticket(access_token) { 78 | return uniCloud.httpclient.request(WeixinServer.Ticket_Url, { 79 | dataType: 'json', 80 | dataAsQueryString: true, 81 | method: 'POST', 82 | data: { 83 | access_token 84 | } 85 | }) 86 | } 87 | 88 | getH5AccessTokenForEip() { 89 | return uniCloud.httpProxyForEip.postForm(WeixinServer.AccessToken_H5_Url, { 90 | appid: this._appid, 91 | secret: this._secret, 92 | grant_type: "client_credential" 93 | }, { 94 | dataType: 'json' 95 | }) 96 | } 97 | 98 | getH5TicketForEip(access_token) { 99 | return uniCloud.httpProxyForEip.postForm(WeixinServer.Ticket_Url, { 100 | access_token 101 | }, { 102 | dataType: 'json', 103 | dataAsQueryString: true 104 | }) 105 | } 106 | } 107 | 108 | WeixinServer.AccessToken_Url = 'https://api.weixin.qq.com/cgi-bin/token' 109 | WeixinServer.Code2Session_Url = 'https://api.weixin.qq.com/sns/jscode2session' 110 | WeixinServer.User_Encrypt_Key_Url = 'https://api.weixin.qq.com/wxa/business/getuserencryptkey' 111 | WeixinServer.AccessToken_H5_Url = 'https://api.weixin.qq.com/cgi-bin/token' 112 | WeixinServer.Ticket_Url = 'https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi' 113 | 114 | WeixinServer.GetMPAccessToken = function(options) { 115 | return new WeixinServer(options).getAccessToken() 116 | } 117 | 118 | WeixinServer.GetCodeToSession = function(options) { 119 | return new WeixinServer(options).codeToSession(options.code) 120 | } 121 | 122 | WeixinServer.GetUserEncryptKey = function(options) { 123 | return new WeixinServer(options).getUserEncryptKey(options) 124 | } 125 | 126 | WeixinServer.GetH5AccessToken = function(options) { 127 | return new WeixinServer(options).getH5AccessToken() 128 | } 129 | 130 | WeixinServer.GetH5Ticket = function(options) { 131 | return new WeixinServer(options).getH5Ticket(options.access_token) 132 | } 133 | 134 | //////////////////////////////////////////////////////////////// 135 | 136 | function isAliyun() { 137 | return (uniCloud.getCloudInfos()[0].provider === 'aliyun') 138 | } 139 | 140 | WeixinServer.GetResponseData = function(response) { 141 | console.log("WeixinServer::response", response) 142 | 143 | if (!(response.status === HTTP_STATUS.SUCCESS || response.statusCodeValue === HTTP_STATUS.SUCCESS)) { 144 | throw new BridgeError(response.status || response.statusCodeValue, response.status || response.statusCodeValue) 145 | } 146 | 147 | const responseData = response.data || response.body 148 | 149 | if (responseData.errcode !== undefined && responseData.errcode !== 0) { 150 | throw new BridgeError(responseData.errcode, responseData.errmsg) 151 | } 152 | 153 | return responseData 154 | } 155 | 156 | WeixinServer.GetMPAccessTokenData = async function(options) { 157 | const response = await new WeixinServer(options).getAccessToken() 158 | return WeixinServer.GetResponseData(response) 159 | } 160 | 161 | WeixinServer.GetCodeToSessionData = async function(options) { 162 | const response = await new WeixinServer(options).codeToSession(options.code) 163 | return WeixinServer.GetResponseData(response) 164 | } 165 | 166 | WeixinServer.GetUserEncryptKeyData = async function(options) { 167 | const response = await new WeixinServer(options).getUserEncryptKey(options) 168 | return WeixinServer.GetResponseData(response) 169 | } 170 | 171 | WeixinServer.GetH5AccessTokenData = async function(options) { 172 | const ws = new WeixinServer(options) 173 | let response 174 | if (isAliyun()) { 175 | response = await ws.getH5AccessTokenForEip() 176 | if (typeof response === 'string') { 177 | response = JSON.parse(response) 178 | } 179 | } else { 180 | response = await ws.getH5AccessToken() 181 | } 182 | return WeixinServer.GetResponseData(response) 183 | } 184 | 185 | WeixinServer.GetH5TicketData = async function(options) { 186 | const ws = new WeixinServer(options) 187 | let response 188 | if (isAliyun()) { 189 | response = await ws.getH5TicketForEip(options.access_token) 190 | if (typeof response === 'string') { 191 | response = JSON.parse(response) 192 | } 193 | } else { 194 | response = await ws.getH5Ticket(options.access_token) 195 | } 196 | return WeixinServer.GetResponseData(response) 197 | } 198 | 199 | 200 | module.exports = { 201 | WeixinServer 202 | } 203 | -------------------------------------------------------------------------------- /uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 176 | 177 | 276 | -------------------------------------------------------------------------------- /components/u-parse/libs/wxDiscode.js: -------------------------------------------------------------------------------- 1 | // HTML 支持的数学符号 2 | function strNumDiscode(str) { 3 | str = str.replace(/∀/g, '∀'); 4 | str = str.replace(/∂/g, '∂'); 5 | str = str.replace(/∃/g, '∃'); 6 | str = str.replace(/∅/g, '∅'); 7 | str = str.replace(/∇/g, '∇'); 8 | str = str.replace(/∈/g, '∈'); 9 | str = str.replace(/∉/g, '∉'); 10 | str = str.replace(/∋/g, '∋'); 11 | str = str.replace(/∏/g, '∏'); 12 | str = str.replace(/∑/g, '∑'); 13 | str = str.replace(/−/g, '−'); 14 | str = str.replace(/∗/g, '∗'); 15 | str = str.replace(/√/g, '√'); 16 | str = str.replace(/∝/g, '∝'); 17 | str = str.replace(/∞/g, '∞'); 18 | str = str.replace(/∠/g, '∠'); 19 | str = str.replace(/∧/g, '∧'); 20 | str = str.replace(/∨/g, '∨'); 21 | str = str.replace(/∩/g, '∩'); 22 | str = str.replace(/∪/g, '∪'); 23 | str = str.replace(/∫/g, '∫'); 24 | str = str.replace(/∴/g, '∴'); 25 | str = str.replace(/∼/g, '∼'); 26 | str = str.replace(/≅/g, '≅'); 27 | str = str.replace(/≈/g, '≈'); 28 | str = str.replace(/≠/g, '≠'); 29 | str = str.replace(/≤/g, '≤'); 30 | str = str.replace(/≥/g, '≥'); 31 | str = str.replace(/⊂/g, '⊂'); 32 | str = str.replace(/⊃/g, '⊃'); 33 | str = str.replace(/⊄/g, '⊄'); 34 | str = str.replace(/⊆/g, '⊆'); 35 | str = str.replace(/⊇/g, '⊇'); 36 | str = str.replace(/⊕/g, '⊕'); 37 | str = str.replace(/⊗/g, '⊗'); 38 | str = str.replace(/⊥/g, '⊥'); 39 | str = str.replace(/⋅/g, '⋅'); 40 | return str; 41 | } 42 | 43 | // HTML 支持的希腊字母 44 | function strGreeceDiscode(str) { 45 | str = str.replace(/Α/g, 'Α'); 46 | str = str.replace(/Β/g, 'Β'); 47 | str = str.replace(/Γ/g, 'Γ'); 48 | str = str.replace(/Δ/g, 'Δ'); 49 | str = str.replace(/Ε/g, 'Ε'); 50 | str = str.replace(/Ζ/g, 'Ζ'); 51 | str = str.replace(/Η/g, 'Η'); 52 | str = str.replace(/Θ/g, 'Θ'); 53 | str = str.replace(/Ι/g, 'Ι'); 54 | str = str.replace(/Κ/g, 'Κ'); 55 | str = str.replace(/Λ/g, 'Λ'); 56 | str = str.replace(/Μ/g, 'Μ'); 57 | str = str.replace(/Ν/g, 'Ν'); 58 | str = str.replace(/Ξ/g, 'Ν'); 59 | str = str.replace(/Ο/g, 'Ο'); 60 | str = str.replace(/Π/g, 'Π'); 61 | str = str.replace(/Ρ/g, 'Ρ'); 62 | str = str.replace(/Σ/g, 'Σ'); 63 | str = str.replace(/Τ/g, 'Τ'); 64 | str = str.replace(/Υ/g, 'Υ'); 65 | str = str.replace(/Φ/g, 'Φ'); 66 | str = str.replace(/Χ/g, 'Χ'); 67 | str = str.replace(/Ψ/g, 'Ψ'); 68 | str = str.replace(/Ω/g, 'Ω'); 69 | 70 | str = str.replace(/α/g, 'α'); 71 | str = str.replace(/β/g, 'β'); 72 | str = str.replace(/γ/g, 'γ'); 73 | str = str.replace(/δ/g, 'δ'); 74 | str = str.replace(/ε/g, 'ε'); 75 | str = str.replace(/ζ/g, 'ζ'); 76 | str = str.replace(/η/g, 'η'); 77 | str = str.replace(/θ/g, 'θ'); 78 | str = str.replace(/ι/g, 'ι'); 79 | str = str.replace(/κ/g, 'κ'); 80 | str = str.replace(/λ/g, 'λ'); 81 | str = str.replace(/μ/g, 'μ'); 82 | str = str.replace(/ν/g, 'ν'); 83 | str = str.replace(/ξ/g, 'ξ'); 84 | str = str.replace(/ο/g, 'ο'); 85 | str = str.replace(/π/g, 'π'); 86 | str = str.replace(/ρ/g, 'ρ'); 87 | str = str.replace(/ς/g, 'ς'); 88 | str = str.replace(/σ/g, 'σ'); 89 | str = str.replace(/τ/g, 'τ'); 90 | str = str.replace(/υ/g, 'υ'); 91 | str = str.replace(/φ/g, 'φ'); 92 | str = str.replace(/χ/g, 'χ'); 93 | str = str.replace(/ψ/g, 'ψ'); 94 | str = str.replace(/ω/g, 'ω'); 95 | str = str.replace(/ϑ/g, 'ϑ'); 96 | str = str.replace(/ϒ/g, 'ϒ'); 97 | str = str.replace(/ϖ/g, 'ϖ'); 98 | str = str.replace(/·/g, '·'); 99 | return str; 100 | } 101 | 102 | function strcharacterDiscode(str) { 103 | // 加入常用解析 104 | str = str.replace(/ /g, ' '); 105 | str = str.replace(/ /g, ' '); 106 | str = str.replace(/ /g, ' '); 107 | str = str.replace(/"/g, "'"); 108 | str = str.replace(/&/g, '&'); 109 | str = str.replace(/</g, '<'); 110 | str = str.replace(/>/g, '>'); 111 | str = str.replace(/•/g, '•'); 112 | 113 | return str; 114 | } 115 | 116 | // HTML 支持的其他实体 117 | function strOtherDiscode(str) { 118 | str = str.replace(/Œ/g, 'Œ'); 119 | str = str.replace(/œ/g, 'œ'); 120 | str = str.replace(/Š/g, 'Š'); 121 | str = str.replace(/š/g, 'š'); 122 | str = str.replace(/Ÿ/g, 'Ÿ'); 123 | str = str.replace(/ƒ/g, 'ƒ'); 124 | str = str.replace(/ˆ/g, 'ˆ'); 125 | str = str.replace(/˜/g, '˜'); 126 | str = str.replace(/ /g, ''); 127 | str = str.replace(/ /g, ''); 128 | str = str.replace(/ /g, ''); 129 | str = str.replace(/‌/g, ''); 130 | str = str.replace(/‍/g, ''); 131 | str = str.replace(/‎/g, ''); 132 | str = str.replace(/‏/g, ''); 133 | str = str.replace(/–/g, '–'); 134 | str = str.replace(/—/g, '—'); 135 | str = str.replace(/‘/g, '‘'); 136 | str = str.replace(/’/g, '’'); 137 | str = str.replace(/‚/g, '‚'); 138 | str = str.replace(/“/g, '“'); 139 | str = str.replace(/”/g, '”'); 140 | str = str.replace(/„/g, '„'); 141 | str = str.replace(/†/g, '†'); 142 | str = str.replace(/‡/g, '‡'); 143 | str = str.replace(/•/g, '•'); 144 | str = str.replace(/…/g, '…'); 145 | str = str.replace(/‰/g, '‰'); 146 | str = str.replace(/′/g, '′'); 147 | str = str.replace(/″/g, '″'); 148 | str = str.replace(/‹/g, '‹'); 149 | str = str.replace(/›/g, '›'); 150 | str = str.replace(/‾/g, '‾'); 151 | str = str.replace(/€/g, '€'); 152 | str = str.replace(/™/g, '™'); 153 | 154 | str = str.replace(/←/g, '←'); 155 | str = str.replace(/↑/g, '↑'); 156 | str = str.replace(/→/g, '→'); 157 | str = str.replace(/↓/g, '↓'); 158 | str = str.replace(/↔/g, '↔'); 159 | str = str.replace(/↵/g, '↵'); 160 | str = str.replace(/⌈/g, '⌈'); 161 | str = str.replace(/⌉/g, '⌉'); 162 | 163 | str = str.replace(/⌊/g, '⌊'); 164 | str = str.replace(/⌋/g, '⌋'); 165 | str = str.replace(/◊/g, '◊'); 166 | str = str.replace(/♠/g, '♠'); 167 | str = str.replace(/♣/g, '♣'); 168 | str = str.replace(/♥/g, '♥'); 169 | 170 | str = str.replace(/♦/g, '♦'); 171 | str = str.replace(/'/g, "'"); 172 | return str; 173 | } 174 | 175 | function strDiscode(str) { 176 | str = strNumDiscode(str); 177 | str = strGreeceDiscode(str); 178 | str = strcharacterDiscode(str); 179 | str = strOtherDiscode(str); 180 | return str; 181 | } 182 | 183 | function urlToHttpUrl(url, domain) { 184 | if (/^\/\//.test(url)) { 185 | return `https:${url}`; 186 | } else if (/^\//.test(url)) { 187 | return `https://${domain}${url}`; 188 | } 189 | return url; 190 | } 191 | 192 | export default { 193 | strDiscode, 194 | urlToHttpUrl, 195 | }; 196 | -------------------------------------------------------------------------------- /uni_modules/uni-transition/components/uni-transition/uni-transition.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 276 | 277 | 278 | -------------------------------------------------------------------------------- /components/u-parse/libs/html2json.js: -------------------------------------------------------------------------------- 1 | /** 2 | * html2Json 改造来自: https://github.com/Jxck/html2json 3 | * 4 | * 5 | * author: Di (微信小程序开发工程师) 6 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) 7 | * 垂直微信小程序开发交流社区 8 | * 9 | * github地址: https://github.com/icindy/wxParse 10 | * 11 | * for: 微信小程序富文本解析 12 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 13 | */ 14 | 15 | import wxDiscode from './wxDiscode'; 16 | import HTMLParser from './htmlparser'; 17 | 18 | function makeMap(str) { 19 | const obj = {}; 20 | const items = str.split(','); 21 | for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; 22 | return obj; 23 | } 24 | 25 | // Block Elements - HTML 5 26 | const block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); 27 | 28 | // Inline Elements - HTML 5 29 | const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); 30 | 31 | // Elements that you can, intentionally, leave open 32 | // (and which close themselves) 33 | const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); 34 | 35 | function removeDOCTYPE(html) { 36 | const isDocument = /([^]*)<\/body>/.test(html); 37 | return isDocument ? RegExp.$1 : html; 38 | } 39 | 40 | function trimHtml(html) { 41 | return html 42 | .replace(//gi, '') 43 | .replace(/\/\*.*?\*\//gi, '') 44 | .replace(/[ ]+/gi, '') 46 | .replace(//gi, ''); 47 | } 48 | 49 | function getScreenInfo() { 50 | const screen = {}; 51 | wx.getSystemInfo({ 52 | success: (res) => { 53 | screen.width = res.windowWidth; 54 | screen.height = res.windowHeight; 55 | }, 56 | }); 57 | return screen; 58 | } 59 | 60 | function html2json(html, customHandler, imageProp, host) { 61 | // 处理字符串 62 | html = removeDOCTYPE(html); 63 | html = trimHtml(html); 64 | html = wxDiscode.strDiscode(html); 65 | // 生成node节点 66 | const bufArray = []; 67 | const results = { 68 | nodes: [], 69 | imageUrls: [], 70 | }; 71 | 72 | const screen = getScreenInfo(); 73 | function Node(tag) { 74 | this.node = 'element'; 75 | this.tag = tag; 76 | 77 | this.$screen = screen; 78 | } 79 | 80 | HTMLParser(html, { 81 | start(tag, attrs, unary) { 82 | // node for this element 83 | const node = new Node(tag); 84 | 85 | if (bufArray.length !== 0) { 86 | const parent = bufArray[0]; 87 | if (parent.nodes === undefined) { 88 | parent.nodes = []; 89 | } 90 | } 91 | 92 | if (block[tag]) { 93 | node.tagType = 'block'; 94 | } else if (inline[tag]) { 95 | node.tagType = 'inline'; 96 | } else if (closeSelf[tag]) { 97 | node.tagType = 'closeSelf'; 98 | } 99 | 100 | node.attr = attrs.reduce((pre, attr) => { 101 | const { name } = attr; 102 | let { value } = attr; 103 | if (name === 'class') { 104 | node.classStr = value; 105 | } 106 | // has multi attibutes 107 | // make it array of attribute 108 | if (name === 'style') { 109 | node.styleStr = value; 110 | } 111 | if (value.match(/ /)) { 112 | value = value.split(' '); 113 | } 114 | 115 | // if attr already exists 116 | // merge it 117 | if (pre[name]) { 118 | if (Array.isArray(pre[name])) { 119 | // already array, push to last 120 | pre[name].push(value); 121 | } else { 122 | // single value, make it array 123 | pre[name] = [pre[name], value]; 124 | } 125 | } else { 126 | // not exist, put it 127 | pre[name] = value; 128 | } 129 | 130 | return pre; 131 | }, {}); 132 | 133 | // 优化样式相关属性 134 | if (node.classStr) { 135 | node.classStr += ` ${node.tag}`; 136 | } else { 137 | node.classStr = node.tag; 138 | } 139 | if (node.tagType === 'inline') { 140 | node.classStr += ' inline'; 141 | } 142 | 143 | // 对img添加额外数据 144 | if (node.tag === 'img') { 145 | let imgUrl = node.attr.src; 146 | imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain); 147 | Object.assign(node.attr, imageProp, { 148 | src: imgUrl || '', 149 | }); 150 | if (imgUrl) { 151 | results.imageUrls.push(imgUrl); 152 | } 153 | } 154 | 155 | // 处理a标签属性 156 | if (node.tag === 'a') { 157 | node.attr.href = node.attr.href || ''; 158 | } 159 | 160 | // 处理font标签样式属性 161 | if (node.tag === 'font') { 162 | const fontSize = [ 163 | 'x-small', 164 | 'small', 165 | 'medium', 166 | 'large', 167 | 'x-large', 168 | 'xx-large', 169 | '-webkit-xxx-large', 170 | ]; 171 | const styleAttrs = { 172 | color: 'color', 173 | face: 'font-family', 174 | size: 'font-size', 175 | }; 176 | if (!node.styleStr) node.styleStr = ''; 177 | Object.keys(styleAttrs).forEach((key) => { 178 | if (node.attr[key]) { 179 | const value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key]; 180 | node.styleStr += `${styleAttrs[key]}: ${value};`; 181 | } 182 | }); 183 | } 184 | 185 | // 临时记录source资源 186 | if (node.tag === 'source') { 187 | results.source = node.attr.src; 188 | } 189 | 190 | if (customHandler.start) { 191 | customHandler.start(node, results); 192 | } 193 | 194 | if (unary) { 195 | // if this tag doesn't have end tag 196 | // like 197 | // add to parents 198 | const parent = bufArray[0] || results; 199 | if (parent.nodes === undefined) { 200 | parent.nodes = []; 201 | } 202 | parent.nodes.push(node); 203 | } else { 204 | bufArray.unshift(node); 205 | } 206 | }, 207 | end(tag) { 208 | // merge into parent tag 209 | const node = bufArray.shift(); 210 | if (node.tag !== tag) { 211 | console.error('invalid state: mismatch end tag'); 212 | } 213 | 214 | // 当有缓存source资源时于于video补上src资源 215 | if (node.tag === 'video' && results.source) { 216 | node.attr.src = results.source; 217 | delete results.source; 218 | } 219 | 220 | if (customHandler.end) { 221 | customHandler.end(node, results); 222 | } 223 | 224 | if (bufArray.length === 0) { 225 | results.nodes.push(node); 226 | } else { 227 | const parent = bufArray[0]; 228 | if (!parent.nodes) { 229 | parent.nodes = []; 230 | } 231 | parent.nodes.push(node); 232 | } 233 | }, 234 | chars(text) { 235 | if (!text.trim()) return; 236 | 237 | const node = { 238 | node: 'text', 239 | text, 240 | }; 241 | 242 | if (customHandler.chars) { 243 | customHandler.chars(node, results); 244 | } 245 | 246 | if (bufArray.length === 0) { 247 | results.nodes.push(node); 248 | } else { 249 | const parent = bufArray[0]; 250 | if (parent.nodes === undefined) { 251 | parent.nodes = []; 252 | } 253 | parent.nodes.push(node); 254 | } 255 | }, 256 | }); 257 | 258 | return results; 259 | } 260 | 261 | export default html2json; 262 | -------------------------------------------------------------------------------- /uni_modules/uni-open-bridge-common/uniCloud/cloudfunctions/common/uni-open-bridge-common/uni-cloud-cache.js: -------------------------------------------------------------------------------- 1 | const db = uniCloud.database() 2 | 3 | function getType(value) { 4 | return Object.prototype.toString.call(value).slice(8, -1).toLowerCase() 5 | } 6 | 7 | const validator = { 8 | key: function(value) { 9 | const err = new Error('Invalid key') 10 | if (typeof value !== 'string') { 11 | throw err 12 | } 13 | const valueTrim = value.trim() 14 | if (!valueTrim || valueTrim !== value) { 15 | throw err 16 | } 17 | }, 18 | value: function(value) { 19 | // 仅作简单校验 20 | const type = getType(value) 21 | const validValueType = ['null', 'number', 'string', 'array', 'object'] 22 | if (validValueType.indexOf(type) === -1) { 23 | throw new Error('Invalid value type') 24 | } 25 | }, 26 | duration: function(value) { 27 | const err = new Error('Invalid duration') 28 | if (value === undefined) { 29 | return 30 | } 31 | if (typeof value !== 'number' || value === 0) { 32 | throw err 33 | } 34 | } 35 | } 36 | 37 | /** 38 | * 入库时 expired 为过期时间对应的时间戳,永不过期用-1表示 39 | * 返回结果时 与redis对齐,-1表示永不过期,-2表示已过期或不存在 40 | */ 41 | class DatabaseCache { 42 | constructor({ 43 | collection = 'opendb-open-data' 44 | } = {}) { 45 | this.type = 'db' 46 | this.collection = db.collection(collection) 47 | } 48 | 49 | _serializeValue(value) { 50 | return value === undefined ? null : JSON.stringify(value) 51 | } 52 | 53 | _deserializeValue(value) { 54 | return value ? JSON.parse(value) : value 55 | } 56 | 57 | async set(key, value, duration) { 58 | validator.key(key) 59 | validator.value(value) 60 | validator.duration(duration) 61 | value = this._serializeValue(value) 62 | await this.collection.doc(key).set({ 63 | value, 64 | expired: duration && duration !== -1 ? Date.now() + (duration * 1000) : -1 65 | }) 66 | } 67 | 68 | async _getWithDuration(key) { 69 | const getKeyRes = await this.collection.doc(key).get() 70 | const record = getKeyRes.data[0] 71 | if (!record) { 72 | return { 73 | value: null, 74 | duration: -2 75 | } 76 | } 77 | const value = this._deserializeValue(record.value) 78 | const expired = record.expired 79 | if (expired === -1) { 80 | return { 81 | value, 82 | duration: -1 83 | } 84 | } 85 | const duration = expired - Date.now() 86 | if (duration <= 0) { 87 | await this.remove(key) 88 | return { 89 | value: null, 90 | duration: -2 91 | } 92 | } 93 | return { 94 | value, 95 | duration: Math.floor(duration / 1000) 96 | } 97 | } 98 | 99 | async get(key, { 100 | withDuration = true 101 | } = {}) { 102 | const result = await this._getWithDuration(key) 103 | if (!withDuration) { 104 | delete result.duration 105 | } 106 | return result 107 | } 108 | 109 | async remove(key) { 110 | await this.collection.doc(key).remove() 111 | } 112 | } 113 | 114 | class RedisCache { 115 | constructor() { 116 | this.type = 'redis' 117 | this.redis = uniCloud.redis() 118 | } 119 | 120 | _serializeValue(value) { 121 | return value === undefined ? null : JSON.stringify(value) 122 | } 123 | 124 | _deserializeValue(value) { 125 | return value ? JSON.parse(value) : value 126 | } 127 | 128 | async set(key, value, duration) { 129 | validator.key(key) 130 | validator.value(value) 131 | validator.duration(duration) 132 | value = this._serializeValue(value) 133 | if (!duration || duration === -1) { 134 | await this.redis.set(key, value) 135 | } else { 136 | await this.redis.set(key, value, 'EX', duration) 137 | } 138 | } 139 | 140 | async get(key, { 141 | withDuration = false 142 | } = {}) { 143 | let value = await this.redis.get(key) 144 | value = this._deserializeValue(value) 145 | if (!withDuration) { 146 | return { 147 | value 148 | } 149 | } 150 | const durationSecond = await this.redis.ttl(key) 151 | let duration 152 | switch (durationSecond) { 153 | case -1: 154 | duration = -1 155 | break 156 | case -2: 157 | duration = -2 158 | break 159 | default: 160 | duration = durationSecond 161 | break 162 | } 163 | return { 164 | value, 165 | duration 166 | } 167 | } 168 | 169 | async remove(key) { 170 | await this.redis.del(key) 171 | } 172 | } 173 | 174 | class Cache { 175 | constructor({ 176 | type, 177 | collection 178 | } = {}) { 179 | if (type === 'database') { 180 | return new DatabaseCache({ 181 | collection 182 | }) 183 | } else if (type === 'redis') { 184 | return new RedisCache() 185 | } else { 186 | throw new Error('Invalid cache type') 187 | } 188 | } 189 | } 190 | 191 | class CacheKey { 192 | constructor({ 193 | type, 194 | collection, 195 | cache, 196 | key, 197 | fallback 198 | } = {}) { 199 | this.cache = cache || new Cache({ 200 | type, 201 | collection 202 | }) 203 | this.key = key 204 | this.fallback = fallback 205 | } 206 | 207 | async set(value, duration) { 208 | await this.cache.set(this.key, value, duration) 209 | } 210 | 211 | async setWithSync(value, duration, syncMethod) { 212 | await Promise.all([ 213 | this.set(this.key, value, duration), 214 | syncMethod(value, duration) 215 | ]) 216 | } 217 | 218 | async get() { 219 | let { 220 | value, 221 | duration 222 | } = await this.cache.get(this.key) 223 | if (value !== null && value !== undefined) { 224 | return { 225 | value, 226 | duration 227 | } 228 | } 229 | if (!this.fallback) { 230 | return { 231 | value: null, 232 | duration: -2 233 | } 234 | } 235 | const fallbackResult = await this.fallback() 236 | value = fallbackResult.value 237 | duration = fallbackResult.duration 238 | if (value !== null && duration !== undefined) { 239 | await this.cache.set(this.key, value, duration) 240 | } 241 | return { 242 | value, 243 | duration 244 | } 245 | } 246 | 247 | async remove() { 248 | await this.cache.remove(this.key) 249 | } 250 | } 251 | 252 | class CacheKeyCascade { 253 | constructor({ 254 | layers, // [{cache, type, collection, key}] 从低级到高级排序,[DbCacheKey, RedisCacheKey] 255 | fallback 256 | } = {}) { 257 | this.layers = layers 258 | this.cacheLayers = [] 259 | let lastCacheKey 260 | for (let i = 0; i < layers.length; i++) { 261 | const { 262 | type, 263 | cache, 264 | collection, 265 | key 266 | } = layers[i] 267 | const lastCacheKeyTemp = lastCacheKey 268 | try { 269 | const currentCacheKey = new CacheKey({ 270 | type, 271 | collection, 272 | cache, 273 | key, 274 | fallback: i === 0 ? fallback : function() { 275 | return lastCacheKeyTemp.get() 276 | } 277 | }) 278 | this.cacheLayers.push(currentCacheKey) 279 | lastCacheKey = currentCacheKey 280 | } catch (e) {} 281 | } 282 | this.highLevelCache = lastCacheKey 283 | } 284 | 285 | async set(value, duration) { 286 | return Promise.all( 287 | this.cacheLayers.map(item => { 288 | return item.set(value, duration) 289 | }) 290 | ) 291 | } 292 | 293 | async setWithSync(value, duration, syncMethod) { 294 | const setPromise = this.cacheLayers.map(item => { 295 | return item.set(value, duration) 296 | }) 297 | return Promise.all( 298 | [ 299 | ...setPromise, 300 | syncMethod(value, duration) 301 | ] 302 | ) 303 | } 304 | 305 | async get() { 306 | return this.highLevelCache.get() 307 | } 308 | 309 | async remove() { 310 | await Promise.all( 311 | this.cacheLayers.map(cacheKeyItem => { 312 | return cacheKeyItem.remove() 313 | }) 314 | ) 315 | } 316 | } 317 | 318 | module.exports = { 319 | Cache, 320 | DatabaseCache, 321 | RedisCache, 322 | CacheKey, 323 | CacheKeyCascade 324 | } 325 | -------------------------------------------------------------------------------- /uni_modules/uni-row/components/uni-col/uni-col.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 214 | 215 | 318 | --------------------------------------------------------------------------------