27
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
:adjust-position="true" :auto-blur="true" @linechange="inputLineChange" @input="inputing"
|
||||
:confirm-hold="true" :show-confirm-bar="false"
|
||||
:focus="inputFocusFlag" :disable-default-padding="true"
|
||||
v-model="content" :cursor="content.length" :maxlength="-1" />
|
||||
v-model="content" :cursor="content.length" :maxlength="1500" />
|
||||
</scroll-view>
|
||||
<!-- 文件选择区 -->
|
||||
<view v-if="releaseType!=0" class="uploadBox">
|
||||
@@ -49,29 +49,33 @@
|
||||
</view>
|
||||
<!-- 选项 -->
|
||||
<view class="tips">
|
||||
<u-cell-group>
|
||||
<!-- :value="address.name" :value-style="customValueStyle" :label="address.address" -->
|
||||
<u-cell bg-color="#ffffff"
|
||||
:title="address.chooseFlag?(address.name):'所在位置'" :title-style="customTitleStyle"
|
||||
:value="address.chooseFlag?(address.address):'请选择'" isLink
|
||||
@click="toChooseLocation()">
|
||||
<view slot="icon" class="u-flex u-row-center u-col-center">
|
||||
<u-icon name="map" size="32" :color="address.chooseFlag?'#19be6b':'#606266'"></u-icon>
|
||||
</view>
|
||||
</u-cell>
|
||||
<u-cell bg-color="#ffffff" title="提醒谁看" :title-style="customTitleStyle" @click="toRemind">
|
||||
<view slot="icon" class="u-flex u-row-center u-col-center">
|
||||
<u-icon name="/static/images/friendCircle/at.png" width="24" height="24" color="#606266"></u-icon>
|
||||
</view>
|
||||
</u-cell>
|
||||
<u-cell bg-color="#ffffff" @click="toSetPromission()"
|
||||
title="谁可以看" :title-style="customTitleStyle"
|
||||
:value="'公开'" :value-style="customValueStyle">
|
||||
<view slot="icon" class="u-flex u-row-center u-col-center">
|
||||
<u-icon name="account" size="32" color="#606266"></u-icon>
|
||||
</view>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
<uni-list>
|
||||
<uni-list-item
|
||||
title="所在位置"
|
||||
:rightText="address.chooseFlag?(address.name):'请选择'"
|
||||
:show-extra-icon="true"
|
||||
:extra-icon="{color: '#666',size: '22',type: 'location-filled'}"
|
||||
clickable
|
||||
showArrow
|
||||
@click="toChooseLocation">
|
||||
</uni-list-item>
|
||||
<uni-list-item v-if="1==2"
|
||||
title="提醒谁看"
|
||||
:rightText="address.chooseFlag?(address.address):'请选择'"
|
||||
clickable
|
||||
showArrow
|
||||
@click="toRemind">
|
||||
</uni-list-item>
|
||||
<uni-list-item
|
||||
title="谁可以看"
|
||||
rightText="公开"
|
||||
:show-extra-icon="true"
|
||||
:extra-icon="{color: '#666',size: '22',type: 'notification-filled'}"
|
||||
clickable
|
||||
showArrow
|
||||
@click="toSetPromission">
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -273,21 +277,23 @@
|
||||
//去选择所在位置
|
||||
toChooseLocation:function(){
|
||||
let that=this;
|
||||
uni.chooseLocation({
|
||||
success: function (res) {
|
||||
// console.log('位置名称:' + res.name);
|
||||
// console.log('详细地址:' + res.address);
|
||||
// console.log('纬度:' + res.latitude);
|
||||
//console.log('经度:' + res.longitude);
|
||||
that.address=res;
|
||||
that.address.chooseFlag=true;
|
||||
//console.log("that.address",that.address);
|
||||
},
|
||||
fail:function(){
|
||||
that.address={};
|
||||
that.address.chooseFlag=false;
|
||||
uni.navigateTo({
|
||||
url:"/pages/common/map",
|
||||
events:{
|
||||
onConfirm(res) {
|
||||
//_this.sendLocationMessage(res);
|
||||
that.address={
|
||||
address:res.address,
|
||||
name:`${res.addressComponent.city}•${res.addressComponent.town}`,
|
||||
latitude:res.lat,
|
||||
longitude:res.lng,
|
||||
};
|
||||
that.address.chooseFlag=true;
|
||||
console.log(res);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
return ;
|
||||
},
|
||||
//设置发布朋友圈的查看权限
|
||||
toSetPromission:function(){
|
||||
@@ -422,28 +428,16 @@
|
||||
let that=this;
|
||||
console.error('submitPublish');
|
||||
uni.$u.http.post('/friendcircle/create',param).then(res => {
|
||||
let newCircle=res;
|
||||
if(newCircle.address!=null&&newCircle.address.length>0){
|
||||
newCircle.address=JSON.parse(newCircle.address);
|
||||
}else{
|
||||
newCircle.address={"chooseFlag":false};
|
||||
}
|
||||
if(newCircle.fileList!=null&&newCircle.fileList.length>0){
|
||||
newCircle.fileList=JSON.parse(newCircle.fileList);
|
||||
}else{
|
||||
newCircle.fileList=[];
|
||||
}
|
||||
if(newCircle.praise!=null){
|
||||
newCircle.praise=JSON.parse(newCircle.praise);
|
||||
}else{
|
||||
newCircle.praise=[];
|
||||
}
|
||||
if(newCircle.comment!=null){
|
||||
newCircle.comment=JSON.parse(newCircle.comment);
|
||||
}
|
||||
else{
|
||||
newCircle.comment=[];
|
||||
}
|
||||
console.log("发布成功",res);
|
||||
let newCircle=res.data;
|
||||
newCircle['user'] = {
|
||||
"id": this.$store.getters.storeSelfInfo.userID,
|
||||
"nickname": this.$store.getters.storeSelfInfo.nickname,
|
||||
"avatar": this.$store.getters.storeSelfInfo.faceURL,
|
||||
};
|
||||
newCircle['likes'] = [];
|
||||
newCircle['comments'] = [];
|
||||
newCircle['is_liked'] = false;
|
||||
let circleDataList=[...this.circleData];
|
||||
circleDataList.unshift(newCircle);
|
||||
that.$store.commit('circle/SET_LIST',circleDataList);
|
||||
|
||||
Reference in New Issue
Block a user