Commit af1387b2 authored by 罗超's avatar 罗超

1

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