页面长表单循环写法

//调用接口获取Info
loadOrderDetail() {
				NET.request(API.GetOrderDetail2, {
					orderId: this.order_id
				}, 'GET').then(res => {
					this.info = res.data;
					console.log(this.info);
					this.setSupplierInfo()
					this.setImporterInfo()
					this.setOrderInfo()
				}).catch(res => {
					console.log('WxAppLogin failed: ', res)
				})
			},

//Info赋值
setImporterInfo(){
				var info = this.info;
				console.log('info',info)
				this.importerInfo = [{
					title: '订单编号',
					text: info.orderId
				}, {
					title: '创建时间',
					text: info.createTime
				}, {
					title: '目的港',
					text: info.portOfDestination
				}, {
					title: '分配装运',
					text: info.partialShipment == 1 ? '允许' : '不允许'
				}, {
					title: '转运',
					text: info.transport == 1 ? '允许' : '不允许'
				}, {
					title: '拼箱',
					text: info.groupageFreight	 == 1 ? '允许' : '不允许'
				}, {
					title: '联系人',
					text: info.buyerName
				}, {
					title: '联系电话',
					text: info.buyerPhone
				}, {
					title: '联系邮箱',
					text: info.buyerEmail
				}, {
					title: '交易方式',
					text: info.transactionMode
				}, {
					title: '付汇方式',
					text: {1:"tt",2:"TT1",3:"jiqi"}[info.remittanceWay]	
				}, {
					title: '运输方式',
					text: info.modeTransport
				}, {
					title: '海运险',
					text: info.marineInsurance
				}, {
					title: '备注',
					text: info.remark
				}];
			},
//页面循环
<view style="color: gray;line-height: 30px;" v-for="(item,i) in importerInfo">
					<view class="infoTitle">
						{{item.title}} :
					</view>
					<view class="infoText">
						{{item.text}}
					</view>
				</view>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值