<template>
  <div class="activation">
    <div class="con">
        <div class="con_txt">请输入激活码</div>
        <input class="activation_code f_dinB" :focus="true" v-model="code">
    </div>
    <div class="btnbar">
        <div class="btn" @click="jihuo">立即激活</div>
    </div>
  </div>
</template>

<script>
import { post } from "@/request/api.js";
export default {
  name: "activation",
  props: {},
  components: {},
  data() {
    return {
        code: '',
    };
  },
  methods: {
    jihuo(){
        let code = this.code
        post("local/activation",{code}).then(res=>{
            if(res.code == 0){
				uni.switchTab({ url: "/pages/orderingfood/merchantlist" });
            }
        })
    }
  },
  onLoad(da) {},
  onShow() {},
  mounted() {},
};
</script>

<style scoped lang='scss'>
.activation{
    padding: 0 30rpx;
}
.con{
    margin-top: 100rpx;
    .con_txt{
        color: #999;
        font-size: 30rpx;
        text-align: center;
        margin-bottom: 16rpx;
    }
    .activation_code{
        // color: #000;
        height: 90rpx;
        background-color: #fff;
        border-radius: 12rpx;
        text-align: center;
        font-weight: bold;
        letter-spacing: 4rpx;
        font-size: 38rpx;
    }
}
.btnbar{
    position: fixed;
    bottom: 60rpx;
    left: 0;
    padding: 0 30rpx;
    width: 100%;
    .btn{
        font-weight: bold;
        height: 90rpx;
        line-height: 90rpx;
        text-align: center;
        background: radial-gradient(circle, #d3aa79,#ebcda8);
        border-radius: 45rpx;
    }
}
</style>