the structure of the page is as follows: was it button failure before or did I replace it with span or failure? I tried to use span. Native didn"t work. I really asked for advice, but I was powerless.
<template>
<div class="index">
<div class="top">
<mt-swipe :auto="2000" v-if="ImgList!=""">
<mt-swipe-item v-for="(v,k) in ImgList" :key="k">
<img :src="v.adPicture">
<!-- <img v-if="v.adUrl==""" :src="v.adPicture">
<a v-if="v.adUrl!=""" :href="v.adUrl"><img :src="v.adPicture"></a> -->
</mt-swipe-item>
</mt-swipe>
</div>
<div class="button">
<span @click="turn_to("/order","order")"></span>
<span @click="skip_to("/myCode","myCode")"></span>
<span @click="skip_to("/yzPost","yzPost")"></span>
<span @click="skip_to("index","index")"></span>
<span @click="turn_to("/cityPost","cityPost")"></span>
<span @click="skip_to("/my","my")"></span>
</div>
</div>
</template>
<script>
import $ from "jquery";
import wx from "weixin-js-sdk";
import base from "../assets/js/base";
var Cookies = require("js-Cookie");
let hex_md5 = require("crypto-js/md5");
export default {
name: "index",
data() {
return {
ImgList: []
};
},
methods: {
getData() {
let _this = this;
base.axios_post("", "***************", function(res) {
if (res.code == 0) {
_this.ImgList = res.data;
}else if(data.code==100){
Cookies.remove("p_openId");
_this.$router.push({path: "/index"});
} else {
_this.$toast(res.message);
}
});
},
turn_to() {},
skip_to(path, name) {
let ptoken = Cookies.get("ptoken");
let pstate = Cookies.get("pstate");
if (ptoken!=undefined) {
if (name == "index") {
this.sys();
} else {
this.$router.push({ path: path });
}
} else {
if (pstate == 0) {
this.$router.push({ path: "/proof", query: { type: name } });
} else if (!pstate) {
this.$router.push({ path: "/register", query: { type: name } });
}
}
},