| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <uni-popup ref="popup" :mask-click="false">
- <div class="popup_con">
- <div class="p_tit">
- <span class="tit">{{ tit }}</span>
- <span @click="close" class="close iconfont"></span>
- </div>
- <div class="p_con">
- <div class="con_txt">请输入激活码</div>
- <input class="activation_code dinB" :focus="focus" v-model="code" />
- </div>
- <div class="btnbar">
- <div class="btn" @click="jihuo">立即激活</div>
- </div>
- </div>
- </uni-popup>
- </template>
- <script>
- import { post } from "@/request/api.js";
- export default {
- name: "activation",
- props: {},
- props: {
- tit: {
- type: String,
- default: "激活"
- },
- },
- components: {},
- data() {
- return {
- code: "", //激活码
- focus: false
- };
- },
- methods: {
- jihuo() {
- let code = this.code
- post("local/activation", { code }).then(res => {
- if (res.code == 0) {
- uni.showToast({ title: "激活成功", icon: "none" });
- this.close()
- }
- })
- },
- open() {
- this.$refs.popup.open('center');
- this.focus = true
- },
- close() {
- this.$refs.popup.close()
- this.$emit('close');
- }
- },
- onLoad(da) {},
- onShow() {},
- mounted() {},
- };
- </script>
- <style scoped lang='scss'>
- .popup_con {
- background-color: #fff;
- width: 80vw;
- border-radius: 16rpx;
- padding: 0 30rpx 28rpx;
- .p_tit {
- min-height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- .close {
- color: #666;
- font-size: 40rpx;
- font-weight: bold;
- float: right;
- }
- }
- .p_con {
- padding: 50rpx 0;
- .con_txt {
- color: #999;
- font-size: 30rpx;
- text-align: center;
- margin-bottom: 16rpx;
- }
- .activation_code {
- height: 70rpx;
- background-color: rgba($color: #000, $alpha: 0.05);
- border-radius: 12rpx;
- text-align: center;
- font-weight: bold;
- letter-spacing: 4rpx;
- font-size: 38rpx;
- }
- }
- .btnbar {
- // margin-top: 28rpx;
- .btn {
- font-weight: bold;
- height: 70rpx;
- line-height: 70rpx;
- text-align: center;
- background: radial-gradient(circle, #d3aa79, #ebcda8);
- border-radius: 35rpx;
- }
- }
- }
- </style>
|