合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
2.4 KiB

4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="container">
  3. <view class="header_infos">
  4. <view class="header_info_left" @click="getBack">
  5. <uni-icons type="left" size="30">
  6. </uni-icons>
  7. </view>
  8. <text class="header_info_right">
  9. 选择型号
  10. </text>
  11. </view>
  12. <view class="contents">
  13. <scroll-view scroll-y="true" class="scroll-view" :scroll-into-view="currentIndex">
  14. <view class="content" v-for="(item, index) in list" :key="index" @click="getName(item.name)">
  15. <text class="content-left">
  16. {{item.name}}
  17. </text>
  18. <uni-icons class="content-right" type="right" color="#c0c0c0"></uni-icons>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import {childList} from '@/api.uts'
  26. export default {
  27. data() {
  28. return {
  29. list:[],
  30. currentIndex: '',
  31. clientInfo:{},
  32. certFront:'',
  33. carPic:'',
  34. certBack:'',
  35. }
  36. },
  37. onLoad(options) {
  38. this.clientInfo = JSON.parse(decodeURIComponent(options.clientInfo));
  39. },
  40. mounted() {
  41. childList({pid:getApp().pid_1}).then((res)=>{
  42. this.list =res.result.records
  43. })
  44. },
  45. methods: {
  46. getBack(){
  47. uni.navigateBack(
  48. {delta:1}
  49. )
  50. },
  51. getName(name){
  52. this.clientInfo.appOrderCarList[0].carSeries = this.clientInfo.appOrderCarList[0].carSeries + name;
  53. console.log('3',this.clientInfo.appOrderCarList[0].carSeries);
  54. if(getApp().flag != 1){
  55. uni.redirectTo (
  56. {url:'/pages/index/PayPal?clientInfo='+ encodeURIComponent(JSON.stringify(this.clientInfo))}
  57. )
  58. }else{
  59. uni.redirectTo (
  60. {url:'/pages/index/PayPal_pinpai?clientInfo='+ encodeURIComponent(JSON.stringify(this.clientInfo))}
  61. )
  62. }
  63. }
  64. }
  65. }
  66. </script>
  67. <style scss>
  68. .container-info{
  69. height: ;
  70. }
  71. .header_infos{
  72. height: 10%;
  73. display: flex;
  74. flex-direction: row;
  75. align-items: center;
  76. background-color: #f8f8f8;
  77. }
  78. .header_info_right{
  79. width: 80%;
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. left: 35%;
  84. }
  85. .contents{
  86. height: 100%;
  87. width: 100%;
  88. }
  89. .scroll-view {
  90. flex: 1;
  91. height: 100%;
  92. /* margin-top: 10%; */
  93. background-color: #ffffff;
  94. }
  95. .content{
  96. height: 5%;
  97. display: flex;
  98. flex-direction: row;
  99. border-bottom: 0.01rem solid #e0e0e0;
  100. /* height: 15%; */
  101. }
  102. .content-left{
  103. font-size: 0.8rem;
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. }
  108. .content-right{
  109. margin-left: auto;
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. }
  114. </style>