Commit 23c0aa06 authored by zhoudi's avatar zhoudi

clean版本

parent eff1add3
<template>
<van-tabbar class="footer" v-if="show">
<van-tabbar-item @click="navigatorTo('/')">
<img
slot="icon"
:src="active === 1 ? '/static/icon/zichanActived.png' : '/static/icon/zichan.png'"
/>
<h4 :class="active === 1?'actived':''">{{indexPage.title}}</h4>
</van-tabbar-item>
<van-tabbar-item @click="navigatorTo('/my')">
<img slot="icon" :src="active === 3 ? '/static/icon/woActived.png' : '/static/icon/wo.png'" />
<h4 :class="active === 3?'actived':''">{{myPage.title}}</h4>
</van-tabbar-item>
</van-tabbar>
</template>
<script>
import { mapState, mapMutations } from "vuex";
//import EventBus from "@/core/event-bus";
//import PhoneConfyVue from "./PhoneConfy.vue";
import { WalletStatusConst } from "../utils/walletstatus-const";
export default {
data() {
return {};
},
methods: {},
computed: {
...mapState("appShell/appFooter", [
"indexPage",
"retrievePage",
"myPage",
"active",
"showLogo",
"show",
"mainPage"
]),
...mapState("appShell/common", ["isPageSwitching"])
},
methods: {
...mapMutations("appShell/appFooter", ["setactive"]),
isActived(path) {
switch (path) {
case "/property":
this.setactive(1);
break;
case "/retrieve":
this.setactive(2);
break;
case "/my":
this.setactive(3);
break;
default:
this.setactive(1);
}
},
navigatorTo(path) {
this.isActived(path);
let query = {};
if (path === "/camera") {
query = Object.assign(query, { fromPath: this.$route.fullPath });
}
this.$router.push({ path, query });
},
goToRetrive() {
//手机号
//localStorage.curWalletStatus == WalletStatusConst.NoRecoveryInfo
}
}
};
</script>
<style scoped>
h4 {
text-decoration: none;
color: grey;
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
height: auto;
background: white;
height: 57px;
}
.actived {
color: #849ef8 !important;
}
.flex-sm-child {
border-right: 0.5px solid rgba(0, 0, 0, 0.2);
}
.text-white {
color: white;
line-height: 0px;
/* padding-bottom: 10px; */
}
</style>
\ No newline at end of file
<template>
<transition name="slide-down">
<header class="app-header-wrapper row" :class="pStyle" v-if="show">
<div class="app-header-left col-sm-2" v-show="showBack" @click="handleClick('back')">
<img :src="color" alt class="back-icon small-icon" />
</div>
<div class="app-header-middle col-sm-8" v-cloak>
<slot name="title">{{ title }}</slot>
</div>
<div class="app-header-right col-sm-2"></div>
</header>
</transition>
</template>
<script>
import { mapState } from "vuex";
import EventBus from "@/core/event-bus";
export default {
name: "appHeader",
computed: {
...mapState("appShell/appHeader", [
"show",
"showBack",
"title",
"color",
"pStyle"
]),
...mapState("appShell/common", ["isPageSwitching"])
},
methods: {
/**
* 处理按钮点击事件
*
* @param {string} source 点击事件源名称 menu/logo/action
* @param {Object} data 随点击事件附带的数据对象
*/
handleClick(source, { actionIdx, route } = {}) {
// 页面正在切换中,不允许操作,防止滑动效果进行中切换
if (this.isPageSwitching) {
return;
}
let eventData = {};
// 点击右侧动作按钮,事件对象中附加序号
if (source === "action") {
eventData.actionIdx = actionIdx;
}
// 发送给父组件,内部处理
this.$emit(`click-${source}`, eventData);
// 发送全局事件,便于非父子关系的路由组件监听
EventBus.$emit(`app-header:click-${source}`, eventData);
// 如果传递了路由对象,进入路由
if (route) {
this.$router.push(route);
}
}
}
};
</script>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
.app-header-wrapper {
position: absolute;
width: 100%;
background: transparent;
color: 'black';
padding: 0;
z-index: 100;
text-align: center;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
// box-shadow 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px rgba(0,0,0,.14), 0 1px 10px rgba(0,0,0,.12)
// transition: transform 0.3s ease-out;
.slide-down-enter, &.slide-down-leave-to {
transform: translate(0, -100%);
}
// 改变 icon 大小
.app-header-icon {
width: 20px;
height: 20px;
}
.app-header-icon-right {
flex: 1 1 auto;
font-size: 16px;
}
.back-icon {
margin-top: 15px;
}
</style>
<template>
<div>
<van-index-anchor :index="this.id" />
<!-- <ul v-for="i">
<li></li>
</ul>-->
<!-- <van-cell @click="goDetail" :title="this.remark" class="text-left" is-link :id="this.id"></van-cell> -->
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
list: []
};
},
props: ["id"],
methods: {
goDetail(e) {
let id = e.currentTarget.id;
this.$router.push(`/contact/${id}`);
this.$emit("showId", id);
},
contactsFilter() {
let contactsArray = [];
for (let i = 0; i < this.contacts.length; i++) {
if (this.contacts.ini == this.id[i]) {
contactsArray.push(this.contacts[i]);
} else {
}
}
}
},
mounted() {
console.log(contacts.constructor);
},
computed: {
...mapState("appShell/contacts", ["contacts"])
},
filters: {
capitalize: function(value) {
if (!value) return "";
value = value.toString();
return value.charAt(0).toUpperCase() + value.slice(1);
}
}
};
</script>
<style scoped>
.contacts {
border-top: 1px solid rgba(238, 238, 238, 238.1);
margin-top: 18%;
}
.contact-item {
padding: 21px 15px;
border-bottom: 1px solid rgba(238, 238, 238, 238.1);
/* border-radius:6px; */
/* box-shadow:0 5px 20px 0 #eee; */
}
.contact-icons {
width: 3.75vw;
}
.contact-item-controller {
padding-top: 15px;
}
.contact-icons-md {
width: 5.75vw;
margin: 0 5px;
}
</style>
\ No newline at end of file
This diff is collapsed.
<template></template>
<script>
export default {};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<li @click="goDetail(id)">
<div class="item-card">
<van-row class="coin-box">
<van-col span="4">
<div class="img-box">
<van-skeleton
avatar
:loading="this.market[id].icon === ''"
avatar-size="35"
style="paddingLeft:3.5px"
>
<img :src="this.market[id].icon" :alt="id" />
</van-skeleton>
</div>
</van-col>
<van-col span="10" class="coin">
<div class="title-1">
{{id}}
<span class="fs-1"></span>
</div>
<div class="fs-1">{{this.currency}}{{this.market[id].rmb}}</div>
</van-col>
<van-col span="10" class="user">
<div class="title-1">{{value | showAmount}}</div>
<div class="fs-1">{{value*this.market[id].rmb | showAmount}}</div>
</van-col>
</van-row>
</div>
</li>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "item",
data() {
return {
currency: "¥",
isDataReady: false
};
},
props: ["id", "value"],
computed: {
...mapState("appShell/appItem", ["market"])
},
mounted() {},
methods: {
goDetail(id) {
this.$router.push(`/detail/${id}`);
this.$emit("showId", id);
}
}
};
</script>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
.item-card {
border-radius: $app-box-border-radius;
box-shadow: $box-shadow;
padding: 15px;
text-align: left;
background-color: #fff;
}
.coin-box {
display: flex;
align-self: center;
align-content: center;
justify-content: center;
align-items: center;
}
.img-box>img {
height: 32px !important;
width: 32px !important;
}
.coin {
text-align: left;
padding: 0.55vh 0;
}
.user {
text-align: right;
padding: 0.55vh 0;
}
.item-card {
margin-bottom: 5px;
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog
class="phone-page"
fullscreen
append-to-body
:visible="showDialog"
@close="handleClose"
show-close
v-loading="loading"
>
<TopBox :title="topTitle"></TopBox>
<!-- <v-icon class="back" @click="visible = false">close</v-icon> -->
<div class="connect-phone">
<div class="connect-phone-top">
<el-select v-model="countryCodeValue" placeholder="+86" class="select">
<el-option v-for="item in countryCode" :key="item.value" :value="item.value"></el-option>
</el-select>
<el-input placeholder="手机号码" v-model="phoneNo" :disabled="!editablePhone" class="phone"></el-input>
<el-input placeholder="验证码" v-model="verifyCode" class="verifyCode" rquired></el-input>
<el-button
type="primary"
class="get-conf-code"
@click="sendCode"
:disabled="!editablePhone"
>{{countdownStr}}</el-button>
<!-- <div class='warning' v-show='error'>你输入的验证码有误,请核对后再试</div> -->
</div>
</div>
<el-button class="large-btn move text-white" @click="submitNext">{{btnName}}</el-button>
</el-dialog>
</div>
</template>
<script>
import TopBox from "../components/TopBox.vue";
import { mapActions } from "vuex";
import { isPhoneNum } from "../utils/tools";
export default {
data() {
return {
countryCode: [
{
value: "+86",
label: "+86 中国"
}
],
countryCodeValue: "",
phoneNo: "",
verifyCode: "",
vaild: false,
editablePhone: true,
countdown: -1,
loading: false
};
},
computed: {
countdownStr() {
return this.countdown < 0 ? "获取验证码" : `已发送${this.countdown}S`;
}
},
watch: {
isLoading: function(newV, oldV) {
this.loading = this.isLoading;
}
},
props: ["showDialog", "btnName", "isLoading", "topTitle", "loadingText"],
mounted() {
console.log("isLoading=>", typeof this.isLoading);
},
components: {
TopBox
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
methods: {
submitNext() {
this.$emit("submitNext", {
phoneNo: this.phoneNo,
verifyCode: this.verifyCode,
loading: true
});
},
sendCode() {
if (isPhoneNum(this.phoneNo)) {
this.editablePhone = false;
this.countdown = 60;
this.timer = setInterval(() => {
this.countdown--;
if (this.countdown < 0) {
window.clearInterval(this.timer);
this.editablePhone = true;
}
}, 1000);
this.$emit("sendCode", {
phoneNo: this.phoneNo
});
} else {
}
},
handleClose() {
this.$emit("handleClose", false);
}
}
};
</script>
<style scoped>
.top {
box-shadow: none;
}
.phone-page {
z-index: 90;
height: 100%;
width: 100%;
background-color: #fafafa;
position: fixed;
}
.warning {
margin: 3.75vh 1.25vw;
color: red;
}
.back {
position: absolute;
top: 15px;
right: 25px;
}
.connect-phone {
margin-top: 50px;
margin-left: 19px;
width: 90%;
text-align: left;
position: relative;
}
.select {
width: 30%;
}
.phone {
width: 65%;
}
.verifyCode {
width: 60%;
margin-top: 15px;
}
.get-conf-code {
border: none;
background-color: #849ef8 !important;
border-radius: 6px;
margin-left: 1%;
font-size: 3.1vw;
color: white !important;
}
/* .move {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
} */
.full-size {
width: 100%;
background-color: #849ef8;
color: white;
}
</style>
\ No newline at end of file
<template>
<div>
<TopBox :title="topTitle"></TopBox>
<div class="main-container-full">
<div class="info-box">
<van-button
type="default"
class="float-info-btn"
size="small"
@click="showCopy"
>{{userInfoCard.state?userInfoCard.textTrue:userInfoCard.textFalse}}</van-button>
<div class="user-info-card" v-if="userInfoCard.state">
<div class="info-top">
<div class="flex-parent width-content">
<div class="flex-child prefect-pr-s">
<img src="/static/img/decoration-1.png" alt class="small-icon" />
</div>
<div class="flex-child f-1 prefect-pr-s">钱包1 总资产(¥)</div>
</div>
</div>
<div class="property-title">{{totalValue?totalValue:0}}</div>
<div class="property-address flex-parent width-content">
<div
class="flex-child fs-1"
>{{mainAddress && `${mainAddress.slice(0,10)}...${mainAddress.slice(-7)}`}}</div>
<div class="flex-child">
<i>
<img
src="/static/img/copy.png"
id="d"
alt="copyHash"
class="copy-icon"
@click="copyAddress"
:data-Clipboard-text="mainAddress"
/>
</i>
</div>
</div>
<div class="QR-container" @click="()=>{this.$router.push('/recipt')}">
<qriously :value="mainAddress" class="small-QR" :size="QRsize" />
</div>
</div>
<div class="user-mnemonic-card" v-else>
<div class="title-1 mnemonic-title">账号助记词</div>
<div class="mnemonic-text">{{userInfoCard.mnemonic}}</div>
</div>
</div>
<div class="coin-account-box">
<van-tabs v-model="acountActive" swipeable @change="homeTabChange">
<van-tab title="钱包账户" class="text-left">
<div class="acount-balance">
<div class="input-tip">钱包资产折合(CNY)</div>
<div>
<!-- <span class="title-1">{{mainChainAmount}}</span>≈ -->
<span class="f-2">≈¥{{mainChainValue}}</span>
</div>
</div>
</van-tab>
<van-tab title="合约钱包账户" class="text-left">
<div class="acount-balance">
<div class="input-tip">合约钱包资产折合(CNY)</div>
<div>
<!-- <span class="title-1">{{uWalletAmount}}</span>≈ -->
<span class="f-2">≈¥{{uWalletValue}}</span>
</div>
</div>
</van-tab>
</van-tabs>
</div>
<ul class="coin-items" v-if="acountActive===0">
<Item v-for="(v,k) in this.coinObj" :id="k" :key="k" :value="v"></Item>
</ul>
<ul class="contract-items" v-else-if="acountActive===1">
<UwalletItem v-for="(v,k) in this.uCoinObj" :id="k" :key="k" :value="v"></UwalletItem>
</ul>
</div>
</div>
</template>
<script>
import Item from "../components/Item.vue";
import UwalletItem from "../components/UwalletItem.vue";
import TopBox from "../components/TopBox.vue";
import { mapActions, mapState } from "vuex";
import Clipboard from "clipboard";
import { WalletStatusConst } from "../utils/walletstatus-const";
import { mainChainPrefix, paraChainPrefix, goAppPrefix } from "../api/config";
import { decrypt } from "../utils/crypto.js";
import CommonRequest from "../mixins/common-request.js";
import { sign } from "@33cn/wallet-base";
// function setState(store) {}
export default {
name: "property",
mixins: [CommonRequest],
data() {
return {
//头部显示
topTitle: "找回钱包",
retrieving: false,
resetTime: 0,
retrieving_btn: false, //curWalletStatus === WalletStatusConst.RetrieveDelay
toResetDetail: () => {
this.$router.push("/retrieve-check");
},
//用户信息框
userInfoCard: {
state: true,
textTrue: "助记词",
textFalse: "返回",
mnemonic: localStorage.mnemonic
},
QRbackground: "white",
QRsize: 69,
/**
* 当前钱包的状态
*/
curWalletStatus: WalletStatusConst.NoRecoveryInfo,
WalletStatus: WalletStatusConst, //所有状态
mainAddress: localStorage.mainAddress,
acountActive: 0
};
},
components: {
Item,
TopBox,
UwalletItem
},
metaInfo: {
title: "Home",
meta: [
{ name: "keywords", content: "去中心化钱包" },
{
name: "description",
content: "基于区块链技术的去中心化数字货币钱包"
}
]
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
...mapActions("appShell/pageAlive", ["setHomeTabs"]),
...mapActions("appShell/appItem", ["setAppItemUCoin", "setAppItemCoin"]),
copyAddress() {
let btnCopy = new Clipboard("#d");
btnCopy.copyValue = this.mainAddress;
this.$toast({
message: "复制成功",
type: "success",
forbidClick: true,
duration: 1500
});
},
setQRsize() {
let userHeight = window.screen.availHeight;
let userWidth = window.screen.availWidth;
if (userWidth < 399 && userWidth > 0) {
this.QRsize = 69;
} else if (userWidth > 399 && userWidth < 499) {
this.QRsize = 85;
} else if (userWidth > 499 && userWidth < 699) {
this.QRsize = 120;
} else {
this.QRsize = 135;
}
},
homeTabChange() {
let active = this.acountActive;
this.setHomeTabs({
active
});
},
// async getMarketValue() {
// await fetch(
// "https://api.biqianbao.top/api/data/basecoinprice?base=CNY&coin=BTY&platform=zhaobi"
// ).then(response => {
// return response.json();
// });
// },
//显示助记词
showCopy() {
this.userInfoCard.mnemonic = decrypt(
localStorage.cryptmnemonic,
"Aa123456"
);
this.userInfoCard.state = !this.userInfoCard.state;
}
},
created() {
this.setQRsize();
},
mounted() {
this.acountActive = this.homeTabs.active;
this.setAppHeader({
show: false,
showBack: false
});
this.setAppFooter({
show: true
});
this.initMyBaseInfo(localStorage.mainAddress, queryRlt => {
this.curWalletStatus = queryRlt.data.status;
localStorage.curWalletStatus = queryRlt.data.status;
});
},
computed: {
...mapState("appShell/pageAlive", ["homeTabs"]),
...mapState("appShell/appItem", ["coinObj", "uCoinObj", "market"]),
// mainChainAmount() {
// return this.coinObj.BTY / 100000000 + this.coinObj.CCNY / 100000000;
// },
mainChainValue() {
return (
(this.coinObj.BTY / 100000000) * this.market.BTY.rmb +
(this.coinObj.CCNY / 100000000) * this.market.CCNY.rmb
).toFixed(2);
},
uWalletAmount() {
return this.uCoinObj.BTY / 100000000 + this.coinObj.CCNY / 100000000;
},
uWalletValue() {
return (
(this.uCoinObj.BTY / 100000000) * this.market.BTY.rmb +
(this.uCoinObj.CCNY / 100000000) * this.market.CCNY.rmb
).toFixed(2);
},
totalValue() {
return (
(this.coinObj.BTY / 100000000) * this.market.BTY.rmb +
(this.coinObj.CCNY / 100000000) * this.market.CCNY.rmb +
(this.uCoinObj.BTY / 100000000) * this.market.BTY.rmb +
(this.uCoinObj.CCNY / 100000000) * this.market.CCNY.rmb
).toFixed(2);
}
}
};
</script>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
h2 {
font-size: $app-title-font-size;
font-weight: 500;
color: $app-sub-color-1;
}
.info-box {
width: 90%;
margin: 0 auto;
border-radius: 6px;
position: relative;
padding: 0 15px;
text-align: left;
box-sizing: border-box;
background-color: #fff;
background-image: url('/static/img/card.png');
background-size: cover;
background-position: center;
color: #fff;
}
.info-top {
padding-top: 25px;
}
.small-QR {
margin: 0 auto;
height: 60%;
}
.property-title {
padding: 15px 0;
}
.property-address {
padding-bottom: 15px;
}
.small-icon {
width: 27px !important;
height: 18px !important;
}
.width-content {
width: fit-content;
}
.copy-icon {
height: 20px;
margin: 0 5px;
line-height: 20px;
}
.show-copy {
position: absolute;
background-color: #f99454;
width: 58px;
text-align: center;
font-size: 14px;
top: 21px;
right: 13px;
padding: 4px 4px;
border-radius: 6px !important;
}
// 列表元素
.coin-items, .contract-items {
width: 90%;
margin: 0 auto;
margin-top: 10px;
}
.user-mnemonic-card {
height: 166.98px;
padding: 25px;
box-sizing: border-box;
}
.mnemonic-title {
color: #8E92A3;
font-size: 16px;
}
.float-info-btn {
position: absolute;
right: 15px;
top: 25px;
border-radius: 5px;
background-color: #F99454;
color: #ffffff;
border: none;
}
.mnemonic-text {
box-sizing: border-box;
padding: 5px 0;
color: white;
font-size: 4.5vw;
letter-spacing: 8px;
text-decoration: underline;
width: 75%;
margin: 12px auto;
}
.fs-1, .f-1 {
line-height: 21px;
}
.QR-container {
position: absolute;
bottom: 16px;
right: 15px;
border-radius: 2px;
height: auto;
width: auto;
background: white;
}
.coin-account-box {
width: 90%;
margin: 0 auto;
margin-top: 10px;
background-color: #fff;
border-radius: 6px;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
.acount-balance {
padding: 1.9vh 2vh;
}
</style>
<template>
<el-dialog
class='dialogBox'
:title="title"
:visible="dialogVisible"
append-to-body
:show-close='false'
width="60%">
<div>
<img :src="`/static/icon/${dialogImg}.png`" alt="" class='dialogImg'>
<div class='dialogText'>{{dialogText}}</div>
</div>
</el-dialog>
</template>
<script>
export default {
name:'smallDialog',
data(){
return{
}
},
props:['dialogText','title','dialogVisible','dialogImg'],
methods:{
}
};
</script>
<style scoped lang='stylus'>
.dialogImg{
width:17.5vw;
}
.dialogBox{
text-align:center;
border-radius:6px;
}
.dialogText{
margin-top:15px
}
</style>
\ No newline at end of file
<template>
<div>
<div class="top">
<el-button
class="reset-btn"
:class="btn_color"
v-if="btn_show"
:disabled="disabled"
@click="handleClickTopbox"
>{{btnName}}</el-button>
<!-- <div class="notify-box" v-if="retrieving">*您的钱包主地址正在重置中,预计{{resetTime}}分钟!</div> -->
<div class="top-title">{{title}}</div>
</div>
<div></div>
</div>
</template>
<script>
export default {
props: {
title: String,
btn_show: {
type: Boolean,
default: false
},
btnName: String,
btn_color: {
type: String,
default: "c1"
},
disabled: Boolean
},
methods: {
handleClickTopbox() {
this.$emit("handleClickTopbox");
}
}
};
</script>
<style scoped>
.top {
width: 100%;
position: relative;
/* box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1); */
}
.top-title {
padding: 20px 0;
padding-left: 19px;
text-align: left;
font-size: 30px;
font-family: "PingFangSC-Medium", "PingFangSC";
font-weight: 500;
color: rgba(51, 54, 73, 1);
line-height: 41px;
}
.reset-btn {
position: absolute;
top: 20px;
color: #fff;
right: 5%;
border: none;
width: auto;
/* padding: 2.75vw 4.25vw; */
border-radius: 10px;
}
.c1 {
background: rgba(249, 148, 84, 1);
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
.c2 {
background: rgba(132, 158, 248, 1);
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
</style>
\ No newline at end of file
<template>
<li @click="goDetail(id)">
<div class="item-card">
<van-row class="coin-box">
<van-col span="4">
<div class="img-box">
<img :src="this.market[id].icon" :alt="id" />
</div>
</van-col>
<van-col span="10" class="coin">
<div class="title-1">
{{id}}
<span class="fs-1"></span>
</div>
<div class="fs-1">{{this.currency}}{{this.market[id].rmb}}</div>
</van-col>
<van-col span="10" class="user">
<div class="title-1">{{value | showAmount}}</div>
<div class="fs-1">{{value*this.market[id].rmb | showAmount}}</div>
</van-col>
</van-row>
</div>
</li>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "item",
data() {
return {
currency: "¥"
};
},
props: ["id", "value"],
computed: {
...mapState("appShell/appItem", ["market"])
},
methods: {
goDetail(id) {
this.$router.push(`/uwallet-detail/${id}`);
this.$emit("showId", id);
}
}
};
</script>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
.item-card {
border-radius: $app-box-border-radius;
box-shadow: $box-shadow;
padding: 15px;
background-color: #fff;
text-align: left;
}
.coin-box {
display: flex;
align-self: center;
align-content: center;
justify-content: center;
align-items: center;
}
.img-box>img {
height: 32px !important;
width: 32px !important;
}
.coin-box {
}
.coin {
text-align: left;
padding: 0.55vh 0;
}
.user {
text-align: right;
padding: 0.55vh 0;
}
.item-card {
margin-bottom: 5px;
}
.qrcode {
height: 72px !important;
width: 72px !important;
}
</style>
\ No newline at end of file
This diff is collapsed.
{
"name": "non-centralized-chat",
"name": "non-centralized-33wallet",
"version": "0.0.1",
"description": "去中心化聊天",
"author": "Zhoudi <zhoudi@33.cn>",
"description": "去中心化区块链钱包",
"author": "Hanfeng <hanfengwebdesign@gmail.com>",
"private": true,
"lavas": {
"core": "lavas-core-vue",
......
<template>
<div>
<TopBox
title="新建联系人"
btn_color="c2"
:btn_show="true"
btnName="保存"
@handleClickTopbox="saveContact"
:disabled="disAbleBtn"
></TopBox>
<div class="addContact">
<div class="btn-controller">
<label class="label title-1">联系人标签</label>
<van-field placeholder="联系人名字或称谓" class="input" v-model="contactData.remark"></van-field>
</div>
<div class="btn-controller">
<div class="flex-sm-parent">
<label class="label title-1 flex-sm-child">地址</label>
<a class="flex-sm-child text-right camera-container">
<img src="/static/icon/camera.png" class="small-icon" @click="toCamera" />
</a>
</div>
<van-field placeholder="地址" class="input" v-model="contactData.addr"></van-field>
</div>
</div>
</div>
</template>
<script>
import TopBox from "../components/TopBox.vue";
import { addContact } from "../api/chain33API/request.js";
import { mapActions, mapState } from "vuex";
export default {
name: "addContact",
data() {
return {
contactData: {
remark: "",
addr: ""
}
};
},
components: {
TopBox
},
mounted() {
this.initPage();
setTimeout(() => {
this.setAppHeader({
show: true,
showBack: true,
color: "/static/icon/back_black.png"
});
this.setAppFooter({
show: false
});
}, 290);
let name = "张小二";
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
...mapActions("appShell/contacts", ["addAppContact"]),
saveContact() {
if (this.btnActive) return;
const toast = this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true,
message: "正在储存"
});
this.btnActive = true;
addContact({
remark: this.contactData.remark,
addr: this.contactData.addr,
callback: rlt => {
this.btnActive = false;
if (rlt.success) {
toast.message = "储存成功";
toast.icon = "success";
this.addAppContact({
address: this.contactData.addr,
remark: this.contactData.remark
});
setTimeout(() => {
toast.clear();
this.$router.push("/contacts");
}, 1000);
} else {
toast.icon = "fail";
toast.message = rlt.errMsg;
setTimeout(() => {
toast.clear();
}, 1000);
}
}
});
},
initPage() {
let codeScaled = this.$router.history.current.query.decodeStatus;
let codeFromCamera = this.$router.history.current.query.decodeStr;
let contactName = this.$router.history.current.query.userName;
if (codeScaled === true) {
if (contactName) {
this.contactData.remark = contactName;
} else {
this.contactData.remark = "";
}
this.contactData.addr = codeFromCamera;
} else {
}
},
toCamera() {
this.$router.push({
path: "/camera",
query: {
fromPath: this.$route.fullPath,
contactName: this.contactData.remark
}
});
}
},
watch: {},
computed: {
...mapState("appShell/contacts", ["contacts"]),
disAbleBtn() {
if (this.contactData.remark && this.contactData.addr) {
return false;
} else {
return true;
}
}
}
};
</script>
<style scoped>
.addContact {
margin-top: 68px;
}
.btn-controller {
text-align: left;
}
.input {
margin-top: 10px;
margin-bottom: 15px;
}
.label {
padding-left: 3.75vw;
}
</style>
\ No newline at end of file
<template>
<div>
<!-- 二维码扫描组件 -->
<div class="fullscreen">
<div class="top-box">
<el-button class="centered-child action-box-a" @click="linkToCamera">
<img src="/static/icon/updatePhoto.png" class="md-icon" />
<div class="input-tip">拍照扫描二维码</div>
</el-button>
</div>
<div class="bot-box">
<el-button class="centered-child action-box-b" @click="linkToUpdate">
<img src="/static/icon/updateAddr.png" class="md-icon" />
<div class="input-tip">图片识别二维码</div>
</el-button>
</div>
<div class="footer-box">
<img src="/static/img/camera-style.png" class="footer-box-img" />
</div>
<!-- <qrcode-stream :key="_uid" @decode="onDecode" @init="onInit"> -->
<!-- </qrcode-stream> -->
</div>
<!-- 图片上传 -->
<input type="file" accept="image/*" id="update-enter" @change="onChange" v-show="false" />
<qrcode-capture @decode="onDecode" @detect="onDetect" ref="cameraEnter" v-show="false" />
</div>
</template>
<script>
import { mapActions } from "vuex";
import { QrcodeStream, QrcodeCapture } from "vue-qrcode-reader";
import { scan } from "../utils/scanner.js";
import EventBus from "@/core/event-bus";
import { eventOn } from "callforth";
// import Worker from "../utils/worker/jsqr.js";
export default {
name: "camera",
props: {
worker: {
type: Function,
default: Worker
}
},
data() {
return {
showHeader: true,
showBack: true,
icon: "",
color: "/static/icon/back_black.png",
title: "",
_uid: "333",
error: false,
//脚部设置
footerShow: false
};
},
mounted() {
console.log(this.$router, "dsfkojdfloikjsdklf");
this.setAppHeader({
show: this.showHeader,
showBack: this.showBack,
actions: [
{
icon: this.icon
}
],
title: this.title,
color: this.color
});
this.setAppFooter({
show: this.footerShow
});
// EventBus.$on("app-header:click-action", val => {
// // if(this.$refs.test){
// // this.$refs.test.$el.click()
// // }
// if (document.getElementById("test")) {
// document.getElementById("test").click();
// }
// });
},
components: {
QrcodeCapture
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
linkToCamera() {
if (this.$refs.cameraEnter) {
this.$refs.cameraEnter.$el.click();
}
},
linkToUpdate() {
if (document.getElementById("update-enter")) {
document.getElementById("update-enter").click();
}
},
onChange(event) {
const files = [...event.target.files];
let promises = files.map(this.processFile);
Promise.all(promises).then(res => {
let fromPath = this.$router.history.current.query.fromPath;
if (res[0].content) {
this.$router.replace({
path: fromPath,
query: { decodeStr: res[0].content }
});
}
});
},
openPhotoAlbum() {
if (document.getElementById("test")) {
document.getElementById("test").click();
}
},
async processFile(file) {
const imageData = await this.imageDataFromFile(file);
const scanResult = await scan(this.worker, imageData);
return scanResult;
},
async imageDataFromFile(file) {
if (/image.*/.test(file.type)) {
const reader = new FileReader();
reader.readAsDataURL(file);
const result = await eventOn(reader, "load");
const dataURL = result.target.result;
return this.imageDataFromUrl(dataURL);
} else {
alert("DropImageDecodeError");
}
},
async imageDataFromUrl(url) {
if (url.startsWith("http") && url.includes(location.host) === false) {
alert("DropImageFetchError");
}
const image = document.createElement("img");
image.src = url;
await eventOn(image, "load");
return this.imageDataFromImage(image);
},
// imageDataFromImage(imageElement) {
// const width = imageElement.naturalWidth;
// const height = imageElement.naturalHeight;
// return this.imageDataFromCanvas(imageElement, width, height);
// },
// imageDataFromCanvas(canvasImageSource, width, height) {
// const canvas = document.createElement("canvas");
// const canvasCtx = canvas.getContext("2d");
// canvas.width = 1920;
// canvas.height = 1080;
// const scalingRatio = Math.min(
// 1,
// canvas.width / width,
// canvas.height / height
// );
// const widthScaled = scalingRatio * width;
// const heightScaled = scalingRatio * height;
// canvasCtx.drawImage(canvasImageSource, 0, 0, widthScaled, heightScaled);
// return canvasCtx.getImageData(0, 0, widthScaled, heightScaled);
// },
// async onInit(promise) {
// try {
// await promise;
// } catch (error) {
// if (error.name === "NotAllowedError") {
// this.error = "ERROR: you need to grant camera access permisson";
// // this.$message("ERROR: you need to grant camera access permisson")
// } else if (error.name === "NotFoundError") {
// this.error = "ERROR: no camera on this device";
// } else if (error.name === "NotSupportedError") {
// this.error = "ERROR: secure context required (HTTPS, localhost)";
// } else if (error.name === "NotReadableError") {
// this.error = "ERROR: is the camera already in use?";
// } else if (error.name === "OverconstrainedError") {
// this.error = "ERROR: installed cameras are not suitable";
// } else if (error.name === "StreamApiNotSupportedError") {
// this.error = "ERROR: Stream API is not supported in this browser";
// } else {
// console.log("error:", error);
// // this.$message(error.message);
// }
// setTimeout(() => {
// // let fromPath = this.$route.query.fromPath
// // this.$router.replace({path:fromPath})
// }, 1000);
// // this.$message(error.message);
// this.error = true;
// }
// },
onDecode(decodeString) {
let name = this.$router.history.current.query.contactName;
let fromPath = this.$router.history.current.query.fromPath;
if (decodeString) {
this.$router.replace({
path: fromPath,
query: { decodeStr: decodeString, decodeStatus: true, userName: name }
});
} else {
alert("没有扫出东西");
}
},
async onDetect(promise) {
try {
const {
imageData, // raw image data of image/frame
content, // decoded String or null
location // QR code coordinates or null
} = await promise;
if (content === null) {
this.$toast({
message: "未检测到内容,请确认对焦准确",
type: "fail",
forbidClick: true,
duration: 1500
});
} else {
}
} catch (error) {
this.$message({
showClose: true,
message: error,
type: "error"
});
}
}
}
};
</script>
<style lang="stylus" scoped>
/* 全屏摄像头 */
.fullscreen {
position: relative;
z-index: 0;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
.md-icon {
padding-top: 7vw;
}
.top-box, .bot-box {
height: 38vh;
width: 100%;
position: relative;
}
.footer-box {
height: 24vh;
width: 100%;
position: relative;
}
.footer-box-img {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.QRerror {
height: 12.5vh;
}
.action-box-a {
top: 75%;
}
.action-box-a, .action-box-b {
border: none;
width: 45vw;
border-radius: 6px;
padding: 25px;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
.input-tip {
min-height: 22px;
margin-top: 15px;
text-align: center;
}
</style>
\ No newline at end of file
<template>
<div>
<TopBox
:title="topTitle"
@handleClickTopbox="addContact"
btnName="添加"
:btn_show="contacts.length > 0"
></TopBox>
<div v-if="contacts.length > 0" class="main-container-full">
<div class="search-controller">
<van-search placeholder="请输入搜索关键词" v-model="searchContact" />
</div>
<div>
<van-index-bar class="contact-continaer">
<!-- <ContactItem v-for="key in Dic" :id="key" :key="key"></ContactItem> -->
<template v-for="(item, key) in arr2">
<van-index-anchor :index="item.key" class="text-left anchor" :key="key" />
<van-cell
v-for="(item2, key2) in item.value"
:key="key2"
:title="item2.remark"
@click="goDetail"
class="text-left"
clickable
is-link
:id="item2.address"
/>
</template>
</van-index-bar>
</div>
</div>
<div v-else class="empty-page">
<img src="/static/img/man.png" alt />
<el-button class="large-btn text-white move" @click="addContact">添加新联系人</el-button>
</div>
</div>
</template>
<script>
import TopBox from "../components/TopBox.vue";
import { getContacts } from "../api/chain33API/request.js";
import ContactItem from "../components/ContactItem.vue";
import { mapActions, mapState } from "vuex";
import {
mainChainPrefix,
paraChainPrefix,
goAppPrefix,
marketBTYInterface,
chainNamePrefix,
uwalletChainAddr
} from "../api/config";
export default {
name: "contacts",
data() {
return {
topTitle: "联系人列表",
searchContact: "",
arr2: [],
coinType: this.$router.history.current.query.coinType
};
},
components: {
TopBox,
ContactItem
},
mounted() {
console.log(this.contacts, "dfsoidjfosipdjhfoipshjdfopisdhjpoif");
setTimeout(() => {
this.setAppHeader({
show: true,
showBack: true,
color: "/static/icon/back_black.png",
pStyle: "relative"
});
this.setAppFooter({
show: false
});
}, 290);
this.setList();
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
addContact() {
this.$router.push("/addcontact");
},
goDetail(e) {
let id = e.currentTarget.id;
this.$router.push({
path: `/contact/${id}`,
query: { coinType: this.$router.history.current.query.fromPath }
});
},
setList() {
let Dic = {};
let srcItems = this.contacts;
for (let i = 0; i < srcItems.length; i++) {
if (srcItems[i].remark) {
let key = pinyin.getCamelChars(srcItems[i].remark)[0].toUpperCase();
if (Dic[key]) {
Dic[key].push(srcItems[i]);
} else {
this.$set(Dic, key, [srcItems[i]]);
}
}
}
for (let attr in Dic) {
this.arr2.push({ key: attr, value: Dic[attr] });
}
for (let i = 0; i < this.arr2.length - 1; i++) {
for (let j = i + 1; j < this.arr2.length; j++) {
if (this.arr2[i].key > this.arr2[j].key) {
var tmp = this.arr2[i];
this.arr2[i] = this.arr2[j];
this.arr2[j] = tmp;
}
}
}
}
},
computed: {
...mapState("appShell/contacts", ["contacts"])
}
};
</script>
<style scoped>
.contact-continaer {
height: 70vh;
width: auto;
margin: 0 auto;
margin-top: 25px;
border-top: 1px solid rgba(0, 0, 0, 0.3);
}
.anchor {
padding-left: 12px;
}
/* .move {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
} */
.empty-page {
height: 80vh;
width: 100%;
}
.empty-page img {
width: 60%;
margin-top: 118px;
}
.van-search {
padding: 0 !important;
}
.search-controller {
width: 90%;
margin: 0 auto;
}
.contact-item {
padding: 21px 15px;
border-bottom: 1px solid rgba(238, 238, 238, 238.0.1);
/* border-radius:6px; */
/* box-shadow:0 5px 20px 0 #eee; */
}
.diva-line {
padding: 2px 4px;
margin-right: 5px;
background-color: #849ef8;
border-radius: 2px;
}
.contact-icons {
width: 3.75vw;
}
.contact-item-controller {
padding-top: 15px;
}
.main-container-full {
overflow: initial;
}
.contact-continaer {
overflow: scroll;
}
.contact-icons-md {
width: 5.75vw;
margin: 0 5px;
}
</style>
\ No newline at end of file
<template>
<div class="page-error">
<p>{{ message }}</p>
</div>
<div></div>
</template>
<script>
export default {
name: 'error',
computed: {
message() {
return this.$route.params.error || '您访问的路径不存在';
}
},
created() {
let query = this.$route.query;
if (Object.keys(query).length !== 0) {
this.$router.replace({
name: 'error',
params: query
});
}
}
};
</script>
<template>
<div class='app'>
<Property v-if='addrExist'></Property>
<CreateApp v-else
@addrExistStatus="updateAddrExist"
></CreateApp>
ddffdf
</div>
</template>
<script>
import Property from "../components/Property";
import CreateApp from "../components/CreateApp";
import { mapActions } from "vuex";
export default {
data() {
return {
addrExist:false,
//navigator
headerShow: false,
showBack: false,
};
},
components: {
Property,
CreateApp
},
methods: {
isAddrExist(){
let oldUser = localStorage.mainAddress;
if (oldUser) {
this.addrExist = true;
} else {
this.addrExist = false;
}
},
updateAddrExist(exist){
this.addrExist = exist.addrExist
},
//检测钱包状态,(当前没用)
async detectWalletStatusContract() {
console.log("获取当前的钱包状态 => detectWalletStatusContract");
let queryRlt = await this.getWalletStatus(localStorage.mainAddress);
if (queryRlt.code == 200) {
this.curWalletStatus = queryRlt.data.status;
localStorage.curWalletStatus = queryRlt.data.status;
// if (localStorage.curWalletStatus == WalletStatusConst.NoRecoveryInfo) {
// this.showDialog = true;
// }
// else{
// this.showDialog = false;
// }
}
}
},
mounted() {
this.isAddrExist();
}
};
</script>
......
This diff is collapsed.
<template>
<div class="recipt-view">
<van-popup v-model="showPop" position="bottom" :style="{ height: '35%' }">
<van-picker :columns="coinAccount" show-toolbar @confirm="pickCoin" @cancel="cancelPop" />
</van-popup>
<div class="recipt-card">
<div class="recipt-card-top">
<van-cell
:title="coinTitle"
:icon="this.market[coinType].icon"
is-link
@click="togglePopup"
arrow-direction="down"
class="recipt-top"
/>
</div>
<div class="recipt-card-content">
<span class="sub-content-1">
余额
<span class="title-2">
<span v-if="showBlance && accountType === 'coinObj'">{{coinObj[coinType] | showAmount}}</span>
<span
v-else-if="showBlance && accountType === 'uCoinObj'"
>{{uCoinObj[coinType] | showAmount}}</span>
<span v-else>******</span>
{{coinType}}
</span>
</span>
<img
:src="showBlance?'/static/img/eyeshow.png':'/static/img/eyeclose.png'"
alt
@click="showBlanceBtn"
/>
<!-- <img src="/static/img/styleImg/eyeclose.png" alt /> -->
<qriously :value="address" class="QRcode" />
<div class>钱包地址</div>
<div class="Address input-tip" v-if="showBlance">{{address}}</div>
<div class="Address input-tip" v-else>******************</div>
</div>
</div>
</div>
</template>
<script>
import { decrypt } from "../utils/crypto.js";
import { mapActions, mapState } from "vuex";
import Wallet from "../mixins/Wallet";
import { mainChainPrefix, paraChainPrefix, goAppPrefix } from "../api/config";
export default {
mixins: [Wallet],
data() {
return {
coinType: "BTY",
accountType: "coinObj",
coinIcon: "",
coinTitle: "钱包BTY",
address: "",
myBTYRest: 0,
showBlance: false,
//设置头部
showHeader: true,
icon: "",
color: "/static/icon/back_white.png",
showBack: true,
showPop: false,
coinAccount: [
{
id: "1",
symbol: "BTY",
text: "钱包BTY",
account: "coinObj"
},
{
id: "2",
symbol: "CCNY",
text: "钱包CCNY",
account: "coinObj"
},
{
id: "3",
symbol: "BTY",
text: "合约BTY",
account: "uCoinObj"
},
{
id: "4",
symbol: "CCNY",
text: "合约CCNY",
account: "uCoinObj"
}
],
//脚步显示
showFooter: false
};
},
mounted() {
this.setAppHeader({
show: this.showHeader,
color: this.color,
showBack: this.showBack,
pStyle: "absolute"
});
this.setAppFooter({
show: this.showFooter
});
this.init();
},
computed: {
...mapState("appShell/appItem", ["coinObj", "uCoinObj", "market"])
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
showBlanceBtn() {
this.showBlance = !this.showBlance;
},
togglePopup() {
this.showPop = true;
},
cancelPop() {
this.showPop = false;
},
pickCoin(value) {
this.coinType = value.symbol;
this.accountType = value.account;
this.coinTitle = value.text;
this.showPop = false;
},
/**
* 初始化
*/
async init() {
/**
* 公钥
*/
this.address = localStorage.mainAddress;
}
}
};
</script>
<style>
.QRcode canvas {
width: 100%;
height: 100%;
}
</style>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
.QRcode {
width: 48vw;
height: 48vw;
margin: 25px auto;
}
.recipt-view {
height: 100vh;
width: 100vw;
background-color: $app-banner-background-color;
}
.van-cell {
padding: 5px 5px;
}
.recipt-card {
position: fixed;
bottom: 0;
height: 80%;
width: 100%;
border-radius: 5% 5% 0% 0%;
background-color: white;
}
.recipt-top {
border-bottom: none;
width: 65%;
text-align: left;
}
.van-cell__title {
font-size: 16px;
font-weight: 500;
}
.van-cell__title, .van-cell__value {
flex: none;
}
.van-icon__image {
height: 25px;
width: 25px;
}
.recipt-card-top {
text-align: left;
display: flex;
justify-content: left;
align-items: center;
align-content: center;
padding: 25px;
}
.el-dialog {
position: absolute !important;
bottom: 0;
width: 100% !important;
}
.downArrow {
width: 3.7vw;
height: auto;
margin: 0 5px;
}
.Address {
width: 80%;
margin: 15px auto;
}
.copy-icon {
width: 17px;
height: 20px;
margin: 0 5px;
line-height: 20px;
}
.recipt-card-content {
margin: 25px 0;
}
.eye-box {
display: flex;
align-items: center;
justify-items: center;
justify-content: center;
}
.eyeshow, .eyeclose {
padding: 5px;
}
</style>
\ No newline at end of file
<template>
<div>
<TopBox
:title="topTitle"
:resetTime="resetTime"
:retrieving="retrieving"
:retrieving_btn="retrieving_btn"
></TopBox>
<div class="retrieveCheck">
<div class="title-1 pa-2">新主地址</div>
<div class="input-tip pa-1">{{newWalletAddr}}</div>
<div class="title-1 pa-2">老主地址</div>
<div class="input-tip pa-1">16htvcBNSEA7fZhAdLJp</div>
<div class="pt-3 pb-3 input-label pl-2">
规则:每分钟转移资产
<span class="highlight">10%</span>
</div>
<div class="diva-lg"></div>
<div class="check-table pt-4">
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-4">
<div class="input-tip highlight">老主地址</div>
</div>
<div class="com-sm-1"></div>
<div class="col-sm-4">
<div class="input-tip highlight-2">新主地址</div>
</div>
</div>
<ul class="pt-2">
<li class="coin-box pb-2">
<div class="row">
<div class="col-sm-3 title-1">BTY</div>
<div class="col-sm-4 title-1 highlight">12232.00</div>
<div class="com-sm-1 title-1"></div>
<div class="col-sm-4 title-1 highlight-2">12312121.00</div>
</div>
</li>
</ul>
</div>
</div>
<el-button class="large-btn move" @click="toHomePage">返回首页</el-button>
</div>
</template>
<script>
import TopBox from "../components/TopBox.vue";
import { mapActions } from "vuex";
export default {
data() {
return {
//navigator
headerShow: false,
showBack: false,
//脚步样式
footerShow: false,
//头部样式
topTitle: "重置主地址-查看",
resetTime: 1,
retrieving: true,
retrieving_btn: false,
newWalletAddr: localStorage.mainAddress
};
},
components: {
TopBox
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
toHomePage() {
this.$router.go(-1);
}
},
mounted() {
this.setAppHeader({
show: this.headerShow,
showBack: this.showBack
});
this.setAppFooter({
show: this.footerShow
});
}
};
}
</script>
<style scoped>
.retrieveCheck {
text-align: left;
width: 90%;
margin: 0 auto;
}
.check-table {
text-align: center;
}
.highlight {
color: #fa6400;
font-weight: 600;
}
.highlight-2 {
color: #6368de;
font-weight: 600;
}
.coin-box {
height: 8.9vh;
line-height: 8.9vh;
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
border-radius: 6px;
}
</style>
\ No newline at end of file
......@@ -2,125 +2,32 @@
备份详情
-->
<template>
<div>
<TopBox
:title="topTitle"
:resetTime="resetTime"
:retrieving="retrieving"
:retrieving_btn="retrieving_btn"
></TopBox>
<div class="retrieveCheck">
<div class="title-1 pa-2">主地址</div>
<div class="input-tip pa-1">{{mainAddress}}</div>
<div class="title-1 pa-2">手机号</div>
<div class="input-tip pa-1">{{phoneNumb}}</div>
<div class="pt-3 pb-3 input-label pl-2">
规则:一分钟全部转移
<span class="highlight">100%</span>
</div>
<div class="diva-lg"></div>
<div class="check-table pt-4">
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-4">
<div class="input-tip highlight">余额</div>
</div>
<div class="com-sm-1"></div>
<div class="col-sm-4">
<div class="input-tip highlight-2">总价值</div>
</div>
</div>
<ul class="pt-2">
<li class="coin-box pb-2">
<div class="row">
<div class="col-sm-3 title-1">BTY</div>
<div class="col-sm-4 title-1 highlight">{{coin.coinAmount}}</div>
<div class="com-sm-1 title-1"></div>
<div class="col-sm-4 title-1 highlight-2">{{coin.coinAmount * coin.marketValue}}</div>
</div>
</li>
</ul>
</div>
</div>
<el-button class="large-btn move" @click="toHomePage">返回首页</el-button>
</div>
<div></div>
</template>
<script>
import TopBox from "../components/TopBox.vue";
import { mapActions, mapState } from "vuex";
export default {
data() {
return {
//navigator
headerShow: false,
showBack: true,
//脚步样式
footerShow: false,
//头部样式
topTitle: "备份详情",
resetTime: 1,
retrieving: true,
retrieving_btn: false,
mainAddress: localStorage.mainAddress,
phoneNumb: localStorage.phoneNumb
};
},
computed: {
...mapState("appShell/appItem", ["coin"])
},
components: {
TopBox
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
toHomePage() {
this.$router.go(-1);
}
},
mounted() {
this.setAppHeader({
show: this.headerShow,
showBack: this.showBack
});
this.setAppFooter({
show: this.footerShow
});
}
};
</script>
<style scoped>
.retrieveCheck {
text-align: left;
width: 90%;
margin: 0 auto;
}
.check-table {
text-align: center;
}
.highlight {
color: #fa6400;
font-weight: 600;
}
.highlight-2 {
color: #6368de;
font-weight: 600;
}
/* .move {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
} */
.coin-box {
height: 8.9vh;
line-height: 8.9vh;
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
border-radius: 6px;
}
</style>
\ No newline at end of file
<!--资产备份
为当前钱包资产创建一个到手机号的备份关联
-->
<template>
<div>
<PhoneConfy
@submitNext="saveParams"
@sendCode="sendCode"
:showDialog="showDialog"
btnName="下一步"
></PhoneConfy>
<TopBox :title="topTitle"></TopBox>
<div class="retrieve-content">
<!-- <div class="account">
账号:
<span>{{phoneNo}}</span>
</div>-->
<div class="new-address">
<div>
<span class="new-address-tap">钱包地址</span>
<span>输入手机号进行找回</span>
<span></span>
</div>
<div class="new-address-hash">{{shortAddr}}</div>
</div>
<!-- <div class="old-address">
<div>
<span class="new-address-tap old-address-tap">旧主地址</span>
<span>1分钟后生效</span>
<span>每日支付百分之10%</span>
</div>
<div class="new-address-hash">{{shortAddr}}</div>
<div class="diva-full"></div>
<div class="radio-box">
<label class="radio">
<input type="radio" name="r" value="1" checked />
<span>设为备份地址</span>
</label>
<label class="radio">
<input type="radio" name="r" value="2" />
<span>作废改地址</span>
</label>
</div>
</div>-->
<el-button class="large-btn move" @click.once="submitRetrieve">找回钱包资产</el-button>
</div>
</div>
</template>
<script>
import { mapActions } from "vuex";
import PhoneConfy from "../components/PhoneConfy";
import TopBox from "../components/TopBox.vue";
import { WalletStatusConst } from "../utils/walletstatus-const";
import { mainChainPrefix, paraChainPrefix, goAppPrefix } from "../api/config";
import CommonRequest from "../mixins/common-request.js";
export default {
mixins: [CommonRequest],
data() {
return {
//navigator
showHeader: true,
showBack: true,
color: "blackTheme",
//手机验证页面
showDialog: true,
//建立新找回地址的页面阶段
phoneNo: "",
verifyCode: "",
shortAddr: "",
//设置头部
topTitle: "找回钱包资产",
//设置脚步
footerShow: false,
active: 1,
PhoneReg: true
};
},
components: {
PhoneConfy,
TopBox
},
activited() {
// if (localStorage.curWalletStatus == WalletStatusConst.NoRecoveryInfo) {
// this.showDialog = true;
// }
},
created() {
this.detectWalletStatusContract();
this.isPhoneReg();
},
mounted() {
this.setAppFooter({
show: this.footerShow,
active: this.active
});
setTimeout(() => {
this.setAppHeader({
show: this.showHeader,
showBack: this.showBack,
color: this.color
});
}, 350);
this.shortAddr =
localStorage.mainAddress.substr(0, 17) +
"..." +
localStorage.mainAddress.substr(localStorage.mainAddress.length - 2);
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
saveParams(param) {
this.phoneNo = param.phoneNo;
this.verifyCode = param.verifyCode;
this.showDialog = false;
},
isPhoneReg() {
if (localStorage.phoneNo) {
this.isPhoneReg = true;
} else {
this.isPhoneReg = false;
}
},
/**
* 获取当前的钱包状态
*/
async detectWalletStatusContract() {
let queryRlt = await this.getWalletStatus(localStorage.mainAddress);
if (queryRlt.code == 200) {
this.curWalletStatus = queryRlt.data.status;
localStorage.curWalletStatus = queryRlt.data.status;
// if (localStorage.curWalletStatus == WalletStatusConst.NoRecoveryInfo) {
// this.showDialog = true;
// }
// else{
// this.showDialog = false;
// }
}
},
/**
* 执行找回
*/
async submitRetrieve() {
//提交 绑定到 手机
let rltObj = await fetch(goAppPrefix + "/api/wallet/retrieve/request", {
body: JSON.stringify({
newAddress: localStorage.mainAddress,
phoneNumb: this.phoneNo,
verifyCode: this.verifyCode
}),
method: "POST"
})
.then(response => response.json())
.then(rlt => {
return rlt;
});
if (rltObj.code == 200) {
setTimeout(() => {
this.verification = false;
//hash检测
this.$router.push("/property");
}, 1000);
} else {
console.log("----------------------找回失败------------------------");
}
},
/**
* 获取验证码
*/
sendCode(param) {
//提交 绑定到 手机
fetch(goAppPrefix + "/api/wallet/retrieve/verify", {
body: JSON.stringify({
phoneNumb: param.phoneNo
}),
method: "POST",
redirect: "follow"
})
.then(response => response.json())
.then(rlt => {
if (rlt.code == 200) {
console.log("rlt=>", rlt.data);
// this.curWalletStatus = rlt.data.status;
// localStorage.curWalletStatus = rlt.data.status;
} else {
alert("验证码发送失败:" + rlt.errMsg);
}
});
}
}
};
</script>
<style scoped>
.material-icons {
display: inline-flex !important;
}
.retrieve-content {
width: 90%;
margin: 0 auto;
font-size: 16px;
font-family: PingFangSC-Medium, PingFangSC;
font-weight: 500;
color: rgba(51, 54, 73, 1);
text-align: left;
}
.old-address {
height: 140px;
margin: 15px 0;
background-color: white;
border-radius: 15px;
padding: 15px 25px;
font-size: 3.45vw;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
.new-address {
background-image: url("/static/img/new-ad-bg.png");
background-position: center;
background-size: 180%;
height: 90px;
margin: 15px 0;
border-radius: 15px;
font-size: 3.45vw;
font-family: PingFangSC-Medium, PingFangSC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
padding: 15px 25px;
}
.new-address span {
margin: 0 1px;
}
.new-address-tap {
background-color: white;
padding: 4px 10px;
color: black;
font-weight: 300;
border-radius: 3px;
}
.old-address-tap {
background-color: #849ef8;
color: white;
}
.diva-full {
margin: 5px 0;
}
.new-address-hash {
font-size: 14px;
margin-top: 15px;
}
/* .move {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
} */
.radio-box {
display: flex;
}
.radio {
flex: 1 1 auto;
margin: 16px 0;
display: block;
cursor: pointer;
}
.radio input {
display: none;
}
.radio input + span {
line-height: 22px;
height: 22px;
padding-left: 22px;
display: block;
position: relative;
}
.radio input + span:not(:empty) {
padding-left: 30px;
}
.radio input + span:before,
.radio input + span:after {
content: "";
width: 22px;
height: 22px;
display: block;
border-radius: 50%;
left: 0;
top: 0;
position: absolute;
}
.radio input + span:before {
background: #d1d7e3;
transition: background 0.2s ease,
transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 2);
}
.radio input + span:after {
background: #fff;
transform: scale(0.78);
transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.4);
}
.radio input:checked + span:before {
transform: scale(1.04);
background: #e45824;
}
.radio input:checked + span:after {
transform: scale(0.4);
transition: transform 0.3s ease;
}
.radio:hover input + span:before {
transform: scale(0.92);
}
.radio:hover input + span:after {
transform: scale(0.74);
}
.radio:hover input:checked + span:after {
transform: scale(0.4);
}
</style>
\ No newline at end of file
<!--资产找回
找回手机号关联的钱包资产
-->
<template>
<div>
<Phoneconfy
:showDialog="verification"
@submitNext="submitRetrieve"
@sendCode="sendCode"
btnName="执行找回"
></Phoneconfy>
<div class="top">
<div class="top-title">找回钱包资产</div>
</div>
<div class="retrieve-content">
<div class="new-address">
<div>
<span class="new-address-tap">收集地址</span>
<span>1分钟后找回</span>
<span>手机号关联钱包资产</span>
</div>
<div class="new-address-hash">{{shortAddr}}</div>
</div>
<!-- <div class="old-address">
<div>
<span class="new-address-tap old-address-tap">随机主地址</span>
<span>1分钟后生效</span>
<span>每日支付百分之100%</span>
</div>
<div class="new-address-hash">{{shortAddr}}</div>
<div class="diva-full"></div>
<div class="radio-box">
<v-radio-group v-model="radios">
<v-radio label="找回到当前主地址" value="radio-1"></v-radio>
<v-radio label="找回到随机主地址" value="radio-2"></v-radio>
</v-radio-group>
</div>
</div>-->
<div class="btn-controller">
<el-button class="large-btn" @click="toRetriveWallet">输入手机号</el-button>
</div>
</div>
</div>
</template>
<script>
import Phoneconfy from "../components/PhoneConfy";
import { mapActions } from "vuex";
import { WalletStatusConst } from "../utils/walletstatus-const";
import Wallet from "../mixins/Wallet";
import { encrypt, decrypt } from "../utils/crypto.js";
import { mainChainPrefix, paraChainPrefix, goAppPrefix } from "../api/config";
export default {
data() {
return {
//手机验证页面
verification: false,
//建立新找回地址的页面阶段
step: 2,
headerShow: true,
footerShow: false,
phoneNo: "",
verifyCode: "",
shortAddr: "",
radios: "radio-1"
};
},
mixins: [Wallet],
components: {
Phoneconfy
},
activited() {},
mounted() {
/**
* 执行找回时自动生成一个钱包
*/
//this.createAccount();
this.shortAddr =
localStorage.mainAddress.substr(0, 17) +
"..." +
localStorage.mainAddress.substr(localStorage.mainAddress.length - 2);
this.setAppHeader({
show: this.headerShow
});
this.setAppFooter({
show: this.footerShow
});
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
toRetriveWallet() {
this.verification = true;
},
/**
* 执行找回
*/
submitRetrieve(param) {
this.phoneNo = param.phoneNo;
this.verifyCode = param.verifyCode;
//提交 绑定到 手机
fetch(goAppPrefix + "/api/wallet/retrieve/request", {
body: JSON.stringify({
newAddress: localStorage.address_retrieve,
phoneNumb: this.phoneNo,
verifyCode: this.verifyCode
}),
method: "POST"
})
.then(response => response.json())
.then(rlt => {
if (rlt.code == 200) {
this.$router.push("/property");
}
});
this.verification = false;
},
/**
* 获取验证码
*/
sendCode(param) {
//提交 绑定到 手机
fetch(goAppPrefix + "/api/wallet/retrieve/verify", {
body: JSON.stringify({
phoneNumb: param.phoneNo
}),
method: "POST",
redirect: "follow"
})
.then(response => response.json())
.then(rlt => {
if (rlt.code == 200) {
console.log("rlt=>", rlt.data);
} else {
alert("验证码发送失败:" + rlt.errMsg);
}
});
}
// /**
// * 生成助记词=>生成钱包=>生成地址 并 加密存储在local
// */
// createAccount() {
// const mnemonic = this.newMnemonic(1);
// console.log("助记词:", mnemonic);
// const cryptmnemonic = encrypt(mnemonic, "Aa123456");
// console.log("助记词 加密:", cryptmnemonic);
// console.log("助记词 解密:", decrypt(cryptmnemonic, "Aa123456"));
// //存进local
// const wallet = this.createHDWallet(mnemonic);
// console.log(wallet);
// const account = this.newAccount("account1", wallet);
// console.log(account);
// console.log("3232", this.account.privateKey, this.account.publicKey);
// // console.log("privateKey => ", Buffer.from(this.account.privateKey).toString('base64'))
// // console.log("publicKey => ", Buffer.from(this.account.publicKey).toString('base64'))
// // localStorage.privateKey_retrieve = this.account.hexPrivateKey;
// // localStorage.pubKey_retrieve = Buffer.from(this.account.publicKey).toString("hex");
// }
}
};
</script>
<style scoped>
.retrieve-content {
width: 90%;
margin: 0 auto;
font-size: 16px;
font-family: PingFangSC-Medium, PingFangSC;
font-weight: 500;
color: rgba(51, 54, 73, 1);
text-align: left;
}
.old-address {
height: 140px;
margin: 15px 0;
background-color: white;
border-radius: 15px;
padding: 15px 25px;
font-size: 3.45vw;
box-shadow: 0px 5px 20px 0px rgba(238, 238, 238, 1);
}
.new-address {
background-image: url("/static/img/new-ad-bg.png");
background-position: center;
background-size: 180%;
height: 90px;
margin: 15px 0;
border-radius: 15px;
font-size: 3.45vw;
font-family: PingFangSC-Medium, PingFangSC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
padding: 15px 25px;
}
.new-address span {
margin: 0 1px;
}
.new-address-tap {
background-color: white;
padding: 4px 10px;
color: black;
font-weight: 300;
border-radius: 3px;
}
.old-address-tap {
background-color: #849ef8;
color: white;
}
.diva-full {
margin: 5px 0;
}
.new-address-hash {
font-size: 14px;
margin-top: 15px;
}
.btn-controller {
position: fixed;
bottom: 0%;
margin-left: 10%;
}
</style>
\ No newline at end of file
<template>
<div class="recipt-view">
<div class="recipt-card">
<div class="recipt-card-content">
<span class="sub-content-1">打开去中心化网页版</span>
<!-- <img src="/static/img/styleImg/eyeclose.png" alt /> -->
<qriously value="https://zhaohui.app" class="QRcode" />
<div class>网页版地址</div>
<div class="Address input-tip">https://zhaohui.app</div>
</div>
</div>
</div>
</template>
<script>
import { mapActions } from "vuex";
export default {
data() {
return {
//头部设置
headerShow: true,
color: "/static/icon/back_white.png",
route: "",
icon: "",
showBack: true,
//脚部设置
footerShow: false
};
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"])
},
mounted() {
setTimeout(() => {
this.setAppHeader({
show: this.headerShow,
color: this.color,
showBack: this.showBack,
pStyle: "absolute"
});
this.setAppFooter({
show: this.footerShow
});
}, 150);
}
};
</script>
<style>
.QRcode canvas {
width: 100%;
height: 100%;
}
.recipt-card-content {
margin-top: 105px;
}
</style>
<style lang="stylus" scoped>
@require '~@/assets/stylus/variable';
.QRcode {
width: 50vw;
height: 50vw;
margin: 8% auto;
}
.recipt-view {
height: 100vh;
width: 100vw;
background-color: $app-banner-background-color;
}
.recipt-card {
position: fixed;
bottom: 0;
height: 80%;
width: 100%;
border-radius: 10px 10px 0% 0%;
background-color: white;
}
.recipt-card-top {
text-align: left;
display: flex;
justify-content: left;
align-items: center;
align-content: center;
padding: 25px;
}
.el-dialog {
position: absolute !important;
bottom: 0;
width: 100% !important;
}
.downArrow {
width: 3.7vw;
height: auto;
margin: 0 5px;
}
.Address {
width: 80%;
margin: 15px auto;
}
.copy-icon {
width: 17px;
height: 20px;
margin: 0 5px;
line-height: 20px;
}
.eye-box {
display: flex;
align-items: center;
justify-items: center;
justify-content: center;
}
.eyeshow, .eyeclose {
padding: 5px;
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<TopBox
title="联系人详情"
:btn_color="topboxC"
:btn_show="false"
:btnName="topboxN"
@handleClickTopbox="editContact"
></TopBox>
<!-- <van-dialog
v-model="centerDialogVisible"
title="删除联系人"
show-cancel-button
>
<div class='dialog-text'>是否确认删除该联系人?</div>
</van-dialog>-->
<div class="addContact">
<div class="btn-controller">
<label class="label title-1">联系人标签</label>
<van-field
:placeholder="contactData.remark"
class="editable-input"
v-model="contactData.remark"
:disabled="edit"
></van-field>
</div>
<div class="btn-controller">
<div class="flex-sm-parent">
<label class="label title-1 flex-sm-child">地址</label>
<a
class="flex-sm-child text-right camera-container"
:disabled="edit"
:class="this.edit?'':'active'"
>
<img src="/static/icon/camera.png" class="small-icon" @click="toCamera" />
</a>
</div>
<van-field
:placeholder="contactData.address"
class="editable-input"
clearable
v-model="contactData.address"
:disabled="edit"
></van-field>
</div>
<div class="row buttom-box move">
<el-button
class="col-sm-8 send-btn"
:disabled="!edit"
@click="toTransfer"
>发起{{this.coinType?this.coinType:''}}转账</el-button>
<el-button
class="col-sm-3 delete-btn"
icon="el-icon-delete"
:disabled="!edit"
@click="showDialog"
></el-button>
</div>
<van-action-sheet v-model="showCointype">
<van-picker
show-toolbar
title="选取币种"
:columns="Object.keys(this.market)"
:default-index="0"
@cancel="onPickerCancel"
@confirm="onPickerConfirm"
/>
</van-action-sheet>
</div>
</div>
</template>
<script>
// import {rmContract} from '../../api/chain33API/request.js"'
import {
mainChainPrefix,
paraChainPrefix,
goAppPrefix,
marketBTYInterface,
chainNamePrefix,
uwalletChainAddr
} from "../../api/config";
import { rmContract, getContacts } from "../../api/chain33API/request.js";
import TopBox from "../../components/TopBox.vue";
import { mapActions, mapState } from "vuex";
export default {
data() {
return {
currentAddr: this.$router.history.current.params.id,
contactData: {},
edit: true,
topboxC: "c1",
topboxN: "编辑",
cameraActive: "active",
centerDialogVisible: false,
coinType: this.$router.history.current.query.coinType,
showCointype: false,
show: true
};
},
components: {
TopBox
},
mounted() {
console.log(this.contacts);
let result = this.getSingleContract(this.currentAddr);
this.initPage();
this.setAppHeader({
show: true,
showBack: true,
color: "/static/icon/back_black.png"
});
this.setAppFooter({
show: false
});
this.$router.history.current.query.decodeStatus = false;
// this.contactData.addr = this.contacts.addr;
},
methods: {
...mapActions("appShell/appHeader", ["setAppHeader"]),
...mapActions("appShell/appFooter", ["setAppFooter"]),
...mapActions("appShell/contacts", ["setAppContacts", "removeAppContact"]),
toCamera() {
if (this.edit === false) {
this.$router.push({
path: "/camera",
query: { fromPath: this.$route.fullPath }
});
} else {
console.log("不能编辑");
}
},
initPage() {
let codeScaled = this.$router.history.current.query.decodeStatus;
let codeFromCamera = this.$router.history.current.query.decodeStr;
if (codeScaled === true) {
this.edit = false;
this.topboxC = "c2";
this.topboxN = "保存";
this.contactData.address = codeFromCamera;
} else {
}
},
showDialog() {
this.$dialog.confirm({
title: "删除联系人",
message: "是否确认删除该联系人",
beforeClose: (action, done) => {
if (action === "confirm") {
rmContract({
addr: this.contactData.address,
callback: rlt => {
if (rlt.success) {
// this.removeAppContact(this.contactData.address);
let intervalContact = setInterval(() => {
//给区块链 删除联系人后刷新集合,予以一些时间
getContacts()
.then(response => response.json())
.then(rlt => {
if (rlt.result && rlt.result.contacts) {
if (
rlt.result.contacts.length < this.contacts.length
) {
this.setAppContacts(rlt.result.contacts);
done();
this.$dialog.close();
window.clearInterval(intervalContact);
this.$router.push("/contacts");
} else {
return;
}
} else {
done();
alert("网络出错");
}
});
}, 800);
} else {
done();
console.log(rlt);
}
}
});
} else {
done();
console.log("删除失败");
}
}
});
},
editContact() {
// if (this.edit) {
// this.edit = false;
// this.topboxC = "c2";
// this.topboxN = "保存";
// } else {
// this.edit = true;
// this.topboxC = "c1";
// this.topboxN = "编辑";
// let newContact = {
// addr: this.contactData.address,
// remark: this.contactData.remark
// };
// let findex = this.contacts.findIndex(item => {
// return item.address === newContact.address;
// });
// this.contacts.splice(findex, 1, newContact);
// localStorage.setItem("contacts", JSON.stringify(this.contacts));
// }
},
toTransfer() {
// this.$router.history.current.query.coinType
if (this.coinType === undefined) {
this.showCointype = true;
} else {
this.$router.push({
path: "/transfer",
query: {
sendToAddr: this.contactData.address,
coinType: this.coinType
}
});
}
},
getSingleContract(payload) {
let fubd = this.contacts.filter(item => {
return item.address == payload;
});
this.contactData = fubd[0];
},
onPickerCancel() {
this.showCointype = false;
},
onPickerConfirm(value) {
this.coinType = value;
this.showCointype = false;
}
},
computed: {
...mapState("appShell/contacts", ["contacts"]),
...mapState("appShell/appItem", ["market"])
}
};
</script>
<style scoped>
.addContact {
padding-top: 48px;
height: 80vh;
}
.move {
position: fixed;
bottom: 20px;
left: 50%;
transform: translate(-50%, -50%);
}
.buttom-box {
width: 85%;
margin: 0 auto;
padding-left: 3.5%;
}
.btn-controller {
text-align: left;
}
.editable-input {
margin-top: 10px;
margin-bottom: 15px;
}
.label {
padding-left: 3.75vw;
}
.el-input.is-disabled .el-input__inner {
color: #000 !important;
}
.camera-container {
opacity: 0.5;
}
.active {
opacity: 1;
}
.send-btn,
.delete-btn {
height: 15vw;
font-size: 4.5vw !important;
}
.cancel-btn,
.send-btn {
background-color: #849ef8;
}
.confirm-btn,
.delete-btn {
background-color: #f99454;
}
.van-cell {
background: #fafafa;
border-bottom: 1px solid rgba(238, 238, 238, 238.0.1);
padding: 10px 0;
}
.dialog-text {
padding: 35px 0;
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/**
* @file appShell/appFooter module
*/
export const SET_APP_FOOTER = "SET_APP_FOOTER";
export const state = () => {
return {
indexPage: {
title: "首页",
src: "",
link: "/property",
alt: "首页"
},
retrievePage: {
title: "重置",
src: "",
link: "/retrieve",
alt: ""
},
myPage: {
title: "我的",
src: "",
link: "/my",
alt: ""
},
active: 1,
show: false
};
};
export const mutations = {
[SET_APP_FOOTER](state, appFooter) {
state = Object.assign(state, appFooter);
},
setactive(state,payload){
state.active = payload }
};
export const actions = {
setAppFooter({ commit }, appFooter) {
commit(SET_APP_FOOTER, appFooter);
}
};
/**
* @file appShell/appFooter module
*/
export const SET_APP_BTY_MAKETVALUE = "SET_APP_BTY_MAKETVALUE";
export const SET_APP_CCNY_MAKETVALUE = "SET_APP_CCNY_MAKETVALUE";
......
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