소스 검색

upload

newCard
HolyKnightIX 2 년 전
부모
커밋
436f971a51
2개의 변경된 파일20개의 추가작업 그리고 8개의 파일을 삭제
  1. +19
    -7
      pages/exchangeCard/exchangeCard.js
  2. +1
    -1
      pages/exchangeCard/exchangeCard.wxml

+ 19
- 7
pages/exchangeCard/exchangeCard.js 파일 보기

@@ -27,7 +27,7 @@ Page({
searchCard(e) {
let code = e.detail.value.code;
this.setData({
code: e.detail.value.code
code: code
})
this.getCardDetail(code)
},
@@ -93,6 +93,13 @@ Page({
})
},

codeInput(e) {
console.log(e);
this.setData({
code: e.detail.value
})
},

// 扫描二维码
goScanCode() {
console.log('scan!!!');
@@ -124,13 +131,14 @@ Page({
})
.then(res => {
console.log(res, 'res');
// 取不到时清空参数
that.setData({
title: res.data.title,
phone: res.data.ownerPhone,
ownerUserId: res.data.ownerUserId,
eCardId: res.data.eCardId,
owned: res.data.owned,
remainAmount: res.data.remainAmount / 100,
title: res.data.title || "",
phone: res.data.ownerPhone || "",
ownerUserId: res.data.ownerUserId || "",
eCardId: res.data.eCardId || "",
owned: res.data.owned || "",
remainAmount: res.data.remainAmount / 100 || "",
isSHowInfoCard: true // 显示卡详情
})
})
@@ -187,6 +195,10 @@ Page({

submit() {
const data = this.data
const e = {
detail: { value: { code: this.data.code } }
}
this.searchCard(e)
this.getCouponOrderByPassword(data.code)
},



+ 1
- 1
pages/exchangeCard/exchangeCard.wxml 파일 보기

@@ -9,7 +9,7 @@

<form bindsubmit='searchCard' report-submit='true'>
<view class="section">
<input name='code' placeholder="请输入卡号卡密或扫描二维码" clearable value="{{code}}" />
<input name='code' placeholder="请输入卡号卡密或扫描二维码" clearable value="{{code}}" bindinput="codeInput" />
<button size="primarySize" style="background:#FD832D;color:#fff;" hover-class="opcaity" form-type="submit">查询</button>
<image class="scan" src="../../assets/images/scan.png" bindtap="goScanCode"></image>
</view>


불러오는 중...
취소
저장