作者 lihongjuan

提交

正在显示 53 个修改的文件 包含 1347 行增加602 行删除
... ... @@ -14247,6 +14247,11 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true
},
"vconsole": {
"version": "3.3.4",
"resolved": "https://registry.npm.taobao.org/vconsole/download/vconsole-3.3.4.tgz",
"integrity": "sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E="
},
"vendors": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857106626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz",
... ...
... ... @@ -19,6 +19,7 @@
"jweixin-1.6.0": "^1.0.0",
"mpvue-calendar": "^2.3.7",
"vant": "^2.9.2",
"vconsole": "^3.3.4",
"vue": "^2.5.2",
"vue-calendar-component": "^2.8.2",
"vue-clipboard2": "^0.3.1",
... ...
... ... @@ -22,8 +22,37 @@ body,
html {
overflow-x: hidden;
overflow: touch;
}
* {
-webkit-touch-callout: none; /*系统默认菜单被禁用*/
-webkit-user-select: none; /*webkit浏览器*/
-khtml-user-select: none; /*早期浏览器*/
-moz-user-select: none; /*火狐*/
-ms-user-select: none; /*IE10*/
user-select: none;
-webkit-appearance: none; /*兼容苹果手机,去除苹果手机select 默认样式,也会把单选和多选清除掉*/
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
input,
textarea {
-webkit-user-select: auto;
}
#app {
}
p{
width:100%!important;
font-size: 0.28rem;
font-weight: normal!important;
}
ul{
width:100%!important;
font-size: 0.28rem;
font-weight: normal!important;
}
.nodata {
... ... @@ -187,9 +216,9 @@ input {
.messagelist {
padding: 0.54rem 0.32rem;
box-sizing: border-box;
margin-bottom: 1.2rem;
margin-top: 0.6rem;
margin-bottom: 1.2rem;
/* margin-bottom: 1.2rem; */
/* margin-top: 0.6rem;
margin-bottom: 1.2rem; */
}
.messageitemleft {
width: 1rem;
... ... @@ -253,6 +282,10 @@ input {
position: fixed;
left: 0;
bottom: 0;
z-index:999;
-webkit-transform: translateZ(1px);
transform: translate(1px)
}
.writermessage {
width: 4.84rem;
... ...
<template>
<div class="container">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="(item, index) in banner" :key="index" @click="bannerdetail(item)">
<van-swipe-item
v-for="(item, index) in banner"
:key="index"
@click="bannerdetail(item)"
>
<div class="itemimg">
<img :src="item.image" alt />
</div>
... ... @@ -17,7 +21,7 @@
<div>
<div
class="spring"
v-for="(item,index) in activilist"
v-for="(item, index) in activilist"
:key="index"
@click="godetail(item.id)"
>
... ... @@ -37,7 +41,6 @@
<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";
import { Calendar } from "vant";
Vue.use(Calendar);
Vue.use(Swipe);
... ...
<template>
<div class="container">
<div class="flextwo sharetopkk" @click="back" style="position: fixed;top:0;left:0;">
<div
class="flextwo sharetopkk"
@click="back"
style="position: fixed; top: 0; left: 0"
>
<div class="leftrow leftrowkimg">
<img src="../../../assets/leftrow.png" alt />
</div>
... ... @@ -29,10 +33,15 @@
/>
</div>
<div class="actlist van-overflow-hidden" :style="{'margin-top':gaodu}">
<div class="actlist van-overflow-hidden" :style="{ 'margin-top': gaodu }">
<div class="activitytext" v-html="activity_des"></div>
<div class="actsecbox">
<div class="spring" v-for="(item, index) in banner" :key="index" @click="actdetail(item)">
<div
class="spring"
v-for="(item, index) in banner"
:key="index"
@click="actdetail(item)"
>
<img :src="item.image" alt />
</div>
</div>
... ... @@ -91,7 +100,7 @@ export default {
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
// this.id = this.$route.query.id;
// console.log(this.id);
... ... @@ -118,6 +127,7 @@ export default {
// 获取某一个月的活动
this.getmonthactive()
this.$nextTick(function () {
console.log('34234592340590-', that.$refs.element)
var len = that.$refs.element.offsetHeight + 40 + 'px';
that.gaodu = len;
... ... @@ -285,22 +295,7 @@ export default {
});
},
// 琥珀去
// selectYear(year) {
// console.log(year)
// },
// selectMonth(month, year) {
// console.log(year, month)
// },
// setToday() {
// this.$refs.calendar.setToday()
// },
// dateInfo() {
// const info = this.$refs.calendar.dateInfo(2018, 8, 23)
// console.log(info);
// },
// renderer() {
// this.$refs.calendar.renderer(2018, 8); //渲染2018年8月份
// },
selected(val, val2) {
console.log(this);
let monthArray = this.$refs.calendar.monthRangeDays;
... ...
<template>
<div class="container">
<div class="flextwo sharetopk" @click="back">
<div class="leftrow leftrowkimg">
<div class="flextwo sharetopk">
<div class="leftrow leftrowkimg" @click="back">
<img src="../../../assets/leftrow.png" alt />
</div>
<div class="sharemiddle">活动详情</div>
... ... @@ -30,7 +30,7 @@ export default {
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.id = this.$route.query.id;
console.log(this.id);
this.getdetail();
... ...
... ... @@ -51,7 +51,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
let that = this;
let date = new Date();
let year = date.getFullYear();
... ...
... ... @@ -160,6 +160,7 @@ import Vue from "vue";
import tabBar from "@/components/views/tabBar.vue";
import { List, Toast } from "vant";
Vue.use(List);
export default {
components: {
tabBar
... ... @@ -199,11 +200,11 @@ export default {
this.getvideolist();
localStorage.setItem("selnav", "")
} else if (this.selnav == 1) {
that.total_page = "";
that.this_page = "";
this.yinglist = [];
that.videopage = 1;
this.getyingyang();
that.total_page = "";
that.this_page = "";
this.yinglist = [];
that.videopage = 1;
this.getyingyang();
}
} else {
this.getcourselist()
... ... @@ -292,13 +293,14 @@ export default {
},
// 进入直播详情
zhibodetail(item) {
console.log(item.allow_join)
this.$router.push({
path: '/userzhibo',
query: {
id: item.id
}
})
// this.$router.push({
// path: '/userzhibo',
// query: {
// id: item.id
// }
// })
localStorage.setItem("coursename",item.title)
if (item.allow_join != undefined) {
if (item.allow_join == 1) {
this.$router.push({
... ... @@ -430,7 +432,8 @@ export default {
this.$router.push({
path: "/lubodetail",
query: {
id: item.id
id: item.id,
}
});
},
... ...
... ... @@ -3,8 +3,8 @@
<!-- style="height:600px" -->
<!-- -->
<div class="container" refs="message" id="targetbox">
<div class="sharetop flextwo" @click="back">
<div class="leftrow">
<div class="sharetop flextwo" >
<div class="leftrow" @click="back">
<img src="../../../assets/leftrow.png" alt />
</div>
<div class="sharemiddle">{{ coursetitle }}</div>
... ... @@ -19,7 +19,7 @@
<van-pull-refresh
v-model="isLoading"
@refresh="onRefresh"
class="messagelist"
class="messagelist messagelistbox"
style="height: 100%"
id="messagebox"
v-else
... ... @@ -309,6 +309,8 @@
import wx from "jweixin-1.6.0";
import Vue from "vue";
import { PullRefresh, Toast } from "vant";
import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断
Vue.use(PullRefresh);
Vue.use(Toast);
var timer = null;
... ... @@ -365,7 +367,7 @@ export default {
// alert(this.baseurl+
// "/redirect.html?shareRedirect=" +
// encodeURIComponent(window.location.href))
document.title = "唐元集公众号";
document.title = "唐元集";
this.id = this.$route.query.id;
// 获取appid
this.getappid();
... ... @@ -378,11 +380,13 @@ export default {
mounted() {
let that = this
this.onpopstate()
console.log(that.target, '99997878666')
},
destroyed () {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window.removeEventListener("popstate", this.closeViews, false);
},
watch: {
... ... @@ -399,6 +403,29 @@ export default {
}
},
methods: {
// 监听页面卸载
// 监听历史记录点, 添加返回事件监听
onpopstate () {
pushHistory()
// 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法
window.addEventListener("popstate", this.closeViews, false);
},
// 返回上一页
closeViews () {
console.log(4373474378)
this.$router.go(-1)
this.recordlist.forEach(function(value,index,array){
value.sel=false
})
this.recordlist=this.recordlist;
wx.stopVoice({
localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得
});
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
this.$forceUpdate();
},
//获取个人中心
getuserinfo() {
... ... @@ -514,7 +541,6 @@ export default {
"previewImage"
]
});
that.sharetofriend()
})
.catch(function (err) {
... ... @@ -532,8 +558,6 @@ export default {
});
// 处理验证成功的信息
wx.ready(function () {
// alert(window.location.href.split('#')[0]);
// var share_title = that.sharemsg.title;
// if (share_title.indexOf("${title}") >= 0) {
... ... @@ -727,7 +751,7 @@ export default {
wx.startRecord({
success: function (res) {
// alert(JSON.stringify(res))
consoel.log(res, 99977775655);
// alert('成功调起录音')
// that.timer = setInterval(() => {
// time++;
... ... @@ -957,9 +981,6 @@ export default {
}
}
},
websocketsend(Data) {
... ... @@ -998,7 +1019,6 @@ export default {
that.target = targetbox.offsetTop;
document.body.scrollTop = that.target;
document.getElementById('targetbox').scrollTop = that.target
})
})
}
... ... @@ -1025,6 +1045,10 @@ export default {
audioplay(item, index) {
let that = this;
console.log(item)
var botime=0
var intervl=setInterval(function(){
botime++;
},1000)
// 播放某一个语音
// that.recordlist[index].sel = !that.recordlist[index].sel;
... ... @@ -1050,16 +1074,17 @@ export default {
serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
localId = res.localId; // 返回音频的本地ID
that.playlocalid = localId;
that.recordlist[index].localId = localId;
that.recordlist = that.recordlist;
that.$forceUpdate()
wx.playVoice({
localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得
})
},
fail:function (err){
// alert(JSON.stringify(err))
}
});
... ... @@ -1087,30 +1112,31 @@ export default {
index = index + 1;
if (that.recordlist[index].data != undefined) {
if (that.recordlist[index].type == 3) {
that.recordlist[index].sel = true
wx.downloadVoice({
serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[index].localId = localId;
that.recordlist[index].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate()
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
if(botime>=Number(item.times.split(".")[0])){
for (var i = index; i < that.recordlist.length; i++) {
if (that.recordlist[i].type == 3) {
index = i;
that.recordlist[i].sel = true;
wx.downloadVoice({
serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[i].localId = localId;
that.recordlist[i].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
return;
}
}
}
}
that.recordlist = that.recordlist;
that.$forceUpdate()
}
});
... ... @@ -1604,4 +1630,7 @@ export default {
opacity: 1;
}
} */
.messagelistbox{
padding-top: 1.2rem;
}
</style>
... ...
<template>
<div class="container">
<div class="flextwo sharetopk" @click="back">
<div class="leftrow leftrowkimg">
<div class="flextwo sharetopk" >
<div class="leftrow leftrowkimg" @click="back">
<img src="../../../assets/leftrow.png" alt />
</div>
<div class="sharemiddle">搜索</div>
... ... @@ -253,7 +253,8 @@ export default {
this.$router.push({
path: "/lubodetail",
query: {
id: item.id
id: item.id,
type:3
}
});
}
... ...
<template>
<div class="containerbox">
<div class="sharetop flextwo" @click="back">
<div class="leftrow">
<div class="sharetop flextwo" >
<div class="leftrow" @click="back">
<img src="../../../assets/leftrow.png" alt />
</div>
<div class="sharemiddle">图文类</div>
<div class="sharemiddle">营养小知识</div>
<div class="flexone" @click.stop="collect">
<div class="sharebtn" style="margin-right:0.5rem;width:0.4rem;height:0.4rem">
<img src="../../../assets/nostar.png" alt v-if="yingyangdetail.is_favorite==0" />
<div
class="sharebtn"
style="margin-right: 0.5rem; width: 0.4rem; height: 0.4rem"
>
<img
src="../../../assets/nostar.png"
alt
v-if="yingyangdetail.is_favorite == 0"
/>
<img src="../../../assets/star.png" alt v-else />
</div>
<div class="sharebtn">
<!-- <div class="sharebtn">
<img src="../../../assets/sharebtn.png" alt />
</div>
</div> -->
</div>
</div>
<div class="yingyangbox">
<div class="yingyangtitle">{{yingyangdetail.title}}</div>
<div class="yingyangtitle">{{ yingyangdetail.title }}</div>
<div class="yingyangcontent" v-html="yingyangdetail.content"></div>
</div>
</div>
</template>
<script>
import wx from "jweixin-1.6.0";
import { Toast } from 'vant';
export default {
data() {
return {
id: '',
yingyangdetail: '',
baseurl: ''
}
},
created() {
document.title = '唐元集'
this.id = this.$route.query.id;
this.baseurl = "http://" + location.host;
this.getdetail();
},
beforeRouteEnter(to, from, next) {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
// XXX: 修复iOS版微信HTML5 History兼容性问题
if (isiOS && to.path !== location.pathname) {
// 此处不可使用location.replace
location.assign(to.fullPath);
} else {
next();
}
},
methods: {
back() {
this.$router.go(-1)
back() {
this.$router.back(-1);
},
// 获取appid
getappid() {
let that = this;
console.log(34734894890);
// let urlk = window.location.href;
let urlk = window.location.href;
var url = "/api/user/wechat_jssdk";
let param = {
url: urlk
};
that.$axios
.post(url, param)
.then(function (res) {
console.log(res);
wx.config({
debug: false,
appId: res.data.jssdk.appId, // 和获取Ticke的必须一样------必填,公众号的唯一标识
timestamp: res.data.jssdk.timestamp, // 必填,生成签名的时间戳
nonceStr: res.data.jssdk.nonceStr, // 必填,生成签名的随机串
signature: res.data.jssdk.signature, // 必填,签名,见附录1
//需要分享的列表项:发送给朋友,分享到朋友圈,分享到QQ,分享到QQ空间
jsApiList: [
"updateAppMessageShareData",
"updateTimelineShareData",
]
});
that.sharetofriend();
})
.catch(function (err) {
console.log(err);
});
},
getdetail() {
// 分享给朋友
sharetofriend() {
var that = this;
// 处理验证失败的信息
wx.error(function (res) {
logUtil.printLog("验证失败返回的信息:", res);
});
// 处理验证成功的信息
wx.ready(function () {
// alert(window.location.href.split('#')[0]);
// var share_title = that.sharemsg.title;
// if (share_title.indexOf("${title}") >= 0) {
// share_title = share_title.replace(
// "${title}",
// that.details.details.title
// );
// }
// var share_desc = that.sharemsg.content;
// if (share_desc.indexOf("${title}") >= 0) {
// share_desc = share_desc.replace(
// "${title}",
// that.details.details.title
// );
// }
// if (share_desc.indexOf("${text}") >= 0) {
// share_desc = share_desc.replace("${text}", that.details.details.text);
// }
// 分享到朋友圈
wx.updateTimelineShareData({
title: that.yingyangdetail.title, // 分享标题
link:
that.baseurl +
"/redirect.html?shareRedirect=" +
encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl:
"http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png",
// imgUrl: that.details.details.img
// ? that.details.details.img
// : that.sharemsg.img,
// 分享图标
// desc: that.sharemsg.content,
success: function (res) {
// 用户确认分享后执行的回调函数
console.log("suss");
logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
that.showMsg("分享成功!");
},
cancel: function (res) {
// 用户取消分享后执行的回调函数
console.log("err");
logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
}
}),
// 分享给朋友
wx.updateAppMessageShareData({
title: that.yingyangdetail.title, // 分享标题
desc: "", // 分享描述
link:
that.baseurl +
"/redirect.html?shareRedirect=" +
encodeURIComponent(window.location.href), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl:
"http://tangyuanji.t.brotop.cn/uploads/20200804/fcabfaf5aa3c856ced04703b0a78a467.png",
// imgUrl: that.details.details.img
// ? that.details.details.img
// : that.sharemsg.img,
// 分享图标
type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function (res) {
// 用户确认分享后执行的回调函数
logUtil.printLog("分享给朋友成功返回的信息为:", res);
},
cancel: function (res) {
// 用户取消分享后执行的回调函数
logUtil.printLog("取消分享给朋友返回的信息为:", res);
}
});
});
},
getdetail() {
let that = this;
var url = "/api/index/knowledge_detail";
let param = {
... ... @@ -49,7 +198,8 @@ export default {
.post(url, param)
.then(function (res) {
console.log(res);
that.yingyangdetail = res.data.knowledge
that.yingyangdetail = res.data.knowledge;
that.getappid()
})
.catch(function (err) {
... ... @@ -72,10 +222,12 @@ export default {
Toast('收藏成功')
that.yingyangdetail.is_favorite = 1;
that.yingyangdetailt = that.yingyangdetail
} else {
Toast('取消收藏成功')
that.yingyangdetail.is_favorite = 0;
that.yingyangdetail = that.yingyangdetail
}
})
... ... @@ -85,11 +237,7 @@ export default {
},
},
created() {
document.title = '唐元集公众号'
this.id = this.$route.query.id;
this.getdetail()
}
}
</script>
... ...
... ... @@ -107,7 +107,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.getkindlist();
},
methods: {
... ...
... ... @@ -308,7 +308,7 @@ export default {
this.images = item.images_arr;
if (this.images.length == 0) {
this.nophoto = true;
setTimeout(function() {
setTimeout(function () {
that.nophoto = false;
}, 1500);
} else {
... ... @@ -352,7 +352,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.allcomment = res.data.social;
console.log("434", that.allcomment);
... ... @@ -373,7 +373,7 @@ export default {
that.showcommentlist = that.shortcomment;
}
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -397,10 +397,10 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
Toast("发送成功");
that.sortlist.forEach(function(value, index, arrray) {
that.sortlist.forEach(function (value, index, arrray) {
if (value.id == that.socialId) {
value.comment_count = value.comment_count + 1;
}
... ... @@ -411,7 +411,7 @@ export default {
that.textcomment = "";
that.getcommentlist();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
Toast(err.msg);
});
... ... @@ -425,7 +425,7 @@ export default {
console.log(9999);
let that = this;
that.sortlist.forEach(function(value, index, array) {
that.sortlist.forEach(function (value, index, array) {
console.log(value);
if (value.id == item.id) {
if (value.more == true) {
... ... @@ -486,7 +486,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_favorite == 0) {
item.is_favorite = 1;
... ... @@ -504,7 +504,7 @@ export default {
that.sortlist = that.sortlist;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -520,7 +520,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_good == 0) {
item.is_good = 1;
... ... @@ -538,17 +538,18 @@ export default {
that.sortlist = that.sortlist;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
// 复制文本
copytext() {},
copytext() { },
selectnav(id, index) {
let that = this;
this.selnav = index;
this.sort_id = id;
this.selnavsec = -1;
that.page = 1;
that.sortlist = [];
that.getsocidtylist();
... ... @@ -577,7 +578,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
let obj = {
... ... @@ -591,7 +592,7 @@ export default {
that.sort_id = res.data[0].id;
that.getsocidtylist();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -606,10 +607,10 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.sortlist = that.sortlist.concat(res.data.social);
that.sortlist.forEach(function(value, index, array) {
that.sortlist.forEach(function (value, index, array) {
value.show = true;
if (value.description.length > 66) {
... ... @@ -622,7 +623,7 @@ export default {
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
}
... ...
... ... @@ -49,7 +49,7 @@
<div class="textrightheng"></div>
</div>
</div>-->
<div class="jianfenimg" style="margin-top:0.3rem">
<div class="jianfenimgkkk" style="margin-top:0.3rem">
<img :src="assistanceimg" alt />
</div>
</div>
... ... @@ -113,7 +113,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.intended = JSON.parse(localStorage.getItem("intended"))
console.log(this.intended)
... ...
... ... @@ -59,7 +59,7 @@ export default {
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.getquestion()
},
methods: {
... ...
... ... @@ -153,7 +153,7 @@ export default {
document.querySelector("#app").style.height = "100%";
document.querySelector("#app").style.overflow = "scroll";
// document.body.style.backgroundColor = "#5e955d";
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getuserinfo();
},
... ... @@ -172,7 +172,7 @@ export default {
},
closeimgk() {
this.closeimg = false;
this.hideshow = false;
},
getuserinfo() {
let that = this;
... ...
... ... @@ -16,12 +16,12 @@
<div class="introtextbox">
<div class="introtext flex">
<img src="../../../assets/xiaolian.png" alt class="xiaoimg" />
<div class="introtitlename" style="font-size:0.28rem">
<div class="introtitlename" style="font-size: 0.28rem">
亲爱的
<span style="font-size:0.28rem;font-weight:bold"
<span style="font-size: 0.28rem; font-weight: bold"
>{{ result.name }},</span
>
<span style="font-size:0.28rem;font-weight:bold">{{
<span style="font-size: 0.28rem; font-weight: bold">{{
result.agent_name
}}</span
>邀您深度了解唐元集!
... ... @@ -120,7 +120,7 @@ export default {
},
created() {
this.baseurl = "http://" + location.host;
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
let type = localStorage.getItem("type");
if (type == 1) {
... ... @@ -151,20 +151,18 @@ export default {
},
getintence() {
let that = this;
console.log(99999);
var result = "";
var url = "/api/user/intended";
let param = {};
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
result = res.data;
localStorage.setItem("intended", JSON.stringify(res.data.intended));
that.intended = JSON.parse(localStorage.getItem("intended"));
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -179,7 +177,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res, "hahahahaiaioaioaio4");
wx.config({
debug: false,
... ... @@ -194,12 +192,12 @@ export default {
"updateTimelineShareData"
]
});
wx.ready(function() {
wx.ready(function () {
wx.showOptionMenu();
});
that.sharetofriend();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -209,11 +207,11 @@ export default {
var that = this;
localStorage.setItem("type", "");
// 处理验证失败的信息
wx.error(function(res) {
wx.error(function (res) {
logUtil.printLog("验证失败返回的信息:", res);
});
// 处理验证成功的信息
wx.ready(function() {
wx.ready(function () {
// alert(window.location.href.split('#')[0]);
// var share_title = that.sharemsg.title;
// if (share_title.indexOf("${title}") >= 0) {
... ... @@ -248,13 +246,13 @@ export default {
// 分享图标
// desc: that.sharemsg.content,
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
console.log("suss");
logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
that.showMsg("分享成功!");
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
console.log("err");
logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
... ... @@ -277,11 +275,11 @@ export default {
// 分享图标
type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
logUtil.printLog("分享给朋友成功返回的信息为:", res);
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
logUtil.printLog("取消分享给朋友返回的信息为:", res);
}
... ... @@ -289,10 +287,13 @@ export default {
});
},
previewimg(imgarr, index) {
console.log(imgarr, index);
let arr = [];
imgarr.forEach(function(value, index, array) {
imgarr.forEach(function (value, index, array) {
arr.push(value.image);
});
this.index = index + 1;
... ... @@ -330,12 +331,12 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.img_arr = res.data.img_arr;
console.log(that.result);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -349,13 +350,13 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.result = res.data.result;
console.log(that.result);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -369,11 +370,11 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.company = res.data.company;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
}
... ...
... ... @@ -64,7 +64,7 @@ export default {
}
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.getcoupon()
},
methods: {
... ...
... ... @@ -54,7 +54,7 @@ export default {
},
created() {
this.sort_id = this.$route.query.sort_id;
document.title = "唐元集公众号";
document.title = "唐元集";
this.sort_name = this.$route.query.sort_name;
this.getsucai()
},
... ...
... ... @@ -62,7 +62,7 @@ export default {
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getresult();
this.intended = JSON.parse(localStorage.getItem("intended"));
... ...
... ... @@ -13,19 +13,31 @@
<div class="formitem flexone">
<div class="formitemleft">推荐经销商</div>
<div class="formitemright">
<input type="text" placeholder="请输入推荐经销商" v-model="agent_name" />
<input
type="text"
placeholder="请输入推荐经销商"
v-model="agent_name"
/>
</div>
</div>
<div class="formitem flexone">
<div class="formitemleft">经销商手机号</div>
<div class="formitemright formjingxiao">
<input type="number" placeholder="请输入推荐经销商手机号" v-model="mobile" />
<input
type="number"
placeholder="请输入推荐经销商手机号"
v-model="mobile"
/>
</div>
</div>
<div class="formitem flexone">
<div class="formitemleft">姓名</div>
<div class="formitemright">
<input type="text" placeholder="请输入意向经销商姓名" v-model="name" />
<input
type="text"
placeholder="请输入意向经销商姓名"
v-model="name"
/>
</div>
</div>
<div class="formitem flextwo" @click="selectshow(4)">
... ... @@ -68,7 +80,14 @@
<div class="chuangye">
<div class="chaungyetitle">是否有其他创业经历</div>
<div class="chuangyetext">
<textarea name id cols="30" rows="10" placeholder="预设内容" v-model="text"></textarea>
<textarea
name
id
cols="30"
rows="10"
placeholder="预设内容"
v-model="text"
></textarea>
</div>
</div>
</div>
... ... @@ -135,7 +154,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.getappid()
let obj = localStorage.getItem("obj");
console.log(obj)
... ...
... ... @@ -13,13 +13,21 @@
<div class="formitem flexone">
<div class="formitemleft">推荐经销商</div>
<div class="formitemright">
<input type="text" placeholder="请输入推荐经销商" v-model="agent_name" />
<input
type="text"
placeholder="请输入推荐经销商"
v-model="agent_name"
/>
</div>
</div>
<div class="formitem flexone">
<div class="formitemleft">经销商手机号</div>
<div class="formitemright formjingxiao">
<input type="number" placeholder="请输入推荐经销商手机号" v-model="mobile" />
<input
type="number"
placeholder="请输入推荐经销商手机号"
v-model="mobile"
/>
</div>
</div>
<div class="formitem flexone">
... ... @@ -92,7 +100,14 @@
<div class="chuangye">
<div class="chaungyetitle">顾客是否尝试过其他瘦身方法</div>
<div class="chuangyetext">
<textarea name id cols="30" rows="10" placeholder="预设内容" v-model="experience"></textarea>
<textarea
name
id
cols="30"
rows="10"
placeholder="预设内容"
v-model="experience"
></textarea>
</div>
</div>
</div>
... ... @@ -169,7 +184,7 @@ export default {
},
created() {
let that = this;
document.title = "唐元集公众号";
document.title = "唐元集";
this.getappid()
let zhiyeobj = localStorage.getItem("zhiyeobj");
console.log(zhiyeobj)
... ...
... ... @@ -79,7 +79,7 @@ export default {
},
created() {
document.querySelector("#app").style.overflow = "scroll";
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getresult();
this.intended = JSON.parse(localStorage.getItem("intended"));
... ...
... ... @@ -29,7 +29,7 @@ export default {
}
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.aboutus()
},
methods: {
... ...
... ... @@ -127,7 +127,7 @@ export default {
}
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.getquestion();
// 获取客服
this.getphone()
... ...
... ... @@ -35,7 +35,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getyouhui();
... ...
... ... @@ -63,7 +63,31 @@
<img src="../../../assets/ding.png" alt />
</div>
</div>
<div class="societytext">{{ item.description }}</div>
<div
class="societytext"
:class="item.show == true ? 'desyincang' : ''"
>
{{ item.description }}
</div>
<div
class="kanmore flexthree"
v-if="item.more == true"
@click="seemore(item, index)"
>
{{ item.show == true ? "查看更多" : "收起" }}
<img
src="../../../assets/jianotu.png"
alt
class="xiajiantou"
v-if="item.show == true"
/>
<img
src="../../../assets/jianotu.png"
alt
class="shangjiantou"
v-else
/>
</div>
<div class="societyimg flexone" v-if="item.images.length != 0">
<div
class="societyimgitem"
... ... @@ -121,6 +145,11 @@
<span class="number">{{ item.favorite_count }}</span>
</div>
<div class="flexone dianitem" @click="messageshow(index, item)">
<img src="../../../assets/xiaoxi.png" alt class="dianzanimg" />
<span class="number">{{ item.comment_count }}</span>
</div>
<div class="flexone dianitem" @click="copytext">
<img src="../../../assets/edit.png" alt class="dianzanimg" />
... ... @@ -133,14 +162,14 @@
>
<span class="number" v-else @click="fuzhi(item)">复制</span>
</div>
<div class="flexone dianitem" @click="save(item)">
<!-- <div class="flexone dianitem" @click="save(item)">
<img
src="../../../assets/download.png"
alt
class="dianzanimg"
/>
<span class="number">一键保存</span>
</div>
</div> -->
<!--
<div class="flexone dianitem" @click="del(item)">
<img src="../../../assets/delim.png" alt class="dianzanimg" />
... ... @@ -251,10 +280,18 @@ export default {
delfavorite_id: ""
};
},
mounted(){
console.log('3489438943989')
},
created() {
document.title = "唐元集公众号";
console.log(localStorage.getItem("selnav"));
console.log('created')
document.title = "唐元集";
console.log(localStorage.getItem("selnav"),'3489834934809');
let selnav = localStorage.getItem("selnav");
console.log('当前的selnav',selnav)
this.page = 1;
this.list = [];
this.activitylist = [];
... ... @@ -270,6 +307,18 @@ export default {
this.mycollecthuodong();
}
},
watch:{
$route:{
handler(val,oldval){
console.log('rhthwejktjhwerthjwerkj')
console.log(val);//新路由信息
console.log(oldval);//老路由信息
},
// 深度观察监听
deep: true
}
},
methods: {
// 进入活动中心详情
toactivity(id) {
... ... @@ -283,19 +332,29 @@ export default {
// 进入直播详情
// 录播详情
coursedetail(item) {
this.$router.push({
path: "/lubodetail",
query: {
id: item.object_id
}
});
console.log(item.type)
if (item.type == 2) {
this.$router.push({
path: "/lubodetail",
query: {
id: item.object_id
}
});
} else {
this.$router.push({
path: "/yingyangdetail",
query: { id: item.object_id }
});
}
},
// 删除帖子
del(item) {
this.social_id = item.id;
Dialog.confirm({
title: "是否删除帖子"
title: "是否撤销帖子"
})
.then(res => {
console.log(3489348);
... ... @@ -307,14 +366,14 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
Toast("删除成功");
that.page = 1;
that.list = [];
that.getsociety();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
// on confirm
... ... @@ -333,9 +392,9 @@ export default {
};
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.list.forEach(function(value, index, array) {
that.list.forEach(function (value, index, array) {
if (that.delfavorite_id == value.id) {
that.list.splice(index, 1);
that.list = that.list;
... ... @@ -343,7 +402,7 @@ export default {
}
});
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -357,14 +416,24 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.list = that.list.concat(res.data.list);
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
console.log(that.list);
that.list.forEach(function (value, index, array) {
value.show = true;
if (value.description.length > 66) {
value.more = true;
} else {
value.more = false;
}
})
that.list = that.list;
that.$forceUpdate()
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -378,11 +447,13 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
that.courselist = that.courselist.concat(res.data.list);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -396,11 +467,13 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
that.activitylist = that.activitylist.concat(res.data.list);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -410,6 +483,7 @@ export default {
selecttab(e) {
this.selnav = e.currentTarget.dataset.id;
localStorage.setItem("selnav", this.selnav);
console.log('selnav',localStorage.getItem("selnav"))
this.page = 1;
this.list = [];
this.courselist = [];
... ... @@ -435,7 +509,7 @@ export default {
this.images = item.images;
if (this.images.length == 0) {
this.nophoto = true;
setTimeout(function() {
setTimeout(function () {
that.nophoto = false;
}, 1500);
} else {
... ... @@ -515,7 +589,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_favorite == 0) {
item.is_favorite = 1;
... ... @@ -530,10 +604,11 @@ export default {
that.list[index].favorite_count =
that.list[index].favorite_count - 1;
}
that.list.splice(index, 1)
that.list = that.list;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -558,7 +633,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_good == 0) {
item.is_good = 1;
... ... @@ -574,18 +649,35 @@ export default {
that.list = that.list;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
// 查看更多
seemore(item, index) {
console.log(9999);
let that = this;
that.list.forEach(function (value, index, array) {
console.log(value);
if (value.id == item.id) {
if (value.more == true) {
value.show = !value.show;
}
}
});
that.sortlistlist = that.list;
that.$forceUpdate();
},
// 复制文本
copytext() {},
copytext() { },
// 头部切换
selectnav(id, index) {
let that = this;
this.selnav = index;
localStorage.setItem("selnav",this.selnav)
this.sort_id = id;
that.page = 1;
that.list = [];
... ... @@ -597,4 +689,33 @@ export default {
<style scoped>
@import "../../../style/usercenter.css";
.kanmore {
width: 100%;
color: #333;
font-size: 0.28rem;
margin: 0.32rem 0;
}
.jiantou {
width: 0.2rem;
height: 0.25rem;
margin-left: 0.16rem;
}
.xiajiantou {
width: 0.2rem;
height: 0.25rem;
transform: rotate(90deg);
margin-left: 0.16rem;
}
.shangjiantou {
width: 0.2rem;
height: 0.25rem;
transform: rotate(-90deg);
margin-left: 0.16rem;
}
.desyincang {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
</style>
... ...
... ... @@ -15,7 +15,12 @@
:class="selcourse == 1 ? 'courseactive' : ''"
@click="chosecourse(1)"
>
<img src="../../../assets/zhibocourse.png" alt class="zhiboimg" v-if="selcourse == 1" />
<img
src="../../../assets/zhibocourse.png"
alt
class="zhiboimg"
v-if="selcourse == 1"
/>
<img src="../../../assets/zhibogray.png" alt class="zhiboimg" v-else />
<div class="zhiboname">直播课</div>
... ... @@ -26,29 +31,35 @@
:data-id="2"
@click="chosecourse(2)"
>
<img src="../../../assets/lubowhite.png" alt class="zhiboimg" v-if="selcourse == 2" />
<img
src="../../../assets/lubowhite.png"
alt
class="zhiboimg"
v-if="selcourse == 2"
/>
<img src="../../../assets/lubo.png" alt class="zhiboimg" v-else />
<div class="zhiboname">录播课</div>
</div>
</div>
<!-- 直播课程 -->
<!-- -->
<div class="zhibotextbox" v-if="selcourse == 1">
<div class="coursetitle flexone">
<div class="coursename">课程分类</div>
<div class="coursenamek">课程分类</div>
<div class="coursenameright" @click="showcoursekind">
{{coursekind}}
{{ coursekind }}
<!-- <input type="text" placeholder="开课时间" /> -->
</div>
</div>
<div class="coursetitle flexone">
<div class="coursename">开课时间</div>
<div class="coursenamek">开课时间</div>
<div class="coursenameright" @click="showdate">
{{ start_time }}
<!-- <input type="text" placeholder="开课时间" /> -->
</div>
</div>
<div class="coursetitle flexone">
<div class="coursename">
<div class="coursenamek">
直播标题
<img src="../../../assets/xuehua.png" alt class="xuehuaimg" />
</div>
... ... @@ -59,11 +70,18 @@
<div class="zhibocontent">
<div class="flexone zhibojianjie">直播简介</div>
<div class="zhibotextbox">
<textarea name id cols="30" rows="10" placeholder="预设内容" v-model="description"></textarea>
<textarea
name
id
cols="30"
rows="10"
placeholder="预设内容"
v-model="description"
></textarea>
</div>
</div>
<div class="coursetitle flexone">
<div class="coursename">
<div class="coursenamek">
直播封面图
<img src="../../../assets/xuehua.png" alt class="xuehuaimg" />
<!-- <div class="xuehuaimg">
... ... @@ -92,14 +110,13 @@
<div class="zhibotextbox" v-if="selcourse == 2">
<div class="coursetitle flexone">
<div class="coursename">课程分类</div>
<div class="coursenamek">课程分类</div>
<div class="coursenameright" @click="showcoursekind">
{{coursekind}}
<!-- <input type="text" placeholder="开课时间" /> -->
{{ coursekind }}
</div>
</div>
<div class="coursetitle flexone">
<div class="coursename">
<div class="coursenamek">
录播时间标题
<img src="../../../assets/xuehua.png" alt class="xuehuaimg" />
</div>
... ... @@ -111,12 +128,19 @@
<div class="zhibocontent">
<div class="flexone zhibojianjie">录播简介</div>
<div class="zhibotextbox">
<textarea name id cols="30" rows="10" placeholder="预设内容" v-model="description"></textarea>
<textarea
name
id
cols="30"
rows="10"
placeholder="预设内容"
v-model="description"
></textarea>
</div>
</div>
<div class="coursetitle flexone">
<div class="coursename">
<div class="coursenamek">
录播封面图
<img src="../../../assets/xuehua.png" alt class="xuehuaimg" />
</div>
... ... @@ -155,7 +179,9 @@
/>
<van-loading type="spinner" color="#1989fa" v-if="cardzheng" />
<!-- 开始录制 -->
<div class="kaishilu" v-if="selcourse == 2" @click="opencourse">开始录制</div>
<div class="kaishilu" v-if="selcourse == 2" @click="opencourse">
开始录制
</div>
<div class="kaishilu" v-else @click="opencourse">开启</div>
</div>
</template>
... ... @@ -193,7 +219,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.getcourselist()
},
methods: {
... ... @@ -407,4 +433,8 @@ export default {
transform: translate(-50%, -50%);
z-index: 99;
}
.coursenamek {
color: #02170b;
font-size: 0.28rem;
}
</style>
... ...
... ... @@ -54,7 +54,7 @@ export default {
},
created() {
this.sort_id = this.$route.query.sort_id;
document.title = "唐元集公众号";
document.title = "唐元集";
this.sort_name = this.$route.query.sort_name;
this.getsucai()
},
... ...
... ... @@ -37,7 +37,7 @@ export default {
}
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.id = this.$route.query.id;
this.getvideodetail()
},
... ...
... ... @@ -14,12 +14,12 @@
<div class="introtextbox">
<div class="introtext flex">
<img src="../../../assets/xiaolian.png" alt class="xiaoimg" />
<div class="introtitlename" style="font-size:0.28rem">
<div class="introtitlename" style="font-size: 0.28rem">
亲爱的
<span style="font-size:0.28rem;font-weight:bold"
<span style="font-size: 0.28rem; font-weight: bold"
>{{ result.name }},</span
>
<span style="font-size:0.28rem;font-weight:bold">{{
<span style="font-size: 0.28rem; font-weight: bold">{{
result.agent_name
}}</span>
邀您深度了解唐元集!
... ... @@ -115,7 +115,7 @@ export default {
if (type == 1) {
this.showshare = true;
}
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getcompanyintro();
this.getresult();
... ... @@ -138,13 +138,13 @@ export default {
let param = {};
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
result = res.data;
localStorage.setItem("intended", JSON.stringify(res.data.intended));
that.intended = JSON.parse(localStorage.getItem("intended"));
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -159,7 +159,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res, "hahahahaiaioaioaio4");
wx.config({
debug: false,
... ... @@ -174,12 +174,12 @@ export default {
"updateTimelineShareData"
]
});
wx.ready(function() {
wx.ready(function () {
wx.showOptionMenu();
});
that.sharetofriend();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -189,11 +189,11 @@ export default {
var that = this;
localStorage.setItem("type", "");
// 处理验证失败的信息
wx.error(function(res) {
wx.error(function (res) {
logUtil.printLog("验证失败返回的信息:", res);
});
// 处理验证成功的信息
wx.ready(function() {
wx.ready(function () {
// 分享到朋友圈
wx.updateTimelineShareData({
title: "唐元集邀请函", // 分享标题
... ... @@ -210,13 +210,13 @@ export default {
// 分享图标
// desc: that.sharemsg.content,
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
console.log("suss");
logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
that.showMsg("分享成功!");
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
console.log("err");
logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
... ... @@ -239,11 +239,11 @@ export default {
// 分享图标
type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
logUtil.printLog("分享给朋友成功返回的信息为:", res);
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
logUtil.printLog("取消分享给朋友返回的信息为:", res);
}
... ... @@ -271,11 +271,11 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
that.result = res.data.result;
console.log(that.result);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -297,12 +297,12 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.company = res.data.company;
that.product = res.data.product;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
}
... ... @@ -311,10 +311,16 @@ export default {
</script>
<style scoped>
@import "../../../style/usercenter.css";
.zizhibox{
overflow-x: hidden!important;
font-size: 0.28rem!important;
}
.taozucontent {
width: 100%;
padding: 0 0.32rem;
box-sizing: border-box;
overflow-x: hidden!important;
font-size: 0.28rem!important;
/* height: 17.5rem; */
overflow-y: scroll;
}
... ... @@ -326,4 +332,5 @@ export default {
left: 0;
z-index: 9999;
}
</style>
... ...
... ... @@ -101,7 +101,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getxuanchuan();
this.intended = JSON.parse(localStorage.getItem("intended"))
... ...
... ... @@ -44,7 +44,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getsghiyeresult();
},
... ...
... ... @@ -80,7 +80,7 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
console.log("999", this.subid);
this.getshiyeyoushi();
... ...
... ... @@ -33,31 +33,45 @@
:class="selnav == 0 ? 'selactive' : ''"
:data-id="0"
@click="selectnav"
>视频素材</div>
>
视频素材
</div>
<div
class="coursenavleft"
:class="selnav == 1 ? 'selactive' : ''"
:data-id="1"
@click="selectnav"
>图片素材</div>
>
图片素材
</div>
<div
class="coursenavleft"
:class="selnav == 2 ? 'selactive' : ''"
:data-id="2"
@click="selectnav"
>文字素材</div>
>
文字素材
</div>
</div>
</div>
<div class="keywordk flexone" v-if="showkeyword" @click="hidekey">
<div class="keywordk flexone kewordsou" v-if="showkeyword" @click="hidekey">
<div
class="keyworditem"
v-for="(item, index) in sort"
:key="index"
@click="selname(item.name)"
>{{ item.name }}</div>
>
{{ item.name }}
</div>
</div>
<div v-if="showkeyword == false">
<div class="nodata" v-if="sucailist.length==0" style="margin-top:5.8rem">暂无数据</div>
<div
class="nodata"
v-if="sucailist.length == 0"
style="margin-top: 5.8rem"
>
暂无数据
</div>
<div v-else>
<van-list
... ... @@ -69,14 +83,14 @@
>
<div
class="sucaiboxitempage"
@click="gokind(item,index)"
v-for="(item,index) in sucailist"
@click="gokind(item, index)"
v-for="(item, index) in sucailist"
:key="index"
>
<div class="sucaiimg">
<img :src="item.icon" alt />
</div>
<div class="sucainame">{{item.name}}</div>
<div class="sucainame">{{ item.name }}</div>
</div>
</van-list>
</div>
... ... @@ -102,10 +116,13 @@ export default {
};
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.selnav = localStorage.getItem("selkind")
this.type = Number(this.selnav) + 1;
this.getsucai();
this.getlabellist();
},
methods: {
// 选择标签名字
... ... @@ -165,6 +182,7 @@ export default {
},
// 素材详情
videodetail(id, item) {
if (id == 1) {
this.$router.push({
path: "/videosucaidetail",
... ... @@ -256,6 +274,7 @@ export default {
this.page = 1;
this.sucailist = [];
this.getsucai();
localStorage.setItem("selkind", this.selnav)
},
enterword() {
console.log(48834998);
... ... @@ -288,4 +307,8 @@ export default {
.searchheadkkk {
top: 0.8rem;
}
.kewordsou {
margin-top: 1.8rem;
flex-wrap: wrap;
}
</style>
... ...
... ... @@ -303,7 +303,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.allcomment = res.data.social;
console.log("434", that.allcomment);
... ... @@ -324,7 +324,7 @@ export default {
that.showcommentlist = that.shortcomment;
}
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -351,10 +351,10 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
Toast("发送成功");
that.list.forEach(function(value, index, arrray) {
that.list.forEach(function (value, index, arrray) {
if (value.id == that.socialId) {
value.comment_count = value.comment_count + 1;
}
... ... @@ -365,7 +365,7 @@ export default {
that.textcomment = "";
that.getcommentlist();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
Toast(err.msg);
});
... ... @@ -379,7 +379,7 @@ export default {
console.log(9999);
let that = this;
that.list.forEach(function(value, index, array) {
that.list.forEach(function (value, index, array) {
console.log(value);
if (value.id == item.id) {
if (value.more == true) {
... ... @@ -408,7 +408,7 @@ export default {
this.images = item.images_arr;
if (this.images.length == 0) {
this.nophoto = true;
setTimeout(function() {
setTimeout(function () {
that.nophoto = false;
}, 1500);
} else {
... ... @@ -450,7 +450,7 @@ export default {
del(item) {
this.social_id = item.id;
Dialog.confirm({
title: "是否删除帖子"
title: "是否撤销帖子"
})
.then(res => {
console.log(3489348);
... ... @@ -462,14 +462,14 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
Toast("删除成功");
that.page = 1;
that.list = [];
that.gettiezilist();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
// on confirm
... ... @@ -488,10 +488,10 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.list = that.list.concat(res.data.social);
that.list.forEach(function(value, index, array) {
that.list.forEach(function (value, index, array) {
value.show = true;
if (value.description.length > 66) {
... ... @@ -505,7 +505,7 @@ export default {
that.total_page = res.data.total_page;
console.log(that.list);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -515,7 +515,7 @@ export default {
console.log(9999);
let that = this;
that.list.forEach(function(value, index, array) {
that.list.forEach(function (value, index, array) {
console.log(value);
if (value.id == item.id) {
if (value.more == true) {
... ... @@ -547,7 +547,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_favorite == 0) {
item.is_favorite = 1;
... ... @@ -565,7 +565,7 @@ export default {
that.list = that.list;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -583,7 +583,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
if (item.is_good == 0) {
item.is_good = 1;
... ... @@ -599,7 +599,7 @@ export default {
that.list = that.list;
that.$forceUpdate();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
}
... ...
... ... @@ -133,10 +133,13 @@ export default {
msg_count: ""
};
},
mounted(){
console.log("走了走了")
this.getuserinfo();
},
created() {
document.body.style.backgroundColor = "#f9f9f9";
document.title = "唐元集公众号";
this.getuserinfo();
document.title = "唐元集";
},
methods: {
sel(e) {
... ... @@ -157,8 +160,8 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
console.log(res);
.then(function (res) {
console.log(res,'个人信息');
that.username = res.data.nickname;
that.avatar = res.data.avatar;
that.lesson = res.data.lesson;
... ... @@ -168,12 +171,13 @@ export default {
that.showpage = true;
}
})
.catch(function(error) {
.catch(function (error) {
console.log(error);
});
},
// 进入直播
enterzhibo(id, lesson) {
localStorage.setItem('boindex','')
console.log(id);
console.log(this.lesson.type);
if (this.lesson.type == 1) {
... ... @@ -223,6 +227,7 @@ export default {
// query: { testId: item.test_student_id }
});
} else if (id == 3) {
localStorage.setItem("selkind", "")
this.$router.push({
path: "/sucaibao"
// query: { testId: item.test_student_id }
... ... @@ -232,6 +237,7 @@ export default {
path: "/publish"
});
} else if (id == 5) {
localStorage.setItem("iszuo", '')
this.$router.push({
path: "/zuozhanbaolishi"
});
... ...
... ... @@ -12,13 +12,14 @@
<!-- <img src="../../../assets/sharebtn.png" alt /> -->
</div>
</div>
<div class="nodata" v-if="recordlist.length == 0">暂无聊天记录</div>
<div class="listboxbox">
<div class="middlecontent">
<div class="nodata nodatatext" v-if="recordlist.length == 0">暂无聊天记录</div>
<van-pull-refresh
v-model="isLoading"
@refresh="onRefresh"
class="messagelist"
style="height:100%"
style="height: 100%"
id="messagebox"
v-else
>
... ... @@ -106,7 +107,7 @@
class="messageitem messageitemk flex"
v-if="item.user_id == user_id"
:id="item.idkk"
@touchstart="gotouchstart(item)"
@touchstart.stop="gotouchstart(item)"
@touchmove="gotouchmove"
@touchend="gotouchend(item)"
>
... ... @@ -180,19 +181,12 @@
</div>
</van-pull-refresh>
<!-- 底部导航 -->
<!-- <div class="messagebot messagebotkk flexone" v-if="is_self == 0 && isbot == true">
<div class="messagebotleft">
<img src="../../../assets/yuyin.png" alt />
</div>
<div class="writermessage">
<input type="text" placeholder="写留言" @input="entertext" :value="text" />
</div>
<div class="sendk" @click="send">发送</div>
</div>-->
<div v-if="is_self == 1">
<div class="messagebot messagebotkk flexone" v-if="sendword">
<!-- 底部导航 -->
<div v-if="is_self == 1" style="width:100%">
<div class="messagebotkk flexone" v-if="sendword" style="padding-bottom:0.12rem;box-sizing:border-box">
<div class="messagebotleft" @click="changeword">
<img src="../../../assets/yuyin.png" alt />
</div>
... ... @@ -206,7 +200,7 @@
</div>
<div class="sendk" @click="send">发送</div>
</div>
<div class="messagebot messagebotk flextwo" v-else>
<div class="messagebotk flextwo" v-else>
<img
src="../../../assets/yuyin.png"
alt
... ... @@ -225,7 +219,7 @@
class="yuyinbtn"
@click="yuyin"
/>
<div class style="position:relative">
<div class style="position: relative">
<input
type="file"
accept="audio/*"
... ... @@ -242,6 +236,11 @@
/>
</div>
</div>
</div>
<!-- <div class="manypeople">
<img src="../../../assets/manypeople.png" alt class="manypeopleimg" />
{{ group_count }}
... ... @@ -272,7 +271,7 @@
</div>
</div>
<!-- 开始录制 -->
<div class="register" style="z-index:999" v-if="beginlushow" @click="hide">
<div class="register" style="z-index: 999" v-if="beginlushow" @click="hide">
<div class="luwrap" @click.stop="beginluyin">
<div class="beginlu">开始录制</div>
<div>
... ... @@ -282,7 +281,7 @@
</div>
<!-- 正在录制 -->
<div class="register" style="z-index:999" v-if="zhengzailu" @click="hide">
<div class="register" style="z-index: 999" v-if="zhengzailu" @click="hide">
<div class="luwrap" @click.stop="finishluyin">
<div class="beginlu">正在录音:{{ time }}'</div>
<div>
... ... @@ -292,7 +291,7 @@
</div>
<!-- 录制完成 -->
<div class="register" style="z-index:999" v-if="luprocess" @click="hide">
<div class="register" style="z-index: 999" v-if="luprocess" @click="hide">
<div class="luwrap">
<div class="beginlu">录音时长:{{ time }}'</div>
<div class="flextwo chonglu">
... ... @@ -304,7 +303,7 @@
</div>
<!-- 温馨提示 -->
<div class="register" style="z-index:999" v-if="chonglushow">
<div class="register" style="z-index: 999" v-if="chonglushow">
<div class="wentipswrap">
<div class="tipsname">温馨提示</div>
<div class="waittips">您确认舍弃该录音重新录制吗</div>
... ... @@ -316,7 +315,7 @@
</div>
<!-- 本次录音是否上传 -->
<div class="register" style="z-index:999" v-if="shanghcuanshow">
<div class="register" style="z-index: 999" v-if="shanghcuanshow">
<div class="wentipswrap">
<div class="waittips benci">本次录音是否上传</div>
<div class="waitbot flexone">
... ... @@ -327,7 +326,7 @@
</div>
<van-loading type="spinner" color="#1989fa" v-if="cardzheng" />
<!-- 是否结束录播 -->
<div class="register" style="z-index:999" v-if="overzhibo">
<div class="register" style="z-index: 999" v-if="overzhibo">
<div class="wentipswrap">
<div class="waittips benci">是否结束录播</div>
<div class="waitbot flexone">
... ... @@ -340,9 +339,11 @@
</template>
<script>
var timeOutEvent = "";
import wx from "jweixin-1.6.0";
import Vue from "vue";
import { PullRefresh, Toast, Dialog, Loading } from "vant";
import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断
Vue.use(PullRefresh);
Vue.use(Toast);
Vue.use(Loading);
... ... @@ -385,10 +386,12 @@ export default {
stopindex: 0,
playlocalid: "",
cardzheng: false,
coursename: ""
coursename: "",
shitingshow:false
};
},
created() {
// 获取个人中心
this.getuserinfo();
// alert(location.host)
... ... @@ -400,7 +403,7 @@ export default {
// "/redirect.html?shareRedirect=" +
// encodeURIComponent(window.location.href))
this.coursename = this.$route.query.name;
document.title = "唐元集公众号";
document.title = "唐元集";
this.id = this.$route.query.id;
// 获取appid
this.getappid();
... ... @@ -409,10 +412,10 @@ export default {
// 获取直播列表
this.getzhibolist();
},
mounted() {
let that = this;
console.log(that.target, "99997878666");
this.onpopstate()
},
watch: {},
... ... @@ -427,7 +430,36 @@ export default {
next();
}
},
destroyed () {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window.removeEventListener("popstate", this.closeViews, false);
},
methods: {
// 监听页面卸载
// 监听历史记录点, 添加返回事件监听
onpopstate () {
pushHistory()
// 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法
window.addEventListener("popstate", this.closeViews, false);
},
// 返回上一页
closeViews () {
console.log(4373474378)
this.$router.go(-1)
this.recordlist.forEach(function(value,index,array){
value.sel=false
})
this.recordlist=this.recordlist;
wx.stopVoice({
localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得
});
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
this.$forceUpdate();
},
// 上传音频
afterRead(e) {
console.log(e);
... ... @@ -437,12 +469,10 @@ export default {
var formdata = new FormData();
formdata.append("file", file);
var url = "/api/common/upload";
that.$uploadFile
.post(url, formdata)
.then(function(res) {
.then(function (res) {
that.cardzheng = false;
console.log(res);
let objdata = {
... ... @@ -453,7 +483,6 @@ export default {
data: res.data.media
};
objdata = JSON.stringify(objdata);
that.websocketsend(objdata);
})
.catch(err => {
... ... @@ -465,17 +494,16 @@ export default {
//获取个人中心
getuserinfo() {
let that = this;
var url = "/api/user/index";
let param = {};
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.user_id = res.data.id;
})
.catch(function(err) {});
.catch(function (err) { });
},
// 列表自动滚到到底部
... ... @@ -484,9 +512,7 @@ export default {
let div = this.$refs["message-list"];
console.log(div.scrollHeight, 8887766543);
console.log(div.style.height, 9999);
this.height = div.clientHeight;
div.scrollTop = div.scrollHeight;
// let height = div.offsetHeight
// console.log(height, 9999888888)
... ... @@ -545,7 +571,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
wx.config({
debug: false,
... ... @@ -559,7 +585,6 @@ export default {
"stopRecord",
"playVoice",
"uploadVoice",
"playVoice",
"downloadVoice",
"stopVoice",
"chooseImage",
... ... @@ -572,7 +597,7 @@ export default {
that.sharetofriend();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -581,11 +606,11 @@ export default {
sharetofriend() {
var that = this;
// 处理验证失败的信息
wx.error(function(res) {
logUtil.printLog("验证失败返回的信息:", res);
wx.error(function (res) {
// logUtil.printLog("验证失败返回的信息:", res);
});
// 处理验证成功的信息
wx.ready(function() {
wx.ready(function () {
// alert(window.location.href.split('#')[0]);
// var share_title = that.sharemsg.title;
// if (share_title.indexOf("${title}") >= 0) {
... ... @@ -620,16 +645,16 @@ export default {
// 分享图标
// desc: that.sharemsg.content,
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
console.log("suss");
logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
that.showMsg("分享成功!");
// logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
// that.showMsg("分享成功!");
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
console.log("err");
logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
// logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
}
}),
// 分享给朋友
... ... @@ -649,13 +674,13 @@ export default {
// 分享图标
type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
logUtil.printLog("分享给朋友成功返回的信息为:", res);
// logUtil.printLog("分享给朋友成功返回的信息为:", res);
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
logUtil.printLog("取消分享给朋友返回的信息为:", res);
// logUtil.printLog("取消分享给朋友返回的信息为:", res);
}
});
});
... ... @@ -668,13 +693,13 @@ export default {
count: 1, // 默认9
sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
success: function(res) {
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({
localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
that.serverId = res.serverId;
that.upload();
... ... @@ -686,8 +711,7 @@ export default {
upload() {
let that = this;
console.log(34734894890);
alert(that.serverId);
var url = "/api/user/upload_media";
let param = {
type: 1,
... ... @@ -696,7 +720,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.videourl = res.data.media;
let objdata = {
... ... @@ -711,8 +735,8 @@ export default {
that.websocketsend(objdata);
// alert(that.videourl)
})
.catch(function(err) {
alert(err);
.catch(function (err) {
console.log(err);
});
},
... ... @@ -731,9 +755,14 @@ export default {
this.beginlushow = false;
this.zhengzailu = false;
this.luprocess = false;
clearInterval(timer)
this.time = 1
wx.pauseVoice({
localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
wx.stopVoice({
localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
},
// 返回上一页
back() {
... ... @@ -764,8 +793,16 @@ export default {
yuyin() {
this.beginlushow = true;
this.yuyintype = 1;
this.recordlist.forEach(function(value,index,array){
value.sel=false
})
this.recordlist=this.recordlist;
this.$forceUpdate();
wx.stopVoice({
localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得
});
},
// 开始录制
// 开始录音
beginluyin() {
console.log(83434898989);
... ... @@ -775,13 +812,25 @@ export default {
let time = 0;
timer = setInterval(() => {
time++;
console.log(time,'计时')
that.time = time;
console.log(that.time);
if (that.time == 60) {
clearInterval(timer);
this.zhengzailu = false;
this.luprocess = true;
wx.stopRecord({
success: function (res) {
var localId = res.localId;
that.localId = res.localId;
that.upyuyin();
}
});
}
}, 1000);
wx.startRecord({
success: function(res) {
success: function (res) {
// alert(JSON.stringify(res))
consoel.log(res, 99977775655);
// alert('成功调起录音')
// that.timer = setInterval(() => {
// time++;
... ... @@ -789,7 +838,7 @@ export default {
// }, 1000)
// that.vicoeEnd()
},
cancel: function() {
cancel: function () {
// alert("用户拒绝授权录音");
}
});
... ... @@ -804,7 +853,7 @@ export default {
clearInterval(timer);
wx.stopRecord({
success: function(res) {
success: function (res) {
var localId = res.localId;
that.localId = res.localId;
that.upyuyin();
... ... @@ -813,9 +862,17 @@ export default {
},
// 试听录音
shiting() {
wx.playVoice({
localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得
this.shitingshow=!this.shitingshow;
if(this.shitingshow==true){
wx.playVoice({
localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得
});
}else{
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
},
// 结束本次上传
hideshangchuan() {
... ... @@ -824,9 +881,7 @@ export default {
// 发送语音
sendyuyin() {
// 发送语音
let that = this;
this.shanghcuanshow = false;
that.luprocess = false;
// this.issuccess = true
... ... @@ -838,6 +893,11 @@ export default {
data: that.serverId
};
objdata = JSON.stringify(objdata);
that.time = 1
wx.stopVoice({
localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
// alert("发送的语音")
// alert(objdata);
that.websocketsend(objdata);
// this.shanghcuanshow = true
... ... @@ -846,7 +906,6 @@ export default {
},
shangyuyin() {
let that = this;
this.shanghcuanshow = false;
that.luprocess = false;
this.issuccess = true;
... ... @@ -867,7 +926,7 @@ export default {
wx.uploadVoice({
localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
var serverId = res.serverId; // 返回音频的服务器端ID
that.serverId = res.serverId;
// alert(that.serverId);
... ... @@ -882,6 +941,9 @@ export default {
this.luprocess = false;
this.beginlushow = true;
clearInterval(this.timer);
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
},
// 停止直播
stopbtn() {
... ... @@ -917,11 +979,11 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.is_self = res.data.lesson.is_self;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -939,15 +1001,17 @@ export default {
websocketonopen() {
//连接建立之后执行send方法发送数据
console.log("连接成功");
this.cardzheng=false
},
websocketonerror() {
//连接建立失败重连
this.initWebSocket();
},
websocketonmessage(e) {
// alert('接收数据')
//数据接收
let that = this;
if (this.number == 0) {
let obj = {
lesson_id: this.id,
... ... @@ -958,27 +1022,28 @@ export default {
obj = JSON.stringify(obj);
console.log(obj);
this.websocketsend(obj);
// let data=e.
}
this.number = this.number + 1;
this.number = this.number;
let datak = e.data;
console.log(e, 88890999);
console.log(e.data);
// alert(e.data)
// alert(e.data.first)
let data = JSON.parse(e.data);
// alert(data)
console.log(data);
that.group_count = data.group_count;
if (data.group_count) {
that.group_count = data.group_count;
}
// 接收数据重新渲染列表
if (data.lesson_id != undefined) {
const redata = JSON.parse(e.data);
console.log(redata,'返回的数据返回的数据');
console.log(redata);
that.group_count = redata.group_count;
if (redata.code == 9) {
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
if (value.id == redata.id) {
that.recordlist.splice(index, 1);
that.recordlist = that.recordlist;
... ... @@ -988,9 +1053,12 @@ export default {
} else if (redata.code == 0) {
Toast(redata.msg);
} else if (redata.code == 1) {
// alert('push 进去了')
that.recordlist.push(redata);
that.recordlist = that.recordlist;
that.$forceUpdate();
console.log(that.recordlist);
that.$nextTick(() => {
var div = document.getElementById("messagebox");
var div = document.getElementsByClassName("messageitem");
... ... @@ -999,8 +1067,10 @@ export default {
div[len].scrollIntoView();
});
} else if (redata.code == 2) {
console.log('返回上一页')
that.$router.go(-1);
}
}
},
websocketsend(Data) {
... ... @@ -1009,8 +1079,11 @@ export default {
this.websock.send(Data);
},
websocketclose(e) {
this.number = 0
this.initWebSocket();
//关闭
console.log("断开连接", e);
this.cardzheng=true
},
// 获取直播列表
getzhibolist() {
... ... @@ -1024,13 +1097,13 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res, "直播列表");
if (that.page == 1) {
// 页面滚动到某一个位置
let len = res.data.record.length;
len = len - 1;
res.data.record.forEach(function(value, index, array) {
res.data.record.forEach(function (value, index, array) {
if (index == len) {
value.idkk = "targetboxk";
that.$nextTick(() => {
... ... @@ -1049,25 +1122,29 @@ export default {
// 拼接数组倒叙
var arr = [...res.data.record, ...that.recordlist];
that.recordlist = arr;
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
value.sel = false;
});
that.recordlist = that.recordlist;
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
audioplay(item, index) {
let that = this;
console.log(item);
var botime=0
var intervl=setInterval(function(){
botime++;
},1000)
// 播放某一个语音
// that.recordlist[index].sel = !that.recordlist[index].sel;
that.recordlist.forEach(function(value, indexk, array) {
that.recordlist.forEach(function (value, indexk, array) {
if (index == indexk) {
that.recordlist[indexk].sel = !that.recordlist[indexk].sel;
} else {
... ... @@ -1083,37 +1160,24 @@ export default {
if (this.recordlist[index].sel == true) {
// 开始播放
let localId = "";
// alert(JSON.stringify(item.data))
wx.downloadVoice({
serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
// alert(JSON.stringify(res))
localId = res.localId; // 返回音频的本地ID
that.playlocalid = localId;
that.recordlist[index].localId = localId;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得
});
},fail: function(err) {
alert(JSON.stringify(err))
}
});
// if (this.recordlist[index].data != that.stopurl) {
// wx.downloadVoice({
// serverId: this.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
// isShowProgressTips: 1, // 默认为1,显示进度提示
// success: function (res) {
// wx.stopVoice({
// localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得
// });
// }
// });
// }
} else if (this.recordlist[index].sel == false) {
// 停止播放
wx.stopVoice({
... ... @@ -1122,10 +1186,10 @@ export default {
}
// 监听播放停止播放下一个
wx.onVoicePlayEnd({
success: function(res) {
success: function (res) {
var localId = res.localId; // 返回音频的本地ID
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
if (localId == value.localId) {
value.sel = false;
}
... ... @@ -1135,26 +1199,29 @@ export default {
that.$forceUpdate();
index = index + 1;
if (that.recordlist[index].data != undefined) {
if (that.recordlist[index].type == 3) {
that.recordlist[index].sel = true;
wx.downloadVoice({
serverId: that.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[index].localId = localId;
that.recordlist[index].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
if(botime>=Number(item.times.split(".")[0])){
for (var i = index; i < that.recordlist.length; i++) {
if (that.recordlist[i].type == 3) {
index = i;
that.recordlist[i].sel = true;
wx.downloadVoice({
serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[i].localId = localId;
that.recordlist[i].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
return;
}
}
}
}
that.recordlist = that.recordlist;
that.$forceUpdate();
}
... ... @@ -1163,6 +1230,10 @@ export default {
// 发送文字
send() {
// var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001");
if(this.text==''){
Toast("请写留言")
return false
}
let objdata = {
lesson_id: this.id,
type: 1,
... ... @@ -1178,12 +1249,14 @@ export default {
// ws.send(objdata);
},
gotouchstart(item) {
// event.preventDefault();
window.event.stopPropagation()
let that = this;
clearTimeout(timeOutEvent); //清除定时器
timeOutEvent = 0;
timeOutEvent = setTimeout(function() {
timeOutEvent = setTimeout(function () {
Dialog.confirm({
title: "是否删除帖子"
title: "是否撤销帖子"
})
.then(res => {
console.log(item.id);
... ... @@ -1200,7 +1273,7 @@ export default {
objdata = JSON.stringify(objdata);
// alert(objdata)
that.websocketsend(objdata);
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
if (value.id == item.id) {
that.recordlist.splice(index, 1);
that.recordlist = that.recordlist;
... ... @@ -1231,6 +1304,14 @@ export default {
</script>
<style scoped>
.middlecontent{
width:100%;
flex:1;
overflow-y: scroll;
}
.nodatatext{
margin-top:4rem
}
.van-loading {
position: absolute;
top: 50%;
... ... @@ -1407,7 +1488,7 @@ export default {
box-sizing: border-box;
}
.messagebotk {
padding: 0.16rem 0.72rem;
padding:0 0.72rem;
box-sizing: border-box;
}
.messagebotkk {
... ... @@ -1434,7 +1515,7 @@ export default {
border-radius: 0.4rem;
box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33);
position: fixed;
bottom: 1.2rem;
bottom: 1.5rem;
right: 0.32rem;
z-index: 9;
}
... ... @@ -1446,6 +1527,9 @@ export default {
.messagelist {
/* height: 15rem; */
/* padding-bottom: 1.5rem; */
padding-top:1.4rem;
box-sizing: border-box;
overflow-y: scroll;
}
.contentimg {
width: 4.15rem;
... ... @@ -1716,4 +1800,11 @@ export default {
opacity: 1;
}
} */
.listboxbox{
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
</style>
... ...
... ... @@ -13,12 +13,14 @@
</div>
</div>
<div class="nodata" v-if="recordlist.length == 0">暂无聊天记录</div>
<div class="listboxbox">
<div class='middlecontent'>
<div class="nodata nodatatext" v-if="recordlist.length == 0">暂无聊天记录</div>
<van-pull-refresh
v-model="isLoading"
@refresh="onRefresh"
class="messagelist"
style="height:100%"
style="height: 100%"
id="messagebox"
v-else
>
... ... @@ -167,13 +169,12 @@
</div>
</div>
</van-pull-refresh>
</div>
<!-- 底部导航 -->
<div
class="messagebot messagebotkk flexone"
v-if="is_self == 0 && isbot == true"
>
<div class="messagebotkk flexone" v-if="is_self == 0 && isbot == true" style="padding-bottom:0.12rem;box-sizing:border-box">
<div class="messagebotleft">
<img src="../../../assets/yuyin.png" alt />
</div>
... ... @@ -187,8 +188,8 @@
</div>
<div class="sendk" @click="send">发送</div>
</div>
<div v-if="is_self == 1">
<div class="messagebot messagebotkk flexone" v-if="sendword">
<div v-if="is_self == 1" style="width:100%;padding-bottom:0.12rem;box-sizing:border-box" >
<div class="messagebotkk flexone" v-if="sendword">
<div class="messagebotleft" @click="changeword">
<img src="../../../assets/yuyin.png" alt />
</div>
... ... @@ -202,7 +203,7 @@
</div>
<div class="sendk" @click="send">发送</div>
</div>
<div class="messagebot messagebotk flextwo" v-else>
<div class="messagebotk flextwo" v-else>
<img
src="../../../assets/yuyin.png"
alt
... ... @@ -221,7 +222,7 @@
class="yuyinbtn"
@click="yuyin"
/>
<div class style="position:relative">
<div class style="position: relative">
<input
type="file"
accept="audio/*"
... ... @@ -239,6 +240,12 @@
/>
</div>
</div>
</div>
<div class="manypeople">
<img src="../../../assets/manypeople.png" alt class="manypeopleimg" />
{{ group_count }}
... ... @@ -269,7 +276,7 @@
</div>
</div>
<!-- 开始录制 -->
<div class="register" style="z-index:999" v-if="beginlushow" @click="hide">
<div class="register" style="z-index: 999" v-if="beginlushow" @click="hide">
<div class="luwrap" @click.stop="beginluyin">
<div class="beginlu">开始录制</div>
<div>
... ... @@ -277,11 +284,10 @@
</div>
</div>
</div>
<!-- 正在录制 -->
<div class="register" style="z-index:999" v-if="zhengzailu" @click="hide">
<div class="register" style="z-index: 999" v-if="zhengzailu" @click="hide">
<div class="luwrap" @click.stop="finishluyin">
<div class="beginlu">正在录音:{{ time }}'</div>
<div class="beginlu">正在录音:{{time }}'</div>
<div>
<img src="../../../assets/zhengzailu.png" alt class="beginluimg" />
</div>
... ... @@ -289,7 +295,7 @@
</div>
<!-- 录制完成 -->
<div class="register" style="z-index:999" v-if="luprocess" @click="hide">
<div class="register" style="z-index: 999" v-if="luprocess" @click="hide">
<div class="luwrap">
<div class="beginlu">录音时长:{{ time }}'</div>
<div class="flextwo chonglu">
... ... @@ -299,9 +305,8 @@
</div>
</div>
</div>
<!-- 温馨提示 -->
<div class="register" style="z-index:999" v-if="chonglushow">
<div class="register" style="z-index: 999" v-if="chonglushow">
<div class="wentipswrap">
<div class="tipsname">温馨提示</div>
<div class="waittips">您确认舍弃该录音重新录制吗</div>
... ... @@ -312,8 +317,7 @@
</div>
</div>
<!-- 本次录音是否上传 -->
<div class="register" style="z-index:999" v-if="shanghcuanshow">
<div class="register" style="z-index: 999" v-if="shanghcuanshow">
<div class="wentipswrap">
<div class="waittips benci">本次录音是否上传</div>
<div class="waitbot flexone">
... ... @@ -324,7 +328,7 @@
</div>
<van-loading type="spinner" color="#1989fa" v-if="cardzheng" />
<!-- 是否结束录播 -->
<div class="register" style="z-index:999" v-if="overzhibo">
<div class="register" style="z-index: 999" v-if="overzhibo">
<div class="wentipswrap">
<div class="waittips benci">是否结束直播</div>
<div class="waitbot flexone">
... ... @@ -333,6 +337,7 @@
</div>
</div>
</div>
</div>
</template>
... ... @@ -341,6 +346,7 @@ var timeOutEvent = "";
import wx from "jweixin-1.6.0";
import Vue from "vue";
import { PullRefresh, Toast, Dialog, Loading } from "vant";
import { pushHistory } from '../../../utils/back.js';//监听返回上一页的判断
Vue.use(PullRefresh);
Vue.use(Toast);
Vue.use(Loading);
... ... @@ -382,15 +388,25 @@ export default {
stopurl: "",
stopindex: 0,
playlocalid: "",
cardzheng: false
cardzheng: false,
containue:'',
boindex:0,
shitingshow:false
};
},
created() {
document.querySelector("#app").style.overflow = "scroll";
//解决苹果手机底部空白
// document.body.addEventListener('touchmove', (e) => {
// if (e._isScroller) return;
// e.preventDefault()
// }, {
// passive: false
// })
// document.querySelector("#app").style.overflow = "scroll";
// 获取个人中心
this.getuserinfo();
this.baseurl = "http://" + location.host;
let div = this.$refs["message-list"];
document.title = localStorage.getItem("coursename");
this.id = this.$route.query.id;
// 获取appid
... ... @@ -402,9 +418,8 @@ export default {
},
mounted() {
let that = this;
console.log(that.target, "99997878666");
this.onpopstate()
},
watch: {},
beforeRouteEnter(to, from, next) {
var u = navigator.userAgent;
... ... @@ -417,7 +432,36 @@ export default {
next();
}
},
destroyed () {
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window.removeEventListener("popstate", this.closeViews, false);
},
methods: {
// 监听页面卸载
// 监听历史记录点, 添加返回事件监听
onpopstate () {
pushHistory()
// 给window添加一个popstate事件,拦截返回键,执行this.closeViews事件,addEventListener需要指向一个方法
window.addEventListener("popstate", this.closeViews, false);
},
// 返回上一页
closeViews () {
console.log(4373474378)
this.$router.go(-1)
this.recordlist.forEach(function(value,index,array){
value.sel=false
})
this.recordlist=this.recordlist;
wx.stopVoice({
localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得
});
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
this.$forceUpdate();
},
// 上传音频
afterRead(e) {
console.log(e);
... ... @@ -432,7 +476,7 @@ export default {
that.$uploadFile
.post(url, formdata)
.then(function(res) {
.then(function (res) {
that.cardzheng = false;
console.log(res);
let objdata = {
... ... @@ -460,11 +504,11 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.user_id = res.data.id;
})
.catch(function(err) {});
.catch(function (err) { });
},
// 视频上拉加载
... ... @@ -516,7 +560,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res, "jssdkjsskd");
wx.config({
debug: false,
... ... @@ -543,7 +587,7 @@ export default {
that.sharetofriend();
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -552,11 +596,11 @@ export default {
sharetofriend() {
var that = this;
// 处理验证失败的信息
wx.error(function(res) {
logUtil.printLog("验证失败返回的信息:", res);
wx.error(function (res) {
// logUtil.printLog("验证失败返回的信息:", res);
});
// 处理验证成功的信息
wx.ready(function() {
wx.ready(function () {
// alert(window.location.href.split('#')[0]);
// var share_title = that.sharemsg.title;
// if (share_title.indexOf("${title}") >= 0) {
... ... @@ -591,16 +635,16 @@ export default {
// 分享图标
// desc: that.sharemsg.content,
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
console.log("suss");
logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
that.showMsg("分享成功!");
// logUtil.printLog("分享到朋友圈成功返回的信息为:", res);
// that.showMsg("分享成功!");
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
console.log("err");
logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
// logUtil.printLog("取消分享到朋友圈返回的信息为:", res);
}
}),
// 分享给朋友
... ... @@ -620,13 +664,13 @@ export default {
// 分享图标
type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function(res) {
success: function (res) {
// 用户确认分享后执行的回调函数
logUtil.printLog("分享给朋友成功返回的信息为:", res);
// logUtil.printLog("分享给朋友成功返回的信息为:", res);
},
cancel: function(res) {
cancel: function (res) {
// 用户取消分享后执行的回调函数
logUtil.printLog("取消分享给朋友返回的信息为:", res);
// logUtil.printLog("取消分享给朋友返回的信息为:", res);
}
});
});
... ... @@ -639,13 +683,13 @@ export default {
count: 1, // 默认9
sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
success: function(res) {
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({
localId: localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
that.serverId = res.serverId;
that.upload();
... ... @@ -667,7 +711,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.videourl = res.data.media;
let objdata = {
... ... @@ -682,7 +726,7 @@ export default {
that.websocketsend(objdata);
// alert(that.videourl)
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -701,6 +745,9 @@ export default {
this.beginlushow = false;
this.zhengzailu = false;
this.luprocess = false;
clearInterval(timer)
timer=null
this.time = 1
wx.pauseVoice({
localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
... ... @@ -734,36 +781,61 @@ export default {
yuyin() {
this.beginlushow = true;
this.yuyintype = 1;
this.recordlist.forEach(function(value,index,array){
value.sel=false
})
this.recordlist=this.recordlist;
this.$forceUpdate();
wx.stopVoice({
localId: this.playlocalid // 需要暂停的音频的本地ID,由stopRecord接口获得
});
},
// 开始录制
// 开始录音
beginluyin() {
console.log(83434898989);
console.log(83434898989,timer);
let that = this;
that.beginlushow = false;
that.zhengzailu = true;
let time = 0;
that.time = 1;
timer = setInterval(() => {
timer = setInterval(function () {
time++;
console.log(time,'计时')
that.time = time;
console.log(that.time);
}, 1000);
if (that.time == 60) {
clearInterval(timer);
timer=null
this.zhengzailu = false;
this.luprocess = true;
wx.stopRecord({
success: function (res) {
var localId = res.localId;
that.localId = res.localId;
that.upyuyin();
}
});
}
}, 1000)
wx.startRecord({
success: function(res) {
success: function (res) {
// alert(JSON.stringify(res))
consoel.log(res, 99977775655);
// alert('成功调起录音')
// that.timer = setInterval(() => {
// time++;
// that.time = time
// }, 1000)
// that.vicoeEnd()
},
cancel: function() {
cancel: function () {
// alert("用户拒绝授权录音");
}
});
},
// 完成录音
... ... @@ -771,11 +843,10 @@ export default {
let that = this;
this.zhengzailu = false;
this.luprocess = true;
clearInterval(timer);
timer=null
wx.stopRecord({
success: function(res) {
success: function (res) {
var localId = res.localId;
that.localId = res.localId;
that.upyuyin();
... ... @@ -784,9 +855,20 @@ export default {
},
// 试听录音
shiting() {
wx.playVoice({
localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得
console.log('试听语音',this.localId
)
this.shitingshow=!this.shitingshow;
if(this.shitingshow==true){
wx.playVoice({
localId: this.localId // 需要播放的音频的本地ID,由stopRecord接口获得
});
}else{
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
clearInterval(timer)
timer=null
},
// 结束本次上传
hideshangchuan() {
... ... @@ -795,7 +877,6 @@ export default {
// 发送语音
sendyuyin() {
let that = this;
this.shanghcuanshow = false;
that.luprocess = false;
// this.issuccess = true
... ... @@ -807,7 +888,10 @@ export default {
data: that.serverId
};
objdata = JSON.stringify(objdata);
// alert(objdata);
wx.stopVoice({
localId: that.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
that.websocketsend(objdata);
// this.shanghcuanshow = true
},
... ... @@ -834,7 +918,7 @@ export default {
wx.uploadVoice({
localId: that.localId, // 需要上传的音频的本地ID,由stopRecord接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
var serverId = res.serverId; // 返回音频的服务器端ID
that.serverId = res.serverId;
// alert(that.serverId);
... ... @@ -848,7 +932,11 @@ export default {
this.time = 0;
this.luprocess = false;
this.beginlushow = true;
clearInterval(this.timer);
clearInterval(timer);
timer=null;
wx.stopVoice({
localId: this.localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
},
// 停止直播
stopbtn() {
... ... @@ -868,9 +956,13 @@ export default {
data: "",
is_end: 1
};
console.log(objdata,'结束数据')
objdata = JSON.stringify(objdata);
// alert(objdata);
this.websocketsend(objdata);
clearInterval(timer);
timer=null
},
// 获取录播详情
... ... @@ -884,7 +976,7 @@ export default {
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res);
that.is_self = res.data.lesson.is_self;
// that.user_id = res.data.lesson.user_id;
... ... @@ -903,10 +995,11 @@ export default {
that.showtips = false;
that.isbot = true;
clearInterval(timer);
timer=null
}
}, 1000);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
... ... @@ -924,12 +1017,15 @@ export default {
websocketonopen() {
//连接建立之后执行send方法发送数据
console.log("连接成功");
this.cardzheng=false
},
websocketonerror() {
//连接建立失败重连
// this.initWebSocket();
this.initWebSocket();
},
websocketonmessage(e) {
//数据接收
let that = this;
... ... @@ -943,31 +1039,27 @@ export default {
obj = JSON.stringify(obj);
console.log(obj);
this.websocketsend(obj);
// let data=e.
}
this.number = this.number + 1;
this.number = this.number;
let datak = e.data;
console.log(e, 88890999);
console.log(e.data);
// alert(e.data)
// alert(e.data.first)
// if(e.data!='Hello 7f0000012afa0000020a'){
// }
let data = JSON.parse(e.data);
// alert(data)
console.log(data);
that.group_count = data.group_count;
if (data.group_count) {
that.group_count = data.group_count;
}
console.log('datadata',data)
// 接收数据重新渲染列表
if (data.lesson_id != undefined) {
const redata = JSON.parse(e.data);
console.log(redata);
console.log(redata,'返回的数据返回的数据');
that.group_count = redata.group_count;
if (redata.code == 9) {
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
if (value.id == redata.id) {
that.recordlist.splice(index, 1);
that.recordlist = that.recordlist;
... ... @@ -977,6 +1069,7 @@ export default {
} else if (redata.code == 0) {
Toast(redata.msg);
} else if (redata.code == 1) {
that.recordlist.push(redata);
that.recordlist = that.recordlist;
that.$forceUpdate();
... ... @@ -989,7 +1082,12 @@ export default {
div[len].scrollIntoView();
});
} else if (redata.code == 2) {
that.$router.go(-1);
console.log('返回上一页')
that.$router.push({
path:'/usercenter'
});
this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1)
this.$router.push(this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.length - 1].path)
}
}
},
... ... @@ -999,8 +1097,11 @@ export default {
this.websock.send(Data);
},
websocketclose(e) {
// window.location.reload()
this.number = 0
//关闭
console.log("断开连接", e);
this.cardzheng=true
this.initWebSocket();
},
// 获取直播列表
... ... @@ -1012,16 +1113,15 @@ export default {
lesson_id: that.id,
page: that.page
};
that.$axios
.post(url, param)
.then(function(res) {
.then(function (res) {
console.log(res, "直播列表");
if (that.page == 1) {
// 页面滚动到某一个位置
let len = res.data.record.length;
len = len - 1;
res.data.record.forEach(function(value, index, array) {
res.data.record.forEach(function (value, index, array) {
if (index == len) {
value.idkk = "targetboxk";
that.$nextTick(() => {
... ... @@ -1040,26 +1140,29 @@ export default {
// 拼接数组倒叙
var arr = [...res.data.record, ...that.recordlist];
that.recordlist = arr;
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
value.sel = false;
});
that.recordlist = that.recordlist;
that.this_page = res.data.this_page;
that.total_page = res.data.total_page;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
audioplay(item, index) {
let that = this;
console.log(item);
console.log(item,'当前播放的语音')
var botime=0
var intervl=setInterval(function(){
botime++;
},1000)
// 播放某一个语音
// that.recordlist[index].sel = !that.recordlist[index].sel;
that.recordlist.forEach(function(value, indexk, array) {
if (index == indexk) {
that.recordlist.forEach(function (value, indexk, array) {
if (item.id == value.id) {
console.log(item.id,999999)
that.recordlist[indexk].sel = !that.recordlist[indexk].sel;
} else {
that.recordlist[indexk].sel = false;
... ... @@ -1067,7 +1170,6 @@ export default {
});
that.recordlist = that.recordlist;
that.$forceUpdate();
console.log(that.recordlist);
... ... @@ -1077,34 +1179,18 @@ export default {
wx.downloadVoice({
serverId: item.data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
success: function (res) {
localId = res.localId; // 返回音频的本地ID
that.playlocalid = localId;
that.recordlist[index].localId = localId;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要播放的音频的本地ID,由stopRecord接口获得
});
}
});
// if (this.recordlist[index].data != that.stopurl) {
// wx.downloadVoice({
// serverId: this.recordlist[index].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
// isShowProgressTips: 1, // 默认为1,显示进度提示
// success: function (res) {
// wx.stopVoice({
// localId: res.localId // 需要停止的音频的本地ID,由stopRecord接口获得
// });
// }
// });
// }
} else if (this.recordlist[index].sel == false) {
// 停止播放
wx.stopVoice({
... ... @@ -1112,49 +1198,59 @@ export default {
});
}
// 监听播放停止播放下一个
wx.onVoicePlayEnd({
success: function(res) {
wx.onVoicePlayEnd({
success: function (res) {
console.log(res,'播放的长度')
var localId = res.localId; // 返回音频的本地ID
that.recordlist.forEach(function(value, index, array) {
that.recordlist.forEach(function (value, index, array) {
if (localId == value.localId) {
value.sel = false;
}
});
that.recordlist = that.recordlist;
that.$forceUpdate();
index = index + 1;
for (var i = index; i < that.recordlist.length; i++) {
if (that.recordlist[i].type == 3) {
index = i;
that.recordlist[i].sel = true;
wx.downloadVoice({
serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function(res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[i].localId = localId;
that.recordlist[i].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
return;
index = index + 1;
// 播放停止之后再播放下一个
if(botime>=Number(item.times.split(".")[0])){
for (var i = index; i < that.recordlist.length; i++) {
if (that.recordlist[i].type == 3) {
index = i;
that.recordlist[i].sel = true;
wx.downloadVoice({
serverId: that.recordlist[i].data, // 需要下载的音频的服务器端ID,由uploadVoice接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
let localId = res.localId; // 返回音频的本地ID
that.recordlist[i].localId = localId;
that.recordlist[i].sel = true;
that.recordlist = that.recordlist;
that.$forceUpdate();
wx.playVoice({
localId: localId // 需要暂停的音频的本地ID,由stopRecord接口获得
});
}
});
return;
}
}
}
}
that.recordlist = that.recordlist;
that.$forceUpdate();
}
});
},
// 发送文字
send() {
if(this.text==''){
Toast("请写留言")
return false
}
// var ws = new WebSocket("ws://tangyuanji.t.brotop.cn:11001");
let objdata = {
lesson_id: this.id,
... ... @@ -1176,9 +1272,9 @@ export default {
let that = this;
clearTimeout(timeOutEvent); //清除定时器
timeOutEvent = 0;
timeOutEvent = setTimeout(function() {
timeOutEvent = setTimeout(function () {
Dialog.confirm({
title: "是否删除帖子"
title: "是否撤销帖子"
})
.then(res => {
console.log(item.id);
... ... @@ -1226,6 +1322,14 @@ export default {
</script>
<style scoped>
.middlecontent{
width:100%;
flex:1;
overflow-y: scroll;
}
.nodatatext{
margin-top:4rem
}
.van-loading {
position: absolute;
top: 50%;
... ... @@ -1402,7 +1506,7 @@ export default {
box-sizing: border-box;
}
.messagebotk {
padding: 0.16rem 0.72rem;
padding: 0 0.72rem;
box-sizing: border-box;
}
.messagebotkk {
... ... @@ -1429,7 +1533,7 @@ export default {
border-radius: 0.4rem;
box-shadow: 0 0.16rem 0.3rem 0 rgba(142, 190, 142, 0.33);
position: fixed;
bottom: 1.2rem;
bottom: 1.5rem;
right: 0.32rem;
z-index: 9;
}
... ... @@ -1441,6 +1545,9 @@ export default {
.messagelist {
/* height: 15rem; */
/* padding-bottom: 1.5rem; */
padding-top:1.4rem;
box-sizing: border-box;
overflow-y: scroll;
}
.contentimg {
width: 4.15rem;
... ... @@ -1711,4 +1818,17 @@ export default {
opacity: 1;
}
} */
.listboxbox{
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.messagelist {
width:100%;
}
.messagebotk{
width:100%
}
</style>
... ...
... ... @@ -37,7 +37,7 @@ export default {
document.querySelector("#app").style.height = "100%"
// var vdo = document.getElementById("video");
// vdo.play();
document.title = '唐元集公众号'
document.title = '唐元集'
console.log(this.url)
},
... ...
... ... @@ -49,7 +49,7 @@ export default {
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.id = this.$route.query.id;
this.getvideodetail()
},
... ...
... ... @@ -32,7 +32,7 @@ export default {
}
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
this.id = this.$route.query.id;
this.getvideodetail()
},
... ...
... ... @@ -51,7 +51,7 @@ export default {
},
created() {
this.sort_id = this.$route.query.sort_id;
document.title = "唐元集公众号";
document.title = "唐元集";
this.sort_name = this.$route.query.sort_name;
this.getsucai()
},
... ...
... ... @@ -9,7 +9,10 @@
<!-- <img src="../../../assets/sharebtn.png" alt /> -->
</div>
</div>
<div class="youhuiacttext" v-html="text"></div>
<div class="youhuiacttext" v-html="text">
</div>
<div class="flextwo youhuitextbox">
<div class="shibotleft" @click="prepage">上一页</div>
<div class="shibotright" @click="nextpage">下一页</div>
... ... @@ -27,7 +30,7 @@ export default {
},
created() {
document.title = "唐元集公众号";
document.title = "唐元集";
this.subid = this.$route.query.subid;
this.getresult();
},
... ... @@ -72,7 +75,9 @@ export default {
.youhuiacttext {
padding: 0.32rem;
box-sizing: border-box;
margin-bottom: 1.5rem;
height: calc(100vh - 2rem);
overflow-y: scroll;
/* margin-bottom: 1.5rem; */
}
.youhuiacttext {
margin-top: 0.8rem;
... ... @@ -80,12 +85,13 @@ export default {
font-size: 0.3rem;
}
.youhuitextbox {
position: fixed;
/* position: fixed;
bottom: 0;
left: 0;
left: 0; */
width: 100%;
padding: 0.18rem 0.32rem;
box-sizing: border-box;
background: #fff;
z-index:999
}
</style>
\ No newline at end of file
... ...
... ... @@ -31,7 +31,7 @@ export default {
return {};
},
created() {
document.title = '唐元集公众号'
document.title = '唐元集'
},
methods: {
back() {
... ...
... ... @@ -10,17 +10,29 @@
</div>
</div>
<div class="zuozhantopkkk flextwo">
<div class="zuozhanitem" :class="iszuo==1?'zuozhanactive':''" @click="yixiang(1)">意向顾问</div>
<div class="zuozhanitem" :class="iszuo==2?'zuozhanactive':''" @click="yixiang(2)">意向经销商</div>
<div
class="zuozhanitem"
:class="iszuo == 1 ? 'zuozhanactive' : ''"
@click="yixiang(1)"
>
意向顾客
</div>
<div
class="zuozhanitem"
:class="iszuo == 2 ? 'zuozhanactive' : ''"
@click="yixiang(2)"
>
意向经销商
</div>
</div>
<!-- 意向顾问 -->
<div class="yixiangbox">
<div class="yixiangboxtop flexone">
<img src="../../../assets/yixiangimg.png" alt class="yixiangimg" />
作战包生成次数:{{count}}次
作战包生成次数:{{ count }}次
</div>
<div class="yiixangpage" v-if="iszuo==1">
<div class="yiixangpage" v-if="iszuo == 1">
<div class="yixiangpagetop flexone">
<div class="yiitem">顾客姓名</div>
<div class="yiitem">生成时间</div>
... ... @@ -29,22 +41,29 @@
<div class="yiitem caozuo">操作</div>
</div>
<div class="yixiangcontent">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
class="yixiangpagetop yixiangpagetopk flexone"
v-for="(item,index) in yixianglist"
v-for="(item, index) in yixianglist"
:key="index"
>
<div class="yiitem yiname">{{item.name}}</div>
<div class="yiitem yiname yidate">{{item.createtime}}</div>
<div class="yiitem yiname">{{ item.name }}</div>
<div class="yiitem yiname yidate">{{ item.createtime }}</div>
<div class="yiitem yisee" @click="seecontent(item.id)">查看</div>
<div class="yiitem yiname jingxiao">{{item.agent.name}}</div>
<div class="yiitem yisee caozuo" @click="delgu(item.id)">删除</div>
<div class="yiitem yiname jingxiao">{{ item.agent.name }}</div>
<div class="yiitem yisee caozuo" @click="delgu(item.id)">
删除
</div>
</div>
</van-list>
</div>
</div>
<div class="yiixangpage" v-if="iszuo==2">
<div class="yiixangpage" v-if="iszuo == 2">
<div class="yixiangpagetop flexone">
<div class="yiitem yijing">意向经销商</div>
<div class="yiitem">生成时间</div>
... ... @@ -53,17 +72,29 @@
<div class="yiitem caozuo caojing">操作</div>
</div>
<div class="yixiangcontent">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
class="yixiangpagetop yixiangpagetopk flexone"
v-for="(item,index) in yixianglist"
v-for="(item, index) in yixianglist"
:key="index"
>
<div class="yiitem yiname yijing">{{item.name}}</div>
<div class="yiitem yiname yidate">{{item.createtime}}</div>
<div class="yiitem yisee yicha" @click="jingxiaosee(item.id)">查看</div>
<div class="yiitem yiname jingxiao">{{item.agent.name}}</div>
<div class="yiitem yisee caozuo caojing" @click="deljing(item.id)">删除</div>
<div class="yiitem yiname yijing">{{ item.name }}</div>
<div class="yiitem yiname yidate">{{ item.createtime }}</div>
<div class="yiitem yisee yicha" @click="jingxiaosee(item.id)">
查看
</div>
<div class="yiitem yiname jingxiao">{{ item.agent.name }}</div>
<div
class="yiitem yisee caozuo caojing"
@click="deljing(item.id)"
>
删除
</div>
</div>
</van-list>
</div>
... ... @@ -90,7 +121,20 @@ export default {
}
},
created() {
this.getguwenlist()
if (localStorage.getItem("iszuo")) {
console.log(localStorage.getItem("iszuo"), '99999')
this.iszuo = localStorage.getItem("iszuo")
if (this.iszuo == 1) {
this.getguwenlist()
} else {
this.getjingxiaolist()
}
} else {
console.log(988888)
this.getguwenlist()
}
},
methods: {
back() {
... ... @@ -100,11 +144,14 @@ export default {
this.iszuo = id;
this.page = 1;
this.yixianglist = [];
localStorage.setItem("iszuo", this.iszuo)
if (this.iszuo == 1) {
this.getguwenlist()
} else[
} else {
this.getjingxiaolist()
]
}
},
//顾问查看
seecontent(id) {
... ...
... ... @@ -3,15 +3,18 @@
import Vue from "vue";
import App from "./App";
import router from "./router";
import VueRouter from "vue-router";
import Vant from "vant";
import "vant/lib/index.css";
import { Toast } from "vant";
// import Vconsole from "vconsole";
// let vConsole = new Vconsole();
// Vue.use(vConsole);
Vue.use(Toast);
Vue.use(Vant);
Vue.config.productionTip = false;
import axios from "./utils/common.js";
Vue.prototype.$axios = axios;
if (sessionStorage.getItem("token")) {
... ... @@ -22,13 +25,11 @@ Vue.prototype.$uploadFile = uploadFile;
// sessionStorage.setItem("token", "89cf0730-59e2-4627-baa3-a4451454794b");
import VueClipboard from "vue-clipboard2";
Vue.use(VueClipboard);
router.beforeEach((to, from, next) => {
const token = sessionStorage.getItem("token");
console.log("我是token", token);
console.log(to);
console.log(next());
// localStorage.setItem("selnav", '');
// console.log("我是token", token);
if (!token) {
if (to.path === "/login") {
... ...
... ... @@ -17,6 +17,7 @@ export default new Router({
},
{
path: "/society",
name: "society",
meta: { title: "唐元集公众号" },
component: resolve =>
... ... @@ -30,6 +31,7 @@ export default new Router({
},
{
path: "/activity",
name: "activity",
meta: { title: "唐元集公众号" },
component: resolve =>
... ... @@ -74,6 +76,7 @@ export default new Router({
{
path: "/formsub",
name: "formsub",
meta: { title: "唐元集公众号" },
component: resolve =>
require(["@/components/views/usercenter/formsub.vue"], resolve)
... ...
... ... @@ -11,10 +11,22 @@
}
.courseimg {
/* width: 2.4rem;
max-height: 1.46rem;
overflow: hidden;
flex: 0 0 auto; */
width: 2.4rem;
height: 1.46rem;
font-size: 0;
flex: 0 0 auto;
overflow: hidden;
}
.courseimg img {
/* max-height: 100%!important; */
min-height: 1.46rem!important;
}
img {
height: auto!important;
}
.coursetitle {
... ... @@ -134,8 +146,12 @@
.coursenameimg {
width: 3.35rem;
height: 2.8rem;
font-size: 0;
height: 2rem;
overflow: hidden;
}
.coursenameimg img {
min-height: 100%!important;
}
.coursetext {
... ... @@ -153,7 +169,7 @@
-webkit-line-clamp: 2;
overflow: hidden;
margin-top: 0.1rem;
height: 0.8rem;
height: 0.76rem;
}
.coursetitlek {
... ...
... ... @@ -132,7 +132,6 @@
margin-right: 0.14rem;
margin-bottom: 0.16rem;
overflow: hidden;
min-height: 1.45rem;
}
.socvideoitem {
... ... @@ -147,8 +146,8 @@
} */
.jianzheng {
width: 1.56rem;
height: 0.44rem;
/* width: 1.56rem;
height: 0.44rem; */
border-radius: 0.08rem;
font-size: 0.16rem;
line-height: 0.44rem;
... ... @@ -161,8 +160,8 @@
}
.jianzhengleft {
width: 0.36rem;
height: 0.44rem;
padding: 0.02rem 0.08rem;
box-sizing: border-box;
background: #5d9a5c;
color: #fff;
text-align: center;
... ... @@ -173,8 +172,8 @@
}
.jianzhengright {
width: 1.2rem;
height: 0.44rem;
padding: 0.02rem 0.08rem;
box-sizing: border-box;
background: #e6ebe6;
text-align: center;
color: #5d9a5c;
... ...
... ... @@ -1294,7 +1294,7 @@
.dailiimgk {
width: 6.84rem;
height: 5rem;
/* height: 5rem; */
font-size: 0;
margin: 0.4rem auot 0;
}
... ... @@ -1569,6 +1569,12 @@
margin-top: 0.16rem;
}
.jianfenimgkkk {
width: 6.86rem;
font-size: 0;
margin-top: 0.16rem;
}
.fuwutop {
margin-top: 0.16rem;
}
... ... @@ -1697,8 +1703,8 @@
} */
.jianzheng {
width: 1.56rem;
height: 0.44rem;
/* width: 1.56rem;
height: 0.44rem; */
border-radius: 0.08rem;
font-size: 0.16rem;
line-height: 0.44rem;
... ... @@ -1713,8 +1719,8 @@
}
.jianzhengleft {
width: 0.36rem;
height: 0.44rem;
padding: 0.02rem 0.08rem;
box-sizing: border-box;
background: #5d9a5c;
color: #fff;
text-align: center;
... ... @@ -1725,8 +1731,10 @@
}
.jianzhengright {
width: 1.2rem;
height: 0.44rem;
padding: 0.02rem 0.08rem;
box-sizing: border-box;
display: flex;
align-items: center;
background: #e6ebe6;
text-align: center;
color: #5d9a5c;
... ... @@ -1940,11 +1948,15 @@
font-size: 0.26rem;
text-align: center;
margin-top: 0.18rem;
width:2.04rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sucaiimg {
width: 2.08rem;
height: 2.08rem;
width: 2.04rem;
height: 2.04rem;
font-size: 0;
}
... ... @@ -1964,9 +1976,14 @@
}
.sucaiboxitempage {
margin-right: 0.16rem;
width:2.04rem;
height: 2.54rem;
margin-right: 0.32rem;
margin-bottom: 0.16rem;
}
.sucaiboxitempage:nth-child(3n){
margin-right:0
}
.courseboxk {
margin-top: 0.8rem;
... ...
export const pushHistory = () => {
let state = { title: '', url: '' }
window.history.pushState(state, state.title, state.url)
}
\ No newline at end of file
... ...
import Vue from "vue";
import axios from "./common.js";
console.log(axios);
Vue.prototype.$axios = axios;
// import axios from "./common.js";
// console.log(axios);
// Vue.prototype.$axios = axios;
export function getUrlKey(name) {
return (
decodeURIComponent(
... ...