Commit 60675fc1 authored by 罗超's avatar 罗超

1

parent 00516ff3
...@@ -458,25 +458,25 @@ ...@@ -458,25 +458,25 @@
}); });
return return
} }
if(this.data.EducationType==""){ if(this.data. Marriage==""){
uni.showToast({ uni.showToast({
title: '请选择学历', title: '请选择婚姻状况',
duration: 2000, duration: 2000,
icon:"none" icon:"none"
}); });
return return
} }
console.log(this.data) console.log(this.data)
// this.request2({ this.request2({
// url: '/api/AppletMiai/GetSetMiAiBaseInfo', url: '/api/AppletMiai/GetSetMiAiBaseInfo',
// data: msg data: msg
// }, },
// res => { res => {
// if (res.resultCode == 1) { if (res.resultCode == 1) {
// console.log(res) console.log(res)
// } }
// } }
// ); );
}, },
getEnumList(){ getEnumList(){
this.request2( this.request2(
...@@ -533,6 +533,11 @@ ...@@ -533,6 +533,11 @@
success: (res) =>{ success: (res) =>{
let data= res.data.user_info let data= res.data.user_info
this.data.nickname=data.nickname this.data.nickname=data.nickname
if(data.Sex==1){
this.data.Sex="男"
}else if(data.Sex==2){
this.data.Sex="女"
}
}, },
fail:(err)=> { fail:(err)=> {
// console.log(err); // console.log(err);
......
<style> <style scoped>
/deep/.u-size-mini{
vertical-align: middle;
}
.postDetails{ .postDetails{
width: 100%; width: 100%;
height: 100vh; height: 100vh;
...@@ -320,7 +323,9 @@ ...@@ -320,7 +323,9 @@
<image style="width: 100%;height: 100%;" :src="details.ImageList[0]" mode="aspectFill"></image> <image style="width: 100%;height: 100%;" :src="details.ImageList[0]" mode="aspectFill"></image>
</view> </view>
<view class="details"> <view class="details">
<view class="details-title"><text v-if="details.Label!=null&& details.Label!='' " :style="{color:mainColor}">【{{details.Label}}</text>{{details.ActivityTitle}}</view> <view class="details-title"><u-tag :text="details.Label" mode="dark" :bg-color="mainColor" size="mini" v-if="details.Label!=null&& details.Label!=''"/>
{{details.ActivityTitle}}</view>
<view @click="fxshow=true">分享</view> <view @click="fxshow=true">分享</view>
<view class="details-info"> <view class="details-info">
<view class="details-info-l"> <view class="details-info-l">
......
<template> <template>
<view class="postbar" :style="{ height: contentHeight }"> <view class="postbar" :style="{ height: contentHeight }">
<u-tabs <u-tabs :list="list" :is-scroll="true" :current="current" @change="change" :active-color="mainColor"></u-tabs>
:list="list" <u-empty v-if="g.length == 0" text="暂无内容" mode="list"></u-empty>
:is-scroll="true"
:current="current" <view v-if="g.length > 0" style="
@change="change"
:active-color="mainColor"
></u-tabs>
<u-empty v-if="g.length == 0" text="暂无内容" mode="list"></u-empty>
<view
v-if="g.length > 0"
style="
height: calc(100vh - 50px); height: calc(100vh - 50px);
width: calc(100vw); width: calc(100vw);
overflow: hidden; overflow: hidden;
padding-bottom: 50px; padding-bottom: 50px;
" ">
> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
<scroll-view style="height: 100%;">
:scroll-y="true" <view class="details">
:enable-back-to-top="true" <view class="item" v-for="(x, i) in g" :key="i">
:enable-flex="true" <!-- 小图模式 -->
@scrolltolower="lower" <view class="item-minbox" v-if="showtype==1" @click="gopostdetails(x)">
style="height: 100%;" <view class="minbox-l">
> <text class="minbox-l-t">{{x.ActivityTitle}}</text>
<view class="details"> <view style="display: flex;align-items: center;margin-top: 20px;">
<view class="item" v-for="(x, i) in g" :key="i" > <view style="width: 30px;height: 30px;border-radius: 15px;position: relative;">
<!-- 小图模式 --> <image :src="x.Photo" style="width: 100%;height: 100%;border-radius: 15px;">
<view class="item-minbox" v-if="showtype==1" @click="gopostdetails(x)"> </image>
<view class="minbox-l"> <image class="gstyle" v-if="x.Sex==1"
<text class="minbox-l-t">{{x.ActivityTitle}}</text> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png">
<view style="display: flex;align-items: center;margin-top: 20px;"> </image>
<view style="width: 30px;height: 30px;border-radius: 15px;position: relative;"> <image class="gstyle" v-if="x.Sex==2"
<image :src="x.Photo" style="width: 100%;height: 100%;border-radius: 15px;"></image> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png">
<image class="gstyle" v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png" ></image> </image>
<image class="gstyle" v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png" ></image> </view>
</view> <view
<view style="margin-left: 5px;display: flex;flex-direction: column;height: 30px;justify-content: space-between;"> style="margin-left: 5px;display: flex;flex-direction: column;height: 30px;justify-content: space-between;">
<text style="width: calc(100vw - 75px - 310rpx);overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 12px;color: #111111;"> <text
{{x.UserName}} style="width: calc(100vw - 75px - 310rpx);overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 12px;color: #111111;">
</text> {{x.UserName}}
<view style="display: flex;align-items: center;font-size: 10px;color: #858687;"> </text>
<text>报名{{x.EnrollNum}}</text> <view style="display: flex;align-items: center;font-size: 10px;color: #858687;">
<text style="margin-left: 5px;">{{x.ReplyNum}}留言</text> <text>报名{{x.EnrollNum}}</text>
<text style="margin-left: 5px;">{{x.ReplyNum}}留言</text>
</view>
</view>
</view>
</view>
<view class="minbox-r">
<image :src="x.ImageList[0]" mode="aspectFill"
style="width: 100%;height: 100%;border-radius: 15px;"></image>
</view> </view>
</view> </view>
</view> <!-- 大图模式 -->
</view> <view v-if="showtype==2" class="maxbox" @click="gopostdetails(x)">
<view class="minbox-r"> <image :src="x.ImageList[0]" mode="aspectFill"
<image :src="x.ImageList[0]" mode="aspectFill" style="width: 100%;height: 100%;border-radius: 15px;"></image> style="width: 100%;height: 410rpx;border-radius: 15px;"></image>
</view> <view
</view> style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 32rpx;color: #111111;padding-top: 10px;">
<!-- 大图模式 --> {{x.ActivityTitle}}
<view v-if="showtype==2" class="maxbox" @click="gopostdetails(x)"> </view>
<image :src="x.ImageList[0]" mode="aspectFill" style="width: 100%;height: 410rpx;border-radius: 15px;"></image> <view class="max-b">
<view style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 16px;color: #111111;padding-top: 10px;"> <!-- <text v-if="x.Label!=null && x.Label!=''" :style="{color:mainColor}">【{{x.Label}}</text> -->
<text v-if="x.Label!=null && x.Label!=''" :style="{color:mainColor}">【{{x.Label}}</text> <view class="tagBox">
{{x.ActivityTitle}}</view> <u-tag :text="x.Label" mode="dark" :bg-color="mainColor"
<view class="max-b"> v-if="x.Label!=null && x.Label!=''" />
<view style="width: 35px;height: 35px;border-radius: 15px;position: relative;" @click.native.stop="goUserinfo(x)"> </view>
<image :src="x.Photo" style="width: 100%;height: 100%;border-radius: 15px;"></image>
<image class="gstyle" v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png" ></image> <view class="infoBox">
<image class="gstyle" v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png" ></image> <!-- 头像 -->
</view> <view style="width: 35px;height: 35px;border-radius: 15px;position: relative;"
<view style="margin-left: 10px;display: flex;flex-direction: column;height: 35px;justify-content: space-between;"> @click.native.stop="goUserinfo(x)">
<image :src="x.Photo" style="width: 100%;height: 100%;border-radius: 15px;">
</image>
<image class="gstyle" v-if="x.Sex==1"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan-b.png">
</image>
<image class="gstyle" v-if="x.Sex==2"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv-b.png">
</image>
</view>
<view style="width: 170rpx; margin-left: 20rpx;">
<view
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 24rpx;color: #111111;font-weight: 800;">
{{x.UserName}}
</view>
<text v-if="x.IsOpenEnroll==1"
style="font-size: 22rpx;font-weight: 500;color: #858687;">报名人数:{{x.EnrollNum}}</text>
</view>
</view>
<!-- <view style="margin-left: 10px;display: flex;flex-direction: column;height: 35px;justify-content: space-between;">
<text style="width: calc(100vw - 75px);overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 14px;color: #111111;"> <text style="width: calc(100vw - 75px);overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 14px;color: #111111;">
{{x.UserName}} {{x.UserName}}
</text> </text>
<view style="display: flex;align-items: center;justify-content: space-between;font-size: 11px;color: #858687;"> <view style="display: flex;align-items: center;justify-content: space-between;font-size: 11px;color: #858687;">
...@@ -77,314 +96,341 @@ ...@@ -77,314 +96,341 @@
<text v-if="x.IsOpenEnroll==1">{{x.Deadline}}截止</text> <text v-if="x.IsOpenEnroll==1">{{x.Deadline}}截止</text>
<text v-if="x.IsOpenEnroll==2">创建时间:{{x.CreateDate}}</text> <text v-if="x.IsOpenEnroll==2">创建时间:{{x.CreateDate}}</text>
</view> </view>
</view> -->
</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" />
<view style="width: 100%;height: 50px;"></view>
</scroll-view>
</view>
<view class="release" @click.stop="gopublishing()">
<!-- <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pp-fabu.png" style="width: 100%;height: 100%;"></image> -->
<!-- 发布动态按钮 -->
<view class="fbanniu">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png"
style="height: 26rpx;" mode="aspectFit"></image>
<text style="font-size: 10px;color: #FFF;">发布</text>
</view> </view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
<view style="width: 100%;height: 50px;"></view>
</scroll-view>
</view>
<view class="release" @click.stop="gopublishing()">
<!-- <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pp-fabu.png" style="width: 100%;height: 100%;"></image> -->
<!-- 发布动态按钮 -->
<view class="fbanniu">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fabupyq.png" style="height: 26rpx;" mode="aspectFit"></image>
<text style="font-size: 10px;color: #FFF;">发布</text>
</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>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<tabbar></tabbar>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
</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>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<tabbar ></tabbar>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</view>
</template> </template>
<script> <script>
import auth from "@/components/auth/index.vue"; import auth from "@/components/auth/index.vue";
import tabbar from "@/components/tabbar/index"; import tabbar from "@/components/tabbar/index";
export default { export default {
components: { components: {
auth, auth,
tabbar tabbar
}, },
data() { data() {
return { return {
pageTitle: "贴吧", pageTitle: "贴吧",
showAuth:false, showAuth: false,
u:{}, u: {},
list: [], list: [],
mainColor: "", mainColor: "",
contentHeight: 0, contentHeight: 0,
current:0, current: 0,
msg:{ msg: {
pageIndex: 1, pageIndex: 1,
pageSize:10, pageSize: 10,
ForumId:0, ForumId: 0,
ActivityTitle:'', ActivityTitle: '',
}, },
page_count: 1, page_count: 1,
g: [], g: [],
loading: false, loading: false,
status: "loadmore", status: "loadmore",
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
forumList:[], forumList: [],
showtype:2,//好像这里没配置了 直接显示的大图模式 showtype: 2, //好像这里没配置了 直接显示的大图模式
}; };
}, },
created() { created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px"; this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") let pages = wx.getStorageSync("basedata") ?
? wx.getStorageSync("basedata").bar_title wx.getStorageSync("basedata").bar_title : [];
: []; pages.forEach((x) => {
pages.forEach((x) => { if (x.value == u) {
if (x.value == u) { this.pageTitle = x.new_name ? x.new_name : x.name;
this.pageTitle = x.new_name ? x.new_name : x.name; }
} });
}); uni.setNavigationBarTitle({
uni.setNavigationBarTitle({ title: this.pageTitle,
title: this.pageTitle, });
}); },
}, onLoad: function(option) {
onLoad: function (option) { this.u = uni.getStorageSync("mall_UserInfo");
this.u = uni.getStorageSync("mall_UserInfo"); if (!this.u) {
if (!this.u) { this.u = {
this.u = { nickName: "未登录",
nickName: "未登录", avatarUrl: ""
avatarUrl: "" };
}; // this.showAuth = true;
// this.showAuth = true; } else {
} else{
}
this.GetForumList()
},
methods: {
change(index) {
this.msg.ForumId = this.forumList[index].Id;
this.current = index;
this.msg.pageIndex = 1;
this.g = [];
this.loading = true;
this.init();
},
Children(Id){//发布成功了返回刷新列表
this.msg.ForumId = Id
this.forumList.forEach((x,y)=>{
if(x.Id == Id){
this.current = y
} }
}) this.GetForumList()
this.msg.pageIndex = 1;
this.g = []; },
this.loading = true; methods: {
this.init(); change(index) {
}, this.msg.ForumId = this.forumList[index].Id;
GetForumList(){ this.current = index;
this.request2( this.msg.pageIndex = 1;
{ this.g = [];
url: '/api/AppletMiai/GetForumList', this.loading = true;
data: {} this.init();
}, },
res => { Children(Id) { //发布成功了返回刷新列表
if(res.resultCode==1){ this.msg.ForumId = Id
this.forumList = res.data this.forumList.forEach((x, y) => {
this.list =[] if (x.Id == Id) {
res.data.forEach(x=>{ this.current = y
let obj ={name:x.Name} }
this.list.push(obj) })
}) this.msg.pageIndex = 1;
this.msg.ForumId = this.forumList[0].Id; this.g = [];
this.loading = true;
this.init();
},
GetForumList() {
this.request2({
url: '/api/AppletMiai/GetForumList',
data: {}
},
res => {
if (res.resultCode == 1) {
this.forumList = res.data
this.list = []
res.data.forEach(x => {
let obj = {
name: x.Name
}
this.list.push(obj)
})
this.msg.ForumId = this.forumList[0].Id;
this.init();
}
}
);
},
init() {
this.request2({
url: '/api/AppletMiai/GetActivityPageList',
data: this.msg
},
res => {
this.loading = false;
if (res.resultCode == 1) {
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(); this.init();
} else {
this.status = "nomore";
} }
} },
); gopublishing() { //发帖
}, this.u = uni.getStorageSync("mall_UserInfo");
init() { if (!this.u) {
this.u = {
this.request2( nickName: "未登录",
{ avatarUrl: ""
url: '/api/AppletMiai/GetActivityPageList', };
data: this.msg this.showAuth = true;
}, } else {
res => { uni.navigateTo({
this.loading = false; url: '/pages/blindDate/postPublishing?ForumId=' + this.msg.ForumId
if(res.resultCode==1){ })
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";
}
},
gopublishing(){//发帖
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
uni.navigateTo({
url: '/pages/blindDate/postPublishing?ForumId='+this.msg.ForumId
})
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.GetForumList();
},
//关闭登录窗口
gbAuth(){
this.showAuth = false;
},
gopostdetails(x){//招募贴的
uni.navigateTo({
url: '/pages/blindDate/postDetails?Id='+x.Id
})
},
goUserinfo(x){//用户信息
uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId='+ x.UserId
});
innerAudioContext.stop();
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.GetForumList();
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
gopostdetails(x) { //招募贴的
uni.navigateTo({
url: '/pages/blindDate/postDetails?Id=' + x.Id
})
},
goUserinfo(x) { //用户信息
uni.navigateTo({
url: '/pages/blindDate/persondetails?UserId=' + x.UserId
});
innerAudioContext.stop();
}
},
}; },
};
</script> </script>
<style> <style>
.postbar { .postbar {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #FFF; background: #FFF;
position: relative; position: relative;
font-family: aa; font-family: aa;
} }
.postbar .loading { .postbar .loading {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
background: #000000; background: #000000;
opacity: 0.7; opacity: 0.7;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: fixed; position: fixed;
left: 50%; left: 50%;
top: 30%; top: 30%;
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
.postbar .details{
padding:0 15px; .postbar .details {
display: flex; padding: 0 15px;
flex-direction: column; display: flex;
flex-direction: column;
}
.postbar .release{ }
width: 120rpx;
height: 120rpx; .postbar .release {
width: 120rpx;
position: fixed; height: 120rpx;
right: 15px;
bottom: 120px; position: fixed;
right: 15px;
} bottom: 120px;
.item-minbox{
display: flex; }
flex-direction: row;
align-items: center; .item-minbox {
justify-content: space-between; display: flex;
width: 100%; flex-direction: row;
height: 94px; align-items: center;
margin: 15px 0; justify-content: space-between;
width: 100%;
} height: 94px;
.item-minbox .minbox-l{ margin: 15px 0;
width: calc(100vw - 40px - 310rpx);
height: 94px; }
display: flex;
flex-direction: column; .item-minbox .minbox-l {
width: calc(100vw - 40px - 310rpx);
height: 94px;
} display: flex;
.item-minbox .minbox-l-t{ flex-direction: column;
font-size: 15px;
color: #111111;
width: 100%; }
overflow: hidden;
text-overflow: ellipsis; .item-minbox .minbox-l-t {
display: -webkit-box; font-size: 15px;
-webkit-line-clamp: 2; color: #111111;
-webkit-box-orient: vertical; width: 100%;
} overflow: hidden;
.postbar .gstyle{ text-overflow: ellipsis;
position: absolute;right: 0;bottom: 0; display: -webkit-box;
width: 13px; -webkit-line-clamp: 2;
height: 13px; -webkit-box-orient: vertical;
} }
.postbar .minbox-r{
width: 310rpx; .postbar .gstyle {
height: 94px; position: absolute;
border-radius: 15px; right: 0;
} bottom: 0;
.postbar .maxbox{ width: 13px;
width: 100%; height: 13px;
margin-top: 20px; }
}
.postbar .max-b{ .postbar .minbox-r {
width: 100%; width: 310rpx;
height: 35px; height: 94px;
display: flex; border-radius: 15px;
align-items: center; }
margin-top: 10px;
} .postbar .maxbox {
.fbanniu{ width: 100%;
margin-top: 20px;
}
.postbar .max-b {
width: 100%;
height: 35px;
/* display: flex;
justify-content: space-between;
align-items: center; */
position: relative;
margin-top: 10px;
}
/* 活动标签 */
.tagBox {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
}
/* 活动信息 */
.infoBox {
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
}
.fbanniu {
width: 42px; width: 42px;
height: 42px; height: 42px;
border-radius: 21px; border-radius: 21px;
......
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