Browse Source

修改ico、显示股票页面

master
liaoxinyu 1 week ago
parent
commit
e8802cd7db
  1. 12
      pages/base/index.vue
  2. 12
      pages/base/stockexchange-operation.vue
  3. BIN
      static/btclov.ico
  4. 1
      static/img/index/stock0.svg
  5. 1
      static/img/index/stock1.svg
  6. 7
      store/index.js

12
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",

12
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',
})

BIN
static/btclov.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

1
static/img/index/stock0.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 238 238"><defs><style>.cls-1{fill:none;stroke:#858585;stroke-linecap:round;stroke-linejoin:round;stroke-width:18px;}</style></defs><title>资源 215</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><ellipse class="cls-1" cx="190.07" cy="45.7" rx="38.93" ry="36.7"/><ellipse class="cls-1" cx="199.46" cy="205.58" rx="24.84" ry="23.42"/><path class="cls-1" d="M69.29,183.2c0,15.7-13.49,28.42-30.14,28.42S9,198.9,9,183.2s13.5-28.41,30.15-28.41a30.29,30.29,0,0,1,27.44,16.64A26.87,26.87,0,0,1,69.29,183.2Z"/><line class="cls-1" x1="60.32" y1="162.37" x2="159.85" y2="71.56"/><line class="cls-1" x1="174.38" y1="211.78" x2="64.32" y2="199.79"/><line class="cls-1" x1="204.53" y1="82.46" x2="200.9" y2="179.45"/></g></g></svg>

After

Width:  |  Height:  |  Size: 809 B

1
static/img/index/stock1.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 220"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#343434;}</style></defs><title>资源 214</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M177.57,51.07C170.75,48.91,24.75,176,24.75,176l165.71,20.56L184.69,52.42Z"/><ellipse class="cls-2" cx="181.07" cy="36.7" rx="38.93" ry="36.7"/><ellipse class="cls-2" cx="190.46" cy="196.58" rx="24.84" ry="23.42"/><path class="cls-2" d="M60.29,174.2c0,15.7-13.49,28.42-30.14,28.42S0,189.9,0,174.2s13.5-28.41,30.15-28.41a30.29,30.29,0,0,1,27.44,16.64A26.87,26.87,0,0,1,60.29,174.2Z"/><polygon class="cls-2" points="172.62 61.17 50.67 167.58 38.31 153.6 159.03 48.35 172.62 61.17"/><polygon class="cls-2" points="52.73 175.74 190.34 188.17 174.68 204.87 47.38 191.27 52.73 175.74"/><polygon class="cls-2" points="196.52 56.9 198.58 182.34 176.74 182.34 177.57 51.07 196.52 56.9"/></g></g></svg>

After

Width:  |  Height:  |  Size: 946 B

7
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

Loading…
Cancel
Save