Compare commits

...

127 Commits

Author SHA1 Message Date
唐明明
38c4be92f6 merge 2021-09-30 18:32:33 +08:00
唐明明
91912c622f vip确定按钮后退错误 2021-09-30 17:46:44 +08:00
唐明明
aa7b7c7d35 调整添加员工转跳错误 2021-09-30 17:23:05 +08:00
唐明明
827944a142 调整商品发布图片提示 2021-09-30 16:37:48 +08:00
唐明明
60f17db750 路由 2021-09-30 16:15:25 +08:00
唐明明
0ea0621005 merge 2021-09-30 16:14:59 +08:00
唐明明
23ff69b525 调整用户主页偏移量 2021-09-30 16:14:42 +08:00
zhangmanman
e6f79ef61d 更新 2021-09-30 16:12:23 +08:00
唐明明
7dc1e0384b 调整拦截器 2021-09-30 15:46:10 +08:00
唐明明
965dc755e4 门店管理新增创建按钮 2021-09-30 15:44:08 +08:00
唐明明
b8cbd8d565 修复发布优惠券日期选择器部分手机无法显示按钮卡顿等问题调整添加员工接口问题 2021-09-30 15:35:34 +08:00
zhangmanman
7e8d8beb90 更新 2021-09-30 15:13:26 +08:00
zhangmanman
1a7be5a608 更新 2021-09-30 15:06:05 +08:00
zhangmanman
4e7f4e3b79 更新 2021-09-30 14:52:02 +08:00
zhangmanman
9591400bb9 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-30 13:58:32 +08:00
zhangmanman
341286a42e 更新 2021-09-30 13:58:17 +08:00
唐明明
bf72d40cce 调整部分页面颜色 2021-09-30 13:19:04 +08:00
唐明明
df199e8026 调整登录验证码 2021-09-30 13:17:04 +08:00
f77b3a1d72 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-30 13:14:28 +08:00
1a72f92a1e ['...'] 2021-09-30 13:14:15 +08:00
唐明明
2918fcee25 merge 2021-09-30 12:57:47 +08:00
唐明明
036424eac0 新增清理缓存页面 2021-09-30 12:56:23 +08:00
zhangmanman
7ef9ad26ac 更新 2021-09-30 12:23:55 +08:00
zhangmanman
8ac459e047 更新 2021-09-30 12:19:25 +08:00
唐明明
6d169876d5 merge 2021-09-30 12:17:51 +08:00
唐明明
3b1edf89fa 更新 2021-09-30 12:17:04 +08:00
1adf3d7912 ['免手续费'] 2021-09-30 11:58:03 +08:00
8e533f9bf7 [产品权证,新增缺省图片] 2021-09-30 11:04:58 +08:00
09d0f5dbbd [优惠券管理中心新增缺省提示] 2021-09-30 10:57:37 +08:00
e903d5be15 ['设置'] 2021-09-30 10:37:23 +08:00
f1d5ff3dba ['没有可选商品列表新增缺省提示'] 2021-09-30 10:27:01 +08:00
fb966d9222 [..缺省图片处理..] 2021-09-30 09:34:16 +08:00
f91145d132 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-30 08:50:47 +08:00
90165cb70a [...] 2021-09-30 08:50:39 +08:00
唐明明
ac4d252a06 merge 2021-09-29 18:13:46 +08:00
唐明明
34a0e6e499 调整签到按钮无法点击的bug 2021-09-29 18:13:17 +08:00
8ad61ba30c Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-29 18:09:11 +08:00
597941612c [碎片列表增加个状态显示] 2021-09-29 18:08:54 +08:00
唐明明
292ec179cb merge 2021-09-29 17:56:11 +08:00
zhangmanman
d156ad6042 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-29 17:53:43 +08:00
zhangmanman
73178c6ea3 签到 2021-09-29 17:53:31 +08:00
唐明明
e76c84789b 修复code二维码长按识别调整开通vip后返回页面 2021-09-29 17:53:14 +08:00
5da49893f9 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-29 17:47:04 +08:00
4390e79105 [消息跳转详情及银行卡优化修改] 2021-09-29 17:46:56 +08:00
唐明明
c0ef649ff5 调整绘制背景图 2021-09-29 17:29:57 +08:00
e44c09d7f2 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-29 17:27:04 +08:00
9bcd7a8fae [...] 2021-09-29 17:26:05 +08:00
唐明明
d782b3932b 调整绘制背景图 2021-09-29 16:56:29 +08:00
唐明明
926e7fffac 调整绘制背景图 2021-09-29 16:55:18 +08:00
zhangmanman
e41dbb699c 邀请码页面绘制 2021-09-29 16:54:53 +08:00
zhangmanman
c7d08d238c 邀请码页面绘制 2021-09-29 16:52:53 +08:00
唐明明
e168517824 调整绘制背景图 2021-09-29 15:43:02 +08:00
唐明明
6e6270d2cb merge 2021-09-29 15:40:50 +08:00
唐明明
514ceb89aa 调整签到按钮 2021-09-29 15:39:56 +08:00
zhangmanman
88b0303188 邀请码页面绘制 2021-09-29 15:39:11 +08:00
zhangmanman
7e9aef0eb3 邀请码页面绘制 2021-09-29 15:38:18 +08:00
唐明明
27de54c40a merge 2021-09-29 14:48:13 +08:00
唐明明
631d650446 开通会员微信支付功能开发,调整移动端设备禁止页面字体跟随系统变更 2021-09-29 14:45:00 +08:00
唐明明
de71b4cd58 开通会员微信支付功能开发,调整移动端设备禁止页面字体跟随系统变更 2021-09-29 14:42:46 +08:00
712123b1fa [银行卡列表加新增按钮] 2021-09-29 11:14:47 +08:00
9d5cb52672 [...] 2021-09-29 10:19:10 +08:00
093e4909b9 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-29 10:00:11 +08:00
c3c410a2b6 [..] 2021-09-29 09:59:47 +08:00
唐明明
86562924a5 新增绘制海报组件 2021-09-29 09:47:20 +08:00
唐明明
b21b8d8dbf 调整页面优化邀请海报 2021-09-28 18:10:58 +08:00
唐明明
10df47d341 merge 2021-09-28 17:15:16 +08:00
唐明明
730187e1d2 调整登录逻辑退出登录调整拦截器新增路由通配404也买呢 2021-09-28 17:14:21 +08:00
zhangmanman
5bd12dd431 修改跳转路径 2021-09-28 15:41:43 +08:00
zhangmanman
4ac7827b00 修改跳转路径 2021-09-28 14:22:55 +08:00
zhangmanman
016ad427ac 修改跳转路径 2021-09-28 14:22:07 +08:00
06b128b19f Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-28 14:17:32 +08:00
2da99587ef [...] 2021-09-28 14:17:25 +08:00
唐明明
e9343f9085 merge 2021-09-28 11:41:17 +08:00
ad16d356dd Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-28 11:33:09 +08:00
34ea859950 [.分享页面底部空白处理.] 2021-09-28 11:33:03 +08:00
zhangmanman
f4d06813fb 修改跳转路径 2021-09-28 11:31:52 +08:00
zhangmanman
b04e881294 添加用户协议 2021-09-28 11:30:55 +08:00
0aa9c68b04 ['修改路由'] 2021-09-28 11:21:20 +08:00
f2e1121f3c Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-28 11:02:36 +08:00
eeb40535df [...] 2021-09-28 11:02:01 +08:00
唐明明
16065cc638 merge 2021-09-28 11:00:53 +08:00
唐明明
f8f139f7bb url美化调整路由模式 2021-09-28 10:52:45 +08:00
zhangmanman
386453cd14 添加用户协议 2021-09-28 10:52:36 +08:00
zhangmanman
d2b2352244 添加用户协议 2021-09-28 10:51:58 +08:00
1e1409f14e [用户隐私协议和服务协议新增及接口] 2021-09-28 10:47:51 +08:00
04197b12eb [/登录l引导页面/] 2021-09-28 10:33:54 +08:00
唐明明
75037949a7 调整转跳路由 2021-09-27 17:31:38 +08:00
唐明明
005dc9ead1 调整发布优惠券样式 2021-09-27 17:02:48 +08:00
zhangmanman
cda72679d4 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-27 16:43:58 +08:00
zhangmanman
5f30a6a51b 修改文字 2021-09-27 16:43:51 +08:00
5378dd1dfa Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-27 16:21:17 +08:00
bb0e42104a 能量碎片接口页面处理 2021-09-27 16:21:08 +08:00
zhangmanman
f7fd0f5091 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-27 14:59:58 +08:00
zhangmanman
5d83183a89 修改文字 2021-09-27 14:59:47 +08:00
唐明明
02a27907cc 新增部分页面按钮 2021-09-27 14:57:48 +08:00
唐明明
90f6498207 移出冗余代码 2021-09-27 14:18:19 +08:00
唐明明
60afd75ada merge 2021-09-27 12:18:33 +08:00
唐明明
54584fcf07 发现发现能量提示信息 2021-09-27 12:14:51 +08:00
唐明明
e82c4e8027 发现能量页面调整 2021-09-27 12:13:09 +08:00
zhangmanman
1061a588c6 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-27 12:13:07 +08:00
zhangmanman
3e3215df42 修改文字 2021-09-27 12:12:50 +08:00
d6af7dca6c [消息中心图片处理] 2021-09-27 11:45:21 +08:00
fd1759b4a3 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 2021-09-27 10:56:36 +08:00
bc87a9223c 提现模块对接接口处理 2021-09-27 10:56:22 +08:00
zhangmanman
9e9fc63c1b 修改文字 2021-09-27 09:06:32 +08:00
zhangmanman
a1d6ec7ee7 修改文字 2021-09-27 08:55:48 +08:00
zhangmanman
243382995a 修改文字 2021-09-27 08:37:20 +08:00
zhangmanman
51e02eb563 修改文字 2021-09-27 08:36:36 +08:00
唐明明
c24f0f0e3b merge 2021-09-26 17:39:28 +08:00
唐明明
4a7b322bd4 区块链首页数据对接 2021-09-26 17:38:26 +08:00
zhangmanman
5e7be7eeef Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-26 17:23:08 +08:00
zhangmanman
4dd09b4c2f 发现更多 2021-09-26 17:22:57 +08:00
唐明明
d9e5150ea2 merge 2021-09-26 17:19:57 +08:00
唐明明
49c6f7372f 领取水晶水晶账户 2021-09-26 17:18:46 +08:00
zhangmanman
2001925f59 发现更多 2021-09-26 16:26:33 +08:00
zhangmanman
85e7d0bf02 发现更多 2021-09-26 16:20:20 +08:00
zhangmanman
d6f767f1e8 Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5 into main 2021-09-26 16:13:13 +08:00
zhangmanman
d455049e5f 发现更多 2021-09-26 16:13:04 +08:00
e6d503fec5 [..] 2021-09-26 14:57:00 +08:00
3946800889 提现模块复写 2021-09-26 14:52:38 +08:00
唐明明
760ab655eb merge 2021-09-26 10:04:30 +08:00
zhangmanman
2da6c70904 会员中心我的伙伴 2021-09-26 09:57:34 +08:00
zhangmanman
2f75c30bac 会员中心我的伙伴 2021-09-26 09:56:16 +08:00
唐明明
e0dba81324 merge 2021-09-25 17:18:31 +08:00
唐明明
63b16b2802 新增门店管理店员管理营销推广码 2021-09-25 17:17:08 +08:00
唐明明
ce16270b75 merge 2021-09-25 15:55:29 +08:00
唐明明
847f573ff3 能量球 2021-09-25 15:33:25 +08:00
573 changed files with 73783 additions and 5819 deletions

17
App.vue
View File

@@ -1,7 +1,19 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
handleFontSize();
} else {
document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
}
function handleFontSize() {
// 设置网页字体为默认大小
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
// 重写设置网页字体大小的事件
WeixinJSBridge.on('menu:setfont', function() {
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
});
}
},
onShow: function() {
console.log('App Show')
@@ -15,9 +27,10 @@
<style>
page{
background: #F5F5F5;
-webkit-text-size-adjust: 100% !important;
}
</style>
<style lang="scss">
@import "uview-ui/index.scss";
@import "uview-ui/index.scss";
</style>

1
README.md Normal file
View File

@@ -0,0 +1 @@
## 区块链电商

View File

@@ -9,8 +9,8 @@ import store from '@/store'
// 基础配置
const config = {
apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
apiUrls : 'http://api.ahxh.shangkelian.cn',
apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
timeout : 60000
}
@@ -31,9 +31,6 @@ const request = (parameter) => {
'Accept': 'application/json',
'Authorization': store.getters.getToken || ''
}
console.log('parameterDbug', parameter)
// 加载提示
uni.showLoading({
title: '加载中',
@@ -142,13 +139,11 @@ const loginHint = () => {
uni.showModal({
title: '登录提示',
content: '您的登录信息已过期,请重新登录',
confirmColor: '#009B69',
confirmColor: '#8b64fd',
showCancel:false,
success: res=> {
loginHintState = false
if (res.confirm) uni.reLaunch({
url: '/pages/equity/index'
})
if (res.confirm) this.$Router.replace({name: 'Index'})
}
})
}

View File

@@ -1,62 +0,0 @@
/**
* zdx
* moduleName: 地址
*/
import { request } from '../index'
// 地址列表
const addresses = () => {
return request({
url: 'mall/addresses',
method: 'GET'
})
}
// 新增地址
const addAddresses = (data) => {
return request({
url: 'mall/addresses',
method: 'post',
data: data
})
}
// 根据地址id获取地址的详细信息
const getAddresses = (id) => {
return request({
url: 'mall/addresses/'+id,
method: 'get'
})
}
// 编辑
const editAddresses = (id,data) => {
return request({
url: 'mall/addresses/'+id,
method: 'put',
data:data
})
}
// 删除
const delAddresses = (id) => {
return request({
url: 'mall/addresses/'+id,
method: 'DELETE'
})
}
// 默认
const defaultAddresses = (id) => {
return request({
url: 'mall/addresses/'+id+'/default',
method: 'post'
})
}
export {
addresses,
addAddresses,
getAddresses,
editAddresses,
delAddresses,
defaultAddresses
}

View File

@@ -8,15 +8,6 @@
import { request } from '../index'
// 一键登录
const keyAuth = (data) => {
return request({
url: 'user/socialite/login/unicloud/app',
method: 'POST',
data: data
})
}
// 验证码登录
const smsAuth = (data) =>{
return request({
@@ -35,8 +26,17 @@ const getSms = (data) =>{
})
}
export {
keyAuth,
smsAuth,
getSms
// 用户隐私协议 articles/agreement/secret 用户服务协议 articles/agreement/service
const secretService = (name) =>{
return request({
url: "articles/agreement/"+name
})
}
export {
smsAuth,
getSms,
secretService
}

View File

@@ -8,37 +8,31 @@
import { request } from '../index'
// 最新区块列表
// 最新统计
const chain = () => {
return request({
url: 'chain'
url: 'chain/tasks'
})
}
// 发行量概况
const situation = () => {
// 水晶原石
const crystals = () => {
return request({
url: 'nodes'
url: 'user/account/crystals'
})
}
// 区块详情
const hash = (hash) => {
// 领取水晶
const thawlog = (data) => {
return request({
url: 'chain/block/' + hash
})
}
// 区块链首页
const occ = () => {
return request({
url: 'occ/index'
url: 'user/account/thawlog',
method: 'POST',
data
})
}
export {
chain,
situation,
hash,
occ
crystals,
thawlog
}

View File

@@ -8,22 +8,6 @@
import { request } from '../index'
// 企业注册配置信息
const createConfig = () => {
return request({
url: 'companies/inits/create'
})
}
// 企业行业信息
const inits = data => {
return request({
url: 'companies/inits',
method: 'POST',
data
})
}
// 企业认证配置信息
const appliesCreate = () => {
return request({
@@ -40,21 +24,6 @@ const applies = (data,method) => {
})
}
// 企业认证前置条件
const isallow = () => {
return request({
url: 'companies/applies/isallow',
method: 'POST'
})
}
// 企业申请状态
const appliesQuery = () => {
return request({
url: 'companies/applies/query'
})
}
// 企业信息展示
const appliesInfo = () => {
return request({
@@ -71,12 +40,8 @@ const appliesCategory = data => {
}
export {
createConfig,
inits,
appliesCreate,
applies,
isallow,
appliesQuery,
appliesInfo,
appliesCategory
}

View File

@@ -1,83 +0,0 @@
/**
* Web-zdx
* moduleName: 优惠券相关
*/
import { request } from '../index'
// 我的优惠券
const myCoupon = (data) => {
return request({
url: 'coupons/user/coupons',
method: 'get',
data: data
})
}
// 优惠券分组列表
const getCouponsListById = (id,data) => {
return request({
url: 'coupons/user/coupons/'+id+'/list',
data:data
})
}
// 根据优惠券id获取优惠券的详情信息
const getCouponsInfoById = (id) => {
return request({
url: 'coupons/user/coupons/'+id,
})
}
// 根据企业id获取企业首页的轮播图列表
const couponsByCompanyId = (data) => {
return request({
url: 'coupons/all',
method: 'get',
data: data
})
}
// 领取优惠券
const couponsGrant = (id) => {
return request({
url: 'coupons/'+id+'/grant',
method: 'POST'
})
}
// 获取优惠券可使用商品
const getGoodsByGrantId = (data) => {
return request({
url: 'user/coupons/goods',
data: data
})
}
// 使用提货券兑换商品
const exchangeGoods = (data) => {
return request({
url: 'user/coupons/exchange',
method: 'POST',
data: data
})
}
// 获取核销二维码
const getQrcodeByGrantId = (data) => {
return request({
url: 'coupons/user/coupons/qrcode',
data: data
})
}
export {
myCoupon,
couponsByCompanyId,
couponsGrant,
getGoodsByGrantId,
exchangeGoods,
getCouponsListById,
getCouponsInfoById,
getQrcodeByGrantId
}

View File

@@ -8,21 +8,6 @@
import { request } from '../index'
// 水晶原石
const crystals = () => {
return request({
url: 'user/account/crystals'
})
}
// 领取水晶
const thawlog = (data) => {
return request({
url: 'user/account/thawlog',
method: 'POST',
data
})
}
// 水晶分类
const category = () => {
@@ -34,7 +19,7 @@ const category = () => {
// 水晶任务
const task = () => {
return request({
url: 'crystal/task'
url: 'tasks'
})
}
@@ -54,8 +39,6 @@ const operateSign = () => {
}
export{
crystals,
thawlog,
category,
task,
sign,

View File

@@ -1,123 +0,0 @@
/**
* Web-zdx
* moduleName: 商城首页
*/
import { request } from '../index'
// 首页信息
const index = () => {
return request({
url: 'mall',
method: 'GET'
})
}
// 今日特惠页面 大于三显示3个 两个显示两个 1个就显示一张图
const indexT = (data) => {
return request({
url: 'mall/goods',
method: 'GET',
data:data
})
}
// 获取首页弹窗
const popups = () => {
return request({
url: 'popups/mall',
method: 'GET'
})
}
const banner = () => {
return request({
url: 'mall/banners',
method: 'GET'
})
}
// 全养头条
const cmsArticles = () => {
return request({
url: 'cms/articles',
method: 'GET'
})
}
// 全养头条详情
const cmsArticlesDetail = (id) => {
return request({
url: 'cms/articles/'+id,
method: 'GET'
})
}
// 获取是否有未读消息
const notifyCounts = () => {
return request({
url: 'notifications/counts',
method: 'GET'
})
}
// 判断是否能跳转到钱包页面
const canGoWallet = () => {
return request({
url: 'user/datas',
method: 'GET'
})
}
// 是否设置了激活激活钱包
const security = () => {
return request({
url: 'chain/safe/security',
method: 'GET'
})
}
// 是否个人认证成功
const certified = () => {
return request({
url: 'user/certified',
method: 'GET'
})
}
// 获取首页商品列表 taos ='淘宝客' goods/mall (自己商品)
const getIndexGoodsList = (name,data) => {
return request({
url: name,
method: 'GET',
data:data
})
}
// 获取淘宝客的标签
const getTaoCategories = () =>{
return request({
url: 'tao/categories',
method: 'GET'
})
}
// 获取自营的标签
const getTags = () =>{
return request({
url: 'mall/tags',
method: 'GET'
})
}
export {
index,
cmsArticles,
notifyCounts,
cmsArticlesDetail,
canGoWallet,
security,
certified,
getIndexGoodsList,
getTaoCategories,
getTags,
banner,
popups,
indexT
}

View File

@@ -78,6 +78,15 @@ const companyStatus = () => {
})
}
// 是否允许企业能开通
const companyIsallow = () => {
return request({
url: 'companies/applies/isallow',
method:'POST'
})
}
export {
login,
@@ -88,5 +97,6 @@ export {
resetUserInfo,
getUserSettingInfo,
aboutUs,
companyStatus
companyStatus,
companyIsallow
}

View File

@@ -46,7 +46,15 @@ const userClause = () => {
// 邀请好友
const userInvite = () => {
return request({
url: 'articles/invite'
url: 'user/invite'
})
}
// 我的伙伴
const userPartne = (data) => {
return request({
url: 'user/relations',
data: data
})
}
@@ -56,5 +64,6 @@ export {
userCustomer,
userHelp,
userClause,
userInvite
userInvite,
userPartne
}

View File

@@ -25,9 +25,10 @@ const vipOrder = (id, data) =>{
}
// 开通会员微信支付
const vipWechatPay = id => {
const vipWechatPay = (id, data) => {
return request({
url : 'user/identities/pay/' + id + '/wechat'
url: 'user/identities/pay/' + id + '/wechat',
data
})
}
@@ -39,17 +40,27 @@ const vipCont = (id, data) =>{
})
}
// 会员开通协议
const userAgree = () =>{
// 上传打款凭证
const vipVoucher = (data) =>{
return request({
url : 'articles/agreement/openvip'
url : 'user/voucher/store',
method : 'POST',
data : data
})
}
// 用户协议
const userAgree = (apiUrl) => {
return request({
url: apiUrl
})
}
export {
identities,
vipOrder,
vipWechatPay,
vipCont,
vipVoucher,
userAgree
}

View File

@@ -0,0 +1,105 @@
/**
* zdx
* moduleName: 提现模块
*/
import {
request
} from '../index.js'
// 添加前置条件
const accountsCreate = () => {
return request({
url: 'withdraws/accounts/create'
})
}
// 添加银行卡
const withdrawsAccounts = (data) => {
return request({
url: 'withdraws/accounts',
method: 'POST',
data: data
})
}
// 银行卡列表
const withdrawsAccountsList = (data) => {
return request({
url: 'withdraws/accounts',
method: 'get',
data: data
})
}
// 编辑银行卡前置
const accountsCreateEdit = (id) => {
return request({
url: 'withdraws/accounts/'+id+'/edit'
})
}
// 编辑银行卡
const withdrawsAccountsEdits = (data) => {
return request({
url: 'withdraws/accounts/'+data.bank_account_id,
method: 'PUT',
data: data
})
}
// 删除银行卡
const withdrawsAccountsDelete = (id) => {
return request({
url: 'withdraws/accounts/'+id,
method: 'DELETE'
})
}
// 提现前置记录
const withdrawsIndexCreate = () => {
return request({
url: 'withdraws/index/create'
})
}
// 提现接口
const withdrawsIndex = (data) => {
return request({
url: 'withdraws/index',
method: 'POST',
data: data
})
}
// 提现记录
const withdrawsIndexLists = (data) => {
return request({
url: 'withdraws/index',
method: 'get',
data: data
})
}
// 能量碎片记录
const userAccoutScores = (data) => {
return request({
url: 'user/account/scores',
method: 'get',
data: data
})
}
export {
accountsCreate,
withdrawsAccounts,
withdrawsAccountsList,
accountsCreateEdit,
withdrawsAccountsEdits,
withdrawsAccountsDelete,
withdrawsIndexCreate,
withdrawsIndex,
withdrawsIndexLists,
userAccoutScores
}

40
apis/interfaces/wx.js Normal file
View File

@@ -0,0 +1,40 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 微信相关
*/
import { request } from '../index'
// 微信配置信息
const wxConfig = data => {
return request({
url: 'user/auth/get_jssdk',
data
})
}
// 鉴权转跳地址
const wxCode = data => {
return request({
url: 'user/auth/get_auth_url',
data
})
}
// 获取openid
const wxOpenid = data => {
return request({
url: 'user/auth/get_openid',
data
})
}
export {
wxConfig,
wxCode,
wxOpenid
}

View File

@@ -27,7 +27,7 @@
</block>
<block v-else>
<view class="goods--null">
<view>{{toast}}</view>
<no-list name='no-goods' :txt="toast" />
</view>
</block>
</view>
@@ -129,7 +129,7 @@ export default {
// 数据空
.goods--null{
width: 100%;
padding: 20vh 0;
padding: 200rpx 0;
text-align: center;
font-size: $title-size-m;
color: $text-gray;

View File

@@ -1,72 +1,72 @@
<template>
<view class="NOList">
<view class="no-addr">
<image :src="`${webUrl}/storage/imageresource/no-image/${name}.png`" mode="widthFix" />
{{txt}}
</view>
</view>
<view class="NOList">
<view class="no-addr">
<image :src="`${webUrl}/no-list/${name}.png`" mode="widthFix" />
{{txt}}
</view>
</view>
</template>
<script>
import {config} from '@/apis/index.js'
export default {
name: "NOList",
/**
* name 携带过来的图片名称 (与本地问图片文件相对应)
*
* no-address没有地址
* no-counpon没有优惠券
* no-goods没有商品
* no-list没有订单列表
* no-news没有任何消息
* no-new1没有任何消息1
* no-chain (没有区块链信息)
* no-collection(没有任何收藏信息
* no-foot (没有足迹信息)
* no-in没有收入信息)
* no-out (没有任何支出信息)
* no-order (没有任何订单信息)
* no-order-list (没有任何订单信息)
* no-record (没有任何收益信息)
* no-records (没有任何收益信息2
* no-search (没有任何搜索信息)
* no-shop (没有任何店铺信息)
*
*
* txt 携带过来的提示语
*/
props: {
name: String,
txt: String
},
data() {
return {
webUrl:''
};
},
mounted() {
this.webUrl = config.apiUrls
import {
config
} from '@/apis/index.js'
export default {
name: "NOList",
/**
* name 携带过来的图片名称 (与本地问图片文件相对应)
*
* no-address没有地址
* no-counpon没有优惠券
* no-goods没有商品
* no-list没有订单列表
* no-news没有任何消息)
* no-new1(没有任何消息1
* no-chain (没有区块链信息)
* no-collection没有任何收藏信息)
* no-foot (没有足迹信息)
* no-in没有收入信息)
* no-out (没有任何支出信息)
* no-order (没有任何订单信息)
* no-order-list (没有任何订单信息)
* no-record (没有任何收益信息)
* no-records (没有任何收益信息2
* no-search (没有任何搜索信息)
* no-shop (没有任何店铺信息)
*
*
* txt 携带过来的提示语
*/
props: {
name: String,
txt: String
},
data() {
return {
webUrl: config.apiUrls
};
}
}
}
</script>
<style lang="scss" scoped>
// 无地址
.no-addr {
padding-top: $padding*4;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-sizing: border-box;
color: #999;
font-size: $title-size*0.9;
// 无地址
.no-addr {
padding-top: $padding*4;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-sizing: border-box;
color: #999;
font-size: $title-size*0.9;
image {
margin-bottom: $margin*2;
margin-top: $margin*1;
width: 400rpx;
opacity: .4;
}
}
image {
margin-bottom: $margin*2;
margin-top: $margin*1;
width: 400rpx;
opacity: .4;
}
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<view>
<block v-if="list.length > 0">
<view class="record--item" v-for="(item, index) in list" :key="index">
<view class="record--item" v-for="(item, index) in list" :key="index" v-if="item">
<view class="title ellipsis">{{item.hash || '-'}}</view>
<view class="time ellipsis">{{item.block_time || '-'}}</view>
<view class="webkit-box variation">

View File

@@ -0,0 +1,18 @@
export default function h5Copy(content) {
if (!document.queryCommandSupported('copy')) {
// 不支持
return false
}
let textarea = document.createElement("textarea")
textarea.value = content
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand("copy") // 执行浏览器复制命令
textarea.remove()
return result
}

View File

@@ -5,6 +5,19 @@
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"h5" : {
"title" : "链商星球",
"router" : {
"mode" : "history"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "RY5BZ-7XNKS-IBMO6-637EZ-SMFQE-43FGN"
}
}
}
},
/* 5+App */
"app-plus" : {
"usingComponents" : true,

30
node_modules/jweixin-module/README.md generated vendored Normal file
View File

@@ -0,0 +1,30 @@
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/out/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)

1
node_modules/jweixin-module/lib/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

54
node_modules/jweixin-module/package.json generated vendored Normal file
View File

@@ -0,0 +1,54 @@
{
"_from": "jweixin-module",
"_id": "jweixin-module@1.6.0",
"_inBundle": false,
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd",
"_spec": "jweixin-module",
"_where": "/Users/WebTmm/Desktop/BlockChainH5",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
}

5
package-lock.json generated
View File

@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"uni-read-pages": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",

View File

@@ -1,21 +1,21 @@
{
"name": "blockchainh5",
"version": "1.0.0",
"description": "区块链电商h5版本",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.yuzhankeji.cn/TmOct5/BlockChainH5.git"
},
"author": "web唐明明",
"license": "ISC",
"dependencies": {
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4",
"vuex": "^3.6.2"
}
}
{
"name": "blockchainh5",
"version": "1.0.0",
"description": "区块链电商h5版本",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.yuzhankeji.cn/TmOct5/BlockChainH5.git"
},
"author": "web唐明明",
"license": "ISC",
"dependencies": {
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4",
"vuex": "^3.6.2"
}
}

View File

@@ -1,185 +1,351 @@
{
"pages": [{
"path": "pages/index/index",
"name": "Index",
"aliasPath": "/",
"style": {
"navigationBarTitleText": "发现能量"
}
}, {
"path": "pages/found/index",
"name": "Found",
"auth": true,
"style": {
"navigationBarTitleText": "发现更多"
}
}, {
"path": "pages/user/index",
"name": "User",
"auth": true,
"style": {
"navigationBarTitleText": "节点中心"
}
}, {
"path": "pages/user/code",
"name": "userCode",
"auth": true,
"style": {
"navigationBarTitleText": "邀请好友"
}
}, {
"path": "pages/user/help",
"name": "userHelp",
"auth": true,
"style": {
"navigationBarTitleText": "帮助中心"
}
}, {
"path": "pages/user/clause",
"name": "userClause",
"auth": true,
"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": "关联产品"
}
}, {
"path": "pages/login/login",
"name": "Login",
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/certification/personal",
"name": "Personal",
"auth": true,
"style": {
"navigationBarTitleText": "个人认证"
}
}, {
"path": "pages/setting/setting",
"name": "setting",
"auth": true,
"style": {
"navigationBarTitleText": "设置中心"
}
}, {
"path": "pages/setting/aboutUs",
"name": "aboutUs",
"auth": true,
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/company/approve",
"name": "companyApprove",
"auth": true,
"style": {
"navigationBarTitleText": "企业认证"
}
}, {
"path": "pages/news/index",
"name": "news",
"auth": true,
"style": {
"navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/news/detail",
"name": "newsDetail",
"auth": true,
"style": {
"navigationBarTitleText": "消息列表"
}
}, {
"path": "pages/wallet/property",
"name": "walletProperty",
"style": {
"navigationBarTitleText": "能量钱包",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/wallet/extract",
"style": {
"navigationBarTitleText": "提现能量",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
"path": "pages/index/index",
"name": "Index",
"aliasPath": "/",
"style": {
"navigationBarTitleText": "发现能量"
}
}, {
"path": "pages/found/index",
"name": "Found",
"aliasPath": "/found",
"auth": true,
"style": {
"navigationBarTitleText": "发现更多"
}
}, {
"path": "pages/user/index",
"name": "User",
"aliasPath": "/user",
"auth": true,
"style": {
"navigationBarTitleText": "节点中心"
}
}, {
"path": "pages/user/code",
"name": "userCode",
"aliasPath": "/user/code",
"auth": false,
"style": {
"navigationBarTitleText": "邀请好友"
}
}, {
"path": "pages/user/help",
"name": "userHelp",
"aliasPath": "/user/help",
"auth": true,
"style": {
"navigationBarTitleText": "帮助中心"
}
}, {
"path": "pages/user/partner",
"name": "userPartner",
"aliasPath": "/user/partner",
"auth": true,
"style": {
"navigationBarTitleText": "我的伙伴"
}
}, {
"path": "pages/user/clause",
"name": "userClause",
"aliasPath": "/user/clause",
"auth": true,
"style": {
"navigationBarTitleText": "服务条款"
}
}, {
"path": "pages/user/followOfficial",
"name": "Official",
"aliasPath": "/user/followOfficial",
"auth": true,
"style": {
"navigationBarTitleText": "关注公众号"
}
}, {
"path": "pages/vip/vip",
"name": "vipIndex",
"aliasPath": "/vip",
"style": {
"navigationBarTitleText": "开通节点"
}
}, {
"path": "pages/vip/agree",
"name": "vipAgree",
"aliasPath": "/vip/agree",
"style": {
"navigationBarTitleText": "用户协议"
}
}, {
"path": "pages/vip/examine",
"name": "Examine",
"aliasPath": "/vip/examine",
"style": {
"navigationBarTitleText": "提交成功"
}
}, {
"path": "pages/setting/setting",
"name": "setting",
"aliasPath": "/setting",
"auth": true,
"style": {
"navigationBarTitleText": "设置中心"
}
}, {
"path": "pages/goods/management",
"name": "goodsManagement",
"aliasPath": "/goods/management",
"style": {
"navigationBarTitleText": "商品权证管理"
}
}, {
"path": "pages/goods/addClassify",
"name": "goodsaddClassify",
"aliasPath": "/goods/add-classify",
"style": {
"navigationBarTitleText": "发布商品类目"
}
}, {
"path": "pages/goods/add",
"name": "goodsAdd",
"aliasPath": "/goods/add",
"style": {
"navigationBarTitleText": "商品权证创建"
}
}, {
"path": "pages/goods/goodsAuth",
"name": "goodsAddAuth",
"aliasPath": "/goods/goods-auth",
"style": {
"navigationBarTitleText": "商品权证认证"
}
}, {
"path": "pages/coupons/management",
"name": "couponsManagement",
"aliasPath": "/coupons/management",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/add",
"name": "couponsAdd",
"aliasPath": "/coupons/add",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/magDetails",
"name": "couponsDetails",
"aliasPath": "/coupons/mag-details",
"style": {
"navigationBarTitleText": "优惠券详情"
}
}, {
"path": "pages/coupons/selectGoods",
"name": "couponsSelectGoods",
"aliasPath": "/coupons/select-goods",
"style": {
"navigationBarTitleText": "关联产品"
}
}, {
"path": "pages/login/login",
"name": "Login",
"aliasPath": "/login",
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/login/guide",
"name": "loginGuide",
"aliasPath": "/login/guide",
"style": {
"navigationBarTitleText": "引导页"
}
}, {
"path": "pages/login/agreement",
"name": "agreement",
"aliasPath": "/login/agreement",
"style": {
"navigationBarTitleText": "用户隐藏协议"
}
}, {
"path": "pages/certification/personal",
"name": "Personal",
"aliasPath": "/personal",
"auth": true,
"style": {
"navigationBarTitleText": "个人认证"
}
}, {
"path": "pages/setting/aboutUs",
"name": "aboutUs",
"aliasPath": "/setting/about-us",
"auth": true,
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/company/approve",
"name": "companyApprove",
"aliasPath": "/company/approve",
"auth": true,
"style": {
"navigationBarTitleText": "企业认证"
}
}, {
"path": "pages/news/index",
"name": "news",
"aliasPath": "/news/index",
"auth": true,
"style": {
"navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/news/detail",
"name": "newsDetail",
"aliasPath": "/news/detail",
"auth": true,
"style": {
"navigationBarTitleText": "消息列表"
}
}, {
"path": "pages/wallet/property",
"name": "walletProperty",
"aliasPath": "/wallet/property",
"style": {
"navigationBarTitleText": "能量钱包",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/wallet/extract",
"name": "Extract",
"aliasPath": "/wallet/extract",
"style": {
"navigationBarTitleText": "提现能量",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/verification/index",
"name": "verificationIndex",
"aliasPath": "/verification/index",
"auth": true,
"style": {
"navigationBarTitleText": "扫码核销"
}
}, {
"path": "pages/verification/history",
"name": "verificationHistory",
"aliasPath": "/verification/history",
"auth": true,
"style": {
"navigationBarTitleText": "核销记录"
}
}, {
"path": "pages/shop/lists",
"name": "shopLists",
"aliasPath": "/shop/lists",
"auth": true,
"style": {
"navigationBarTitleText": "部门/门店"
}
}, {
"path": "pages/shop/create",
"name": "shopCreate",
"aliasPath": "/shop/create",
"auth": true,
"style": {
"navigationBarTitleText": "创建部门/门店"
}
}, {
"path": "pages/employees/list",
"name": "employeesList",
"aliasPath": "/employees/list",
"auth": true,
"style": {
"navigationBarTitleText": "员工管理"
}
}, {
"path": "pages/employees/add",
"name": "employeesAdd",
"aliasPath": "/employees/add",
"auth": true,
"style": {
"navigationBarTitleText": "添加员工"
}
}, {
"path": "pages/instrument/Spread",
"name": "instrumentSpread",
"aliasPath": "/instrument/spread",
"auth": true,
"style": {
"navigationBarTitleText": "营销推广码"
}
}, {
"path": "pages/instrument/basics",
"name": "instrumentBasics",
"aliasPath": "/instrument/basics",
"auth": true,
"style": {
"navigationBarTitleText": "基础信息"
}
}, {
"path": "pages/wallet/fragment",
"name": "Fragment",
"aliasPath": "/wallet/fragment",
"style": {
"navigationBarTitleText": "能量碎片记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
},
"name": "Extract"
}, {
"path": "pages/wallet/resetPassword",
"style": {
"navigationBarTitleText": "重置密码",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "ResetPassword"
},{
"path": "pages/wallet/fragment",
"style": {
"navigationBarTitleText": "能量碎片记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "Fragment"
}
],
{
"path": "pages/wallet/addBank",
"style": {
"navigationBarTitleText": "添加银行卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "addBank",
"aliasPath": "/wallet/add-bank"
}, {
"path": "pages/wallet/bankList",
"style": {
"navigationBarTitleText": "银行卡列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "bankList",
"aliasPath": "/wallet/bank/list"
}, {
"path": "pages/wallet/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "withdrawList",
"aliasPath": "/wallet/withdraw/list"
}, {
"path" : "pages/wxAuth/wxAuth",
"name" : "wxAuth",
"aliasPath": "/wechat-auth"
},{
"path" : "pages/clearOpen/clearOpen",
"style" : {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false
},
"name": "clearOpen",
"aliasPath": "/inside/clear-open"
}
],
"globalStyle": {
"navigationStyle": "custom",
"backgroundColor": "#F5F5F5"

46
pages/404/404.vue Normal file
View File

@@ -0,0 +1,46 @@
<template>
<view class="content vertical">
<image src="@/static/404/404.png" mode="widthFix"></image>
<view class="text">出错了</view>
<view class="text">你访问的页面以离开了星球~</view>
<button type="default" size="mini" @click="$Router.replaceAll({name: 'Index'})">返回星球</button>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
.content{
height: 100vh;
width: 100vw;
text-align: center;
padding-bottom: 20vh;
background: #2e065f;
.text{
color: #dbb6ec;
line-height: 60rpx;
font-size: $title-size-m;
}
button{
height: 80rpx;
line-height: 80rpx;
width: 60vw;
font-size: $title-size-lg;
border-radius: 0;
margin-top: $margin*2;
background: white;
color: #2e065f;
&::after{
border: none;
}
}
}
</style>

View File

@@ -207,7 +207,7 @@
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color-deep;
background-color: $mian-color;
border-radius: 0;
color: white;
font-size: $title-size-lg;

View File

@@ -0,0 +1,36 @@
<template>
<view class="vertical content">
<view class="text">{{text}}</view>
<button class="btn" type="default" :disabled="text != '清理完成'" size="mini" @click="$Router.pushTab({name: 'Index'})">返回首页</button>
</view>
</template>
<script>
export default {
data() {
return {
text: 'Opneid清理中...'
};
},
created() {
this.$store.commit('setCode', '')
this.text = '清理完成'
}
}
</script>
<style lang="scss">
.content{
text-align: center;
height: 100vh;
background: white;
}
.text{
color: gray;
padding-bottom: $padding*2;
}
.btn{
background: $mian-color;
color: white;
}
</style>

View File

@@ -97,9 +97,6 @@
};
},
created(){
console.log(this.$Route)
// 读取配置信息
appliesCreate().then(res=>{
this.industry = res
@@ -307,7 +304,7 @@
.btns{
padding-top: $padding * 2;
button{
background: $mian-color-deep;
background: $mian-color;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
@@ -340,14 +337,14 @@
@extend .nowrap;
&.show{
color: white;
background-color: $mian-color-deep;
background-color: $mian-color;
}
}
}
.btns{
padding-top: $padding * 2;
button{
background: $mian-color-deep;
background: $mian-color;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;

View File

@@ -1,62 +0,0 @@
<template>
<view class="content">
<image class="cover" src="@/static/dev/guide_cover_00.png" mode="widthFix"></image>
<view class="title">恭喜您已注册成功</view>
<view class="sub-title">开通会员认证企业信息立即获得授信易货额即可开始易货之旅</view>
<button class="vip-button" type="default" @click="$Router.push({name: 'Vip'})">开通会员</button>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onNavigationBarButtonTap(e){
this.$Router.pushTab({name: "Equity"})
},
}
</script>
<style lang="scss" scoped>
.content{
padding: $padding * 2;
background: white;
height: 100vh;
width: 100vw;
box-sizing: border-box;
@extend .vertical;
text-align: center;
.cover{
width: 46vw;
margin-bottom: 10vh;
}
.title{
font-size: $title-size + 14;
font-weight: bold;
line-height: 90rpx;
}
.sub-title{
font-size: $title-size-m;
color: $text-gray;
text-align: center;
}
.vip-button{
margin-top: 10vh;
background: $text-price;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
font-weight: bold;
&::after{
border: none;
}
}
}
</style>

View File

@@ -1,147 +0,0 @@
<template>
<view class="content">
<view class="header">
<view class="title">企业注册</view>
<view class="subtitle">填写企业基础行业获取企业/商家权益</view>
</view>
<view class="white-box">
<view class="inputs">
<label>企业名称</label>
<input type="text" v-model="name" placeholder="输入企业名称" />
</view>
<view class="inputs">
<label>企业行业</label>
<picker v-if="industry.length > 0" :range="industry" :value="industryIndex" range-key="title" @change="changePicker" data-type="industry">
<view class="picker-text nowrap">
{{industry[industryIndex].title}}
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
</view>
</picker>
</view>
<view class="btns">
<button type="default" size="default" @click="next">下一步</button>
</view>
</view>
</view>
</template>
<script>
import { createConfig, inits } from '@/apis/interfaces/company'
export default {
data() {
return {
name : "",
industry : [],
industryIndex: 0
};
},
created(){
createConfig().then(res=>{
this.industry = res
})
},
methods:{
// 提交信息
next(){
inits({
name : this.name,
industry_id : this.industry[this.industryIndex].industry_id
}).then(res => {
this.$Router.push({name: 'Prompt'})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
//选择器
changePicker(e){
let changeType = e.target.dataset.type,
changeVlae = e.detail.value
switch(changeType){
case 'type':
this.typeIndex = changeVlae
break
case 'industry':
this.industryIndex = changeVlae
break
}
}
}
}
</script>
<style lang="scss" scoped>
.content{
.header{
height: 20vh;
@extend .vertical;
.title{
text-align: center;
font-size: $title-size + 14;
font-weight: bold;
line-height: 90rpx;
}
.subtitle{
font-size: $title-size-m;
color: $text-gray;
text-align: center;
}
}
.white-box{
background-color: white;
border-radius: $radius $radius 0 0;
min-height: 80vh;
padding: $padding * 2;
box-sizing: border-box;
.inputs{
position: relative;
margin-top: $margin;
background: white;
border-bottom: solid 1rpx $border-color;
padding-left: 200rpx;
line-height: 90rpx;
min-height: 90rpx;
label{
position: absolute;
top: 0;
left: 0;
width: 200rpx;
font-size: $title-size;
}
input{
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
}
.picker-text{
position: relative;
padding-right: 90rpx;
.picker-icon{
position: absolute;
right: 0;
top: 0;
}
}
}
.btns{
padding-top: $padding * 2;
button{
background: $text-price;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
font-weight: bold;
&::after{
border: none;
}
}
}
}
}
</style>

View File

@@ -24,7 +24,7 @@
<view class="add-info">
<view class="inputs">
<label class="input-label">券类型</label>
<picker :range="types" range-key="text" :value="typeIndex" data-type="typeIndex" @change="changePicker">
<picker :range="types" range-key="text" :value="typeIndex" @change="changePicker($event, 'typeIndex')">
<view class="input-text">{{types[typeIndex].text}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
</picker>
</view>
@@ -58,11 +58,11 @@
<view class="input-checkbox">
<radio-group @change="radioChange">
<label class="input-checkbox-item">
<radio color="#e93340" value="1" checked/>
<radio color="#8b64fd" value="1" checked/>
<text>线上优惠</text>
</label>
<label class="input-checkbox-item">
<radio color="#e93340" value="2"/>
<radio color="#8b64fd" value="2"/>
<text>线下活动</text>
</label>
</radio-group>
@@ -71,7 +71,7 @@
</block>
<view class="inputs">
<label class="input-label">时间类型</label>
<picker :range="times" range-key="text" :value="timeIndex" data-type="timeIndex" @change="changePicker">
<picker :range="times" range-key="text" :value="timeIndex" @change="changePicker($event, 'timeIndex')">
<view class="input-text">{{times[timeIndex].text}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
</picker>
</view>
@@ -79,7 +79,20 @@
<label class="input-label">{{timeIndex == 0 ? '券有效期': '延期天数'}}</label>
<block v-if="timeIndex === 0">
<view class="input-text" @click="showDatePicker = true">{{datePickerValue.length == 0 ? '选择优惠券有效期区间': datePickerValue[0] + ' ' + datePickerValue[1]}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
<tn-date-picker :show="showDatePicker" :monthNum="12" color="#e93340" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/>
<u-calendar
:safe-area-inset-bottom="true"
v-model="showDatePicker"
mode="range"
active-bg-color="#8b64fd"
range-bg-color="rgba(139,100,253, .2)"
range-color="#8b64fd"
btn-type="default"
max-date="2099-12-12"
:min-date="minDate"
@change="confirmDatePicker"
>
</u-calendar>
<!-- <tn-date-picker :show="showDatePicker" :monthNum="12" color="" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/> -->
</block>
<block v-if="timeIndex === 1">
<view class="input-number">
@@ -107,15 +120,13 @@
</template>
<script>
import TnDatePicker from "@/components/tn-datepicker/tn-datepicker";
import date from '@/public/date'
import { uploads } from '@/apis/interfaces/uploading'
import { pushCoupons } from '@/apis/interfaces/coupons'
export default {
components:{
TnDatePicker
},
data() {
return {
loding : true,
typeIndex : 0,
types : [
{ id: 1, text: '服务券' },
@@ -124,8 +135,8 @@
],
timeIndex : 0,
times : [
{ type: 2, text: '固定时间(区间范围)' },
{ type: 1, text: '延期券(用户领取后有效天数)' }
{ type: 1, text: '固定时间(区间范围)' },
{ type: 2, text: '延期券(用户领取后有效天数)' }
],
showDatePicker : false, // 活动弹出层时间
datePickerValue : [], // 活动时间
@@ -138,10 +149,14 @@
price : '', // 减少金额
description : '', // 使用规则
coupongoods : [], // 关联商品
timeNumber : 1 // 延期券时间
timeNumber : 1 ,// 延期券时间
minDate : ''
};
},
onShow(){
new date().then(res => {
this.minDate = res
})
this.coupongoods = this.$store.getters.getCoupongoods
},
methods:{
@@ -162,12 +177,12 @@
this.useWay = e.detail.value
},
// 选择
changePicker(e){
this[e.target.dataset.type] = e.detail.value
changePicker(e, key){
this[key] = e.detail.value
},
// 日期
confirmDatePicker(e){
this.datePickerValue = e.value
this.datePickerValue = [e.startDate , e.endDate]
this.showDatePicker = false
},
// 上传优惠券封面
@@ -190,7 +205,7 @@
},
// 选择关联商品
onSelectGoods(){
this.$Router.push({name: 'selectGoods', params: {type: this.types[this.typeIndex].id}})
this.$Router.push({name: 'couponsSelectGoods', params: {type: this.types[this.typeIndex].id}})
},
// 发布优惠券
updComponent(){
@@ -206,18 +221,18 @@
start_at : this.datePickerValue[0],
end_at : this.datePickerValue[1],
description : this.description,
time_type : this.times[this.typeIndex].type,
time_type : this.times[this.timeIndex].type,
days : this.timeNumber,
goodsable_ids : this.coupongoods
}
console.log(valuss.time_type)
pushCoupons(valuss).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
confirmText : '确定',
confirmColor: '#e93340',
confirmColor: '#8b64fd',
success : modalRes => {
this.$store.commit('setCoupongoods', [])
this.$Router.back()
@@ -234,7 +249,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.add-btn{
padding: $padding;
button{

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view class="basics-content">
<view class="header">
<view class="tabs">
<view class="item" :class="{'show': listType == ''}" @click="onTabs('')">全部</view>
@@ -17,7 +17,7 @@
</view>
<block v-if="coupons.length > 0">
<view class="coupons">
<view class="coupons-flex" v-for="(item, index) in coupons" :key="index" @click="$Router.push({name: 'magDetails', params: {couponId: item.coupon_id}})">
<view class="coupons-flex" v-for="(item, index) in coupons" :key="index" @click="$Router.push({name: 'couponsDetails', params: {couponId: item.coupon_id}})">
<view class="item cover">
<view v-if="item.type.value === 2">
<view class="cover-price">{{item.price || 0}}<text></text></view>
@@ -45,9 +45,12 @@
</block>
<block v-else>
<view class="list-null">
<view class="sub-title">暂无相关优惠券</view>
<no-list name='no-counpon' txt="没有任何相关优惠券~" />
</view>
</block>
<view class="basisc-btn">
<button class="btn" type="default" @click="$Router.push({name: 'couponsAdd'})">添加优惠券</button>
</view>
</view>
</template>
@@ -94,14 +97,39 @@
})
})
}
},
onNavigationBarButtonTap() {
this.$Router.push({name: 'couponsAdd'})
}
}
</script>
<style lang="scss" scoped>
.basics-content{
padding-bottom: ($padding*3) + 90;
}
// 按钮组
.basisc-btn{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.btn {
background: $mian-color;
color: white;
border-radius: 0;
font-size: $title-size-lg;
line-height: 88rpx;
height: 88rpx;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
}
// tabs
.header{
position: fixed;
@@ -149,17 +177,8 @@
// 空提示
.list-null{
width: 100vw;
height: 100vh;
box-sizing: border-box;
text-align: center;
@extend .vertical;
.sub-title{
color: $text-gray;
font-size: $title-size-m;
}
.icon{
width: 288rpx;
}
// height: 100vh;
padding-top: 200rpx;
}
// 订单管理
.coupons{

View File

@@ -1,35 +1,38 @@
<template>
<view>
<!-- 商品列表 -->
<view class="lists">
<view class="goods-item" v-for="(item, index) in goods" :key="index">
<checkbox class="checkbox" :checked="item.isSelect" @click="onSelect(index)"/>
<view class="mian">
<image class="cover" :src="item.cover" mode="aspectFill" />
<view class="title">{{item.title}}</view>
<view class="subtitle">{{item.description}}</view>
<view class="mian-flex">
<view class="price"><text></text>{{item.price}}</view>
<view class="inventory">权证剩余{{item.stock}}</view>
<block>
<!-- 商品列表 -->
<view class="lists">
<view class="goods-item" v-for="(item, index) in goods" :key="index">
<checkbox class="checkbox" :checked="item.isSelect" @click="onSelect(index)"/>
<view class="mian">
<image class="cover" :src="item.cover" mode="aspectFill" />
<view class="title">{{item.title}}</view>
<view class="subtitle">{{item.description}}</view>
<view class="mian-flex">
<view class="price"><text></text>{{item.price}}</view>
<view class="inventory">权证剩余{{item.stock}}</view>
</view>
</view>
</view>
<view class="ios-bottom"></view>
</view>
<view class="ios-bottom"></view>
</view>
<!-- footer -->
<view class="footer">
<view class="footer-flex">
<view class="flex-checkbox">
<checkbox class="checkbox" :checked="allSelect" @click="onAllSelect"/>
<label for="all">
<view class="text">全选</view>
<view class="sub-text">已选{{selectGoods.length}}</view>
</label>
<!-- footer -->
<view class="footer">
<view class="footer-flex">
<view class="flex-checkbox">
<checkbox class="checkbox" :checked="allSelect" @click="onAllSelect"/>
<label for="all">
<view class="text">全选</view>
<view class="sub-text">已选{{selectGoods.length}}</view>
</label>
</view>
<view class="flex-button" @click="setGoods">确定</view>
</view>
<view class="flex-button" @click="setGoods">确定</view>
<view class="ios-bottom"></view>
</view>
<view class="ios-bottom"></view>
</view>
</block>
<no-list v-if="goods.length === 0" name='no-goods' txt="没有任何可选商品~" />
</view>
</template>

345
pages/employees/add.vue Normal file
View File

@@ -0,0 +1,345 @@
<template>
<view class="content" v-if="!loging">
<!-- 基础信息 -->
<view class="info-card">
<view class="cover">
<view class="cover-add vertical" @click="updCover">
<block v-if="cover.showpath != ''">
<image :src="cover.showpath" mode="aspectFill"></image>
</block>
<block v-else>
<image class="cover-default" src="@/static/icons/add-icon.png" mode="widthFix"></image>
<view>员工寸照</view>
</block>
</view>
</view>
<view class="info-text">
<view class="info-inputs">
<input type="text" v-model="name" placeholder="姓名"/>
</view>
<view class="info-inputs">
<input type="number" v-model="phone" placeholder="手机号码"/>
</view>
<view class="info-inputs">
<input type="text" v-model="job" placeholder="职业"/>
</view>
<view class="info-inputs">
<picker :range="section" range-key="name" :value="sectionIndex" @change="pickerChange">
<view class="picker-text nowrap">
{{section[sectionIndex].name}}
<uni-icons class="icon" type="arrowdown" color="#555"></uni-icons>
</view>
</picker>
</view>
</view>
</view>
<view class="jurisdiction switch">
<view class="item">
<label>
<view class="item-title">设为推荐</view>
<view class="item-info">设为推荐员工将在企业自媒体中优先展示</view>
<switch class="item-switch" :checked="isPosition" color="#8b64fd" @change="switchChange" />
</label>
</view>
</view>
<!-- 权限设置 -->
<view class="title">权限设置</view>
<view class="jurisdiction">
<checkbox-group @change="permissionChange">
<view class="item" v-for="(item, index) in permissions" :key="index">
<label>
<view class="item-title">{{item.title}}</view>
<view class="item-info">{{item.description}}</view>
<checkbox class="item-checkbox" :checked="item.check" color="#8b64fd" :value="String(item.permission_id)"/>
</label>
</view>
</checkbox-group>
</view>
<!-- 按钮 -->
<view class="basisc-btn">
<button class="btn" size="default" @click="onAddEmployees">{{type === 'PUT' ? '修改': '添加'}}</button>
</view>
</view>
</template>
<script>
import { employeesConfig, addEmployees, employeesInfo, employeesPut } from '@/apis/interfaces/employees'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
type : '',
loging : true,
section : [],
permissions : [],
permissionIds: [],
sectionIndex : 0,
cover : {
showpath : '',
path : ''
},
name : '',
phone : '',
job : '',
isPosition : false
};
},
created() {
if(this.$Route.query.type === 'PUT'){
this.type = 'PUT'
uni.setNavigationBarTitle({
title: '编辑员工'
})
}
employeesConfig().then(res => {
this.section = res.store
console.log(res)
if(this.$Route.query.type === 'PUT'){
console.log(111)
employeesInfo(this.$Route.query.id).then(res => {
console.log(11111)
console.log(res)
let permissionIds = []
for(let val of res.permission){
if(val.check){
permissionIds.push(val.permission_id)
}
}
this.permissions = res.permission
this.sectionIndex = this.section.findIndex(val => val.store_id == res.store.store_id)
this.permissionIds= permissionIds
this.name = res.name
this.phone = res.mobile
this.job = res.job
this.cover = res.cover
this.isPosition = res.is_position
this.loging = false
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}else{
this.permissions = res.permissions
this.loging = false
}
})
},
methods:{
// 设为推荐
switchChange(e){
this.isPosition = e.detail.value
},
// 选择部门
pickerChange(e){
this.sectionIndex = e.detail.value
},
// 权限选择
permissionChange(e){
this.permissionIds = e.detail.value
},
// 上传照片
updCover(){
uni.chooseImage({
crop: {width: 229, height: 320},
success: path=> {
uploads([{
uri : path.tempFilePaths[0]
}]).then(res => {
this.cover = {
showpath: res.url[0],
path : res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
},
// 添加员工
onAddEmployees(){
let data = {
name : this.name,
mobileNo : this.phone,
job : this.job,
cover : this.cover.path,
position : this.isPosition ? 1: 0,
order : 0,
store_id : this.section[this.sectionIndex].store_id,
permission : this.permissionIds
}
let submitAdd = this.type == 'PUT' ? employeesPut(this.$Route.query.id, data) : addEmployees(data)
submitAdd.then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : () => {
this.$Router.back()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
// 按钮组
.basisc-btn{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.btn {
background: $mian-color;
color: white;
border-radius: 0;
font-size: $title-size-lg;
line-height: 88rpx;
height: 88rpx;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
}
.content{
// min-height: 100vh;
padding-bottom: ($padding*3) + 90;
@extend .ios-bottom;
.title{
padding: ($padding/2) $padding;
color: $text-gray;
}
.jurisdiction{
background: white;
&.switch{
margin-top: $margin;
}
.item{
position: relative;
padding: $padding 150rpx $padding $padding;
&::after{
position: absolute;
left: $padding;
right: 0;
bottom: 0;
height: 1rpx;
content: " ";
background: $border-color;
}
&:last-child::after{
display: none;
}
.item-checkbox{
position: absolute;
right: $padding;
top: 50%;
height: 40rpx;
margin-top: -27rpx;
}
.item-switch{
position: absolute;
right: $padding;
top: 50%;
height: 40rpx;
margin-top: -27rpx;
}
.item-title{
font-size: $title-size;
padding-bottom: $margin/3;
}
.item-info{
font-size: $title-size-m;
color: $text-gray;
}
}
}
// 基础信息
.info-card{
background: white;
padding: $padding;
position: relative;
min-height: 238rpx;
.cover{
position: absolute;
top: $padding;
left: $padding;
background: #f8f8f8;
width: 229rpx;
height: 320rpx;
.cover-add{
position: absolute;
width: 100%;
height: 100%;
text-align: center;
image{
width: 229rpx;
height: 320rpx;
}
image.cover-default{
width: 128rpx;
}
color: $text-gray-m;
font-size: $title-size-m;
}
}
.info-text{
padding-left: $padding + 229;
.info-inputs{
height: 80rpx;
line-height: 80rpx;
border-bottom: solid 1rpx $border-color;
input{
height: 80rpx;
}
.picker-text{
position: relative;
padding-right: 80rpx;
.icon{
position: absolute;
right: 0;
top: 0;
}
}
}
}
}
// 添加按钮
.add-btns{
padding: $padding;
button[size='default']{
height: 90rpx;
line-height: 90rpx;
padding: 0;
margin: 0;
background: $text-price;
font-size: $title-size;
font-weight: bold;
color: white;
border-radius: 0;
}
}
}
</style>

260
pages/employees/list.vue Normal file
View File

@@ -0,0 +1,260 @@
<template>
<view class="ios-bottom" v-if="!loding">
<view class="header-flex">
员工数量 {{total}}
<view class="add-btn" @click="addEmployees">添加员工</view>
</view>
<!-- 员工列表 -->
<uni-collapse v-if="lists.length > 0">
<block v-for="(listItem, listIndex) in lists" :key="listIndex">
<uni-collapse-item :show-animation="true" :open="listIndex === 0">
<template v-slot:title>
<view class="collapse-title">{{listItem.name}}</view>
</template>
<block v-if="listItem.data.length > 0">
<view class="employees-border" v-for="(item, index) in listItem.data" :key="index">
<uni-swipe-action>
<uni-swipe-action-item :rightOptions="options" @click="onEmployees($event, listIndex, index)">
<view class="employees-item">
<view class="cover">
<block v-if="item.user.avatar === ''">{{item.name.slice(0,1)}}</block>
<block v-else>
<image class="cover-img" :src="item.user.avatar" mode="aspectFill"></image>
</block>
</view>
<view class="content">
<view class="nickname nowrap">{{item.name}}<text>{{item.job}}</text></view>
<view class="job nowrap">
<text v-for="(permissionItem, permissionIndex) in item.permission" :key="permissionIndex">{{permissionItem}}</text>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</block>
<block v-else>
<view class="employees-null">店铺暂无员工</view>
</block>
</uni-collapse-item>
</block>
</uni-collapse>
<view v-else class="list-null">
<image class="icon" src="@/static/icons/listnull-icon.png" mode="widthFix" />
<view class="sub-title">暂无员工</view>
<view class="sub-btn" @click="addEmployees">添加员工</view>
</view>
</view>
</template>
<script>
import { employees, employeesDelete } from '@/apis/interfaces/employees'
export default {
data() {
return {
loding : true,
lists : [],
total : 0,
options : [{
text : '编辑',
type : 'PUT',
style : {
backgroundColor: '#8b64fd'
}
},{
text : '删除',
type : 'DELETE',
style : {
backgroundColor: '#e93340'
}
}]
};
},
onShow(){
employees().then(res => {
this.lists = res.data
this.total = res.total
this.loding = false
})
},
methods:{
// 编辑,删除
onEmployees(e, upIndex, index){
let type = e.content.type,
val = this.lists[upIndex].data[index]
if(type == 'PUT'){
this.$Router.push({name: 'employeesAdd', params: {type: 'PUT', id: val.employee_id}})
return
}
uni.showModal({
title : '提示',
content : '删除后无法恢复,确定删除员工[' + val.name + ']吗?',
cancelText : '取消',
cancelColor : '#555',
confirmText : '确认',
confirmColor: '#8b64fd',
success : res => {
if(res.confirm) {
employeesDelete(val.employee_id).then(res => {
uni.showToast({
title: res,
icon : 'none'
})
this.lists[upIndex].data.splice(index, 1)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
})
},
// 添加员工
addEmployees(){
if(this.lists.length <= 0){
uni.showModal({
title : '提示',
content : '暂未创建门店,无法添加员工',
cancelText : '稍后创建',
cancelColor : '#555',
confirmText : '立即创建',
confirmColor: '#8b64fd',
success : res => {
if(res.confirm) {
this.$Router.push({name: 'shopCreate'})
}
}
})
return
}
this.$Router.push({name: 'employeesAdd'})
}
}
};
</script>
<style lang="scss" scoped>
.collapse-title{
padding: 0 $padding;
line-height: 90rpx;
font-weight: bold;
font-size: $title-size-lg;
}
.employees-item {
background: white;
padding: ($padding - 10) $padding;
position: relative;
&::before {
position: absolute;
bottom: 0;
left: $padding + 98;
right: 0;
content: ' ';
height: 1rpx;
background: $border-color;
}
.cover {
position: absolute;
top: $padding - 10;
left: $padding;
background: $text-price;
color: white;
height: 88rpx;
width: 88rpx;
line-height: 88rpx;
text-align: center;
border-radius: 50%;
overflow: hidden;
font-size: $title-size-lg;
.cover-img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
}
.content {
height: 88rpx;
padding-left: 108rpx;
.nickname{
line-height: 40rpx;
font-size: $title-size;
padding-bottom: 10rpx;
text{
font-size: $title-size-sm;
color: $text-gray-m;
padding-left: 10rpx;
}
}
.job{
line-height: 38rpx;
text{
background-color: $border-color-lg;
color: $text-gray;
padding: 0 10rpx;
line-height: 38rpx;
margin-left: $margin/2;
display: inline-block;
&:first-child{
margin-left: 0;
}
}
}
}
}
// 空提示
.list-null{
width: 100vw;
height: 100vh;
box-sizing: border-box;
text-align: center;
background: white;
padding-bottom: 20vh;
@extend .vertical;
.sub-title{
color: $text-gray;
font-size: $title-size-m;
}
.icon{
width: 288rpx;
}
.sub-btn{
width: 200rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background: $mian-color;
color: white;
display: inline-block;
margin-top: $margin*2;
}
}
.employees-null{
text-align: center;
line-height: 10vh;
padding-bottom: $padding;
font-size: $title-size-m;
color: $text-gray;
}
// 添加员工header
.header-flex{
background: white;
padding: ($padding/2) $padding;
display: flex;
justify-content: space-between;
margin-bottom: $margin - 10;
line-height: 60rpx;
color: $text-gray;
.add-btn{
background: $mian-color;
color: white;
width: 150rpx;
text-align: center;
font-size: $title-size-m;
}
}
</style>

View File

@@ -1,141 +1,113 @@
<template>
<view class="crystal">
<!-- 公共提示弹出 start -->
<order-tips title="温馨提示" content="恭喜您,签到成功" :tipsState="sign.signShow" @tipseject="signject" />
<!-- 公共提示弹出 end -->
<!-- 公共提示弹出 start -->
<order-tips :title="tips.tipsTitle" :content="tips.tipsContent" :tipsState="tips.tipsState" @tipseject="tipseject" />
<!-- 公共提示弹出 end -->
<!-- 账户余额 -->
<view class="total">
<view class="item ellipsis"><image src="@/static/icons/gemstone-icon.png"/>原石 {{ account.coin }}</view>
<view class="item ellipsis"><image src="@/static/icons/crystal-icon.png"/>水晶 {{ account.crystal }}</view>
</view>
<!-- 矿石 -->
<view class="ore">
<image src="/static/img/crystal-ore.png" mode="widthFix" />
<view class="ore-lists">
<view class="oct-float ore-item" v-for="(item, index) in crystalArr" :key="index" @click="ledCrystal(index)">
<block v-if="item.amount !== null">
<image src="/static/imgs/crystal-ore-icon.png" mode="widthFix" class="icon" />
<view class="text">水晶{{ item.amount || '-'}}</view>
</block>
</view>
<navigator url="../index/index" open-type="switchTab" hover-class="none" class="oct-float ore-item-nav">
<image src="/static/imgs/gemstone-ore-icon.png" mode="widthFix" class="icon" />
<view class="text">购物<uni-icons type="arrowright" color="#FFFFFF" size="14"></uni-icons></view>
</navigator>
</view>
</view>
<!-- 任务分类 -->
<scroll-view class="task-block" scroll-x="true">
<!-- url="../index/index" open-type="switchTab" -->
<view class="item" v-for="(item, index) in categoryArr" :key="index" @click="JumpUrl(item.url, item.title)">
<view class="text">{{ item.remark }}</view>
<view class="icon">
<image :src="item.cover" />
</view>
<view class="title">{{ item.title }}</view>
</view>
</scroll-view>
<!-- 内容 -->
<view class="content">
<!-- 签到 -->
<view class="signCont">
<view class="content-title">
<view class="content-title-text">
每日签到
<view class="tips">
累计天数越多水晶奖励越多
</view>
</view>
<view class="content-titl-btn" v-if="sign.signCan" @click="signClick">
立即签到
</view>
<!-- 签到成功弹出 -->
<view class="signBack" v-if="sign.signShow"></view>
<view class="signPop" v-if="sign.signShow">
<image class="signPop-tips" src="../../static/user/sign_tips.png" mode="widthFix"></image>
<view class="signPop-cont">
<view class="signPop-cont-name">
签到成功
</view>
<view class="sign">
<view class="sign-list">
<view class="item" v-for="(item, index) in sign.signArr" :key="index">
<view class="item-icon item-done" v-if="item.sign">
<image src="@/static/imgs/crystal-sign.png" mode="aspectFill"></image>
</view>
<view class="item-icon show" :class="{ active: index == 3 || index == 7 }" v-else><text>+{{ item.crystal }}</text></view>
<view class="item-title">{{ item.text }}</view>
</view>
</view>
<view class="sign-text">再签到{{ sign.nextTask.day }}天额外赠送{{ sign.nextTask.diff }}个水晶奖励</view>
</view>
</view>
<!-- 水晶任务 -->
<view class="content-title">
<view class="content-title-text">
水晶任务
<view class="signPop-cont-text">
能量碎片<view class="signPop-cont-number">+{{sign.signSuccess}}</view>
</view>
</view>
<view class="task">
<view class="task-item" v-for="(item, index) in task" :key="index" @click="JumpUrl(item.url, item.title)">
<image class="task-icon" :src="item.ico" mode="aspectFill"></image>
<view class="task-title">{{item.title || '-'}}</view>
<view class="task-subtitle">{{item.remark || '-'}}</view>
<view class="task-label">{{item.tips || '-'}}<image class="task-label-icon" src="@/static/imgs/user-crystalMark-grey.png" @click.stop="crystalShow"></image></view>
</view>
</view>
</view>
</view>
<!-- 签到 -->
<view class="signCont">
<view class="content-title">
每日签到能量碎片多多<image @click="showHelp" class="content-title-img" src="../../static/user/sign_privilege.png" mode="aspectFill"></image>
</view>
<view class="sign">
<view class="sign-list" :class="{ active: item.sign }" v-for="(item, index) in sign.signArr" :key="index">
<view class="sign-tips" v-if="item.sign">
<view class="sign-tips-text">已签</view>
</view>
<block v-if="index == 7">
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_last_active.png' : '../../static/user/sign_icon_last.png'" mode="aspectFill"></image>
</block>
<block v-else>
<image class="sign-list-img" :src="item.sign ? '../../static/user/sign_icon_active.png' : '../../static/user/sign_icon.png'" mode="aspectFill"></image>
</block>
<view class="sign-list-day">
{{ item.text }}
</view>
</view>
</view>
<view class="sign-record">再签到{{ sign.nextTask.day }}天额外赠送{{ sign.nextTask.diff }}个能量碎片</view>
</view>
<view class="signBtn">
<block v-if="sign.signCan">
<view class="signBtn-go" @click="signClick" style="cursor:pointer" >
签到领取能量碎片
</view>
</block>
<block v-else>
<view class="signBtn-go" @click="$Router.push({name:'Fragment'})">
能量碎片记录<image class="signBtn-go-icon" src="/static/user/sign_arrow.png" mode="aspectFill"></image>
</view>
</block>
</view>
<!-- 水晶任务 -->
<view class="task">
<view class="task-liest">
能量碎片任务
</view>
<block v-for="(item, index) in task" :key="index">
<view class="task-item" v-if="item.rule.name != 'sign_crystal'" @click="JumpUrl(item.url, item.title, item.is_finish)">
<image class="task-icon" :src="item.ico" mode="aspectFill"></image>
<view class="task-title">{{item.title}}</view>
<view class="task-subtitle">{{item.remark}}</view>
<view class="task-label" :class="{'active' : item.is_finish}">{{item.is_finish ? '已完成' : item.tips}}<image @click.stop="showHelp" class="task-label-icon" src="@/static/imgs/user-crystalMark-grey.png"></image></view>
</view>
</block>
</view>
</view>
</template>
<script>
import { crystals, thawlog, task, category, sign, operateSign } from '@/apis/interfaces/crystal'
import { task, sign, operateSign } from '@/apis/interfaces/crystal'
import { userIndex } from '@/apis/interfaces/user'
export default {
data() {
return {
account: {
coin: 0,
crystal: '0.00'
},
yesterday: '0.00',
crystalArr: [],
categoryArr: [], // 分类列表
ids: [],
task: [],
sign: {
signArr : [],
nextTask: '',
signCan : false,
signShow: false
signShow: false,
signSuccess: ''
},
tips : {
tipsTitle : '', // 弹出的动态名称
tipsContent : '', // 弹出的动态内容
tipsState : false // 弹出的动态状态
}
},
energyShard : '' // 碎片说明
}
},
onShow() {
// 获取水晶领取信息
crystals().then(res => {
this.account = {
coin: res.coin,
crystal: res.crystal
}
this.crystalArr = res.crystal_array
this.ids = res.all_ids
this.yesterday = res.yesterday_crystal
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
// 获取水晶任务
task().then(res => {
this.task = res
})
this.sign.signShow = false
// 获取能量领取信息
task().then(res => {
uni.hideLoading()
this.task = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
// 获取水晶分类
category().then(res => {
this.categoryArr = res
// 读取配置信息
userIndex().then(res=>{
this.energyShard = res.help_doc.energy_shard
}).catch(err =>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
// 获取水晶签到信息
@@ -143,46 +115,6 @@
},
methods: {
ledCrystal(index) {
// 领取水晶
thawlog({
thaw_id: this.crystalArr[index].log_id,
all_ids: this.ids
}).then(res => {
uni.showToast({
icon: 'none',
title: '+' + this.crystalArr[index].amount + '水晶',
duration: 2000
})
this.$set(this.account, 'crystal', res.crystal)
this.ids = res.all_ids
if (JSON.stringify(res.last) === '[]') {
this.$set(this.crystalArr, index, {
amount: null
})
return
}
this.$set(this.crystalArr, index, res.last)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
},
// 商品详情
onTack(e) {
uni.navigateTo({
url: '../goods/goods?id=' + e.goods_id
})
},
// 提示信息
onShowToast() {
uni.showToast({
title: '暂未开放,敬请期待',
icon : 'none'
})
},
// 水晶签到信息
signInfo() {
sign().then(res => {
@@ -196,354 +128,282 @@
})
})
},
// 能量碎片提示信息
showHelp() {
uni.showModal({
title: '能量碎片',
confirmColor: '#8b64fd',
content: this.energyShard.description,
showCancel: false
})
},
// 签到
signClick() {
uni.vibrateShort({
success: () => {
operateSign().then(res => {
// 获取水晶签到信息
this.signInfo();
this.sign.signShow = !this.sign.signShow
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
}
})
},
// 提示语-组件返回参数
signject(val) {
console.log(val)
this.sign.signShow = val.tipsState
operateSign().then(res => {
this.sign.signSuccess = res.task_crystals
// 获取水晶签到信息
this.sign.signShow = true
this.signInfo();
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
},
// 水晶分类跳转
JumpUrl(open, title) {
var type = open.openType;
switch(type){
case 'switchTab':
uni.switchTab({
url: open.path
})
break;
case 'web':
uni.navigateTo({
url: `/pages/web-view/index?title=${title}&url=${open.url}`
})
break;
case 'navigateTo':
uni.navigateTo({
url: open.path
})
break;
// 能量跳转
JumpUrl(open, title, finish) {
if(finish) {
uni.showToast({
title: '您已完成此任务',
icon : 'none'
})
return
}
},
// 水晶原则提示语
crystalShow () {
this.tips.tipsTitle = '水晶规则'
this.tips.tipsContent = '水晶是用户获取原石的影响因子,同一时段内,水晶越高,获取的原石越多.'
this.tips.tipsState = !this.tips.tipsState
},
// 水晶原则提示语-组件返回参数
tipseject(val) {
this.tips.tipsState = val.tipsState
},
var type = open.openType;
switch(type){
case 'switchTab':
this.$Router.pushTab({name: open.path})
break;
case 'web':
window.location.href = open.path
break;
case 'navigateTo':
this.$Router.push({name: open.path})
break;
}
}
}
}
</script>
<style scoped>
/* 水晶漂浮动画 */
.oct-float {
animation: 4s octfloat infinite;
}
@keyframes octfloat {
0% {
margin-top: 0;
}
50% {
margin-top: 15rpx;
}
100% {
margin-top: 0;
}
}
page {
background: #FFFFFF;
}
</style>
<style lang="scss" scoped>
// 背景
.crystal{
background: $mian-color-deep;
min-height: 100vh;
padding-top: var(--status-bar-height);
box-sizing: border-box;
background-image: url(@/static/background/crystal-background.png);
background-size: 100%;
background-position: top center;
background-repeat: no-repeat;
}
// 底部内容
.content{
margin-top: $margin * 2;
padding: $padding;
background: white;
border-radius: $radius $radius 0 0;
// 标题
.content-title{
padding: 0 $padding / 2;
// 弹出层
.signBack {
width: 100%;
height: 100%;
position: fixed;
background-color: rgba(0,0,0,.7);
z-index: 98;
left: 0;
top: 0;
animation: cssAnimation 0s ease-in 4s forwards;
}
.signPop {
width: 60%;
position: fixed;
z-index: 99;
left: 20%;
top: 30%;
height: 160px;
animation: cssAnimation 0s ease-in 4s forwards;
.signPop-tips,
.signPop-cont{
position: absolute;
left: 0;
top: 0;
width: 100%;
}
.signPop-cont {
color: #FFFFFF;
text-align: center;
padding-top: 90px;
.signPop-cont-name {
font-size: 34rpx;
margin-bottom: 10rpx;
}
.signPop-cont-text {
text-align: center;
.signPop-cont-number {
display: inline-block;
color: #ffee4d;
font-size: 38rpx;
color: #f9dc4a;
font-weight: 600;
margin-left: 10rpx;
}
}
}
}
@keyframes cssAnimation {
to {
width: 0;
height: 0;
visibility: hidden;
}
}
// 签到
.signCont {
background: #7c52fc;
color: #FFFFFF;
padding-bottom: 80rpx;
.content-title {
font-size: 40rpx;
padding: 50rpx 45rpx;
box-sizing: border-box;
color: $text-color;
position: relative;
.content-title-text {
font-weight: bold;
font-size: $title-size + 4;
width: calc(100% - 160rpx);
margin-bottom: $margin;
.tips {
font-weight: normal;
font-size: $title-size-sm;
margin-top: $margin - 10;
color: $uni-text-color;
display: flex;
.content-title-img {
width: 32rpx;
height: 32rpx;
margin: 12rpx 20rpx;
}
}
.sign {
margin: 0 0 30rpx;
padding: 0 30rpx;
box-sizing: border-box;
.sign-list {
width: calc(14.28% - 20rpx);
position: relative;
margin: 0 10rpx;
display: inline-block;
text-align: center;
background-color: rgba(0,0,0,.3);
border-radius: 10rpx;
padding: 20rpx 0;
box-sizing: border-box;
.sign-tips {
position: absolute;
top: -20rpx;
left: calc(50% - 30rpx);
background-color: #ef4034;
font-size: 24rpx;
color: #FFFFFF;
height: 32rpx;
line-height: 30rpx;
width: 60rpx;
text-align: center;
border-radius: 6rpx;
.sign-tips-text {
transform: scale(0.85);
}
&::after {
position: absolute;
content: '';
left: calc(50% - 8rpx);
bottom: -6rpx;
width: 0;
height: 0;
border-left: 8rpx solid transparent;
border-right: 8rpx solid transparent;
border-top: 8rpx solid #ef4034;
}
}
.sign-list-img {
width: 38rpx;
height: 38rpx;
margin-bottom: 5rpx;
}
.sign-list-day {
font-size: 24rpx;
}
&.active {
background-color: #ffdb00;
color: #413e30;
box-shadow: 0 0 20rpx rgba(76,43,177,.3);
}
}
.content-titl-btn {
}
.sign-record {
opacity: .8;
padding: 0 40rpx;
display: flex;
line-height: 44rpx;
}
}
// 签到按钮
.signBtn {
padding: 0 40rpx;
box-sizing: border-box;
width: 100%;
text-align: center;
margin-top: -50rpx;
.signBtn-go {
width: 100%;
height: 100rpx;
line-height: 100rpx;
border-radius: 80rpx;
background-color: #f9dc4a;
color: #333333;
font-size: 32rpx;
font-weight: 600;
.signBtn-go-icon {
width: 36rpx;
height: 36rpx;
vertical-align: -6rpx;
}
}
}
// 水晶任务
.task{
padding: 60rpx 30rpx;
box-sizing: border-box;
.task-liest {
font-weight: bold;
font-size: 34rpx;
margin-bottom: 20rpx;
}
.task-item {
position: relative;
border-bottom: solid 2rpx #F5F5F5;
padding: 30rpx 200rpx 40rpx 90rpx;
&:last-child {
border: none;
}
.task-icon {
position: absolute;
top: 50rpx;
left: 0;
width: 58rpx;
height: 58rpx
}
.task-title {
font-size: 32rpx;
color: #333;
line-height: 50rpx;
margin-bottom: 10rpx;
}
.task-subtitle {
color: #999;
font-size: 26rpx;
line-height: 30rpx;
text{
font-size: $title-size-sm - 6;
margin-left: $margin/2;
}
}
.task-label {
position: absolute;
right: 0;
top: $margin;
background-image: linear-gradient(to left, $mian-color-deep, $mian-color);
color: $uni-text-color-inverse;
font-size: $title-size-sm;
line-height: 60rpx;
line-height: 60rpx;
border-radius: $radius * 2;
width: 160rpx;
text-align: center;
top: 38rpx;
line-height: 80rpx;
font-size: 26rpx;
color: #333;
display: -webkit-box;
display: -webkit-flex;
display: flex;
&.active {
color: $text-gray-m;
}
.task-label-icon {
width: 34rpx;
height: 34rpx;
margin: 24rpx 0 0 20rpx;
}
}
}
// 签到
.sign{
padding-top: $padding;
padding-bottom: $padding * 2;
.sign-list{
display: flex;
justify-content: space-around;
.item{
text-align: center;
.item-icon{
display: inline-block;
background-image: linear-gradient(to left, $mian-color-deep, $mian-color);
color: white;
width: 54rpx;
height: 54rpx;
line-height: 50rpx;
border-radius: 50%;
border:solid 2rpx $mian-color;
box-sizing: border-box;
&.item-done {
background-image: linear-gradient(to left, #999, #999);
border-color: #999;
}
image {
width: 34rpx;
height: 34rpx;
margin-top: 8rpx;
}
&.active {
background-image: linear-gradient(to left, #ee1d23, #ef8c85);
border-color: #fd6165;
}
text {
font-size: $title-size-sm;
transform: scale(.8);
display: block;
}
}
.item-title{
color: $text-gray;
padding-top: $padding / 2;
font-size: $title-size-sm - 2;
}
}
}
.sign-text{
padding: $padding ($padding / 2) 0;
color: $mian-color-deep;
font-size: $title-size-m;
}
}
// 水晶任务
.task{
padding: 0 ($padding / 2) $padding * 2;
.task-item{
position: relative;
margin: 0 ($margin / 2);
border-bottom: solid 1rpx $border-color;
padding: $padding 200rpx $padding 90rpx;
&:last-child{
border-bottom: none;
}
.task-icon{
position: absolute;
top: $padding + 8;
left: 0;
width: 70rpx;
height: 70rpx;
// background: $border-color-lg;
}
.task-title{
font-size: $title-size;
color: $text-color;
line-height: 50rpx;
}
.task-subtitle{
color: $text-gray;
font-size: $uni-font-size-sm;
line-height: 30rpx;
}
.task-label{
position: absolute;
right: 0;
top: $padding;
line-height: 80rpx;
font-size: $uni-font-size-sm;
color: $text-color;
display: flex;
.task-label-icon {
width: $uni-img-size-sm - 6;
height: $uni-img-size-sm - 6;
margin: $margin + 4 0 0 $margin - 10;
}
}
}
}
}
// 数据统计
.total {
position: relative;
margin: $margin ($margin + $margin/2);
background: rgba($color: $mian-color-deep, $alpha: .6);
padding: 0;
display: flex;
border-radius: $radius;
.item {
width: 50%;
padding: 0 $padding;
text-align: center;
color: white;
font-size: $title-size-m;
line-height: 90rpx;
image{
width: 38rpx;
height: 38rpx;
vertical-align: top;
margin-top: calc((90rpx - 38rpx) / 2);
margin-right: $margin / 2;
}
}
&::before {
position: absolute;
top: 0;
bottom: 0;
content: "";
width: 2rpx;
left: 50%;
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .7), transparent);
}
}
// 矿石
.ore {
position: relative;
&>image {
width: 100%;
}
.ore-lists {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
.oct-float-item{
position: absolute;
text-align: center;
.text {
margin-top: $margin / 2;
color: white;
font-size: $title-size-sm;
line-height: 40rpx;
text-shadow: 0 3rpx 3rpx rgba($color: #000000, $alpha: .2);
}
.icon {
width: 58rpx;
vertical-align: top;
}
}
.ore-item-nav{
@extend .oct-float-item;
right: $margin * 3;
top: 12%;
}
.ore-item {
@extend .oct-float-item;
&:nth-child(1) { top: 16%; left: 13%; }
&:nth-child(2) { top: 50%; right: 10%; }
&:nth-child(3) { top: 23%; right: 20%; }
&:nth-child(4) { top: 70%; left: 33%;}
&:nth-child(5) { top: 40%; left: 20%; }
&:nth-child(6) { top: 58%; left: 10%;}
&:nth-child(7) { top: 10%; right: 43%;}
&:nth-child(8) { top: 46%; right: 29%;}
}
}
}
// 任务
.task-block {
white-space: nowrap;
.item {
background: rgba($color: $mian-color, $alpha: .2);
display: inline-block;
margin-left: $margin;
width: 210rpx;
padding: $padding * 2 $padding;
border-radius: $radius;
box-sizing: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .06);
text-align: center;
&:first-child {
margin-left: $margin + $margin/2;
}
&:last-child {
margin-right: $margin + $margin/2;
}
.icon {
display: inline-block;
margin: $margin 0;
width: 98rpx;
height: 98rpx;
line-height: 98rpx;
background: $mian-color-deep;
border-radius: 50%;
text-align: center;
image {
width: 56rpx;
height: 56rpx;
vertical-align: middle;
}
}
.text {
font-size: $title-size-m;
color: $mian-color;
}
.title {
font-size: $title-size;
color: white;
font-weight: bold;
}
}
}
}
}
</style>

View File

@@ -72,16 +72,16 @@
</view>
<!-- 商品详情介绍 -->
<view class="form-block">
<view class="form-box picker-flex">
<!-- <view class="form-box picker-flex">
<label class="form-label">支持易货</label>
<view class="picker-switch">
<switch :checked="isChange" color="#e93340" @change="pickerChange($event, 'isChange')"/>
</view>
</view>
<view class="form-box inputs-flex" v-if="isChange">
</view> -->
<!-- <view class="form-box inputs-flex" v-if="isChange">
<label class="form-label">最低易货量</label>
<input type="number" v-model="skus_number" placeholder="输入最低易货量"/>
</view>
</view> -->
<view class="form-box inputs-flex">
<label class="form-label">发行权证数</label>
<input type="number" v-model="skus_stock" placeholder="输入商品发行权证数"/>
@@ -107,7 +107,7 @@
<view class="form-box picker-flex">
<label class="form-label">允许售后</label>
<view class="picker-switch">
<switch :checked="isPostSale" color="#e93340" @change="pickerChange($event, 'isPostSale')"/>
<switch :checked="isPostSale" color="#8b64fd" @change="pickerChange($event, 'isPostSale')"/>
</view>
</view>
<view class="form-box picker-flex">
@@ -355,7 +355,14 @@
submitAdd(){
let pictures = this.pictures.map(val => {return val.path}),
content = this.content.map(val => {return val.path})
if(this.pictures.length <= 0) {
uni.showToast({
title: '商品轮播图不能为空',
icon : 'none'
})
return
}
let submitData = {
name : this.name,
cover : this.pictures[0].path,
@@ -398,13 +405,14 @@
content : this.$Route.query.type === 'edit' ? '商品权证已更新,是否立即补充产品附加信息认证?' : '商品权证已发布,是否立即补充产品附加信息认证?',
cancelText : '稍后认证',
confirmText : '立即认证',
success : res => {
if(res.cancel){
success : authRes => {
if(authRes.cancel){
this.$Router.back(this.$Route.query.type === 'edit' ? 1 : 2)
}
if(res.confirm){
if(authRes.confirm){
let goodsId = this.$Route.query.type === 'edit' ? this.$Route.query.id : res
this.$Router.push({name: 'goodsAuth', params: { id: goodsId , type: 'goodsAdd', edit: this.$Route.query.type === 'edit'}})
console.log(goodsId)
this.$Router.push({name: 'goodsAddAuth', params: { id: goodsId , type: 'goodsAdd', edit: this.$Route.query.type === 'edit'}})
}
}
})

View File

@@ -26,15 +26,19 @@
},
created() {
managesCategory().then(res => {
console.log(res)
this.loding = false
this.category = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods:{
// 选择分类
onCategory(cid){
this.$Router.push({name: 'GoodsMagAdd', params: {cid, id: this.category[this.stairIndex].category_id}})
this.$Router.push({name: 'goodsAdd', params: {cid, id: this.category[this.stairIndex].category_id}})
}
}
}

View File

@@ -77,6 +77,7 @@
};
},
created() {
console.log(this.$Route.query)
if(this.$Route.query.edit == 'true'){
managesGoodsExtends(this.$Route.query.id).then(res => {
this.productedAt = res.producted_at

View File

@@ -47,6 +47,10 @@
<view class="btn" @click="additionalOrBurning">确认</view>
</view>
</uni-popup>
<view class="basisc-btn">
<button class="btn" type="default" @click="$Router.push({name: 'goodsaddClassify'})">添加商品权证</button>
</view>
</view>
</template>
@@ -83,7 +87,6 @@
managesGoodsIndex({
status: this.status
}).then(res => {
console.log(res)
this.goods = res.data
this.pages = res.page
})
@@ -171,14 +174,44 @@
}
},
onNavigationBarButtonTap() {
this.$Router.push({name: 'addClassify'})
// this.$Router.push({name: 'addClassify'})
}
}
</script>
<style lang="scss" scoped>
.basics-content{
padding-bottom: ($padding*3) + 90;
}
// 按钮组
.basisc-btn{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.btn {
background: $mian-color;
color: white;
border-radius: 0;
font-size: $title-size-lg;
line-height: 88rpx;
height: 88rpx;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
}
.content{
padding-top: 90rpx;
padding-bottom: ($padding*3) + 90;
}
// tabs
.tabs{

View File

@@ -1,173 +0,0 @@
<template>
<view>
<view class="deal-back"></view>
<!-- 区块信息 -->
<view class="block-shadow chian-hash">
<view class="title">区块HASH</view>
<view class="hash">{{info.hash || '-'}}</view>
<view class="button" @click="copyHash">复制</view>
<view class="chian-info">
<view class="item-flex">
<view class="label webkit-box">交易数据</view>
<view class="ellipsis">
{{ info.tx_count || '-' }}
</view>
</view>
<view class="item-flex">
<view class="label webkit-box">区块高度</view>
<view class="ellipsis">
{{ info.height || '-' }}
</view>
</view>
<view class="item-flex">
<view class="label webkit-box">时间</view>
<view class="ellipsis">
{{ info.block_time || '-' }}
</view>
</view>
<view class="item-flex webkit-box">
<view class="label">上一块</view>
<view class="ellipsis">
{{ info.parent_hash || '-' }}
</view>
</view>
<view class="item-flex webkit-box">
<view class="label">区块难度</view>
<view class="ellipsis">
{{ info.difficulty || '-' }}
</view>
</view>
<view class="item-flex webkit-box">
<view class="label">默克尔跟</view>
<view class="ellipsis">
{{ info.tx_hash || '-' }}
</view>
</view>
<view class="item-flex">
<view class="label">状态哈希</view>
<view class="ellipsis">
{{ info.state_hash || '-' }}
</view>
</view>
</view>
</view>
<!-- 交易记录 -->
<view class="deals">
<view class="title">交易记录</view>
<deal-list :list="deal" />
</view>
</view>
</template>
<script>
import { hash } from '@/apis/interfaces/chain'
import dealList from '@/components/chain/deal'
export default {
components:{
dealList
},
data() {
return {
info: {},
deal: [],
}
},
onLoad(e){
// 交易详情
if(e.hash && e.hash != '') hash(e.hash).then(res=>{
this.info = res.head
this.deal = res.trades
}).catch(err => {
uni.showToast({
icon: 'none',
title: '错误 22 line in chain/deal'
})
})
else uni.showToast({
icon: 'none',
title: 'hash值不存在系统错误'
})
},
methods:{
copyHash(){
if(this.info.hash) uni.setClipboardData({
data: this.info.hash
})
}
}
}
</script>
<style lang="scss">
.block-shadow{
box-shadow: 0 0 2rpx 2rpx rgba($color: #000000, $alpha: .02);
}
// 背景
.deal-back {
position: fixed;
top: 0;
left: 0;
z-index: -1;
width: 100vw;
height: 100vh;
background: linear-gradient(to bottom, #009B69, #00562d);
}
// 区块详情
.chian-hash{
margin: $margin + ($margin/2);
background-color: white;
padding: ($padding * 3) ($padding * 2);
border-radius: $radius;
text-align: center;
.title{
font-size: $title-size + 8;
font-weight: bold;
color: $text-color;
}
.hash{
padding: $padding 0 ($padding*2) 0;
word-wrap: break-word;
color: $text-gray;
}
.button{
background-color: $red-color;
width: 50%;
display: inline-block;
height: 90rpx;
line-height: 90rpx;
color: white;
font-size: $title-size;
border-radius: 45rpx;
font-weight: bold;
}
.chian-info{
margin-top: $margin * 2;
background-color: $border-color-lg;
padding: $padding;
.item-flex{
padding-left: 220rpx;
text-align: right;
position: relative;
line-height: 70rpx;
min-height: 70rpx;
.label{
position: absolute;
left: 0;
width: 200rpx;
text-align: left;
color: $text-gray;
}
}
}
}
// 区块交易信息
.deals{
padding: $padding;
.title{
text-align: center;
font-weight: bold;
color: white;
font-size: $title-size;
}
}
</style>

View File

@@ -1,204 +1,256 @@
<template>
<view class="content">
<!-- 水晶获得公告 -->
<view class="notice" v-if="notice.length >= 1">
<swiper class="notice-swiper" :vertical="true" autoplay circular>
<swiper-item v-for="(item, index) in notice" :key="index">
<view class="notice-item">
<image class="notice-cover" :src="item.avatar" mode="aspectFill"></image>
<view class="notice-title ellipsis">{{item.nickname}} {{item.title}} {{item.amount}}</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- 账户余额 -->
<view class="info">
<view class="info-number">
<image class="number-background number-rotate" src="@/static/background/chain-back-01.png" />
<view class="info-content webkit-box">
<view class="text">{{isAuth ? '持有原石量': '恒量发行原石量'}}<uni-icons class="help-icon" @click="showHelp('occ')" type="help-filled" size="18" color="#fff" /></view>
<view class="number">{{occ}}</view>
<view class="login" @click="$Router.push({name: 'Login'})" v-if="!isAuth">立即登录</view>
<view class="login" @click="openWallet" v-else>我的钱包</view>
</view>
</view>
<view class="total">
<view class="item nowrap" @click="navAccount('walletProperty')"><image src="@/static/icons/gemstone-icon.png"/>{{isAuth ? '能量球' + account.coin : '查看能量球'}}</view>
<view class="item nowrap" @click="navAccount('Fragment')"><image src="@/static/icons/crystal-icon.png"/>{{isAuth ? '能量碎片' + account.crystal : '查看能量碎片'}}</view>
</view>
<!-- 公告信息 -->
<!-- <view class="increase">今日消费100元预计原石单价增长0.1%</view> -->
<!-- 矿机 -->
<view class="ore">
<image class="ore-back" src="@/static/background/chain-back-00.png" mode="widthFix"></image>
<view class="ball">
<view class="shadow"></view>
</view>
<block v-if="isAuth">
<view class="ore-lists">
<view class="oct-float ore-item" v-for="(item, index) in crystalArr" :key="index" :style="{left: item.left + '%', top: item.top + '%'}" @click="ledCrystal(index)">
<block v-if="item.amount !== null">
<view class="oct-icon">
<image src="@/static/icons/crystal-icon.png" mode="widthFix" class="icon" />
</view>
<view class="text">{{ item.amount || '-'}}</view>
</block>
</view>
<view class="oct-float ore-item-nav" @click="issueGoosd">
<view class="oct-icon">
<image src="@/static/icons/gemstone-ore-icon.png" mode="widthFix" class="icon" />
</view>
<view class="text">发权证<uni-icons type="arrowright" color="#FFFFFF" size="12"></uni-icons></view>
</view>
</view>
</block>
<block v-else>
<view class="ore-lists">
<view class="oct-float oct-login" @click="$Router.push({name: 'Login'})">
<view class="oct-icon">
<image src="@/static/icons/crystal-icon.png" mode="widthFix" class="icon" />
</view>
<view class="text">登录后领取</view>
</view>
</view>
</block>
</view>
<!-- 任务推荐 -->
<scroll-view class="task-block" scroll-x="true">
<view class="item" v-for="(item, index) in categoryArr" :key="index" @click="JumpUrl(item.url, item.title)">
<view class="text nowrap">{{item.sub_title}}</view>
<view class="icon">
<image :src="item.cover" />
</view>
<view class="title nowrap">{{item.title}}</view>
<view class="submit-title nowrap">能量碎片{{item.tips}}</view>
</view>
</scroll-view>
<!-- 平台概况 -->
<view class="situation">
<view class="header">
<view class="header-item">
<view class="title">平台原石余量<uni-icons class="help-icon" @click="showHelp('occBalance')" type="help-filled" size="18" color="#009b69" /></view>
<view class="number ellipsis">{{ occBalance }}</view>
<view class="title">平台能量球余量<uni-icons class="help-icon" @click="showHelp('balance')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.balance}}</view>
</view>
<view class="header-item">
<view class="title">昨日瓜分水晶<uni-icons class="help-icon" @click="showHelp('yesterdayCrystal')" type="help-filled" size="18" color="#009b69" /></view>
<view class="number ellipsis">{{ yesterdayCrystal }}</view>
<view class="title">上期发放能量球<uni-icons class="help-icon" @click="showHelp('stone')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.stone}}</view>
</view>
<view class="header-item">
<view class="title">区块链高度<uni-icons class="help-icon" @click="showHelp('blockHeight')" type="help-filled" size="18" color="#009b69" /></view>
<view class="number ellipsis">{{ blockHeight }}</view>
<view class="title">当前能量球价值<uni-icons class="help-icon" @click="showHelp('up')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.up}}</view>
</view>
<view class="header-item">
<view class="title">平台累计盈利额<uni-icons class="help-icon" @click="showHelp('gain')" type="help-filled" size="18" color="#009b69" /></view>
<view class="number ellipsis">{{ gain }}</view>
<view class="title">昨日瓜分能量碎片<uni-icons class="help-icon" @click="showHelp('score')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.score}}</view>
</view>
<view class="header-item">
<view class="title">已开通节点数<uni-icons class="help-icon" @click="showHelp('nodeNumber')" type="help-filled" size="18" color="#009b69" /></view>
<view class="number ellipsis">{{ nodeNumber }}</view>
<view class="title">区块链高度<uni-icons class="help-icon" @click="showHelp('height')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.height}}</view>
</view>
<view class="header-item">
<view class="title">已开通节点数<uni-icons class="help-icon" @click="showHelp('number')" type="help-filled" size="15" color="rgba(255,255,255,.3)" /></view>
<view class="number nowrap">{{chains.number}}</view>
</view>
</view>
<!-- 节点信息 -->
<view class="node-info">
<view class="node-item">
<view class="title">轻节点</view>
<view class="number ellipsis">{{occs.light || '-'}}</view>
</view>
<view class="node-item">
<view class="title">合作节点</view>
<view class="number ellipsis">{{occs.cooperation || '-'}}</view>
</view>
<view class="node-item">
<view class="title">主节点</view>
<view class="number ellipsis">{{occs.main || '-'}}</view>
</view>
<view class="node-item">
<view class="title">超级节点</view>
<view class="number ellipsis">{{occs.super || '-'}}</view>
</view>
<view class="node-item">
<view class="title">运营节点</view>
<view class="number ellipsis">{{occs.operating || '-'}}</view>
</view>
<view class="node-item">
<view class="title">技术节点</view>
<view class="number ellipsis">{{occs.technology || '-'}}</view>
</view>
</view>
<!-- 平台盈利额原石数量 -->
<!-- 平台累计盈利能量球 -->
<view class="chart">
<view class="title">平台累计营业额和原石价值走势图</view>
<view class="title">累计盈利和能量球价值走势图</view>
<view class="chart-f2">
<l-f2 ref="chartChange"></l-f2>
</view>
</view>
<!-- 提示信息 -->
<u-toast ref="uToast" />
</view>
</view>
</template>
<script>
import { occ } from '@/apis/interfaces/chain'
import { certified, security } from '@/apis/interfaces/index'
import { chain, crystals, thawlog } from '@/apis/interfaces/chain'
import F2 from '@/uni_modules/lime-f2/components/lime-f2/f2.min.js'
import lF2 from '@/uni_modules/lime-f2/components/lime-f2/'
export default {
components: {
components:{
lF2
},
data() {
return {
occs: {},
blockHeight: 0,
occBalance: 0,
occ: 0,
yesterdayCrystal: 0,
gain: 0,
nodeNumber: 0,
notice: [],
isAuth: false,
helpToast: {
occ: '恒量发行原石量',
occBalance: '平台原石量',
yesterdayCrystal: '昨日瓜分水晶',
blockHeight: '区块链高度',
gain: '平台累计盈利额',
nodeNumber: '已开通节点数'
isAuth : false,
chains : { // 区块链统计
balance : 0,
height : 0,
number : 0,
score : 0,
up : 0,
stone : 0
},
account : { // 账户
coin : 0,
crystal : 0
},
crystalArr : [], // 待领取
allIds : [], // 可领取ids
categoryArr : [], // 推荐列表
help : {}, // 帮助信息
userAuth : { // 用户认证状态
certification : false,
company : false,
vip : false
}
};
},
onShow() {
if(this.$store.state.token != '') this.isAuth = true
this.getOcc()
this.isAuth = this.$store.state.token != ''
this.getIndex()
},
methods:{
// 求助信息
showHelp(type) {
showHelp(key) {
uni.showModal({
title: '提示',
content: this.helpToast[type],
showCancel: false
title: '提示',
content: this.help[key],
showCancel: false,
confirmColor: '#8b64fd'
})
},
// 原石钱包
openWallet(){
Promise.all([certified(), security()]).then(res=> {
let certified = res[0],
security = res[1]
if(!certified){
uni.showModal({
title: '提示',
content: '您还为完成个人认证,无法激活您的钱包',
confirmText: '去认证',
confirmColor: '#009B69',
cancelColor: '#666666',
cancelText: '稍后再说',
success: res=> {
if(res.confirm) {
uni.navigateTo({
url: '/pages/certification/personal'
})
}
}
// 查看钱包账户
navAccount(pathName){
if(!this.isAuth){
this.$Router.push({name: 'Login'})
return
}
this.$Router.push({name: pathName})
},
// 发权证
issueGoosd(){
let typeAuth = '',
pathName = ''
if(this.userAuth.certification && this.userAuth.company && this.userAuth.vip){
this.$Router.push({name: 'goodsManagement'})
return
}
if(!this.userAuth.certification) {
typeAuth = '暂未完成个人认证,无法发布商品权证'
pathName = 'Personal'
}
if(!this.userAuth.company) {
typeAuth = '暂未开通平台会员节点,无法发布商品权证'
pathName = 'vipIndex'
}
if(!this.userAuth.vip) {
typeAuth = '企业未认证或企业认证审核中,无法发布商品权证'
pathName = 'User'
}
uni.showModal({
title: '提示',
content: typeAuth,
cancelColor: '#555',
cancelText: '稍后',
confirmText: pathName === 'vipIndex' ? '去开通': '去认证',
confirmColor: '#8b64fd',
success: res => {
if(res.confirm) {
this.$Router.push({name: pathName})
}
}
})
},
// 领取能量碎片
ledCrystal(index) {
// 播放音频
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = require('@/static/mp3/crystal.mp3');
// 请求接口
thawlog({
thaw_id: this.crystalArr[index].log_id,
all_ids: this.allIds
}).then(res => {
uni.showToast({
image: require('@/static/icons/crystal-icon.png'),
title: '+' + this.crystalArr[index].amount,
duration: 2000
})
this.$set(this.account, 'crystal', res.crystal)
this.ids = res.all_ids
if (JSON.stringify(res.last) === '[]') {
this.$set(this.crystalArr, index, {
amount: null
})
return
}
if(!security) {
uni.showModal({
title: '激活提示',
content: '您的钱包未激活,是否立即导出助记词并激活您的钱包?',
confirmText: '去激活',
confirmColor: '#009B69',
cancelColor: '#666666',
cancelText: '稍后再说',
success: res=> {
if(res.confirm) {
uni.navigateTo({
url: '/pages/wallet/add'
})
}
}
})
return
}
uni.navigateTo({
url: '/pages/wallet/property'
this.$set(this.crystalArr, index, res.last)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
},
// occ信息
getOcc(){
occ().then(res => {
this.occs = res.occs
this.yesterdayCrystal = res.yesterday_crystal
this.occ = res.occ
this.occBalance = res.occ_balance
this.blockHeight = res.block_height
this.gain = res.gain
this.nodeNumber = res.node_number
this.notice = res.notice
if(res.help_toast) this.helpToast = res.help_toast
this.showCartc(res.movements)
getIndex(){
Promise.all([crystals(), chain()]).then(res=>{
let crystalsData = res[0],
occData = res[1]
if(!crystalsData.needLogin){
this.account = {
coin : crystalsData.coin,
crystal : crystalsData.crystal
}
this.userAuth = {
certification : crystalsData.is_certification,
company : crystalsData.is_company,
vip : crystalsData.is_vip
}
this.crystalArr = crystalsData.crystal_array
this.allIds = crystalsData.all_ids
}
this.chains = occData.data
this.categoryArr = occData.tasks
this.help = occData.help
this.showCartc(occData.movement)
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 绘制图表
showCartc(data){
console.log(data)
// 图表信息
this.$refs.chartChange.init(config => {
config.appendPadding = [10, 15, 10, 15]
config.appendPadding = [10, 30, 10, 15]
const chart = new F2.Chart(config);
chart.source(data, {
date: {
@@ -207,34 +259,9 @@
mask: 'MM-DD'
},
value: {
tickCount: 5
tickCount: 0
}
});
chart.axis('time', {
line: null,
label: function label(text, index, total) {
const textCfg = {};
if (index === 0) {
textCfg.textAlign = 'left';
} else if (index === total - 1) {
textCfg.textAlign = 'right';
}
return textCfg;
}
});
chart.axis('tem', {
grid: function grid(text) {
if (text === '0%') {
return {
lineDash: null,
lineWidth: 1
};
}
}
});
chart.tooltip({
showCrosshairs: true
});
chart.legend({
position: 'bottom',
offsetY: 0,
@@ -242,243 +269,328 @@
});
chart.area()
.position('date*value')
.color('name', [ '#009b69', '#9f8052' ])
.color('name', [ '#5881d3', '#ca66e0' ])
.shape('smooth')
chart.line()
.position('date*value')
.color('name', [ '#009b69', '#9f8052' ])
.color('name', [ '#5881d3', '#ca66e0' ])
.shape('smooth', name=> {
if (name === '预期收益率') {
return 'line';
}
if (name === '实际收益率') {
return 'dash';
return 'line';
}
});
chart.render();
return chart;
})
}
},
// 能量跳转
JumpUrl(open, title) {
var type = open.openType;
switch(type){
case 'switchTab':
this.$Router.pushTab({name: open.path})
break;
case 'web':
window.location.href = open.path
break;
case 'navigateTo':
this.$Router.push({name: open.path})
break;
}
}
}
}
</script>
<style scoped>
/* 气泡漂浮 */
.number-float{
/* 星球旋转 */
.ball{
position: absolute;
height: 480rpx;
width: 480rpx;
top: 50%;
left: 50%;
margin-top: -240rpx;
margin-left: -240rpx;
border-radius: 50%;
-webkit-transform-style: preserve-3d;
background: url(/static/background/chain-back-02.png) repeat-x;
/* background-size: auto 100%; */
background-size: 1616rpx;
-webkit-animation: move-map 60s infinite linear;
-moz-animation: move-map 60s infinite linear;
-o-animation: move-map 60s infinite linear;
-ms-animation: move-map 60s infinite linear;
animation: move-map 60s infinite linear;
box-shadow: 0 0 50rpx 50rpx rgba(31,25,34, .2);
}
.shadow{
position: absolute;
top: 1%;
left: 5%;
width: 90%;
height: 90%;
border-radius: 50%;
filter: blur(5px);
z-index: 3;
background: radial-gradient(circle at 50% 0, rgba(255,255,255, .6) , rgba(255, 255, 255, .0) 58%);
}
.ball:before,
.ball::after{
position: absolute;
top: 0;
left: 0;
content: "";
width: 100%;
height: 100%;
border-radius: 50%;
filter: blur(5px);
z-index: 2;
}
.ball:before {
background: radial-gradient(circle at 100% 50%, #5881d3 , rgba(255, 255, 255, .0) 45%);
}
.ball::after {
background: radial-gradient(circle at 0 50%, #ca66e0 , rgba(255, 255, 255, .0) 45%);
}
@-webkit-keyframes move-map {
0% {background-position: -1616rpx 0; }
100% {background-position: 0 0;}
}
@-ms-keyframes move-map {
0% {background-position: -1616rpx 0; }
100% {background-position: 0 0;}
}
@keyframes move-map {
0% {background-position: -1616rpx 0; }
100% {background-position: 0 0;}
}
/* 水晶漂浮动画 */
.oct-float {
animation: 4s octfloat infinite;
}
@keyframes octfloat{
0%{
@keyframes octfloat {
0% {
margin-top: 0;
}
50%{
margin-top: 15rpx;
50% {
margin-top: 10rpx;
}
100%{
100% {
margin-top: 0;
}
}
/* 背景旋转 */
.number-rotate{
animation: 30s octrotate infinite linear;
}
@keyframes octrotate{
from{
transform:rotate(0deg);
}
to{
transform:rotate(360deg);
}
}
</style>
<style lang="scss">
// 背景
<style lang="scss" scoped>
.content{
background: $mian-color-deep;
min-height: 100vh;
padding-top: var(--status-bar-height);
box-sizing: border-box;
background-image: url(@/static/background/chain-back-00.png);
background-size: 100%;
background-position: top center;
background-repeat: no-repeat;
}
// 求助icon
.help-icon{
vertical-align: middle;
margin-bottom: 4px;
margin-left: $margin/2;
opacity: .7;
}
// 原石账户
.info{
margin-top: calc(#{$margin * 2} + 60rpx);
padding: var(--status-bar-height) $padding * 2 $padding * 3;
text-align: center;
.info-number{
position: relative;
display: inline-block;
width: 568rpx;
height: 568rpx;
.number-background{
width: 100%;
height: 100%;
}
.info-content{
position: absolute;
top: 12%;
left: 12%;
width: 76%;
height: 76%;
background-image: url(@/static/background/chain-back-02.png);
background-size: cover;
color: white;
.text{
font-size: $title-size-m;
text-shadow: 2rpx 2rpx 0 rgba($color: $mian-color-deep, $alpha: .5);
}
.number{
font-weight: bold;
font-size: $title-size + 8;
line-height: 70rpx;
text-shadow: 2rpx 2rpx 0 rgba($color: $mian-color-deep, $alpha: .5);
}
.login{
margin-top: $margin;
background-color: $mian-color;
display: inline-block;
padding: ( $padding / 2 ) $padding;
font-size: $title-size-m;
border-radius: 30rpx;
border:solid 1rpx $mian-color-deep;
}
}
}
}
// 预计增长
.increase{
margin: 0 ($margin + $margin / 2) ($margin * 2);
background: rgba($color: $mian-color, $alpha: .1);
text-align: center;
height: 80rpx;
line-height: 80rpx;
font-size: $title-size-m;
color: $mian-color;
border-radius: $radius-sm;
padding: 0 $padding;
}
// 公告信息
.notice{
position: fixed;
top: $margin * 2;
left: $margin + $margin / 2;
right: $margin + $margin / 2;
padding-top: var(--status-bar-height);
z-index: 99;
.notice-swiper{
height: 60rpx;
}
.notice-item{
position: relative;
height: 60rpx;
padding-left: 80rpx;
padding-right: $padding * 2;
display: inline-block;
background: rgba($color: $mian-color-deep, $alpha: .3);
border-radius: 30rpx;
box-sizing: border-box;
max-width: 100%;
.notice-cover{
position: absolute;
height: 60rpx;
width: 60rpx;
left: 0;
top: 0;
background-color: $mian-color-deep;
border-radius: 50%;
}
.notice-title{
line-height: 60rpx;
color: white;
font-size: $title-size-m;
}
}
min-height: calc(100vh - 60px);
background: #1f1922;
overflow: hidden;
}
// 平台概况
.situation{
margin: 0 ($margin + $margin / 2);
background-image: linear-gradient(to bottom, rgba($color: $mian-color, $alpha: .1), $mian-color-deep);
border-radius: $radius-sm;
padding: $padding;
margin: 0 $margin;
background-image: linear-gradient(to bottom, $block-color, #1f1922);
border-radius: $radius;
padding: $padding $padding/2 $padding*2;
// 平台统计
.header{
display: flex;
flex-wrap: wrap;
margin-bottom: $margin*2;
padding-bottom: $padding;
.number{
color: white;
font-size: $title-size + 4;
font-size: $title-size;
font-weight: bold;
line-height: 90rpx;
line-height: 70rpx;
}
.title{
color: $mian-color;
font-weight: bold;
color: rgba($color: white, $alpha: .4);
font-size: $title-size-sm;
line-height: 40rpx;
}
.header-item{
width: 50%;
padding: $padding $padding / 2;
padding: $padding / 2;
padding-bottom: $padding;
box-sizing: border-box;
&:first-child{
width: 100%;
.number{
font-size: $title-size + 10;
}
}
}
}
// 节点信息
.node-info{
display: flex;
flex-wrap: wrap;
margin: 0 -$margin / 2;
.node-item{
background: rgba($color: $mian-color, $alpha: .2);
width: calc(50% - #{$margin});
margin: $margin / 2;
padding: $padding;
box-sizing: border-box;
border-radius: $radius-sm;
}
.number{
font-size: $title-size + 4;
font-weight: bold;
color: white;
}
.title{
font-size: $title-size-m;
font-weight: bold;
color: rgba($color: white, $alpha: .7);
// &:first-child{
// width: 100%;
// .number{
// font-size: $title-size;
// }
// }
}
}
// 图表
.chart{
background: rgba($color: $mian-color, $alpha: .2);
padding: $padding;
border-radius: $radius-sm;
margin-top: $margin*2;
background: rgba($color: $block-color, $alpha: .8);
padding: $padding/2;
border-radius: $radius/2;
.title{
text-align: center;
line-height: 80rpx;
color: rgba($color: $mian-color, $alpha: 1.0);
font-size: $title-size-m;
color: rgba($color: #FFFFFF, $alpha: .4);
font-size: $title-size-sm;
}
.chart-f2{
height: 200px;
}
}
}
// 数据统计
.total {
position: relative;
margin: $margin;
background: #2b2449;
padding: 0;
display: flex;
border-radius: $radius;
.item {
width: 50%;
padding: 0 $padding;
text-align: center;
color: white;
font-size: $title-size-sm;
line-height: 76rpx;
image{
width: 38rpx;
height: 38rpx;
vertical-align: top;
margin-top: calc((76rpx - 38rpx) / 2);
margin-right: $margin / 2;
}
}
&::before {
position: absolute;
top: 0;
bottom: 0;
content: "";
width: 2rpx;
left: 50%;
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .7), transparent);
}
}
// 求助icon
.help-icon{
margin-left: $margin/3;
opacity: .7;
}
// 矿石
.ore {
position: relative;
padding-top: 120%;
&>image {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.ore-lists {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 1;
.oct-float-item{
position: absolute;
text-align: center;
.text {
color: white;
font-size: $title-size-sm - 4;
line-height: 40rpx;
text-shadow: 0 3rpx 3rpx rgba($color: #000000, $alpha: .2);
}
.oct-icon{
display: inline-block;
width: 58rpx;
height: 58rpx;
line-height: 58rpx;
background: radial-gradient(circle at 50% 50%, rgba(202, 102, 224, .0) 40%, #ca66e0);
border-radius: 50%;
box-shadow: 0 0 5rpx 5rpx rgba($color: #ca66e0, $alpha: .5);
.icon {
margin-top: 10rpx;
height: 38rpx;
width: 38rpx;
}
}
}
.ore-item-nav{
@extend .oct-float-item;
right: $margin;
top: 12%;
}
.ore-item {
@extend .oct-float-item;
}
.oct-login{
@extend .oct-float-item;
left: 42%;
top: 45%;
}
}
}
// 任务
.task-block {
white-space: nowrap;
margin-bottom: $margin;
.item {
background: $block-color;
display: inline-block;
margin-left: $margin;
width: 260rpx;
border-radius: $radius;
text-align: center;
padding: ($padding - 10) $padding/2;
&:first-child {
margin-left: $margin;
}
&:last-child {
margin-right: $margin;
}
.icon {
display: inline-block;
margin: ($margin/2) 0;
width: 98rpx;
height: 98rpx;
line-height: 98rpx;
background: #1f183d;
border-radius: 50%;
text-align: center;
image {
width: 56rpx;
height: 56rpx;
vertical-align: middle;
}
}
.text {
font-size: $title-size-sm;
color: rgba($color: white, $alpha: .4);
line-height: 40rpx;
}
.title {
font-size: $title-size-lg;
color: white;
font-weight: bold;
line-height: 50rpx;
}
.submit-title{
font-size: $title-size-sm - 4;
color: rgba($color: white, $alpha: .4);
line-height: 40rpx;
}
}
}
</style>

View File

@@ -1,209 +0,0 @@
<template>
<view>
<!-- 区块信息 -->
<view class="info-back"></view>
<view class="info-list">
<view class="flex" v-for="(item, index) in assetsList" :key="index">
<view class="item-name ellipsis">
<image class="icon" :src="item.icon" mode="widthFix" />
{{ item.name || '-' }}
</view>
<view class="item-label">
<view class="number ellipsis">{{ item.balance || '0.00' }}</view>
<view class="unit ellipsis">{{ item.symbol || '-' }}</view>
</view>
</view>
</view>
<!-- 区块链变化 -->
<view class="movements">
<view class="title">区块链变化</view>
<view class="chart">
<l-f2 ref="chartChange"></l-f2>
</view>
</view>
<!-- 区块记录 -->
<view class="chain-record">
<view class="title">区块记录</view>
<chain-list :list="chainList" @onChain="chainInfo"/>
</view>
<!-- 底部安全区 -->
<view class="ios-bottom"></view>
</view>
</template>
<script>
import { chain, situation } from '@/apis/interfaces/chain'
import chainList from '@/components/chain/chain'
import F2 from '@/uni_modules/lime-f2/components/lime-f2/f2.min.js'
import lF2 from '@/uni_modules/lime-f2/components/lime-f2/'
export default {
components: {
chainList,
lF2
},
data() {
return {
data: [{
time: '2021-08-08 00:00:00',
value: 30
}, {
time: '2021-08-09 00:10:00',
value: 36
}, {
time: '2021-08-10 00:12:00',
value: 38
}, {
time: '2021-08-11 10:32:00',
value: 40
}, {
time: '2021-08-13 12:30:00',
value: 40
}, {
time: '2021-08-14 11:02:00',
value: 41
}, {
time: '2021-08-15 10:02:00',
value: 41
}],
assetsList: [],
chainList: []
};
},
mounted() {
Promise.all([chain(), situation()]).then(res => {
this.chainList = res[0]
this.assetsList = res[1].assets
}).catch(err => {
uni.showToast({
icon: 'none',
title: 'err in chain/info.vue ' + err
})
})
this.$refs.chartChange.init(config => {
const chart = new F2.Chart(config);
chart.source(this.data, {
time: {
type: 'timeCat',
tickCount: 3,
range: [ 0, 1 ]
},
value: {
tickCount: 5,
min: 0
}
});
chart.axis('time', {
label: function label(text, index, total) {
const textCfg = {};
if (index === 0) {
textCfg.textAlign = 'left';
} else if (index === total - 1) {
textCfg.textAlign = 'right';
}
return textCfg;
}
});
chart.tooltip({
showCrosshairs: true
});
chart.area()
.position('time*value')
.color('l(90) 0:#009b69 1:#f7f7f7')
.shape('smooth');
chart.line()
.position('time*value')
.color('l(90) 0:#009b69 1:#f7f7f7')
.shape('smooth');
chart.render();
return chart;
})
},
methods: {
// 区块详情
chainInfo(e){
uni.navigateTo({
url: './deal?hash=' + e.hash
})
}
}
}
</script>
<style lang="scss">
// 背景
.info-back {
position: fixed;
top: 0;
left: 0;
z-index: -1;
width: 100vw;
height: 100vh;
background: linear-gradient(to bottom, #009B69, #00562d);
}
// 区块信息
.info-list {
padding: 0 $padding;
.flex {
margin: $margin * 2 $margin/2;
background-color: white;
border-radius: $radius;
padding: $padding * 2;
box-shadow: 0 0 2rpx 2rpx rgba($color: #000000, $alpha: .02);
display: flex;
justify-content: space-between;
.item-name {
width: 50%;
font-size: $title-size;
.icon {
width: 38rpx;
height: 38rpx;
vertical-align: middle;
margin-bottom: 5rpx;
margin-right: $margin;
}
}
.item-label {
width: 50%;
padding-left: $padding;
text-align: right;
.number {
font-weight: bold;
font-size: $title-size;
}
.unit {
font-size: $title-size-m;
}
}
}
}
// 区块链信息
.chain-record,
.movements {
padding: $padding;
.title {
font-weight: bold;
text-align: center;
color: white;
font-size: $title-size;
padding-bottom: $padding;
}
}
.movements {
.chart {
background-color: white;
margin: $margin/2;
height: 350rpx;
border-radius: $radius;
}
}
</style>

View File

@@ -1,163 +0,0 @@
<template>
<view class="kline">
<l-f2 ref="chart"></l-f2>
</view>
</template>
<script>
import F2 from '@/uni_modules/lime-f2/components/lime-f2/f2.min.js'
import lF2 from '@/uni_modules/lime-f2/components/lime-f2/'
export default {
components: {
lF2,
},
data() {
return {
}
},
async mounted() {
let data = await this.getData()
// 绘制K线
this.$refs.chart.init(config => {
data = data.slice(0, 150);
const BASIC_PRICE = 6.95;
data.sort(function(obj1, obj2) {
return obj1.time > obj2.time ? 1 : -1;
});
data.forEach(function(obj) {
obj.range = [obj.start, obj.end, obj.max, obj.min];
obj.trend = obj.start <= obj.end ? 0 : 1;
});
const chart = new F2.Chart(Object.assign(config));
chart.source(data, {
range: {
tickCount: 5,
formatter: function formatter(val) {
return val.toFixed(2);
}
},
time: {
tickCount: 3
}
});
chart.tooltip({
showCrosshairs: true,
showXTip: true,
showYTip: true,
crosshairsType: 'xy',
custom: true,
yTip: function yTip(val) {
return {
text: val.toFixed(2),
fill: '#333',
fontSize: 10
};
},
xTip: {
fill: '#333',
fontSize: 10
},
xTipBackground: {
fill: '#EDF2FE'
},
yTipBackground: {
fill: '#EDF2FE'
},
crosshairsStyle: {
stroke: '#0F8DE8'
}
});
chart.axis('range', {
grid: {
stroke: '#ddd',
lineWidth: 1,
lineDash: null
},
label: {
fill: '#999'
}
});
chart.axis('time', {
label: function label(text, index, total) {
const textCfg = {
fill: '#999'
};
if (index === 0) {
textCfg.textAlign = 'left';
}
if (index === total - 1) {
textCfg.textAlign = 'right';
}
return textCfg;
},
grid: {
lineWidth: 1,
stroke: '#ddd'
}
});
chart.guide().line({
start: ['min', BASIC_PRICE],
end: ['max', BASIC_PRICE],
style: {
lineDash: [8],
stroke: '#F68300'
}
});
chart.guide().text({
position: ['min', BASIC_PRICE],
content: BASIC_PRICE,
style: {
fill: '#808080',
textAlign: 'start',
textBaseline: 'bottom',
fontSize: 10,
fontWeight: 'bold'
},
offsetX: 2
});
chart.guide().rect({
start: ['0%', '0%'],
end: ['100%', '100%'],
style: {
stroke: '#ddd',
lineWidth: 1,
fill: '#fff',
opacity: 1,
fillOpacity: 0
}
});
chart.schema()
.position('time*range')
.color('trend', function(trend) {
return ['#F4333C', '#1CA93D'][trend];
})
.shape('candle');
chart.render();
return chart;
});
},
methods: {
getData() {
// plus.screen.lockOrientation('landscape-primary')
return new Promise((resolve) => {
uni.request({
url: 'https://gw.alipayobjects.com/os/antfincdn/c4ROEPcthk/candle-sticks.json',
success: (res) => {
resolve(res.data)
}
})
})
}
},
onUnload() {
console.log('222')
}
}
</script>
<style lang="scss">
.kline{
}
</style>

237
pages/instrument/Spread.vue Normal file
View File

@@ -0,0 +1,237 @@
<template>
<view class="content">
<view class="codeContent">
<view class="codeTop">
<image class="codeTop-cover" :src="companyInfo.cover" mode="aspectFill"></image>
<view class="codeTop-title">
<view class="codeTop-name">
{{companyInfo.name}}
</view>
<view class="codeTop-tips">
邀请你 加入链商星球
</view>
</view>
</view>
<view class="codeCode">
<image class="codeImg-code" :src="companyInfo.code" mode="aspectFill"></image>
<!-- 先默认死数据 -->
<!-- <image class="codeImg-code" src="/static/user/wallet-code.png" mode="aspectFill"></image> -->
<view class="codeImg-text">
长按二维码进行保存
</view>
</view>
</view>
<!-- <canvas class="codeImg" canvas-id="qrcodeCard"></canvas> -->
</view>
</template>
<script>
import { companiesCode } from '@/apis/interfaces/store'
export default {
data() {
return {
companyInfo : ''
}
},
created() {
companiesCode().then(res=>{
console.log(res.code)
this.companyInfo = res
})
},
methods: {
// 绘制图片
shareCanvas(e){
uni.showLoading({
title: '加载中',
})
// 下载头像
let avatarImg = new Promise(success=>{
uni.getImageInfo({
src : this.companyInfo.cover,
success : res => {
success(res.path)
}
})
})
// 下载二维码
let codeImg = new Promise(success => {
uni.getImageInfo({
src : this.companyInfo.code,
success : res => {
success(res.path)
}
})
})
Promise.all([avatarImg, codeImg]).then(res => {
// 绘制海报
const ctx = uni.createCanvasContext('qrcodeCard')
ctx.save()
// 绘制背景图片
ctx.drawImage('../../static/icons/store_downBack', 0, 0, 375, 603)
// 绘制头像
ctx.drawImage(res[0], 0, 0, 60, 60)
// 绘制二维码
ctx.drawImage(res[1], 140, 250, 110, 110)
// 文字
ctx.setFontSize(16)
ctx.fillText(this.companyInfo.name, 194, 180 , 270)
ctx.setFontSize(16)
ctx.fillText('邀请你加入易货平台', 194, 180 , 270)
ctx.save();
ctx.beginPath(); //开始绘制
ctx.arc(50 / 2 + 170, 50 / 2 + 110, 50 / 2, 0, Math.PI * 2, false);
ctx.clip();
// 保存图片
ctx.draw(true, () => {
uni.hideLoading()
uni.canvasToTempFilePath({
canvasId: 'qrcodeCard',
x: 0,
y: 0,
success: res => {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success : res=>{
if (res.errMsg == "saveImageToPhotosAlbum:ok"){
uni.showToast({
title: '分享海报已保存至相册',
icon : 'none'
})
}else{
uni.hideLoading()
}
},
fail : err=>{
if (err.errMsg == "saveImageToPhotosAlbum:fail auth deny"){
uni.showModal({
title : '提示',
content : '暂未授权小程序写入您的相册,无法存储二维码海报',
confirmColor: '#d82526',
confirmText : '去设置',
success : res=>{
if (res.confirm){
uni.openSetting()
}
}
})
}
}
})
}
})
})
}).catch(err=>{
uni.showToast({
title: '海报下载,请检查网络',
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background: #7c52fc;
height: 100vh;
width: 100vw;
}
.codeContent {
position: relative;
left: 0;
right: 0;
top: 0;
.codeTop {
position: absolute;
left: 5%;
top: 240rpx;
width: 90%;
background-color: #FFFFFF;
border-radius: 30rpx;
padding: 0 50rpx;
box-sizing: border-box;
box-shadow: 0 0 40rpx rgba(94,59,201,.5);
z-index: 2;
display: flex;
height: 200rpx;
.codeTop-cover {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
margin: 40rpx 30rpx 0 0;
border: 4rpx solid #FFFFFF;
box-shadow: 0 5rpx 10rpx rgba(94,59,201,.3);
}
.codeTop-title {
padding-top: 50rpx;
.codeTop-name {
font-weight: 600;
font-size: 36rpx;
margin-bottom: 10rpx;
}
.codeTop-tips {
color: $text-gray-m;
}
}
}
.codeCode {
background-color: #FFFFFF;
box-shadow: 0 0 40rpx rgba(27, 0, 111,.4);
position: absolute;
padding: 400rpx 0 200rpx;
left: 10%;
top: 160rpx;
width: 80%;
border-radius: 30rpx;
z-index: 1;
text-align: center;
.codeImg-code {
width: 360rpx;
height: 360rpx;
margin: 0 0 20rpx;
border: 2px solid #f3f3f3;
padding: 30rpx;
box-sizing: border-box;
}
.codeImg-text {
font-size: 32rpx;
color: $text-color;
}
}
}
.codeBnt {
background-color: #7c52fc;
text-align: center;
border-radius: 10rpx;
line-height: 90rpx;
font-weight: 600;
font-size: $title-size;
color: #FFFFFF;
box-shadow: 2px 0 5px rgb(124, 82, 252);
position: relative;
}
/* canvas */
.codeImg {
position: absolute;
left: -1000%;
height: 603px;
width: 375px;
background: white;
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<view class="ios-bottom">
<view class="basics-content">
<view class="info">
<view class="item info-logo" @click="updImg('logo', '')">
<label>企业LOGO</label>
@@ -8,7 +8,7 @@
</view>
<view class="item info-text">
<label>企业简介</label>
<textarea v-model="description" placeholder="输入企业简介" />
<textarea v-model="description" maxlength="-1" placeholder="输入企业简介" />
</view>
<view class="item info-text">
<label>企业地址</label>
@@ -22,7 +22,7 @@
<view class="remove-btn" @click="removeModule(moduleIndex)">删除</view>
</view>
<view class="module-textarea">
<textarea placeholder="输入文字内容" v-model="module.content.content" />
<textarea placeholder="输入文字内容" maxlength="-1" v-model="module.content.content" />
</view>
</view>
<view class="module-item" v-if="module.type === 2">
@@ -95,8 +95,9 @@
<view class="module-hint">点击查看封面/视频长按删除封面/视频</view>
</view>
</block>
<view class="add-modules" @click="addModule">
<uni-icons class="icon" type="plus" size="18" color="#c82626"/> 添加展示模块
<view class="basisc-btn">
<view class="add-modules" @click="addModule">添加模块</view>
<button class="btn" type="default" @click="onBasicsInfo">保存</button>
</view>
</view>
</template>
@@ -116,8 +117,6 @@
},
created() {
Promise.all([basicsInfo('GET', {}), basicsConfig()]).then(res => {
console.log(res)
let info = res[0]
this.logo = info.base.cover
this.description = info.base.description
@@ -306,7 +305,7 @@
},
// 保存基础信息
onNavigationBarButtonTap(e){
onBasicsInfo(){
basicsInfo('PUT', {
cover : this.logo,
description : this.description,
@@ -317,6 +316,7 @@
title : '提示',
content : '基本信息已保存',
showCancel : false,
confirmColor: '#8b64fd',
success : modalRes=> {
if(modalRes.confirm){
this.$Router.back()
@@ -335,6 +335,9 @@
</script>
<style lang="scss" scoped>
.basics-content{
padding-bottom: ($padding*3) + 90;
}
// 基础信息
.info{
background: white;
@@ -396,23 +399,55 @@
}
}
}
// 模块
.add-modules{
line-height: 90rpx;
text-align: center;
color: $text-price;
// 按钮组
.basisc-btn{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
margin-top: $margin;
.icon{
vertical-align: middle;
margin-right: $margin/3;
margin-top: $margin - 10;
display: flex;
justify-content: space-between;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.add-modules{
line-height: 86rpx;
height: 88rpx;
text-align: center;
color: $text-price;
background: white;
width: calc(50% - 15rpx);
margin-right: 30rpx;
border:solid 1rpx $mian-color;
box-sizing: border-box;
font-size: $title-size-lg;
.icon{
margin-right: $margin/3;
}
}
.btn {
background: $mian-color;
color: white;
border-radius: 0;
font-size: $title-size-lg;
line-height: 88rpx;
height: 88rpx;
width: calc(50% - 15rpx);
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
}
// 展示模块
.module-item{
background: white;
padding: $padding/2 $padding;
margin-top: $margin;
margin-top: $margin - 10;
.module-title{
display: flex;
justify-content: space-between;
@@ -435,8 +470,11 @@
width: 100%;
font-size: $title-size;
line-height: 50rpx;
height: 200rpx;
box-sizing: border-box;
textarea{
width: 100%;
height: 200rpx;
}
}
.module-imgs{
display: flex;

59
pages/login/agreement.vue Normal file
View File

@@ -0,0 +1,59 @@
<template>
<view class="clauseCont" v-if="loaded">
<u-parse :html="clauseData"></u-parse>
</view>
</template>
<script>
import {
secretService
} from '@/apis/interfaces/auth'
export default {
data() {
return {
clauseData: '' ,//服务条款,
loaded:false
};
},
onLoad(e) {
if(e.name === 'service'){
uni.setNavigationBarTitle({
title:'用户服务协议'
})
}else{
uni.setNavigationBarTitle({
title:'用户隐私协议'
})
}
// 获取服务条款
this.clauseInfo(e.name)
},
methods: {
// 服务条款
clauseInfo(name) {
secretService(name).then(res => {
this.clauseData = res.content.replace(/\<img/gi,
'<img style="max-width:100%; height:auto; vertical-align: top;"')
this.loaded = true
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
}
}
</script>
<style lang="scss">
page {
background-color: $uni-bg-color;
}
.clauseCont {
padding: $padding ;
width: 100%;
box-sizing: border-box;
}
</style>

120
pages/login/guide.vue Normal file
View File

@@ -0,0 +1,120 @@
<template>
<view class="content">
<view class="login-top">
<view class="top-logo-content">
<image class="top-logo" fit="contain" src="/static/imgs/top_logo.png" />
链商星球(中国)
</view>
<image class="top-bg" fit="contain" mode="widthFix" src="/static/imgs/top_bg.png" />
</view>
<button class="btn" type="default" @click="login">登录/注册</button>
<view class="bottom">
<view>企业链</view>
<view class="bottom-2">从星煌开始</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
login(){
this.$Router.push({
name:'Login'
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
width: 100vw;
padding: $padding * 3;
box-sizing: border-box;
background: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
.login-top {
height: 46vh;
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
box-sizing: border-box;
position: relative;
padding-bottom: 160rpx;
.top-bg {
position: absolute;
bottom: 30rpx;
z-index: 2;
width: 740rpx;
margin-left: 40rpx;
}
.top-logo-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #7f56a4;
font-size: $title-size +2;
.top-logo {
margin-bottom: 20rpx;
width: 200rpx;
height: 200rpx;
}
}
}
.btn {
background-image: linear-gradient(to bottom,#bf52eb,#8f32dd);
color: white;
border-radius: 0;
margin-top: $margin;
font-size: $title-size + 6;
line-height: 90rpx;
height: 90rpx;
// font-weight: bold;
width: 500rpx;
border-radius: 10rpx;
margin: 50rpx 0;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
.bottom{
height: 30vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #542083;
font-size: 54rpx;
.bottom-2{
font-size: 38rpx;
margin-top: 20rpx;
}
}
}
</style>

View File

@@ -1,35 +1,43 @@
<template>
<view class="content">
<!-- <view class="title">易品新境</view> -->
<view class="login-top">
<view class="top-logo-content">
<image class="top-logo" fit="contain" src="/static/imgs/top_logo.png" />
链商星球(中国)
</view>
<image class="top-bg" fit="contain" src="/static/imgs/top_bg.png" />
<image class="top-bg" fit="contain" mode="widthFix" src="/static/imgs/top_bg.png" />
</view>
<!-- 输入手机号相关 -->
<view class="inputs phone">
<label class="label">+86</label>
<input type="number" placeholder="输入您的手机号码" v-model="phone" />
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="phone" />
</view>
<view class="inputs sms">
<input type="number" placeholder="输入短信验证码" v-model="code" />
<input type="number" placeholder="输入短信验证码" maxlength="4" v-model="code" />
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
</view>
<view class="inputs">
<input placeholder="邀请码" maxlength="10" v-model="parentId" />
</view>
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
<!-- 快捷登录 -->
<view class="quick">
<!-- <view class="quick">
<view class="quick-title">快捷登录</view>
<view class="quick-box">
<image class="quick-icon" src="@/static/icons/wechat.png" mode="widthFix"></image>
<image class="quick-icon" src="@/static/icons/wechat.png" mode="widthFix" @click="onShowToast"></image>
</view>
</view>
</view> -->
<!-- 用户登录注册协议 -->
<view class="agreement">未注册的手机号验证后将自动创建账号登录即表示同意接收<navigator url="">用户隐私规格</navigator><navigator url="">用户服务协议
</navigator>
<view class="agreement">
未注册的手机号验证后将自动创建账号登录即表示同意接收
<view @click="$Router.push({name: 'agreement', params: {name : 'secret'}})">用户隐私协议</view>
<view @click="$Router.push({name: 'agreement', params: {name : 'service'}})">用户服务协议</view>
</view>
<view class="beianNo">皖ICP备2021013714号-1</view>
<!-- https://beian.miit.gov.cn/ -->
</view>
</template>
@@ -41,27 +49,31 @@
export default {
data() {
return {
phone: "18245180131",
code: "",
smsTime: 60,
getSms: false
phone : "18245180131",
code : "",
parentId: "",
smsTime : 60,
getSms : false
}
},
onShow(){
this.parentId = this.$Route.query.invite || ''
},
methods: {
// 用户登录
login() {
smsAuth({
mobileNo: this.phone,
code: this.code
mobileNo : this.phone,
code : this.code,
parent_id : this.parentId
}).then(res => {
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if (!res.is_company) {
this.$Router.replace({
name: "Index"
})
return
if(this.$Route.toName){
this.$Router.back()
}else{
this.$Router.replace({name: 'Index'})
}
this.$Router.back()
}).catch(err => {
uni.showToast({
title: err.message,
@@ -94,6 +106,13 @@
icon: "none"
})
})
},
// 提示信息
onShowToast(){
uni.showToast({
title: '微信登录暂未开放,敬请期待',
icon : 'none'
})
}
}
}
@@ -108,7 +127,7 @@
background: white;
.login-top {
height: 36vh;
height: 26vh;
width: 100%;
display: flex;
flex-direction: row;
@@ -117,16 +136,12 @@
box-sizing: border-box;
position: relative;
padding-bottom: 160rpx;
.top-bg {
position: absolute;
bottom: 30rpx;
// left: 2rpx;
z-index: 2;
width: 740rpx;
margin-left: 40rpx;
}
.top-logo-content {
display: flex;
flex-direction: column;
@@ -134,12 +149,11 @@
justify-content: center;
box-sizing: border-box;
color: #7f56a4;
font-size: 18px;
font-size: $title-size;
.top-logo {
margin-bottom: 20rpx;
width: 240rpx;
height: 240rpx;
width: 146rpx;
height: 146rpx;
}
}
}
@@ -179,25 +193,22 @@
&.sms {
padding-right: 200rpx;
.sms-btn[size='mini'] {
width: 200rpx;
height: 80rpx;
line-height: 80rpx;
height: 77rpx;
line-height: 77rpx;
position: absolute;
top: 0;
right: 0;
top: 1rpx;
right: 1rpx;
padding: 0;
margin: 0;
border-radius: 0;
border-left: solid 1rpx $border-color;
color: $text-price;
font-size: $title-size-lg;
&::after {
border: none;
}
&[disabled] {
color: rgba($color: $text-price, $alpha: .6);
background: $border-color-lg;
@@ -215,7 +226,7 @@
}
.btn {
background: $mian-color;
background-image: linear-gradient(to bottom,#bf52eb,#8f32dd);
color: white;
border-radius: 0;
margin-top: $margin;
@@ -229,7 +240,7 @@
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
background: rgba($color: #8f32dd, $alpha: .6);
}
}
@@ -255,15 +266,20 @@
}
.agreement {
padding-top: $padding * 4;
padding-top: 12vh;
font-size: $title-size-sm;
color: $text-gray;
navigator {
view {
color: $text-price;
display: inline-block;
padding: 0 10rpx;
}
}
.beianNo{
font-size: $title-size-sm;
color: $text-gray-m;
text-align: center;
padding-top: $padding*2;
}
}
</style>

View File

@@ -1,9 +1,9 @@
<template>
<view class="News-detail" v-if="loaded">
<view class="item" v-for="(item,index) in items" v-if="items.length>0"
<view class="item" v-for="(item,index) in items" :key="index" v-if="items.length>0"
@click="item.read_at === ''?read(index,item):noread(item)">
<view class="top">
<image src="/static/images/news_2_1.png" mode="widthFix"></image>
<image src="/static/imgs/news_2_1.png" mode="widthFix" />
<!-- <image v-if="index===1" src="/static/img/news_1_1.png" mode="widthFix"></image>
<image v-if="index===2" src="/static/img/news_3_1.png" mode="widthFix"></image> -->
<view :style="item.read_at=== '' ?'flex:1;':'flex:1;color:#808080;'">{{item.title}}</view>

View File

@@ -1,7 +1,7 @@
<template>
<view class="News">
<view class="list" v-for="(item,index) in items" :key="index" v-if="items.length>0">
<navigator class="item" open-type="navigate" hover-class="none" :url="'/pages/news/detail?type='+item.type">
<view class="item" @click="$Router.push({name:'newsDetail',params:{type:item.type}})" >
<view class="left">
<image class="img" v-if='item.type ==="SystemNotification"' :src="item.icon?item.icon:'/static/imgs/news_1.png'" mode="aspectFill"></image>
<image class="img" v-if='item.type ==="OrderNotification"' :src="item.icon?item.icon:'/static/imgs/news_2.png'" mode="aspectFill"></image>
@@ -12,7 +12,7 @@
</view>
</view>
<view class="num" v-if="item.count>0">{{item.count}}</view>
</navigator>
</view>
</view>
<view class="no-news" v-else>
<image src="/static/img/no-news.png" mode="widthFix"></image>

View File

@@ -68,7 +68,7 @@
<view @click="loginOut" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/reset-info.png" mode="widthFix" />
<span>切换账户</span>
<span>退出登录</span>
</view>
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
@@ -89,7 +89,8 @@
wechatbind,
resetUserInfo,
getUserSettingInfo,
companyStatus
companyStatus,
companyIsallow
} from '@/apis/interfaces/setting'
import {
uploads
@@ -110,13 +111,7 @@
}
},
onShow() {
wx.login({
success: res => {
this.loginCode = res.code
}
})
this.getUserInfo()
},
onPullDownRefresh() {
this.getUserInfo()
@@ -124,7 +119,6 @@
methods: {
// 是否个人认证
certificationClick(certfication) {
console.log(certfication)
if (certfication.is_true) {
// 跳转到个人认证信息完成展示页面
// this.$refs.uToast.show({
@@ -139,23 +133,34 @@
})
} else {
// 跳转到个人认证信息页面
uni.navigateTo({
url: '/pages/certification/personal'
this.$Router.push({
name:'Personal'
})
}
},
// 是否展示企业信息 企业认证 -1.未认证0.审核中1.审核通过2.驳回
company(code) {
console.log(code, '是否企业认证')
if (code === -1) {
// 跳转到企业认证页面
uni.navigateTo({
url: '/pages/company/approve'
companyIsallow().then(res=>{
this.$Router.push({
name:'companyApprove'
})
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
} else if (code === 2) {
// 跳转到企业认证页面
uni.navigateTo({
url: '/pages/company/approve?form_type=put'
this.$Router.push({
name:'companyApprove',
params:{
form_type:'put'
}
})
} else if (code === 0) {
this.$refs.uToast.show({
@@ -189,7 +194,6 @@
})
// -1.未认证0.审核中1.审核通过2.驳回
companyStatus().then(res => {
console.log(res)
this.companyCode = res
}).catch(err => {
this.$refs.uToast.show({
@@ -277,10 +281,8 @@
},
loginOut() {
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/login/login'
})
this.$store.commit('setToken', '')
this.$Router.push({name: 'Index'})
},
// 上传头像
updImgs(type) {
@@ -319,7 +321,6 @@
value: value
}
resetUserInfo(data).then(res => {
console.log(res, 'res...')
uni.showToast({
title: res,
icon: 'none'

378
pages/shop/create.vue Normal file
View File

@@ -0,0 +1,378 @@
<template>
<view class="basics-content">
<view class="create-form">
<view class="header">
<view @click="updLogo">
<image class="logo" style="border: none;" v-if="cover.showpath" :src="cover.showpath" mode="aspectFill" />
<image class="logo" v-else src="@/static/icons/add-icon.png" mode="aspectFill" />
</view>
<view class="inputs">
<input type="text" v-model="name" placeholder="门店/部门名称" />
</view>
<view class="inputs">
<input type="number" v-model="mobile" placeholder="门店联系电话" />
</view>
</view>
<view class="info">
<view class="inputs">
<label class="inputs-label">开店时间</label>
<picker mode="time" @change="pickerTime" :value="startTime" data-key="startTime">
<view class="time-text">
{{startTime || '选择开店时间'}}
<uni-icons class="time-icon" type="arrowdown" size="18" color="#999"></uni-icons>
</view>
</picker>
</view>
<view class="inputs">
<label class="inputs-label">闭店时间</label>
<picker mode="time" @change="pickerTime" :value="endTime" data-key="endTime">
<view class="time-text">
{{endTime || '选择闭店时间'}}
<uni-icons class="time-icon" type="arrowdown" size="18" color="#999"></uni-icons>
</view>
</picker>
</view>
<view class="inputs addrss-input">
<label class="inputs-label">门店地址</label>
<textarea class="inputs-textarea" v-model="address" placeholder="输入门店地址" auto-height/>
<view class="addrss-icon" @click="onLocation">
<uni-icons type="location-filled" size="20" color="#8b64fd"></uni-icons>
</view>
</view>
</view>
<view class="info">
<view class="inputs">
<label class="inputs-label">门店简介</label>
<textarea class="inputs-textarea" v-model="description" placeholder="门店简介..." />
</view>
</view>
</view>
<view class="basisc-btn">
<button class="add-modules" type="default" @click="onDeleteShop" v-if="type === 'edit'">删除</button>
<button class="btn" :class="{'btn-100': type != 'edit'}" type="default" @click="createShop">{{type === 'add' ? '创建': '保存'}}</button>
</view>
</view>
</template>
<script>
import { create, putShop, deleteShop, editInfo } from '@/apis/interfaces/shop'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
type : 'add',
id : '',
cover : {
showpath: '',
path : '',
},
name : '',
mobile : '',
address : '',
startTime : '',
endTime : '',
description : '',
latitude : '',
longitude : ''
};
},
onLoad() {
if(this.$Route.query.id){
this.type = 'edit'
this.getInfo()
}
},
methods:{
// 获取编辑信息
getInfo(){
editInfo(this.$Route.query.id).then(res => {
this.id = res.store_id
this.cover = res.cover
this.name = res.name
this.mobile = res.mobile
this.address = res.address
this.startTime = res.start_time
this.endTime = res.end_time
this.description= res.description
this.latitude = res.latitude
this.longitude = res.longitude
})
},
// 获取地址
onLocation(){
uni.chooseLocation({
success: res => {
this.address = res.address
this.longitude = res.longitude
this.latitude = res.latitude
},
fail: err => {
uni.showToast({
title: err,
icon : 'none'
})
}
})
},
// 选择营业时间
pickerTime(e){
this[e.target.dataset.key] = e.detail.value
},
// 编辑创建
createShop(){
let data = {
cover : this.cover.path,
name : this.name,
mobile : this.mobile,
address : this.address,
latitude : this.latitude,
longitude : this.longitude,
description : this.description,
start_time : this.startTime,
end_time : this.endTime
}
if(this.type === 'edit'){
putShop(this.id, {...data}).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : modalRes => {
this.$Router.back()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
create({...data}).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : modalRes => {
this.$Router.back()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 删除门店
onDeleteShop(){
deleteShop(this.id).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : modalRes => {
this.$Router.back()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 上传logo
updLogo(){
uni.chooseImage({
crop: { width: 188, height: 188 },
success: path => {
uploads([{
name: 'logo',
uri : path.tempFilePaths[0]
}]).then(res => {
this.cover = {
showpath: res.url[0],
path: res.path[0]
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.basics-content{
padding-bottom: ($padding*3) + 90;
}
// 按钮组
.basisc-btn{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: $padding;
background: white;
margin-top: $margin - 10;
display: flex;
justify-content: space-between;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
.add-modules{
line-height: 86rpx;
height: 88rpx;
text-align: center;
color: $text-price;
background: white;
width: calc(50% - 15rpx);
margin-right: 30rpx;
border:solid 1rpx $mian-color;
box-sizing: border-box;
font-size: $title-size-lg;
.icon{
margin-right: $margin/3;
}
}
.btn {
background: $mian-color;
color: white;
border-radius: 8rpx;
font-size: $title-size-lg;
line-height: 88rpx;
height: 88rpx;
width: calc(50% - 15rpx);
&::after {
border: none;
}
&.btn-100{
width: 100%;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
}
}
// 门店信息
.create-form{
.header{
position: relative;
background: white;
padding-left: $padding + 150;
.logo{
width: 108rpx;
height: 108rpx;
border-radius: 50%;
position: absolute;
left: $padding;
top: 26rpx;
border: dashed 2rpx $border-color;
box-sizing: border-box;
}
.inputs{
position: relative;
padding-right: $padding;
input,
.time-text{
line-height: 80rpx;
height: 80rpx;
font-size: $title-size-lg;
}
&::after{
position: absolute;
left: 0;
bottom: 0;
right: 0;
content: " ";
height: 1rpx;
background: $border-color;
}
&:last-child::after{
display: none;
}
.time-text{
padding-right: 80rpx;
.time-icon{
position: absolute;
height: 80rpx;
line-height: 80rpx;
text-align: right;
width: 80rpx;
right: $padding;
top: 0;
}
}
}
}
.info{
@extend .header;
margin-top: $margin;
padding-left: 0;
background: white;
.inputs{
padding-left: $padding + 150;
.inputs-label{
position: absolute;
left: $padding;
top: 0;
font-size: $title-size-lg;
line-height: 80rpx;
height: 80rpx;
width: 150rpx;
}
.inputs-textarea{
width: 100%;
padding: 20rpx 0;
height: 160rpx;
font-size: $title-size-lg;
line-height: 40rpx;
}
&.addrss-input{
padding-right: $padding + 100;
.addrss-icon{
position: absolute;
height: 80rpx;
line-height: 80rpx;
text-align: right;
width: 80rpx;
right: $padding;
top: 0;
}
}
}
}
}
// 按钮组
.create-btns{
padding: $padding;
.item-btn{
border-radius: 0;
background: white;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
&::after{
border: none;
}
}
.btn-submit{
background: $text-price;
color: white;
font-weight: bold;
margin-bottom: $margin;
}
.btn-delete{
border: solid 1rpx $border-color;
color: $text-gray;
}
}
</style>

142
pages/shop/lists.vue Normal file
View File

@@ -0,0 +1,142 @@
<template>
<view class="lists">
<block v-if="lists.length > 0">
<view class="header-flex">
门店数量{{total}}
<view class="add-btn" @click="$Router.push({name: 'shopCreate'})">添加门店</view>
</view>
<view class="lists-item" v-for="(item, index) in lists" :key="index" @click="$Router.push({name: 'shopCreate', params: { id: item.store_id }})">
<view class="header">
<image class="logo" :src="item.cover" mode="aspectFill"></image>
<view class="title">{{item.name}}</view>
<view class="time"><text>营业时间{{item.start_time}} {{item.end_time}}</text></view>
<view class="icons">
<uni-icons type="arrowright" color="#999" size="18"></uni-icons>
</view>
</view>
<view class="address">店铺地址{{item.address}}</view>
</view>
</block>
<block v-else>
<view class="list-null">
<image class="icon" src="@/static/icons/approve-icon.png" mode="widthFix"></image>
<view class="sub-title">暂未创建店铺/部门</view>
<view class="sub-btn" @click="$Router.push({name: 'shopCreate'})">创建</view>
</view>
</block>
</view>
</template>
<script>
import { shops } from '@/apis/interfaces/shop'
export default {
data() {
return {
lists: [],
total: 0
};
},
onShow(){
shops().then(res => {
this.lists = res.data
this.total = res.page.total
})
}
}
</script>
<style lang="scss">
// 添加员工header
.header-flex{
background: white;
padding: ($padding/2) $padding;
display: flex;
justify-content: space-between;
margin-bottom: $margin - 10;
line-height: 60rpx;
color: $text-gray;
.add-btn{
background: $mian-color;
color: white;
width: 150rpx;
text-align: center;
font-size: $title-size-m;
}
}
// 空提示
.list-null{
width: 100vw;
height: 100vh;
padding-bottom: 20vh;
box-sizing: border-box;
background: white;
text-align: center;
@extend .vertical;
.sub-title{
color: $text-gray;
font-size: $title-size-m;
}
.icon{
width: 288rpx;
}
.sub-btn{
width: 200rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background: $mian-color;
color: white;
display: inline-block;
margin-top: $margin*2;
}
}
// 列表
.lists-item{
background: white;
margin: $margin;
border-radius: $radius/2;
padding: $padding;
.header{
position: relative;
padding-left: 128rpx;
padding-right: 100rpx;
min-height: 108rpx;
padding-bottom: $padding - 10;
.logo{
position: absolute;
top: 0;
left: 0;
width: 108rpx;
height: 108rpx;
border-radius: 50%;
}
.title{
line-height: 60rpx;
font-size: $title-size;
font-weight: bold;
}
.time{
line-height: 40rpx;
font-size: $title-size-sm;
text{
background-color: $border-color-lg;
color: $text-gray;
padding: 0 $padding/2;
}
}
.icons{
position: absolute;
right: 0;
top: 0;
line-height: 108rpx;
}
}
.address{
border-top: solid 1rpx $border-color;
padding-top: $padding - 10;
font-size: $title-size-m;
color: $text-gray;
left: 50rpx;
}
}
</style>

View File

@@ -1,34 +1,56 @@
<template>
<view>
<view class="codeContent">
<!-- 邀请码图 -->
<view class="codeBack">
<image class="codeBack-img" src="/static/user/user-codeIcon.png" mode="widthFix"></image>
<view class="codeBack-avatar">
<image src="/static/user/call.png" mode="aspectFill"></image>
<view class="">
张慢慢
</view>
<view class="content" v-if="loaded">
<view class="code">
<swiper class="code-swiper" previous-margin="70rpx" next-margin="70rpx" @change="swiperChange">
<swiper-item v-for="(item, index) in inviteData" :key="index">
<view class="code-item">
<view class="code-lay"></view>
<image class="code-back-image" :src="item.cover" mode="aspectFill"></image>
<view class="codDate">
<view class="codDate-year">
{{item.date.solar.month}}
</view>
<view class="codDate-day">
{{item.date.solar.day}}
</view>
<view class="codDate-lunar">
{{item.date.lunar}}
</view>
</view>
<view class="codeCont">
<image class="codeCont-avatar" :src="item.user_info.avatar ? item.user_info.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
<view class="codeCont-text">
<view class="codeCont-name">
{{item.user_info.nickname}}
</view>
<view class="codeCont-number">
邀请码{{item.invite}}
</view>
</view>
<image class="codeCont-img" :src="item.code" mode="widthFix"></image>
</view>
</view>
</swiper-item>
</swiper>
</view>
<view class="footer">
<view class="hith">朋友通过你的邀请注册成功后将与您绑定好友关系通过成为平台用户你都可以获得能量碎片奖励</view>
<view class="number">
<view class="title">邀请码 : {{inviteData[0].invite}}</view>
<view class="value" @click="copyCenter(inviteData[0].invite)">复制邀请码</view>
</view>
<view class="button" @click="coverCode">生成分享海报</view>
</view>
<canvas class="my-canvas" canvas-id="myCanvas" id="myCanvas"/>
<view v-if="posterShow">
<view class="posterBack"></view>
<view class="poster">
<view class="poster-img">
<image class="img" :src="posterImg" mode="widthFix" />
</view>
<view class="codeBack-top">
<view class="codeBack-title">
您的邀请码
</view>
<view class="codeBack-number">
8012568
</view>
<view class="codeBack-copy" @click="copyCenter(inviteData.invite)">
复制
</view>
</view>
<view class="codeBack-yard">
<image class="codeBack-yard-img" src="/static/user/wallet-code.png" mode="widthFix"></image>
<view class="codeBack-yard-name">
扫码识别链商星球
</view>
<view class="codeBack-yard-tips">
加入链商星球享受能量球权益
</view>
<view class="poster-btn">
<view class="operate">长按图片保存</view>
<view class="operate operate-cancel" @tap="posterShow = false">取消</view>
</view>
</view>
</view>
@@ -37,20 +59,32 @@
<script>
import { userInvite } from '@/apis/interfaces/user'
import { saveImageToPhotosAlbum, showToast, downloadFile } from '@/uni_modules/sakura-canvas/js_sdk/util'
import Draw from '@/uni_modules/sakura-canvas/js_sdk/draw'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
let draw = null
export default {
data() {
return {
inviteData: {} //二维码信息
Popinvite : {}, //下载海报数据
inviteData: [] ,//二维码信息
codeIndex : 0,
posterImg : '',
defaultImg: '',
loaded : false,
posterShow: false
};
},
onLoad() {
// 获取二维码
this.inviteInfo()
},
async created() {},
methods:{
// 二维码
inviteInfo(){
userInvite().then(res => {
this.loaded = true
this.inviteData = res
}).catch(err => {
uni.showToast({
@@ -60,221 +94,399 @@
})
},
// 复制邀请码
copyCenter(e) {
console.log('ddd')
let copyNo = e
uni.vibrateShort({
success: () => {
uni.setClipboardData({
data : copyNo,
success : res=> {
uni.showToast({
title : '复制成功',
icon :'none',
duration: 3000
});
}
})
}
// 生成海报
async coverCode(){
let img = this.inviteData[this.codeIndex].code
let back = this.inviteData[this.codeIndex].cover
let name = this.inviteData[this.codeIndex].user_info.nickname
let invite = this.inviteData[this.codeIndex].invite
let avatar = this.inviteData[this.codeIndex].user_info.avatar || '/static/user/user-portrait.png'
let date = this.inviteData[this.codeIndex].date
draw = new Draw({
width: 375,
height: 667,
canvasId:'myCanvas',
_this: this,
background: {
type: 'color',
color: 'white',
w: 375,
h: 667,
},
})
let res = await draw.createdSharePoster(({ bgObj }) => {
let { width, height } = bgObj
this.Popinvite = bgObj
// 绘制内容
return [
// 背景
{
type: 'image',
x: 0,
y: 0,
src: back,
w: 375,
h: 667,
zIndex: 0,
},
// 日历-边框
{
type: 'rect',
x: 280,
y: 10,
w: 60, // 宽度 必填
h: 80, // 高度 必填
zIndex: 99,
isFill: false, // 是否是填充矩形, false: 线性矩形
lineWidth: 1 ,// 当矩形为线性时,矩形的边框宽度
color: '#ffffff',
},
// 日历-线条
{
type: 'line',
zIndex: 99,
x: 280,
y: 62,
w: 60, // 宽度 默认整个画布的宽度 - x轴的距离
color: '#ffffff', // 颜色 默认#000000 在不考虑字节跳动小程序的前提下可简写(#000)
alpha: 1, // 透明度 默认1 取值范围 0~1
lineType: 'solid', // 线条类型 默认 solid: 实线 可选 dashed: 虚线
lineWidth: 1, // 线条高度
lineCap: 'butt' // 线条端点样式 默认 butt 可选 round, square
},
// 日历-年月
{
type: 'text',
x: 284,
y: 18,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.month,
color: '#ffffff',
font: {
size: 14
}
},
// 日历-日
{
type: 'text',
x: 298,
y: 40,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.day,
color: '#ffffff',
font: {
size: 18,
weight: 'bold'
}
},
// 日历-农历日期
{
type: 'text',
x: 282,
y: 70,
zIndex: 99,
w: width - (20 * 2),
text: date.lunar,
color: '#ffffff',
font: {
size: 14
}
},
// 用户昵称
{
type: 'text',
x: 86,
y: 600,
zIndex: 99,
w: width - (20 * 2),
text: name,
color: '#ffffff',
font: {
size: 16
}
},
// 邀请码
{
type: 'text',
x: 86,
y: 628,
zIndex: 99,
w: width - (20 * 2),
text: '邀请码:' + invite,
color: '#c4a1cb',
font: {
size: 14
}
},
// 用户头像
{
type: 'image',
x: 24,
y: 598,
src: avatar,
w: 46,
h: 46,
drawType: 'arc',
zIndex: 99,
borderWidth: 5, // 图片边框大小 默认0
borderColor: '#ffffff' // 图片边框颜色 默认无颜色
},
// 二维码
{
type: 'image',
x: 280,
y: 585,
w: 72,
h: 72,
zIndex: 99,
src: img
}
]
})
if (!res.success) return
this.posterImg = res.data
this.posterShow = true
},
// 保存图片
async saveImage() {
let { posterImg } = this
let res = await saveImageToPhotosAlbum(posterImg)
if (!res.success) return
showToast('保存成功')
this.posterShow = false
},
// 分享微信好友
friend(scene) {
uni.share({
provider: 'weixin',
title: '我正在使用ocChain',
scene: scene,
href: 'https://live.funnyzhibo.com/blockdownload',
imageUrl: 'https://live.funnyzhibo.com/oc-chain.png',
summary: '邀请您一起加入,邀请码' + this.inviteData.invite,
complete: res=> {
console.log(res)
}
})
// 复制邀请码
copyCenter(e) {
let copyNo = e
const result = h5Copy(copyNo)
if (result === false) {
uni.showToast({
title:'不支持',
})
} else {
uni.showToast({
title:'复制成功',
icon:'none'
})
}
},
// 切换海报背景index
swiperChange(e) {
this.codeIndex = e.detail.current
}
}
}
</script>
<style>
page {
background-image: linear-gradient(to top, #7c52fc, #976dff);
<style lang="scss" scoped>
.content{
background: white;
padding: $padding 0;
box-sizing: border-box;
min-height: 100vh;
@extend .vertical;
}
// 轮播
.code{
position: relative;
width: 100%;
padding-top: calc(183% - 280rpx - #{$padding * 2});
.code-swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.code-item{
height: 100%;
width: 100%;
padding: 0 $padding/2;
.code-lay{
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
}
.code-back-image{
width: 100%;
height: 100%;
}
}
}
}
// 提示信息
.footer{
padding: 0 $padding + 10;
.hith{
color: $text-gray;
font-size: $title-size-sm;
padding-top: $padding + 10;
}
.number {
background-color: $border-color-lg;
padding: $padding - 5;
margin: $margin + 20 0;
font-size: $title-size-lg;
border-radius: 8rpx;
display: flex;
.title {
flex: 1;
}
.value {
font-size: $title-size-m;
color: $text-price;
}
}
.button {
background: $text-price;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
text-align: center;
border-radius: 8rpx;
}
// number
// title
// value
// button
// title
}
// 头像昵称
.codeCont {
position: absolute;
left: 10rpx;
bottom: 0;
width: 100%;
padding: 16rpx 30rpx 20rpx;
box-sizing: border-box;
z-index: 9;
.codeCont-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
border: 4rpx solid #FFFFFF;
}
.codeCont-text {
position: absolute;
width: 100%;
left: 0;
top: 0;
padding: 14rpx 40rpx 0 140rpx;
box-sizing: border-box;
.codeCont-name {
color: #FFFFFF;
font-size: $title-size;
margin-bottom: 10rpx;
}
.codeCont-number {
font-size: $title-size-sm;
display: flex;
color: #c4a1cb;
}
}
.codeCont-img {
width: 120rpx;
height: 120rpx;
position: absolute;
right: 50rpx;
bottom: 10rpx;
}
}
</style>
<style lang="scss">
// 背景
.codeImg {
// 日历
.codDate {
position: absolute;
top: 15rpx;
right: 70rpx;
z-index: 9;
color: #FFFFFF;
text-align: center;
font-size: 24rpx;
border: 2rpx solid #fffefc;
.codDate-year {
padding-top: 5rpx;
}
.codDate-day {
padding: 5rpx 0;
font-size: 32rpx;
font-weight: 600;
border-bottom: 2rpx solid #a980c6;
}
.codDate-lunar {
font-size: 24rpx;
transform: scale(.9);
padding: 4rpx 0;
}
}
// canvas
.my-canvas{
width: 375px;
height: 667px;
position: fixed;
top: -99999999999rpx;
left: -99999999999rpx;
z-index: -99999999999;
opacity: 0;
}
.posterBack {
width: 100%;
height: 100%;
}
// 内容
.codeContent {
position: absolute;
position: fixed;
background-color: rgba(0,0,0,.7);
left: 0;
top: 0;
width: 100%;
padding: 120rpx 80rpx 40rpx;
box-sizing: border-box;
text-align: center;
.titleImg {
max-width: 100%;
}
.codeBack {
background-color: $uni-bg-color;
border-radius: $uni-border-radius-lg;
position: relative;
margin: $margin * 2 0 $margin * 2.5;
overflow: hidden;
&::after, &::before {
position: absolute;
background-color: #8c62fe;
content: '';
top: 266px;
width: 40rpx;
height: 40rpx;
border-radius: $uni-border-radius-circle;
}
&::after {
left: -20rpx;
}
&::before {
right: -20rpx;
}
.codeBack-img {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.codeBack-top {
width: 100%;
padding: $padding;
height: 150px;
box-sizing: border-box;
position: relative;
.codeBack-title {
color: #7c52fc
}
.codeBack-number {
font-size: 60rpx;
color: #7c52fc;
text-transform:uppercase;
font-weight: 700;
margin: $margin - 10 0 $margin;
}
.codeBack-copy {
font-size: $title-size-lg;
display: inline-block;
background: linear-gradient(to right, #f9c869, #eca824);
color: #fff;
padding: 15rpx $padding * 2;
border-radius: $uni-border-radius-lg;
margin-bottom: $margin * 2;
}
.codeBack-tips {
.codeBack-tips-text {
color: #7c52fc;
font-weight: 700;
}
.codeBack-tips-label {
margin-top: $margin;
border-radius: $uni-border-radius-lg;
display: inline-block;
background-color: #fbeec9;
font-size: $title-size-sm;
padding: 0 $padding + 12;
height: 56rpx;
line-height: 56rpx;
color: #9f7d42;
}
}
}
.codeBack-avatar {
margin-top: $margin * 2;
image {
width: 140rpx;
height: 140rpx;
border-radius: 50%;
margin-bottom: $margin;
}
}
.codeBack-yard {
padding: $padding $padding * 4 $padding * 2;
text-align: center;
position: relative;
font-size: $title-size-lg;
&::after {
position: absolute;
content: '';
left: 50rpx;
top: 0;
width: calc(100% - 100rpx);
border-top: #cccbd0 2rpx dashed;
}
.codeBack-yard-img {
max-width: 80%;
}
.codeBack-yard-name {
color: #a0a1a3;
margin-bottom: $margin - 10;
}
.codeBack-yard-tips {
color: #7c52fc
}
}
}
.codeRule {
background-color: $uni-bg-color;
border-radius: $radius;
padding: $padding + 10;
.codeRule-title {
font-size: $uni-font-size-lg + 4;
color: #7c52fc;
font-weight: 700;
margin-bottom: $margin + 10;
}
.codeRule-list {
text-align: left;
font-size: $title-size-m;
line-height: 38rpx;
text {
display: block;
margin-bottom: $margin - 5;
color: #7c52fc;
}
}
}
}
// 分享途径
.codeShare {
position: fixed;
left: 0;
bottom: 0;
z-index: 9;
background-color: $uni-bg-color;
box-sizing: border-box;
height: 200rpx;
width: 100%;
.poster{
width: 100vw;
height: 100vh;
display: flex;
justify-items: center;
align-items:center;
.codeShare-label {
width: 50%;
text-align: center;
font-size: $uni-font-size-sm;
color: $text-gray;
image {
width: $uni-img-size-lg - 10;
height: $uni-img-size-lg - 10;
display: flex;
margin: 0 auto $margin - 10;
flex-flow: column nowrap;
justify-content: center;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
z-index: 9;
&-img{
width: 580rpx;
position: relative;
margin: 70rpx auto 20rpx;
.img{
width: 100%;
}
}
&-btn{
padding: 0 $padding * 2;
.operate {
width: 100%;
margin-bottom: 20rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
display: inline-block;
text-align: center;
color: #fff;
&-cancel{
background-color: $text-price;
}
}
}
}

View File

@@ -0,0 +1,20 @@
<template>
<view>
<image class="followBack" src="/static/user/follow_back.png" mode="widthFix"></image>
</view>
</template>
<script>
</script>
<style>
page {
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.followBack {
width: 100%;
}
</style>

View File

@@ -32,7 +32,6 @@
// 帮助中心
helpInfo(){
userHelp().then(res => {
console.log(res)
res.forEach((value, index) => {
res[index].spread = false
res[0].spread = true

File diff suppressed because it is too large Load Diff

1100
pages/user/new_file.vue Normal file

File diff suppressed because it is too large Load Diff

180
pages/user/partner.vue Normal file
View File

@@ -0,0 +1,180 @@
<template>
<view class="content">
<!-- 分类 -->
<view class="tabs">
<view class="item" :class="{'show': larer == ''}" @click="onTabs('')">全部</view>
<view class="item" :class="{'show': larer == '1'}" @click="onTabs('1')">直接</view>
<view class="item" :class="{'show': larer == '2'}" @click="onTabs('2')">间接</view>
</view>
<block v-if="lists.length > 0">
<view class="partner-list">
<view class="partner-label" v-for="(item, index) in lists" :key="index" :larer='larer'>
<image class="partner-avatar" :src="item.avatar ? item.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
<view class="partner-cont">
<view class="partner-name">
<view class="partner-nickname">
{{item.nickname}}
</view>
<image v-if="item.identity" class="partner-identity" :src="item.identity.cover" mode="widthFix"></image>
</view>
<view class="partner-tel">
{{item.username}}
</view>
</view>
</view>
</view>
</block>
<block v-else>
<view class="list-null">
<image class="icon" src="@/static/icons/approve-icon.png" mode="widthFix"></image>
<view class="sub-title">暂未数据</view>
</view>
</block>
</view>
</template>
<script>
import { userPartne } from '@/apis/interfaces/user'
export default {
data() {
return {
larer : '',
lists : [],
pages : {}
};
},
onShow() {
this.larer = this.$Route.query.larer
// 获取伙伴列表
this.getPartner()
},
methods: {
// 伙伴列表
getPartner() {
userPartne({
larer: this.larer
}).then(res => {
this.lists = res.users
})
},
// tabs
onTabs(value){
if(value == this.larer) return
this.lists = []
this.larer = value
this.getPartner()
}
}
}
</script>
<style lang="scss" scoped>
.content{
padding-top: 90rpx;
}
// 空提示
.list-null{
width: 100vw;
height: 100vh;
padding-bottom: 20vh;
box-sizing: border-box;
background: white;
text-align: center;
@extend .vertical;
.sub-title{
color: $text-gray;
font-size: $title-size-m;
}
.icon{
width: 288rpx;
}
.sub-btn{
width: 200rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
background: $mian-color;
color: white;
display: inline-block;
margin-top: $margin*2;
}
}
// tabs
.tabs{
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
display: flex;
justify-content: space-around;
background: white;
padding: 15rpx 0;
font-size: $title-size-lg;
color: $text-gray;
.item{
height: 60rpx;
line-height: 60rpx;
&.show{
color: $text-price;
border-bottom: solid 4rpx $text-price;
}
}
}
// 列表
.partner-list{
margin: calc(#{$padding} - 10rpx);
display: flex;
flex-wrap: wrap;
background-color: #FFFFFF;
.partner-label {
padding: 20rpx;
box-sizing: border-box;
position: relative;
border-radius: 4rpx;
width: 100%;
&::after {
position: absolute;
content: '';
left: 0;
bottom: 0;
width: 100%;
height: 1rpx;
background-color: #f8f8f8;
}
&:last-child::after {
display: none;
}
.partner-avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.partner-cont {
position: absolute;
width: 100%;
left: 0;
top: 0;
padding: 22rpx 20rpx 20rpx 150rpx;
box-sizing: border-box;
.partner-name {
display: flex;
margin-bottom: 15rpx;
.partner-nickname {
font-size: 30rpx;
font-weight: 600;
margin-right: 10rpx;
}
.partner-identity {
width: 84rpx;
margin-top: 4rpx;
}
}
}
}
}
</style>

View File

@@ -270,7 +270,7 @@
width: calc(100% - 60rpx);
height: 360rpx;
background-image: linear-gradient(to left, #076cff, #076cff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: $main-color, $alpha: 0.4);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: $mian-color, $alpha: 0.4);
margin: 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;

View File

@@ -149,8 +149,8 @@
},
// 核销记录
goHistory() {
uni.navigateTo({
url:'/pages/verification/history'
this.$Router.push({
name:'verificationHistory'
})
}
}

42
pages/vip/agree.vue Normal file
View File

@@ -0,0 +1,42 @@
<template>
<view>
<view class="contentTitle">
<rich-text :nodes="content"></rich-text>
</view>
</view>
</template>
<script>
import { userAgree } from '@/apis/interfaces/vip'
export default {
data() {
return {
content: ''
}
},
created() {
let newUrl = ''
if(this.$Route.query.type == 'vipAgree') newUrl = 'articles/agreement/openvip'
if(this.$Route.query.type == 'loginPrivacy') newUrl = 'articles/agreement/secret'
if(this.$Route.query.type == 'loginService') newUrl = 'articles/agreement/service'
userAgree(newUrl).then(res => {
this.content = res.content
}).catch(err =>{
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.contentTitle {
padding: $padding;
box-sizing: border-box;
}
</style>

44
pages/vip/examine.vue Normal file
View File

@@ -0,0 +1,44 @@
<template>
<view>
<view class="examine">
<image class="examine-img" src="@/static/user/vipExamine.png" mode="widthFix"></image>
<view class="examine-name">
提交成功,请耐心等待~
</view>
<view class="examine-cont" @click="$Router.push({name: 'User'})">
我知道了
</view>
</view>
</view>
</template>
<script>
</script>
<style>
page {
background-color: #FFFFFF;
}
</style>
<style lang="scss" scoped>
.examine {
text-align: center;
padding: 340rpx 0 0;
.examine-img {
width: 50%;
}
.examine-name {
margin: 0 0 40rpx;
}
.examine-cont {
background: $mian-color;
border-radius: 6rpx;
height: 82rpx;
line-height: 82rpx;
font-size: $title-size-lg;
color: white;
display: inline-block;
padding: 0 100rpx;
}
}
</style>

679
pages/vip/vip.vue Normal file
View File

@@ -0,0 +1,679 @@
<template>
<view class="content" v-if="!loding">
<!-- 上传凭证弹出 -->
<view class="canBack" v-if="canForm"></view>
<view class="canPop" v-if="canForm">
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
<view class="canPop-cont">上传打款凭证</view>
<image class="canPop-cover" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="updImg()" mode="aspectFill"></image>
<view class="canPop-btn" @click="canSubmit">提交</view>
</view>
<swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" :current="tabsIndex" circular @change="swiperChange">
<swiper-item class="swiper-item" v-for="(item, index) in identitie" :key="index">
<view class="vip-item" :class="tabsIndex == index ? 'color-item-img' : ''">
<image class="vip-back" :src="item.card_cover" mode="scaleToFill"></image>
<view class="vip-cont">
<view class="vip-name">
{{ item.name }}
<image class="vip-name-img" @click="showRemark(item.name, item.node_definition)" src="../../static/user/vip_privilege_03.png" mode="widthFix"></image>
</view>
<view class="vip-number" v-if="item.count">{{ item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数' }}</view>
<view class="vip-tips">
<!-- 会员 -->
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">{{ item.title }}</view>
<!-- VIP节点 -->
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">{{ item.title }}</view>
<!-- 主节点 -->
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">{{ item.title }}</view>
<!-- 超级节点 -->
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">{{ item.title }}</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
<!-- 会员特权 -->
<view class="privilege">
<view class="privilege-list">
<image class="privilege-img" src="/static/user/vip_privilege_00.png" mode=""></image>
<view class="privilege-text">
<view class="privilege-name">节点定义</view>
{{ identitie[tabsIndex].node_definition }}
</view>
</view>
<view class="privilege-list">
<image class="privilege-img" src="/static/user/vip_privilege_01.png" mode=""></image>
<view class="privilege-text">
<view class="privilege-name">升级条件</view>
<block v-if="openCondition.energy_shard">
<view class="privilege-label" :class="{ active: openCondition.energy_shard.finish }">
{{ openCondition.energy_shard.message }}
<uni-icons v-if="openCondition.energy_shard.finish" type="checkmarkempty" size="17" color="#f6b338"></uni-icons>
</view>
<view class="privilege-label" :class="{ active: openCondition.price.finish }" v-if="!openCondition.energy_shard.finish">
{{ openCondition.price.message }}
</view>
<view class="privilege-label" v-else>{{ openCondition.service_charge.message }}</view>
</block>
<block v-else>
<view class="privilege-label" :class="{ active: openCondition.price.finish }">{{ openCondition.price.message }}</view>
</block>
</view>
</view>
<view class="privilege-list">
<image class="privilege-img" src="/static/user/vip_privilege_02.png" mode=""></image>
<view class="privilege-text">
<view class="privilege-name">节点权益</view>
<view class="privilege-label privilege-right" v-for="(item, index) in identitie[tabsIndex].rights" :key="index">&{{ item.remark }}</view>
</view>
</view>
</view>
<!-- 用户协议 -->
<view class="agree"><view class="agree-tips" @click="$Router.push({ name: 'vipAgree', params: { type: 'vipAgree' } })">请仔细阅读并确认服务协议</view></view>
<view class="agree-btn" @click="agreeChange">
<radio :checked="selected" style="transform: scale(.7);" color="#7c52fc"></radio>
会员服务协议
</view>
<!-- 开通按钮 -->
<view class="footer">
<image class="footer-btn" :src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder"></image>
<!-- <button class="footer-btn" type="default" >
<view class="footer-btn-num">
合计{{total}}
</view>
<view class="footer-btn-pay">
立即支付
</view>
</button> -->
</view>
</view>
</template>
<script>
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip';
import { wxConfig } from '@/apis/interfaces/wx';
import { uploads } from '@/apis/interfaces/uploading';
export default {
data() {
return {
loding: true,
tabsIndex: 0,
user: {},
identitie: [],
rights: [],
description: '',
identityTime: '', // 到期时间
sumNumber: 1, // 开通年限
total: '', // 开通年限总资金额
selected: false, // 用户协议
canBtn: '', // 按钮操作
canForm: false, // 凭证弹出
canFromImg: {
showpath: '',
path: ''
},
openCondition: {}
};
},
created() {
// 获取当前用户信息
this.idenInfo('cre');
},
methods: {
// 当前用户信息
idenInfo(type) {
identities().then(res => {
res.identities.map(item => {
item.obj_condition = new Object();
for (let val of item.get_condition) {
item.obj_condition[val.name] = {
message: val.message,
finish: val.finish
};
}
return item;
});
this.identitie = res.identities;
if(type === 'cre'){
this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id)
}
this.openCondition = res.identities[this.tabsIndex].obj_condition;
this.rights = res.identities[this.tabsIndex].rights;
this.total = res.identities[this.tabsIndex].price;
this.canBtn = res.identities[this.tabsIndex].can;
this.loding = false;
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
});
});
},
// 切换开通身份
swiperChange(e) {
this.tabsIndex = e.detail.current;
// 获取当前用户信息
this.idenInfo();
},
// 开通会员
openOrder() {
let can = this.canBtn,
identitiesId = this.identitie[this.tabsIndex].identity_id;
if (this.selected == false) {
uni.showToast({
title: '请勾选用户协议',
icon: 'none'
});
return;
}
if (can.on_line) {
if (can.buy) {
this.wxPayConfig();
} else {
uni.showToast({
title: can.message,
icon: 'none'
});
}
} else {
if (can.buy) {
// 上传凭证
this.canClick();
} else {
uni.showToast({
title: can.message,
icon: 'none'
});
}
}
return;
},
// 微信支付鉴权
wxPayConfig() {
wxConfig({
url: window.location.href,
jsApiList: ['chooseWXPay']
}).then(res => {
let payConfig = JSON.parse(res);
let jweixin = require('jweixin-module');
jweixin.ready(() => {
// res
});
jweixin.error(err => {
uni.showToast({
title: err,
icon: 'none'
});
});
jweixin.config({ ...payConfig });
vipOrder(this.identitie[this.tabsIndex].identity_id, {
year: this.sumNumber
}).then(payId => {
this.wechatPay(payId.id, jweixin);
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
});
});
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
});
});
},
// 微信支付
wechatPay(id, wx) {
vipWechatPay(id, {
openid: this.$store.getters.getCode
}).then(payConfig => {
wx.chooseWXPay({...payConfig,
success() {
uni.showModal({
title : '提示',
content : '支付成功,恭喜您成功开通',
showCancel:false,
confirmColor: '#8b64fd',
success : ()=> {
this.$Router.back()
}
})
},
fail(err) {
uni.showToast({
title: '支付被取消',
icon : 'none'
})
}
});
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 勾选协议
agreeChange() {
this.selected = !this.selected;
},
// 会员权益介绍
showRemark(title, val) {
uni.showModal({
title: title,
content: val,
showCancel: false
});
},
// 上传打款凭证图片
updImg() {
uni.chooseImage({
count: 1,
success: path => {
uploads([{uri: path.tempFilePaths[0]}]).then(res => {
this.canFromImg = {
showpath: res.url[0],
path: res.path[0]
};
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
});
});
}
});
},
// 打款凭证弹出状态
canClick() {
this.canForm = !this.canForm;
},
// 打款凭证提交
canSubmit() {
let newCover = this.canFromImg.path,
newId = this.identitie[this.tabsIndex].identity_id;
vipVoucher({
cover: newCover,
identity_id: newId
}).then(res => {
this.$Router.push({ name: 'Examine' });
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
});
});
}
}
};
</script>
<style>
page {
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.canBack {
position: fixed;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
left: 0;
top: 0;
z-index: 99;
}
.canPop {
position: absolute;
background-color: #ffffff;
left: 100rpx;
right: 100rpx;
top: 30%;
z-index: 101;
padding: 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
text-align: center;
.canPop-tips {
position: absolute;
right: 20rpx;
top: 32rpx;
width: 32rpx;
height: 32rpx;
z-index: 1002;
}
.canPop-cont {
font-size: 32rpx;
font-weight: 600;
}
.canPop-cover {
margin: 60rpx auto 40rpx;
width: 240rpx;
height: 240rpx;
border: 2rpx solid #f3f3f3;
}
.canPop-btn {
text-align: center;
background: $mian-color;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
&::after {
border: none;
}
}
}
.vip-container {
width: 750rpx;
height: 340rpx;
margin-top: $margin;
}
.swiper-item {
width: 640rpx;
height: 340rpx;
display: flex;
}
.vip-item {
width: 640rpx;
height: 340rpx;
border-radius: 20rpx;
position: relative;
.vip-back {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.vip-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
padding: 45rpx 70rpx;
box-sizing: border-box;
.vip-name {
display: flex;
font-size: 46rpx;
color: #ffffff;
font-weight: 600;
.vip-name-img {
width: 36rpx;
height: 36rpx;
margin: 12rpx 20rpx;
}
}
.vip-number {
margin: 10rpx 0 40rpx;
color: #ffffff;
font-size: 32rpx;
opacity: 0.8;
}
.vip-tips {
font-size: 30rpx;
background-color: #e8ebf6;
display: inline-block;
border-radius: 80rpx;
height: 60rpx;
line-height: 60rpx;
padding: 0 30rpx;
.vip-tips-text {
font-weight: 700;
background-clip: text;
color: transparent;
}
.vip-tips-color-00 {
background-image: linear-gradient(to bottom, #6189f0, #b6b9c1);
}
.vip-tips-color-01 {
background-image: linear-gradient(to top, #ffd459, #ff6c52);
}
.vip-tips-color-02 {
background-image: linear-gradient(to top, #e0c9fe, #892edb);
}
.vip-tips-color-03 {
background-image: linear-gradient(to top, #f6b237, #f035e3);
}
.vip-tips-color-04 {
background-image: linear-gradient(to top, #c455ec, #5f76e9);
}
}
}
}
// 会员特权
.privilege {
padding: 20rpx 30rpx 80rpx;
box-sizing: border-box;
.privilege-list {
margin-bottom: 50rpx;
display: flex;
.privilege-img {
width: 74rpx;
height: 74rpx;
}
.privilege-text {
width: calc(100% - 74rpx);
padding-left: 40rpx;
font-size: 32rpx;
color: #999999;
line-height: 52rpx;
.privilege-name {
font-size: 40rpx;
color: #000000;
margin: 10rpx 0 20rpx;
}
.privilege-label.active {
color: #f6b338;
}
.privilege-right {
color: #7877eb;
}
}
}
}
// 用户协议
.agree {
margin: $margin 0;
text-align: center;
.agree-tips {
background-color: #999999;
display: inline-block;
padding: 14rpx $padding;
color: #ffffff;
border-radius: 60rpx;
}
}
.agree-btn {
display: flex;
font-size: $title-size-lg;
text-align: left;
color: #999999;
padding: $padding;
}
// .content{
// min-height: 100vh;
// background: #fefaef;
// }
// 开通须知
.notice {
font-size: $title-size-m;
color: $text-gray;
padding: $padding $padding * 2 $padding * 2;
.title {
padding-bottom: $padding/2;
font-weight: bold;
}
.item {
padding-bottom: $padding/2;
line-height: 40rpx;
text-align: justify;
}
}
// footer
.footer {
padding: 0 $padding;
box-sizing: border-box;
text-align: center;
.footer-btn {
width: 74%;
}
}
// 会员权限
.privilege {
padding: $padding;
.title {
font-weight: bold;
color: #322711;
font-size: $title-size;
text-align: center;
line-height: 90rpx;
}
.privilege-box {
display: flex;
flex-wrap: wrap;
padding: $padding 0;
.item {
width: 25%;
padding: $padding/2;
box-sizing: border-box;
text-align: center;
.icon {
width: 78rpx;
height: 78rpx;
background: #bd995d;
border-radius: 50%;
vertical-align: top;
}
.text {
font-size: $title-size-sm;
color: #201212;
line-height: 60rpx;
}
}
}
}
// 会员卡
.cards {
position: relative;
background: #1f1b1c;
.card {
position: relative;
margin: 0 $margin;
background: linear-gradient(to right, #3b3d4a, #231d1f);
padding: 15rpx;
border-radius: $radius/2;
z-index: 2;
.card-content {
position: relative;
border: solid 1rpx rgba($color: white, $alpha: 0.4);
border-radius: $radius/2;
padding: 30rpx 180rpx 60rpx 148rpx;
min-height: 98rpx;
.cover {
position: absolute;
left: 30rpx;
top: 30rpx;
width: 98rpx;
height: 98rpx;
border-radius: 50%;
}
.user {
color: rgba($color: white, $alpha: 0.7);
line-height: 58rpx;
font-size: $title-size-lg;
}
.sub-time {
line-height: 40rpx;
color: #e6ce9e;
font-size: $title-size-sm;
}
.btn {
position: absolute;
color: #261f0f;
background: #e6ce9e;
width: 160rpx;
border-radius: 30rpx;
font-size: $title-size-m;
right: 30rpx;
top: 50rpx;
line-height: 58rpx;
text-align: center;
}
}
}
.cards-angle {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
z-index: 3;
}
&::after {
content: ' ';
height: 70rpx;
background: #b29671;
position: absolute;
width: 100%;
bottom: 0;
border-radius: $radius/2;
z-index: 0;
}
}
// tabs
.tabs {
background: #1f1b1c;
color: white;
padding: 0 0 $padding 0;
display: flex;
justify-content: center;
font-size: $title-size-lg;
.item {
margin: 0 $margin;
line-height: 70rpx;
height: 70rpx;
color: rgba($color: white, $alpha: 0.6);
&.show {
position: relative;
font-weight: bold;
font-size: $title-size;
color: white;
&::after {
position: absolute;
bottom: 0;
left: 20%;
width: 60%;
height: 6rpx;
border-radius: 3rpx;
content: ' ';
background: white;
}
}
}
}
</style>

View File

@@ -1,65 +0,0 @@
<template>
<view class="content webkit-box">
<!-- logo -->
<image class="logo" src="@/static/img/oc-logo.png" mode="widthFix"></image>
<!-- 副标题 -->
<view class="sub-title">激活您的OC Chain区块链钱包地址</br>地址可以理解为您的个人银行卡卡号与他人转账时是区块链上两个地址的交易行为</view>
<!-- 按钮 -->
<navigator class="wallet-btn" url="./mnemonic" open-type="redirect">激活钱包</navigator>
<!-- <navigator class="wallet-btn hollow" url="./guide">导入钱包</navigator> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
page {
background-color: white;
}
</style>
<style lang="scss" scoped>
.content{
position: relative;
height: 100vh;
padding: 0 15vw;
text-align: center;
.logo{
width: 138rpx;
vertical-align: top;
margin-bottom: 30vh;
}
.sub-title{
font-size: $title-size-m;
color: $text-gray;
}
.wallet-btn{
width: 100%;
background-color: $mian-color;
height: 90rpx;
line-height: 90rpx;
margin-top: $margin * 2;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
&.hollow{
background-color: white;
color: $mian-color;
border:solid 2rpx $mian-color;
box-sizing: border-box;
}
}
}
</style>

335
pages/wallet/addBank.vue Normal file
View File

@@ -0,0 +1,335 @@
<template>
<view class="WithdrawingCoin">
<view class="withdrawing-content">
<view class="item-name">{{bank_account_id===''?'添加':'编辑'}}提现银行</view>
<view class="item">
<view class="title">收款人姓名</view>
<input class="input_num" v-model="name" maxlength="13" placeholder="请输入收款人姓名"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
</view>
<view class="item">
<view class="title">收款人手机号</view>
<input class="input_num" v-model="mobile" maxlength="11" placeholder="请输入手机号"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
</view>
<view class="item">
<view class="title">开户行</view>
<u-select v-model="bankShow" value-name='id' :default-value='[0]' label-name='name'
@confirm='selectBank' :list="banks" />
<view class="input_num" @click="bankShow = true">
{{selectBankObj.label?selectBankObj.label:'请选择开户行'}}
</view>
</view>
<view class="item">
<view class="title">收款人账号</view>
<input class="input_num" v-model="no" maxlength="20" type="number" placeholder="请输入收款人账号"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
</view>
<view class="item">
<view class="title">支行名称</view>
<input class="input_num" v-model="branch_name" maxlength="20" placeholder="省-市-区-支行名称"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" />
</view>
</view>
<view class="btn" @click="sureAdd">确认{{bank_account_id===''?'添加':'编辑'}}银行</view>
<view class="history" @click="$Router.push({name:'withdrawList'})">提现记录
<u-icon name="question-circle-fill" />
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
accountsCreate,
withdrawsAccounts,
accountsCreateEdit,
withdrawsAccountsEdits
} from '@/apis/interfaces/withdraws'
export default {
data() {
return {
no: '', // 银行卡号
name: '', // 用户姓名
branch_name: '', // 支行名称
mobile: '', // 手机号
bank_id: '', // 银行卡id
banks: [], // 开户行列表
bankShow: false, // 显示开户行列表
selectBankObj: {}, // 选择银行
bank_account_id:''
};
},
onLoad(e) {
// 有id 是编辑
if (e.id) {
this.bank_account_id = e.id
this.getAccountsCreateEdit()
} else {
this.getAccountsCreate()
}
},
methods: {
// 获取添加银行前置条件
getAccountsCreate() {
accountsCreate().then(res => {
console.log(res)
this.banks = res.banks
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 编辑前置
getAccountsCreateEdit() {
accountsCreateEdit(this.bank_account_id).then(res => {
console.log(res)
this.banks = res.banks
this.no = res.info.no
this.name = res.info.name
this.mobile = res.info.mobile
this.branch_name = res.info.branch_name
this.selectBankObj.label = res.info.bank.name
this.bank_id = res.info.bank.id
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 选择银行
selectBank(e) {
console.log(e[0])
this.selectBankObj = e[0]
this.bank_id = e[0].value
},
sureAdd() {
let data = {
no: this.no, // 银行卡号
name: this.name, // 用户姓名
branch_name: this.branch_name, // 支行名称
mobile: this.mobile, // 手机号
bank_id: this.bank_id, // 银行卡id
}
if (data.name === '') {
this.$refs.uToast.show({
title: '请核对收款人姓名',
type: 'primary',
duration: 3000
})
return;
}
if (data.mobile.length !== 11) {
this.$refs.uToast.show({
title: '请核对收款人手机号',
type: 'primary',
duration: 3000
})
return;
}
if (data.bank_id === '') {
this.$refs.uToast.show({
title: '请勾选开户行',
type: 'primary',
duration: 3000
})
return;
}
if (data.no === '') {
this.$refs.uToast.show({
title: '请核对收款账号',
type: 'primary',
duration: 3000
})
return;
}
if (data.branch_name === '') {
this.$refs.uToast.show({
title: '请核对省-市-区-支行名称',
type: 'primary',
duration: 3000
})
return;
}
if (this.bank_account_id) {
data.bank_account_id = this.bank_account_id
console.log(data)
this.withdrawsAccountsEdits(data)
} else {
this.withdrawsAccounts(data)
}
},
// 添加银行
withdrawsAccounts(data) {
withdrawsAccounts(data).then(res => {
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
setTimeout(res => {
uni.setStorageSync('refresh',true)
uni.navigateBack({})
}, 3000)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 编辑银行卡银行
withdrawsAccountsEdits(data) {
withdrawsAccountsEdits(data).then(res => {
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
uni.setStorageSync('refresh',true)
setTimeout(res => {
uni.navigateBack({})
}, 3000)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
min-height: 100vh;
background-color: #fff;
}
.history {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
color: #cacaca;
.u-icon {
margin-left: 10rpx;
}
}
.withdrawing-content {
min-height: 300rpx;
background-color: #fff;
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2);
margin: $margin;
border-radius: 20rpx;
padding: $padding;
font-size: $title-size-m;
.item-name {
text-align: center;
padding: $padding * .6;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: $title-size *1.2;
position: relative;
&::after {
content: '';
position: absolute;
background-color: rgba($color: $text-price, $alpha: .4);
width: 200rpx;
height: 10rpx;
left: 50%;
margin-left: -100rpx;
bottom: 16rpx;
z-index: 1;
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
}
}
.item {
border-bottom: solid 1rpx #f8f8f8;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: $padding 0;
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
.title {
width: 200rpx;
font-size: 28rpx;
&::before {
content: '*';
color: red;
padding-right: 4rpx;
}
}
.input_num {
font-size: 30rpx;
color: #3a3a3a;
// font-weight: bolder;
flex: 1;
margin-left: 20rpx;
}
}
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.money {
padding-top: $padding *0.5;
}
}
.lists {
color: $text-price;
}
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9;
margin: $margin*3 $margin * 2 $margin $margin*2;
font-size: $title-size;
font-weight: bold;
letter-spacing: 2rpx;
}
</style>

258
pages/wallet/bankList.vue Normal file
View File

@@ -0,0 +1,258 @@
<template>
<view class="selectCard">
<view class="demo" v-if="lists.length>0"><u-icon name="info-circle-fill" label-color='#cacaca' color='#cacaca' label='长按删除添加银行卡'/></view>
<view class="bankInfo" v-if="lists.length>0" v-for="(item,index) in lists" :key='index'
@longpress='delBank(item.bank_account_id,index)'>
<image class="bankLogin" @click="selectBank(item)" :src="item.bank.cover" mode="widthFix" />
<view class="right" @click="selectBank(item)">
<view class="left">
<view class="title">{{item.bank.name}}
<view class="tags">快捷支付</view>
</view>
<view class="des">储值卡</view>
<view class="no">{{item.no}}</view>
</view>
</view>
<u-icon name="edit-pen-fill" @click='editBank(item.bank_account_id)' color="rgba(255,255,255,0.6)"
size='50' />
</view>
<!-- 底部新增按钮 -->
<view class="addBtn" @click="$Router.push({ name: 'addBank'})">
<u-icon name="plus" label-pos='bottom' color='#fff' label-color='#fff' label='新增' />
</view>
<!-- 无列表 -->
<no-list v-if="lists.length === 0" name='no-shop' txt="没有任何提现银行 ~ " />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
withdrawsAccountsList,
withdrawsAccountsDelete
} from '@/apis/interfaces/withdraws'
export default {
data() {
return {
lists: [],
page: 1,
has_more: true
}
},
onLoad() {
this.withdrawsAccountsList()
},
onShow() {
if (uni.getStorageSync('refresh')) {
this.lists = []
this.page = 1
this.has_more = true
this.withdrawsAccountsList()
}
},
onReachBottom() {
if (this.has_more) {
this.page = this.page + 1
this.withdrawsAccountsList()
} else {
this.$refs.uToast.show({
title: '哎呦,没有更多了~',
type: 'primary',
duration: 3000
})
}
},
methods: {
// 添加银行
withdrawsAccountsList() {
let data = {
page: this.page
}
withdrawsAccountsList(data).then(res => {
console.log(res)
this.lists = this.lists.concat(res.data)
this.has_more = res.page.has_more
uni.setStorageSync('refresh', false)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 跳转到编辑银行卡的页面
editBank(id) {
this.$Router.push({
name: 'addBank',
params: {
id: id
}
})
},
// 删除银行
delBank(id, index) {
let that = this
uni.showModal({
title: '温馨提示',
content: '是否确认删除该银行',
cancelColor: '#cacaca',
cancelText: '我再想想',
confirmColor: '#7C52FC',
confirmText: '确认删除',
success(res) {
if (res.confirm) {
withdrawsAccountsDelete(id).then(res => {
console.log(res)
that.lists.splice(index, 1)
if (that.lists.length === 0) {
uni.navigateBack({})
uni.setStorageSync('refresh', true)
}
}).catch(err => {
that.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
}
}
})
},
// 选择银行返回上一页携带参数
selectBank(item) {
let bankInfo = {
name: item.bank.name + '-' + item.no.substring(item.no.length - 4),
bank_account_id: item.bank_account_id
}
let pages = getCurrentPages()
let prevPage = pages[pages.length - 2]
console.log(bankInfo)
prevPage._data.bankInfo = bankInfo
uni.navigateBack() //返回上一页面
}
}
}
</script>
<style lang="scss" scoped>
.addBtn{
position: fixed;
bottom: 0;
margin: 40rpx;
text-align: center;
width: 130rpx;
height: 130rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
border-radius: 50%;
z-index: 100;
right: 0;
box-shadow: 0 0 20rpx 20rpx rgba($color: #fff, $alpha: .5);
background-image: linear-gradient(to right, #7c52fc, #976dff);
}
.selectCard {
width: 100%;
min-height: 100vh;
padding-top: 30rpx;
background-color: #fff;
padding-bottom: 80rpx;
.demo{
color: #cacaca;
font-size: 26rpx;
text-align: center;
}
.bankInfo {
width: calc(100% - 60rpx);
background-image: linear-gradient(to right, #7c52fc, #976dff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.6);
margin: 20rpx 30rpx 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: relative;
padding: 40rpx 30rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
z-index: 1;
.bankLogin {
width: 70rpx;
height: 70rpx;
opacity: .9;
}
.right {
flex: 1;
margin-left: 20rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
color: rgba($color: #fff, $alpha: .9);
position: relative;
z-index: 1;
.u-icon {
position: absolute;
background-color: pink;
z-index: 100;
right: 0;
}
.left {
flex: 1;
.title {
font-size: 38rpx;
font-weight: bold;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.tags {
color: $text-price;
font-size: 24rpx;
margin-left: 20rpx;
padding: 4rpx 14rpx;
position: relative;
display: inline-block;
color: #7C52FC;
&::before {
background: rgba($color: #fff, $alpha: .8);
z-index: -1;
position: absolute;
content: '';
top: 0;
left: 0;
right: 0;
bottom: 0;
transform: skewX(-10deg);
}
}
}
.des {
font-size: 28rpx;
margin-top: 14rpx;
}
.no {
font-size: 36rpx;
font-weight: bold;
margin-top: 20rpx;
}
}
}
}
}
</style>

View File

@@ -1,136 +0,0 @@
<template>
<view class="webkit-box code">
<view class="webkit-box code-content">
<view class="sub-title">扫码转入OC COIN</view>
<view class="code-img">
<image :src="code" mode="widthFix" />
</view>
<view class="hr"></view>
<view class="sub-title">钱包地址</view>
<view class="hash">{{address || '-'}}</view>
<view class="buttons">
<button class="item red" type="default" @click="showShare()">分享</button>
<button class="item greed" type="default" @click="copyAddress">复制</button>
</view>
</view>
<view class="footer">OC CHNIA</view>
</view>
</template>
<script>
import { code } from '@/apis/interfaces/wallet'
export default {
data() {
return {
address: '',
code: ''
};
},
mounted() {
code().then(res=>{
this.code = res.image
this.address = res.address
}).catch(err=>{
uni.showToast({
icon: 'none',
title: err.message
})
})
},
methods:{
copyAddress(){
uni.setClipboardData({
data: this.address
})
},
showShare(){
uni.share({
provider: 'weixin',
title: '我正在使用ocChain钱包收款',
scene: 'WXSceneSession',
href: 'https://live.funnyzhibo.com/blockdownload',
imageUrl: 'https://live.funnyzhibo.com/oc-chain.png',
summary: '我的收款地址' + this.address
})
}
}
}
</script>
<style lang="scss" scoped>
.code{
height: 100vh;
background:linear-gradient(to bottom, $mian-color, $mian-color-deep);
padding-bottom: env(safe-area-inset-bottom);
padding-bottom: constant(safe-area-inset-bottom);
box-sizing: border-box;
// 收款码
.code-content{
text-align: center;
background: white;
margin: 0 8vw;
border-radius: $radius;
padding: $padding * 2;
height: 70vh;
box-shadow: 0 0 6rpx 6rpx rgba($color: #000000, $alpha: .02);
box-sizing: border-box;
.sub-title{
font-size: $title-size + 8;
}
.code-img{
width: 20vh;
height: 20vh;
margin: $margin * 3 0 $margin * 2;
display: inline-block;
background-image: url(../../static/background/wallet-code-background.png);
padding: $padding;
box-sizing: border-box;
background-position: center;
background-size: cover;
image{
width: 100%;
}
}
.hr{
height: 1rpx;
background: $border-color;
margin: $margin * 2 0;
}
.hash{
word-wrap: break-word;
font-size: $title-size;
padding: $padding 0;
}
.buttons{
display: flex;
padding-top: $padding * 2;
.item{
width: 40%;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
font-size: $title-size;
color: white;
&::after{
border: none;
}
&.red{
background: $red-color;
}
&.greed{
background: $mian-color;
}
}
}
}
// 底部
.footer{
height: 10vh;
line-height: 10vh;
text-align: center;
font-size: $title-size + 10;
font-weight: bold;
color: #58876e;
}
}
</style>

View File

@@ -1,138 +0,0 @@
<template>
<view>
<!-- 设置钱包密码 -->
<view class="password">
<view class="prompt">请设置6位数字密码建议不要使用连续的数字</view>
<view class="group">
<view class="inputs">
<label>密码</label>
<input type="digit" v-model="password" maxlength="6" placeholder="请设置密码" />
</view>
<view class="inputs">
<label>确认密码</label>
<input type="digit" v-model="verify" maxlength="6" placeholder="请确认密码" />
</view>
</view>
</view>
<!-- 按钮 -->
<view class="buttons">
<button type="default" form-type="submit" @click="createWallet">确认</button>
</view>
</view>
</template>
<script>
import {
security
} from '@/apis/interfaces/wallet'
export default {
data() {
return {
password: '',
verify: ''
}
},
methods: {
// 激活钱包
createWallet() {
if (this.password === '' || this.verify === '') {
uni.showToast({
icon: 'none',
title: '请设置密码'
})
return
}
if (this.password !== this.verify) {
uni.showToast({
icon: 'none',
title: '两次输入密码不一致'
})
return
}
security({
code: this.password
}).then(res => {
uni.navigateBack()
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
}
}
}
</script>
<style lang="scss" scoped>
// 副标题
.sub-title {
color: $text-gray;
text-align: center;
margin: $margin * 2 $margin;
font-size: $title-size-m;
}
// 设置密码
.password {
padding: 0 $padding * 2;
.prompt {
margin-top: $margin * 2;
font-size: $title-size-m;
color: $mian-color;
}
.group {
margin-top: $margin;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
.inputs {
padding: $padding $padding + 10;
border-bottom: solid 1rpx $border-color;
&:last-child {
border-bottom: none;
}
label {
color: $text-gray;
font-size: $title-size-m;
}
input {
height: 70rpx;
line-height: 70rpx;
font-size: $title-size;
}
}
}
}
// 按钮
.buttons {
padding: $padding * 2;
.text {
text-align: center;
line-height: 90rpx;
height: 90rpx;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $mian-color;
font-weight: bold;
}
button {
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
}
}
</style>

View File

@@ -1,393 +1,405 @@
<template>
<view class="WithdrawingCoin ">
<view class="withdrawing-content">
<view class="item-name">能量球提现至银行卡</view>
<view class="item">
<view style="flex: 1;">
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入能量球数量" />
<view v-if="total"> {{total}}</view>
</view>
<view class="all" @click="all">全部提现</view>
</view>
<view class="item">
<input class="input_num" v-model="card" type="number"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入您要收款得银行卡卡号" />
</view>
<view class="item">
<input class="input_num" v-model="name" maxlength="10"
placeholder-style="color:#999;font-weight:normal; font-size:30rpx;" placeholder="请输入收款人姓名" />
</view>
<number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan>
<view class="item-total">
<view class="total"><span>能量球总数 : {{balance}}</span><span class="money">总估值(CNY){{(balance*price).toFixed(2)}}</span></view>
</view>
</view>
<view class="btn" @click="open">提现至银行卡</view>
<view class="ew_lists" v-if="withdrawLists.length>0">
<view class="" v-for="(item,index) in withdrawLists " :key="index">
<view class="receiptCode">
回执单号{{item.receipt_code}}
</view>
<view class="item">
<view class="left">
<span>能量球:{{item.total}}</span>
<span>金额{{item.arrival}}</span>
</view>
<view class="right">
<span> {{item.created_at}} 提现</span>
<span> {{item.paid_at?item.paid_at+'到账':'努力打款中'}}</span>
</view>
</view>
</view>
<view class="hasmore">
{{has_more?'努力加载中~':'我是有底线的~'}}
</view>
</view>
<no-list v-else name='no-records' txt="暂无任何提现记录哦~" />
</view>
<view class="WithdrawingCoin ">
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">能量球钱包
<span>( {{ cost || '0.00' }} CNY)</span>
</view>
<view class="balance">{{ balance || '0.00' }}</view>
<view class="frozen" @click="withdrawDetail">提现记录</view>
</view>
</view>
<view class="item-name">
提现至银行卡
<view class="right">
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}
</view>
<uni-icons type="arrowright" size="12" color="#fff" />
</view>
</view>
<view class="withdrawing-content">
<view class="item">
<view style="flex: 1;">
<view class="inputTxt">提现数量</view>
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;"
placeholder="请输入提现数量" :disabled="balance===0" />
</view>
<view class="all" @click="all">全部提现</view>
</view>
</view>
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
<view class="btn" @click="actions">提现至银行卡</view>
<view class="des">预计5- 10个工作日到账 手续费: {{tax === '0'?'免手续费':tax+'%'}}</view>
</view>
</template>
<script>
import {
withdraw,
withdrawLogs,
withdrawDo
} from '@/apis/interfaces/wallet.js';
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
data() {
return {
balance: 0, // 钱包能量球数量
price: 0, // 当前能量球价格
card: '', // 银行卡号
name: '', // 姓名
password: '', //
withdraw_input: '', // 提现能量球数量
total: '', // 提现能量球转化成的钱数
page: 1,
has_more: true,
withdrawLists: [],
};
},
components: {
'number-jpan': numberJpan
},
onLoad() {
this.reset()
},
onReachBottom() {
if (this.withdrawLists.length > 0) {
if (this.has_more) {
this.withdrawLogs()
} else {
uni.showToast({
title: '没有更多~',
icon: 'none'
})
}
}
},
methods: {
// 提现基本信息
withdraw() {
withdraw().then(res => {
this.balance = Number(res.balance)
this.price = Number(res.price)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 提现记录
withdrawLogs() {
withdrawLogs({
page: this.page
}).then(res => {
this.withdrawLists = this.withdrawLists.concat(res.data)
if (res.page.has_more) {
this.page = this.page + 1
this.has_more = true
} else {
this.has_more = false
}
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 输入提现能量球数量
inputNum(e) {
let number = Number(e.detail.value)
if (number <= this.balance) {
this.total = Number(e.detail.value) * this.price
} else {
uni.showToast({
title: '最大值能超过' + this.balance+'',
icon: 'none',
duration: 2000
});
this.withdraw_input = ''
this.total = 0
}
import {
withdrawsIndexCreate,
withdrawsIndex
} from '@/apis/interfaces/withdraws';
export default {
data() {
return {
balance: 0, // 钱包能量球数量
tax: 0, // 当前手续费
cost: 1, // 每个能量球的价格
total: 0, // 约合人民币
card: '', // 银行卡号
withdraw_input: '', // 提现能量球数量
bank_accounts: 0,
bankInfo: {}
};
},
onLoad() {
this.getInfo()
},
onShow() {
if (uni.getStorageSync('refresh')) {
this.bankInfo = {}
this.getInfo()
}
},
methods: {
// 提现基本信息
getInfo() {
withdrawsIndexCreate().then(res => {
this.balance = res.balance
this.tax = res.tax
this.cost = res.cost
this.bank_accounts = res.bank_accounts.length
this.withdraw_input = Number(res.balance)
this.total = Number(res.balance) * Number(res.cost)
uni.setStorageSync('refresh', false)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 输入提现能量球数量
inputNum(e) {
let number = Number(e.detail.value)
console.log(number, this.balance)
if (number <= Number(this.balance)) {
this.total = Number(e.detail.value) * this.cost
} else {
this.total = 0
if (Number(this.balance) === 0) {
uni.showToast({
title: '当前不能提现',
icon: 'none',
duration: 2000
});
this.withdraw_input = 0
this.total = 0
} else {
uni.showToast({
title: '最大值能超过' + this.balance + '',
icon: 'none',
duration: 2000
});
this.withdraw_input = this.balance
this.total = this.balance * this.cost
}
},
// 点击全部
all() {
if (this.balance > 0) {
this.withdraw_input = this.balance
this.total = this.balance * this.price
} else {
uni.showToast({
title: '啥也没有,我也做不到~',
icon: 'none',
duration: 2000
})
}
},
// 打开密码 出发提现功能
open() {
if (this.total > 0) {
let params = {
name: this.name,
card: this.card,
total: this.withdraw_input
}
if (params.name === '' || params.card === '' || params.total === 0) {
uni.showToast({
title: '重新确认提现信息',
icon: 'none',
duration: 2000
})
} else {
this.$refs.numberPad.open()
}
} else {
uni.showToast({
title: '啥也没有,我也做不到~',
icon: 'none',
duration: 2000
})
}
},
// 输入密码成功后,,,
closeChange(e) {
uni.showLoading({
title: '提现中~'
})
let params = {
name: this.name,
card: this.card,
total: this.withdraw_input,
code: e
}
withdrawDo(params).then(res => {
uni.showToast({
title: '申请提现成功,耐心等待打款',
icon: 'none',
duration: 2000
})
this.reset()
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
duration: 2000
})
})
},
reset() {
this.name = ''
this.card = ''
this.page = 1
this.has_more = true
this.withdraw_input = ''
this.total = 0
this.withdrawLists = []
this.withdrawLogs();
this.withdraw();
}
}
}
}
},
// 点击全部
all() {
if (this.balance > 0) {
this.withdraw_input = this.balance
this.total = this.balance * this.cost
} else {
uni.showToast({
title: '啥也没有我也做不到~',
icon: 'none',
duration: 2000
})
this.withdraw_input = 0
}
},
// 提现
actions() {
let data = {
bank_account_id: this.bankInfo.bank_account_id,
amount: Number(this.withdraw_input)
}
if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({
title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
icon: 'none'
})
return;
}
if (data.amount === 0) {
uni.showToast({
title: '请输入能量球数量',
icon: 'none'
})
return;
}
uni.showModal({
title: '温馨提示',
content:this.tax === '0'?'您是否确认提现交易将免手续费':'您是否确认提现将会扣除' + this.tax + '%手续费',
confirmColor: '#7c52fc',
cancelColor: '#cacaca',
cancelText: '我再想想',
confirmText: '确认提现',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中'
})
withdrawsIndex(data).then(res => {
uni.showToast({
title: res,
icon: 'none',
duration: 3000
})
this.withdraw_input = ''
this.total = ''
setTimeout(res => {
this.getInfo()
uni.hideLoading()
}, 3000)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
}
})
},
// 添加银行卡
addBanks() {
this.$Router.push({
name: 'addBank'
})
},
// 选择银行卡
bankLists() {
this.$Router.push({
name: 'bankList'
})
},
// 提现记录
withdrawDetail() {
this.$Router.push({
name: 'withdrawList'
})
}
}
}
</script>
<style lang="scss">
page{
page {
width: 100%;
min-height: 100vh;
background-color: #fff;
background-color: #f7f7f7;
}
.hasmore {
color: #808080;
font-size: $title-size-m;
text-align: center;
padding: $padding*2;
}
.nomore {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-size: $title-size-m;
color: #808080;
margin-top: $margin*4;
.receiptCode {
color: #808080;
text-align: left;
// margin: $margin 0;
font-size: $title-size-m;
}
image {
width: 320rpx;
margin-bottom: $margin*2;
}
}
.WithdrawingCoin {
background-color: #f7f7f7;
width: 100%;
min-height: 100vh;
padding-bottom: 100rpx;
.receiptCode {
color: #808080;
text-align: left;
// margin: $margin 0;
font-size: $title-size-m;
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to right, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.WithdrawingCoin {
background-color: #fff;
width: 100%;
min-height: 100vh;
padding-bottom: 100rpx;
}
.record-bg {
position: absolute;
width: 120%;
height: 300rpx;
bottom: -50rpx;
right: -20rpx;
z-index: 1;
opacity: .5;
transform: rotate(-7deg);
}
.all {
color: $text-price;
width: 160rpx;
text-align: center;
}
.propery-content {
position: relative;
z-index: 1;
padding: $padding *3 $padding *1.4;
text-align: center;
.withdrawing-content {
min-height: 300rpx;
background-color: #fff;
box-shadow: 0 0 30rpx 1rpx rgba($color: #000000, $alpha: 0.2);
margin: $margin*1.4;
border-radius: 20rpx;
padding: $padding*1.4 ;
font-size: $title-size-m;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.item-name {
text-align: center;
padding: $padding * .6;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: $title-size *1.2;
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.item {
border-bottom: solid 1rpx #f8f8f8;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: $padding 0;
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
}
}
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
}
.input_num {
font-size: $title-size*1.5;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
.all {
color: $text-price;
width: 160rpx;
text-align: center;
}
}
}
.item-name {
text-align: center;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-image: linear-gradient(to right, #aaaaff, #aaaaff);
color: #fff;
margin: 30rpx;
padding: 30rpx;
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 34rpx;
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.cardName {
flex: 1;
}
}
}
.money {
padding-top: $padding *0.5;
}
}
.withdrawing-content {
background-color: #fff;
padding: $padding $padding $padding $padding * 2;
font-size: $title-size-m;
.lists {
color: $text-price;
}
}
/* 绑定银行卡 */
.bank-card {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 45rpx 0 35rpx;
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9 ;
margin: $margin * 2;
font-size: $title-size;
font-weight: bold;
}
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: 20rpx 0;
.ew_lists {
padding: $padding *2;
border-top: solid 4rpx #f8f8f8;
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: solid 1rpx #f8f8f8;
background-color: #fff;
padding: 0 0 $padding*0.8 0;
.inputTxt {
color: #999;
padding-bottom: 20rpx;
}
.left,
.right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
}
.input_num {
font-size: 60rpx;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
}
}
.left {
font-size: $title-size-m;
font-weight: bold;
color: #808080;
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
span:nth-child(2) {
color: $text-price;
font-size: $title-size-m;
font-weight: normal;
padding-top: $padding *0.5;
}
}
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.right {
font-size: $title-size-m;
align-items: flex-end;
color: #666;
.money {
padding-top: $padding *0.5;
}
}
span:nth-child(1) {
padding-bottom: $padding*0.5;
}
}
}
}
.lists {
color: $text-price;
}
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9;
margin: $margin * 3 $margin *2 $margin $margin*2;
font-size: $title-size;
font-weight: bold;
}
.des {
text-align: center;
color: #cacaca;
font-size: 26rpx;
}
.total {
color: $mian-color;
margin-top: 20rpx;
margin-left: 50rpx;
font-size: 36rpx;
}
</style>

View File

@@ -10,11 +10,8 @@
<view :class="['record-top-item',type==='day'?'selectTopItem':'']"
@click="selectType('day')">日账单</view>
</view>
<view class="record-mouth-year">
<view class="record-type-right">
<view class="record-title">碎片个数</view>
<view class="record-money">{{account || '0.00'}} <span></span> </view>
</view>
<!-- <view class="record-mouth-year">
<view class="record-type-left">
<u-picker mode="time" v-model="show" :params="params"
@confirm ='confirm' title ='筛选日期' start-year='2021' :end-year='currentYear'/>
@@ -23,9 +20,23 @@
<uni-icons type="arrowdown" color="#fff" size="12" />
</view>
</view>
</view> -->
<view class="record-mouth-year">
<view class="record-type-left">
<u-picker mode="time" v-model="show" :params="params" @confirm ='confirm' title ='筛选日期' start-year='2021' :end-year='currentYear'/>
<view @click="show = true">
{{date?date:'选择日期'}}
<uni-icons type="arrowdown" color="#fff" size="12" />
</view>
</view>
<view class="record-type-right">
<view :class="['pay_type_item',cointype==='all'?'pay_type_item_select':'']" @click="selectCoinType('all')">全部</view>
<view :class="['pay_type_item',cointype==='1'?'pay_type_item_select':'']" @click="selectCoinType('1')">待发放</view>
<view :class="['pay_type_item',cointype==='0'?'pay_type_item_select':'']" @click="selectCoinType('0')">已发放</view>
</view>
</view>
<!-- <view class="record-title">碎片个数</view>
<view class="record-money"><span></span>{{account || '0.00'}}</view> -->
<view class="record-title">当前碎片个数</view>
<view class="record-money">{{score || '0.00'}} <span></span></view>
</view>
<!-- 列表 -->
@@ -34,10 +45,10 @@
<image src="/static/imgs/record-icon.png" mode="widthFix" class="record-icon" />
<view class="">
<view class="record-list-item-top">
<view class="title ellipsis-2">完成任务获得碎片</view>
<view class="money" >{{cointype==='in'?'+':'-'}}5</view>
<view class="title ellipsis-1">{{item.remark}} <span class='tags'>{{item.frozen.text}}</span></view>
<view class="money" >{{item.amount}}</view>
</view>
<view class="record-list-item-date">2021-12-22 12:12:12</view>
<view class="record-list-item-date">{{item.created_at}}</view>
</view>
</view>
</view>
@@ -50,15 +61,14 @@
</template>
<script>
import {chaineb} from '@/apis/interfaces/mine';
import {userAccoutScores} from '@/apis/interfaces/withdraws';
export default {
data() {
return {
lists:[1,1.1,1,1],
lists:[],
has_next_page:true,
page:1,
type:'year', // 统计类型day日month月year年
cointype:'in',// in 收入 out 支出
date:new Date().toISOString().slice(0,4), // 日Y-m-d月Y-m年Y
params: {
year: true,
@@ -69,10 +79,11 @@
currentDay:new Date().toISOString().slice(0,10),
currentMonth:new Date().toISOString().slice(0,7),
currentYear:new Date().toISOString().slice(0,4),
account:''
score:'',
cointype:'all'
}
},
onLoad(){
onShow(){
this.getList()
},
onReachBottom(){
@@ -94,12 +105,13 @@
page:this.page,
type:this.type,
date:this.date,
cointype:this.cointype
frozen:this.cointype
}
chaineb(data).then(res => {
this.account = res.account
this.lists = this.lists.concat(res.lists)
this.has_next_page = res.has_next_page
userAccoutScores(data).then(res => {
console.log(res)
this.score = res.score
this.lists = this.lists.concat(res.lists.data)
this.has_next_page = res.lists.page.has_more
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
@@ -149,8 +161,8 @@
this.type = type
this.params= {
year: true,
month: false,
day: false
month: true,
day: true
}
this.date = this.currentDay
this.reset()
@@ -183,21 +195,76 @@
<style lang="scss" scoped>
.Record {
width: 100%;
height: 100vh;
min-height: 100vh;
padding-top: 30rpx;
background-color: #fff;
}
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.record-icon{
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.tags{
padding-left: 20rpx;
color: #ff5500;
font-size: 24rpx;
}
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 40rpx;
font-weight: bold;
// padding-top: 20rpx;
position: relative;
top: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
.record-top {
width: calc(100% - 60rpx);
height: 360rpx;
// height: 360rpx;
background-image: linear-gradient(to right, #7c52fc, #976dff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.4);
margin: 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: relative;
padding: 10rpx 50rpx 20rpx 50rpx;
padding: 30rpx 30rpx 50rpx 50rpx;
z-index: 1;
.record-bg {
@@ -237,7 +304,7 @@
z-index: 2;
color: #fff;
font-size: 30rpx;
margin-top: 20rpx;
// margin-top: 20rpx;
.record-type-left {
display: flex;
@@ -253,15 +320,14 @@
.record-type-right {
display: flex;
flex-direction: column;
align-items: flex-start;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
font-size: 24rpx;
flex: 1;
.pay_type_item {
margin: 0 10rpx;
// margin: 0 10rpx;
padding: 2rpx 20rpx;
border-radius: 30rpx;
border: solid 1rpx rgba($color: #000000, $alpha: 0);
@@ -276,6 +342,7 @@
font-size: 28rpx;
color: #fff;
padding:0 0 20rpx 0;
margin-top: 30rpx;
}
.record-money {
@@ -292,47 +359,6 @@
}
}
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 20rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
.record-icon{
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 32rpx;
font-weight: bold;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
</style>

View File

@@ -1,125 +0,0 @@
<template>
<view>
<form>
<!-- 副标题 -->
<view class="sub-title">输入您的钱包助记词导入</view>
<!-- 助记词 -->
<view class="word">
<textarea placeholder="输入助记词"></textarea>
</view>
<!-- 设置钱包密码 -->
<view class="password">
<view class="group">
<view class="inputs">
<label>钱包名称</label>
<input type="text" placeholder="输入钱包名称" />
</view>
</view>
<view class="title">不少于8个字符建议包含大小写符号特殊字符</view>
<view class="group">
<view class="inputs">
<label>密码</label>
<input type="password" placeholder="请设置密码" />
</view>
<view class="inputs">
<label>确认密码</label>
<input type="password" placeholder="请确认密码" />
</view>
</view>
</view>
<!-- 按钮 -->
<view class="buttons">
<view class="text">什么是助记词</view>
<button type="default" form-type="submit">开始导入</button>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
// 副标题
.sub-title{
line-height: 90rpx;
color: $text-gray;
text-align: center;
margin: $margin;
font-size: $title-size-m;
}
// 助记词
.word{
background-color: white;
margin: $margin * 2;
padding: $padding + 10;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
& textarea{
height: 200rpx;
}
}
// 设置密码
.password{
padding: 0 $padding * 2;
.title{
margin-top: $margin * 2;
font-size: $title-size-m;
color: $mian-color;
}
.group{
margin-top: $margin;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
.inputs{
padding: $padding $padding + 10;
border-bottom: solid 1rpx $border-color;
&:last-child{
border-bottom: none;
}
label{
color: $text-gray;
font-size: $title-size-m;
}
input{
height: 70rpx;
line-height: 70rpx;
font-size: $title-size;
}
}
}
}
// 按钮
.buttons{
padding: $padding * 2;
.text{
text-align: center;
line-height: 90rpx;
height: 90rpx;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $mian-color;
font-weight: bold;
}
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
}
}
</style>

View File

@@ -1,144 +0,0 @@
<template>
<view class="animate__animated animate__fadeInRight">
<!-- 数字资产 -->
<view class="property">
<view class="title">总资产()</view>
<view class="number">0.00</view>
</view>
<!-- 资产列表 -->
<view class="lists">
<view class="lists-header">
资产列表
<uni-icons type="plus" size="24" color="#aa55ff"></uni-icons>
</view>
<view class="item" v-for="(item, index) in 2" :key="index" @click="propertyInfo(item)">
<view class="cost">
<image class="logo" src="" mode="" />
<view class="title ellipsis">OC COIN</view>
<view class="text ellipsis">0.21</view>
</view>
<view class="balance">
<view class="title ellipsis">120,330.00</view>
<view class="text ellipsis">25269.3000</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods:{
propertyInfo(e){
console.log(e)
uni.navigateTo({
url: './property'
})
}
}
}
</script>
<style scoped>
</style>
<style lang="scss" scoped>
// 数字资产
.property{
overflow: hidden;
position: relative;
margin-top: $margin;
margin-left: $margin + ($margin / 2);
background-color: $mian-color;
border-radius: $radius 0 0 $radius;
padding: ($padding * 3) ($padding * 3) ($padding * 3) ($padding * 2);
color: white;
font-weight: bold;
&::before,&::after{
background-color: rgba($color: $red-color, $alpha: .03);
border-radius: 50%;
content: " ";
position: absolute;
}
&::before{
top: -300rpx;
left: 40%;
height: 400rpx;
width: 400rpx;
}
&::after{
bottom: -200rpx;
left: -100rpx;
height: 300rpx;
width: 300rpx;
}
.title{
font-size: $title-size;
}
.number{
font-size: $title-size + 18;
}
}
// 资产列表
.lists{
padding: $margin + ($margin / 2);
.lists-header{
display: flex;
font-size: $title-size + 2;
color: $text-color;
font-weight: bold;
padding: $padding 0 ($padding/2) 0;
justify-content: space-between;
justify-items: center;
align-items: center;
}
.item{
background-color: white;
border-radius: $radius;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
margin-top: $margin;
padding: $padding * 2;
display: flex;
&:first-child{
margin-top: 0;
}
.cost{
position: relative;
margin-right: $margin;
padding-left: 108rpx;
width: 50%;
box-sizing: border-box;
.logo{
position: absolute;
left: 0;
top: 0;
width: 88rpx;
height: 88rpx;
border-radius: 50%;
background-color: $border-color;
margin-right: $margin;
}
}
.balance{
padding-left: $padding;
width: 50%;
text-align: right;
box-sizing: border-box;
}
.title{
font-weight: bold;
font-size: $title-size;
}
.text{
font-size: $title-size-m;
color: $text-gray;
}
}
}
</style>

View File

@@ -1,108 +0,0 @@
<template>
<view>
<!-- 提示信息 -->
<view class="prompt">
请按照顺序记录并确保正确备份助记词
</view>
<!-- 助记词 -->
<ul class="mnemonic">
<li v-for="(item, index) in mnemonic" :key="index">{{item}}</li>
</ul>
<!-- 按钮 -->
<view class="buttons">
<view class="text">助记词是用户账户的唯一标识不能分享给他人掌握该助记词即可控制该账户与钱包</view>
<button type="default" @click="goto('/pages/wallet/validation')">验证助记词</button>
</view>
<!-- <view class="skip">暂时不验证<navigator url="/pages/index/index" open-type="switchTab">点此跳过</navigator></view> -->
</view>
</template>
<script>
import { seed } from "../../apis/interfaces/wallet"
export default {
data() {
return {
mnemonic: [], // 助记词
sign : '' // 校验签名
}
},
onLoad() {
seed().then(res => {
this.mnemonic = res.seed.split(' ')
this.sign = res.sign
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
methods: {
goto(url){
uni.redirectTo({
url: url + '?seed=' + this.mnemonic + '&sign=' + this.sign
})
}
}
}
</script>
<style lang="scss" scoped>
// 提示信息
.prompt{
color: $text-gray;
text-align: center;
line-height: 90rpx;
font-size: $title-size-m;
}
// 跳过
.skip{
padding: $padding * 2;
text-align: center;
color: $text-gray;
navigator{
color: $mian-color;
margin-left: $margin/2;
display: inline-block;
}
}
// 助记词
.mnemonic{
margin: $margin $margin * 2;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
padding: $padding;
list-style: none;
display: flex;
flex-wrap: wrap;
li{
text-align: center;
height: 58rpx;
line-height: 58rpx;
width: 58rpx;
margin: $margin / 2;
color: $text-color;
background: rgba($color: $border-color, $alpha: .4);
}
}
// 按钮
.buttons{
padding: $padding $padding * 2;
.text{
text-align: center;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $red-color;
}
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
}
}
</style>

View File

@@ -1,108 +0,0 @@
<template>
<view>
<!-- 私钥 -->
<view class="keys">
<view class="title">您已接收OC Chain托管</view>
<view class="key">{{key || '-'}}</view>
<view class="copykey" @click="copykey">复制我的私钥</view>
</view>
<!-- 疑问 -->
<view class="doubt" v-if="rules.length > 0">
<view class="doubt-item" v-for="(item, index) in rules" :key="index">
<view class="title">{{item.title || '-'}}</view>
<view class="content">{{item.description || '-'}}</view>
</view>
</view>
<!-- 免责说明 -->
<view class="liability">
<navigator url="/pages/wallet/cmsWithDraw">免责条款</navigator>
</view>
</view>
</template>
<script>
import { privatekey, keyrules } from '@/apis/interfaces/wallet'
export default {
data() {
return {
key: "",
rules: []
};
},
mounted() {
Promise.all([privatekey(this.$Route.query.password), keyrules()]).then(res => {
let privatekey = res[0],
keyrules = res[1]
this.key = privatekey.private_key
this.rules = keyrules
})
},
methods:{
copykey(){
uni.setClipboardData({
data: this.key
})
}
}
}
</script>
<style lang="scss">
.keys{
margin: $margin * 2;
background: white;
padding: $padding * 2;
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
border-radius: $radius;
.title{
text-align: center;
font-weight: bold;
font-size: $title-size + 4;
color: $text-color;
}
.key{
padding: $padding * 2 0;
text-align: center;
color: $mian-color;
word-wrap: break-word;
}
.copykey{
background-color: $mian-color;
color: white;
height: 95rpx;
line-height: 95rpx;
text-align: center;
font-size: $title-size;
border-radius: $radius-m;
font-weight: bold;
}
}
.doubt{
margin: $margin $margin * 2;
.doubt-item{
padding: $padding 0;
.title{
font-weight: bold;
color: $text-color;
line-height: 50rpx;
font-size: $title-size + 2;
}
.content{
color: $text-gray-lg;
font-size: $title-size-m;
line-height: 40rpx;
}
}
}
.liability{
text-align: center;
color: $text-gray;
@extend .ios-bottom;
navigator{
font-size: $title-size-sm;
display: inline-block;
line-height: 90rpx;
padding: 0 ($padding * 2);
}
}
</style>

View File

@@ -3,9 +3,11 @@
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">能量球 ( {{ price || '0' }} CNY)</view>
<view class="balance">{{ balance.balance || '0' }}</view>
<view class="frozen">{{ balance.frozen || '0' }} 冻结中</view>
<view class="currency">能量球钱包
<span>( {{ price || '0.00' }} CNY)</span>
</view>
<view class="balance">{{ balance.balance || '0.00' }}</view>
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
<view class="balance-flex">
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
@@ -29,7 +31,7 @@
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码"/>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
@@ -44,6 +46,7 @@
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
@@ -67,45 +70,64 @@
};
},
onShow() {
Promise.all([
sum(),
price(),
logs()
]).then(res => {
this.balance = res[0]
this.price = res[1]
this.logs = res[2]
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
this.getsum()
this.getlog()
},
methods: {
getsum() {
sum().then(res => {
this.balance = res
this.price = res.price
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥
showPrivatekey(pages){
showPrivatekey(pages) {
this.passwordPages = pages
this.$refs.showPassword.open('center')
},
// 验证私钥
payPassword(type){
if(type === 'confirm'){
if(this.password === '') {
payPassword(type) {
if (type === 'confirm') {
if (this.password === '') {
uni.showToast({
title: '请输入安全密码',
icon : 'none'
icon: 'none'
})
return
}
securityCheck(this.password).then(res => {
this.$refs.showPassword.close()
switch (this.passwordPages){
switch (this.passwordPages) {
case 'privatekey':
this.$Router.push({name:'Privatekey', params: {password: this.password}})
this.$Router.push({
name: 'Privatekey',
params: {
password: this.password
}
})
break;
case 'resetPassword':
this.$Router.push({name:'ResetPassword', params: {password: this.password}})
this.$Router.push({
name: 'ResetPassword',
params: {
password: this.password
}
})
break;
}
this.password = ''
@@ -135,13 +157,22 @@
uni.showModal({
title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
cancelText: '复制',
cancelColor: '#b11eff',
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
success: (res) => {
if (res.cancel) {
uni.setClipboardData({
data: this.balance.address
})
if (res.confirm) {
const result = h5Copy(this.balance.address)
if (result === false) {
uni.showToast({
title:'不支持',
})
} else {
uni.showToast({
title:'复制成功',
icon:'none'
})
}
}
}
})
@@ -173,26 +204,30 @@
</script>
<style lang="scss" scoped>
.propertyIndex{
.propertyIndex {
width: 100%;
min-height: 100vh;
background-color: #FFFFFF;
}
// 验证密码弹出层
.validationPassword{
.validationPassword {
background-color: white;
border-radius: $radius-m;
width: 70vw;
.from{
.from {
padding: $padding*2;
.title{
.title {
text-align: center;
font-size: $title-size;
padding-bottom: $padding*2;
font-weight: bold;
color: $text-price;
}
.input{
.input {
text-align: center;
height: 90rpx;
font-size: $title-size;
@@ -201,25 +236,30 @@
padding: 0 ($padding*2);
}
}
.buttons{
.buttons {
display: flex;
border-top: solid 1rpx $border-color;
.button{
.button {
width: 50%;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
text-align: center;
box-sizing: border-box;
&.cancel{
&.cancel {
border-right: solid 1rpx $border-color;
color: $text-gray;
}
&.confirm{
&.confirm {
color: $text-price;
}
}
}
// .button{
// background-color: $text-price;
// color: white;
@@ -238,6 +278,7 @@
// background-color: transparent;
// }
}
// 账户
.propery {
position: relative;
@@ -245,16 +286,18 @@
background-image: linear-gradient(to right, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 120%;
width: 100%;
height: 300rpx;
bottom: -10rpx;
right: -20rpx;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
transform:rotate(-7deg);
transform: rotate(0);
}
// &::before {
// position: absolute;
// left: 0;
@@ -294,7 +337,6 @@
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {

View File

@@ -1,150 +0,0 @@
<template>
<view>
<!-- 设置钱包密码 -->
<view class="password">
<view class="prompt">请设置6位数字密码建议不要使用连续的数字</view>
<view class="group">
<view class="inputs">
<label>密码</label>
<input type="digit" v-model="password" maxlength="6" password placeholder="请设置新密码" />
</view>
<view class="inputs">
<label>确认密码</label>
<input type="digit" v-model="verify" maxlength="6" password placeholder="请确认新密码" />
</view>
</view>
</view>
<!-- 按钮 -->
<view class="buttons">
<button type="default" form-type="submit" @click="createWallet">确认</button>
</view>
</view>
</template>
<script>
import {
securityReset
} from '@/apis/interfaces/wallet'
export default {
data() {
return {
password: '',
verify: '',
oldPassword: ''
}
},
onLoad() {
this.oldPassword = this.$Route.query.password
},
methods: {
// 激活钱包
createWallet() {
if (this.password === '' || this.verify === '') {
uni.showToast({
icon: 'none',
title: '请设置密码'
})
return
}
if (this.password !== this.verify) {
uni.showToast({
icon: 'none',
title: '两次输入密码不一致'
})
return
}
securityReset({
new_code: this.password,
old_code: this.oldPassword
}).then(res => {
uni.showModal({
title: '提示',
content: '密码已重置',
showCancel:false,
success: res=> {
uni.navigateBack()
}
})
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
}
}
}
</script>
<style lang="scss" scoped>
// 副标题
.sub-title {
color: $text-gray;
text-align: center;
margin: $margin * 2 $margin;
font-size: $title-size-m;
}
// 设置密码
.password {
padding: 0 $padding * 2;
.prompt {
margin-top: $margin * 2;
font-size: $title-size-m;
color: $mian-color;
}
.group {
margin-top: $margin;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
.inputs {
padding: $padding $padding + 10;
border-bottom: solid 1rpx $border-color;
&:last-child {
border-bottom: none;
}
label {
color: $text-gray;
font-size: $title-size-m;
}
input {
height: 70rpx;
line-height: 70rpx;
font-size: $title-size;
}
}
}
}
// 按钮
.buttons {
padding: $padding * 2;
.text {
text-align: center;
line-height: 90rpx;
height: 90rpx;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $mian-color;
font-weight: bold;
}
button {
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
}
}
</style>

View File

@@ -1,77 +0,0 @@
<template>
<view>
<view class="webkit-box results">
<uni-icons type="checkbox-filled" size="88" color="#009b69"></uni-icons>
<view class="title">交易已提交</view>
<view class="sub-title">预计10秒内到账可在交易记录中查询以实际到账时间为准</view>
<view class="hash">
<view class="hash-title">交易哈希</view>
<view class="hash-text">{{hash}}</view>
</view>
<button class="results-button" type="default" @click="navBack">返回</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
hash: ''
};
},
onLoad(e){
this.hash = e.hash
},
methods:{
navBack(){
uni.navigateBack()
}
}
}
</script>
<style lang="scss" scoped>
.results{
height: 100vh;
box-sizing: border-box;
text-align: center;
padding-left: $padding * 3;
padding-right: $padding * 3;
padding-bottom: 20vh;
.title{
font-size: $title-size + 8;
color: $text-color;
font-weight: bold;
line-height: 80rpx;
padding: $padding 0;
}
.sub-title{
color: $text-gray;
line-height: 40rpx;
}
.hash{
background-color: white;
padding: $padding * 2;
border-radius: $radius-lg;
margin-top: $margin * 2;
font-size: $title-size;
color: $text-color;
.hash-title{
padding-bottom: $padding;
}
.hash-text{
word-break:break-all;
}
}
.results-button{
margin-top: $margin * 3;
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
color: white;
font-size: $title-size;
font-weight: bold;
}
}
</style>

View File

@@ -1,216 +0,0 @@
<template>
<view>
<!-- 账户余额 -->
<view class="transfer-block">
<view class="unit">OCC</view>
<view class="transfer-flex">
<view class="item ellipsis">
<label>数量</label>{{balance.balance || '0.00'}}
</view>
<view class="item ellipsis">
<label>估值(CNY)</label>{{cny || '0.00'}}
</view>
</view>
</view>
<view class="sub-title">
<text>请认真确认地址及数量地址错误无法找回</text>
</view>
<!-- 转账信息 -->
<view class="password">
<view class="group">
<view class="inputs input-scan">
<label>接收地址</label>
<input type="text" placeholder="请输入接收地址" v-model="address" />
<view class="input-scan-icon" @click="scanCode">
<uni-icons type="scan" size="22" color="#009b69"></uni-icons>
</view>
</view>
<view class="inputs">
<label>转账数量</label>
<input type="number" placeholder="请输入转账数量" v-model="number" />
</view>
</view>
<view class="group">
<view class="inputs">
<label>交易密码</label>
<input type="password" placeholder="请输入安全密码" v-model="password" />
</view>
</view>
</view>
<!-- 按钮 -->
<view class="buttons">
<button type="default" @click="submitTransfer">转账</button>
</view>
</view>
</template>
<script>
import { sum, price, transfer } from '@/apis/interfaces/wallet'
export default {
data() {
return {
balance: {},
cny: '0.00',
address: '',
number: '',
password: ''
}
},
onLoad(e){
if(e.hashAddress) this.address = e.hashAddress
},
mounted() {
Promise.all([
sum(),
price()
]).then(res => {
this.balance = res[0]
if (res[0].balance > 0) this.cny = (res[1] * res[0].balance).toFixed(2)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
methods: {
// 转账
submitTransfer(){
if(this.address === '' || this.number === '' || this.password === ''){
let messageText
if(this.address === '') messageText = '请输入接收地址'
else if(this.number === '') messageText = '请输入转账数量'
else if(this.password === '') messageText = '请输入安全密码'
uni.showToast({
icon: 'none',
title: messageText
})
return
}
// 提交转账信息
transfer({
to: this.address,
amount: this.number,
security_code: this.password
}).then(res => {
uni.redirectTo({
url: './results?hash=' + res.txHash + '&number=' + this.number
})
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 扫码
scanCode(){
uni.scanCode({
scanType: ['qrCode'],
success: res=> {
this.address = res.result
}
})
}
}
}
</script>
<style lang="scss" scoped>
// 账户余额
.transfer-block{
background-color: white;
margin: $margin * 2;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
padding: $padding $padding + 10;
.unit{
font-weight: bold;
font-size: $title-size + 10;
line-height: 90rpx;
color: $text-color;
}
.transfer-flex{
display: flex;
padding: $padding 0;
border-top: solid 1rpx $border-color;
.item{
width: 50%;
font-size: $title-size-m;
& > label{
color: $text-gray;
padding-right: $padding/2;
}
}
}
}
// 提示信息
.sub-title{
color: $text-gray;
text-align: center;
margin: $margin * 2 $margin;
font-size: $title-size-m;
}
// 转账信息
.password{
padding: 0 $padding * 2;
.group{
margin-top: $margin;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
.inputs{
padding: $padding $padding + 10;
border-bottom: solid 1rpx $border-color;
&:last-child{
border-bottom: none;
}
label{
color: $text-gray;
font-size: $title-size-m;
}
input{
height: 70rpx;
line-height: 70rpx;
font-size: $title-size;
}
}
.input-scan{
position: relative;
padding-right: ($padding*2) + 70;
.input-scan-icon{
position: absolute;
bottom: $padding;
right: $padding;
height: 70rpx;
width: 70rpx;
line-height: 70rpx;
text-align: center;
}
}
}
}
// 按钮
.buttons{
padding: $padding * 2;
.text{
text-align: center;
line-height: 90rpx;
height: 90rpx;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $mian-color;
font-weight: bold;
}
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
}
}
</style>

View File

@@ -1,169 +0,0 @@
<template>
<view>
<!-- 提示信息 -->
<view class="prompt">
验证您的钱包助记词
</view>
<!-- 助记词 -->
<view class="mnemonic">
<view
class="item"
v-for="(item, index) in validation"
:key="index"
:class="item === null ? 'hide': ''"
@click="onKeys('removeKey', index)"
>{{ item }}</view>
</view>
<!-- 选择助记词 -->
<block v-if="mnemonic.length > 0">
<view class="mnemonic-title">
按顺序填写助记词
</view>
<view class="mnemonic-select">
<view class="item" v-for="(item, index) in mnemonic" :key="index" @click="onKeys('addKey', index)">{{ item }}</view>
</view>
</block>
<!-- 按钮 -->
<view class="buttons">
<button type="default" @click="verifyMnemonic">验证</button>
</view>
</view>
</template>
<script>
import { hash } from "../../apis/interfaces/wallet"
export default {
data() {
return {
validation : new Array(15).fill(null), // 验证key
mnemonic : [], // 助记词key
sign : '', // 助记词校验签名
seedString : '', // 助记词原词
}
},
onLoad(e) {
let seed = e.seed.split(',')
seed.sort(() => {
return Math.random() - .5
});
this.mnemonic = seed
this.sign = e.sign
this.seedString = e.seed
},
methods: {
// 填写助记词
onKeys(type, index){
if(type === 'addKey') {
this.$set(this.validation, this.validation.findIndex(val => val === null), this.mnemonic[index])
this.$delete(this.mnemonic, index)
return
}
if(type === 'removeKey' && this.validation[index] !== null) {
this.mnemonic.push(this.validation[index])
this.$delete(this.validation, index)
this.validation.push(null)
}
},
// 验证助记词
verifyMnemonic(){
if(this.validation.findIndex(val => val === null) > -1){
uni.showToast({
title: '请完整填写助记词',
icon : 'none'
})
return
}
let seed = this.validation.toString().replace(/,/g, ',')
if (this.seedString !== seed) {
uni.showToast({
title: '验证失败,请确认您的助记词',
icon : 'none'
})
return
}
uni.redirectTo({
url: './create'
})
}
}
}
</script>
<style lang="scss" scoped>
// 提示信息
.prompt{
color: $text-gray;
text-align: center;
line-height: 90rpx;
font-size: $title-size-m;
}
// 选择助记词
.mnemonic-title{
padding-top: $padding * 2;
margin: 0 $margin * 2;
font-size: $title-size-m;
color: $mian-color;
}
.mnemonic-select{
display: flex;
flex-wrap: wrap;
padding: $padding $padding + $padding / 2;
.item{
background-color: white;
line-height: 68rpx;
height: 68rpx;
width: 68rpx;
text-align: center;
margin: $margin / 2;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
}
}
// 助记词
.mnemonic{
margin: $margin ($margin * 2);
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
padding: $padding;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
.item{
background: rgba($color: $border-color, $alpha: .4);
width: 58rpx;
height: 58rpx;
line-height: 58rpx;
text-align: center;
color: $text-color;
margin: $margin / 2;
&.hide{
border:dashed 1px $border-color;
box-sizing: border-box;
background-color: white;
}
}
}
// 按钮
.buttons{
padding: $padding $padding * 2;
.text{
text-align: center;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $red-color;
}
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
color: white;
font-weight: bold;
font-size: $title-size;
&[disabled]{
background: rgba($color: $mian-color, $alpha: .8);
}
}
}
</style>

View File

@@ -0,0 +1,440 @@
<template>
<view class="Record">
<view class="record-top">
<image src="/static/imgs/account-bg.png" mode="widthFix" class="record-bg" />
<view class="record-top-nav">
<view :class="['record-top-item',type==='year'?'selectTopItem':'']" @click="selectType('year')">年账单
</view>
<view :class="['record-top-item',type==='month'?'selectTopItem':'']" @click="selectType('month')">月账单
</view>
<view :class="['record-top-item',type==='day'?'selectTopItem':'']" @click="selectType('day')">日账单</view>
</view>
<view class="record-mouth-year">
<view class="record-type-right">
<view class="record-title">当前能量球
<view class="record-type-left">
<u-picker mode="time" v-model="show" :params="params" @confirm='confirm' title='筛选日期'
start-year='2021' :end-year='currentYear' />
<view @click="show = true">
{{date?date:'选择日期'}}
<uni-icons type="arrowdown" color="#fff" size="12" />
</view>
</view>
</view>
<view class="record-money">{{account || '0.00'}} </view>
</view>
</view>
<!-- <view class="record-title">碎片个数</view>
<view class="record-money"><span></span>{{account || '0.00'}}</view> -->
</view>
<!-- 列表 -->
<view class="ew_lists" v-if="lists.length>0">
<view style="padding-top: 30rpx;" v-for="(item,index) in lists " :key="index">
<view class="receiptCode">
<image class="logo" src="/static/imgs/record-icon.png" mode="widthFix" />
<view class="title">{{item.way}}</view>
<span class='status'> {{item.status.status_text}}</span>
</view>
<view class="item">
<view class="left">
<span>
能量球:{{item.quantity}}
<span class='left-des'>金额{{item.take}} 手续费{{item.tax}}</span>
</span>
<span>{{item.create_at}}</span>
</view>
<!-- <view class="right">
<span> {{item.create_at}}</span>
<span> -</span>
</view> -->
</view>
</view>
</view>
<!-- 无列表 -->
<no-list v-if="lists.length === 0" name='no-record' txt="没有任何提现记录 ~ " />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
withdrawsIndexLists
} from '@/apis/interfaces/withdraws';
export default {
data() {
return {
lists: [],
has_next_page: true,
page: 1,
type: 'year', // 统计类型day日month月year年
date: new Date().toISOString().slice(0, 4), // 日Y-m-d月Y-m年Y
params: {
year: true,
month: false,
day: false
},
show: false, // 显示
currentDay: new Date().toISOString().slice(0, 10),
currentMonth: new Date().toISOString().slice(0, 7),
currentYear: new Date().toISOString().slice(0, 4),
account: ''
}
},
onLoad() {
this.getList()
},
onReachBottom() {
if (this.has_next_page) {
this.page = this.page + 1
this.getList()
} else {
this.$refs.uToast.show({
title: '吼吼吼~我是有底的~',
type: 'primary',
duration: 3000
})
}
},
methods: {
// 获取列表
getList() {
let data = {
page: this.page,
type: this.type,
date: this.date,
}
withdrawsIndexLists(data).then(res => {
console.log(res)
this.account = res.all
this.lists = this.lists.concat(res.lists.data)
this.has_next_page = res.lists.page.has_more
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
selectCoinType(type) {
if (this.cointype !== type) {
this.cointype = type
this.reset()
}
},
// 重置
reset() {
this.page = 1
this.lists = []
this.has_next_page = true
this.getList()
},
// 选择 年 月 日 切换要重置数据
selectType(type) {
if (this.type !== type) {
switch (type) {
case 'year':
this.type = type
this.params = {
year: true,
month: false,
day: false
}
this.date = this.currentYear
this.reset()
break;
case 'month':
this.type = type
this.params = {
year: true,
month: true,
day: false
}
this.date = this.currentMonth
this.reset()
break;
case 'day':
this.type = type
this.params = {
year: true,
month: true,
day: true
}
this.date = this.currentDay
this.reset()
break;
}
}
},
// 点击确认按钮
confirm(e) {
let type = this.type
switch (type) {
case 'year':
this.date = e.year
this.reset()
break;
case 'month':
this.date = e.year + '-' + e.month
this.reset()
break;
case 'day':
this.date = e.year + '-' + e.month + '-' + e.day
this.reset()
break;
}
}
}
}
</script>
<style lang="scss" scoped>
.Record {
width: 100%;
min-height: 100vh;
padding-top: 30rpx;
background-color: #fff;
}
.record-list {
padding: 20rpx 30rpx;
.record-list-item {
padding: 30rpx 0;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.record-icon {
width: 60rpx;
margin-right: 20rpx;
}
.record-list-item-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 600rpx;
.title {
font-size: 28rpx;
width: 600rpx;
color: #444;
}
.money {
color: #ee4c47;
font-size: 40rpx;
font-weight: bold;
// padding-top: 20rpx;
position: relative;
top: 20rpx;
}
}
.record-list-item-date {
font-size: 26rpx;
color: #a6a6a6;
margin-top: 10rpx;
}
}
}
.record-top {
width: calc(100% - 60rpx);
height: 360rpx;
background-image: linear-gradient(to right, #7c52fc, #976dff);
box-shadow: 0 10rpx 20rpx 0rpx rgba($color: #976dff, $alpha: 0.4);
margin: 0 30rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: relative;
padding: 10rpx 50rpx 20rpx 50rpx;
z-index: 1;
.record-bg {
position: absolute;
width: 100%;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
}
.record-top-nav {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
.record-top-item {
margin: 40rpx 20rpx;
font-size: 30rpx;
font-weight: 500;
color: #fff;
}
.selectTopItem {
border-bottom: solid 4rpx #fff;
}
}
.record-mouth-year {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
box-sizing: border-box;
position: relative;
z-index: 2;
color: #fff;
font-size: 30rpx;
margin-top: 20rpx;
.record-type-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
uni-icons {
margin-left: 4rpx;
}
}
.record-type-right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
font-size: 24rpx;
flex: 1;
.pay_type_item {
margin: 0 10rpx;
padding: 2rpx 20rpx;
border-radius: 30rpx;
border: solid 1rpx rgba($color: #000000, $alpha: 0);
}
.pay_type_item_select {
border: solid 1rpx #f7f7f7;
}
}
}
.record-title {
font-size: 28rpx;
color: #fff;
padding: 0 0 20rpx 0;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
justify-content: space-between;
box-sizing: border-box;
}
.record-money {
color: #fff;
font-size: 70rpx;
font-weight: bold;
span {
font-size: 24rpx;
font-weight: 400;
padding-left: 20rpx;
margin-right: 4rpx;
}
}
}
.ew_lists {
padding: $padding;
border-top: solid 4rpx #f8f8f8;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: solid 1rpx #f8f8f8;
background-color: #fff;
padding: 0 0 $padding*0.8 50rpx;
.left,
.right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
margin-top: 10rpx;
}
.left {
font-size: 30rpx;
padding-top: 10rpx;
color: $text-price;
.left-des {
color: #999;
font-size: 26rpx;
margin-left: 20rpx;
}
span:nth-child(2) {
color: #C0C0C0;
font-weight: normal;
font-size: 26rpx;
padding-top: $padding *0.5;
}
}
.right {
font-size: $title-size-m;
align-items: flex-end;
color: #999;
span:nth-child(1) {
padding-bottom: $padding*0.5;
}
}
}
.receiptCode {
font-size: 32rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.title {
flex: 1;
}
.logo {
width: 40rpx;
margin-right: 10rpx;
}
.status {
color: #999;
font-size: 26rpx;
}
}
}
</style>

46
pages/wxAuth/wxAuth.vue Normal file
View File

@@ -0,0 +1,46 @@
<template>
<view class="content vertical">
<u-loading mode="flower"></u-loading>
</view>
</template>
<script>
import { wxCode, wxOpenid } from '@/apis/interfaces/wx'
export default {
data() {
return {
};
},
created() {
// 微信鉴权
if(!this.$Route.query.code){
wxCode({
pages: 'wechat-auth'
}).then(res => {
window.location.href = res
})
}else{
wxOpenid({
code: this.$Route.query.code
}).then(res => {
this.$store.commit('setCode', res.openid)
this.$Router.replaceAll({name: 'Index'})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss">
.content{
background: white;
height: 100vh;
text-align: center;
}
</style>

13
public/codeCanvas.js Normal file
View File

@@ -0,0 +1,13 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 生成二维码
*/
export default class canvasCode {
code(){
}
}

View File

@@ -123,13 +123,6 @@ class userAuth {
icon : 'none'
})
}
/**
* 处理登录状态维护
*/
updAuthToken(){
}
}
export default userAuth

View File

@@ -8,26 +8,34 @@
import { RouterMount, createRouter } from 'uni-simple-router';
import store from '../store/index'
// const ROUTESPATH = ROUTES.map(val => {
// val.component: ()=> import('@/' + val.path + '.vue')
// console.log(val)
// })
const router = createRouter({
h5: {
paramsToQuery: true
},
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
routes: [...ROUTES, {
path: '*',
name:'404',
component: ()=> import('@/pages/404/404')
}]
})
// 全局路由前置守卫
router.beforeEach((to, from, next) => {
const token = store.getters.getToken || uni.getStorageSync('token')
// 检查是否需要微信授权
if(store.getters.getCode === '' && to.name != 'wxAuth'){
next({
name: 'wxAuth'
})
}
// 检查是否需要登录
if(to.auth && token === ''){
next({
name: 'Login'
name: 'Login',
params: {
toName: to.name
}
})
return
}

View File

@@ -10,9 +10,12 @@ $text-color: #333;
$text-gray: #555;
$text-gray-m: #999;
$text-price: #8b64fd;
$mian-color: #b11eff;
$mian-color: #8b64fd;
$mian-color-deep: #824f9a;
// 矿机
$block-color: #2b2449;
// 边框颜色
$border-color: #ddd;
$border-color-lg: #eff4f2;
@@ -76,20 +79,6 @@ $padding: 30rpx;
-webkit-line-clamp: 2;
}
.ellipsis-1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ellipsis-2 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.ellipsis-3 {
display: -webkit-box;
overflow: hidden;

BIN
static/404/404.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Some files were not shown because too many files have changed in this diff Show More