<template>
  <view class="prayers-list" @click="handleclick">
    <u-navbar
      title="南华云灯会"
      leftIconColor="#fff"
      :titleStyle="{ color: '#fff' }"
      bgColor="transparent"
      :autoBack="true"
    >
    </u-navbar>
    <!-- <u-navbar title="剑未配妥，出门已是江湖" @click-left="onClickBack" @click-right="onClickRight"></u-navbar> -->
    <div class="allList" v-if="false">
      <div class="list">
        <swiper
          :display-multiple-items="3.3"
          :rebound="false"
          slidesPerView="auto"
          style="height: 555px"
          :height="555"
          class="swiper"
          :autoplay="false"
          @click="handleclick"
        >
          <swiper-item
            style="height: 555px"
            :height="680"
            v-for="(item, index) in list"
            :key="index"
          >
            <div class="listitem">
              <div
                class="item"
                :class="{ active: active == element }"
                v-for="(element, s) in item.list"
                :key="s"
              >
                {{ element }}
              </div>
            </div>
          </swiper-item>
        </swiper>
      </div>
      <div class="tips">请选择祈愿类型</div>
      <div class="img_signal" v-if="!show"></div>
    </div>
    <div class="activeIndex">
      <div class="indexHome">学业祈愿</div>
      <div class="textListContent">
        <div
          class="textList"
          v-for="(item, index) in textList"
          :key="item"
          :class="'text' + index"
        >
          {{ item }}
        </div>
      </div>
      <div class="textTips">请选择祈愿语</div>
      <div class="selcet">
        <div>您来自哪个省份？</div>
        <div class="selcetBut" @click="provinceShow = true">
          {{province}}
          <u-icon
            class="mytest"
            name="arrow-down-fill"
            color="#fff"
            size="10"
          ></u-icon>
        </div>
      </div>
      <div class="qiyuan">
        <u--image
              height="70px"
              width="70px"
              mode="heightFix"
              src="/static/img/btn_wish@2x.png"
            ></u--image>
      </div>
    </div>
    <u-picker :show="provinceShow" :columns="[provinceList]"
      @cancel="provinceShow = false"
			@confirm="confirm"
			@close="provinceShow = false" closeOnClickOverlay></u-picker>
  </view>
</template>

<script>
// import uNavbar from "uview-ui/components/u-navbar/u-navbar.vue";
export default {
  components: {
    // uNavbar
  },
  data() {
    return {
      active: "婚姻祈愿1",
      show: false,
      province: "请选择",
      provinceShow: false,
      provinceList: [
        "北京",
        "天津",
        "河北省",
        "山西省",
        "内蒙古自治区",
        "辽宁省",
        "吉林省",
        "黑龙江省",
        "上海",
        "江苏省",
        "浙江省",
        "安徽省",
        "福建省",
        "江西省",
        "山东省",
        "河南省",
        "湖北省",
        "湖南省",
        "广东省",
        "广西壮族自治区",
        "海南省",
        "重庆",
        "四川省",
        "贵州省",
        "云南省",
        "西藏自治区",
        "陕西省",
        "甘肃省",
        "青海省",
        "宁夏回族自治区",
        "新疆维吾尔自治区",
        "台湾",
        "香港特别行政区",
        "澳门特别行政区",
        "海外",
      ],
      list: [
        {
          list: ["婚姻祈愿1", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿2", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿3", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿4", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿5", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿6", "婚姻祈愿2"],
        },
        {
          list: ["婚姻祈愿7", "婚姻祈愿2"],
        },
      ],
      textList: [
        "100%纯手工制作",
        "知识的殿堂中闪耀属于你的光芒。",
        "愿你学有所",
      ],
      // list: [{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // },{
      //   name: '婚姻祈愿',
      //   textList: ['100%纯手工制作', '100%愿你学业精进，成绩辉煌，知识的殿堂中闪耀属于你的光芒。', '愿你学有所成，智慧增进，每一次努力都为未来铺就光明之路。']
      // }]
    };
  },
  onLoad() {},
  methods: {
    handleHome() {
      console.log("开启云上观灯", uni);
      uni.$u.route("/pages/home/home");
    },
    handleclick() {
      this.show = true;
    },
    confirm(val){
      console.log("confirm", val);
      this.province = val.value[0];
      this.provinceShow = false;
    }
  },
};
</script>

<style lang="scss" scoped>
.prayers-list {
  background: rgba(32, 21, 10, 0.7);
  border-radius: 0px 0px 0px 0px;
  height: 100vh;
  padding-top: 100px;
  .img_signal {
    width: 76px;
    height: 106px;
    background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/img_signal@2x.png)
      100% 100% no-repeat;
    background-size: cover;
    position: absolute;
    right: 50px;
    bottom: 30px;
    animation: handleAni 1s linear infinite;
    transition: all 1s;
  }
  .tips {
    width: 100%;
    text-align: center;
    margin-top: 27px;
    color: #fff;
    font-size: 14px;
    line-height: 21px;
  }
  .list {
    height: 555px;
    .swiper {
      padding: 0 10px;
      .listitem {
        text-align: center;
        padding: 0 20px;
        .item {
          margin-top: 20px;
          // margin: 18px 20px 0 20px;
          width: 18px;
          height: 267px;
          background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/label@2x.png)
            100% 100% no-repeat;
          background-size: cover;
          writing-mode: tb-rl;
          text-align: center;
          padding: 0 25px;
          position: relative;
        }
        .active {
          &:after {
            content: "";
            box-shadow: 0px 2px 18px 11px #fff86c,
              inset 0px 1px 1px 0px rgba(177, 156, 125, 0.7);
            position: absolute;
            height: 71%;
            width: 80%;
            top: 32px;
            left: 8px;
            border-radius: 25px;
            z-index: -1;
          }
        }
      }
    }
  }
  .activeIndex {
    width: 100%;
    height: 100%;
    position: relative;
    .indexHome {
      height: 500px;
      width: 28px;
      background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/label@2x.png)
        100% 100% no-repeat;
      background-size: contain;
      writing-mode: tb-rl;
      padding: 0 50px;
      position: absolute;
      font-weight: 400;
      font-size: 30px;
      color: #8c4042;
      line-height: 45px;
      font-style: normal;
      display: flex;
      writing-mode: vertical-lr;
      text-align: center;
      justify-content: center;
      flex-direction: column;
      letter-spacing: 18px;
      left: calc(50% - 64px);
    }
    .qiyuan{
      position: absolute;
      bottom: 162px;
      right: 20px;
    }
    .selcet {
      position: absolute;
      width: 100%;
      bottom: 20%;
      text-align: center;
      color: #fff;
      font-size: 14px;
      line-height: 14px;
      .selcetBut {
        border: 1px solid #d9d9d9;
        line-height: 48px;
        width: 120px;
        margin: 0 auto;
        padding: 0 15px;
        margin-top: 10px;
        height: 48px;
        border-radius: 10px;
        position: relative;
        .mytest {
          position: absolute;
          right: 25px;
          top: calc(50% - 5px);
        }
      }
    }
    .textTips {
      color: #fff;
      writing-mode: vertical-lr;
      text-align: center;
      font-weight: 400;
      font-size: 14px;
      line-height: 14px;
      text-align: center;
      font-style: normal;
      text-transform: none;
      position: absolute;
      top: calc(50% - 150px);
      left: calc(50% + 68px);
    }
    .textListContent {
      display: flex;
    }
    .textList {
      height: fit-content;
      padding: 20px 6px;
      font-style: normal;
      display: flex;
      writing-mode: vertical-lr;
      text-align: center;
      justify-content: center;
      flex-direction: column;
      background: rgba(255, 255, 255, 0.3);
      border-radius: 20px 20px 20px 20px;
      border: 1px solid #fff9b6;
      position: absolute;
      font-weight: 400;
      font-size: 11px;
      top: 50px;
      color: #fff9b6;
    }
    .text0 {
      left: 30px;
    }
    .text1 {
      left: 80px;
      top: 276px;
    }
    .text2 {
      right: 30px;
    }
  }
}

@keyframes handleAni {
  from {
    right: 50px;
  }
  to {
    right: 30px;
  }
}
</style>
