|
@@ -60,7 +60,7 @@
|
|
<view class="option_right">
|
|
<view class="option_right">
|
|
<view class="input_details">
|
|
<view class="input_details">
|
|
<view class="details">
|
|
<view class="details">
|
|
- <view class="uni-input text">{{classifyList[index]}}</view>
|
|
|
|
|
|
+ <view class="uni-input text">{{classifyList[index]==null?'请选择':classifyList[index]}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="arrow">
|
|
<view class="arrow">
|
|
<image
|
|
<image
|
|
@@ -213,7 +213,7 @@
|
|
<view class="optionItem">
|
|
<view class="optionItem">
|
|
<view class="option_left">
|
|
<view class="option_left">
|
|
<text class="option_text">
|
|
<text class="option_text">
|
|
- 活动费用
|
|
|
|
|
|
+ 活动费用(元)
|
|
</text>
|
|
</text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -296,9 +296,9 @@
|
|
</image>
|
|
</image>
|
|
<text style="margin-bottom: 24px;">{{ poptext }}成功</text>
|
|
<text style="margin-bottom: 24px;">{{ poptext }}成功</text>
|
|
</view>
|
|
</view>
|
|
- <view class="footer" style="padding-top: 0px;">
|
|
|
|
|
|
+ <!-- <view class="footer" style="padding-top: 0px;">
|
|
<button class="confirm-btn_2" @click="closePopup">确认</button>
|
|
<button class="confirm-btn_2" @click="closePopup">确认</button>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -341,7 +341,7 @@
|
|
// 分类
|
|
// 分类
|
|
classifyList: ['直播活动', '常规教研活动', '专题教研活动','推荐课程'],
|
|
classifyList: ['直播活动', '常规教研活动', '专题教研活动','推荐课程'],
|
|
// index判断选择分类 0 1 2 3 ,对应上面
|
|
// index判断选择分类 0 1 2 3 ,对应上面
|
|
- index:1,
|
|
|
|
|
|
+ index:null,
|
|
classify: '请选择',
|
|
classify: '请选择',
|
|
|
|
|
|
// 人数
|
|
// 人数
|
|
@@ -366,9 +366,11 @@
|
|
|
|
|
|
// activityDate: currentDate,
|
|
// activityDate: currentDate,
|
|
activityDate: '请选择',
|
|
activityDate: '请选择',
|
|
- deadlineDate: currentDate,
|
|
|
|
|
|
+ deadlineDate: '请选择',
|
|
activeList: [],
|
|
activeList: [],
|
|
- formData: {}
|
|
|
|
|
|
+ formData: {},
|
|
|
|
+
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -380,9 +382,6 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- clearData() {
|
|
|
|
- this.$store.commit('removeData');
|
|
|
|
- },
|
|
|
|
confirm(e) {
|
|
confirm(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
console.log(e[0], e[e.length - 1]);
|
|
console.log(e[0], e[e.length - 1]);
|
|
@@ -438,11 +437,11 @@
|
|
const conditions = [
|
|
const conditions = [
|
|
// 添加提示信息
|
|
// 添加提示信息
|
|
{
|
|
{
|
|
- value: this.activitytitle.trim(),
|
|
|
|
|
|
+ value: this.activitytitle,
|
|
message: '请填写活动标题'
|
|
message: '请填写活动标题'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- value: this.activityintro.trim(),
|
|
|
|
|
|
+ value: this.activityintro,
|
|
message: '请填写活动内容'
|
|
message: '请填写活动内容'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -489,6 +488,9 @@
|
|
// 取消操作
|
|
// 取消操作
|
|
this.showPopup = false;
|
|
this.showPopup = false;
|
|
this.showPopupConfirm = false;
|
|
this.showPopupConfirm = false;
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url:'/pages/activityPage/activityPage'
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 上传发布
|
|
// 上传发布
|
|
conf() {
|
|
conf() {
|
|
@@ -508,12 +510,13 @@
|
|
funds: this.funds
|
|
funds: this.funds
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
this.showPopup = false;
|
|
this.showPopup = false;
|
|
this.showPopupConfirm = true
|
|
this.showPopupConfirm = true
|
|
// return console.log(formData);
|
|
// return console.log(formData);
|
|
console.log(this.btntext);
|
|
console.log(this.btntext);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (this.btntext === '修改发布') {
|
|
if (this.btntext === '修改发布') {
|
|
// formData.acId = this.acId
|
|
// formData.acId = this.acId
|
|
// console.log(formData);
|
|
// console.log(formData);
|
|
@@ -530,7 +533,7 @@
|
|
this.activitytitle = ''
|
|
this.activitytitle = ''
|
|
this.activityintro = ''
|
|
this.activityintro = ''
|
|
this.imageValue = ''
|
|
this.imageValue = ''
|
|
- this.classify = '请选择'
|
|
|
|
|
|
+ this.index = null
|
|
this.recruitment = '请选择'
|
|
this.recruitment = '请选择'
|
|
this.activityform = '请选择'
|
|
this.activityform = '请选择'
|
|
this.address = '请选择'
|
|
this.address = '请选择'
|
|
@@ -538,9 +541,10 @@
|
|
this.activityDate = '请选择'
|
|
this.activityDate = '请选择'
|
|
this.deadlineDate = '请选择'
|
|
this.deadlineDate = '请选择'
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.clearData()
|
|
|
|
- uni.navigateBack();
|
|
|
|
- }, 500)
|
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
+ url:'/pages/activityPage/activityPage'
|
|
|
|
+ })
|
|
|
|
+ }, 2000)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -634,36 +638,24 @@
|
|
}
|
|
}
|
|
|
|
|
|
this.formData = this.$store.state.formData
|
|
this.formData = this.$store.state.formData
|
|
- console.log(this.formData);
|
|
|
|
- this.activitytitle = this.formData.activitytitle
|
|
|
|
- this.activityintro = this.formData.activityintro
|
|
|
|
- this.imageValue = this.formData.imageValue
|
|
|
|
- this.index = this.formData.classify
|
|
|
|
- this.recruitment = this.formData.recruitment
|
|
|
|
- this.activityform = this.formData.activityform
|
|
|
|
- this.address = this.formData.address
|
|
|
|
- this.funds = this.formData.funds
|
|
|
|
- this.activityDate = this.formData.activityDate
|
|
|
|
- this.deadlineDate = this.formData.deadlineDate
|
|
|
|
|
|
+ let data =uni.getStorageSync('formData')
|
|
|
|
+ console.log(data);
|
|
|
|
+ this.activitytitle = data.activitytitle
|
|
|
|
+ this.activityintro = data.activityintro
|
|
|
|
+ this.imageValue = data.imageValue
|
|
|
|
+ this.index = data.classify
|
|
|
|
+ this.recruitment = data.recruitment
|
|
|
|
+ this.activityform = data.activityform
|
|
|
|
+ this.address = data.address
|
|
|
|
+ this.funds = data.funds
|
|
|
|
+ this.activityDate = data.activityDate
|
|
|
|
+ this.deadlineDate = data.deadlineDate
|
|
|
|
|
|
console.log(this.index);
|
|
console.log(this.index);
|
|
- // switch (this.classify) {
|
|
|
|
- // case 0:
|
|
|
|
- // this.classify = "直播活动";
|
|
|
|
- // break;
|
|
|
|
- // case 1:
|
|
|
|
- // this.classify = "常规教研活动";
|
|
|
|
- // break;
|
|
|
|
- // case 2:
|
|
|
|
- // this.classify = "专题教研活动";
|
|
|
|
- // break;
|
|
|
|
- // default:
|
|
|
|
- // this.classify = "请选择";
|
|
|
|
- // }
|
|
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
// 在组件销毁之前保存表单数据到 Vuex 中
|
|
// 在组件销毁之前保存表单数据到 Vuex 中
|
|
- this.formData = {
|
|
|
|
|
|
+ let data = {
|
|
activitytitle: this.activitytitle,
|
|
activitytitle: this.activitytitle,
|
|
activityintro: this.activityintro,
|
|
activityintro: this.activityintro,
|
|
imageValue: this.imageValue,
|
|
imageValue: this.imageValue,
|
|
@@ -675,9 +667,10 @@
|
|
activityDate: this.activityDate,
|
|
activityDate: this.activityDate,
|
|
deadlineDate: this.deadlineDate
|
|
deadlineDate: this.deadlineDate
|
|
}
|
|
}
|
|
- this.$store.commit('saveformData', this.formData);
|
|
|
|
- console.log('Submitted formData:', this.formData);
|
|
|
|
- console.log('Current state.formData:', this.$store.state.formData);
|
|
|
|
|
|
+ uni.setStorageSync('formData',data)
|
|
|
|
+ // this.$store.commit('saveformData', this.formData);
|
|
|
|
+ // console.log('Submitted formData:', this.formData);
|
|
|
|
+ // console.log('Current state.formData:', this.$store.state.formData);
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|