|
|
- <template>
- <view class="container">
- <view class="header_infos">
- <view class="header_info_left" @click="getBack">
- <uni-icons type="left" size="30">
- </uni-icons>
- </view>
- <text class="header_info_right">
- 选择型号
- </text>
- </view>
-
- <view class="contents">
- <scroll-view scroll-y="true" class="scroll-view" :scroll-into-view="currentIndex">
- <view class="content" v-for="(item, index) in list" :key="index" @click="getName(item.name)">
- <text class="content-left">
- {{item.name}}
- </text>
- <uni-icons class="content-right" type="right" color="#c0c0c0"></uni-icons>
- </view>
- </scroll-view>
- </view>
-
- </view>
- </template>
-
- <script>
- import {childList} from '@/api.uts'
- export default {
- data() {
- return {
- list:[],
- currentIndex: '',
- clientInfo:{},
- certFront:'',
- carPic:'',
- certBack:'',
- }
- },
- onLoad(options) {
- this.clientInfo = JSON.parse(decodeURIComponent(options.clientInfo));
- },
- mounted() {
- childList({pid:getApp().pid_1}).then((res)=>{
- this.list =res.result.records
- })
- },
- methods: {
- getBack(){
- uni.navigateBack(
- {delta:1}
- )
- },
- getName(name){
- this.clientInfo.appOrderCarList[0].carSeries = this.clientInfo.appOrderCarList[0].carSeries + name;
- console.log('3',this.clientInfo.appOrderCarList[0].carSeries);
- if(getApp().flag != 1){
- uni.redirectTo (
- {url:'/pages/index/PayPal?clientInfo='+ encodeURIComponent(JSON.stringify(this.clientInfo))}
- )
- }else{
- uni.redirectTo (
- {url:'/pages/index/PayPal_pinpai?clientInfo='+ encodeURIComponent(JSON.stringify(this.clientInfo))}
- )
- }
-
- }
- }
- }
- </script>
-
- <style scss>
- .container-info{
- height: ;
- }
-
- .header_infos{
- height: 10%;
- display: flex;
- flex-direction: row;
- align-items: center;
- background-color: #f8f8f8;
- }
- .header_info_right{
- width: 80%;
- display: flex;
- align-items: center;
- justify-content: center;
- left: 35%;
- }
-
- .contents{
- height: 100%;
- width: 100%;
- }
-
- .scroll-view {
- flex: 1;
- height: 100%;
- /* margin-top: 10%; */
- background-color: #ffffff;
- }
- .content{
- height: 5%;
- display: flex;
- flex-direction: row;
- border-bottom: 0.01rem solid #e0e0e0;
- /* height: 15%; */
- }
- .content-left{
- font-size: 0.8rem;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .content-right{
- margin-left: auto;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- </style>
|