Commit 62efdcad authored by xhx's avatar xhx

接口调试

parent a6563464
NODE_ENV="development" NODE_ENV="development"
VUE_APP_URL="http://192.168.21.109:8008" VUE_APP_URL="http://172.16.100.59:8000"
\ No newline at end of file \ No newline at end of file
NODE_ENV="production" NODE_ENV="production"
VUE_APP_URL="http://" // VUE_APP_URL="http://"
\ No newline at end of file \ No newline at end of file
...@@ -22,3 +22,7 @@ yarn lint ...@@ -22,3 +22,7 @@ yarn lint
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). See [Configuration Reference](https://cli.vuejs.org/config/).
### 接口文档
[文档链接](http://172.16.100.59:8090/q/swagger-ui?urls.primaryName=pool.v1.EntrustPool#/)
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
"dev": "vue-cli-service serve" "dev": "vue-cli-service serve"
}, },
"dependencies": { "dependencies": {
"@33cn/chain33-rpc-api": "^1.5.18",
"@33cn/chain33errori18n": "^1.0.4",
"@33cn/wallet-api": "^1.5.2",
"@tailwindcss/postcss7-compat": "^2.0.2", "@tailwindcss/postcss7-compat": "^2.0.2",
"autoprefixer": "^9", "autoprefixer": "^9",
"axios": "^0.21.1", "axios": "^0.21.1",
......
...@@ -6,15 +6,16 @@ ...@@ -6,15 +6,16 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import { getCurrentBTYAddress } from '@/utils/bridge' // 币钱包环境 // import { getCurrentBTYAddress } from '@/utils/bridge' // 币钱包环境
// import { test } from '@/utils/test' // 本地测试 import { test } from '@/utils/test' // 本地测试
export default Vue.extend({ export default Vue.extend({
mounted() { mounted() {
// this.$store.commit('app/SET_ADDRESS', test.addr) console.log(this.$store)
getCurrentBTYAddress('',(res: any) => { // getCurrentBTYAddress('',(res: any) => {
console.log('res', res) // console.log('res', res)
this.$store.commit('app/SET_ADDRESS', res) // this.$store.commit('app/SET_ADDRESS', res)
}) // })
this.$store.commit('app/SET_ADDRESS', test.addr)
} }
}) })
</script> </script>
......
<template> <template>
<div class="mining-card bg-card-color px-2 pt-10 pb-2 rounded-lg"> <div class="mining-card bg-card-color px-2 pt-10 pb-2 rounded-lg">
<div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">矿池名称</div> <div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">{{ info.name }}</div>
<div> <div>
<div class="px-2 flex items-center justify-between"> <div class="px-2 flex items-center justify-between">
<span class="font-semibold text-white1">{{'矿池型号'}}</span> <span class="font-semibold text-white1">{{ info.friendlyName }}</span>
<!-- <span class="text-xs text-t-color leading-4 border border-solid border-card-text py-0.5 px-1.5 rounded">{{ '节点稳定 省时省力' }}</span> --> <!-- <span class="text-xs text-t-color leading-4 border border-solid border-card-text py-0.5 px-1.5 rounded">{{ '节点稳定 省时省力' }}</span> -->
</div> </div>
<div class="pb-3 flex items-center justify-between"> <div class="pb-3 flex items-center justify-between">
<div class="px-2 flex flex-col items-start"> <div class="px-2 flex flex-col items-start">
<div class="income-count">6<span class="text-2xl">%</span>~8<span class="text-2xl">%</span></div> <div class="income-count">{{ info.dayRate || 0 }}<span class="text-2xl">%</span></div>
<div class="text-xs text-white2">矿池日收益率</div> <div class="text-xs text-white2">矿池日收益率</div>
</div> </div>
<button class="w-24 h-9 rounded-full text-sm text-brown1 text-medium bg-gradient-4" @click="goMining">立即委托</button> <button class="w-24 h-9 rounded-full text-sm text-brown1 text-medium bg-gradient-4" @click="goMining">立即委托</button>
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
</div> --> </div> -->
<div class="flex-grow border-r border-solid border-brown2"> <div class="flex-grow border-r border-solid border-brown2">
<p>今日出矿</p> <p>今日出矿</p>
<p>{{110}}BTY</p> <p>{{ info.dayTicketYield || 0 }} BTY</p>
</div> </div>
<div class="flex-grow border-r border-solid border-brown2"> <div class="flex-grow border-r border-solid border-brown2">
<p>已运行天数</p> <p>已运行天数</p>
<p>{{110}}</p> <p>{{ info.runDays || 0 }}</p>
</div> </div>
<div class="flex-grow"> <div class="flex-grow">
<p>已委托</p> <p>已委托</p>
<p>{{110}}</p> <p>{{ info.entrustTicket || 0 }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,11 +38,16 @@ ...@@ -38,11 +38,16 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
export default Vue.extend({ export default Vue.extend({
props: {
info: {
type: [Object as any, Number]
}
},
components: { components: {
}, },
methods: { methods: {
goMining() { goMining() {
this.$router.push({ path: '/details', query: {}}) this.$router.push({ path: '/details', query: { id: (this.info as any).id || '1' }})
} }
} }
}) })
...@@ -57,6 +62,7 @@ export default Vue.extend({ ...@@ -57,6 +62,7 @@ export default Vue.extend({
} }
.mining-name { .mining-name {
max-width: 100%; max-width: 100%;
min-width: 55px;
padding: 2px 8px; padding: 2px 8px;
position: absolute; position: absolute;
top: 10px; top: 10px;
......
...@@ -2,29 +2,29 @@ ...@@ -2,29 +2,29 @@
<div <div
class="mining-card w-84 h-56 px-2 pt-10 pb-2" class="mining-card w-84 h-56 px-2 pt-10 pb-2"
:class="{'bg-bg1-card': type === 1, 'bg-bg2-card': type === 2}"> :class="{'bg-bg1-card': type === 1, 'bg-bg2-card': type === 2}">
<div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">矿池名称</div> <div class="mining-name bg-gradient-3 text-white text-13px rounded-r-full">{{ info.name }}</div>
<img v-if="type === 2" class="w-18 h-16 end-img" src="@/assets/image/end.png" /> <img v-if="type === 2" class="w-18 h-16 end-img" src="@/assets/image/end.png" />
<img v-if="type === 1" class="w-full h-full under" src="@/assets/image/bg1-card.png" /> <img v-if="type === 1" class="w-full h-full under" src="@/assets/image/bg1-card.png" />
<img v-if="type === 2" class="w-full h-full under" src="@/assets/image/bg2-card.png" /> <img v-if="type === 2" class="w-full h-full under" src="@/assets/image/bg2-card.png" />
<div> <div>
<div class="px-2 flex items-center justify-between"> <div class="px-2 flex items-center justify-between">
<span class="font-semibold text-white1">{{'矿池型号'}}</span> <span class="font-semibold text-white1">{{ info.friendlyName }}</span>
</div> </div>
<div class="pb-5 flex items-center justify-start"> <div class="pb-5 flex items-center justify-start">
<div class="px-2 flex flex-col items-start mr-12"> <div class="px-2 flex flex-col items-start mr-12">
<div class="income-count" :class="[type === 1 ? 'orange' : 'brown']">6000</div> <div class="income-count" :class="[type === 1 ? 'orange' : 'brown']">{{ info.totalAmount }}</div>
<div class="text-xs text-white2">累计收益(BTY)</div> <div class="text-xs text-white2">累计收益(BTY)</div>
</div> </div>
<div class="px-2 flex flex-col items-start"> <div class="px-2 flex flex-col items-start">
<div class="income-count" :class="[type === 1 ? 'orange' : 'brown']">60</div> <div class="income-count" :class="[type === 1 ? 'orange' : 'brown']">{{ info.entrustTicket }}</div>
<div class="text-xs text-white2">委托票数</div> <div class="text-xs text-white2">委托票数</div>
</div> </div>
</div> </div>
</div> </div>
<div class="bg-gradient-5 rounded-lg flex justify-between items-center py-2"> <div class="bg-gradient-5 rounded-lg flex justify-between items-center py-2">
<div class="text-left text-t-color text-13px pl-2"> <div class="text-left text-t-color text-13px pl-2 overflow-hidden">
<p>矿池地址:{{ '0XtJ8yhkkgyfnjkkkmYnnghm' }}</p> <p class="tracking-tight pool-addr">矿池地址:{{ info.addr }}</p>
<p>矿机周期:{{ '2021.01.01—2021.06.30' }}</p> <p class="tracking-tight">矿机周期:{{ info.period }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,6 +38,9 @@ export default Vue.extend({ ...@@ -38,6 +38,9 @@ export default Vue.extend({
props: { props: {
type: { type: {
type: Number type: Number
},
info: {
type: Object
} }
}, },
methods: { methods: {
...@@ -74,6 +77,7 @@ export default Vue.extend({ ...@@ -74,6 +77,7 @@ export default Vue.extend({
} }
.mining-name { .mining-name {
max-width: 100%; max-width: 100%;
min-width: 55px;
padding: 2px 8px; padding: 2px 8px;
position: absolute; position: absolute;
top: 10px; top: 10px;
...@@ -106,4 +110,9 @@ export default Vue.extend({ ...@@ -106,4 +110,9 @@ export default Vue.extend({
color: #906227; color: #906227;
} }
} }
.pool-addr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style> </style>
\ No newline at end of file
...@@ -4,11 +4,24 @@ import './registerServiceWorker' ...@@ -4,11 +4,24 @@ import './registerServiceWorker'
import router from './router' import router from './router'
import store from './store' import store from './store'
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import Rpc from '@33cn/chain33-rpc-api'
import { Toast } from 'vant'
import '@/style.css' import '@/style.css'
import vconsole from 'vconsole'
new vconsole()
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$api = new Rpc(process.env.VUE_APP_NODE,function(res:any){
if(res.error){
return Promise.reject(res.error);
}
return res.result
},function(err:any){
Toast(err.message || err);
})
new Vue({ new Vue({
router, router,
store, store,
......
import { service } from "./service"; import { request } from "./service";
import axios from 'axios' import axios from 'axios'
import { sign } from '@/utils/bridge' import { sign } from '@/utils/bridge'
import { rawTransaction } from "@/type/request"; import { rawTransaction } from "@/type/request";
import { Toast } from "vant";
import { test } from '@/utils/test'
async function chainRequire(method:string,data:any[], b?: boolean, _this?: any, cb?:any){ const service = request('http://172.16.100.75:8801')
async function chainRequire(method: string, data: any[], b?: boolean, _this?: any, cb?:any){
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
return await service.request({ return await service.request({
data:{ data:{
...@@ -12,6 +16,7 @@ async function chainRequire(method:string,data:any[], b?: boolean, _this?: any, ...@@ -12,6 +16,7 @@ async function chainRequire(method:string,data:any[], b?: boolean, _this?: any,
method:method, method:method,
params:data params:data
}, },
method: 'POST',
cancelToken: b ? new CancelToken(function executor(c) { cancelToken: b ? new CancelToken(function executor(c) {
_this.cancelAjax = c _this.cancelAjax = c
}) : undefined }) : undefined
...@@ -69,28 +74,38 @@ async function getTransaction(hash: string) { ...@@ -69,28 +74,38 @@ async function getTransaction(hash: string) {
} }
async function signFun(b: any, fn: any, fail?: any) { async function signFun(b: any, fn: any, fail?: any) {
// let s = {} as any // await signTransition(b.data.result, async (sign: any) => {
// if (typeof sign === 'string') { // let s = {} as any
// s = JSON.parse(sign) // if (typeof sign === 'string') {
// } else { // s = JSON.parse(sign)
// s = sign // } else {
// } // s = sign
// if (s.error) return // }
// const send = await sendTransaction(s.signHash) // if (s.error) {
// let res = {} as any // fail()
// const timer = setInterval(async() => { // return
// res = await getTransaction(send.data.result) // }
// if (!res.data.error) { // const send = await sendTransaction(s.signHash)
// clearInterval(timer) // if (send.data.error) {
// if (res.data.result.receipt.ty === 1) { // Toast(send.data.error)
// if (fail) fail() // fail()
// } else { // return
// if (fn) fn(res)
// }
// } // }
// }, 1000) // let res = {} as any
// const timer = setInterval(async() => {
// res = await getTransaction(send.data.result)
// if (!res.data.error) {
// clearInterval(timer)
// if (res.data.result.receipt.ty === 1) {
// if (fail) fail()
// } else {
// if (fn) fn(res)
// }
// }
// }, 1000)
// })
// web 测试 // web 测试
const sign = await signTransition(b.data.result, '') const sign = await signTransition(b.data.result, test.privateKey)
const send = await sendTransaction(sign.data.result) const send = await sendTransaction(sign.data.result)
let res = {} as any let res = {} as any
const timer = setInterval(async() => { const timer = setInterval(async() => {
...@@ -120,6 +135,14 @@ export default { ...@@ -120,6 +135,14 @@ export default {
return signFun(res, fn, fail) return signFun(res, fn, fail)
}, },
/** /**
* 构造交易
* @param data
* @returns
*/
createTransaction: async function (data: rawTransaction, fn?: any, fail?: any) {
return await chainRequire('Chain33.CreateRawTransaction', [data])
},
/**
* 获取合约余额 * 获取合约余额
* @param addr * @param addr
* @returns * @returns
...@@ -135,7 +158,55 @@ export default { ...@@ -135,7 +158,55 @@ export default {
], ],
execer: execer execer: execer
}] }]
} },
method: 'POST'
})
},
/**
*
* @param addr
* @param execer
* @returns
*/
getAllBalance: async function (addr: string) {
return service.request({
data: {
id: 1,
method: 'Chain33.GetAllExecBalance',
params: [{
addr
}]
},
method: 'POST'
}) })
}, },
getProperFee: async function (txCount: number, txSize: number) {
return await chainRequire('Chain33.GetProperFee', [{
txCount,
txSize
}])
},
signTransition,
sendTransaction,
getTransaction,
createBindMiner: async function (data: {
bindAddr: string,
originAddr: string,
amount: number,
checkBalance: boolean
}) {
const res = await chainRequire('ticket.CreateBindMiner', [data])
return res
},
createRawTxGroup: function (data: {
txs: any
}) {
return chainRequire('Chain33.CreateRawTxGroup', [data])
}
} }
\ No newline at end of file
import { service } from "./service"; import { request } from "./service";
import store from '@/store/index'
export const bindPool = function(id: string) { const service = request('/api')
return service.post('/web/bind-pool', { id: id })
service.interceptors.request.use(function (config) {
// do something before request is sent
console.log(store.state)
if ((store.state as any).app.address) {
const str = (store.state as any).app.address
config.headers['Auth-Addr'] = str
}
return config;
}, function (error) {
return Promise.reject(error);
});
export const invitePool = function(invitation: string) {
return service.post('/web/pool-invite', { invitation })
}
export const bindPool = function(id: string, amount: string|number) {
return service.post('/web/bind-pool', { id: id, amount })
} }
export const poolInfo = function(id: string|number) { export const poolInfo = function(id: string|number) {
......
import axios from "axios"; import axios from "axios";
const baseUrl = process.env.VUE_APP_URL // const baseUrl = '/api'
export const service = axios.create({ export const request = function(baseUrl: string) {
baseURL: baseUrl, return axios.create({
timeout: 15000 baseURL: baseUrl,
}) timeout: 15000
})
}
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import { appStore } from './app'
Vue.use(Vuex) Vue.use(Vuex)
...@@ -11,5 +12,6 @@ export default new Vuex.Store({ ...@@ -11,5 +12,6 @@ export default new Vuex.Store({
actions: { actions: {
}, },
modules: { modules: {
app: appStore
} }
}) })
...@@ -6,8 +6,8 @@ export interface rawTransaction { ...@@ -6,8 +6,8 @@ export interface rawTransaction {
fee: number; fee: number;
note?: string; note?: string;
isToken?: boolean; isToken?: boolean;
isWithdraw: boolean; isWithdraw?: boolean;
tokenSymbol?: string; tokenSymbol?: string;
execName?: string; execName?: string;
exerce: string execer?: string
} }
\ No newline at end of file
// 测试账号文件 // export const test = {
\ No newline at end of file // addr: '14KEKbYtKKQm4wMthSK9J4La4nAiidGozt',
// privateKey: '0xCC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944'
// }
export const test = {
addr: '1LGQLmGVHSNthZcLbGpVfJTDmcicMQprZs',
privateKey: '0xa65b62735022cd47b11c5a88b0caac8d360810257aaf1e14bbc330dee63b35ff'
}
// export const test = {
// addr: '1K7Fko7e21F2qXdYriVLheJue5ZW5KerZL',
// privateKey: '0x208706573b6ef4b729b0804ac0803bd1f4266661d0e475e49de472378738574e'
// }
// export const test = {
// addr: '1EbDHAXpoiewjPLX9uqoz38HsKqMXayZrF',
// privateKey: '0xb0bb75bc49a787a71f4834da18614763b53a18291ece6b5edec3ad19d150c3e7'
// }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</nav-bar> </nav-bar>
<div class="bg-gradient-6 p-4 pt-20"> <div class="bg-gradient-6 p-4 pt-20">
<div class="pb-4"> <div class="pb-4">
<div class="text-brown1 text-base font-semibold text-left">{{ '矿机型号' }}</div> <div class="text-brown1 text-base font-semibold text-left">{{ info.friendlyName || 'xinghao' }}</div>
</div> </div>
<div class="mb-6 flex items-center justify-between"> <div class="mb-6 flex items-center justify-between">
<div class="text-left flex-grow"> <div class="text-left flex-grow">
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
<div class="bg-gradient-7 py-2 text-13px text-brown3 flex items-center justify-between rounded"> <div class="bg-gradient-7 py-2 text-13px text-brown3 flex items-center justify-between rounded">
<div class="flex-grow border-r border-solid border-card2-color"> <div class="flex-grow border-r border-solid border-card2-color">
<div>挖矿门槛</div> <div>挖矿门槛</div>
<div>最低10</div> <div>最低{{ info.minTicket || 10 }}</div>
</div> </div>
<div class="flex-grow border-r border-solid border-card2-color"> <div class="flex-grow border-r border-solid border-card2-color">
<div>矿机周期</div> <div>矿机周期</div>
<div>300</div> <div>{{ info.days }}</div>
</div> </div>
<div class="flex-grow"> <div class="flex-grow">
<div>技术服务费</div> <div>技术服务费</div>
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
<div class="py-2"> <div class="py-2">
<p class="details-item"> <p class="details-item">
<span>挖矿门槛</span> <span>挖矿门槛</span>
<span>最低10</span> <span>最低{{ info.minTicket || 10 }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>矿池周期</span> <span>矿池周期</span>
<span>300</span> <span>{{ info.days }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>技术服务费</span> <span>技术服务费</span>
...@@ -63,28 +63,28 @@ ...@@ -63,28 +63,28 @@
<div class="py-2"> <div class="py-2">
<p class="details-item"> <p class="details-item">
<span>矿池地址</span> <span>矿池地址</span>
<span>0XtJ8yhkkgyfnjkkkmYnnghm</span> <span>{{ info.minerAddr }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>发起人挖矿地址</span> <span>发起人挖矿地址</span>
<span>0XtJ8yhkkgyfnjkkkmYnnghm</span> <span>{{ info.selfAddr }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>发起人委托票数</span> <span>发起人委托票数</span>
<span>10</span> <span>{{ info.selfEntrustTicket || 0 }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>当前委托人数</span> <span>当前委托人数</span>
<span class="special">2795</span> <span class="special">{{ info.entrustPerson || 0 }}</span>
</p> </p>
<p class="details-item"> <p class="details-item">
<span>当前委托挖矿票数</span> <span>当前委托挖矿票数</span>
<span class="special">1000</span> <span class="special">{{ info.entrustTicket || 0 }}</span>
</p> </p>
</div> </div>
</div> </div>
<div class="bg-card2-color px-4 pb-16 mt-3"> <div class="bg-card2-color px-4 pb-16 mt-3">
<p class="details-title">发起人委托票数</p> <p class="details-title">风险提示</p>
<div class="py-2 text-sm text-white3 text-left"> <div class="py-2 text-sm text-white3 text-left">
<p class="pb-2 leading-5">1.bty会发生价格波动的情况,且挖矿难度是逐渐递增的。币价的波动或者挖矿难度的提高 <p class="pb-2 leading-5">1.bty会发生价格波动的情况,且挖矿难度是逐渐递增的。币价的波动或者挖矿难度的提高
都可能导致挖矿收益变动。本矿池不作保证收益承诺。用户须仔细评估自己的风险承受能力, 都可能导致挖矿收益变动。本矿池不作保证收益承诺。用户须仔细评估自己的风险承受能力,
...@@ -97,30 +97,120 @@ ...@@ -97,30 +97,120 @@
<div class="w-full h-16 px-4 bg-card-color fixed bottom-0 flex items-center justify-between"> <div class="w-full h-16 px-4 bg-card-color fixed bottom-0 flex items-center justify-between">
<div class="flex items-center"> <div class="flex items-center">
<div class="text-sm text-white mr-3">票数</div> <div class="text-sm text-white mr-3">票数</div>
<van-stepper v-model="value" min="10" integer /> <van-stepper v-model="value" :min="info.minTicket" :max="profit" integer />
</div> </div>
<button class="bg-gradient-4 w-24 h-9 text-brown2 text-15px rounded-full">购买</button> <button class="bg-gradient-4 w-24 h-9 text-brown2 text-15px rounded-full" @click="buy">购买</button>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
import { NavBar, Stepper } from 'vant' import { NavBar, Stepper, Toast } from 'vant'
import { poolInfo, bindPool } from '@/service/pool'
import { signTxGroup } from '@33cn/wallet-api'
import service from '@/service/chain33'
// import mixinsTranscation from '@/mixin/Transcation'
import { test } from '@/utils/test'
export default Vue.extend({ export default Vue.extend({
components: { components: {
'nav-bar': NavBar, 'nav-bar': NavBar,
'van-stepper': Stepper 'van-stepper': Stepper
}, },
// mixins: [mixinsTranscation],
data() { data() {
return { return {
value: 10 value: 10,
info: {} as any,
fee: 0,
profit: 0,
} }
}, },
methods: { methods: {
onClickLeft() { onClickLeft() {
this.$router.back() this.$router.back()
},
getFee() {
service.getProperFee(0, 0).then(res => {
console.log(res)
this.fee = res.data.result.properFee
})
service.getBalance(this.$store.state.app.address, 'coin').then((res: any) => {
console.log(res)
this.profit = Math.floor((res.data.result as any)[0].balance / 1e8)
}).catch(() => {
Toast({
duration: 3000,
message: '请求失败',
forbidClick: true
})
})
},
getInfo() {
poolInfo(this.$route.query.id as string).then((res: any) => {
this.info = res.data.data
})
},
signGroup(txs:Array<string>){
return signTxGroup(txs.join(),'none',-1);
},
async buy() {
if (this.profit < +this.info.minTicket) {
Toast(`您的票数不足${this.info.minTicket}票`)
return
}
bindPool(this.info.id, this.value).then(async (r: any) => {
console.log(r)
if (r.data.data.isSucc) {
const bindRes = await service.createBindMiner({
bindAddr: this.$store.state.app.address,
originAddr: this.info.minerAddr,
amount: 3000 * +this.value * 1e8,
checkBalance: false
})
console.log(bindRes)
const transRes = await service.createTransaction({
fee: 0,
to: '16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp',
amount: 3000 * Number(this.value) * 1e8,
// amount: 1 * 1e8,// 单位是 (万个币),所以这里不是 10^8,而是 10^12
note: 'coins->ticket',
execName: 'ticket'
})
console.log(transRes)
const sign = await this.signGroup([transRes.data.result.txHex, bindRes.data.result]);
// const sign = await service.createRawTxGroup({
// txs: [transRes.data.result, bindRes.data.result.txHex]
// });
console.log(sign)
const send = await service.sendTransaction(sign.data.result)
console.log(send)
if (send.data.result.error) {
Toast('购买失败')
return
}
let res = {} as any
const timer = setInterval(async() => {
res = await service.getTransaction(send.data.result)
if (!res.data.error) {
clearInterval(timer)
if (res.data.result.receipt.ty === 1) {
console.log('fail')
} else {
this.$toast('购买成功')
}
}
}, 1000)
}
}).catch(e => {
Toast(e.response.data.reason)
})
} }
},
created() {
window.scrollTo(0, 0)
this.getInfo()
this.getFee()
} }
}) })
</script> </script>
......
<template> <template>
<div class="w-full min-h-screen px-4 pt-2 pb-4"> <div class="w-full min-h-screen pb-4">
<!-- <van-loading> --> <div class="home-header h-16 mb-0 px-4 flex justify-between items-center">
<div class="home-header h-16 mb-0 flex justify-between items-center">
<div class="text-2xl text-white">社区矿池</div> <div class="text-2xl text-white">社区矿池</div>
<div class="flex-shrink-0 text-sm text-white" @click="goMining"> <div class="flex-shrink-0 text-sm text-white" @click="goMining">
我的矿机 我的矿机
...@@ -10,114 +9,165 @@ ...@@ -10,114 +9,165 @@
</span> </span>
</div> </div>
</div> </div>
<div class="mine-card flex flex-column bg-card bg-cover rounded-lg"> <div class="px-4 pt-20">
<div class="text-sm text-left pb-3">当前地址: {{ '0XtJ8yhkkgyfnjkkkmYnnghm' }}</div> <div class="mine-card flex flex-column bg-card bg-cover rounded-lg">
<div class="flex items-center justify-between"> <div class="text-sm text-left pb-3">当前地址: {{ addr }}</div>
<div> <div class="flex items-center justify-between">
<p class="text-xs text-brown">可领收益</p> <div>
<p class="text-3xl text-red1">{{ 1000 }}</p> <p class="text-xs text-brown">可领收益</p>
<p class="text-3xl text-red1">{{ profit }}</p>
</div>
<div>
<p class="text-xs text-brown">参与票数</p>
<p class="text-3xl text-red1">{{ 100 }}</p>
</div>
<button
class="bg-gradient-2 w-20 h-8 leading-8 rounded-full text-sm text-white"
:disabled="btnType"
@click="getIncome">{{ btnText }}</button>
</div>
</div>
<div class="card-list relative py-7 px-3">
<div class="home-title w-full absolute flex items-start justify-center">
<div class="dot-l"></div>
<img class="w-1/5" src="../assets/image/t-l.png" alt="">
<img class="w-1/4 mt-1.5 mx-1" src="../assets/image/title.png" alt="">
<img class="w-1/5" src="../assets/image/t-r.png" alt="">
<div class="dot-r"></div>
</div> </div>
<div> <div>
<p class="text-xs text-brown">参与票数</p> <template v-if="lists.length > 0">
<p class="text-3xl text-red1">{{ 100 }}</p> <van-pull-refresh
v-model="isLoading"
success-text="刷新成功"
@refresh="onRefresh">
<MiningCard v-for="(i, index) in lists" :key="index" :info="i" />
</van-pull-refresh>
</template>
<template v-else>
<div class="no-content text-white flex items-center justify-center">
暂无矿池
</div>
</template>
</div> </div>
<button
class="bg-gradient-2 w-20 h-8 leading-8 rounded-full text-sm text-white"
:disabled="btnType"
@click="getIncome">{{ btnText }}</button>
</div> </div>
</div> </div>
<div class="card-list relative py-7 px-3"> <van-popup v-model="show" :close-on-click-overlay="false">
<div class="home-title w-full absolute flex items-start justify-center"> <div class="p-3 flex flex-col bg-theme-color text-white1">
<div class="dot-l"></div> <div class="mb-5">请输入推荐人</div>
<img class="w-1/5" src="../assets/image/t-l.png" alt=""> <input class="mb-2 bg-theme-color border-b border-solid border-white2" type="text" max="34" v-model="val">
<img class="w-1/4 mt-1.5 mx-1" src="../assets/image/title.png" alt=""> <button class="bg-blue" @click="addInvite">确定</button>
<img class="w-1/5" src="../assets/image/t-r.png" alt="">
<div class="dot-r"></div>
</div>
<div>
<template v-if="lists.length > 0">
<van-pull-refresh
v-model="isLoading"
success-text="刷新成功"
@refresh="onRefresh">
<MiningCard v-for="i in 8" :key="i" />
</van-pull-refresh>
</template>
<template v-else>
<div class="no-content text-white flex items-center justify-center">
暂无矿池
</div>
</template>
</div> </div>
</div> </van-popup>
<!-- </van-loading> -->
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Icon, PullRefresh, Toast } from 'vant' import { Icon, PullRefresh, Toast, Popup, List } from 'vant'
import MiningCard from '@/components/MiningCard.vue' import MiningCard from '@/components/MiningCard.vue'
import Vue from 'vue' import Vue from 'vue'
import service from '@/service/chain33' import service from '@/service/chain33'
import { poolList } from '@/service/pool' import { invitePool, poolList } from '@/service/pool'
export default Vue.extend({ export default Vue.extend({
components: { components: {
'van-icon': Icon, 'van-icon': Icon,
'van-pull-refresh': PullRefresh, 'van-pull-refresh': PullRefresh,
// 'van-loading': Loading, 'van-popup': Popup,
MiningCard MiningCard
}, },
data() { data() {
return { return {
lists: [1] as any, addr: this.$store.state.app.address,
btnText: '领取收益',
btnType: false,
lists: [] as any,
isLoading: false, isLoading: false,
count: 0, count: 0,
timer: 0, timer: 0,
btnText: '领取收益', waiter: 18000,
btnType: false,
page: 1, page: 1,
pageSize: 10 pageSize: 10,
profit: 0,
fee: 0,
show: false,
val: ''
} }
}, },
methods: { methods: {
addInvite() {
if (!this.val) {
this.$toast('请先输入推荐人地址')
}
invitePool(this.val).then((res: any) => {
if (res.data.data.isSucc) {
this.$toast('添加成功')
this.show = false
}
})
},
getFee() {
service.getProperFee(0, 0).then(res => {
console.log(res)
this.fee = res.data.result.properFee
})
},
getList() { getList() {
// Toast.loading({
// duration: 15000,
// message: '加载中'
// })
poolList({ poolList({
page: this.page, page: this.page,
pageSize: this.pageSize pageSize: this.pageSize,
limit: 10000
}).then((res: any) => { }).then((res: any) => {
this.lists = res.data.list console.log(res)
this.count = res.count res.data.data?.list ? this.lists.push(...res.data.data?.list) : this.lists = []
Toast.clear() this.count = +res.data.data.count
document.addEventListener('scroll', this.scrollEvent)
}).catch(e => {
const err = e.response
if (err.data.code === 406 && err.data.reason === 'USER_NOT_BIND') {
this.show = true
}
}) })
this.isLoading = false this.isLoading = false
}, },
getInfo() { getInfo() {
service.getBalance('', '').then(res => { Toast.loading({
duration: 0,
forbidClick: true
})
service.getBalance(this.$store.state.app.address, 'ticket').then((res: any) => {
console.log(res) console.log(res)
this.profit = Math.floor((res.data.result as any)[0].balance / 1e8)
Toast.clear()
}).catch(() => {
Toast({
duration: 3000,
message: '请求失败',
forbidClick: true
})
}) })
}, },
getIncome() { getIncome() {
// if (!this.profit) {
// this.$toast('当前无收益可领')
// return
// }
this.btnText = '领取中' this.btnText = '领取中'
this.btnType = true this.btnType = true
service.createRawTransaction({ service.createRawTransaction({
to: '', to: '16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp',
amount: 10, // amount: this.profit * 1e8,
fee: 0, amount: 1e8 * 0,
isWithdraw: false, fee: this.fee,
execName: 'string', note: 'ticket -> coins',
exerce: '' isWithdraw: true,
execName: 'ticket'
}, () => { }, () => {
console.log('success') console.log('success')
this.btnText = '领取收益' this.btnText = '领取收益'
this.btnType = false this.btnType = false
this.getInfo()
}, () => { }, () => {
this.$toast("领取失败") console.log('fail')
this.btnText = '领取收益' this.btnText = '领取收益'
this.btnType = false this.btnType = false
}) })
...@@ -126,14 +176,17 @@ export default Vue.extend({ ...@@ -126,14 +176,17 @@ export default Vue.extend({
this.$router.push({ path: '/mine', query: {}}) this.$router.push({ path: '/mine', query: {}})
}, },
onRefresh() { onRefresh() {
this.page = 1
this.lists = []
this.getList() this.getList()
}, },
scrollEvent() { scrollEvent() {
const e = document.querySelector('.mining-card') const e = document.querySelector('.mining-card')
const g = (e as HTMLElement)?.offsetHeight const g = (e as HTMLElement)?.offsetHeight
const h = document.documentElement?.scrollTop const h = document.documentElement?.scrollTop || document.body.scrollTop
if (this.lists.length < this.count) { if (this.lists.length < this.count) {
if (h > (g * this.page * this.pageSize - 3)) { if (h > (g * this.page * (this.pageSize - 3))) {
this.page++
this.getList() this.getList()
} }
} }
...@@ -142,13 +195,15 @@ export default Vue.extend({ ...@@ -142,13 +195,15 @@ export default Vue.extend({
if (this.timer) clearInterval(this.timer) if (this.timer) clearInterval(this.timer)
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.getList() this.getList()
}, 180000) }, this.waiter)
} }
}, },
mounted() { mounted() {
const that = this const that = this
this.getList() this.getList()
document.addEventListener('scroll', that.scrollEvent) this.getInfo()
this.getFee()
// document.addEventListener('scroll', that.scrollEvent)
}, },
beforeDestroy() { beforeDestroy() {
const that = this const that = this
...@@ -160,7 +215,9 @@ export default Vue.extend({ ...@@ -160,7 +215,9 @@ export default Vue.extend({
<style lang="scss" scoped> <style lang="scss" scoped>
.home-header { .home-header {
position: sticky; width: 100%;
position: fixed;
// position: sticky;
top: 0; top: 0;
z-index: 50; z-index: 50;
background: #323232; background: #323232;
...@@ -227,4 +284,8 @@ export default Vue.extend({ ...@@ -227,4 +284,8 @@ export default Vue.extend({
/deep/ .van-pull-refresh { /deep/ .van-pull-refresh {
overflow: inherit; overflow: inherit;
} }
/deep/ .van-popup--center {
width: 90%;
border-radius: 12px;
}
</style> </style>
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
</div> </div>
</template> </template>
</nav-bar> </nav-bar>
<div class="pb-5 px-4 pt-16"> <div class=" min-h-screen pb-5 px-4 pt-16">
<keep-alive> <keep-alive>
<template v-if="lists.length > 0"> <template v-if="lists.length > 0">
<van-pull-refresh <van-pull-refresh
v-model="isLoading" v-model="isLoading"
success-text="刷新成功" success-text="刷新成功"
@refresh="onRefresh"> @refresh="onRefresh">
<mining-info v-for="i in 5" :key="i" :type="active" /> <mining-info v-for="i in lists" :key="i" :type="active" :info="i" />
</van-pull-refresh> </van-pull-refresh>
</template> </template>
<template v-else> <template v-else>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
import Vue from 'vue' import Vue from 'vue'
import { NavBar, PullRefresh } from 'vant' import { NavBar, PullRefresh } from 'vant'
import MiningInfo from '@/components/MiningInfo.vue' import MiningInfo from '@/components/MiningInfo.vue'
import { userMachineList } from '@/service/pool'
export default Vue.extend({ export default Vue.extend({
components: { components: {
'nav-bar': NavBar, 'nav-bar': NavBar,
...@@ -40,16 +41,32 @@ export default Vue.extend({ ...@@ -40,16 +41,32 @@ export default Vue.extend({
return { return {
active: 1, active: 1,
isLoading: false, isLoading: false,
lists: [1,2] all: [],
lists: [],
page: 1,
pageSize: 10
} }
}, },
methods: { methods: {
getList() { getList() {
console.log('run') console.log('run')
userMachineList({
page: this.page,
pageSize: this.pageSize,
limit: 10000
}).then(res => {
console.log(res)
this.all = res.data.data.list || []
this.lists = this.all.filter((item: any) => item.status !== 1)
})
this.isLoading = false
},
getNowList() {
this.lists = this.all.filter((item: any) => item.status !== 1)
this.isLoading = false this.isLoading = false
}, },
getEndList() { getEndList() {
console.log('end') this.lists = this.all.filter((item: any) => item.status === 1)
this.isLoading = false this.isLoading = false
}, },
onClickLeft() { onClickLeft() {
...@@ -57,7 +74,7 @@ export default Vue.extend({ ...@@ -57,7 +74,7 @@ export default Vue.extend({
}, },
onRefresh() { onRefresh() {
if (this.active === 1) { if (this.active === 1) {
this.getList() this.getNowList()
} else { } else {
this.getEndList() this.getEndList()
} }
...@@ -65,7 +82,7 @@ export default Vue.extend({ ...@@ -65,7 +82,7 @@ export default Vue.extend({
setTab(n: number) { setTab(n: number) {
this.active = n this.active = n
if (this.active === 1) { if (this.active === 1) {
this.getList() this.getNowList()
} else { } else {
this.getEndList() this.getEndList()
} }
......
// const TerserPlugin = require('terser-webpack-plugin')
// const CompressionWebpackPlugin = require('compression-webpack-plugin')
module.exports = {
// ...other vue-cli plugin options...
css: {
loaderOptions: {
less: {
javascriptEnabled: true, // 加载LESS 需要把JS设置一下
}
}
},
devServer: {
proxy: { // 设置代理
'/api': {
target: 'http://172.16.100.59:8090',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
}
},
// configureWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// config.optimization = {
// minimize: true,
// minimizer: [
// new TerserPlugin({
// exclude: /node_modules/,
// terserOptions: {
// compress: {
// drop_console: true,
// drop_debugger: false,
// pure_funcs: ['console.log'], // 移除console
// }
// }
// })
// ]
// },
// config.plugins = [
// new CompressionWebpackPlugin({
// filename: '[path][name].gz[query]',
// algorithm: 'gzip',
// test: /\.(js|css|json|ttf)(\?.*)?$/i,
// threshold: 0,
// minRatio: 0.8,
// })
// ]
// }
// }
// pwa: {
// name: 'My App',
// themeColor: '#4DBA87',
// msTileColor: '#000000',
// appleMobileWebAppCapable: 'yes',
// appleMobileWebAppStatusBarStyle: 'black',
// manifestOptions:{
// display: 'standalone',
// theme_color: '#333333'
// },
// // configure the workbox plugin
// workboxPluginMode: 'InjectManifest',
// workboxOptions: {
// // swSrc is required in InjectManifest mode.
// // swSrc: 'dev/sw.js',
// // ...other Workbox options...
// }
// }
}
\ No newline at end of file
...@@ -2,6 +2,28 @@ ...@@ -2,6 +2,28 @@
# yarn lockfile v1 # yarn lockfile v1
"@33cn/chain33-rpc-api@^1.5.18":
version "1.5.29"
resolved "https://registry.nlark.com/@33cn/chain33-rpc-api/download/@33cn/chain33-rpc-api-1.5.29.tgz#767938f08b633079b4b110191ad7fc07bdbe51ce"
integrity sha1-dnk48ItjMHm0sRAZGtf8B72+Uc4=
dependencies:
json-bigint "^0.3.0"
"@33cn/chain33errori18n@^1.0.4":
version "1.0.4"
resolved "https://registry.nlark.com/@33cn/chain33errori18n/download/@33cn/chain33errori18n-1.0.4.tgz#ba85a11a7732cbde70e899871a8ff009be725dc9"
integrity sha1-uoWhGncyy95w6JmHGo/wCb5yXck=
"@33cn/wallet-api@^1.5.2":
version "1.5.4"
resolved "https://registry.nlark.com/@33cn/wallet-api/download/@33cn/wallet-api-1.5.4.tgz#0e6f29f6d300646970863d20d7449ce9845b56cb"
integrity sha1-Dm8p9tMAZGlwhj0g10Sc6YRbVss=
dependencies:
"@33cn/chain33-rpc-api" "^1.5.18"
es6-promise "^4.2.8"
isomorphic-fetch "^2.2.1"
tslib "^1.10.0"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.8.3": "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.8.3":
version "7.14.5" version "7.14.5"
resolved "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" resolved "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb"
...@@ -2372,6 +2394,11 @@ big.js@^5.2.2: ...@@ -2372,6 +2394,11 @@ big.js@^5.2.2:
resolved "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz?cache=0&sync_timestamp=1620132748267&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbig.js%2Fdownload%2Fbig.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" resolved "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz?cache=0&sync_timestamp=1620132748267&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbig.js%2Fdownload%2Fbig.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
integrity sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg= integrity sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=
bignumber.js@^9.0.0:
version "9.0.1"
resolved "https://registry.npm.taobao.org/bignumber.js/download/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5"
integrity sha1-jXuhJMiCv9jkMmDGdHVRjQaJ5OU=
binary-extensions@^1.0.0: binary-extensions@^1.0.0:
version "1.13.1" version "1.13.1"
resolved "https://registry.nlark.com/binary-extensions/download/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" resolved "https://registry.nlark.com/binary-extensions/download/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
...@@ -3923,6 +3950,13 @@ encodeurl@~1.0.2: ...@@ -3923,6 +3950,13 @@ encodeurl@~1.0.2:
resolved "https://registry.nlark.com/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" resolved "https://registry.nlark.com/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
encoding@^0.1.11:
version "0.1.13"
resolved "https://registry.npm.taobao.org/encoding/download/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9"
integrity sha1-VldK/deR9UqOmyeFwFgqLSYhD6k=
dependencies:
iconv-lite "^0.6.2"
end-of-stream@^1.0.0, end-of-stream@^1.1.0: end-of-stream@^1.0.0, end-of-stream@^1.1.0:
version "1.4.4" version "1.4.4"
resolved "https://registry.nlark.com/end-of-stream/download/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" resolved "https://registry.nlark.com/end-of-stream/download/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
...@@ -3997,6 +4031,11 @@ es-to-primitive@^1.2.1: ...@@ -3997,6 +4031,11 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1" is-date-object "^1.0.1"
is-symbol "^1.0.2" is-symbol "^1.0.2"
es6-promise@^4.2.8:
version "4.2.8"
resolved "https://registry.nlark.com/es6-promise/download/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
integrity sha1-TrIVlMlyvEBVPSduUQU5FD21Pgo=
escalade@^3.1.1: escalade@^3.1.1:
version "3.1.1" version "3.1.1"
resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
...@@ -5219,6 +5258,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: ...@@ -5219,6 +5258,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24:
dependencies: dependencies:
safer-buffer ">= 2.1.2 < 3" safer-buffer ">= 2.1.2 < 3"
iconv-lite@^0.6.2:
version "0.6.3"
resolved "https://registry.nlark.com/iconv-lite/download/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha1-pS+AvzjaGVLrXGgXkHGYcaGnJQE=
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
icss-utils@^4.0.0, icss-utils@^4.1.1: icss-utils@^4.0.0, icss-utils@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.nlark.com/icss-utils/download/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" resolved "https://registry.nlark.com/icss-utils/download/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467"
...@@ -5693,7 +5739,7 @@ is-resolvable@^1.0.0: ...@@ -5693,7 +5739,7 @@ is-resolvable@^1.0.0:
resolved "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" resolved "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
integrity sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg= integrity sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=
is-stream@^1.1.0: is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.nlark.com/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" resolved "https://registry.nlark.com/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
...@@ -5764,6 +5810,14 @@ isobject@^3.0.0, isobject@^3.0.1: ...@@ -5764,6 +5810,14 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.nlark.com/isobject/download/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" resolved "https://registry.nlark.com/isobject/download/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
isomorphic-fetch@^2.2.1:
version "2.2.1"
resolved "https://registry.npm.taobao.org/isomorphic-fetch/download/isomorphic-fetch-2.2.1.tgz?cache=0&sync_timestamp=1600844260369&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fisomorphic-fetch%2Fdownload%2Fisomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=
dependencies:
node-fetch "^1.0.1"
whatwg-fetch ">=0.10.0"
isstream@~0.1.2: isstream@~0.1.2:
version "0.1.2" version "0.1.2"
resolved "https://registry.nlark.com/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" resolved "https://registry.nlark.com/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
...@@ -5824,6 +5878,13 @@ jsesc@~0.5.0: ...@@ -5824,6 +5878,13 @@ jsesc@~0.5.0:
resolved "https://registry.nlark.com/jsesc/download/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" resolved "https://registry.nlark.com/jsesc/download/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
json-bigint@^0.3.0:
version "0.3.1"
resolved "https://registry.npm.taobao.org/json-bigint/download/json-bigint-0.3.1.tgz#0c1729d679f580d550899d6a2226c228564afe60"
integrity sha1-DBcp1nn1gNVQiZ1qIibCKFZK/mA=
dependencies:
bignumber.js "^9.0.0"
json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.nlark.com/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" resolved "https://registry.nlark.com/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
...@@ -6556,6 +6617,14 @@ node-emoji@^1.8.1: ...@@ -6556,6 +6617,14 @@ node-emoji@^1.8.1:
dependencies: dependencies:
lodash.toarray "^4.4.0" lodash.toarray "^4.4.0"
node-fetch@^1.0.1:
version "1.7.3"
resolved "https://registry.nlark.com/node-fetch/download/node-fetch-1.7.3.tgz?cache=0&sync_timestamp=1626684741221&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-fetch%2Fdownload%2Fnode-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
integrity sha1-mA9vcthSEaU0fGsrwYxbhMPrR+8=
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"
node-forge@^0.10.0: node-forge@^0.10.0:
version "0.10.0" version "0.10.0"
resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.10.0.tgz?cache=0&sync_timestamp=1599010726129&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.10.0.tgz?cache=0&sync_timestamp=1599010726129&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3"
...@@ -8248,7 +8317,7 @@ safe-regex@^1.1.0: ...@@ -8248,7 +8317,7 @@ safe-regex@^1.1.0:
dependencies: dependencies:
ret "~0.1.10" ret "~0.1.10"
"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2" version "2.1.2"
resolved "https://registry.nlark.com/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" resolved "https://registry.nlark.com/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=
...@@ -9213,9 +9282,9 @@ ts-pnp@^1.1.6: ...@@ -9213,9 +9282,9 @@ ts-pnp@^1.1.6:
resolved "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" resolved "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
integrity sha1-pQCtCEsHmPHDBxrzkeZZEshrypI= integrity sha1-pQCtCEsHmPHDBxrzkeZZEshrypI=
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1" version "1.14.1"
resolved "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=
tslint@^5.20.1: tslint@^5.20.1:
...@@ -9844,6 +9913,11 @@ websocket-extensions@>=0.1.1: ...@@ -9844,6 +9913,11 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.nlark.com/websocket-extensions/download/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" resolved "https://registry.nlark.com/websocket-extensions/download/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
integrity sha1-f4RzvIOd/YdgituV1+sHUhFXikI= integrity sha1-f4RzvIOd/YdgituV1+sHUhFXikI=
whatwg-fetch@>=0.10.0:
version "3.6.2"
resolved "https://registry.nlark.com/whatwg-fetch/download/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
integrity sha1-3O0k838mJO0CgXJdUdDi4/5nf4w=
which-boxed-primitive@^1.0.2: which-boxed-primitive@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.nlark.com/which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" resolved "https://registry.nlark.com/which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment