diff --git a/pages.json b/pages.json
index 3fa73ff..7ab9454 100644
--- a/pages.json
+++ b/pages.json
@@ -42,6 +42,18 @@
}
}
},
+ {
+ "path": "pages/videoCircle/gDvideo",
+ "style": {
+ "navigationBarTitleText": "视频列表",
+ "enablePullDownRefresh": true,
+ "onReachBottomDistance":200,
+ "navigationStyle": "custom",
+ "app-plus": {
+ "titleNView": false
+ }
+ }
+ },
{
"path": "pages/videoCircle/index",
"style": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 4c7fca3..5350b49 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -194,7 +194,7 @@
+
-
-
-
-
-
-
- {{item.name}}
- {{item.content}}
-
-
-
-
-
+
+
+
+
+
+
+
+
- {{item.name}}
- {{item.content}}
+ {{item.artificerName}}
+ {{item.content}}
-
-
-
-
-
- {{item.name}}
- {{item.content}}
-
-
-
-
-
-
-
- {{item.name}}
- {{item.content}}
-
-
-
-
+
+
+
+
+
+ {{contentVideo}}
+
+
+
+
+
+
+
+
@@ -315,6 +299,10 @@
export default {
data() {
return {
+ checkboxShow:1,
+ filePath:'',
+ playShow:false,
+ videoId:0,
current: 0,
serviceTrue:true,
cityList: [],
@@ -368,6 +356,7 @@
currentTab: 0,
tabCurrent: 'tabNum1',
// Tab切换内容
+ swiperDateLists:[],
swiperDateList: [{
id: 1,
content: '中医推拿',
@@ -397,7 +386,9 @@
tpSel: 0,
tpCount: 0,
cuowu:'',
- type:'center'
+ type:'center',
+ parType:'',
+ contentVideo:''
}
},
onShareAppMessage(res) { //发送给朋友
@@ -526,6 +517,7 @@
// #endif
}
})
+ that.getVideo()
},
onShow() {
let that = this
@@ -555,7 +547,89 @@
}
that.token = uni.getStorageSync('token');
},
+ computed: {
+ scrollIntoView() {
+ return 'tab' + this.currentTab;
+ }
+ },
methods: {
+ guanbi(){
+ this.playShow=false;
+ const videoContext = uni.createVideoContext('myVideo', this);
+ videoContext.pause(); // 播放视频
+ this.$refs.pinglun.close("center");
+ },
+ jieshu(){
+ this.playShow=true;
+ const videoContext = uni.createVideoContext('myVideo', this);
+ videoContext.pause(); // 播放视频
+ },
+ kaishi(){
+ this.playShow=false;
+ const videoContext = uni.createVideoContext('myVideo', this);
+ videoContext.src = this.filePath; // 设置视频源
+ videoContext.play(); // 播放视频
+ },
+ towxh5Video(item){
+ this.playShow=false;
+ this.filePath=item.filePath;
+ this.contentVideo=item.content;
+ this.videoId=item.id
+ this.$refs.pinglun.open("center")
+ },
+ swichMenu(index,id) {//视频导航
+ this.currentTab = index;
+ // 计算需要滚动的距离
+ const query = uni.createSelectorQuery().in(this);
+ query.select('.top-menu-view').boundingClientRect(data => {
+ this.scrollLeft = data.width / this.tabs.length * index;
+ }).exec();
+ this.parType=index+1;
+ this.getVideo()
+ // this.currentTab = index
+ // console.log(11,index)
+
+ // this.scrollLeft = 0;
+ // for (let i = 0; i < index; i++) {
+ // this.scrollLeft += 60
+ // };
+ },
+ swiperChange(e) {//视频导航
+ console.log(22,e.detail.current)
+ let index = e.detail.current
+ this.swichMenu(index);
+ this.parType=index+1;
+ this.getVideo()
+ },
+ getVideo(){
+ var that=this;
+ // 1.这里引入后端请求数据
+ var data={
+ parType:that.parType,
+ userId:uni.getStorageSync('userId'),
+ page: this.page,
+ limit:4,
+ }
+ if(that.parType=='3'){
+ data.longitude=that.longitude;
+ data.latitude=that.latitude;
+ }else{
+ data.longitude='';
+ data.latitude='';
+ }
+ this.$Request.get("/app/shipinquan/list", data).then(res => {
+ if (res.code == 0) {
+ that.swiperDateLists = res.data.list||{}
+ // this.dataList=res.data.records
+
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ }
+ });
+ },
goCity(){
var that = this
uni.chooseLocation({
@@ -1072,33 +1146,89 @@
}
});
},
- swichMenu(id) {//视频导航
- this.currentTab = id
- console.log(11,id)
- //this.tabCurrent = 'tabNum'+ id
-
- // 滑动swiper后,每个选项距离其父元素最左侧的距离
- this.scrollLeft = 0;
- for (let i = 0; i < id; i++) {
- this.scrollLeft += 60
- console.log(this.scrollLeft ,60,id)
- };
- },
- swiperChange(e) {//视频导航
- console.log(22,e.detail.current)
- let index = e.detail.current
- this.swichMenu(index)
-
- },
+
}
}
diff --git a/pages/videoCircle/index.vue b/pages/videoCircle/index.vue
index c3a5e7d..0659cf4 100644
--- a/pages/videoCircle/index.vue
+++ b/pages/videoCircle/index.vue
@@ -125,6 +125,7 @@
},
data() {
return {
+ dianzhan:0,
showPopup:false,
ccRef: null,
userInfo: {
@@ -371,8 +372,8 @@
parent_id: null,
reply_id: null,
reply_name: null,
- user_name: item.name?item.name:'盛安',
- user_avatar: item.filePath?item.filePath:'../../static/logo.png',
+ user_name: item.userName,
+ user_avatar: item.userPhoto?item.userPhoto:'../../static/logo.png',
user_content: item.content,
is_like: true,
like_count: 8,
@@ -804,11 +805,13 @@
createBy:uni.getStorageSync('userId'),
shipinquanId:this.dataList[this.k].id,
}
- this.dataList[this.k].sfdz = !this.dataList[this.k].sfdz
+ // this.dataList[this.k].sfdz = !this.dataList[this.k].sfdz
if(this.dataList[this.k].sfdz=='1'){
this.$Request.post("/app/shipinquan/addDianzan", data).then(res => {
if (res.code == 0) {
- const video = this.dataList[this.k];
+ // this.dataList[this.k].dzs += 1;
+ // this.dataList[this.k].sfdz = '0';
+ const video = this.dataList[this.k].dzs;
sss=video.dzs += 1;
} else {
this.dataList[this.k].sfdz ='0'
diff --git a/static/closeimg.png b/static/closeimg.png
new file mode 100644
index 0000000..438abac
Binary files /dev/null and b/static/closeimg.png differ