| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view>
- <view class="content">
- <view class="id">
- <label>充值卡号</label>
- <view><input placeholder="输入充值卡卡号" placeholder-class="placeholder" type="number" @input="getcardId" /></view>
- </view>
- <view class="pas">
- <label>充值卡密码</label>
- <view><input placeholder="输入充值卡密码" placeholder-class="placeholder" @input="getPassword" password type="number" /></view>
- </view>
- </view>
- <view class="chongzhi" @tap="remainder">确认激活</view>
- </view>
- </template>
- <script>
- const req = require('../../utils/request');
- const app = getApp();
- export default {
- data() {
- return {};
- },
- methods: {
- getcardId(e) {
- console.log(e.detail.value)
- this.setData({
- id: e.detail.value
- })
- },
- getPassword(e) {
- console.log(e.detail.value)
- this.setData({
- password: e.detail.value
- })
- },
- remainder() {
- if (!this.id) {
- return req.msg('请输入充值卡号')
- }
- if (!this.password) {
- return req.msg('请输入充值卡密码')
- }
- req.postRequest('/api/rrLogs/activationCard', {
- cardId: this.id,
- cardPW: this.password
- }, res => {
- if (res == 0) {
- uni.showToast({
- title: '充值成功!',
- icon: 'success',
- success: function () {
- setTimeout(function () {
- uni.navigateBack({
- delta: 1
- });
- }, 1500);
- }
- })
- // app.globalData.navigateTo('wallet/rechargeSuccess/index')
-
- } else {
-
- }
- })
- }
- }
- }
- </script>
- <style>
- @import "./index.css";
- </style>
|