Commit 04d7f8ce authored by Mac's avatar Mac

修改

parent 1b1d4ea0
......@@ -74,12 +74,16 @@
</view>
<view class="conBox" v-if="item.type==2">
<view v-for="(item1,index1) in item.childDataList" :key="index1">
<view class="subItemBox">
<view class="subItemBox" v-if="item1.subType!=4">
<view class="subName">
{{item1.name}}
<text v-if="item1.must!=undefined && item1.must" style="font-size: 12px;color: #F70027;margin-left: 3px;font-weight: normal;">*</text>
</view>
<input type="text" :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" v-if="item1.subType==1"/>
<input type="text" v-if="item1.name=='昵称' && item1.subType==1" maxlength='10' :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" />
<input type="text" v-if="item1.name!='昵称' && item1.subType==1" :placeholder="item1.placehloder" :disabled="item1.disabled" v-model="data[item1.field]" :type="item1.showType" class="subInput" />
<!-- 显示有昵称的长度 -->
<view class="unit" v-if="item1.name=='昵称' && item1.subType==1">{{data[item1.field].length}}/10</view>
<view class="unit" v-if="item1.unit">
{{item1.unit}}
</view>
......@@ -94,7 +98,19 @@
<Text :style="{'color':address!=''? '#303133':'#9D9C9B'}">{{address!=''? address :'请选择'}}</Text>
<pickerAddress v-model="addressShow" @confirm="addresspick" />
</view>
</view>
<!-- 头像上传的情况 4-26新加 -->
<view class="subItemBox" v-if="item1.subType==4" style="height: 140rpx;">
<view class="subName">
{{item1.name}}
<text v-if="item1.must!=undefined && item1.must" style="font-size: 12px;color: #F70027;margin-left: 3px;font-weight: normal;">*</text>
</view>
<view >
<u-upload ref="uUpload" :action="action" :custom-btn="true" @on-success="uploadSuccessHandler" :show-upload-list="showUploadList"
:file-list="fileList" :multiple='false'>
<u-avatar :src="data.Photo" size="110" slot="addBtn" mode="square"></u-avatar>
</u-upload>
</view>
</view>
</view>
</view>
......@@ -160,7 +176,15 @@
placehloder:"请填写昵称",
subType:1,
showType:"text",
disabled:true,
disabled:false,
must:true,//必填
},{
name:"头像",
field:"Name",
placehloder:"请填写头像",
subType:4,
showType:"text",
disabled:false,
must:true,//必填
},{
name:"性别",
......@@ -431,6 +455,9 @@
addressShow:false,
address:'',
Jumptype:0,
action:'',
showUploadList:false,
fileList:[],
}
},
onShareAppMessage(res) {
......@@ -511,11 +538,9 @@
wx.showLoading({
title: '上传中'
})
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId : 1;
let action = that.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
uni.uploadFile({
url: action,
url: that.action,
filePath: img,
name: 'field',
formData: {
......@@ -557,7 +582,14 @@
delete msg.nativePlace
delete msg.addCode
if(this.data.Name == ''){
uni.showToast({
title: '昵称不能为空',
duration: 2000,
icon:"none"
});
return
}
if(this.data.SexStr=="男"){
msg.Sex=1
}else{
......@@ -865,6 +897,10 @@
}
});
},
uploadSuccessHandler(data, index, lists) {
let r = JSON.parse(data);
this.data.Photo = r.data;
},
},
onLoad(options) {
this.UserId = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserId:null;
......@@ -872,6 +908,9 @@
if(options && options.Jumptype){
this.Jumptype = options.Jumptype
}
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo")
.MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
},
created() {
this.mainColor = this.$uiConfig.mainColor;
......
......@@ -239,7 +239,7 @@
</view>
<view class="pd-box-center">
<view class="pd-portrait">
<view class="pd-portrait-l">
<view class="pd-portrait-l" @click="previewImage(0,[dataList.Photo])">
<u-avatar v-if='dataList.Photo' :src="dataList.Photo" size="140" ></u-avatar>
<image v-if="dataList.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 36rpx;height: 36rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="dataList.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 36rpx;height: 36rpx;position: absolute;right: 0;bottom: 0;"></image>
......
......@@ -388,7 +388,8 @@
<view class="activitytime-item-l">
活动人数
</view>
<text>{{details.ManNum}}<text style="margin-left: 10px;">{{details.WoManNum}}</text> </text>
<text v-if="details.Distinguish == 0">{{details.ManNum}}<text style="margin-left: 10px;">{{details.WoManNum}}</text> </text>
<text v-if="details.Distinguish == 1">{{details.ManNum}}</text>
</view>
<view class="activitytime-item" v-if="details.LocationName !=null && details.LocationName!=''" @click="goopenlocation(details)">
<view class="activitytime-item-l">
......@@ -472,15 +473,19 @@
<view class="btn-l" @click="showreply=true">
说点什么呗
</view>
<view class="btn-r" v-if="details.IsOpenEnroll==1 && gettime() == true " :style="{background:mainColor}" @click="gosigUp()">
<view class="btn-r" v-if="details.IsOpenEnroll==1 && gettime() == true && details.IsEnroll==false" :style="{background:mainColor}" @click="gosigUp()">
立即报名
</view>
<view class="btn-r" v-if="details.IsOpenEnroll==1 && gettime() == false " >
活动结束
<view class="btn-r" v-if="details.IsOpenEnroll==1 && gettime() == false && details.IsEnroll==false" >
报名结束
</view>
<view class="btn-r" v-if="details.IsOpenEnroll==1 && details.IsEnroll==true" >
已报名
</view>
<view class="btn-r" v-if="details.IsOpenEnroll==2" >
暂无活动
</view>
</view>
<view class="btn2" v-if="showreply==true" :style="{'margin-bottom':oneheight+'px'}">
<view class="btn2-l">
......
......@@ -192,14 +192,32 @@
<u-icon name="arrow" color="#A5A4AC" size="30" ></u-icon>
</view>
</view>
<view class="box-item" style="justify-content: space-between;" >
<text style="font-size:12px;color: #666666;">是否区分性别</text>
<view class="flex-row">
<u-radio-group v-model="addMsg.Distinguish" >
<u-radio
shape="circle"
v-for="(item, index) in qufenlist" :key="index"
:name="item.id"
:active-color="mainColor"
icon-size='34'
label-size='24'
>
{{item.name}}
</u-radio>
</u-radio-group>
</view>
</view>
<view class="box-item" style="justify-content: space-between;" v-if="addMsg.IsOpenEnroll==1" >
<text style="font-size:12px;color: #666666;">男数量</text>
<text style="font-size:12px;color: #666666;">{{addMsg.Distinguish==0?'男数量':'总人数'}}</text>
<view class="flex-row">
<input type="number" v-model="addMsg.ManNum" :min='0' placeholder="男性数量" style="font-size: 12px;text-align: right;margin-right: 5px;">
</view>
</view>
<view class="box-item" style="justify-content: space-between;" v-if="addMsg.IsOpenEnroll==1" >
<view class="box-item" style="justify-content: space-between;" v-if="addMsg.IsOpenEnroll==1 && addMsg.Distinguish==0" >
<text style="font-size:12px;color: #666666;">女数量</text>
<view class="flex-row">
<input type="number" v-model="addMsg.WoManNum" :min='0' placeholder="女性数量" style="font-size: 12px;text-align: right;margin-right: 5px;">
......@@ -293,6 +311,7 @@ export default {
Deadline:'',
LabelList:[],
IsOpenEnroll:1,//1 是开启 2 是不开启
Distinguish:0,//0是区分,1不区分
StartTime:'',
EndTime:'',
ManNum:0,
......@@ -310,6 +329,7 @@ export default {
second: false
},
kqlist:[{id:1,name:'开启'},{id:2,name:'不开启'}],
qufenlist:[{id:0,name:'区分'},{id:1,name:'不区分'}],
ForumName:'',
action: this.host2 + "/api/File/UploadTencent",
timetype:0,
......@@ -485,6 +505,31 @@ export default {
})
return
}
if(this.addMsg.Distinguish==0){
if(this.addMsg.ManNum=='' && this.addMsg.ManNum==0){
uni.showToast({
title: '男性数量大于0',
icon: 'none',
})
return
}
if(this.addMsg.WoManNum=='' && this.addMsg.WoManNum==0){
uni.showToast({
title: '女性数量大于0',
icon: 'none',
})
return
}
}else{
if(this.addMsg.ManNum=='' && this.addMsg.ManNum==0){
uni.showToast({
title: '总人数数量大于0',
icon: 'none',
})
return
}
}
if(this.addMsg.Content == ''){
uni.showToast({
title: '内容不能为空',
......
......@@ -119,6 +119,7 @@
},
forumList: [],
isAttestation:0,
isFaTie:0
};
},
created() {
......@@ -139,7 +140,9 @@
title: this.pageTitle,
});
let basedata = wx.getStorageSync("basedata")
this.isAttestation = basedata.user_info.isAttestation?basedata.user_info.isAttestation:0
this.isAttestation = basedata.user_info.isAttestation?basedata.user_info.isAttestation:0;
this.isFaTie = basedata.user_info.isFaTie?basedata.user_info.isFaTie:0;
},
onLoad: function(option) {
this.u = uni.getStorageSync("mall_UserInfo");
......@@ -235,9 +238,18 @@
this.showAuth = true;
} else {
if(this.isAttestation == 1){//判断是否认证了
if(this.isFaTie == 1){
uni.navigateTo({
url: '/pages/blindDate/postPublishing?ForumId=' + this.msg.ForumId
})
}else{
uni.showToast({
title: '暂无发帖权限,联系管理员开通权利',
duration: 2000,
icon:"none"
});
}
}else{
this.show = true
}
......@@ -261,7 +273,8 @@
(res) => {
uni.setStorageSync("basedata", res.data);
let basedata = wx.getStorageSync("basedata")
this.isAttestation = basedata.user_info.isAttestation?basedata.user_info.isAttestation:0
this.isAttestation = basedata.user_info.isAttestation?basedata.user_info.isAttestation:0;
this.isFaTie = basedata.user_info.isFaTie?basedata.user_info.isFaTie:0;
},
(error) => {}
);
......@@ -271,6 +284,7 @@
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.GetForumList();
this.getisAttestation()//登陆成功了 获取发帖权限
},
//关闭登录窗口
gbAuth() {
......
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