Commit af1387b2 authored by 罗超's avatar 罗超

1

parent 2252d965
<template>
<view class="">
<u-tabs :list="dataObj.catList" :current="current" :active-color="mainColor" @change="change" style="margin-bottom:30rpx;"></u-tabs>
<view class="con" v-if="dataObj.listStyle==5">
<u-tabs
:list="dataObj.catList"
:current="current"
:active-color="mainColor"
@change="change"
style="margin-bottom: 30rpx"
></u-tabs>
<view class="con" v-if="dataObj.listStyle == 5">
<view class="left">
<view v-for="(item,index) in curDataObj.goodsList" :key="index" v-if="index%2==0" class="left-item" @click="jumpPage(item)">
<view
v-for="(item, index) in curDataObj.goodsList"
:key="index"
v-if="index % 2 == 0"
class="left-item"
@click="jumpPage(item)"
>
<image :src="item.picUrl" class="item-img" mode="widthFix"></image>
<view class="flex between CreateByInfo">
<view class="flex CreateByName" @click="jumpPagePerson(item)">
<image :src="item.CreateByIco" class="item-headimg" mode="aspectFill"></image>
{{item.CreateBy}}
<image
:src="item.CreateByIco"
class="item-headimg"
mode="aspectFill"
></image>
{{ item.CreateBy }}
</view>
<view class="flex zanNum">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg" mode="aspectFill"></image>{{item.DianZanNum}}
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg"
mode="aspectFill"
></image
>{{ item.DianZanNum }}
</view>
</view>
</view>
</view>
<view class="right">
<view v-for="(item,index) in curDataObj.goodsList" :key="index" v-if="index%2==1" class="left-item" >
<image :src="item.picUrl" class="item-img" mode="widthFix" @click="jumpPage(item)"></image>
<view
v-for="(item, index) in curDataObj.goodsList"
:key="index"
v-if="index % 2 == 1"
class="left-item"
>
<image
:src="item.picUrl"
class="item-img"
mode="widthFix"
@click="jumpPage(item)"
></image>
<view class="flex between CreateByInfo">
<view class="flex CreateByName" @click="jumpPagePerson(item)">
<image :src="item.CreateByIco" class="item-headimg" mode="aspectFill"></image>
{{item.CreateBy}}
<image
:src="item.CreateByIco"
class="item-headimg"
mode="aspectFill"
></image>
{{ item.CreateBy }}
</view>
<view class="flex zanNum">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg" mode="aspectFill"></image>{{item.DianZanNum}}
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg"
mode="aspectFill"
></image
>{{ item.DianZanNum }}
</view>
</view>
</view>
</view>
</view>
<view class="con2" v-if="dataObj.listStyle==-1">
<view class="con2" v-if="dataObj.listStyle == -1">
<view class="list">
<view v-for="(item,index) in curDataObj.goodsList" :key="index" class="list-item" >
<image :src="item.picUrl" class="list-item-img" mode="widthFix" @click="jumpPage(item)"></image>
<view
v-for="(item, index) in curDataObj.goodsList"
:key="index"
class="list-item"
>
<image
:src="item.picUrl"
class="list-item-img"
mode="widthFix"
@click="jumpPage(item)"
></image>
<view class="flex between CreateByInfo">
<view class="flex CreateByName" @click="jumpPagePerson(item)">
<image :src="item.CreateByIco" class="item-headimg" mode="aspectFill"></image>
{{item.CreateBy}}
<image
:src="item.CreateByIco"
class="item-headimg"
mode="aspectFill"
></image>
{{ item.CreateBy }}
</view>
<view class="flex zanNum">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg" mode="aspectFill"></image>{{item.DianZanNum}}
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/weizan.png"
class="item-zanimg"
mode="aspectFill"
></image
>{{ item.DianZanNum }}
</view>
</view>
</view>
</view>
</view>
<view class="choosetype">
<view
class="choosetype"
:style="{ background: mainColor }"
v-if="isShowFabu"
>
<view class="fabutiezi" @click="jumpfabu(1)">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/tiezifabu.png"
mode=""
class="img"
/>
发布帖子
</view>
<view class="fabuhuodong" @click="jumpfabu(2)">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/huodongfabu.png"
mode=""
class="img"
/>
发布活动
</view>
</view>
<view class="fabuBtn" @click="jumpfabu">
<view
class="fabuBtn"
@click="toggleFabu"
:style="{ background: mainColor }"
>
发布
</view>
</view>
</template>
<script>
export default {
export default {
props: ["dataObj"],
data() {
return {
current: 0,
mainColor: "",
curDataObj: {}
}
},
computed: {
curDataObj: {},
isShowFabu: false,
};
},
computed: {},
methods: {
change(e) {
this.current = e
this.current = e;
this.dataObj.catList.map((item, index) => {
if (index === e) {
this.curDataObj = JSON.parse(JSON.stringify(item))
return
this.curDataObj = JSON.parse(JSON.stringify(item));
return;
}
})
});
},
jumpPage(item){
jumpPage(item) {
uni.navigateTo({
url:"/pages/blindDate/postDetails?Id="+item.id
})
url: "/pages/blindDate/postDetails?Id=" + item.id,
});
},
jumpPagePerson(item){
jumpPagePerson(item) {
uni.navigateTo({
url:"/pages/blindDate/persondetails?UserId="+item.CreateById
})
url: "/pages/blindDate/persondetails?UserId=" + item.CreateById,
});
},
jumpfabu(){
toggleFabu() {
this.isShowFabu = !this.isShowFabu;
},
jumpfabu(type) {
if (type === 1) {
uni.navigateTo({
url: "/pages/blindDate/releasePosts",
});
} else {
uni.navigateTo({
url:"/pages/blindDate/releasePosts"
})
url: "/pages/blindDate/postPublishing",
});
}
},
},
mounted() {
this.mainColor = this.$uiConfig.mainColor;
console.log(29, this.dataObj)
console.log(29, this.dataObj);
this.dataObj.catList.map((item, index) => {
if (index === this.current) {
this.curDataObj = JSON.parse(JSON.stringify(item))
return
}
})
}
this.curDataObj = JSON.parse(JSON.stringify(item));
return;
}
});
},
};
</script>
<style lang="scss">
.flex {
.flex {
display: flex;
align-items: center;
}
}
.between {
.between {
justify-content: space-between;
}
}
.con {
.con {
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding-bottom: 90rpx;
padding: 30rpx;
background-color: #EAEBEC;
}
.CreateByInfo{
background-color: #eaebec;
}
.CreateByInfo {
background-color: #fff;
height: 90rpx;
box-sizing: border-box;
padding: 0 30rpx;
}
.CreateByName,
.zanNum {
}
.CreateByName,
.zanNum {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
}
.item-img {
.item-img {
width: 100%;
height: auto;
}
}
.item-headimg {
.item-headimg {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
margin-right: 10rpx;
}
}
.item-zanimg {
.item-zanimg {
width: 26rpx;
height: 28rpx;
border-radius: 50%;
margin-right: 10rpx;
}
}
.left,.right {
.left,
.right {
width: 330rpx;
.left-item {
......@@ -176,44 +260,63 @@
border-radius: 30rpx;
overflow: hidden;
}
}
// -----------列表模式样式-----------
.con2{
}
// -----------列表模式样式-----------
.con2 {
box-sizing: border-box;
padding-bottom: 90rpx;
padding: 30rpx;
background-color: #EAEBEC;
}
.list-item{
background-color: #eaebec;
}
.list-item {
width: 100%;
margin-bottom: 30rpx;
border-radius: 30rpx;
overflow: hidden;
}
.list-item-img{
}
.list-item-img {
width: 100%;
}
.choosetype{
}
.choosetype {
position: fixed;
right: 30rpx;
bottom: 190rpx;
bottom: 240rpx;
width: 480rpx;
height: 100rpx;
// background-color: #00c6c1;
border-radius: 50rpx;
display: flex;
align-items: center;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
.fabutiezi,
.fabuhuodong {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
.img {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.fabuBtn{
}
}
.fabuBtn {
position: fixed;
right: 30rpx;
bottom: 130rpx;
width: 100rpx;
height: 100rpx;
background-color: #00C6C1;
// background-color: #00c6c1;
border-radius: 50%;
text-align: center;
line-height: 99rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
color: #ffffff;
}
</style>
......@@ -14,7 +14,7 @@
>
</view>
<view class="imgBox" v-if="item.type == 1" style="display: none">
<view class="imgBox" v-if="item.type == 1">
<view class="left">
<!-- 大照片 -->
<view
......@@ -448,11 +448,11 @@ export default {
pageTitle: "编辑个人主页",
mainColor: "",
dataList: [
// {
// name:"相册",
// data:{},
// type:1
// },
{
name: "相册",
data: {},
type: 1,
},
{
name: "基础资料",
tip: "基本资料(实名认证通过后,部分资料无法修改)",
......@@ -550,106 +550,106 @@ export default {
],
type: 2,
},
// {
// name: "详细资料",
// tip: "",
// data: {},
// //subType:1输入框,2选择框
// type: 2,
// childDataList: [
// {
// name: "学历",
// field: "EducationTypeStr",
// placehloder: "请选择学历",
// subType: 2,
// array: [],
// mode: "selector",
// disabled: false,
// must: true,
// },
// {
// name: "房屋",
// field: "HouseInfoStr",
// placehloder: "请选择房屋情况",
// subType: 2,
// array: [],
// mode: "selector",
// disabled: false,
// must: true,
// },
// {
// name: "车辆",
// field: "CarInfoStr",
// placehloder: "请选择车辆情况",
// subType: 2,
// array: [],
// mode: "selector",
// disabled: false,
// must: true,
// },
// {
// name: "年收入",
// field: "YearMoney",
// placehloder: "请填写年收入",
// subType: 1,
// unit: "万",
// showType: "number",
// disabled: false,
// must: true,
// },
// {
// name: "毕业院校",
// field: "SchoolInfo",
// placehloder: "请填写毕业院校",
// subType: 1,
// showType: "text",
// disabled: false,
// },
// {
// name: "工作单位",
// field: "WorkUnit",
// placehloder: "请填写工作单位",
// subType: 1,
// showType: "text",
// disabled: false,
// },
// {
// name: "职位",
// field: "Job",
// placehloder: "请填写职位",
// subType: 1,
// showType: "text",
// disabled: false,
// },
// ],
// },
// {
// name: "联系方式",
// tip: "",
// data: {},
// //subType:1输入框,2选择框
// type: 2,
// childDataList: [
// {
// name: "微信号",
// field: "WechatNo",
// placehloder: "请输入微信号",
// subType: 1,
// showType: "text",
// disabled: false,
// must: true,
// },
// {
// name: "手机号码",
// field: "Moblie",
// placehloder: "请输入手机号码",
// subType: 1,
// showType: "number",
// disabled: false,
// must: true,
// },
// ],
// },
{
name: "详细资料",
tip: "",
data: {},
//subType:1输入框,2选择框
type: 2,
childDataList: [
{
name: "学历",
field: "EducationTypeStr",
placehloder: "请选择学历",
subType: 2,
array: [],
mode: "selector",
disabled: false,
must: true,
},
{
name: "房屋",
field: "HouseInfoStr",
placehloder: "请选择房屋情况",
subType: 2,
array: [],
mode: "selector",
disabled: false,
must: true,
},
{
name: "车辆",
field: "CarInfoStr",
placehloder: "请选择车辆情况",
subType: 2,
array: [],
mode: "selector",
disabled: false,
must: true,
},
{
name: "年收入",
field: "YearMoney",
placehloder: "请填写年收入",
subType: 1,
unit: "万",
showType: "number",
disabled: false,
must: true,
},
{
name: "毕业院校",
field: "SchoolInfo",
placehloder: "请填写毕业院校",
subType: 1,
showType: "text",
disabled: false,
},
{
name: "工作单位",
field: "WorkUnit",
placehloder: "请填写工作单位",
subType: 1,
showType: "text",
disabled: false,
},
{
name: "职位",
field: "Job",
placehloder: "请填写职位",
subType: 1,
showType: "text",
disabled: false,
},
],
},
{
name: "联系方式",
tip: "",
data: {},
//subType:1输入框,2选择框
type: 2,
childDataList: [
{
name: "微信号",
field: "WechatNo",
placehloder: "请输入微信号",
subType: 1,
showType: "text",
disabled: false,
must: true,
},
{
name: "手机号码",
field: "Moblie",
placehloder: "请输入手机号码",
subType: 1,
showType: "number",
disabled: false,
must: true,
},
],
},
],
dataList_t: [
{
......@@ -1099,24 +1099,24 @@ export default {
},
getEnumList() {
//学历
// this.request2(
// {
// url: "/api/AppletMiai/GetEducationTypeEnumList",
// data: {},
// },
// (res) => {
// if (res.resultCode == 1) {
// if (res.data.length > 0) {
// this.dataList[2].childDataList.map((x) => {
// if (x.name == "学历") {
// x.array = res.data;
// return;
// }
// });
// }
// }
// }
// );
this.request2(
{
url: "/api/AppletMiai/GetEducationTypeEnumList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
if (res.data.length > 0) {
this.dataList[2].childDataList.map((x) => {
if (x.name == "学历") {
x.array = res.data;
return;
}
});
}
}
}
);
},
getMarriage() {
this.request2(
......@@ -1127,7 +1127,7 @@ export default {
(res) => {
if (res.resultCode == 1) {
if (res.data.length > 0) {
this.dataList[0].childDataList.map((x) => {
this.dataList[1].childDataList.map((x) => {
if (x.name == "婚姻") {
x.array = res.data;
return;
......@@ -1139,44 +1139,44 @@ export default {
);
},
GetHouseList() {
// this.request2(
// {
// url: "/api/AppletMiai/GetHouseInfoEnumList",
// data: {},
// },
// (res) => {
// if (res.resultCode == 1) {
// if (res.data.length > 0) {
// this.dataList[2].childDataList.map((x) => {
// if (x.name == "房屋") {
// x.array = res.data;
// return;
// }
// });
// }
// }
// }
// );
this.request2(
{
url: "/api/AppletMiai/GetHouseInfoEnumList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
if (res.data.length > 0) {
this.dataList[2].childDataList.map((x) => {
if (x.name == "房屋") {
x.array = res.data;
return;
}
});
}
}
}
);
},
GetCarList() {
// this.request2(
// {
// url: "/api/AppletMiai/GetCarInfoEnumList",
// data: {},
// },
// (res) => {
// if (res.resultCode == 1) {
// if (res.data.length > 0) {
// this.dataList[2].childDataList.map((x) => {
// if (x.name == "车辆") {
// x.array = res.data;
// return;
// }
// });
// }
// }
// }
// );
this.request2(
{
url: "/api/AppletMiai/GetCarInfoEnumList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
if (res.data.length > 0) {
this.dataList[2].childDataList.map((x) => {
if (x.name == "车辆") {
x.array = res.data;
return;
}
});
}
}
}
);
},
//获取个人资料
......@@ -1221,7 +1221,7 @@ export default {
this.data.SexStr = "女";
} else {
this.data.SexStr = "";
this.dataList[0].childDataList.map((x) => {
this.dataList[1].childDataList.map((x) => {
if (x.name == "性别") {
x.disabled = false;
return;
......@@ -1229,7 +1229,7 @@ export default {
});
}
if (this.data.RealName && this.data.RealName != "") {
this.dataList[0].childDataList.map((x) => {
this.dataList[1].childDataList.map((x) => {
if (x.field == "Birthday") {
x.disabled = true;
return;
......
<style lang="scss" scoped>
.newpersondetails{
.newpersondetails {
width: 100%;
height: 100%;
min-height: 100vh;
background: #f5f5f5;
font-family: aa;
.box{
.box {
width: 100%;
height: 100%;
padding: 15px;
.box-jc-t-r{
.box-jc-t-r {
width: 60px;
height: 25px;
view{
view {
border-radius: 12px;
font-size: 13px;
color: #FFF;
color: #fff;
text-align: center;
line-height: 25px;
}
}
.box-photo{
.box-photo {
width: 100%;
height: 480rpx;
overflow: hidden;
border-radius: 6px;
margin-bottom: 15px;
}
.box-jc{
.box-jc {
width: 100%;
padding: 15px;
border-radius: 6px;
margin-bottom: 15px;
box-shadow: 0px 3px 6px 0px rgba(139, 115, 64, 0.16);
background: #FFFFFF;
.box-jc-top{
background: #ffffff;
.box-jc-top {
width: 100%;
display: flex;
padding: 9px 0;
align-items: flex-start;
justify-content: space-between;
border-bottom: 1px solid #E2E2E2;
.box-jc-t-l{
border-bottom: 1px solid #e2e2e2;
.box-jc-t-l {
width: calc(100vw - 30px - 75px);
display: flex;
flex-wrap: wrap;
}
}
.box-jc-c{
.box-jc-c {
width: 100%;
padding:10px 0 0;
.box-jc-c-t{
padding: 10px 0 0;
.box-jc-c-t {
width: 100%;
display: flex;
align-items: center;
font-size: 12px;
color: #111;
.box-jc-c-t-i{
.box-jc-c-t-i {
width: 50%;
display: flex;
align-items: center;
margin-bottom: 8px;
image{
image {
width: 26rpx;
height: 26rpx;
margin-right: 4px;
......@@ -71,17 +69,17 @@
}
}
}
.box-jc-c-item{
.box-jc-c-item {
display: flex;
flex-wrap: wrap;
font-size: 12px;
color: #111111;
.box-jc-c-item-i{
.box-jc-c-item-i {
display: flex;
align-items: center;
margin-bottom: 8px;
margin-right: 10px;
image{
image {
width: 26rpx;
height: 26rpx;
margin-right: 4px;
......@@ -89,25 +87,27 @@
}
}
}
.box-sf,.box-grdt{
.box-sf,
.box-grdt {
width: 100%;
padding: 15px;
border-radius: 6px;
margin-bottom: 15px;
box-shadow: 0px 3px 6px 0px rgba(139, 115, 64, 0.16);
background: #FFFFFF;
background: #ffffff;
}
.box-sf-item{
.box-sf-item {
width: 33%;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
}
.box-grdt-i-box{
display: inline-block;margin-top: 15px;
.box-grdt-i-box {
display: inline-block;
margin-top: 15px;
}
.box-grdt-i-t{
.box-grdt-i-t {
padding: 0 20rpx;
height: 45rpx;
border-radius: 22.5rpx;
......@@ -115,23 +115,20 @@
align-items: center;
font-size: 11px;
background: rgba(0, 198, 193, 0.2);
}
.box-grdt-i-ty{
.box-grdt-i-ty {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
}
.box-grdt-i-c{
.box-grdt-i-c {
width: 100%;
font-size: 12px;
color: #111111;
margin-top: 10px;
line-height: 21px;
}
.box-grdt-i-c-w{
.box-grdt-i-c-w {
width: 100%;
height: 35px;
display: flex;
......@@ -139,19 +136,20 @@
color: #999999;
}
.box-c-item{
.box-c-item {
border-radius: 4px;
}
.ftBox-right-text{
.ftBox-right-text {
width: 100%;
height: 100%;border-radius: 4px;
height: 100%;
border-radius: 4px;
overflow: hidden;
background: #F5F5F5;
background: #f5f5f5;
font-size: 14px;
color: #333333;
}
}
.boxfixed{
.boxfixed {
width: 100%;
height: 88rpx;
position: fixed;
......@@ -160,14 +158,14 @@
align-items: center;
justify-content: center;
}
.xboxfixed{
.xboxfixed {
width: 558rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.xboxfixed-item{
.xboxfixed-item {
width: 260rpx;
height: 88rpx;
border-radius: 44rpx;
......@@ -175,24 +173,23 @@
align-items: center;
justify-content: center;
font-size: 15px;
color: #FFFFFF;
color: #ffffff;
position: relative;
button{
button {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0
}
opacity: 0;
}
}
}
</style>
<template>
<view class="newpersondetails">
<view class="box">
<view class="box-photo">
<!-- <view class="box-photo">
<u-swiper
:list="dataList.imgs"
:effect3d="swipers.style == 2"
......@@ -202,7 +199,7 @@
name='url'
@click="previewphoto"
></u-swiper>
</view>
</view> -->
<view class="box-jc">
<view class="box-jc-top">
<view class="box-jc-t-l">
......@@ -275,7 +272,7 @@
</view>
</view>
<!-- 身份认证 -->
<view class="box-sf">
<!-- <view class="box-sf">
<text style="font-size: 13px;font-weight: bold;">身份认证</text>
<view class="box-sf-item" @click="gosfzrenz" v-if="dataList.IsAttestation!=1">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pd-sfr-n.png" style="width: 50px;height: 50px;margin-bottom: 5px;"></image>
......@@ -285,7 +282,7 @@
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pd-sfr.png" style="width: 50px;height: 50px;margin-bottom: 5px;"></image>
已认证
</view>
</view>
</view> -->
<!-- 个人动态 -->
<view class="box-grdt" @click="dynamicList.length>0?gogerendongtai():''">
<view style="display: flex;align-items: center;justify-content: space-between;width: 100%;">
......@@ -326,7 +323,7 @@
</view>
</view>
<!-- 关于我 -->
<view class="box-grdt" style="margin-bottom: 100px;">
<!-- <view class="box-grdt" style="margin-bottom: 100px;">
<view style="display: flex;align-items: center;justify-content: space-between;">
<text style="font-size: 13px;font-weight: bold;">关于我</text>
<view class="box-jc-t-r" @click="goedit(2)" v-if="mall_UserInfo.UserId == dataList.Id">
......@@ -392,10 +389,10 @@
<text v-if="dataList.HopeYou!=''">{{dataList.HopeYou}}</text>
<view v-else class="box-grdt-i-c-w">暂无</view>
</view>
</view>
</view> -->
<!-- TODO字段不确定 -->
<view>
<!-- <view>
<view class="box-grdt-i-box" >
<span class="box-grdt-i-t">
<view class="box-grdt-i-ty" :style="{background:mainColor}"></view>
......@@ -442,7 +439,7 @@
<text v-if="dataList.IdealLove!=''">{{dataList.IdealLove}}</text>
<view v-else class="box-grdt-i-c-w">暂无</view>
</view>
</view>
</view> -->
......@@ -467,120 +464,142 @@
</template>
<script>
export default{
data(){
return{
pageTitle: '个人详情',
mainColor:'',
dataList:{},
Jumptype:0,
UserId:0,
isShowBtn:true, //跳过来不显示编辑按钮
path:"",
mall_UserInfo:null,
count:0,
dynamicList:[],
pjwidth:0
}
export default {
data() {
return {
pageTitle: "个人详情",
mainColor: "",
dataList: {},
Jumptype: 0,
UserId: 0,
isShowBtn: true, //跳过来不显示编辑按钮
path: "",
mall_UserInfo: null,
count: 0,
dynamicList: [],
pjwidth: 0,
};
},
created(){
created() {
this.mainColor = this.$uiConfig.mainColor;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo"):null;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo")
: null;
},
onShareAppMessage(res) {
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
if(uid==0){
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0
if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
}
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0;
}
let Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
let Up = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserPageType
: 0;
return {
title:'个人资料',
path: "/pages/index/index?id=" + this.UserId + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + Up+'&JumpType=13',
imageUrl:'',
title: "个人资料",
path:
"/pages/index/index?id=" +
this.UserId +
"&user_id=" +
uid +
"&SmallShopId=" +
SmallShopId +
"&Up=" +
Up +
"&JumpType=13",
imageUrl: "",
};
},
onLoad(options) {
if(options && options.UserId){
this.UserId = options.UserId
this.init()
if(this.UserId!=this.mall_UserInfo.UserId){
this.isShowBtn=false;
}else{
this.isShowBtn=true;
if (options && options.UserId) {
this.UserId = options.UserId;
this.init();
if (this.UserId != this.mall_UserInfo.UserId) {
this.isShowBtn = false;
} else {
this.isShowBtn = true;
}
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
let Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
this.path = '/pages/index/index?id=' + options.UserId + "&user_id=" + uid+ "&Up=" + Up+'&JumpType=11';
this.getMyDynamicList()
}
if(options && options.Jumptype){//判断跳到个人中心
this.Jumptype = options.Jumptype
let Up = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserPageType
: 0;
this.path =
"/pages/index/index?id=" +
options.UserId +
"&user_id=" +
uid +
"&Up=" +
Up +
"&JumpType=11";
this.getMyDynamicList();
}
if (options && options.Jumptype) {
//判断跳到个人中心
this.Jumptype = options.Jumptype;
}
uni.setNavigationBarTitle({
title: this.pageTitle
title: this.pageTitle,
});
let windowWidth = this.$utils.SystemInfo().windowWidth;
this.pjwidth = (windowWidth - 60 - 30)/4+'px'
this.pjwidth = (windowWidth - 60 - 30) / 4 + "px";
},
onShow() {
this.init()
this.init();
},
onUnload() {
// 页面关闭后销毁实例
if(this.Jumptype==1){
if (this.Jumptype == 1) {
uni.reLaunch({
url:"/pages/user-center/user-center"
})
url: "/pages/user-center/user-center",
});
}
},
methods:{
methods: {
init() {
this.request2(
{
url: '/api/AppletMiai/GetMiAiBaseIfo',
data: {UserId:this.UserId}
url: "/api/AppletMiai/GetMiAiBaseIfo",
data: { UserId: this.UserId },
},
res => {
if(res.resultCode==1){
(res) => {
if (res.resultCode == 1) {
this.dataList = res.data;
this.dataList.imgs = []
this.dataList.AlbumList.map(x=>{
this.dataList.imgs = [];
this.dataList.AlbumList.map((x) => {
let obj = {
url:x
}
this.dataList.imgs.push(obj)
})
url: x,
};
this.dataList.imgs.push(obj);
});
}
}
);
},
getMyDynamicList(){
this.request2({
url: '/api/AppletSchool/GetMiAiDynamicList',
data: {pageIndex: 1,
getMyDynamicList() {
this.request2(
{
url: "/api/AppletSchool/GetMiAiDynamicList",
data: {
pageIndex: 1,
pageSize: 4,
UserTeacher: 0,
CreateBy: this.UserId,
UserId:this.mall_UserInfo.UserId,
TalkId:0,
}
UserId: this.mall_UserInfo.UserId,
TalkId: 0,
},
},
res => {
(res) => {
if (res.resultCode == 1) {
this.count = res.data.count;
this.dynamicList = res.data.pageData;
};
}
}
);
},
......@@ -597,56 +616,59 @@
current: index,
});
},
goedit(type){
goedit(type) {
uni.navigateTo({
url: '/pages/blindDate/editData?UserId='+this.UserId +'&type='+type
url:
"/pages/blindDate/editData?UserId=" + this.UserId + "&type=" + type,
});
},
dianjiguanzhu(x){//关注操作
let ID=0;
if(x.IsFollow!=0){
ID = x.MyFollowId
dianjiguanzhu(x) {
//关注操作
let ID = 0;
if (x.IsFollow != 0) {
ID = x.MyFollowId;
}
this.request2({
url: '/api/AppletMiai/GetFollowMember',
this.request2(
{
url: "/api/AppletMiai/GetFollowMember",
data: {
ID:ID,
UserId:x.Id,
}
ID: ID,
UserId: x.Id,
},
res => {
},
(res) => {
uni.showToast({
title:res.message,
icon:'none'
})
this.init()
title: res.message,
icon: "none",
});
this.init();
}
);
},
gorenz(){//去认证
gorenz() {
//去认证
uni.navigateTo({
// url: '/pages/blindDate/basicdata'
url: '/pages/blindDate/editData?UserId='+this.UserId
})
url: "/pages/blindDate/editData?UserId=" + this.UserId,
});
},
gosfzrenz(){//身份证认证
if(this.mall_UserInfo.UserId == this.UserId){
gosfzrenz() {
//身份证认证
if (this.mall_UserInfo.UserId == this.UserId) {
uni.navigateTo({
url: '/pages/blindDate/personal/IDidentification'
})
url: "/pages/blindDate/personal/IDidentification",
});
}
},
gogerendongtai(){//跳入动态列表
gogerendongtai() {
//跳入动态列表
uni.navigateTo({
url: '/pages/friendcircle/my-news?UserId='+this.UserId
})
}
}
}
url: "/pages/friendcircle/my-news?UserId=" + this.UserId,
});
},
},
};
</script>
<style>
.release {
.release {
width: 100%;
height: 100vh;
background: #FFF;
}
background: #fff;
}
.release .release-box {
.release .release-box {
width: 100%;
padding: 15px;
}
}
.release .option-box {
.release .option-box {
width: 100%;
height: 40px;
padding: 0 10px;
......@@ -19,16 +19,16 @@
align-items: center;
font-size: 14px;
color: #333333;
border-bottom: 1px soild #DFDFDF;
}
border-bottom: 1px soild #dfdfdf;
}
.release .ob-l {
.release .ob-l {
display: flex;
flex-direction: row;
align-items: center;
}
}
.release .ob-r {
.release .ob-r {
display: flex;
flex: 1;
justify-content: flex-end;
......@@ -36,25 +36,25 @@
flex-direction: row;
align-items: center;
padding-left: 10px;
}
}
.release .releasebtn {
.release .releasebtn {
width: 690rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #FFFFFF;
background: #40766E;
color: #ffffff;
background: #40766e;
border-radius: 22.5px;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 60rpx;
}
}
.release .slot-btn {
.release .slot-btn {
width: 200rpx;
height: 200rpx;
display: flex;
......@@ -64,29 +64,29 @@
background: rgb(244, 245, 246);
border-radius: 10rpx;
margin-left: 5px;
}
}
.release .slot-btn .mian-title {
.release .slot-btn .mian-title {
font-size: 28rpx;
color: #888;
font-weight: 600;
margin: 10rpx 0;
}
}
.release .audio {
.release .audio {
width: 100%;
margin: 10px 0;
height: 40px;
background: #F9F9F9;
background: #f9f9f9;
border-radius: 4px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 0 10px;
}
}
.release .audio-o {
.release .audio-o {
display: flex;
flex-direction: row;
align-items: center;
......@@ -95,49 +95,48 @@
width: 100%;
height: 100%;
justify-content: center;
}
}
.release .as-box {
.release .as-box {
width: 100%;
height: 240px;
background: #FFFFFF;
background: #ffffff;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
}
.release .as-yuyin {
.release .as-yuyin {
margin-top: 20px;
width: 90px;
height: 90px;
border: 3px solid #4F877F;
background: #40766E;
border: 3px solid #4f877f;
background: #40766e;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
}
.release .now-date {
.release .now-date {
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
}
}
.release .as-btn {
.release .as-btn {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
margin-top: 5px;
}
}
.release .as-btn-item {
.release .as-btn-item {
width: 85px;
height: 40px;
border-radius: 20px;
......@@ -145,11 +144,11 @@
align-items: center;
justify-content: center;
font-size: 16px;
color: #40766E;
border: 1px solid #40766E;
}
color: #40766e;
border: 1px solid #40766e;
}
.release .audio-ot {
.release .audio-ot {
width: 1;
flex: 1;
margin-right: 20px;
......@@ -159,60 +158,60 @@
padding: 0 10px;
justify-content: space-between;
height: 30px;
background: #EBEBEB;
background: #ebebeb;
border-radius: 4px;
}
}
.release .videostyle {
.release .videostyle {
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
background: #F9F9F9;
border: 1px dashed #D2D2D2;
}
background: #f9f9f9;
border: 1px dashed #d2d2d2;
}
#myVideo {
#myVideo {
width: 150px;
height: 200px;
}
}
.release-top {
.release-top {
width: 100%;
height: 94px;
display: flex;
align-items: center;
justify-content: space-around;
}
}
.release-item {
.release-item {
width: 90rpx;
font-size: 12px;
display: flex;
flex-direction: column;
align-items: center;
}
}
.r-item-img {
.r-item-img {
width: 90rpx;
height: 90rpx;
margin-bottom: 10px;
}
}
.r-item-img image {
.r-item-img image {
width: 100%;
height: 100%;
}
}
.pubox {
.pubox {
width: 100%;
padding: 0 15px;
}
}
.pubox-top {
.pubox-top {
width: 100%;
height: 45px;
display: flex;
......@@ -220,15 +219,15 @@
justify-content: space-between;
font-size: 14px;
color: #111;
}
}
.ht-box {
.ht-box {
padding: 0 15px;
display: flex;
flex-wrap: wrap;
}
}
.foritem {
.foritem {
height: 30px;
font-size: 12px;
padding: 0 12px;
......@@ -237,15 +236,15 @@
border-radius: 15px;
margin-right: 25px;
margin-bottom: 15px;
}
}
.release .pubox {
.release .pubox {
width: 100%;
padding: 0 15px;
}
}
.release .pubox-top {
.release .pubox-top {
width: 100%;
height: 45px;
display: flex;
......@@ -253,40 +252,53 @@
justify-content: space-between;
font-size: 14px;
color: #111;
}
}
.release .box-item {
.release .box-item {
width: 100%;
height: 50px;
border-bottom: 1px solid #E2E2E2;
border-bottom: 1px solid #e2e2e2;
display: flex;
align-items: center;
}
}
.release .titleinput {
height: auto;
border-bottom: 1px solid #E2E2E2;
border-bottom: 1px solid #e2e2e2;
box-sizing: border-box;
padding: 40rpx 0;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111;
}
.release .textarea {
}
.release .textarea {
box-sizing: border-box;
padding: 40rpx 0;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111;
}
}
.continue {
width: 100%;
height: 35px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
</style>
<template>
<view class="release">
<view style="width: 100%;margin-top: 15px;">
<u-upload :action="action" :max-count="9" @on-remove="onRemove1" :custom-btn="true"
@on-success="uploadSuccessHandler">
<view style="width: 100%; margin-top: 15px">
<u-upload
:action="action"
:max-count="9"
@on-remove="onRemove1"
:custom-btn="true"
@on-success="uploadSuccessHandler"
>
<view slot="addBtn" class="slot-btn">
<u-icon name="plus" size="40" color="#888"></u-icon>
<!-- <view class="mian-title">上传图片</view> -->
......@@ -295,56 +307,139 @@
</view>
<view class="release-box">
<view class="box-item" style="justify-content: space-between;" @click="show=true">
<text style="font-size:12px;color: #666666;">选择分类</text>
<view class="flex-row" style="display: flex;">
<text style="margin-right: 5px;font-size:12px;color: #999999"
v-if="addMsg.ForumId==0">选择合适的贴吧</text>
<text style="margin-right: 5px;font-size:12px;color: #111111"
v-if="addMsg.ForumId>0">{{ForumName}}</text>
<view
class="box-item"
style="justify-content: space-between"
@click="show = true"
>
<text style="font-size: 12px; color: #666666">选择分类</text>
<view class="flex-row" style="display: flex">
<text
style="margin-right: 5px; font-size: 12px; color: #999999"
v-if="addMsg.ForumId == 0"
>选择合适的贴吧</text
>
<text
style="margin-right: 5px; font-size: 12px; color: #111111"
v-if="addMsg.ForumId > 0"
>{{ ForumName }}</text
>
<u-icon name="arrow" color="#A5A4AC" size="30"></u-icon>
</view>
</view>
<input type="text" class="titleinput" v-model="addMsg.ActivityTitle" placeholder="请将标题写在这里~" />
<textarea class="textarea" placeholder="今天有什么可以给大家分享呢?" style="width: 100%;height: 100px;" maxlength='-1'
confirm-type='done' v-model="addMsg.Content">
</textarea>
<view class="releasebtn" @click="publish" :style="{background:mainColor}">
<input
type="text"
class="titleinput"
maxlength="50"
v-model="addMsg.ActivityTitle"
placeholder="请将标题写在这里~"
/>
<!-- <textarea
class="textarea"
placeholder="今天有什么可以给大家分享呢?"
style="width: 100%; height: 100px"
maxlength="-1"
confirm-type="done"
v-model="addMsg.Content"
>
</textarea> -->
<view
style="height: 135px; width: 100%; padding: 15px 0"
@click="gorichText"
>
<view
v-html="addMsg.Content"
v-if="addMsg.Content != ''"
style="width: 100%; height: 100px; overflow: hidden"
></view>
<view v-else style="color: #999999; font-size: 14px">详情描述</view>
<view
v-if="addMsg.Content.length > 0"
class="continue"
:style="{ color: mainColor }"
>
继续编辑
</view>
</view>
<view
class="releasebtn"
@click="publish"
:style="{ background: mainColor }"
>
发布
</view>
</view>
<u-popup v-model="whoshow" mode="center" length="70%" border-radius="14">
<view style="width: 100%;background: #FFF;border-radius: 6px;
padding: 20px;">
<u-radio-group v-model="addMsg.IsOpen" :active-color='mainColor' @change='whoshow=false'>
<u-radio shape="circle" style='width: 100%;margin: 5px 0;' v-for="(item, index) in list"
:key="index" :name="item.Id">
{{item.name}}
<view
style="width: 100%; background: #fff; border-radius: 6px; padding: 20px"
>
<u-radio-group
v-model="addMsg.IsOpen"
:active-color="mainColor"
@change="whoshow = false"
>
<u-radio
shape="circle"
style="width: 100%; margin: 5px 0"
v-for="(item, index) in list"
:key="index"
:name="item.Id"
>
{{ item.name }}
</u-radio>
</u-radio-group>
</view>
</u-popup>
<!-- 选择分类 -->
<u-popup v-model="show" mode="bottom" border-radius="20">
<view class="pubox">
<view class="pubox-top">
<view></view>
<text>选择吧</text>
<u-icon name="cross" color="#555" size="40" @click='show=false'></u-icon>
<u-icon
name="cross"
color="#555"
size="40"
@click="show = false"
></u-icon>
</view>
<view style="display: flex;flex-direction: column;align-items: center;margin-top: 10px;">
<view style="font-size: 20px;color: #111111;font-weight: 400; ">选择你感兴趣的贴吧</view>
<view style="font-size: 13px;color: #999999;margin: 10px 0;">贴吧只能选择一个,发布前可更改</view>
<view
style="
display: flex;
flex-direction: column;
align-items: center;
margin-top: 10px;
"
>
<view style="font-size: 20px; color: #111111; font-weight: 400"
>选择你感兴趣的贴吧</view
>
<view style="font-size: 13px; color: #999999; margin: 10px 0"
>贴吧只能选择一个,发布前可更改</view
>
</view>
<scroll-view scroll-y="true"
style="max-height: calc(100vh * 0.7 - 65px);padding-bottom: 20px;min-height:calc(100vh * 0.4 - 65px) ;">
<scroll-view
scroll-y="true"
style="
max-height: calc(100vh * 0.7 - 65px);
padding-bottom: 20px;
min-height: calc(100vh * 0.4 - 65px);
"
>
<view class="ht-box">
<view v-for="(x,y) in forumList" :key="y" class="foritem" @click="select(x)"
:style="{color:x.Id == addMsg.ForumId?'#FFF':'#666666',background:x.Id == addMsg.ForumId?mainColor:'#F9F9F9'}">
{{x.Name}}
<view
v-for="(x, y) in forumList"
:key="y"
class="foritem"
@click="select(x)"
:style="{
color: x.Id == addMsg.ForumId ? '#FFF' : '#666666',
background: x.Id == addMsg.ForumId ? mainColor : '#F9F9F9',
}"
>
{{ x.Name }}
</view>
</view>
</scroll-view>
......@@ -354,43 +449,41 @@
</template>
<script>
const recorderManager = uni.getRecorderManager();
const innerAudioContext = uni.createInnerAudioContext();
export default {
const recorderManager = uni.getRecorderManager();
const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
return {
pageTitle: "发布帖子",
mainColor: "",
secondary: '',
pricecolor: '',
secondary: "",
pricecolor: "",
action: this.host2 + "/api/File/UploadTencent",
addMsg: {
Id: 0,
ForumId: 0,
ActivityTitle: "",
Content: '',
Content: "",
ImageList: [],
IsOpenEnroll: 2,
Distinguish: 1,
ManNum: 0,
WoManNum: 0
WoManNum: 0,
},
//---------------------
show: false,
forumList: [],
ForumName: "",
}
};
},
onLoad(options) {
if (options && options.type) {
this.addMsg.FileType = options.type
this.addMsg.FileType = options.type;
if (options.file) {
this.addMsg.ImageList = []
this.addMsg.ImageList.push(options.file)
this.addMsg.ImageList = [];
this.addMsg.ImageList.push(options.file);
}
}
this.mainColor = this.$uiConfig.mainColor;
......@@ -399,66 +492,69 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId
? uni.getStorageSync("mall_UserInfo").MallBaseId
: 1;
this.action =
this.host2 + "/api/File/UploadTencent?MallBaseId=" + MallBaseId;
},
created() {
this.GetForumList()
this.GetForumList();
},
methods: {
publish() { //发布
publish() {
//发布
if (this.addMsg.ForumId == 0) {
uni.showToast({
title: '请选择分类',
icon: 'none',
duration: 2000
title: "请选择分类",
icon: "none",
duration: 2000,
});
return
return;
}
if (this.addMsg.ActivityTitle == '') {
if (this.addMsg.ActivityTitle == "") {
uni.showToast({
title: '请输入标题...',
icon: 'none',
duration: 2000
title: "请输入标题...",
icon: "none",
duration: 2000,
});
return
return;
}
if (this.addMsg.Content == '') {
if (this.addMsg.Content == "") {
uni.showToast({
title: '请输入帖子内容...',
icon: 'none',
duration: 2000
title: "请输入帖子内容...",
icon: "none",
duration: 2000,
});
return
return;
}
uni.showLoading({
title: '发布中...'
})
this.request2({
url: '/api/AppletMiai/SetSimpleActivityInfo',
data: this.addMsg
title: "发布中...",
});
this.request2(
{
url: "/api/AppletMiai/SetSimpleActivityInfo",
data: this.addMsg,
},
res => {
uni.hideLoading()
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
uni.showToast({
title: res.message,
position: 'bottom',
icon: 'none',
duration: 2000
position: "bottom",
icon: "none",
duration: 2000,
});
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
setTimeout(() => {
uni.navigateBack({
success: function() {
success: function () {
beforePage.$vm.getList(); // 执行前一个页面的created方法
}
},
});
}, 500)
}, 500);
}
}
);
......@@ -467,41 +563,33 @@
getAddress() {
let that = this;
uni.chooseLocation({
success: function(res) {
success: function (res) {
that.addMsg.Address = res.name;
that.addMsg.LatAndLong = res.longitude + ',' + res.latitude;
that.addMsg.LatAndLong = res.longitude + "," + res.latitude;
},
fail: function (err) {
that.fetchAgainLocation();
},
fail: function(err) {
that.fetchAgainLocation()
}
});
},
uploadSuccessHandler(data, index, lists) {
let r = JSON.parse(data);
console.log(468,r)
console.log(468, r);
this.addMsg.ImageList.push(r.data);
},
onRemove1(index) {
this.addMsg.ImageList.splice(index, 1);
},
GetForumList() {
this.request2({
url: '/api/AppletMiai/GetForumList',
data: {}
this.request2(
{
url: "/api/AppletMiai/GetForumList",
data: {},
},
res => {
(res) => {
if (res.resultCode == 1) {
this.forumList = res.data
this.forumList = res.data;
for (let i = 0; i < this.forumList.length; i++) {
if (this.forumList[i].Id == this.addMsg.ForumId) {
this.ForumName = this.forumList[i].Name;
......@@ -516,7 +604,16 @@
this.ForumName = x.Name;
this.show = false;
},
}
}
gorichText() {
let data = this.addMsg.Content;
data = encodeURIComponent(data); //加密
uni.navigateTo({
url: "/pages/blindDate/richText?Content=" + data,
});
},
Children(e) {
this.addMsg.Content = e;
},
},
};
</script>
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