wx.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="wx">
  5. <text>微信号</text>
  6. <input type="text" value="" placeholder="请输入微信号" />
  7. </view>
  8. <view class="erweima">
  9. <text>微信收款码</text>
  10. <view class="img" @click="upload()">
  11. <image src="../../static/img/add.png" mode="" v-if="image == ''"></image>
  12. <image :src="image" mode="" v-else></image>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="button">
  17. 确认
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import { uploads } from '@/api/user.js'
  23. export default {
  24. data() {
  25. return {
  26. image:''
  27. };
  28. },
  29. methods: {
  30. upload(){
  31. uploads({
  32. filename: ''
  33. }).then(data => {
  34. this.image = data[0].url;
  35. })
  36. }
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. page , .content{
  42. height: 100%;
  43. margin: 0;
  44. padding: 0;
  45. }
  46. .box{
  47. margin:20rpx 0 100rpx 0;
  48. width: 100%;
  49. background: #FFFFFF;
  50. .wx{
  51. border-bottom: #F0F0F0 solid 1rpx;
  52. padding: 20rpx 0 30rpx 0;
  53. display: flex;
  54. text{
  55. width: 150rpx;
  56. margin: 0 30rpx;
  57. }
  58. input{
  59. font-size: 28rpx;
  60. font-family: PingFang SC;
  61. font-weight: 400;
  62. color: #999999;
  63. line-height: 100rpx;
  64. }
  65. }
  66. .erweima{
  67. padding: 30rpx 0;
  68. display: flex;
  69. text{
  70. margin: 0 30rpx;
  71. width: 150rpx;
  72. font-size: 30rpx;
  73. font-family: PingFang SC;
  74. font-weight: 400;
  75. color: #333333;
  76. }
  77. .img{
  78. width: 160rpx;
  79. height: 160rpx;
  80. image{
  81. width: 100%;
  82. height: 100%;
  83. }
  84. }
  85. }
  86. }
  87. .button{
  88. margin: 0 auto;
  89. width: 560rpx;
  90. height: 80rpx;
  91. background: linear-gradient(0deg, #2E58FF, #32C6FF);
  92. border-radius: 40rpx;
  93. font-size: 30rpx;
  94. font-family: PingFangSC;
  95. font-weight: 500;
  96. color: #FFFFFF;
  97. line-height: 80rpx;
  98. text-align: center;
  99. }
  100. </style>