移出冗余代码
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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({
|
||||
@@ -36,7 +27,6 @@ const getSms = (data) =>{
|
||||
}
|
||||
|
||||
export {
|
||||
keyAuth,
|
||||
smsAuth,
|
||||
getSms
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -97,9 +97,6 @@
|
||||
};
|
||||
},
|
||||
created(){
|
||||
|
||||
console.log(this.$Route)
|
||||
|
||||
// 读取配置信息
|
||||
appliesCreate().then(res=>{
|
||||
this.industry = res
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -90,7 +90,6 @@
|
||||
|
||||
<script>
|
||||
import { chain, crystals, thawlog } from '@/apis/interfaces/chain'
|
||||
import { certified, security } from '@/apis/interfaces/index'
|
||||
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 {
|
||||
@@ -233,7 +232,6 @@
|
||||
this.categoryArr = occData.tasks
|
||||
this.help = occData.help
|
||||
this.showCartc(occData.movement)
|
||||
console.log(this.userAuth)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -282,7 +280,7 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 能量跳转
|
||||
// 能量任务跳转
|
||||
JumpUrl(open, title) {
|
||||
var type = open.openType;
|
||||
switch(type){
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,263 +0,0 @@
|
||||
<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" />
|
||||
</view>
|
||||
<!-- 输入手机号相关 -->
|
||||
<view class="inputs phone">
|
||||
<label class="label">+86</label>
|
||||
<input type="number" placeholder="输入您的手机号码" v-model="phone" />
|
||||
</view>
|
||||
<view class="inputs sms">
|
||||
<input type="number" placeholder="输入短信验证码" v-model="code" />
|
||||
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
|
||||
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
|
||||
</view>
|
||||
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
|
||||
<!-- 快捷登录 -->
|
||||
<view class="quick">
|
||||
<view class="quick-title">快捷登录</view>
|
||||
<view class="quick-box">
|
||||
<image class="quick-icon" src="@/static/icons/wechat.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 用户登录注册协议 -->
|
||||
<view class="agreement">未注册的手机号验证后将自动创建账号,登录即表示同意接收<navigator url="">用户隐私规格</navigator>和<navigator url="">用户服务协议
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSms,
|
||||
smsAuth
|
||||
} from '@/apis/interfaces/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: "18245180131",
|
||||
code: "",
|
||||
smsTime: 60,
|
||||
getSms: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 用户登录
|
||||
login() {
|
||||
smsAuth({
|
||||
mobileNo: this.phone,
|
||||
code: this.code
|
||||
}).then(res => {
|
||||
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
|
||||
this.$Router.back()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取验证码
|
||||
getPhoneCode() {
|
||||
let outTime
|
||||
getSms({
|
||||
mobileNo: this.phone
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
this.getSms = true
|
||||
outTime = setInterval(() => {
|
||||
if (this.smsTime <= 1) {
|
||||
this.getSms = false
|
||||
this.smsTime = 60
|
||||
clearInterval('outTime')
|
||||
}
|
||||
this.smsTime -= 1
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
padding: $padding * 3;
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
|
||||
.login-top {
|
||||
height: 36vh;
|
||||
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;
|
||||
// left: 2rpx;
|
||||
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: 18px;
|
||||
|
||||
.top-logo {
|
||||
margin-bottom: 20rpx;
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.inputs {
|
||||
background:rgba($color: $mian-color, $alpha: 0.05);
|
||||
border: solid 1rpx $border-color;
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding: 0 $padding;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
|
||||
&.phone {
|
||||
padding-left: 120rpx;
|
||||
|
||||
.label {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
border-right: solid 1rpx $border-color;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
}
|
||||
|
||||
&.sms {
|
||||
padding-right: 200rpx;
|
||||
|
||||
.sms-btn[size='mini'] {
|
||||
width: 200rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: $title-size + 6;
|
||||
font-weight: bold;
|
||||
color: $text-color;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: $mian-color;
|
||||
color: white;
|
||||
border-radius: 0;
|
||||
margin-top: $margin;
|
||||
font-size: $title-size;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
font-weight: bold;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
background: rgba($color: $mian-color, $alpha: .6);
|
||||
}
|
||||
}
|
||||
|
||||
.quick {
|
||||
padding-top: $padding * 3;
|
||||
text-align: center;
|
||||
|
||||
.quick-title {
|
||||
text-align: center;
|
||||
color: $text-gray;
|
||||
font-size: $title-size-sm;
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
|
||||
.quick-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.quick-icon {
|
||||
width: 78rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.agreement {
|
||||
padding-top: $padding * 2;
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
|
||||
navigator {
|
||||
color: $text-price;
|
||||
display: inline-block;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,20 +1,19 @@
|
||||
<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="6" v-model="code" />
|
||||
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
|
||||
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
|
||||
</view>
|
||||
@@ -23,7 +22,7 @@
|
||||
<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>
|
||||
<!-- 用户登录注册协议 -->
|
||||
@@ -88,6 +87,13 @@
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提示信息
|
||||
onShowToast(){
|
||||
uni.showToast({
|
||||
title: '微信登录暂未开放,敬请期待',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,7 +121,6 @@
|
||||
.top-bg {
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
// left: 2rpx;
|
||||
z-index: 2;
|
||||
width: 740rpx;
|
||||
margin-left: 40rpx;
|
||||
@@ -128,12 +133,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,11 +177,10 @@
|
||||
|
||||
&.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;
|
||||
@@ -187,11 +190,9 @@
|
||||
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;
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
},
|
||||
loginOut() {
|
||||
uni.removeStorageSync('token')
|
||||
this.$store.commit('setToken', '')
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
|
||||
@@ -123,13 +123,6 @@ class userAuth {
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理登录状态维护
|
||||
*/
|
||||
updAuthToken(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default userAuth
|
||||
|
||||
Reference in New Issue
Block a user