LAPTOP-UBJMM5MG\user vor 10 Monaten
Ursprung
Commit
77df696f32

+ 20 - 2
pages/subPackages/parkActivity/activeApplication.vue

@@ -34,7 +34,7 @@
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动地址</span>
         <span class="secondBoxInfo dhInfo">
-             <span>{{ form.activityAddress }} - {{ form.activityAddressDetail }}</span>
+             <span>{{ formattedAddress }}</span>
              <img src="./image/dhIcon.png" class="dhIcon" @tap="getLocal">
            </span>
       </div>
@@ -90,7 +90,25 @@ export default {
     this.url = options.url
     this.getById()
   },
-  methods: {
+  computed: {
+    formattedAddress() {
+      // 检查两个地址字段是否都存在值
+      const hasAddress = this.form.activityAddress && this.form.activityAddress.trim() !== '';
+      const hasDetail = this.form.activityAddressDetail && this.form.activityAddressDetail.trim() !== '';
+
+      // 根据是否存在值来拼接地址
+      if (hasAddress && hasDetail) {
+        return `${this.form.activityAddress} - ${this.form.activityAddressDetail}`;
+      } else if (hasAddress) {
+        return this.form.activityAddress;
+      } else if (hasDetail) {
+        return this.form.activityAddressDetail;
+      } else {
+        return ''; // 或者返回其他默认值
+      }
+    }
+  },
+    methods: {
     call(){
       uni.makePhoneCall({
         phoneNumber: this.form.activityPhone, // 电话号码

+ 13 - 2
pages/subPackages/parkActivity/applicationInfo.vue

@@ -46,7 +46,7 @@
            </li>
          </ul>
       </div>
-      <button v-if="!registrationFlag" class="bmBtn" @tap="submit">提交报名</button>
+      <button v-show="!registrationFlag" class="bmBtn" @tap="submit">提交报名</button>
     </div>
 </template>
 
@@ -70,7 +70,18 @@ export default {
   },
   onLoad(options){
     this.activityId = options.activityId
-    this.registrationFlag = options.registrationFlag
+    // this.registrationFlag = options.registrationFlag
+    switch (options.registrationFlag) {
+      case 'true':
+        this.registrationFlag = true
+            break;
+      case 'false':
+        this.registrationFlag = false
+            break;
+      default:
+        this.registrationFlag = options.registrationFlag // 或者你可以根据需要返回false或其他值
+    }
+    console.log('this.registrationFlag',typeof options.registrationFlag)
     // 如果已报名则回显
     if(this.registrationFlag){
       this.getById()

+ 3 - 0
pages/subPackages/parkActivity/index.vue

@@ -45,6 +45,9 @@ export default {
   },
   onShow(){
     this.getByCodes()
+    this.$nextTick(()=>{
+      this.active = 0
+    })
   },
   methods:{
     clickTab(item) {

+ 7 - 1
pages/subPackages/peripheralService/index.vue

@@ -42,6 +42,7 @@ export default {
         releaseType: 'periphery',
         status: 'published'
       },
+      selectType:'',
       serviceList:[],
       dic_SelectList:[],
       all: null
@@ -49,6 +50,9 @@ export default {
   },
   created(){
     this.getByCodes()
+    this.$nextTick(()=>{
+      this.active = 0
+    })
   },
   onPullDownRefresh() {
     this.getByCodes()
@@ -63,11 +67,13 @@ export default {
       this.serviceList = this.dic_SelectList.periphery_type
       // console.log('this.serviceList',this.serviceList)
       this.selectChange({detail:{
-          name:''
+          name:this.params.type
         }})
     },
 
     selectData(type) {
+      console.log('this.active',this.active)
+      console.log('this.type',type)
       const _this = this
       _this.params.type = type
       peripheryList(_this.params).then((res) => {