
<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();

const onClickLeft = () => {
  router.push('/main/personal/integral');
}
const allList = ref([]);

let param = $ref({
  keyword:'',
});
initData()
function initData() {
  request({
    url: "/txwx/jffl_gzsz/index",
    data: {
      ...param,
    },
  }).then((res) => {
    if (res.code == "1") {
      allList.value = res.data.page_data;
    }
  });
}
let fromZlb = localStorage.getItem('fromZlb') === '1'
</script>

<template>
  <div class="bg-[#ffefce] integralAll">
    <van-nav-bar title="积分规则" left-text="" :left-arrow="!fromZlb" fixed placeholder @click-left="onClickLeft"/>
    <div class="box-border p-2">
      <div class="rounded box-border p-2 mt-2 bg-[#fff9ee] mainList">
        <div class="flex flex-row flex-nowrap justify-between items-center border-box px-2 mb-4 text-16px font-bold text-left text-[#333333] ruleTopic">
          <div class="ruleTopic_left">积分名</div>
          <div class="ruleTopic_right">赋予积分值</div>
        </div>
        <div class="flex flex-row flex-nowrap justify-between items-center  border-box pb-2 px-2 my-2 text-14px  text-left text-[#333333] border-b border-[#e5e5e5]  ruleList" v-for="(item,index) in allList" :key="index">
          <div>{{ item.tjg_mc }}</div>
          <div class="font-bold">+{{ item.tjg_fyjfz }}</div>
        </div>
      </div>
    </div>
  </div>
</template>


<style lang="scss" scoped>
.integralAll{
  height: 100vh;
  background-image: url("~/assets/ruleBg1.png");
  background-repeat:no-repeat ;
  background-position:top right ;
.mainList{
  background-image: url("~/assets/ruleBg2.png");
  background-repeat:no-repeat ;
  background-position: 65% 2% ;
}
}
</style>
