diff --git a/pages/base/index.vue b/pages/base/index.vue
index f591c2a..4f1d054 100644
--- a/pages/base/index.vue
+++ b/pages/base/index.vue
@@ -88,12 +88,12 @@ export default {
icon: "static/img/index/base_caidan_0.png",
activeIcon: "static/img/index/base_caidan_1.png",
},
- // {
- // label: this.$t("exchange.g7"),
- // tel: "stockexchange-operation",
- // icon: "static/img/base_qukuai_0.png",
- // activeIcon: "static/img/base_qukuai_1.png",
- // },
+ {
+ label: this.$t("exchange.g7"),
+ tel: "stockexchange-operation",
+ icon: "static/img/index/stock0.svg",
+ activeIcon: "static/img/index/stock1.svg",
+ },
// {
// // label: this.$t("base.a4"),
// // tel: "option-list",
diff --git a/pages/base/stockexchange-operation.vue b/pages/base/stockexchange-operation.vue
index 3562bc7..993bea9 100644
--- a/pages/base/stockexchange-operation.vue
+++ b/pages/base/stockexchange-operation.vue
@@ -123,13 +123,13 @@ export default {
isShow(n) {
if (n) {
setTimeout(() => {
- this.ws.send({
+ this.ws2.send({
cmd: "sub",
msg: this.msg,
});
}, 200);
} else {
- this.ws.send({
+ this.ws2.send({
cmd: "unsub",
msg: this.msg,
});
@@ -138,7 +138,7 @@ export default {
},
computed: {
...mapState({
- ws: "ws",
+ ws2: "ws2",
}),
isLogin() {
return Boolean(uni.getStorageSync("token"));
@@ -194,11 +194,11 @@ export default {
// 链接socket
linkSocket() {
let msg = this.msg;
- this.ws.send({
+ this.ws2.send({
cmd: "sub",
msg,
});
- this.ws.on("message", (res) => {
+ this.ws2.on("message", (res) => {
let { data, sub } = res;
if (sub == msg) {
this.marketList = data;
@@ -231,7 +231,7 @@ export default {
this.getCollect();
},
destroyed() {
- this.ws.send({
+ this.ws2.send({
cmd: "unsub",
msg: 'exchangeMarketList',
})
diff --git a/static/btclov.ico b/static/btclov.ico
index 72007be..ede59e0 100644
Binary files a/static/btclov.ico and b/static/btclov.ico differ
diff --git a/static/img/index/stock0.svg b/static/img/index/stock0.svg
new file mode 100644
index 0000000..8fdb5f1
--- /dev/null
+++ b/static/img/index/stock0.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/static/img/index/stock1.svg b/static/img/index/stock1.svg
new file mode 100644
index 0000000..5d8ea3e
--- /dev/null
+++ b/static/img/index/stock1.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/store/index.js b/store/index.js
index bd91baf..24bc9de 100644
--- a/store/index.js
+++ b/store/index.js
@@ -18,6 +18,12 @@ socket1.on('message', (evt) => {
socket1.send({cmd: 'pong'})
}
})
+let socket2 = new Socket(app.socketUrl2)
+socket2.on('message', (evt) => {
+ if (evt.cmd == 'ping') {
+ socket1.send({cmd: 'pong'})
+ }
+})
Vue.use(Vuex)
if (uni.getStorageSync('language') == 'cn') {
@@ -62,6 +68,7 @@ let store = new Vuex.Store({
})(),
ws: socket,
ws1: socket1,
+ ws2: socket2,
wsState: false,
hideMoney: uni.getStorageSync('hideMoney') == 'true',
// logo