修改提交字段

master
吃肉的饺子 2022-07-31 12:01:43 +08:00
parent 3a89c6b6e8
commit 14cae43bb6
4 changed files with 91 additions and 28 deletions

View File

@ -1,7 +1,7 @@
{
"name" : "app适配微信小程序",
"name" : "洛河民意通调查系统",
"appid" : "__UNI__768F35C",
"description" : "这是一款基于uniapp开发的app和微信小程序的模板框架",
"description" : "洛河民意通调查系统",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,

View File

@ -22,19 +22,35 @@
data() {
return {
userInfo:'',
ifFlag:false
ifFlag:true
}
},
methods: {
//
goLogin(){
this.$toolAll.tools.showToast('正在登录...','none',10000)
uni.login({
provider: 'weixin',
success: (rescode)=> {
this.updateUserInfo(rescode.code);
},
});
//
// uni.reLaunch({
// url:'/pagesA/my-opinion-list/my-opinion-list'
// })
//
// uni.reLaunch({
// url:'/pagesA/community/opinion-handle/opinion-handle'
// })
//
// uni.reLaunch({
// url:'/pagesA/manager/examine-list/examine-list'
// })
if(this.ifFlag){
this.ifFlag = false;
uni.login({
provider: 'weixin',
success: (rescode)=> {
this.updateUserInfo(rescode.code);
},
});
} else {
this.$toolAll.tools.showToast('正在检查是否已授权','none',10000);
}
},
//
updateUserInfo(code) {
@ -44,8 +60,10 @@
this.$requst.post('user/login',params).then(res => {
uni.hideToast();
if(res.data.token!=''){
this.$toolAll.tools.showToast('已授权');
let dataObj = res.data;
uni.setStorageSync('token',dataObj.token);
this.$toolAll.tools.showToast('登录成功');
setTimeout(()=>{
if(dataObj.utype=='def'){

View File

@ -57,7 +57,7 @@
//
goOpinionSubmit(){
uni.navigateTo({
url:'/pagesA/opinion-submit/opinion-submit'
url:'/pagesA/passageway/passageway'
})
},
//

View File

@ -4,11 +4,11 @@
<view class="" v-if="!ifAnonymous">
<view class="disjbac bbot pad-sx20">
<view class="fon30 colb bold flexs">真实姓名</view>
<input class="fon30 col9 tright width100" type="text" maxlength="16" placeholder="请输入姓名">
<input class="fon30 col9 tright width100" v-model="form.name" type="text" maxlength="16" placeholder="请输入姓名">
</view>
<view class="disjbac bbot pad-sx20">
<view class="fon30 colb bold flexs">联系方式</view>
<input class="fon30 col9 tright width100" type="text" maxlength="11" placeholder="请填写手机号码">
<input class="fon30 col9 tright width100" v-model="form.phone" type="number" maxlength="11" placeholder="请填写手机号码">
</view>
</view>
<picker mode="selector" :range="communityList" :value="communityIndex" @change="changeCommunity" :range-key="'name'">
@ -59,9 +59,10 @@
</view>
</view>
</view>
<view class="disjbac bbot pad-sx20">
<view class="disjb bbot pad-sx20">
<view class="fon30 colb bold flexs">描述文案</view>
<input class="fon30 col9 tright width100" type="text" placeholder="请输入描述文案">
<!-- <input class="fon30 col9 tright" style="max-width: 90%;" v-model="form.content" type="text" placeholder="请输入描述文案"> -->
<textarea auto-height v-model="form.content" class="fon30 col9 tright" style="max-width: 70%;" placeholder="请输入描述文案"></textarea>
</view>
<view class="dis fon30 bbot pad-sx30">
<view class="colb bold flexs">语音上传</view>
@ -78,13 +79,15 @@
</view>
</view>
</view>
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs">类别</view>
<view class="disac col9 width100 fe">
<view class="mar-y10">请选择类别</view>
<i class="icon icon-next fon24" style="margin-top: 6rpx;"></i>
<picker mode="selector" :range="typeList" :value="typeIndex" @change="changeType" :range-key="'name'">
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs">类别</view>
<view class="disac col9 width100 fe">
<view class="mar-y10">{{typeText}}</view>
<i class="icon icon-next fon24" style="margin-top: 6rpx;"></i>
</view>
</view>
</view>
</picker>
</view>
<view class="disjcac pad-sx50">
<view class="disjcac enter-btn" style="margin: 0;" @tap="submitEv"></view>
@ -100,9 +103,14 @@
export default {
data() {
return {
imgArr:[],
vedioArr:[],
audioText:'',
form:{
name:'',//
phone:'',//
content:''//
},
imgArr:[],//
vedioArr:[],//
audioText:'',//
communityList:[],//
communityIndex:0,//
communityId:'',//id
@ -111,11 +119,21 @@
villageIndex:0,//
villageText:'请选择村',
villageId:'',//id
typeList:[],//
typeIndex:0,//
typeText:'请选择类别',
typeId:''//id
}
},
onLoad() {
//
this.getCommunityList();
//
this.$requst.get('administrator/reviewedList').then(res=>{
if(res.code==0){
}
})
},
computed: {
...mapState({
@ -123,6 +141,25 @@
})
},
methods: {
//
submitEv(){
let params = {
...this.form,
a:this.communityId,//id
b:this.villageId,//ID
c:this.imgArr.join(','),//
d:this.vedioArr.join(','),//
e:this.audioText,//
f:this.typeId,//
}
console.log(params,77777);
// this.$requst.post('',params).then(res=>{
// })
// uni.reLaunch({
// url:'/pagesA/my-opinion-list/my-opinion-list'
// })
},
//
changeCommunity(e){
this.communityIndex = e.detail.value;
@ -157,10 +194,18 @@
}
})
},
//
submitEv(){
uni.reLaunch({
url:'/pagesA/passageway/passageway'
//
changeType(e){
this.typeIndex = e.detail.value;
this.typeId = this.typeList[this.typeIndex].id;
this.typeText = this.typeList[this.typeIndex].name;
},
//
getTypeList(){
this.$requst.get('common/villageList').then(res=>{
if(res.code==0){
this.typeList = res.data.list;
}
})
},
//