operatorInfo.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view>
  3. <view class="form">
  4. <form>
  5. <view class="uni-form-item">
  6. <view class="title">运营商名称</view>
  7. <view class="input">
  8. <input placeholder="运营商名称" v-model="formData.name" style="margin-left: 30rpx;" />
  9. </view>
  10. </view>
  11. <view class="uni-form-item">
  12. <view class="title">运营商编号</view>
  13. <view class="input">
  14. <input placeholder="运营商编号" v-model="formData.number" style="margin-left: 30rpx;" />
  15. </view>
  16. </view>
  17. <view class="uni-form-item">
  18. <view class="title">省份</view>
  19. <view class="input">
  20. <input placeholder="省份" v-model="formData.province" style="margin-left: 30rpx;" />
  21. </view>
  22. </view>
  23. <view class="uni-form-item">
  24. <view class="title">城市</view>
  25. <view class="input">
  26. <input placeholder="城市" v-model="formData.city" style="margin-left: 30rpx;" />
  27. </view>
  28. </view>
  29. <view class="uni-form-item">
  30. <view class="title">详细地址</view>
  31. <view class="input">
  32. <input placeholder="详细地址" v-model="formData.address" style="margin-left: 30rpx;" />
  33. </view>
  34. </view>
  35. <view class="uni-form-item">
  36. <view class="title">联系人</view>
  37. <view class="input">
  38. <input placeholder="联系人" v-model="formData.contact" style="margin-left: 30rpx;" />
  39. </view>
  40. </view>
  41. <view class="uni-form-item">
  42. <view class="title">联系电话</view>
  43. <view class="input">
  44. <input placeholder="联系电话" v-model="formData.tel" style="margin-left: 30rpx;" />
  45. </view>
  46. </view>
  47. </form>
  48. </view>
  49. <view class="uni-btn-v">
  50. <button form-type="submit" class="button1">删除</button>
  51. <button form-type="submit" class="button2">修改</button>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. formData: {
  60. name: '',
  61. number: '',
  62. contact: '',
  63. tel: '',
  64. address: '',
  65. province: '',
  66. city: '',
  67. }
  68. }
  69. },
  70. onLoad(e) {
  71. console.log(e);
  72. uni.request({
  73. url: 'http://127.0.0.1:9999/operator/detail?code=' + e.code,
  74. method: 'GET',
  75. data: {},
  76. success: res => {
  77. this.formData = res.data.data.operator;
  78. console.log(this.formData);
  79. },
  80. });
  81. },
  82. methods: {
  83. }
  84. }
  85. </script>
  86. <style>
  87. .title {
  88. margin-left: 30rpx;
  89. margin-top: 20rpx;
  90. margin-bottom: 20rpx;
  91. font-size: 26rpx;
  92. }
  93. .form {
  94. margin-top: 26rpx;
  95. padding-top: 10rpx;
  96. background-color: white;
  97. width: 702rpx;
  98. height: 1220rpx;
  99. margin-left: 24rpx;
  100. border-radius: 10rpx;
  101. }
  102. .input {
  103. background-color: #F7F8F9;
  104. width: 654rpx;
  105. margin-left: 24rpx;
  106. height: 98rpx;
  107. border-radius: 10rpx;
  108. display: flex;
  109. align-items: center;
  110. }
  111. .uni-btn-v {
  112. display: flex;
  113. flex-direction: row;
  114. }
  115. .button1 {
  116. width: 315rpx;
  117. height: 76rpx;
  118. margin-top: 30rpx;
  119. background-color: #E02021;
  120. color: white;
  121. font-size: unset;
  122. }
  123. .button2 {
  124. width: 315rpx;
  125. height: 76rpx;
  126. margin-top: 30rpx;
  127. background-color: #007AFF;
  128. color: white;
  129. font-size: unset;
  130. }
  131. </style>