YHkamanager.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view>
  3. <customNav :shownav="true" :title="$t('tixian.yhkguanli')" tinColor="white" jiantou="1" titledetl=''></customNav>
  4. <view class="contentColumn contenV">
  5. <view class="contentColumn ItemContent">
  6. <text class="bangdingText">{{$t('tixian.bangdingyhk')}}</text>
  7. <text class="jiedanText">{{$t('tixian.qingbangdbryhk')}}</text>
  8. </view>
  9. <view class="contentInRowL ItemContent">
  10. <text class="tianjiaBT">{{$t('tixian.chikaren')}}:</text>
  11. <input class="jiedanText" type="text" :placeholder="$t('tixian.qingshuckrxm')" @input="chikareninput">
  12. </view>
  13. <view class="contentInRowL ItemContent">
  14. <text class="tianjiaBT">{{$t('tixian.kahao')}}:</text>
  15. <input class="jiedanText" type="number" :placeholder="$t('tixian.qingshukh')" @input="kahaoinput">
  16. </view>
  17. <view class="contentInRowL ItemContent">
  18. <text class="tianjiaBT">{{$t('tixian.yinghang')}}:</text>
  19. <input class="jiedanText" type="text" :placeholder="$t('tixian.xuanzeyanhang')" @input="yinhanginput">
  20. </view>
  21. <!-- <view class="contentInRowS ItemContent" @click="popgjm">
  22. <view class="contentInRowL">
  23. <text class="tianjiaBT">{{$t('tixian.yinghang')}}:</text>
  24. <text v-if="yinhang.length>0" class="jiedanText">{{yinhang}}</text>
  25. <text v-if="yinhang.length==0" class="jiedanText">{{$t('tixian.xuanzeyanhang')}}</text>
  26. </view>
  27. <image style="width: 32rpx;height: 32rpx;" src="/static/imags/youjian@3x.png" mode="scaleToFill"></image>
  28. </view> -->
  29. </view>
  30. <view class="yzmctV">
  31. <label class="querenBt" @click="bangding">{{$t('tixian.bangdingyhk')}}</label>
  32. </view>
  33. <popViewGG :tips="$t('tixian.xuanzeyanhang')" :show="showpop" :maskClosable="true" :isCancel="true" @chooseCancel="chooseCancel">
  34. <picker-view :indicator-style="indicatorStyle" :value="pvalue" @change="bindChange" class="picker-view">
  35. <picker-view-column>
  36. <view class="item" v-for="(item,index) in range" :key="index">{{item}}</view>
  37. </picker-view-column>
  38. </picker-view>
  39. </popViewGG>
  40. </view>
  41. </template>
  42. <script>
  43. import api from "@/pages/api/api.js"
  44. export default {
  45. data() {
  46. return {
  47. meiyouyhk:true,
  48. chikaren:'',
  49. kahao:'',
  50. yinhang:'',
  51. showpop:false,
  52. range: [],
  53. pvalue: [0],
  54. indicatorStyle: `height: 50px;`
  55. }
  56. },
  57. onLoad() {
  58. this.range= [
  59. '工商银行',
  60. '交通银行',
  61. '农业银行',
  62. '民生银行',
  63. '广发银行',
  64. '浦发银行',
  65. '兴业银行'
  66. ];
  67. },
  68. methods: {
  69. chikareninput(event){
  70. this.chikaren = event.target.value;
  71. },
  72. kahaoinput(event){
  73. this.kahao = event.target.value;
  74. },
  75. yinhanginput(event){
  76. this.yinhang = event.target.value;
  77. },
  78. bindChange (e) {
  79. var val = e.detail.value[0];
  80. this.yinhang=this.range[val];
  81. },
  82. popgjm(){
  83. this.showpop=true;
  84. },
  85. chooseCancel(i){
  86. this.showpop=false;
  87. },
  88. bangding(){
  89. this.addbankcard();
  90. },
  91. addbankcard(){
  92. //console.log('getUserMsg')
  93. if(''==this.kahao||''==this.yinhang||''==this.chikaren){
  94. uni.showToast({
  95. title: this.$t('tixian.qingtxwzyhkxx'),
  96. icon: 'none',
  97. duration: 2500
  98. })
  99. return;
  100. }
  101. api('addbankcard',{
  102. "number": this.kahao, //银行卡号
  103. "bankName": this.yinhang, //开户行
  104. "accountName": this.chikaren, //开户名
  105. "type": "0", //卡类型(0储蓄卡,1信用卡)
  106. "img": "" //银行图标
  107. },
  108. res=>{
  109. console.log(res)
  110. uni.navigateBack();
  111. },failc=>{
  112. //console.log('getadvertis----',failc)
  113. });
  114. },
  115. },
  116. }
  117. </script>
  118. <style lang="scss">
  119. // @font-face {
  120. // font-family: zrht;
  121. // src: url('/uni_modules/font/zrht.otf');
  122. // }
  123. page{
  124. background-color: whitesmoke;
  125. }
  126. .contenV{
  127. margin-top: 30rpx;
  128. width: 94%;
  129. margin-left: 3%;
  130. border-radius: 10rpx;
  131. box-shadow: 0px 0rpx 10rpx 0rpx darkgray;
  132. background-color: white;
  133. }
  134. .ItemContent{
  135. margin: 24rpx;
  136. border: solid whitesmoke;
  137. border-width: 0px 0px 2rpx 0px;
  138. }
  139. .jiedanText{
  140. font-size: 28rpx;
  141. color: darkgray;
  142. width: 80%;
  143. }
  144. .bangdingText{
  145. font-size: 28rpx;
  146. padding-bottom: 10rpx;
  147. }
  148. .tianjiaBT{
  149. width: 180rpx;
  150. text-align: right;
  151. font-size: 28rpx;
  152. font-weight: bold;
  153. color: #1A1A1A;
  154. }
  155. .yzmctV{
  156. display: flex;
  157. flex-direction: row;
  158. align-items: center;
  159. justify-content:flex-start;
  160. margin-top: 30rpx;
  161. width: 94%;
  162. margin-left: 3%;
  163. }
  164. .querenBt{
  165. margin-top: 30rpx;
  166. width: 100%;
  167. height: 60rpx;
  168. line-height: 60rpx;
  169. padding: 10rpx;
  170. border-radius: 20rpx;
  171. text-align: center;
  172. justify-content: center;
  173. background-color: #40AE36;
  174. color: white;
  175. box-shadow: 0px 0rpx 10rpx 0rpx #40AE36;
  176. }
  177. .picker-view {
  178. width: 750rpx;
  179. height: 270rpx;
  180. }
  181. .item {
  182. line-height: 90rpx;
  183. text-align: center;
  184. }
  185. </style>