Commit 5e9bbfe8 authored by Mac's avatar Mac

新增我的招募贴

parent 63017bcf
......@@ -576,6 +576,8 @@
"path":"personal/mysignupList"//我的报名列表
},{
"path":"baomingList"//招募贴查看报名列表
},{
"path":"personal/myrecruitstick"//我的招募贴
}]
},
//韩国馆项目 { "root": "pages/kotra", "pages": [{ "path": "contanctus" },{ "path": "contanctDetail" },{ "path": "compInformation" },{
......
<template>
<view class="myrecruitstick" :style="{ height: contentHeight }">
<u-empty v-if="g.length == 0" text="暂无数据" mode="list"></u-empty>
<view
v-if="g.length > 0"
style="
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="details">
<view class="item" v-for="(x, i) in g" :key="i" @click="godetails(x)">
<view class="item-l">
<view style="font-size: 13px;color: #111;">{{x.CreateDate.split(' ')[0].split('-')[2]}}</view>
<view style="font-size: 12px;color: #444;">{{x.CreateDate.split(' ')[0].split('-')[1]}}</view>
</view>
<view style="width: calc(100vw - 30px - 40px);">
<view style="display: flex;align-items: center;justify-content: space-between;width: 100%;">
<view style="font-size: 10px;color: #B2B2B2;">{{x.ForumName}}</view>
<u-icon name="delete" :size="35" color="111" @click.native.stop='cancel(x,i)'></u-icon>
</view>
<view style="font-size: 14px;color: #111111;line-height: 18px;margin-top: 5px;">
{{x.ActivityTitle}}
</view>
<view style="display: flex;align-items: center;margin-top: 10px;" >
<view v-for="(item, index) in x.ImageList" v-if="index<3" :key="index" @click.native.stop="previewImage(index,x.ImageList)" style="width: calc((100vw - 30px - 40px - 10px) /3 );height: calc((100vw - 30px - 40px - 10px) /3 );margin-right: 5px;position: relative;">
<image :src="item" mode="aspectFill" style="width: 100%;height: 100%;"></image>
<view v-if="index==2 &&x.ImageList.length>3" style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;background: rgba(1, 1, 1, 0.2);"></view>
<view v-if="index==2 &&x.ImageList.length>3" style="font-size: 11px;color: #FFF;position: absolute;bottom: 5px;right: 5px;">
+{{x.ImageList.length-3}}
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
<u-modal v-model="show" content="是否删除此贴?" :show-cancel-button='true' @confirm='queren'></u-modal>
</view>
</template>
<script>
import auth from "@/components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
pageTitle: "报名列表",
showAuth:false,
u:{},
show:false,
current:0,
list: [
{ name: "不限" },
{ name: "正常" },
{ name: "取消" },
],
mainColor: "",
contentHeight: 0,
msg:{
pageIndex: 1,
pageSize:10,
ForumId:0,
UserId:0,
},
page_count: 1,
g: [],
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
bmobj:{}
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad: function (option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.msg.UserId = this.u.UserId
this.init();
}
},
methods: {
init() {
this.request2(
{
url: '/api/AppletMiai/GetActivityPageList',
data: this.msg
},
res => {
if(res.resultCode==1){
this.loading = false;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init();
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
cancel(x,i){
this.bmobj={
EnrollId:x.Id,
index:i
}
this.show=true
},
//图片预览
previewImage(index, images) {
uni.previewImage({
urls: images,
current: index,
});
},
queren(){
this.request2(
{
url: '/api/AppletMiai/DelActivityInfo',
data: {ActivityId:this.bmobj.EnrollId}
},
res => {
if(res.resultCode==1){
uni.showToast({
title: '删除成功',
icon: 'success',
})
this.g.splice(this.bmobj.index,1)
}
}
);
},
godetails(x){
uni.navigateTo({
url: '/pages/blindDate/postDetails?Id='+x.Id
})
}
},
};
</script>
<style>
.myrecruitstick {
width: 100%;
height: 100%;
background: #FFF;
position: relative;
}
.myrecruitstick .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.myrecruitstick .details{
display: flex;
flex-direction: column;
}
.myrecruitstick .item{
padding: 15px;
display: flex;
align-items: flex-start;
}
.myrecruitstick .item-l{
width: 40px;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 4px;
}
</style>
......@@ -409,7 +409,7 @@
暂无活动
</view>
</view>
<view class="btn2" v-if="showreply==true">
<view class="btn2" v-if="showreply==true" :style="{bottom:oneheight+'px'}">
<view class="btn2-l">
<view style="font-size: 11px;color: #B2B2B2;">
回复{{ParentName}}
......@@ -419,10 +419,12 @@
style="height: 100px;width: 100%;"
placeholder="聊两句~"
v-model="sendMsg.Content"
:adjust-position='false'
maxlength='2000'
:focus='showreply'
confirm-type='send'
@blur='initialize()'
@focus='getfocus'
/>
</view>
</view>
......@@ -585,6 +587,7 @@
index:0,
type:1,
},
oneheight:0,
}
},
created() {
......@@ -759,6 +762,7 @@
this.ParentName='';
this.showreply = false
this.showreply2 = false
this.oneheight = 0
},
replyone(x,type=1){
this.sendMsg.ParentId = x.Id;
......@@ -897,6 +901,18 @@
}
);
},
getfocus(){
setTimeout(()=>{
uni.onKeyboardHeightChange(res => {
console.log(res.height,'高度')
if(res.height!=0){
this.oneheight=res.height-1;
this.$forceUpdate()
}
})
},10)
}
}
......
......@@ -136,7 +136,7 @@ export default {
nomore: "没有更多了",
},
forumList:[],
showtype:2,
showtype:1,
};
},
created() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment