首页广告优化

master
Lee-1203 2022-06-10 13:16:25 +08:00
parent e5522ec5de
commit 657fb67294
10 changed files with 55 additions and 11 deletions

8
public/js/count.js Normal file
View File

@ -0,0 +1,8 @@
// 百度统计代码
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?579b3df8d003f1325facea62cddd6c89";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();

View File

@ -1138,6 +1138,9 @@ textarea {
text-align: justify;
margin-top: .2rem;
}
.expert-body p{
line-height: 1.7;
}
.detail-section h3{
font-size: .32rem;
line-height: 1.5;

View File

@ -49,4 +49,4 @@ Vue.use(VueAxios, axios)
new Vue({
router,
render: h => h(App)
}).$mount('#app')
}).$mount('#app')

View File

@ -46,7 +46,8 @@
</template>
<script>
import tabbar from '../../../components/tabbar.vue'
import tabbar from '../../../components/tabbar.vue';
import "../../../../public/js/count.js";
export default {
name: "evaluation",
components: {

View File

@ -30,7 +30,7 @@
<div class="expert-body">
<h2>个人简介</h2>
<span>
<p>{{expertDetail.summary}}</p>
<p v-html="expertDetail.summary"></p>
</span>
</div>
<div class="expert-region">
@ -126,7 +126,7 @@
avatar: list.avatar,
tags_text: list.tags_text,
slogan: list.slogan,
summary: list.summary,
summary: list.summary.replace(/\n/g,"<br>").replace(/\s/g,"&nbsp;"),
service_area_text: list.service_area_text,
im_group_link: list.im_group_link,
im_group_qr: list.im_group_qr,

View File

@ -95,7 +95,8 @@
</template>
<script>
import tabbar from '../../../components/tabbar.vue'
import tabbar from '../../../components/tabbar.vue';
import "../../../../public/js/count.js";
export default {
name: "expert",
components: {

View File

@ -37,8 +37,8 @@
</li>
</ul>
</div>
<div class="index-ypzy" @click="toNewPage()">
<img src="../../assets/images/home/index/ypzy-h5.png" alt="有谱志愿">
<div class="index-ypzy" v-if="adSrc" @click="toNewPage()">
<img :src="host + adSrc">
</div>
<!-- 计划 -->
<div class="index-plan">
@ -130,6 +130,7 @@
<script>
import tabbar from "../../components/tabbar.vue";
import "../../../public/js/count.js";
export default {
name: "index",
components: {
@ -138,7 +139,8 @@
data() {
return {
consult_amount: 0, //
bannerSrc: "",
bannerSrc: "", //banner
adSrc: "", //广
expertData: [], //
video: null,
isPaused: true,
@ -172,6 +174,7 @@
},
mounted() {
this.getBanner();
this.getHot();
this.getExpertData();
},
computed: {},
@ -211,10 +214,23 @@
position: "h5_home_banner",
})
.then(function(res) {
console.log(res,'首页banner')
that.bannerSrc = res.data.data[0].src;
});
},
// 广
getHot() {
let that = this;
this.axios
.post(this.HOME + "/api/dictionary/get-slide-list", {
position: "h5_home_ad",
})
.then(function(res) {
console.log(res,'首页广告')
that.adSrc = res.data.data[0].src;
});
},
//
getExpertData() {
@ -252,12 +268,12 @@
this.$router.push(path);
},
toNewPage(){
let url = 'http://zym.emingren.com';
let url = 'https://zym.emingren.com';
if(this.ddEntrance == 'yes'){
// postMessage
dd.postMessage({name:'newsPage',url:url});
}else{
window.open('http://zym.emingren.com');
window.open('https://zym.emingren.com');
}
}
},

View File

@ -87,6 +87,7 @@
</template>
<script>
import "../../public/js/count.js";
export default {
name: "login",
data() {

View File

@ -28,6 +28,7 @@
</div>
<span v-show="!show">{{count}}</span>
<div v-show="show" @click="getCode()" class="getCode"></div>
<div v-show="!show" @click="checkCode()" class="getCode"></div>
</div>
</div>
<!-- 提示框 -->
@ -63,7 +64,7 @@
userType: 0,
isToast:false,
toastText:'',
source:''
source:'',
};
},
beforeCreate() {},
@ -151,6 +152,18 @@
}
this.handleSubmit();
},
checkCode(){
console.log(this.value,'输入的验证码')
if (this.value.length == this.number) {
this.hideKeyboard();
}else{
this.toastText = '验证码位数不正确!';
this.isToast = true;
setTimeout(()=> {
this.isToast = false
}, 1000)
}
},
// 60s
getCode() {
const TIME_COUNT = 60;

View File

@ -67,6 +67,7 @@
<script>
import tabbar from "../../../components/tabbar.vue";
import "../../../../public/js/count.js";
export default {
name: "ucenter",
components: {