二维码识别完成
parent
402803ae06
commit
9039cff63b
|
@ -45,6 +45,9 @@ import texta from '../views/home/plan/texta.vue'
|
|||
import textb from '../views/home/plan/textb.vue'
|
||||
import textc from '../views/home/plan/textc.vue'
|
||||
|
||||
// 测试路径
|
||||
import demo from '../views/demo/index.vue'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
|
@ -53,6 +56,11 @@ const routes = [
|
|||
name: 'start',
|
||||
component: start
|
||||
},
|
||||
{
|
||||
path: '/demo',
|
||||
name: 'demo',
|
||||
component: demo
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div class="content main-content">
|
||||
<div @click="goToAsk()">点击跳转</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as dd from 'dingtalk-jsapi';
|
||||
export default {
|
||||
name: "demo",
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToAsk(){
|
||||
dd.biz.util.openLink({
|
||||
url: 'dingtalk://dingtalkclient/page/link?pc_slide=true&url=https%3A%2F%2Fh5.dingtalk.com%2Fservice-group%2Findex.html%3FjoinGroupCode%3Dp3cAnJVnxMMiPvkT1zJLiiup35T4nkdE3uNFJIiiUkGhZSCsiSL0qydvCuolCftWNT7C%23%2Fjoin-group',
|
||||
onSuccess : function(res) {
|
||||
// 调用成功时回调
|
||||
console.log(res)
|
||||
},
|
||||
onFail : function(err) {
|
||||
// 调用失败时回调
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -120,7 +120,7 @@
|
|||
// 下载二维码事件
|
||||
downImg() {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'https://ypzy.emingren.com' + this.expertDetail.im_group_qr});
|
||||
dd.postMessage({name:'downImg',url:'https://ypzy.emingren.com' + this.expertDetail.im_group_qr});
|
||||
},
|
||||
|
||||
// 滚动改变样式
|
||||
|
|
|
@ -54,7 +54,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="{'ask-btn':true,'noservice':consult_amount==0}" @click="toAsk(expertDetail.id)">立即咨询</div>
|
||||
<div :class="{'ask-btn':true,'noservice':consult_amount==0}" @click="downImg(host + expertDetail.im_group_qr)" v-if="ddEntrance == 'yes'">向TA提问</div>
|
||||
<div :class="{'ask-btn':true,'noservice':consult_amount==0}" v-else>
|
||||
向TA提问
|
||||
<span><img :src="host + expertDetail.im_group_qr" v-image-preview></span>
|
||||
</div>
|
||||
<!-- 领取咨询卡弹出框 -->
|
||||
<div class="my-confirm-bg" v-show="isConfirm" @click="isConfirm=!isConfirm"></div>
|
||||
<div class="my-confirm" v-show="isConfirm">
|
||||
|
@ -77,12 +81,16 @@
|
|||
expertCase: [],
|
||||
id: '',
|
||||
consult_amount: 0, //是否领取咨询机会
|
||||
ddEntrance:'', //钉钉进入
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.id = this.$route.query.id;
|
||||
if(JSON.parse(localStorage.getItem("ddEntrance"))){
|
||||
this.ddEntrance = JSON.parse(localStorage.getItem("ddEntrance"));
|
||||
}
|
||||
this.consult_amount = (JSON.parse(localStorage.getItem("centerUserData"))).consult_amount;
|
||||
},
|
||||
mounted() {
|
||||
|
@ -93,6 +101,15 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
// 下载二维码事件
|
||||
downImg(url) {
|
||||
if (this.consult_amount >= 1) {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'downImg',url: url});
|
||||
}else if (this.consult_amount == 0){
|
||||
this.isConfirm = true;
|
||||
}
|
||||
},
|
||||
// 获取专家详情
|
||||
getDetailData() {
|
||||
let that = this;
|
||||
|
@ -162,6 +179,9 @@
|
|||
this.isConfirm = true;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 滚动显示头部
|
||||
eventScrollTop() {
|
||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
|
@ -195,5 +215,13 @@
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.ask-btn span{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -1rem;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
|
@ -47,7 +47,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="expert-list-btns">
|
||||
<div :class="{'btn':true,'noservice':consult_amount==0}" @click="toAsk(item.id)">向TA提问</div>
|
||||
<div :class="{'btn':true,'noservice':consult_amount==0}" @click="downImg(host + item.im_group_qr)" v-if="ddEntrance == 'yes'">向TA提问</div>
|
||||
<div :class="{'btn':true,'noservice':consult_amount==0}" v-else>
|
||||
向TA提问
|
||||
<span><img :src="host + item.im_group_qr" v-image-preview></span>
|
||||
</div>
|
||||
|
||||
<!-- <div :class="{'btn':true,'noservice':consult_amount==0}" @click="toAsk(item.id)">向TA提问</div> -->
|
||||
<!-- <div :class="{'btn':true,'noservice':consult_amount==0}" @click="goToAsk(item.id)">向TA提问</div> -->
|
||||
<div class="btn" @click="toDetail(item.id)">查看详情</div>
|
||||
</div>
|
||||
|
@ -83,7 +89,6 @@
|
|||
<span @click="closeEV()">取消</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部 -->
|
||||
<tabbar :current="2"></tabbar>
|
||||
</div>
|
||||
|
@ -91,8 +96,6 @@
|
|||
|
||||
<script>
|
||||
import tabbar from '../../../components/tabbar.vue'
|
||||
import 'dingtalk-jsapi/entry/mobile';
|
||||
import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
|
||||
export default {
|
||||
name: "expert",
|
||||
components: {
|
||||
|
@ -118,12 +121,15 @@
|
|||
addrIndex: -1,
|
||||
isAddr: false, //城市列表是否显示
|
||||
addrValue: '' , //选择城市编号
|
||||
|
||||
ddEntrance:'', //钉钉进入
|
||||
isPluralism: 0, //是否为多元升学
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.consult_amount = (JSON.parse(localStorage.getItem("centerUserData"))).consult_amount;
|
||||
if(JSON.parse(localStorage.getItem("ddEntrance"))){
|
||||
this.ddEntrance = JSON.parse(localStorage.getItem("ddEntrance"));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getBanner();
|
||||
|
@ -138,10 +144,18 @@
|
|||
// })
|
||||
// .then(function (res) {
|
||||
// console.log(res.data.data.im_group_link,'链接')
|
||||
// // window.open(res.data.data.im_group_link);
|
||||
// openLink({
|
||||
// url:res.data.data.im_group_link
|
||||
// })
|
||||
// window.open(res.data.data.im_group_link);
|
||||
// dd.biz.util.openLink({
|
||||
// url: res.data.data.im_group_link,
|
||||
// onSuccess : function(res) {
|
||||
// // 调用成功时回调
|
||||
// console.log(res)
|
||||
// },
|
||||
// onFail : function(err) {
|
||||
// // 调用失败时回调
|
||||
// console.log(err)
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// 导航切换
|
||||
|
@ -197,7 +211,8 @@
|
|||
slogan: item.slogan,
|
||||
keywords_list: item.keywords_list,
|
||||
score: item.score,
|
||||
comment_score: item.comment_score
|
||||
comment_score: item.comment_score,
|
||||
im_group_qr: item.im_group_qr,
|
||||
}
|
||||
newArray.push(obj);
|
||||
})
|
||||
|
@ -265,6 +280,17 @@
|
|||
}
|
||||
},
|
||||
|
||||
// 下载二维码事件
|
||||
downImg(url) {
|
||||
if (this.consult_amount >= 1) {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'downImg',url: url});
|
||||
}else if (this.consult_amount == 0){
|
||||
this.isConfirm = true;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 跳转到详情页
|
||||
toDetail(id) {
|
||||
this.$router.push({
|
||||
|
@ -289,4 +315,15 @@
|
|||
.banner img {
|
||||
width: 100%;
|
||||
}
|
||||
.expert-list-btns span{
|
||||
display: block;
|
||||
width: 2.36rem;
|
||||
height: 0.56rem;
|
||||
border-radius: 0.28rem;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -0.56rem;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -35,9 +35,12 @@
|
|||
|
||||
<p><strong>张老师</strong></p>
|
||||
<p>北师大语言学应用硕士,优朗高校面试课程首席讲师,著名高校副教授。中国先秦史学会国学双语研究会理事,世界汉语大会国外教育部长随行翻译,华尔街某金融公司CEO访谈节目现场口译官。13年从业经验,9年专注高校面试,具备扎实的理论基础和实战经验。</p>
|
||||
<h2>授课联系老师</h2>
|
||||
<div class="ewm">
|
||||
<img src="../../../assets/images/home/plan/dysxewm.jpg" alt="">
|
||||
<h2>单击以下二维码,弹出后识别即可联系规划师</h2>
|
||||
<div class="ewm" @click="downImg()" v-if="ddEntrance == 'yes'">
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" alt="">
|
||||
</div>
|
||||
<div class="ewm" v-else>
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" v-image-preview alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,16 +51,22 @@
|
|||
name: "texta",
|
||||
data() {
|
||||
return {
|
||||
|
||||
ddEntrance:'', //钉钉进入
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
if(JSON.parse(localStorage.getItem("ddEntrance"))){
|
||||
this.ddEntrance = JSON.parse(localStorage.getItem("ddEntrance"));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 下载二维码事件
|
||||
downImg() {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'downImg',url: 'http://aspevel.scdxtc.cn/img/dysxewm.jpg'});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -42,9 +42,12 @@
|
|||
<p><strong>李老师</strong></p>
|
||||
<p>外国语言学及英语语言学硕士,《高校面试口语》教材参编,6年高校教学经验,十多年丰富的面试口语教学经验。对面试类问题分析有独到的见解,面试思维应变力强,善于快速开拓学员的面试思维,短期内迅速提升学员综合能力。</p>
|
||||
|
||||
<h2>授课联系老师</h2>
|
||||
<div class="ewm">
|
||||
<img src="../../../assets/images/home/plan/dysxewm.jpg" alt="">
|
||||
<h2>单击以下二维码,弹出后识别即可联系规划师</h2>
|
||||
<div class="ewm" @click="downImg()" v-if="ddEntrance == 'yes'">
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" alt="">
|
||||
</div>
|
||||
<div class="ewm" v-else>
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" v-image-preview alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,16 +58,22 @@
|
|||
name: "textb",
|
||||
data() {
|
||||
return {
|
||||
|
||||
ddEntrance:'', //钉钉进入
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
if(JSON.parse(localStorage.getItem("ddEntrance"))){
|
||||
this.ddEntrance = JSON.parse(localStorage.getItem("ddEntrance"));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 下载二维码事件
|
||||
downImg() {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'downImg',url: 'http://aspevel.scdxtc.cn/img/dysxewm.jpg'});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -38,9 +38,12 @@
|
|||
<p><strong>Leo 刘</strong></p>
|
||||
<p>英国海归硕士,以最高等级学位毕业于两所英国TOP10顶尖大学,并多次在国内英语风采大赛中获奖。教学经验丰富,深谙英文面试考核重难点,授课颇具亲和力,深受学员喜爱。</p>
|
||||
|
||||
<h2>授课联系老师</h2>
|
||||
<div class="ewm">
|
||||
<img src="../../../assets/images/home/plan/dysxewm.jpg" alt="">
|
||||
<h2>单击以下二维码,弹出后识别即可联系规划师</h2>
|
||||
<div class="ewm" @click="downImg()" v-if="ddEntrance == 'yes'">
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" alt="">
|
||||
</div>
|
||||
<div class="ewm" v-else>
|
||||
<img src="http://aspevel.scdxtc.cn/img/dysxewm.jpg" v-image-preview alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -51,16 +54,22 @@
|
|||
name: "textc",
|
||||
data() {
|
||||
return {
|
||||
|
||||
ddEntrance:'', //钉钉进入
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
if(JSON.parse(localStorage.getItem("ddEntrance"))){
|
||||
this.ddEntrance = JSON.parse(localStorage.getItem("ddEntrance"));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 下载二维码事件
|
||||
downImg() {
|
||||
// 网页向小程序 postMessage 消息
|
||||
dd.postMessage({name:'downImg',url: 'http://aspevel.scdxtc.cn/img/dysxewm.jpg'});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue