修改提交字段
parent
3a89c6b6e8
commit
14cae43bb6
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name" : "app适配微信小程序",
|
"name" : "洛河民意通调查系统",
|
||||||
"appid" : "__UNI__768F35C",
|
"appid" : "__UNI__768F35C",
|
||||||
"description" : "这是一款基于uniapp开发的app和微信小程序的模板框架",
|
"description" : "洛河民意通调查系统",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
|
|
|
@ -22,19 +22,35 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo:'',
|
userInfo:'',
|
||||||
ifFlag:false
|
ifFlag:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 前往登录页
|
// 前往登录页
|
||||||
goLogin(){
|
goLogin(){
|
||||||
this.$toolAll.tools.showToast('正在登录...','none',10000)
|
// 前往群众对应的列表页
|
||||||
|
// 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({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (rescode)=> {
|
success: (rescode)=> {
|
||||||
this.updateUserInfo(rescode.code);
|
this.updateUserInfo(rescode.code);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$toolAll.tools.showToast('正在检查是否已授权','none',10000);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//调用登录接口
|
//调用登录接口
|
||||||
updateUserInfo(code) {
|
updateUserInfo(code) {
|
||||||
|
@ -44,8 +60,10 @@
|
||||||
this.$requst.post('user/login',params).then(res => {
|
this.$requst.post('user/login',params).then(res => {
|
||||||
uni.hideToast();
|
uni.hideToast();
|
||||||
if(res.data.token!=''){
|
if(res.data.token!=''){
|
||||||
|
this.$toolAll.tools.showToast('已授权');
|
||||||
let dataObj = res.data;
|
let dataObj = res.data;
|
||||||
uni.setStorageSync('token',dataObj.token);
|
uni.setStorageSync('token',dataObj.token);
|
||||||
|
|
||||||
this.$toolAll.tools.showToast('登录成功');
|
this.$toolAll.tools.showToast('登录成功');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(dataObj.utype=='def'){
|
if(dataObj.utype=='def'){
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
// 前往提交页面
|
// 前往提交页面
|
||||||
goOpinionSubmit(){
|
goOpinionSubmit(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pagesA/opinion-submit/opinion-submit'
|
url:'/pagesA/passageway/passageway'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 前往详情页
|
// 前往详情页
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
<view class="" v-if="!ifAnonymous">
|
<view class="" v-if="!ifAnonymous">
|
||||||
<view class="disjbac bbot pad-sx20">
|
<view class="disjbac bbot pad-sx20">
|
||||||
<view class="fon30 colb bold flexs">真实姓名</view>
|
<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>
|
||||||
<view class="disjbac bbot pad-sx20">
|
<view class="disjbac bbot pad-sx20">
|
||||||
<view class="fon30 colb bold flexs">联系方式</view>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<picker mode="selector" :range="communityList" :value="communityIndex" @change="changeCommunity" :range-key="'name'">
|
<picker mode="selector" :range="communityList" :value="communityIndex" @change="changeCommunity" :range-key="'name'">
|
||||||
|
@ -59,9 +59,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjbac bbot pad-sx20">
|
<view class="disjb bbot pad-sx20">
|
||||||
<view class="fon30 colb bold flexs">描述文案</view>
|
<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>
|
||||||
<view class="dis fon30 bbot pad-sx30">
|
<view class="dis fon30 bbot pad-sx30">
|
||||||
<view class="colb bold flexs">语音上传</view>
|
<view class="colb bold flexs">语音上传</view>
|
||||||
|
@ -78,13 +79,15 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<picker mode="selector" :range="typeList" :value="typeIndex" @change="changeType" :range-key="'name'">
|
||||||
<view class="disjbac fon30 bbot pad-sx30">
|
<view class="disjbac fon30 bbot pad-sx30">
|
||||||
<view class="colb bold flexs">类别</view>
|
<view class="colb bold flexs">类别</view>
|
||||||
<view class="disac col9 width100 fe">
|
<view class="disac col9 width100 fe">
|
||||||
<view class="mar-y10">请选择类别</view>
|
<view class="mar-y10">{{typeText}}</view>
|
||||||
<i class="icon icon-next fon24" style="margin-top: 6rpx;"></i>
|
<i class="icon icon-next fon24" style="margin-top: 6rpx;"></i>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjcac pad-sx50">
|
<view class="disjcac pad-sx50">
|
||||||
<view class="disjcac enter-btn" style="margin: 0;" @tap="submitEv">立即提交</view>
|
<view class="disjcac enter-btn" style="margin: 0;" @tap="submitEv">立即提交</view>
|
||||||
|
@ -100,9 +103,14 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imgArr:[],
|
form:{
|
||||||
vedioArr:[],
|
name:'',//真实姓名
|
||||||
audioText:'',
|
phone:'',//联系方式
|
||||||
|
content:''//描述方案
|
||||||
|
},
|
||||||
|
imgArr:[],//图片
|
||||||
|
vedioArr:[],//视频
|
||||||
|
audioText:'',//音频
|
||||||
communityList:[],//社区列表
|
communityList:[],//社区列表
|
||||||
communityIndex:0,//当前选中的社区
|
communityIndex:0,//当前选中的社区
|
||||||
communityId:'',//社区id
|
communityId:'',//社区id
|
||||||
|
@ -111,11 +119,21 @@
|
||||||
villageIndex:0,//当前选中的村
|
villageIndex:0,//当前选中的村
|
||||||
villageText:'请选择村',
|
villageText:'请选择村',
|
||||||
villageId:'',//村id
|
villageId:'',//村id
|
||||||
|
typeList:[],//类别列表
|
||||||
|
typeIndex:0,//当前选中的类别
|
||||||
|
typeText:'请选择类别',
|
||||||
|
typeId:''//类别id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 调用查询社区列表事件
|
// 调用查询社区列表事件
|
||||||
this.getCommunityList();
|
this.getCommunityList();
|
||||||
|
// 调用类别查询事件
|
||||||
|
|
||||||
|
this.$requst.get('administrator/reviewedList').then(res=>{
|
||||||
|
if(res.code==0){
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
|
@ -123,6 +141,25 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
changeCommunity(e){
|
||||||
this.communityIndex = e.detail.value;
|
this.communityIndex = e.detail.value;
|
||||||
|
@ -157,10 +194,18 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提交事件
|
// 选择类别
|
||||||
submitEv(){
|
changeType(e){
|
||||||
uni.reLaunch({
|
this.typeIndex = e.detail.value;
|
||||||
url:'/pagesA/passageway/passageway'
|
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;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 图片选择
|
// 图片选择
|
||||||
|
|
Loading…
Reference in New Issue