|
@@ -49,7 +49,7 @@
|
|
|
|
|
|
<view class="userOptionsBox">
|
|
<view class="userOptionsBox">
|
|
<view class="optionsItemBox">
|
|
<view class="optionsItemBox">
|
|
- <picker mode="selector" :range="classifyList" @change="handelclassify">
|
|
|
|
|
|
+ <picker mode="selector" :range="classifyList" :value="index" @change="handelclassify">
|
|
<view class="optionItem">
|
|
<view class="optionItem">
|
|
<view class="option_left">
|
|
<view class="option_left">
|
|
<text class="option_text">
|
|
<text class="option_text">
|
|
@@ -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">{{classify}}</view>
|
|
|
|
|
|
+ <view class="uni-input text">{{classifyList[index]}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="arrow">
|
|
<view class="arrow">
|
|
<image
|
|
<image
|
|
@@ -339,7 +339,9 @@
|
|
imageValue: '',
|
|
imageValue: '',
|
|
|
|
|
|
// 分类
|
|
// 分类
|
|
- classifyList: ['直播活动', '常规教研活动', '专题教研活动'],
|
|
|
|
|
|
+ classifyList: ['直播活动', '常规教研活动', '专题教研活动','推荐课程'],
|
|
|
|
+ // index判断选择分类 0 1 2 3 ,对应上面
|
|
|
|
+ index:1,
|
|
classify: '请选择',
|
|
classify: '请选择',
|
|
|
|
|
|
// 人数
|
|
// 人数
|
|
@@ -387,6 +389,7 @@
|
|
this.activityDate = e[0] + '~' + e[e.length - 1]
|
|
this.activityDate = e[0] + '~' + e[e.length - 1]
|
|
this.show = false
|
|
this.show = false
|
|
},
|
|
},
|
|
|
|
+
|
|
editPublish() {
|
|
editPublish() {
|
|
const routes = getCurrentPages()
|
|
const routes = getCurrentPages()
|
|
console.log(routes);
|
|
console.log(routes);
|
|
@@ -443,7 +446,7 @@
|
|
message: '请填写活动内容'
|
|
message: '请填写活动内容'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- value: this.classify,
|
|
|
|
|
|
+ value: this.index,
|
|
message: '请填写活动分类'
|
|
message: '请填写活动分类'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -487,16 +490,9 @@
|
|
this.showPopup = false;
|
|
this.showPopup = false;
|
|
this.showPopupConfirm = false;
|
|
this.showPopupConfirm = false;
|
|
},
|
|
},
|
|
|
|
+ // 上传发布
|
|
conf() {
|
|
conf() {
|
|
- // 确认操作
|
|
|
|
- if (this.classify == "直播活动") {
|
|
|
|
- this.classify = 0
|
|
|
|
- } else if (this.classify == "常规教研活动") {
|
|
|
|
- this.classify = 1
|
|
|
|
- } else {
|
|
|
|
- this.classify = 2
|
|
|
|
- }
|
|
|
|
- // 将文本框内容和图片链接存储在一个对象中
|
|
|
|
|
|
+
|
|
this.formData = {
|
|
this.formData = {
|
|
// id: this.$store.state.user.openid,
|
|
// id: this.$store.state.user.openid,
|
|
id: this.btntext === '修改发布' ? this.acId : this.$store.state.user.openid,
|
|
id: this.btntext === '修改发布' ? this.acId : this.$store.state.user.openid,
|
|
@@ -506,13 +502,13 @@
|
|
recruitment: this.recruitment,
|
|
recruitment: this.recruitment,
|
|
activityform: this.activityform,
|
|
activityform: this.activityform,
|
|
address: this.address,
|
|
address: this.address,
|
|
- classify: this.classify,
|
|
|
|
|
|
+ classify: this.index,
|
|
activityDate: this.activityDate,
|
|
activityDate: this.activityDate,
|
|
deadlineDate: this.deadlineDate,
|
|
deadlineDate: this.deadlineDate,
|
|
funds: this.funds
|
|
funds: this.funds
|
|
- // price: "188",
|
|
|
|
- // count: "6",
|
|
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
this.showPopup = false;
|
|
this.showPopup = false;
|
|
this.showPopupConfirm = true
|
|
this.showPopupConfirm = true
|
|
@@ -551,8 +547,12 @@
|
|
|
|
|
|
},
|
|
},
|
|
handelclassify(e) {
|
|
handelclassify(e) {
|
|
- this.classify = this.classifyList[e.detail.value]
|
|
|
|
- console.log(this.classify);
|
|
|
|
|
|
+ // console.log(e);
|
|
|
|
+
|
|
|
|
+ this.index=e.detail.value
|
|
|
|
+ console.log(this.index);
|
|
|
|
+ // this.classify = this.classifyList[e.detail.value]
|
|
|
|
+ // console.log(this.classify);
|
|
},
|
|
},
|
|
handelRecruitment(e) {
|
|
handelRecruitment(e) {
|
|
this.recruitment = this.recruitmentList[e.detail.value]
|
|
this.recruitment = this.recruitmentList[e.detail.value]
|
|
@@ -638,26 +638,28 @@
|
|
this.activitytitle = this.formData.activitytitle
|
|
this.activitytitle = this.formData.activitytitle
|
|
this.activityintro = this.formData.activityintro
|
|
this.activityintro = this.formData.activityintro
|
|
this.imageValue = this.formData.imageValue
|
|
this.imageValue = this.formData.imageValue
|
|
- this.classify = this.formData.classify
|
|
|
|
|
|
+ this.index = this.formData.classify
|
|
this.recruitment = this.formData.recruitment
|
|
this.recruitment = this.formData.recruitment
|
|
this.activityform = this.formData.activityform
|
|
this.activityform = this.formData.activityform
|
|
this.address = this.formData.address
|
|
this.address = this.formData.address
|
|
this.funds = this.formData.funds
|
|
this.funds = this.formData.funds
|
|
this.activityDate = this.formData.activityDate
|
|
this.activityDate = this.formData.activityDate
|
|
this.deadlineDate = this.formData.deadlineDate
|
|
this.deadlineDate = this.formData.deadlineDate
|
|
- switch (this.classify) {
|
|
|
|
- case 0:
|
|
|
|
- this.classify = "直播活动";
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- this.classify = "常规教研活动";
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- this.classify = "专题教研活动";
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- this.classify = "请选择";
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ 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 中
|
|
@@ -665,7 +667,7 @@
|
|
activitytitle: this.activitytitle,
|
|
activitytitle: this.activitytitle,
|
|
activityintro: this.activityintro,
|
|
activityintro: this.activityintro,
|
|
imageValue: this.imageValue,
|
|
imageValue: this.imageValue,
|
|
- classify: this.classify,
|
|
|
|
|
|
+ classify: this.index,
|
|
recruitment: this.recruitment,
|
|
recruitment: this.recruitment,
|
|
activityform: this.activityform,
|
|
activityform: this.activityform,
|
|
address: this.address,
|
|
address: this.address,
|