ptzw12a.vue 4.96 KB
Newer Older
qd01's avatar
qd01 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
<template>
	<view class="in bgimg">
		<view class="up">
	
				<view class="tc" style="position: relative;height: 60vh;margin-top: 20vh;" >
					<view class="gs" style="background-color: #fff;">
						

						<text selectable="true" v-for="(item,index) in content" :key="index">
							<text v-html="item.noticeContent"></text>
						</text>
					</view>

				</view>
		
		</view>

	</view>
</template>

<script>
import updatePopup from "@/components/updatePopup.vue";
	
	export default {
		components: {

    updatePopup,
  },
		data() {
			return {
				lb: [],
				zw: false,
				tp: false,
				keyword: '',
				ptmc: '',
				ms: '',
				loading: false,  // 加载效果状态
				
				smCount: 0,
    showFirstButton: false,
    showSecondButton: false,
	
	isshow: false,
      content: [],
      isshow1: false,
      content1: [],
      isshow2: false,
      content2: [],
      showModal: false,
      selectedNews: {},

			}
		},
		onShow() {
			this.$request(
				"/system/config/configKey/fc", {},
				"get",
				true
			).then((res) => {
				this.lb = res.data.msg.split(',')
				console.log(this.lb);
			});
			this.getgonggao();
		},
		onLoad() {
			this.checkSmCount();
},

methods: {
	checkSmCount() {
    this.$request("/system/user/", {}, "get").then((res) => {
      console.log("Response from /system/user/:", res);

      if (res.data.code === 200) {
        this.smCount = res.data.smCount;
        this.showFirstButton = this.smCount < 4;
        this.showSecondButton = this.smCount >= 4;

        // 打印判断结果
        console.log("smCount:", this.smCount);
        console.log("showFirstButton:", this.showFirstButton);
        console.log("showSecondButton:", this.showSecondButton);
      } else {
        console.error("接口返回非200状态码:", res.data);
      }
    }).catch((error) => {
      console.error("请求失败:", error);
    });
  },

  handleFirstButtonClick() {
  // 显示提示信息
  uni.showToast({
    title: '邀请满4人,数据恢复',
    icon: 'none',
    duration: 2000 // 显示2秒
  });

  // 延迟2秒后跳转到指定页面
  setTimeout(() => {
    uni.navigateTo({
      url: '/components/invite/yq'
    });
  }, 2000);
}

,
handleFirstButtonClick2() {
  // 显示提示信息
  uni.showToast({
    title: '数据恢复中',
    icon: 'none',
    duration: 2000 // 显示2秒
  });


}
,
isclose() {
      this.isshow = false;
      this.isshow1 = true;
      this.isshow2 = true;
    },
    isclose1() {
      this.isshow1 = false;
      // this.isshow1 = true
    },
    isclose2() {
      this.isshow2 = false;
      // this.isshow1 = true
    },
    getgonggao() {
  let data = {
    noticeType: "",
  };
  this.isshow = true;
  this.$request(`/system/notice/list`, data, "get").then((res) => {
  
    this.content = res.data.rows.filter((item) => item.noticeType == 2);


 
  });
},







			handleClick() {
      this.loading = true; // 开始显示加载效果
      this.$request(`/ops/reward/entry/sjhf`, {}, "post", true)
        .then((res) => {
          if (res.data.code == 200) {
            uni.showToast({
              title: "领取成功",
              icon: "none",
            });
            this.$request("/system/user/", {}, "get")
              .then(res => {
                if (res.data.q2 || res.data.q2 == 0) {
                  this.q2 = res.data.q2;
                }
                this.loading = false; // 请求完成后隐藏加载效果
              })
              .catch(() => {
                this.loading = false; // 请求出错时隐藏加载效果
              });
          } else {
            uni.showToast({
              title: res.data.msg,
              icon: "none",
            });
            this.loading = false; // 请求失败时隐藏加载效果
          }
        })
        .catch(() => {
          this.loading = false; // 请求出错时隐藏加载效果
        });
    }


,
			ss() {
				this.ptmc = this.keyword
				let a = this.lb.some(item => {
					return item == this.ptmc
				})
				if (a) {
					this.tp = false

					this.ms = this.ptmc + '为真正的国家房产项目,您可以放心参与此房产平台。'
				} else {
					this.tp = true
					this.ms = ' 注意该' + this.ptmc + '平台为假项目平台,请谨慎投资参与,以免您的财产受到损失'
				}
				console.log(a);

			},
		},
		onHide() {
			this.ms = ''
			this.keyword = ''
			this.ptmc = ''
		}
	}
</script>

<style lang="scss" scoped>
	.in {
		box-sizing: border-box;
		padding-top: 35px;
		height: 100vh;
		width: 100%;
		 background: linear-gradient(180deg, #FFFFFF 20%, #FED0D0 100%);
		background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
	}
	.tc {
  width: 100%;
  height: 1100rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .gs {
    border-radius: 15px;
    margin: 0rpx auto;
    width: 700rpx;
    height: 1100rpx;
    box-sizing: border-box;
    padding: 10px 10rpx 100rpx;
    overflow-x: hidden;
    overflow-y: scroll;
  }
}
</style>