Skip to content

Commit

Permalink
add raw qr
Browse files Browse the repository at this point in the history
  • Loading branch information
DARREN-ZHANG committed Sep 23, 2019
1 parent 3ccd7ee commit 2ff0239
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^2.6.5",
"vue": "^2.6.10",
"vuetify": "^2.0.0",
"lodash": "^4.17.14",
"axios": "^0.19.0",

"bigi": "^1.4.2",
"bs58": "^4.0.1",
"bytebuffer": "^5.0.1",
"core-js": "^2.6.5",
"create-hash": "^1.1.3",
"create-hmac": "^1.1.6",
"crypto-js": "^3.1.9-1",
"deep-equal": "^1.0.1",
"ecurve": "^1.0.5"
"ecurve": "^1.0.5",
"lodash": "^4.17.14",
"qrcode.vue": "^1.6.3",
"vue": "^2.6.10",
"vuetify": "^2.0.0"
},
"devDependencies": {
"@mdi/font": "^4.1.95",
Expand Down
46 changes: 44 additions & 2 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
详尽指标展示<br />
轻松掌握平仓时机
</div>
<div v-if="this.isMobile() === false">
<qrcode-vue :value="qrValue" :size="qrSize" level="H" class="qr"></qrcode-vue>
<p><b>扫描二维码下载APP</b></p>
</div>
<div>
</div>
</v-col>

<v-col
Expand All @@ -173,6 +179,10 @@
>

<img src="/chart.svg" />
<div v-if="this.isMobile() === true">
<qrcode-vue :value="qrValue" :size="qrSize" level="H" class="qr-mobile"></qrcode-vue>
<p><b>识别二维码下载APP</b></p>
</div>
</v-col>


Expand Down Expand Up @@ -238,16 +248,29 @@
background: linear-gradient(0deg, #c62c43 0%, #f55e5d 100%);
}
.qr{
margin-top: 10px;
margin-bottom: 10px;
}
.qr-mobile{
margin-top: 30px;
margin-bottom: 10px;
}
</style>

<script>
import { debounce } from "lodash";
import axios from "axios";
import PrivateKey from "../ecc/src/PrivateKey";
import QrcodeVue from "qrcode.vue";
const config = {
faucet: 'http://uatfaucet.51nebula.com', //'https://faucet.cybex.io'
chain: 'http://18.136.140.223:38090'
chain: 'http://18.136.140.223:38090',
tutorial: 'https://bbb2019.zendesk.com/hc/zh-cn/articles/360033801811-BBB-%E6%95%99%E7%A8%8B',
downloadLink: '',
}
let _keyCachePriv = {};
Expand Down Expand Up @@ -309,7 +332,9 @@
password: "",
repeatpwd: "",
captcha: "",
referer:"",
referer: "",
qrValue: "hello, world",
qrSize: 100,
// nameRules: [
// value => !!value || validation.account_required,
Expand All @@ -332,6 +357,19 @@
inRegister: false,
}),
methods: {
isiOS(){
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad)/i)
return flag;
},
isAndroid(){
const flag = navigator.userAgent.match(/(Android|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS)/i)
return flag;
},
isMobile() {
const flag= !(this.isiOS() === null && this.isAndroid() === null);
console.log("TCL: isMobile -> flag", flag)
return flag;
},
activate(){
zE.activate();
},
Expand Down Expand Up @@ -453,6 +491,7 @@
"referrer": this.referrer
}
});
console.log("TCL: createAccount -> result", result)
} catch (e) {
if (e.response.data) {
throw new Error(e.response.data)
Expand All @@ -465,6 +504,9 @@
}
}
},
components:{
QrcodeVue,
},
computed: {
nameRules(){
return [
Expand Down

0 comments on commit 2ff0239

Please sign in to comment.