service_select.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="wrap">
  3. <view class="title">请选择要添加的主营信息</view>
  4. <label v-for="item,index in select" :key="index" class="item" @tap="toAdd(item,index)">
  5. <image :src="isIndex == index?'https://wx.fujinyangche.com/nvrnetwork/images/select.png':'https://wx.fujinyangche.com/nvrnetwork/images/no_select.png'"/>
  6. <view>{{item.title}}</view>
  7. </label>
  8. <!-- <label>
  9. <radio name="allCar" value="商用车专修"/>商用车专修
  10. </label>
  11. <label>
  12. <radio name="catPart" value="4S店"/>4S店
  13. </label> -->
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. select:[
  21. {title:'小型汽车'},
  22. {title:'商用车专修'},
  23. {title:'4S店'},
  24. ],//选择分类
  25. isIndex:null,//默认选中
  26. paramType:'',//分类类型
  27. }
  28. },
  29. methods: {
  30. //跳转添加主营信息
  31. toAdd(item,index){
  32. this.isIndex = index;
  33. this.paramType = index + 1;
  34. let value = item.title;
  35. if(value == '4S店'){
  36. // uni.navigateTo({
  37. // })
  38. }else{
  39. uni.navigateTo({
  40. url:'../service_add/service_add?paramType=' + this.paramType
  41. })
  42. }
  43. }
  44. }
  45. }
  46. </script>
  47. <style>
  48. .wrap{
  49. padding-top:200rpx;
  50. box-sizing: border-box;
  51. }
  52. .title{
  53. font-size: 40rpx;
  54. color:#333333;
  55. margin-bottom: 30rpx;
  56. text-align: center;
  57. }
  58. .item{
  59. display:flex;
  60. color:#000000;
  61. font-size: 32rpx;
  62. margin-bottom: 32rpx;
  63. align-items: center;
  64. }
  65. .item image{
  66. display: block;
  67. width:30rpx;
  68. height:30rpx;
  69. margin-left: 40%;
  70. margin-right: 10rpx;
  71. }
  72. </style>