diff --git a/App.vue b/App.vue
index 3d81af7..dfb0261 100644
--- a/App.vue
+++ b/App.vue
@@ -10,8 +10,14 @@
console.log('App Hide')
}
}
-
+
+
+
-
diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue
new file mode 100644
index 0000000..8bbf401
--- /dev/null
+++ b/components/goods-list/goods-list.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.price}}易币
+
+
+ ¥{{item.original_price}}
+
+
+
+ 月易量{{item.sales}}
+
+
+
+
+
+
+
+
+
+ {{toast}}
+
+
+
+
+
+
+
+
diff --git a/components/tn-datepicker/tn-datepicker.vue b/components/tn-datepicker/tn-datepicker.vue
new file mode 100644
index 0000000..8ca83fe
--- /dev/null
+++ b/components/tn-datepicker/tn-datepicker.vue
@@ -0,0 +1,904 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{date.title}}
+
+
+
+
+ {{date.tips}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 88a66b5..d20e172 100644
--- a/pages.json
+++ b/pages.json
@@ -1,24 +1,102 @@
{
"pages": [{
- "path": "pages/index/index"
+ "path": "pages/index/index",
+ "name": "Index",
+ "style": {
+ "navigationBarTitleText":"发现能量"
+ }
}, {
- "path": "pages/found/index"
+ "path": "pages/found/index",
+ "name": "Found",
+ "style": {
+ "navigationBarTitleText":"发现更多"
+ }
}, {
- "path": "pages/user/index"
+ "path": "pages/user/index",
+ "name": "User",
+ "style": {
+ "navigationBarTitleText":"节点中心"
+ }
+ }, {
+ "path": "pages/instrument/basics",
+ "name": "instrumentBasics",
+ "style": {
+ "navigationBarTitleText":"企业基础信息"
+ }
+ }, {
+ "path": "pages/goods/management",
+ "name": "goodsManagement",
+ "style": {
+ "navigationBarTitleText":"商品权证管理"
+ }
+ }, {
+ "path": "pages/goods/addClassify",
+ "name": "goodsaddClassify",
+ "style": {
+ "navigationBarTitleText":"发布商品类目"
+ }
+ }, {
+ "path": "pages/goods/add",
+ "name": "goodsAdd",
+ "style": {
+ "navigationBarTitleText":"商品权证创建"
+ }
+ }, {
+ "path": "pages/goods/goodsAuth",
+ "name": "goodsAddAuth",
+ "style": {
+ "navigationBarTitleText":"商品权证认证"
+ }
+ }, {
+ "path": "pages/coupons/management",
+ "name": "couponsManagement",
+ "style": {
+ "navigationBarTitleText":"创建优惠券"
+ }
+ }, {
+ "path": "pages/coupons/add",
+ "name": "couponsAdd",
+ "style": {
+ "navigationBarTitleText":"创建优惠券"
+ }
+ }, {
+ "path": "pages/coupons/magDetails",
+ "name": "couponsDetails",
+ "style": {
+ "navigationBarTitleText":"优惠券管理"
+ }
+ }, {
+ "path": "pages/coupons/selectGoods",
+ "name": "couponsSelectGoods",
+ "style": {
+ "navigationBarTitleText":"关联产品"
+ }
}],
"globalStyle": {
"navigationStyle": "custom",
- "backgroundColor": "#F8F8F8"
+ "backgroundColor": "#F5F5F5"
},
- "tabBar": {
+ "tabBar": {
+ "borderStyle": "white",
+ "backgroundColor": "#FFFFFF",
+ "selectedColor" : "#774ffd",
+ "iconWidth":"26px",
+ "spacing": "0",
+ "height":"60px",
"list": [{
- "text": "发现能量",
+ "text": "发现能量",
+ "iconPath":"static/tabBar/tabBar_icon_00.png",
+ "selectedIconPath":"static/tabBar/tabBar_show_00.png",
"pagePath": "pages/index/index"
}, {
- "text": "发现更多",
+ "text": "发现更多",
+ "iconPath":"static/tabBar/tabBar_icon_01.png",
+ "selectedIconPath":"static/tabBar/tabBar_show_01.png",
"pagePath": "pages/found/index"
}, {
- "text": "节点中心",
+ "text": "节点中心",
+ "iconPath":"static/tabBar/tabBar_icon_02.png",
+ "selectedIconPath":"static/tabBar/tabBar_show_02.png",
"pagePath": "pages/user/index"
}]
},
diff --git a/pages/coupons/couponList.vue b/pages/coupons/couponList.vue
deleted file mode 100644
index d1c5728..0000000
--- a/pages/coupons/couponList.vue
+++ /dev/null
@@ -1,852 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.title}}
-
- {{item.subhead}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{it.title}}
-
- {{it.channel.value === 'part'?'关联商品('+it.goods_count+')件':'全网商品通用'}}
-
-
-
-
- {{it.price}} 元
- {{it.title}}
-
-
-
- {{it.title}}
-
- {{it.channel.value === 'part'?'关联商品('+it.goods_count+')件':'全网商品通用'}}
-
-
-
-
- 领取
-
- 去使用
-
- 过期
- 关闭
-
-
-
-
-
-
-
-
-
-
-
-
- 惊喜多多
-
-
-
-
- {{item.title}}
- {{item.price}}元
- {{item.title}}
- 满{{item.full}}元可用
-
-
- 关联商品 ({{item.goods_count>0?item.goods_count:'-'}}) 件
-
-
-
- 每人限领{{item.my_get_quantity}}/{{item.person_quantity}}张
-
-
-
- {{item.ratio}}%
-
-
-
- 立即领取
- 去使用
-
-
-
-
-
-
-
-
- 服务券
-
-
-
-
-
-
-
- {{item.title}}
- 每人限领{{item.my_get_quantity}}/{{item.person_quantity}}张
-
-
- {{item.channel.value === 'part'?'关联商品'+item.goods_count+'件选1':'全网商品通用'}}
-
-
-
-
-
-
- 已抢 {{item.ratio}}%
-
-
-
- 立即领取
- 去使用
-
-
-
-
-
-
- 代金券
-
-
-
- {{item.price}} 元
- {{item.type.text}}
-
-
- {{item.title}}
- 每人限领{{item.my_get_quantity}}/{{item.person_quantity}}张
-
- {{item.channel.value === 'part'?'关联商品'+item.goods_count+'件选1':'全网商品通用'}}
-
-
-
-
-
-
-
- 已抢 {{item.ratio}}%
-
-
- 立即领取
- 去使用
-
-
-
-
-
-
- 提货券
-
-
-
-
-
-
-
- {{item.title}}
- 每人限领{{item.my_get_quantity}}/{{item.person_quantity}}张
-
-
- {{item.channel.value === 'part'?'关联商品'+item.goods_count+'件选1':'全网商品通用'}}
-
-
-
-
-
-
- 已抢 {{item.ratio}}%
-
-
- 立即领取
- 去使用
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/coupons/index.vue b/pages/coupons/index.vue
deleted file mode 100644
index 44e7514..0000000
--- a/pages/coupons/index.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- 优惠券
-
-
-
-
-
-
diff --git a/pages/found/index.vue b/pages/found/index.vue
index 92d1ab6..49a5696 100644
--- a/pages/found/index.vue
+++ b/pages/found/index.vue
@@ -1,549 +1,17 @@
-
-
-
-
-
-
-
-
-
-
-
- 原石 {{ account.coin }}
- 水晶 {{ account.crystal }}
-
-
-
-
-
-
-
-
- 水晶{{ item.amount || '-'}}
-
-
-
-
- 购物
-
-
-
-
-
-
-
- {{ item.remark }}
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
- 每日签到
-
- 累计天数越多。水晶奖励越多
-
-
-
- 立即签到
-
-
-
-
-
-
-
-
- +{{ item.crystal }}
- {{ item.text }}
-
-
- 再签到{{ sign.nextTask.day }}天额外赠送{{ sign.nextTask.diff }}个水晶奖励
-
-
-
-
-
- 水晶任务
-
-
-
-
-
- {{item.title || '-'}}
- {{item.remark || '-'}}
- {{item.tips || '-'}}
-
-
-
+
+ 发现更多
-
diff --git a/pages/goods/attestation.vue b/pages/goods/attestation.vue
deleted file mode 100644
index 21da268..0000000
--- a/pages/goods/attestation.vue
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
- 区块链溯源码:{{info.token}}
-
-
- 商品认证
-
-
- {{info.goods.type ===1?'商品名称':'项目名称'}}:
- {{info.goods.name || '暂无数据'}}
-
-
- 生产批次:
- {{info.goods.batch || '暂无数据'}}
-
-
- 项目分类:
- {{info.goods.category || '暂无数据'}}
-
-
-
- 规格:
- {{info.goods.skus[0].unit || '暂无数据'}}
-
-
- 数量:
- {{info.goods.skus[0].stock || '暂无数据'}}
-
-
- 售价:
- {{info.goods.skus[0].price || '暂无数据'}}
-
-
- 生产日期:
- {{info.goods.producted_at || '暂无数据'}}
-
-
- {{info.goods.type ===1?'保质期':'有效期'}}:
- {{info.goods.expiried_at || '暂无数据'}}
-
-
- 生产厂家:
- {{info.goods.product_name || '暂无数据'}}
-
-
- 生产地:
- {{info.goods.product_address || '暂无数据'}}
-
-
- 供应商:
- {{info.goods.skus[0].price || '暂无数据'}}
-
-
- 经营许可证:
- {{info.goods.lisence || '暂无数据'}}
-
-
- 实物照片:
-
- 暂无数据
-
-
-
-
-
-
- 企业认证
-
-
- 企业名称:
- {{info.certification.name || '暂无数据'}}
-
-
- 企业地址:
- {{info.certification.address || '暂无数据'}}
-
-
- 统一信用代码:
- {{info.certification.certification.code || '暂无数据'}}
-
-
- 行业:
- {{info.certification.industry.title || '暂无数据'}}
-
-
- 经营范围:
- {{info.certification.range || '暂无数据'}}
-
-
- 联系电话:
-
- 暂无数据
-
-
- 营业执照:
-
- 暂无数据
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/goods/chain.vue b/pages/goods/chain.vue
deleted file mode 100644
index 3327c02..0000000
--- a/pages/goods/chain.vue
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
- 易品新境区块链溯源证书
- 区块链溯源证书:{{info.token}}
-
- 兹证明:
-
- {{info.company.name}},产品符合溯源规范,认证内容如下:特授权其产品在易品新境区块链溯源商城出售!
-
- 交易哈希: {{info.hash}}
- 区块链高度: {{info.height}}
-
- 授权时间: {{info.applied_at}}
- 有效期至: {{info.ended_at}}
- 易品新境区块链有限公司
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/goods/details.vue b/pages/goods/details.vue
deleted file mode 100644
index 41e4c46..0000000
--- a/pages/goods/details.vue
+++ /dev/null
@@ -1,737 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{goodsObj.shop.name}}
-
-
-
- 进店
-
-
-
- 区块链证书
-
-
-
- 商品认证
-
-
-
- 商品溯源
-
-
-
-
-
-
-
-
- {{goodsObj.skus[0].goods_name}}
-
-
-
- 特价商品不可与优惠券叠加使用
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 41cadb8..2bc0811 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,484 +1,19 @@
-
-
-
-
-
-
- {{item.nickname}} {{item.title}} {{item.amount}}
-
-
-
-
-
-
-
-
-
- {{isAuth ? '持有原石量': '恒量发行原石量'}}
- {{occ}}
- 立即登录
- 我的钱包
-
-
-
-
-
-
-
-
-
-
-
- 轻节点
- {{occs.light || '-'}}
-
-
- 合作节点
- {{occs.cooperation || '-'}}
-
-
- 主节点
- {{occs.main || '-'}}
-
-
- 超级节点
- {{occs.super || '-'}}
-
-
- 运营节点
- {{occs.operating || '-'}}
-
-
- 技术节点
- {{occs.technology || '-'}}
-
-
-
-
- 平台累计营业额和原石价值走势图
-
-
-
-
-
+ 发现能量
-
-
diff --git a/pages/store/basics.vue b/pages/instrument/basics.vue
similarity index 100%
rename from pages/store/basics.vue
rename to pages/instrument/basics.vue
diff --git a/pages/store/customer.vue b/pages/instrument/customer.vue
similarity index 99%
rename from pages/store/customer.vue
rename to pages/instrument/customer.vue
index 3ea61d6..06c0359 100644
--- a/pages/store/customer.vue
+++ b/pages/instrument/customer.vue
@@ -76,7 +76,6 @@
-
diff --git a/pages/market/details.vue b/pages/market/details.vue
deleted file mode 100644
index ca7a5d0..0000000
--- a/pages/market/details.vue
+++ /dev/null
@@ -1,353 +0,0 @@
-
-
-
-
-
-
- 数字权证
- 锚定商品:{{info.goods.goods_name}}
- 提供企业:{{info.company.name}}
- 查看锚定商品信息
-
-
-
-
- {{info.user.username}}
-
-
-
- ¥{{info.price}}
-
-
-
- {{info.stock}}
-
-
-
- {{info.surplus}}
-
-
-
- {{info.hash}}
-
-
-
- {{info.created_at}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/market/goods.vue b/pages/market/goods.vue
deleted file mode 100644
index 0828e1f..0000000
--- a/pages/market/goods.vue
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{info.name}}
-
-
-
- {{info.skusUnit}}
-
-
-
- {{info.companyName}}
-
-
-
- {{info.integrity}}
-
-
-
- {{info.sales}}
-
-
-
- {{info.createdAt}}
-
-
-
-
-
-
-
-
diff --git a/pages/market/index.vue b/pages/market/index.vue
deleted file mode 100644
index 140f866..0000000
--- a/pages/market/index.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
- 最新
-
- 价格
-
-
-
-
-
-
-
- 数字权证{{item.surplus}}/{{item.stock}}
- 锚定商品:{{item.goods.goods_name}}
- 提供企业:{{item.company.name}}
- 转让用户:{{item.user.nickname}}
-
- ¥{{item.price}}/个
-
-
-
-
-
-
-
-
diff --git a/pages/market/logs.vue b/pages/market/logs.vue
deleted file mode 100644
index fe3f7dd..0000000
--- a/pages/market/logs.vue
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
- 我转让的
- 我买到的
-
-
-
-
-
-
- {{item.goods.goods_name}}
-
-
-
- ¥{{item.price}}
-
-
-
- {{item.qty}}
-
-
-
- {{item.sellUser.nickname}}
-
-
-
- {{item.buyUser.nickname}}
-
-
-
- {{item.created_at}}
-
-
-
-
-
-
-
- 暂无数据
-
-
-
-
-
-
-
-
diff --git a/pages/market/management.vue b/pages/market/management.vue
deleted file mode 100644
index e3a9c25..0000000
--- a/pages/market/management.vue
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
-
-
-
- 数字权证{{item.surplus}}/{{item.stock}}
- 锚定商品:{{item.goods.goods_name}}
- 交易哈希:{{item.hash}}
- 发布时间:{{item.created_at}}
-
-
- {{item.price}}/个
- 取消转让
- {{item.status.text}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/market/transfer.vue b/pages/market/transfer.vue
deleted file mode 100644
index 9a4731f..0000000
--- a/pages/market/transfer.vue
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
-
-
-
- 数字权证
- 锚定商品:{{info.goods.goods_name}}
- 提供企业:{{info.goods.company.name}}
- 查看锚定商品信息
-
-
-
-
- 1000.00
-
-
-
- {{info.account.balance}}
-
-
-
-
-
-
-
-
-
-
-
- {{forecast}}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/Spread.vue b/pages/store/Spread.vue
deleted file mode 100644
index 48c53b6..0000000
--- a/pages/store/Spread.vue
+++ /dev/null
@@ -1,249 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{companyInfo.name}}
- 易货平台
-
-
-
-
-
-
-
-
- 扫码推广
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/deliver.vue b/pages/store/deliver.vue
deleted file mode 100644
index e74fac2..0000000
--- a/pages/store/deliver.vue
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- 您还没有相关订单
-
-
-
-
-
-
-
diff --git a/pages/store/deliverForm.vue b/pages/store/deliverForm.vue
deleted file mode 100644
index d87b24e..0000000
--- a/pages/store/deliverForm.vue
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/examine.vue b/pages/store/examine.vue
deleted file mode 100644
index f99c77f..0000000
--- a/pages/store/examine.vue
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/index.vue b/pages/store/index.vue
deleted file mode 100644
index e9f3831..0000000
--- a/pages/store/index.vue
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
-
-
-
-
- 企业工具
-
-
-
-
- {{appliesState.message}}
-
-
-
-
- 认证失败
- {{appliesState.message}}
-
-
-
-
- {{appliesState.message}}
-
-
-
-
-
-
-
-
- {{company.name}}
-
- 诚信{{company.faith}}
- {{company.identity}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 企业工具
-
-
-
- 一键开启您的易货之旅
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/journal.vue b/pages/store/journal.vue
deleted file mode 100644
index 184383e..0000000
--- a/pages/store/journal.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
- 操作来源:
- {{ item.isMy ? '个人' : '商家' }}
-
-
- 申请原因:
- {{ item.title }}
-
-
- 申请状态:
- {{ item.state_text }}
-
-
- 补充描述:
- {{ item.remark }}
-
-
- 退款时间:
- {{ item.created_at }}
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/logistic.vue b/pages/store/logistic.vue
deleted file mode 100644
index a58650e..0000000
--- a/pages/store/logistic.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
- 收
-
-
- 收货地址:发接口返回绝对是放假客户端上看见发货数据库大黄蜂教科书的浩丰科技
-
-
-
-
-
-
- 发货中 2020-15-12
-
-
- 华东师范邯郸市科技发货圣诞节客服
-
-
-
-
-
-
- {{message}}
-
-
-
-
-
-
-
diff --git a/pages/store/orderDetails.vue b/pages/store/orderDetails.vue
deleted file mode 100644
index 1975ff0..0000000
--- a/pages/store/orderDetails.vue
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/store/return.vue b/pages/store/return.vue
deleted file mode 100644
index 2b582cb..0000000
--- a/pages/store/return.vue
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- 您还没有相关订单
-
-
-
-
-
-
-
diff --git a/pages/store/visitors.vue b/pages/store/visitors.vue
deleted file mode 100644
index e771cd8..0000000
--- a/pages/store/visitors.vue
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-
-
- 日访客
- 月访客
- 年访客
-
-
-
-
-
- {{dateValue}}
-
-
-
- 访客量 {{visitor.factor}} 人
- 累计访客量 {{visitor.all}} 人
-
-
-
-
-
-
-
- {{item.nickname || '-'}}
- 访问记录: {{item.content || '-'}}
- 手机号码: {{item.mobile || '-'}}
- 访问时间: {{item.date || '-'}}
-
-
-
-
-
-
- 暂无相关访客记录
-
-
-
-
-
-
-
-
diff --git a/pages/user/index.vue b/pages/user/index.vue
index cb90488..cdcf59a 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -1,6 +1,13 @@
- 节点中心
+
+ 基础信息
+ 商品权证
+ 优惠券管理
+ 店员管理
+ 成交客户
+ 店员管理
+
@@ -15,5 +22,15 @@
diff --git a/public/date.js b/public/date.js
new file mode 100644
index 0000000..ca30b41
--- /dev/null
+++ b/public/date.js
@@ -0,0 +1,30 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * moduleName: 日期
+ */
+
+export default getDate = (type) =>{
+ return new Promise((resolve, reject) => {
+ const date = new Date()
+ const year = date.getFullYear()
+ const month = (date.getMonth() + 1) <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth()
+ const day = date.getDate()
+
+ switch(type){
+ case 'day':
+ resolve(year + '-' + month + '-' + day)
+ break
+ case 'month':
+ resolve(year + '-' + month)
+ break
+ case 'year':
+ resolve(year)
+ break
+ default:
+ resolve(year + '-' + month + '-' + day)
+ }
+ })
+}
diff --git a/public/userAuth.js b/public/userAuth.js
new file mode 100644
index 0000000..2349145
--- /dev/null
+++ b/public/userAuth.js
@@ -0,0 +1,135 @@
+
+/**
+ * Web唐明明
+ * 匆匆数载恍如梦,岁月迢迢华发增。
+ * 碌碌无为枉半生,一朝惊醒万事空。
+ * moduleName: 登录
+ */
+
+import { router } from '../router'
+import { keyAuth } from '../apis/interfaces/auth'
+import store from '../store'
+
+class userAuth {
+ constructor() {
+ this.univerfyConfig = {
+ fullScreen : true,
+ authButton: {
+ 'title': '一键登录',
+ 'normalColor': '#c82626',
+ 'highlightColor': '#a61010',
+ 'disabledColor': '#d86767',
+ 'borderRadius': '0'
+ },
+ otherLoginButton: {
+ 'title': '其他手机号码',
+ 'borderColor': '#c82626',
+ 'borderRadius': '0',
+ 'textColor': '#c82626'
+ },
+ privacyTerms: {
+ 'checkedImage': '/static/icons/checked-icon.png',
+ 'uncheckedImage': '/static/icons/unchecked-icon.png',
+ 'textColor': '#555555',
+ 'termsColor': '#c82626',
+ 'suffix': '并使用本机号码登录/注册',
+ 'privacyItems': [{
+ 'url': 'https://www.baidu.com',
+ 'title': '用户隐私规格'
+ },{
+ 'url': 'https://www.baidu.com',
+ 'title': '用户服务协议'
+ }]
+ },
+ buttons: {
+ 'iconWidth': '45px',
+ 'list': [{
+ "provider": '微信登录',
+ "iconPath": '/static/icons/wechat.png',
+ }]
+ }
+ }
+ }
+ // 预登录
+ Login(){
+ return new Promise((resolve, reject) => {
+ uni.showLoading({
+ title: '加载中',
+ mask : true
+ })
+ uni.preLogin({
+ provider: 'univerify',
+ success : res=> {
+ this.keyLogin().then(() => {
+ resolve({
+ auth: true
+ })
+ }).catch(errMsg => {
+ reject(errMsg)
+ })
+ },
+ fail : err=> {
+ router.push({name: 'Login'})
+ },
+ complete() {
+ uni.hideLoading()
+ }
+ })
+ })
+ }
+ // 一键登录
+ keyLogin(){
+ return new Promise((resolve, reject) => {
+ uni.login({
+ provider : 'univerify',
+ univerifyStyle : {...this.univerfyConfig},
+ success: authResult => {
+ keyAuth({
+ access_token: authResult.authResult.access_token,
+ openid : authResult.authResult.openid
+ }).then(res => {
+ uni.closeAuthView()
+ store.commit('setToken', res.token_type + ' ' + res.access_token)
+ resolve()
+ if(!res.is_company){
+ router.push({name: "Registered"})
+ return
+ }
+ }).catch(err => {
+ reject(err)
+ })
+ },
+ fail : err => {
+ uni.closeAuthView()
+ switch(err.code){
+ case 30002:
+ router.push({name: "Login"})
+ break
+ case 30008:
+ this.wechatAuth()
+ break
+ }
+ }
+ })
+ })
+ }
+
+ /**
+ * 微信登录
+ */
+ wechatAuth(){
+ uni.showToast({
+ title: '微信登录',
+ icon : 'none'
+ })
+ }
+
+ /**
+ * 处理登录状态维护
+ */
+ updAuthToken(){
+
+ }
+}
+
+export default userAuth
diff --git a/scss/globa.scss b/scss/globa.scss
index 073c20e..5092a9b 100644
--- a/scss/globa.scss
+++ b/scss/globa.scss
@@ -9,9 +9,7 @@
$text-color: #333;
$text-gray: #555;
$text-gray-m: #999;
-$text-price: #e93340;
-$main-color: #e93340;
-$main-color-light: #e93340;
+$text-price: #8b64fd;
// 边框颜色
$border-color: #ddd;
@@ -111,7 +109,6 @@ $padding: 30rpx;
-webkit-line-clamp: 5;
}
-
// 修改nvtab
$mainColor: white;
diff --git a/static/icons/add-icon.png b/static/icons/add-icon.png
new file mode 100644
index 0000000..1390ef3
Binary files /dev/null and b/static/icons/add-icon.png differ
diff --git a/static/icons/approve-icon.png b/static/icons/approve-icon.png
new file mode 100644
index 0000000..6518639
Binary files /dev/null and b/static/icons/approve-icon.png differ
diff --git a/static/icons/audit-icon.png b/static/icons/audit-icon.png
new file mode 100644
index 0000000..e4329d6
Binary files /dev/null and b/static/icons/audit-icon.png differ
diff --git a/static/icons/checked-icon.png b/static/icons/checked-icon.png
new file mode 100644
index 0000000..9f866ee
Binary files /dev/null and b/static/icons/checked-icon.png differ
diff --git a/static/icons/e-logo-white.png b/static/icons/e-logo-white.png
new file mode 100644
index 0000000..62ef1e0
Binary files /dev/null and b/static/icons/e-logo-white.png differ
diff --git a/static/icons/e-logo.png b/static/icons/e-logo.png
new file mode 100644
index 0000000..05ca1f8
Binary files /dev/null and b/static/icons/e-logo.png differ
diff --git a/static/icons/equity_arrow_icon.png b/static/icons/equity_arrow_icon.png
new file mode 100644
index 0000000..5daf429
Binary files /dev/null and b/static/icons/equity_arrow_icon.png differ
diff --git a/static/icons/equity_arrow_right.png b/static/icons/equity_arrow_right.png
new file mode 100644
index 0000000..ad089b1
Binary files /dev/null and b/static/icons/equity_arrow_right.png differ
diff --git a/static/icons/equity_arrow_up.png b/static/icons/equity_arrow_up.png
new file mode 100644
index 0000000..9d3bd78
Binary files /dev/null and b/static/icons/equity_arrow_up.png differ
diff --git a/static/icons/equity_coupons_01.png b/static/icons/equity_coupons_01.png
new file mode 100644
index 0000000..ee06cdb
Binary files /dev/null and b/static/icons/equity_coupons_01.png differ
diff --git a/static/icons/equity_coupons_02.png b/static/icons/equity_coupons_02.png
new file mode 100644
index 0000000..2e2eaff
Binary files /dev/null and b/static/icons/equity_coupons_02.png differ
diff --git a/static/icons/equity_coupons_03.png b/static/icons/equity_coupons_03.png
new file mode 100644
index 0000000..071841a
Binary files /dev/null and b/static/icons/equity_coupons_03.png differ
diff --git a/static/icons/equity_nav.png b/static/icons/equity_nav.png
new file mode 100644
index 0000000..aa2badf
Binary files /dev/null and b/static/icons/equity_nav.png differ
diff --git a/static/icons/fire.png b/static/icons/fire.png
new file mode 100644
index 0000000..ccc78e9
Binary files /dev/null and b/static/icons/fire.png differ
diff --git a/static/icons/goods_buy.png b/static/icons/goods_buy.png
new file mode 100644
index 0000000..634d99a
Binary files /dev/null and b/static/icons/goods_buy.png differ
diff --git a/static/icons/goods_close.png b/static/icons/goods_close.png
new file mode 100644
index 0000000..260ea60
Binary files /dev/null and b/static/icons/goods_close.png differ
diff --git a/static/icons/goods_row.png b/static/icons/goods_row.png
new file mode 100644
index 0000000..50dc5c9
Binary files /dev/null and b/static/icons/goods_row.png differ
diff --git a/static/icons/goods_spot.png b/static/icons/goods_spot.png
new file mode 100644
index 0000000..e835d42
Binary files /dev/null and b/static/icons/goods_spot.png differ
diff --git a/static/icons/listnull-icon.png b/static/icons/listnull-icon.png
new file mode 100644
index 0000000..85e34a4
Binary files /dev/null and b/static/icons/listnull-icon.png differ
diff --git a/static/icons/login-icon.png b/static/icons/login-icon.png
new file mode 100644
index 0000000..9c13aad
Binary files /dev/null and b/static/icons/login-icon.png differ
diff --git a/static/icons/market_icon_high.png b/static/icons/market_icon_high.png
new file mode 100644
index 0000000..025dc74
Binary files /dev/null and b/static/icons/market_icon_high.png differ
diff --git a/static/icons/market_icon_low.png b/static/icons/market_icon_low.png
new file mode 100644
index 0000000..68e03f1
Binary files /dev/null and b/static/icons/market_icon_low.png differ
diff --git a/static/icons/order-null.png b/static/icons/order-null.png
new file mode 100644
index 0000000..e994a40
Binary files /dev/null and b/static/icons/order-null.png differ
diff --git a/static/icons/order_icon_00.png b/static/icons/order_icon_00.png
new file mode 100644
index 0000000..0617cc1
Binary files /dev/null and b/static/icons/order_icon_00.png differ
diff --git a/static/icons/order_icon_01.png b/static/icons/order_icon_01.png
new file mode 100644
index 0000000..4165b8d
Binary files /dev/null and b/static/icons/order_icon_01.png differ
diff --git a/static/icons/order_icon_02.png b/static/icons/order_icon_02.png
new file mode 100644
index 0000000..8949222
Binary files /dev/null and b/static/icons/order_icon_02.png differ
diff --git a/static/icons/order_icon_03.png b/static/icons/order_icon_03.png
new file mode 100644
index 0000000..be4d9a5
Binary files /dev/null and b/static/icons/order_icon_03.png differ
diff --git a/static/icons/order_icon_04.png b/static/icons/order_icon_04.png
new file mode 100644
index 0000000..095d957
Binary files /dev/null and b/static/icons/order_icon_04.png differ
diff --git a/static/icons/payWay_icon_00.png b/static/icons/payWay_icon_00.png
new file mode 100644
index 0000000..ee42a3a
Binary files /dev/null and b/static/icons/payWay_icon_00.png differ
diff --git a/static/icons/payWay_icon_01.png b/static/icons/payWay_icon_01.png
new file mode 100644
index 0000000..65aeaa3
Binary files /dev/null and b/static/icons/payWay_icon_01.png differ
diff --git a/static/icons/property_icon_00.png b/static/icons/property_icon_00.png
new file mode 100644
index 0000000..37b2cd1
Binary files /dev/null and b/static/icons/property_icon_00.png differ
diff --git a/static/icons/property_icon_01.png b/static/icons/property_icon_01.png
new file mode 100644
index 0000000..b67c694
Binary files /dev/null and b/static/icons/property_icon_01.png differ
diff --git a/static/icons/property_poster.png b/static/icons/property_poster.png
new file mode 100644
index 0000000..45ca530
Binary files /dev/null and b/static/icons/property_poster.png differ
diff --git a/static/icons/search-icon.png b/static/icons/search-icon.png
new file mode 100644
index 0000000..0804a8a
Binary files /dev/null and b/static/icons/search-icon.png differ
diff --git a/static/icons/store_codeBack.png b/static/icons/store_codeBack.png
new file mode 100644
index 0000000..a1e5557
Binary files /dev/null and b/static/icons/store_codeBack.png differ
diff --git a/static/icons/store_contBack.png b/static/icons/store_contBack.png
new file mode 100644
index 0000000..c1cd0c7
Binary files /dev/null and b/static/icons/store_contBack.png differ
diff --git a/static/icons/store_down.png b/static/icons/store_down.png
new file mode 100644
index 0000000..bd92972
Binary files /dev/null and b/static/icons/store_down.png differ
diff --git a/static/icons/store_downBack.png b/static/icons/store_downBack.png
new file mode 100644
index 0000000..d0448e6
Binary files /dev/null and b/static/icons/store_downBack.png differ
diff --git a/static/icons/store_icon_icon.png b/static/icons/store_icon_icon.png
new file mode 100644
index 0000000..da7929b
Binary files /dev/null and b/static/icons/store_icon_icon.png differ
diff --git a/static/icons/store_icon_pen.png b/static/icons/store_icon_pen.png
new file mode 100644
index 0000000..89e4b46
Binary files /dev/null and b/static/icons/store_icon_pen.png differ
diff --git a/static/icons/store_icon_row.png b/static/icons/store_icon_row.png
new file mode 100644
index 0000000..be7558f
Binary files /dev/null and b/static/icons/store_icon_row.png differ
diff --git a/static/icons/store_icon_vip.png b/static/icons/store_icon_vip.png
new file mode 100644
index 0000000..8e0e7ee
Binary files /dev/null and b/static/icons/store_icon_vip.png differ
diff --git a/static/icons/store_logistic.png b/static/icons/store_logistic.png
new file mode 100644
index 0000000..2c4cf67
Binary files /dev/null and b/static/icons/store_logistic.png differ
diff --git a/static/icons/ticket-icon.png b/static/icons/ticket-icon.png
new file mode 100644
index 0000000..da60025
Binary files /dev/null and b/static/icons/ticket-icon.png differ
diff --git a/static/icons/tool_icon_00.png b/static/icons/tool_icon_00.png
new file mode 100644
index 0000000..14bc4e4
Binary files /dev/null and b/static/icons/tool_icon_00.png differ
diff --git a/static/icons/tool_icon_01.png b/static/icons/tool_icon_01.png
new file mode 100644
index 0000000..46ca67b
Binary files /dev/null and b/static/icons/tool_icon_01.png differ
diff --git a/static/icons/tool_icon_02.png b/static/icons/tool_icon_02.png
new file mode 100644
index 0000000..fc03a89
Binary files /dev/null and b/static/icons/tool_icon_02.png differ
diff --git a/static/icons/tool_icon_03.png b/static/icons/tool_icon_03.png
new file mode 100644
index 0000000..170d0db
Binary files /dev/null and b/static/icons/tool_icon_03.png differ
diff --git a/static/icons/tool_icon_04.png b/static/icons/tool_icon_04.png
new file mode 100644
index 0000000..f878479
Binary files /dev/null and b/static/icons/tool_icon_04.png differ
diff --git a/static/icons/tool_icon_05.png b/static/icons/tool_icon_05.png
new file mode 100644
index 0000000..ae69992
Binary files /dev/null and b/static/icons/tool_icon_05.png differ
diff --git a/static/icons/tool_icon_06.png b/static/icons/tool_icon_06.png
new file mode 100644
index 0000000..12bc88c
Binary files /dev/null and b/static/icons/tool_icon_06.png differ
diff --git a/static/icons/tool_icon_07.png b/static/icons/tool_icon_07.png
new file mode 100644
index 0000000..9c34926
Binary files /dev/null and b/static/icons/tool_icon_07.png differ
diff --git a/static/icons/tool_icon_08.png b/static/icons/tool_icon_08.png
new file mode 100644
index 0000000..f049d41
Binary files /dev/null and b/static/icons/tool_icon_08.png differ
diff --git a/static/icons/unchecked-icon.png b/static/icons/unchecked-icon.png
new file mode 100644
index 0000000..4154177
Binary files /dev/null and b/static/icons/unchecked-icon.png differ
diff --git a/static/icons/user_icon_00.png b/static/icons/user_icon_00.png
new file mode 100644
index 0000000..71026f2
Binary files /dev/null and b/static/icons/user_icon_00.png differ
diff --git a/static/icons/user_icon_01.png b/static/icons/user_icon_01.png
new file mode 100644
index 0000000..c749a34
Binary files /dev/null and b/static/icons/user_icon_01.png differ
diff --git a/static/icons/user_icon_02.png b/static/icons/user_icon_02.png
new file mode 100644
index 0000000..11d2c67
Binary files /dev/null and b/static/icons/user_icon_02.png differ
diff --git a/static/icons/user_icon_03.png b/static/icons/user_icon_03.png
new file mode 100644
index 0000000..0df3413
Binary files /dev/null and b/static/icons/user_icon_03.png differ
diff --git a/static/icons/user_icon_04.png b/static/icons/user_icon_04.png
new file mode 100644
index 0000000..948cfb5
Binary files /dev/null and b/static/icons/user_icon_04.png differ
diff --git a/static/icons/vip_icon.png b/static/icons/vip_icon.png
new file mode 100644
index 0000000..3f8a186
Binary files /dev/null and b/static/icons/vip_icon.png differ
diff --git a/static/icons/vip_pay_title.png b/static/icons/vip_pay_title.png
new file mode 100644
index 0000000..88a3e4b
Binary files /dev/null and b/static/icons/vip_pay_title.png differ
diff --git a/static/icons/vip_privilege_tips.png b/static/icons/vip_privilege_tips.png
new file mode 100644
index 0000000..f11ef3f
Binary files /dev/null and b/static/icons/vip_privilege_tips.png differ
diff --git a/static/icons/vip_privilege_tittle.png b/static/icons/vip_privilege_tittle.png
new file mode 100644
index 0000000..03aa18d
Binary files /dev/null and b/static/icons/vip_privilege_tittle.png differ
diff --git a/static/icons/vip_yearsIcon.png b/static/icons/vip_yearsIcon.png
new file mode 100644
index 0000000..b28bc0a
Binary files /dev/null and b/static/icons/vip_yearsIcon.png differ
diff --git a/static/icons/wechat.png b/static/icons/wechat.png
new file mode 100644
index 0000000..f4ae348
Binary files /dev/null and b/static/icons/wechat.png differ
diff --git a/static/tabBar/tabBar_icon_00.png b/static/tabBar/tabBar_icon_00.png
index a711622..2c3c43a 100644
Binary files a/static/tabBar/tabBar_icon_00.png and b/static/tabBar/tabBar_icon_00.png differ
diff --git a/static/tabBar/tabBar_icon_01.png b/static/tabBar/tabBar_icon_01.png
index 1feaaaa..9485e91 100644
Binary files a/static/tabBar/tabBar_icon_01.png and b/static/tabBar/tabBar_icon_01.png differ
diff --git a/static/tabBar/tabBar_icon_02.png b/static/tabBar/tabBar_icon_02.png
index a7a2c2c..1395dfc 100644
Binary files a/static/tabBar/tabBar_icon_02.png and b/static/tabBar/tabBar_icon_02.png differ
diff --git a/static/tabBar/tabBar_icon_03.png b/static/tabBar/tabBar_icon_03.png
deleted file mode 100644
index d3c6a3f..0000000
Binary files a/static/tabBar/tabBar_icon_03.png and /dev/null differ
diff --git a/static/tabBar/tabBar_show_00.png b/static/tabBar/tabBar_show_00.png
index 0a08dec..2f52445 100644
Binary files a/static/tabBar/tabBar_show_00.png and b/static/tabBar/tabBar_show_00.png differ
diff --git a/static/tabBar/tabBar_show_01.png b/static/tabBar/tabBar_show_01.png
index d5a54de..3bd9086 100644
Binary files a/static/tabBar/tabBar_show_01.png and b/static/tabBar/tabBar_show_01.png differ
diff --git a/static/tabBar/tabBar_show_02.png b/static/tabBar/tabBar_show_02.png
index 8e3bb5b..a256c1b 100644
Binary files a/static/tabBar/tabBar_show_02.png and b/static/tabBar/tabBar_show_02.png differ
diff --git a/static/tabBar/tabBar_show_03.png b/static/tabBar/tabBar_show_03.png
deleted file mode 100644
index 85bf12a..0000000
Binary files a/static/tabBar/tabBar_show_03.png and /dev/null differ
diff --git a/uni.scss b/uni.scss
index b5dd4ec..8336b3a 100644
--- a/uni.scss
+++ b/uni.scss
@@ -12,7 +12,8 @@
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
-@import "uview-ui/theme.scss";
+@import 'scss/globa.scss';
+@import "uview-ui/theme.scss";
/* 颜色变量 */
diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md
new file mode 100644
index 0000000..4cde217
--- /dev/null
+++ b/uni_modules/uni-icons/changelog.md
@@ -0,0 +1,8 @@
+## 1.2.1(2021-09-17)
+- 新增 支持使用 css 图标库扩展组件(仅 vue 支持)
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.5(2021-05-12)
+- 新增 组件示例地址
+## 1.1.4(2021-02-05)
+- 调整为uni_modules目录规范
diff --git a/uni_modules/uni-icons/components/uni-icons/icons.js b/uni_modules/uni-icons/components/uni-icons/icons.js
new file mode 100644
index 0000000..5242f22
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/icons.js
@@ -0,0 +1,132 @@
+export default {
+ "pulldown": "\ue588",
+ "refreshempty": "\ue461",
+ "back": "\ue471",
+ "forward": "\ue470",
+ "more": "\ue507",
+ "more-filled": "\ue537",
+ "scan": "\ue612",
+ "qq": "\ue264",
+ "weibo": "\ue260",
+ "weixin": "\ue261",
+ "pengyouquan": "\ue262",
+ "loop": "\ue565",
+ "refresh": "\ue407",
+ "refresh-filled": "\ue437",
+ "arrowthindown": "\ue585",
+ "arrowthinleft": "\ue586",
+ "arrowthinright": "\ue587",
+ "arrowthinup": "\ue584",
+ "undo-filled": "\ue7d6",
+ "undo": "\ue406",
+ "redo": "\ue405",
+ "redo-filled": "\ue7d9",
+ "bars": "\ue563",
+ "chatboxes": "\ue203",
+ "camera": "\ue301",
+ "chatboxes-filled": "\ue233",
+ "camera-filled": "\ue7ef",
+ "cart-filled": "\ue7f4",
+ "cart": "\ue7f5",
+ "checkbox-filled": "\ue442",
+ "checkbox": "\ue7fa",
+ "arrowleft": "\ue582",
+ "arrowdown": "\ue581",
+ "arrowright": "\ue583",
+ "smallcircle-filled": "\ue801",
+ "arrowup": "\ue580",
+ "circle": "\ue411",
+ "eye-filled": "\ue568",
+ "eye-slash-filled": "\ue822",
+ "eye-slash": "\ue823",
+ "eye": "\ue824",
+ "flag-filled": "\ue825",
+ "flag": "\ue508",
+ "gear-filled": "\ue532",
+ "reload": "\ue462",
+ "gear": "\ue502",
+ "hand-thumbsdown-filled": "\ue83b",
+ "hand-thumbsdown": "\ue83c",
+ "hand-thumbsup-filled": "\ue83d",
+ "heart-filled": "\ue83e",
+ "hand-thumbsup": "\ue83f",
+ "heart": "\ue840",
+ "home": "\ue500",
+ "info": "\ue504",
+ "home-filled": "\ue530",
+ "info-filled": "\ue534",
+ "circle-filled": "\ue441",
+ "chat-filled": "\ue847",
+ "chat": "\ue263",
+ "mail-open-filled": "\ue84d",
+ "email-filled": "\ue231",
+ "mail-open": "\ue84e",
+ "email": "\ue201",
+ "checkmarkempty": "\ue472",
+ "list": "\ue562",
+ "locked-filled": "\ue856",
+ "locked": "\ue506",
+ "map-filled": "\ue85c",
+ "map-pin": "\ue85e",
+ "map-pin-ellipse": "\ue864",
+ "map": "\ue364",
+ "minus-filled": "\ue440",
+ "mic-filled": "\ue332",
+ "minus": "\ue410",
+ "micoff": "\ue360",
+ "mic": "\ue302",
+ "clear": "\ue434",
+ "smallcircle": "\ue868",
+ "close": "\ue404",
+ "closeempty": "\ue460",
+ "paperclip": "\ue567",
+ "paperplane": "\ue503",
+ "paperplane-filled": "\ue86e",
+ "person-filled": "\ue131",
+ "contact-filled": "\ue130",
+ "person": "\ue101",
+ "contact": "\ue100",
+ "images-filled": "\ue87a",
+ "phone": "\ue200",
+ "images": "\ue87b",
+ "image": "\ue363",
+ "image-filled": "\ue877",
+ "location-filled": "\ue333",
+ "location": "\ue303",
+ "plus-filled": "\ue439",
+ "plus": "\ue409",
+ "plusempty": "\ue468",
+ "help-filled": "\ue535",
+ "help": "\ue505",
+ "navigate-filled": "\ue884",
+ "navigate": "\ue501",
+ "mic-slash-filled": "\ue892",
+ "search": "\ue466",
+ "settings": "\ue560",
+ "sound": "\ue590",
+ "sound-filled": "\ue8a1",
+ "spinner-cycle": "\ue465",
+ "download-filled": "\ue8a4",
+ "personadd-filled": "\ue132",
+ "videocam-filled": "\ue8af",
+ "personadd": "\ue102",
+ "upload": "\ue402",
+ "upload-filled": "\ue8b1",
+ "starhalf": "\ue463",
+ "star-filled": "\ue438",
+ "star": "\ue408",
+ "trash": "\ue401",
+ "phone-filled": "\ue230",
+ "compose": "\ue400",
+ "videocam": "\ue300",
+ "trash-filled": "\ue8dc",
+ "download": "\ue403",
+ "chatbubble-filled": "\ue232",
+ "chatbubble": "\ue202",
+ "cloud-download": "\ue8e4",
+ "cloud-upload-filled": "\ue8e5",
+ "cloud-upload": "\ue8e6",
+ "cloud-download-filled": "\ue8e9",
+ "headphones":"\ue8bf",
+ "shop":"\ue609"
+}
diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
new file mode 100644
index 0000000..edd5f08
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
@@ -0,0 +1,72 @@
+
+ {{fontFamily ? '' : icons[type]}}
+
+
+
+
+
diff --git a/uni_modules/uni-icons/components/uni-icons/uni.ttf b/uni_modules/uni-icons/components/uni-icons/uni.ttf
new file mode 100644
index 0000000..60a1968
Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uni.ttf differ
diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json
new file mode 100644
index 0000000..2dd573c
--- /dev/null
+++ b/uni_modules/uni-icons/package.json
@@ -0,0 +1,86 @@
+{
+ "id": "uni-icons",
+ "displayName": "uni-icons 图标",
+ "version": "1.2.1",
+ "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "icon",
+ "图标"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md
new file mode 100644
index 0000000..efc0a97
--- /dev/null
+++ b/uni_modules/uni-icons/readme.md
@@ -0,0 +1,64 @@
+
+
+## Icons 图标
+> **组件名:uni-icons**
+> 代码块: `uIcons`
+
+
+用于展示 icons 图标 。
+
+### 安装方式
+
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
+
+### 基本用法
+
+在 ``template`` 中使用组件
+
+```html
+
+```
+
+### 扩展图标用法
+
+1. 需要自行在项目 App.vue 中引入 css 图标扩展库(注意: css 图标库引用的 .ttf 文件路径是否正确)
+
+ ```html
+
+ ```
+2. 在 ``template`` 中使用组件
+
+ ```html
+
+ ```
+
+
+
+
+## API
+
+### Icons Props
+
+|属性名 |类型 |默认值 |说明 |
+|:-: |:-: |:-: |:-: |
+|size |Number |24 |图标大小 |
+|type |String |- |图标图案,参考示例 |
+|color |String |- |图标颜色 |
+|font-family(仅 vue 支持) |String |uniicons |图标库字体家族 |
+
+
+### Icons Events
+|事件名 |说明 |返回值|
+|:-: |:-: |:-: |
+|@click|点击 Icon 触发事件|- |
+
+
+
+## 组件示例
+
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons](https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons)
\ No newline at end of file
diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md
new file mode 100644
index 0000000..99454ba
--- /dev/null
+++ b/uni_modules/uni-popup/changelog.md
@@ -0,0 +1,37 @@
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端
diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
new file mode 100644
index 0000000..a747b9f
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+ name: 'Keypress',
+ props: {
+ disable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ const keyNames = {
+ esc: ['Esc', 'Escape'],
+ tab: 'Tab',
+ enter: 'Enter',
+ space: [' ', 'Spacebar'],
+ up: ['Up', 'ArrowUp'],
+ left: ['Left', 'ArrowLeft'],
+ right: ['Right', 'ArrowRight'],
+ down: ['Down', 'ArrowDown'],
+ delete: ['Backspace', 'Delete', 'Del']
+ }
+ const listener = ($event) => {
+ if (this.disable) {
+ return
+ }
+ const keyName = Object.keys(keyNames).find(key => {
+ const keyName = $event.key
+ const value = keyNames[key]
+ return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ })
+ if (keyName) {
+ // 避免和其他按键事件冲突
+ setTimeout(() => {
+ this.$emit(keyName, {})
+ }, 0)
+ }
+ }
+ document.addEventListener('keyup', listener)
+ this.$once('hook:beforeDestroy', () => {
+ document.removeEventListener('keyup', listener)
+ })
+ },
+ render: () => {}
+}
+// #endif
diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
new file mode 100644
index 0000000..7c8a0d3
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
new file mode 100644
index 0000000..f6bbccd
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
@@ -0,0 +1,143 @@
+
+
+
+
+
+
diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
new file mode 100644
index 0000000..3d9365a
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/uni_modules/uni-popup/components/uni-popup/i18n/en.json
new file mode 100644
index 0000000..8c0f5f3
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/en.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "cancel",
+ "uni-popup.ok": "ok",
+ "uni-popup.placeholder": "pleace enter",
+ "uni-popup.title": "Hint",
+ "uni-popup.shareTitle": "Share to"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/uni_modules/uni-popup/components/uni-popup/i18n/index.js
new file mode 100644
index 0000000..fa8f0f3
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/index.js
@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+ en,
+ 'zh-Hans': zhHans,
+ 'zh-Hant': zhHant
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
new file mode 100644
index 0000000..8e5b99f
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "取消",
+ "uni-popup.ok": "确定",
+ "uni-popup.placeholder": "请输入",
+ "uni-popup.title": "提示",
+ "uni-popup.shareTitle": "分享到"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
new file mode 100644
index 0000000..06ce162
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "取消",
+ "uni-popup.ok": "確定",
+ "uni-popup.placeholder": "請輸入",
+ "uni-popup.title": "提示",
+ "uni-popup.shareTitle": "分享到"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/keypress.js b/uni_modules/uni-popup/components/uni-popup/keypress.js
new file mode 100644
index 0000000..16a5818
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/keypress.js
@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+ name: 'Keypress',
+ props: {
+ disable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ const keyNames = {
+ esc: ['Esc', 'Escape'],
+ tab: 'Tab',
+ enter: 'Enter',
+ space: [' ', 'Spacebar'],
+ up: ['Up', 'ArrowUp'],
+ left: ['Left', 'ArrowLeft'],
+ right: ['Right', 'ArrowRight'],
+ down: ['Down', 'ArrowDown'],
+ delete: ['Backspace', 'Delete', 'Del']
+ }
+ const listener = ($event) => {
+ if (this.disable) {
+ return
+ }
+ const keyName = Object.keys(keyNames).find(key => {
+ const keyName = $event.key
+ const value = keyNames[key]
+ return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ })
+ if (keyName) {
+ // 避免和其他按键事件冲突
+ setTimeout(() => {
+ this.$emit(keyName, {})
+ }, 0)
+ }
+ }
+ document.addEventListener('keyup', listener)
+ // this.$once('hook:beforeDestroy', () => {
+ // document.removeEventListener('keyup', listener)
+ // })
+ },
+ render: () => {}
+}
+// #endif
diff --git a/uni_modules/uni-popup/components/uni-popup/popup.js b/uni_modules/uni-popup/components/uni-popup/popup.js
new file mode 100644
index 0000000..a37fb9f
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/popup.js
@@ -0,0 +1,26 @@
+
+export default {
+ data() {
+ return {
+
+ }
+ },
+ created(){
+ this.popup = this.getParent()
+ },
+ methods:{
+ /**
+ * 获取父元素实例
+ */
+ getParent(name = 'uniPopup') {
+ let parent = this.$parent;
+ let parentName = parent.$options.name;
+ while (parentName !== name) {
+ parent = parent.$parent;
+ if (!parent) return false
+ parentName = parent.$options.name;
+ }
+ return parent;
+ },
+ }
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue
new file mode 100644
index 0000000..32419d8
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue
@@ -0,0 +1,403 @@
+
+
+
+
+
+
diff --git a/uni_modules/uni-popup/package.json b/uni_modules/uni-popup/package.json
new file mode 100644
index 0000000..1385af7
--- /dev/null
+++ b/uni_modules/uni-popup/package.json
@@ -0,0 +1,89 @@
+{
+ "id": "uni-popup",
+ "displayName": "uni-popup 弹出层",
+ "version": "1.6.2",
+ "description": " Popup 组件,提供常用的弹层",
+ "keywords": [
+ "uni-ui",
+ "弹出层",
+ "弹窗",
+ "popup",
+ "弹框"
+ ],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-transition"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "u"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-popup/readme.md b/uni_modules/uni-popup/readme.md
new file mode 100644
index 0000000..d8a0899
--- /dev/null
+++ b/uni_modules/uni-popup/readme.md
@@ -0,0 +1,296 @@
+
+
+## Popup 弹出层
+> **组件名:uni-popup**
+> 代码块: `uPopup`
+> 关联组件:`uni-popup-dialog`,`uni-popup-message`,`uni-popup-share`,`uni-transition`
+
+
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
+
+
+> **注意事项**
+> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
+> - 组件需要依赖 `sass` 插件 ,请自行手动安装
+> - `uni-popup-message` 、 `uni-popup-dialog` 等扩展ui组件,需要和 `uni-popup` 配套使用,暂不支持单独使用
+> - `nvue` 中使用 `uni-popup` 时,尽量将组件置于其他元素后面,避免出现层级问题
+> - `uni-popup` 并不能完全阻止页面滚动,可在打开 `uni-popup` 的时候手动去做一些处理,禁止页面滚动
+> - 如果想在页面渲染完毕后就打开 `uni-popup` ,请在 `onReady` 或 `mounted` 生命周期内调用,确保组件渲染完毕
+> - 在微信小程序开发者工具中,启用真机调试,popup 会延时出现,是因为 setTimeout 在真机调试中的延时问题导致的,预览和发布小程序不会出现此问题
+> - 使用 `npm` 方式引入组件,如果确认引用正确,但是提示未注册组件或显示不正常,请尝试重新编译项目
+> - `uni-popup` 中尽量不要使用 `scroll-view` 嵌套过多的内容,可能会影响组件的性能,导致组件无法打开或者打开卡顿
+> - `uni-popup` 不会覆盖原生 tabbar 和原生导航栏
+> - 组件支持 nvue ,需要在 `manifest.json > app-plus` 节点下配置 `"nvueStyleCompiler" : "uni-app"`
+> - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
+
+
+
+### 安装方式
+
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
+
+
+### 基本用法
+
+**示例**
+
+```html
+
+底部弹出 Popup
+```
+
+```javascript
+export default {
+ methods:{
+ open(){
+ // 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
+ this.$refs.popup.open('top')
+ }
+ }
+}
+
+```
+
+### 设置主窗口背景色
+
+在大多数场景下,并不需要设置 `background-color` 属性,因为`uni-popup`的主窗口默认是透明的,在向里面插入内容的时候 ,样式完全交由用户定制,如果设置了背景色 ,例如 `uni-popup-dialog` 中的圆角就很难去实现,不设置背景色,更适合用户去自由发挥。
+
+而也有特例,需要我们主动去设置背景色,例如 `type = 'bottom'` 的时候 ,在异型屏中遇到了底部安全区问题(如 iphone 11),因为 `uni-popup`的主要内容避开了安全区(设置`safe-area:true`),导致底部的颜色我们无法自定义,这时候使用 `background-color` 就可以解决这个问题。
+
+**示例**
+
+```html
+
+底部弹出 Popup
+```
+
+### 禁用打开动画
+在某些场景 ,可能不希望弹层有动画效果 ,只需要将 `animation` 属性设置为 `false` 即可以关闭动画。
+
+**示例**
+
+```html
+
+中间弹出 Popup
+```
+
+### 禁用点击遮罩关闭
+默认情况下,点击遮罩会自动关闭`uni-popup`,如不想点击关闭,只需将`mask-click`设置为`false`,这时候要关闭`uni-popup`,只能手动调用 `close` 方法。
+
+**示例**
+
+```html
+
+
+ Popup
+
+
+```
+
+```javascript
+export default {
+ data() {
+ return {}
+ },
+ onReady() {},
+ methods: {
+ open() {
+ this.$refs.popup.open('top')
+ },
+ close() {
+ this.$refs.popup.close()
+ }
+ }
+}
+
+```
+
+## API
+
+### Popup Props
+
+|属性名|类型|默认值|说明|
+|:-:|:-:|:-:|:-:|
+|animation|Boolean|true|是否开启动画|
+|type|String|'center'|弹出方式|
+|mask-click|Boolean|true|蒙版点击是否关闭弹窗|
+|background-color|String|'none'|主窗口背景色|
+|safe-area|Boolean|true|是否适配底部安全区|
+
+#### Type Options
+
+|属性名|说明|
+|:-:| :-:|
+|top|顶部弹出 |
+|center|居中弹出|
+|bottom|底部弹出|
+|left|左侧弹出|
+|right|右侧弹出|
+|message|预置样式 :消息提示|
+|dialog|预置样式 :对话框|
+|share|预置样式 :底部弹出分享示例 |
+
+
+### Popup Methods
+
+|方法称名 |说明|参数|
+|:-:|:-:|:-:|
+|open|打开弹出层|open(String:type) ,如果参数可代替 type 属性|
+|close|关闭弹出层 |-|
+
+
+### Popup Events
+
+|事件称名|说明|返回值|
+|:-:|:-:|:-:|
+|change|组件状态发生变化触发|e={show: true|false,type:当前模式}|
+|maskClick|点击遮罩层触发|-|
+
+
+## 扩展组件说明
+`uni-popup` 其实并没有任何样式,只提供基础的动画效果,给用户一个弹出层解决方案,仅仅是这样并不能满足开发需求,所以我们提供了三种基础扩展样式
+
+### uni-popup-message 提示信息
+
+将 `uni-popup` 的`type`属性改为 `message`,并引入对应组件即可使用消息提示 ,*该组件不支持单独使用*
+
+**示例**
+
+```html
+
+
+
+```
+
+### PopupMessage Props
+
+|属性名|类型|默认值|说明|
+|:-:|:-:|:-:|:-:|
+|type|String|success|消息提示主题|
+|message|String|-|消息提示文字|
+|duration|Number|3000|消息显示时间,超过显示时间组件自动关闭,设置为0 将不会关闭,需手动调用 close 方法关闭|
+
+#### Type Options
+
+|属性名|说明|
+|:-:| :-:|
+|success|成功 |
+|warn|警告|
+|error|失败|
+|info|消息|
+
+### PopupMessage Slots
+
+|名称|说明|
+|:-:|:-:|
+|default|消息内容,会覆盖 message 属性|
+
+### uni-popup-dialog 对话框
+
+将 `uni-popup` 的`type`属性改为 `dialog`,并引入对应组件即可使用对话框 ,*该组件不支持单独使用*
+
+**示例**
+
+```html
+
+
+
+
+```
+
+```javascript
+export default {
+ methods: {
+ open() {
+ this.$refs.popup.open()
+ },
+ /**
+ * 点击取消按钮触发
+ * @param {Object} done
+ */
+ close() {
+ // TODO 做一些其他的事情,before-close 为true的情况下,手动执行 close 才会关闭对话框
+ // ...
+ this.$refs.popup.close()
+ },
+ /**
+ * 点击确认按钮触发
+ * @param {Object} done
+ * @param {Object} value
+ */
+ confirm(value) {
+ // 输入框的值
+ console.log(value)
+ // TODO 做一些其他的事情,手动执行 close 才会关闭对话框
+ // ...
+ this.$refs.popup.close()
+ }
+ }
+}
+```
+
+### PopupDialog Props
+
+|属性名|类型|默认值|说明|
+|:-:|:-:|:-:|:-:|
+|type|String|success|对话框标题主题,可选值: success/warn/info/error|
+|mode|String|base| 对话框模式,可选值:base(提示对话框)/input(可输入对话框)|
+|title|String|-|对话框标题|
+|content|String|-|对话框内容,base模式下生效|
+|value| String\Number|-|输入框默认值,input模式下生效|
+|placeholder|String|-|输入框提示文字,input模式下生效|
+|before-close|Boolean|false | 是否拦截按钮事件,如为true,则不会关闭对话框,关闭需要手动执行 uni-popup 的 close 方法|
+
+#### PopupDialog Events
+
+|事件称名 |说明|返回值|
+|:-:|:-:|:-:|
+|close|点击dialog取消按钮触发|-|
+|confirm|点击dialog确定按钮触发|e={value:input模式下输入框的值}|
+
+### PopupDialog Slots
+
+|名称|说明|
+|:-:|:-:|
+|default|自定义内容,回覆盖原有的内容显示|
+
+### uni-popup-share 分享示例
+
+分享示例,不作为最终可使用的组件,只做为样式组件,供用户自行修改,`后续的开发计划是实现实际的分享逻辑,参数可配置`。
+
+将 `uni-popup` 的 `type` 属性改为 `share`,并引入对应组件即可使用 ,*该组件不支持单独使用*
+
+**示例**
+
+```html
+
+
+
+```
+
+### PopupShare Props
+
+|属性名|类型|默认值|说明|
+|:-:|:-:|:-:| :-: |
+|title|String|-|分享弹窗标题|
+|before-close|Boolean|false | 是否拦截按钮事件,如为true,则不会关闭对话框,关闭需要手动执行 uni-popup 的 close 方法|
+
+### PopupShare Events
+
+|事件称名|说明|返回值|
+|:-:|:-:|:-:|
+|select|选择触发|e = {item,index}:所选参数|
+
+**Tips**
+- share 分享组件,只是作为一个扩展示例,如果需要修改数据源,请到组件内修改
+
+## 帮助
+在使用中如遇到无法解决的问题,请提 [Issues](https://github.com/dcloudio/uni-ui/issues) 给我们。
+
+
+
+## 组件示例
+
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/popup/popup](https://hellouniapp.dcloud.net.cn/pages/extUI/popup/popup)
\ No newline at end of file
diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md
new file mode 100644
index 0000000..2c33b5e
--- /dev/null
+++ b/uni_modules/uni-transition/changelog.md
@@ -0,0 +1,13 @@
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.1(2021-05-12)
+- 新增 示例地址
+- 修复 示例项目缺少组件的Bug
+## 1.1.0(2021-04-22)
+- 新增 通过方法自定义动画
+- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
+- 优化 动画触发逻辑,使动画更流畅
+- 优化 支持单独的动画类型
+- 优化 文档示例
+## 1.0.2(2021-02-05)
+- 调整为uni_modules目录规范
diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js
new file mode 100644
index 0000000..af47dbc
--- /dev/null
+++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js
@@ -0,0 +1,128 @@
+// const defaultOption = {
+// duration: 300,
+// timingFunction: 'linear',
+// delay: 0,
+// transformOrigin: '50% 50% 0'
+// }
+// #ifdef APP-NVUE
+const nvueAnimation = uni.requireNativePlugin('animation')
+// #endif
+class MPAnimation {
+ constructor(options, _this) {
+ this.options = options
+ this.animation = uni.createAnimation(options)
+ this.currentStepAnimates = {}
+ this.next = 0
+ this.$ = _this
+
+ }
+
+ _nvuePushAnimates(type, args) {
+ let aniObj = this.currentStepAnimates[this.next]
+ let styles = {}
+ if (!aniObj) {
+ styles = {
+ styles: {},
+ config: {}
+ }
+ } else {
+ styles = aniObj
+ }
+ if (animateTypes1.includes(type)) {
+ if (!styles.styles.transform) {
+ styles.styles.transform = ''
+ }
+ let unit = ''
+ if(type === 'rotate'){
+ unit = 'deg'
+ }
+ styles.styles.transform += `${type}(${args+unit}) `
+ } else {
+ styles.styles[type] = `${args}`
+ }
+ this.currentStepAnimates[this.next] = styles
+ }
+ _animateRun(styles = {}, config = {}) {
+ let ref = this.$.$refs['ani'].ref
+ if (!ref) return
+ return new Promise((resolve, reject) => {
+ nvueAnimation.transition(ref, {
+ styles,
+ ...config
+ }, res => {
+ resolve()
+ })
+ })
+ }
+
+ _nvueNextAnimate(animates, step = 0, fn) {
+ let obj = animates[step]
+ if (obj) {
+ let {
+ styles,
+ config
+ } = obj
+ this._animateRun(styles, config).then(() => {
+ step += 1
+ this._nvueNextAnimate(animates, step, fn)
+ })
+ } else {
+ this.currentStepAnimates = {}
+ typeof fn === 'function' && fn()
+ this.isEnd = true
+ }
+ }
+
+ step(config = {}) {
+ // #ifndef APP-NVUE
+ this.animation.step(config)
+ // #endif
+ // #ifdef APP-NVUE
+ this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
+ this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
+ this.next++
+ // #endif
+ return this
+ }
+
+ run(fn) {
+ // #ifndef APP-NVUE
+ this.$.animationData = this.animation.export()
+ this.$.timer = setTimeout(() => {
+ typeof fn === 'function' && fn()
+ }, this.$.durationTime)
+ // #endif
+ // #ifdef APP-NVUE
+ this.isEnd = false
+ let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
+ if(!ref) return
+ this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
+ this.next = 0
+ // #endif
+ }
+}
+
+
+const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
+ 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
+ 'translateZ'
+]
+const animateTypes2 = ['opacity', 'backgroundColor']
+const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
+animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
+ MPAnimation.prototype[type] = function(...args) {
+ // #ifndef APP-NVUE
+ this.animation[type](...args)
+ // #endif
+ // #ifdef APP-NVUE
+ this._nvuePushAnimates(type, args)
+ // #endif
+ return this
+ }
+})
+
+export function createAnimation(option, _this) {
+ if(!_this) return
+ clearTimeout(_this.timer)
+ return new MPAnimation(option, _this)
+}
diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue
new file mode 100644
index 0000000..5a16f89
--- /dev/null
+++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue
@@ -0,0 +1,277 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-transition/package.json b/uni_modules/uni-transition/package.json
new file mode 100644
index 0000000..481270d
--- /dev/null
+++ b/uni_modules/uni-transition/package.json
@@ -0,0 +1,83 @@
+{
+ "id": "uni-transition",
+ "displayName": "uni-transition 过渡动画",
+ "version": "1.2.0",
+ "description": "元素的简单过渡动画",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "动画",
+ "过渡",
+ "过渡动画"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-transition/readme.md b/uni_modules/uni-transition/readme.md
new file mode 100644
index 0000000..f398623
--- /dev/null
+++ b/uni_modules/uni-transition/readme.md
@@ -0,0 +1,397 @@
+
+
+## Transition 过渡动画
+> **组件名:uni-transition**
+> 代码块: `uTransition`
+
+
+元素过渡动画
+
+> **注意事项**
+> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
+> - 组件需要依赖 `sass` 插件 ,请自行手动安装
+> - rotate 旋转动画不需要填写 deg 单位,在小程序上填写单位动画不会执行
+> - NVUE 下修改宽高动画,不能定位到中心点
+> - 百度小程序下修改宽高 ,可能会影响其他动画,需注意
+> - nvue 不支持 costom-class , 请使用 styles
+> - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
+
+
+### 安装方式
+
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
+
+### 基本用法
+
+在 ``template`` 中使用组件
+
+```html
+
+
+
+
+
+
+
+
+```
+
+### 样式覆盖
+
+**注意:`nvue` 不支持 `custom-class` 属性 ,需要使用 `styles` 属性进行兼容**
+
+使用 `custom-class` 属性绑定样式,可以自定义 `uni-transition` 的样式
+
+```html
+
+
+
+
+
+
+
+
+```
+
+
+如果使用 `styles` 注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+
+```html
+
+
+
+
+
+
+```
+
+### 自定义动画
+当内置动画类型不能满足需求的时候 ,可以使用 `step()` 和 `run()` 自定义动画,入参以及具体用法参考下方属性说明
+
+`init()` 方法可以覆盖默认配置
+
+
+```html
+
+
+
+
+
+
+
+
+```
+
+
+## API
+
+### Transition Props
+
+|属性名 |类型 |默认值 |说明 |
+|:-: |:-: |:-: |:-:|
+|show |Boolean|false |控制组件显示或隐藏 |
+|mode-class |Array/String |- |内置过渡动画类型 |
+|custom-class |String |- |自定义类名 |
+|duration |Number |300 |过渡动画持续时间 |
+|styles |Object |- |组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red` |
+
+#### mode-class 内置过渡动画类型说明
+**格式为** :`'fade'` 或者 `['fade','slide-top']`
+
+|属性名 |说明 |
+|:-: |:-: |
+|fade |渐隐渐出过渡 |
+|slide-top |由上至下过渡 |
+|slide-right |由右至左过渡 |
+|slide-bottom |由下至上过渡 |
+|slide-left |由左至右过渡 |
+|zoom-in |由小到大过渡 |
+|zoom-out |由大到小过渡 |
+
+**注意**
+
+组合使用时,同一种类型相反的过渡动画如(slide-top、slide-bottom)同时使用时,只有最后一个生效
+
+### Transition Events
+
+|事件名 |说明 |返回值 |
+|:-: |:-: |:-: |
+|click |点击组件触发 |- |
+|change |过渡动画结束时触发 | e = {detail:true} |
+
+### Transition Methons
+
+|方法名|说明|参数|
+|:-:|:-:|:-:|
+|init()|手动初始化配置|Function(OBJECT:config)|
+|step()|动画队列|Function(OBJECT:type,OBJECT:config)|
+|run()|执行动画|Function(FUNCTION:callback) |
+
+### init(OBJECT:config)
+**通过 ref 调用方法**
+
+手动设置动画配置,需要在页面渲染完毕后调用
+
+```javascript
+this.$refs.ani.init({
+ duration: 1000,
+ timingFunction:'ease',
+ delay:500,
+ transformOrigin:'left center'
+})
+```
+
+### step(OBJECT:type,OBJECT:config) 动画队列
+**通过 ref 调用方法**
+
+调用 `step()` 来表示一组动画完成,`step` 第一个参数可以传入任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。`step` 第二个参数可以传入一个跟 `uni.createAnimation()` 一样的配置参数用于指定当前组动画的配置。
+
+Tips
+- 第一个参数支持的动画参考下面的 `支持的动画`
+- 第二个参数参考下面的 `动画配置`,可省略,如果省略继承`init`的配置
+
+
+```javascript
+this.$refs.ani.step({
+ translateX: '100px'
+},{
+ duration: 1000,
+ timingFunction:'ease',
+ delay:500,
+ transformOrigin:'left center'
+})
+```
+
+### run(FUNCTION:callback) 执行动画
+**通过 ref 调用方法**
+
+在执行 `step()` 后,需要调用 `run()` 来运行动画 ,否则动画会一直等待
+
+`run()` 方法可以传入一个 `callback` 函数 ,会在所有动画执行完毕后回调
+
+```javascript
+this.$refs.ani.step({
+ translateX: '100px'
+})
+this.$refs.ani.run(()=>{
+ console.log('动画执行完毕')
+})
+
+```
+
+### 动画配置
+动画配置 , `init()` 与 `step()` 第二个参数配置相同 ,如果配置`step() `第二个参数,将会覆盖 `init()` 的配置
+
+|属性名|值|必填|默认值|说明|平台差异|
+|:-:|:-:|:-:|:-:|:-:|:-:|
+|duration|Number|否|400|动画持续时间,单位ms|-|
+|timingFunction|String|否|"linear"|定义动画的效果|-|
+|delay|Number|否|0|动画延迟时间,单位 ms|-|
+|needLayout|Boolean|否|false |动画执行是否影响布局|仅 nvue 支持|
+|transformOrigin|String |否|"center center"|设置 [transform-origin](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin)|-|
+
+
+### timingFunction 属性说明
+
+|值|说明|平台差异|
+|:-:|:-:|:-:|
+|linear|动画从头到尾的速度是相同的|-|
+|ease|动画以低速开始,然后加快,在结束前变慢|-|
+|ease-in| 动画以低速开始|-|
+|ease-in-out| 动画以低速开始和结束|-|
+|ease-out|动画以低速结束|-|
+|step-start|动画第一帧就跳至结束状态直到结束|nvue不支持|
+|step-end|动画一直保持开始状态,最后一帧跳到结束状态|nvue不支持|
+
+```javascript
+// init 配置
+this.$refs.ani.init({
+ duration: 1000,
+ timingFunction:'ease',
+ delay:500,
+ transformOrigin:'left center'
+})
+// step 配置
+this.$refs.ani.step({
+ translateX: '100px'
+},{
+ duration: 1000,
+ timingFunction:'ease',
+ delay:500,
+ transformOrigin:'left center'
+})
+```
+
+### 支持的动画
+动画方法
+
+如果同一个动画方法有多个值,多个值使用数组分隔
+
+```javascript
+this.$refs.ani.step({
+ width:'100px',
+ scale: [1.2,0.8],
+})
+```
+
+**样式:**
+
+|属性名|值|说明|平台差异|
+|:-:|:-:|:-:|:-:|
+|opacity|value|透明度,参数范围 0~1|-|
+|backgroundColor|color|颜色值|-|
+|width|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|-|
+|height|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|-|
+|top|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持|
+|left|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持|
+|bottom|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持|
+|right|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持|
+
+```javascript
+this.$refs.ani.step({
+ opacity: 1,
+ backgroundColor: '#ff5a5f',
+ widht:'100px',
+ height:'50rpx',
+})
+```
+
+**旋转:**
+
+旋转属性的值不需要填写单位
+
+|属性名|值|说明|平台差异 |
+|:-:|:-:|:-:|:-:|
+|rotate|deg|deg的范围-180~180,从原点顺时针旋转一个deg角度 |-|
+|rotateX|deg|deg的范围-180~180,在X轴旋转一个deg角度 |-|
+|rotateY|deg|deg的范围-180~180,在Y轴旋转一个deg角度 |-|
+|rotateZ|deg|deg的范围-180~180,在Z轴旋转一个deg角度 |nvue不支持|
+|rotate3d|x,y,z,deg| 同 [transform-function rotate3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d()) |nvue不支持|
+
+```javascript
+this.$refs.ani.step({
+ rotateX: 45,
+ rotateY: 45
+})
+```
+
+**缩放:**
+
+|属性名|值|说明|平台差异|
+|:-:|:-:|:-: |:-:|
+|scale|sx,[sy]|一个参数时,表示在X轴、Y轴同时缩放sx倍数;两个参数时表示在X轴缩放sx倍数,在Y轴缩放sy倍数|-|
+|scaleX|sx|在X轴缩放sx倍数|-|
+|scaleY|sy|在Y轴缩放sy倍数|-|
+|scaleZ|sz|在Z轴缩放sy倍数|nvue不支持|
+|scale3d|sx,sy,sz|在X轴缩放sx倍数,在Y轴缩放sy倍数,在Z轴缩放sz倍数|nvue不支持|
+
+```javascript
+this.$refs.ani.step({
+ scale: [1.2,0.8]
+})
+```
+
+**偏移:**
+
+|属性名|值|说明|平台差异|
+|:-:|:-:|:-:|:-:|
+|translate|tx,[ty]|一个参数时,表示在X轴偏移tx,单位px;两个参数时,表示在X轴偏移tx,在Y轴偏移ty,单位px。|-|
+|translateX|tx| 在X轴偏移tx,单位px|-|
+|translateY|ty| 在Y轴偏移tx,单位px|-|
+|translateZ|tz| 在Z轴偏移tx,单位px|nvue不支持|
+|translate3d|tx,ty,tz| 在X轴偏移tx,在Y轴偏移ty,在Z轴偏移tz,单位px|nvue不支持|
+
+```javascript
+this.$refs.ani.step({
+ translateX: '100px'
+})
+```
+
+
+
+## 组件示例
+
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition](https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition)
\ No newline at end of file