expresstype.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="box">
  3. <view class="exp">
  4. <u-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
  5. <view class="item u-flex u-row-between" v-for="(item,idx) in radiolist1" :key="idx">
  6. <text>{{item.name}}</text>
  7. <u-radio :name="item.name" @change="radioChange(item)">
  8. </u-radio>
  9. </view>
  10. </u-radio-group>
  11. </view>
  12. <view class="bottom">
  13. <view class="btn" @click="toteach">
  14. {{i18n.enter}}
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. concant: '',
  24. code: '',
  25. radiolist1: [],
  26. };
  27. },
  28. computed: {
  29. i18n() {
  30. return this.$t('index')
  31. }
  32. },
  33. onLoad() {
  34. this.getlist()
  35. },
  36. methods: {
  37. getlist() {
  38. uni.$u.http.get('/api/express-company', {}).then((res) => {
  39. this.radiolist1 = res
  40. }).catch(() => {
  41. })
  42. },
  43. toteach() {
  44. const eventChannel = this.getOpenerEventChannel();
  45. eventChannel.emit('todcp', {
  46. 'concant': this.concant,
  47. 'code': this.code
  48. });
  49. uni.navigateBack()
  50. },
  51. groupChange(n) {
  52. console.log('groupChange', n);
  53. },
  54. radioChange(n) {
  55. console.log('radioChange', n);
  56. this.concant = n.name
  57. this.code = n.name
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .box {
  64. padding: 20rpx 24rpx;
  65. box-sizing: border-box;
  66. .bottom {
  67. width: 750rpx;
  68. height: 166rpx;
  69. background: #FFFFFF;
  70. padding: 18rpx 32rpx;
  71. box-sizing: border-box;
  72. position: fixed;
  73. bottom: 0;
  74. left: 0;
  75. .btn {
  76. width: 686rpx;
  77. height: 88rpx;
  78. background: #F83224;
  79. border-radius: 44rpx;
  80. font-family: PingFangSC, PingFang SC;
  81. font-weight: 500;
  82. font-size: 32rpx;
  83. color: #FFFFFF;
  84. line-height: 88rpx;
  85. text-align: center;
  86. font-style: normal;
  87. }
  88. }
  89. .item {
  90. width: 654rpx;
  91. height: 112rpx;
  92. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  93. }
  94. .exp {
  95. width: 702rpx;
  96. // height: 564rpx;
  97. background: #FFFFFF;
  98. border-radius: 16rpx;
  99. padding: 0 20rpx;
  100. }
  101. }
  102. </style>