Wodeyanhangka.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view>
  3. <customNav :shownav="true" :title="$t('tixian.wodeyhk')" tinColor="white" jiantou="1" titledetl=''></customNav>
  4. <view class="contenV">
  5. <view v-for="(item,index) in carList">
  6. <view :class="[index==selectIndex?'contentInRowS ItemContentS':'contentInRowS ItemContent']">
  7. <view class="contentColumn" @click="xuanzeyhk(index)">
  8. <text class="tianjiaBT">{{$t('tixian.yinghang')}}</text>
  9. <text class="tianjiaBT">{{$t('tixian.kahao')}}</text>
  10. </view>
  11. <view class="contentColumn" @click="xuanzeyhk(index)">
  12. <text class="jiedanText">{{item.bankName}}</text>
  13. <text class="jiedanText">{{item.number}}</text>
  14. </view>
  15. <view class="" @click="xuanzeyhk(index)">
  16. <image style="width: 100rpx;height: 100rpx;" src="/static/imags/yinlian.png" mode="scaleToFill"></image>
  17. </view>
  18. <view class="" @click="jiebang(index)">
  19. <text class="jiebangText">{{$t('tixian.jiebang')}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="bottomfloatV" @click="gotoyhkmanager">
  25. <label class="tianjiaBTC">{{$t('tixian.tianjayhk')}}</label>
  26. </view>
  27. <!-- 提示窗示例 -->
  28. <uni-popup ref="alertDialog" type="dialog">
  29. <uni-popup-dialog type="NOMLE" :cancelText="$t('index.quxiao')" :confirmText="$t('index.queren')" :title="noteMsgtitle" :content="noteMsgmsg" @confirm="dialogConfirm"
  30. @close="dialogClose"></uni-popup-dialog>
  31. </uni-popup>
  32. </view>
  33. </template>
  34. <script>
  35. import api from "@/pages/api/api.js"
  36. export default {
  37. data() {
  38. return {
  39. noteMsgtitle:'',
  40. noteMsgmsg:'',
  41. isSelect:false,
  42. carList:'',
  43. selectIndex:0,
  44. jiebangid:-1,
  45. state:0
  46. }
  47. },
  48. onLoad(option) {
  49. this.state = option.state;
  50. },
  51. onShow() {
  52. this.getbankcard();
  53. this.selectIndex=uni.getStorageSync("defyanhangK");
  54. },
  55. methods: {
  56. jiebang(index){
  57. var car = this.carList[index];
  58. this.jiebangid=car.id;
  59. this.noteMsgtitle=this.$t('tixian.querenjieb');
  60. this.noteMsgmsg= car.bankName+':'+car.number;
  61. this.$refs.alertDialog.open('center');
  62. },
  63. dialogConfirm() {
  64. console.log('点击确认')
  65. if(this.jiebangid!=-1){
  66. this.delebankcard();
  67. }
  68. },
  69. dialogClose() {
  70. console.log('点击关闭')
  71. },
  72. gotoyhkmanager(){
  73. uni.navigateTo({
  74. url:'/pages/tixian/YHkamanager'
  75. })
  76. },
  77. xuanzeyhk(index){
  78. if(this.state==0){
  79. return;
  80. }
  81. this.selectIndex=index;
  82. uni.setStorageSync('defyanhangK',index);
  83. uni.navigateBack();
  84. },
  85. getbankcard(){
  86. //console.log('getUserMsg')
  87. api('getbankcard',{
  88. },
  89. r=>{
  90. console.log(res)
  91. this.carList= r.data.data;
  92. },failc=>{
  93. //console.log('getadvertis----',failc)
  94. });
  95. },
  96. delebankcard(){
  97. api('delebankcard',{
  98. id:this.jiebangid
  99. },
  100. res=>{
  101. console.log(res)
  102. this.getbankcard();
  103. },failc=>{
  104. //console.log('getadvertis----',failc)
  105. });
  106. },
  107. }
  108. }
  109. </script>
  110. <style lang="scss">
  111. page{
  112. background-color: whitesmoke;
  113. }
  114. .contenV{
  115. width: 94%;
  116. margin-left: 3%;
  117. }
  118. .ItemContent{
  119. margin-top: 30rpx;
  120. padding: 24rpx;
  121. border-radius: 10rpx;
  122. box-shadow: 0px 0rpx 10rpx 0rpx darkgray;
  123. background-color: white;
  124. }
  125. .ItemContentS{
  126. margin-top: 30rpx;
  127. padding: 24rpx;
  128. border-radius: 10rpx;
  129. box-shadow: 0px 0rpx 10rpx 0rpx #386EF5;
  130. background-color: white;
  131. }
  132. .jiedanText{
  133. font-size: 28rpx;
  134. color: darkgray;
  135. }
  136. .tianjiaBT{
  137. width: 160rpx;
  138. text-align: left;
  139. font-size: 28rpx;
  140. font-weight: bold;
  141. color: #1A1A1A;
  142. }
  143. .jiebangText{
  144. font-size: 30rpx;
  145. color: #386EF5;
  146. text-decoration:underline;
  147. }
  148. .bottomfloatV{
  149. position: fixed;
  150. left: 10%;
  151. width:80%;
  152. right: 0;
  153. bottom: 40rpx;
  154. z-index: 999;
  155. background-color: white;
  156. height: 76rpx;
  157. line-height: 76rpx;
  158. border-radius: 10rpx;
  159. border: 2rpx solid darkgray;
  160. text-align: center;
  161. }
  162. .tianjiaBTC{
  163. text-align: center;
  164. font-size: 28rpx;
  165. font-weight: bold;
  166. color: #1A1A1A;
  167. width:100%;
  168. }
  169. </style>