123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <view :style="colorStyle">
- <form @submit="recharge">
- <view class="ChangePassword">
- <view class="list">
- <view class="item">
- <view class="name">
- 卡号:
- </view>
- <input class="inputItem" type='number' placeholder='填写卡号' placeholder-class='placeholder'
- v-model="phone"></input>
- </view>
- <view class="item">
- <view class="name">
- 卡密:
- </view>
- <input class="inputItem" type='number' placeholder='填写卡密' placeholder-class='placeholder'
- v-model="pwd"></input>
- </view>
- </view>
- <button form-type="submit" class="confirmBnt bg-color">确认激活</button>
- </view>
- </form>
- <!-- #ifdef MP -->
- <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
- <!-- #endif -->
- </view>
- </template>
- <script>
- import {
- recharge
- } from '@/api/new.js';
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- mapGetters
- } from "vuex";
- import colors from '@/mixins/color.js';
- export default {
- mixins: [colors],
- data() {
- return {
- phone: '',
- pwd: '',
- };
- },
- computed: mapGetters(['isLogin']),
- onLoad(options) {
- if (!this.isLogin) {
- toLogin();
- }
- },
- onShow() {},
- methods: {
- onLoadFun: function() {
- this.isShowAuth = false
- },
- // 授权关闭
- authColse: function(e) {
- this.isShowAuth = e
- },
- recharge: function() {
- let that = this;
- if (!that.phone) return that.$util.Tips({
- title: '请填写卡号!'
- });
- if (!that.pwd) return that.$util.Tips({
- title: '请填写卡密'
- });
- uni.showLoading({
- title: '激活中',
- mask: true
- });
- recharge({
- no: that.phone,
- pwd: that.pwd,
- }).then(res => {
- return that.$util.Tips({
- title: res.msg,
- icon: 'success'
- }, {
- tab: 4,
- url: '/pages/user/user'
- });
- }).catch(error => {
- return that.$util.Tips({
- title: error,
- });
- })
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #fff !important;
- }
- .ChangePassword {
- .confirmBnt {
- font-size: 32rpx;
- width: 580rpx;
- height: 90rpx;
- border-radius: 45rpx;
- color: #fff;
- margin: 92rpx auto 0 auto;
- text-align: center;
- line-height: 90rpx;
- }
- .phone {
- font-size: 32rpx;
- font-weight: bold;
- text-align: center;
- margin-top: 55rpx;
- }
- .list {
- width: 580rpx;
- margin: 53rpx auto 0 auto;
- .item {
- width: 100%;
- height: 110rpx;
- border-bottom: 2rpx solid #f0f0f0;
- display: flex;
- justify-content: flex-start;
- .name{
- flex-shrink: 0;
- line-height: 110rpx;
- padding-right: 20rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- input {
- flex-grow: 1;
- width: 100%;
- height: 100%;
- font-size: 32rpx;
- }
- .placeholder {
- color: #b9b9bc;
- }
- }
- }
- }
- </style>
|