|
@@ -4,9 +4,13 @@
|
|
ref="votePage"
|
|
ref="votePage"
|
|
@scroll="scroll"
|
|
@scroll="scroll"
|
|
>
|
|
>
|
|
- <img :src="'https://djweb.smcic.net/static/img/vote.jpg?t='+t" alt="" srcset="" />
|
|
|
|
|
|
+ <img
|
|
|
|
+ :src="'https://djweb.smcic.net/static/img/vote.jpg?t=' + t"
|
|
|
|
+ alt=""
|
|
|
|
+ srcset=""
|
|
|
|
+ />
|
|
<div ref="vote" class="vote">
|
|
<div ref="vote" class="vote">
|
|
- <van-checkbox-group v-model="checkboxGroup">
|
|
|
|
|
|
+ <van-checkbox-group v-model="checkboxGroup" :max="config.VOTE_MAX">
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell
|
|
<van-cell
|
|
:label="voteLabel(item)"
|
|
:label="voteLabel(item)"
|
|
@@ -79,6 +83,8 @@ import "vant/lib/progress/style";
|
|
import "vant/lib/checkbox-group/style";
|
|
import "vant/lib/checkbox-group/style";
|
|
|
|
|
|
import { voteList, saveVote, isVote } from "@/api/vote/vote.js";
|
|
import { voteList, saveVote, isVote } from "@/api/vote/vote.js";
|
|
|
|
+import { sysConfig } from "@/api/user/user.js";
|
|
|
|
+
|
|
import { isIphone, isAndroid } from "@/utils/isTerminal.js";
|
|
import { isIphone, isAndroid } from "@/utils/isTerminal.js";
|
|
import { setToken } from "@/utils/common.js";
|
|
import { setToken } from "@/utils/common.js";
|
|
|
|
|
|
@@ -96,8 +102,9 @@ export default {
|
|
show: false,
|
|
show: false,
|
|
doc: "",
|
|
doc: "",
|
|
appName: "",
|
|
appName: "",
|
|
|
|
+ config: {},
|
|
disable: false,
|
|
disable: false,
|
|
- t: new Date().getTime()
|
|
|
|
|
|
+ t: Date.now()
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -219,12 +226,12 @@ export default {
|
|
if (this.$user) setToken(this.$user.accessToken);
|
|
if (this.$user) setToken(this.$user.accessToken);
|
|
else setToken("");
|
|
else setToken("");
|
|
this.$user.accessToken &&
|
|
this.$user.accessToken &&
|
|
- isVote().then(res => {
|
|
|
|
- this.disable = (res || []).length !== 0;
|
|
|
|
- this.checkboxGroup = (res || []).map(v => v.infoId);
|
|
|
|
- console.log(res);
|
|
|
|
- this.addList();
|
|
|
|
- });
|
|
|
|
|
|
+ isVote().then(res => {
|
|
|
|
+ this.disable = (res || []).length !== 0;
|
|
|
|
+ this.checkboxGroup = (res || []).map(v => v.infoId);
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.addList();
|
|
|
|
+ });
|
|
if (!this.$user.accessToken) {
|
|
if (!this.$user.accessToken) {
|
|
this.addList();
|
|
this.addList();
|
|
}
|
|
}
|
|
@@ -233,9 +240,12 @@ export default {
|
|
let height = document.body.offsetHeight || 0;
|
|
let height = document.body.offsetHeight || 0;
|
|
let width = document.body.offsetWidth || 0;
|
|
let width = document.body.offsetWidth || 0;
|
|
this.$refs.vote.style.minHeight = height - (856 / 1500) * width + "px";
|
|
this.$refs.vote.style.minHeight = height - (856 / 1500) * width + "px";
|
|
|
|
+
|
|
|
|
+ sysConfig().then(r => {
|
|
|
|
+ this.config = r || {};
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- beforeDestroy: function() {
|
|
|
|
- },
|
|
|
|
|
|
+ beforeDestroy: function() {},
|
|
components: {
|
|
components: {
|
|
vanPopup,
|
|
vanPopup,
|
|
vanIcon,
|
|
vanIcon,
|
|
@@ -279,9 +289,9 @@ $themeColor: #e6837c;
|
|
padding: 1em 0;
|
|
padding: 1em 0;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
background-image: linear-gradient(
|
|
background-image: linear-gradient(
|
|
- 0deg,
|
|
|
|
- rgba(170, 170, 170, 0.8) 5%,
|
|
|
|
- rgba(0, 0, 0, 0)
|
|
|
|
|
|
+ 0deg,
|
|
|
|
+ rgba(170, 170, 170, 0.8) 5%,
|
|
|
|
+ rgba(0, 0, 0, 0)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|