Commit 32c69236 authored by linxin's avatar linxin

add

parent 8f31efdb
...@@ -16,4 +16,3 @@ module.exports = merge(prodEnv, { ...@@ -16,4 +16,3 @@ module.exports = merge(prodEnv, {
currentVersion: '"1.9.0"', currentVersion: '"1.9.0"',
}) })
...@@ -13,3 +13,4 @@ module.exports = { ...@@ -13,3 +13,4 @@ module.exports = {
appId: '"com.xcmg.app"', appId: '"com.xcmg.app"',
currentVersion: '"1.6.2"' currentVersion: '"1.6.2"'
} }
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
<input slot="content" v-model="info.project_number" readonly placeholder="暂无数据" > <input slot="content" v-model="info.project_number" readonly placeholder="暂无数据" >
</item> </item>
<item> <item>
<div slot="name">经销商</div> <div slot="name">{{ info.bp_agent_name?'经销商':'办事处' }}</div>
<input slot="content" v-model="info.bp_agent_name" readonly placeholder="暂无数据" > <div slot="content">{{ info.bp_agent_name?info.bp_agent_name:info.office_name }}</div>
</item> </item>
<item> <item>
<div slot="name">承租人</div> <div slot="name">承租人</div>
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
agentPic: '', // 经销商担保协议图片 agentPic: '', // 经销商担保协议图片
bankPic: '', // 农行代扣授权书图片 bankPic: '', // 农行代扣授权书图片
legalPic: '', // 法人授权书图片 legalPic: '', // 法人授权书图片
confirm_id: '', confirm_id: this.$route.params.confirm_id,
readed: require('@/assets/constractSigning/read.png'), // 已读 readed: require('@/assets/constractSigning/read.png'), // 已读
unRead: require('@/assets/constractSigning/unread.png'), // 未读 unRead: require('@/assets/constractSigning/unread.png'), // 未读
tabNum: 0, tabNum: 0,
...@@ -243,8 +243,8 @@ export default { ...@@ -243,8 +243,8 @@ export default {
vm.getDetail() vm.getDetail()
vm.getEquipment() vm.getEquipment()
vm.getAttachment() vm.getAttachment()
vm.confirm_id = vm.$route.params.confirm_id
} }
vm.confirm_id = vm.$route.params.confirm_id
vm.agentPic = vm.unRead vm.agentPic = vm.unRead
vm.leasePic = vm.unRead vm.leasePic = vm.unRead
if (vm.$route.params.confirm_status === 'SUBMIT') { if (vm.$route.params.confirm_status === 'SUBMIT') {
...@@ -410,7 +410,7 @@ export default { ...@@ -410,7 +410,7 @@ export default {
let vm = this let vm = this
let url = $config.basePath + 'car_id_card_query' let url = $config.basePath + 'car_id_card_query'
let param = { let param = {
confirm_id: vm.confirm_id, confirm_id: vm.$route.params.confirm_id,
} }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
......
...@@ -197,18 +197,7 @@ export default { ...@@ -197,18 +197,7 @@ export default {
border: 2px solid #bcc6ff; border: 2px solid #bcc6ff;
} }
} }
.content {
position: absolute;
top: 0;
}
.scrollContent {
padding-top: 1rem;
padding-bottom: 120px;
}
.tab-style {
width: 100%;
position: absolute;
}
} }
.platform-ios { .platform-ios {
#person { #person {
......
...@@ -222,7 +222,11 @@ ...@@ -222,7 +222,11 @@
<tab-button v-if="isReadOnly" class="before" @click.native="$routeGo()">上一步</tab-button> <tab-button v-if="isReadOnly" class="before" @click.native="$routeGo()">上一步</tab-button>
<tab-button class="next" @click.native="next">下一步</tab-button> <tab-button class="next" @click.native="next">下一步</tab-button>
</bottom-tab> </bottom-tab>
<h-modal ref="modal" v-model="showModalValue" class="flow" position="bottom"> <SelectProduct
ref="product"
:bp_agent_id="bp_agent_id"
:division="saveInfo.division" @selectedProduct="selectedProduct" />
<!-- <h-modal ref="modal" v-model="showModalValue" class="flow" position="bottom">
<h-view id="product-list"> <h-view id="product-list">
<h-header :proportion="[1,4,1]" class="bar-custom"> <h-header :proportion="[1,4,1]" class="bar-custom">
<span slot="center" style="color:#fff">选择产品</span> <span slot="center" style="color:#fff">选择产品</span>
...@@ -261,7 +265,7 @@ ...@@ -261,7 +265,7 @@
</div> </div>
</h-content> </h-content>
</h-view> </h-view>
</h-modal> </h-modal> -->
<h-modal ref="modal" v-model="showModalBusiness " class="flow" position="bottom"> <h-modal ref="modal" v-model="showModalBusiness " class="flow" position="bottom">
<h-view id="businuss-list"> <h-view id="businuss-list">
<h-header :proportion="[1,4,1]" class="bar-custom"> <h-header :proportion="[1,4,1]" class="bar-custom">
...@@ -313,10 +317,12 @@ ...@@ -313,10 +317,12 @@
<script> <script>
import CurrencyInput from '../../components/currencyInput' import CurrencyInput from '../../components/currencyInput'
import RateInput from '@/components/rateInput' import RateInput from '@/components/rateInput'
import SelectProduct from './select-product'
export default { export default {
components: { components: {
CurrencyInput, CurrencyInput,
RateInput, RateInput,
SelectProduct,
}, },
data () { data () {
return { return {
...@@ -489,6 +495,15 @@ export default { ...@@ -489,6 +495,15 @@ export default {
}) })
}, },
methods: { methods: {
getProduct () {
this.$refs.product.init()
this.$refs.product.getProduct()
this.$refs.product.show()
},
selectedProduct (e) {
this.saveInfo.product_id = e.product_id
this.saveInfo.product_id_n = e.product_id_n
},
check (e) { check (e) {
if (e < 1000) { if (e < 1000) {
hlsPopup.showLongCenter('设备单价不能小于1000元!') hlsPopup.showLongCenter('设备单价不能小于1000元!')
...@@ -1011,113 +1026,113 @@ export default { ...@@ -1011,113 +1026,113 @@ export default {
} }
}) })
}, },
selectProduct (e) { // selectProduct (e) {
let vm = this // let vm = this
this.saveInfo.product_id_n = e.product_name // this.saveInfo.product_id_n = e.product_name
this.saveInfo.product_id = e.product_id // this.saveInfo.product_id = e.product_id
setTimeout(() => { // setTimeout(() => {
vm.showModalValue = false // vm.showModalValue = false
}, 100) // }, 100)
}, // },
loadMoreProduct () { // loadMoreProduct () {
if (this.keyWordProduct) { // if (this.keyWordProduct) {
this.searchProduct() // this.searchProduct()
} else { // } else {
this.getProduct() // this.getProduct()
} // }
}, // },
searchProduct () { // searchProduct () {
let vm = this // let vm = this
vm.divisionLists = [] // vm.divisionLists = []
vm.pagenumSearch = 1 // vm.pagenumSearch = 1
let randomString = Math.floor(Math.random() * 21) // let randomString = Math.floor(Math.random() * 21)
let url = // let url =
process.env.basePath + // process.env.basePath +
'prd_product_list' + // 'prj_product_list' +
'&index' + // '&index' +
`'${randomString}'` // `'${randomString}'`
let param = { // let param = {
bp_agent_id: vm.bp_agent_id, // bp_agent_id: vm.bp_agent_id,
division: vm.saveInfo.division, // division: vm.saveInfo.division,
user_phone: window.localStorage.getItem('user_phone'), // user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10, // pagesize: 10,
pagenum: vm.pagenumSearch, // pagenum: vm.pagenumSearch,
searchInput: vm.keyWordProduct, // searchInput: vm.keyWordProduct,
} // }
hlsPopup.showLoading('请稍候') // hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) { // vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
let returnData = [] // let returnData = []
returnData = res.lists // returnData = res.lists
if (returnData.length === 0) { // if (returnData.length === 0) {
vm.divisionLists = returnData // vm.divisionLists = returnData
} else if (returnData.length > 0 && returnData.length < 10) { // } else if (returnData.length > 0 && returnData.length < 10) {
vm.divisionLists = returnData // vm.divisionLists = returnData
vm.$refs.scroll.update(true) // vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { // } else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) { // vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index]) // vm.divisionLists.push(array[index])
}) // })
vm.pagenumSearch++ // vm.pagenumSearch++
vm.$refs.scroll.update(false) // vm.$refs.scroll.update(false)
} // }
vm.divisionLists.forEach(item => { // vm.divisionLists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token // item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
}) // })
} else { // } else {
hlsPopup.showLongCenter(res.message) // hlsPopup.showLongCenter(res.message)
} // }
}) // })
}, // },
getProduct () { // getProduct () {
let vm = this // let vm = this
vm.divisionLists = [] // vm.divisionLists = []
vm.pagenum = 1 // vm.pagenum = 1
vm.showModalValue = true // vm.showModalValue = true
let randomString = Math.floor(Math.random() * 21) // let randomString = Math.floor(Math.random() * 21)
let url = // let url =
process.env.basePath + // process.env.basePath +
'prj_product_list' + // 'prj_product_list' +
'&index' + // '&index' +
`'${randomString}'` // `'${randomString}'`
let param = { // let param = {
bp_agent_id: vm.bp_agent_id, // bp_agent_id: vm.bp_agent_id,
division: vm.saveInfo.division, // division: vm.saveInfo.division,
user_phone: window.localStorage.getItem('user_phone'), // user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10, // pagesize: 10,
pagenum: vm.pagenum, // pagenum: vm.pagenum,
searchInput: vm.keyWordProduct, // searchInput: vm.keyWordProduct,
} // }
hlsPopup.showLoading('请稍候') // hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) { // vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
let returnData = [] // let returnData = []
returnData = res.lists // returnData = res.lists
if (returnData.length === 0) { // if (returnData.length === 0) {
vm.$refs.scroll.update(true) // vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) { // } else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) { // vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index]) // vm.divisionLists.push(array[index])
}) // })
vm.pagenum++ // vm.pagenum++
vm.$refs.scroll.update(true) // vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { // } else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) { // vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index]) // vm.divisionLists.push(array[index])
}) // })
vm.pagenum++ // vm.pagenum++
vm.$refs.scroll.update(false) // vm.$refs.scroll.update(false)
} // }
vm.divisionLists.forEach(item => { // vm.divisionLists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token // item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
}) // })
} else { // } else {
hlsPopup.showLongCenter(res.message) // hlsPopup.showLongCenter(res.message)
} // }
}) // })
}, // },
selectProductLine (e) { selectProductLine (e) {
let vm = this let vm = this
vm.saveInfo.product_id = '' vm.saveInfo.product_id = ''
...@@ -1301,119 +1316,119 @@ export default { ...@@ -1301,119 +1316,119 @@ export default {
} }
} }
#product-list { // #product-list {
.hls-list-item { // .hls-list-item {
border-radius: 4px; // border-radius: 4px;
} // }
.item-pic { // .item-pic {
width: 100px; // width: 100px;
//height: 110px; // //height: 110px;
img { // img {
width: 100%; // width: 100%;
height: 100%; // height: 100%;
} // }
} // }
.item-content { // .item-content {
width: 100%; // width: 100%;
margin-left: 20px; // margin-left: 20px;
.pro-name { // .pro-name {
height: 42px; // height: 42px;
width: 100%; // width: 100%;
position: relative; // position: relative;
border-bottom: 1px solid #f3f3f7; // border-bottom: 1px solid #f3f3f7;
.arrow { // .arrow {
position: absolute; // position: absolute;
width: 16px; // width: 16px;
height: 16px; // height: 16px;
right: 0; // right: 0;
top: 13px; // top: 13px;
} // }
p { // p {
height: 42px; // height: 42px;
line-height: 42px; // line-height: 42px;
font-family: PingFangSC-Semibold; // font-family: PingFangSC-Semibold;
font-size: 15px; // font-size: 15px;
color: #4b4a4b; // color: #4b4a4b;
letter-spacing: 0; // letter-spacing: 0;
font-weight: 600; // font-weight: 600;
} // }
} // }
.centers { // .centers {
font-family: PingFangSC-Semibold; // font-family: PingFangSC-Semibold;
font-size: 13px; // font-size: 13px;
color: rgba(56, 63, 69, 0.6); // color: rgba(56, 63, 69, 0.6);
letter-spacing: 0.5px; // letter-spacing: 0.5px;
display: flex; // display: flex;
flex-direction: row; // flex-direction: row;
margin-top: 8px; // margin-top: 8px;
.firsts1 { // .firsts1 {
width: 60px; // width: 60px;
height: 17px; // height: 17px;
font-family: PingFangSC-Regular; // font-family: PingFangSC-Regular;
font-size: 13px; // font-size: 13px;
color: rgba(56, 63, 69, 0.6); // color: rgba(56, 63, 69, 0.6);
} // }
.seconds1 { // .seconds1 {
width: 70%; // width: 70%;
margin-left: 16px; // margin-left: 16px;
height: auto; // height: auto;
font-family: PingFangSC-Regular; // font-family: PingFangSC-Regular;
font-size: 13px; // font-size: 13px;
color: #4b4a4b; // color: #4b4a4b;
} // }
} // }
} // }
.item { // .item {
width: 359px; // width: 359px;
margin: 0 auto; // margin: 0 auto;
} // }
.search { // .search {
background-color: #fff; // background-color: #fff;
padding: 8px 12px; // padding: 8px 12px;
width: 100%; // width: 100%;
height: 1.02rem; // height: 1.02rem;
z-index: 100; // z-index: 100;
margin-bottom: 8px; // margin-bottom: 8px;
input { // input {
background: url("../../assets/contractStart/search1.png") 320px no-repeat; // background: url("../../assets/contractStart/search1.png") 320px no-repeat;
background-size: 16px 16px; // background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55); // background-color: rgba(239, 239, 239, 0.55);
padding-left: 12px; // padding-left: 12px;
height: 36px; // height: 36px;
line-height: 36px; // line-height: 36px;
border-radius: 4px; // border-radius: 4px;
width: 100%; // width: 100%;
font-family: PingFangSC-Regular; // font-family: PingFangSC-Regular;
font-size: 14px; // font-size: 14px;
color: #888c8f; // color: #888c8f;
} // }
input::placeholder { // input::placeholder {
font-family: PingFangSC-Regular; // font-family: PingFangSC-Regular;
font-size: 14px; // font-size: 14px;
color: #888c8f; // color: #888c8f;
letter-spacing: 0; // letter-spacing: 0;
} // }
input:focus { // input:focus {
background: url("../../assets/contractStart/search2.png") 320px no-repeat; // background: url("../../assets/contractStart/search2.png") 320px no-repeat;
background-size: 16px 16px; // background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55); // background-color: rgba(239, 239, 239, 0.55);
border: 2px solid #bcc6ff; // border: 2px solid #bcc6ff;
} // }
} // }
} // }
.date-check { .date-check {
background: url("../../assets/trial/date.png") 350px no-repeat; background: url("../../assets/trial/date.png") 350px no-repeat;
......
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
vm.mortId = res.info.check_id vm.mortId = res.info.check_id
vm.certificateQuery(vm.mortId, 'mort').then(res => { vm.certificateQuery(vm.mortId, 'mort').then(res => {
vm.hlsPopup.hideLoading()
}) })
} }
}) })
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
} }
vm.hlsPopup.showLoading('请稍候') vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
console.log('特批证书check_id查询', res) console.log('特批证书check_id查询', res)
if (res.result === 'S') { if (res.result === 'S') {
vm.checkId = res.info.check_id vm.checkId = res.info.check_id
...@@ -262,7 +262,7 @@ export default { ...@@ -262,7 +262,7 @@ export default {
} }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
return vm.hlsHttp.post(url, param).then(function (res) { return vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
res.lists.forEach(item => { res.lists.forEach(item => {
item['url'] = item['url'] =
...@@ -487,7 +487,7 @@ export default { ...@@ -487,7 +487,7 @@ export default {
tab_group: group, tab_group: group,
}, },
} }
// vm.hlsPopup.showLoading('请稍候') vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
console.log(res) console.log(res)
...@@ -521,8 +521,14 @@ export default { ...@@ -521,8 +521,14 @@ export default {
} }
}) })
// 查询图片 // 查询图片
// hlsPopup.showLoading('请稍候')
listTemp.forEach((item, index) => { listTemp.forEach((item, index) => {
vm.load_picture(item.check_id, index, item.cdd_item) vm.load_picture(item.check_id, index, item.cdd_item)
if (index === listTemp.length - 1) {
debugger
vm.hlsPopup.hideLoading()
}
console.log(index, listTemp.length - 1)
}) })
} }
}) })
...@@ -534,9 +540,9 @@ export default { ...@@ -534,9 +540,9 @@ export default {
let param = { let param = {
check_id: check_id, check_id: check_id,
} }
hlsPopup.showLoading('请稍候') // hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
res.lists.forEach(item => { res.lists.forEach(item => {
item['url'] = item['url'] =
......
<template>
<h-view v-if="showFlag" id="product-list">
<h-header :proportion="[1,4,1]" class="bar-custom">
<span slot="center" style="color:#fff">选择产品</span>
<span slot="right" style="color:#fff" @click="showFlag=false">取消</span>
</h-header>
<div class="search has-header">
<input v-model="keyword" placeholder="请输入产品名称">
</div>
<scroll ref="scroll" :updateData="[showList]" :pullUp="true" @pullingUp="loadMoreProduct">
<list-item v-for="(item,index) in showList" :key="index">
<item
:proportion="[1,4]"
@click.native="getSelectProduct(item)"
>
<div slot="name" class="item-pic">
<img :src="item.url">
</div>
<div slot="content" class="item-content">
<div class="pro-name">
<p>{{ item.product_name }}</p>
</div>
<div class="centers">
<p class="firsts1">{{ item.bp_type_n }}</p>
<p class="seconds1">{{ item.bp_name }}</p>
</div>
<div class="centers">
<p class="firsts1">产品型号</p>
<p class="seconds1">{{ item.product_code }}</p>
</div>
</div>
</item>
</list-item>
</scroll>
</h-view>
</template>
<script>
export default {
props: {
bp_agent_id: {
type: String,
default: '',
},
division: {
type: String,
default: '',
},
},
data () {
return {
showFlag: false,
divisionLists: [],
searchList: [],
showList: [],
selectedProduct: {
product_id_n: '',
product_id: '',
},
pagenumSearch: 1,
pagenum: 1,
keyword: '',
}
},
watch: {
keyword (newVal, oldVal) {
if (newVal) {
this.searchProduct()
} else {
this.getProduct()
}
},
},
methods: {
init () {
this.divisionLists = []
this.selectedProduct = []
this.pagenum = 1
this.keyword = ''
},
show () {
this.showFlag = true
},
getSelectProduct (e) {
let vm = this
this.selectedProduct.product_id_n = e.product_name
this.selectedProduct.product_id = e.product_id
this.$emit('selectedProduct', this.selectedProduct)
setTimeout(() => {
vm.showFlag = false
}, 100)
},
getProduct () {
let vm = this
vm.pagenum = 1
vm.divisionLists = []
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
'prj_product_list' +
'&index' +
`'${randomString}'`
let param = {
bp_agent_id: vm.bp_agent_id,
division: vm.division,
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.keyword,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.$refs.scroll.scrollToTop()
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index])
})
vm.pagenum++
console.log(vm.pagenum)
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index])
})
vm.pagenum++
console.log(vm.pagenum)
vm.$refs.scroll.update(false)
}
vm.divisionLists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.showList = vm.divisionLists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
getLoad () {
let vm = this
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
'prj_product_list' +
'&index' +
`'${randomString}'`
let param = {
bp_agent_id: vm.bp_agent_id,
division: vm.division,
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.keyword,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index])
})
vm.pagenum++
console.log(vm.pagenum)
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.divisionLists.push(array[index])
})
vm.pagenum++
console.log(vm.pagenum)
vm.$refs.scroll.update(false)
}
vm.divisionLists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.showList = vm.divisionLists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
loadMoreProduct () {
if (this.keyword) {
this.searchLoad()
} else {
this.getLoad()
}
},
searchLoad () {
let vm = this
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
'prj_product_list' +
'&index' +
`'${randomString}'`
let param = {
bp_agent_id: vm.bp_agent_id,
division: vm.division,
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
pagenum: vm.pagenumSearch,
searchInput: vm.keyword,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
if (vm.searchList) {
} else {
vm.searchList = returnData
}
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vm.searchList = returnData
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.searchList.push(array[index])
})
vm.pagenumSearch++
vm.$refs.scroll.update(false)
}
vm.searchList.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.showList = vm.searchList
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
searchProduct () {
let vm = this
vm.pagenumSearch = 1
vm.searchList = []
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
'prj_product_list' +
'&index' +
`'${randomString}'`
let param = {
bp_agent_id: vm.bp_agent_id,
division: vm.division,
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
pagenum: vm.pagenumSearch,
searchInput: vm.keyword,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.$refs.scroll.scrollToTop()
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
if (vm.searchList) {
} else {
vm.searchList = returnData
}
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vm.searchList = returnData
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.searchList.push(array[index])
})
vm.pagenumSearch++
vm.$refs.scroll.update(false)
}
vm.searchList.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.showList = vm.searchList
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
},
}
</script>
<style lang="less">
#product-list {
position: absolute;
top:0;
z-index:999;
background: #fff;
.hls-list-item {
border-radius: 4px;
}
.item-pic {
width: 100px;
//height: 110px;
img {
width: 100%;
height: 100%;
}
}
.item-content {
width: 100%;
margin-left: 20px;
.pro-name {
height: 42px;
width: 100%;
position: relative;
border-bottom: 1px solid #f3f3f7;
.arrow {
position: absolute;
width: 16px;
height: 16px;
right: 0;
top: 13px;
}
p {
height: 42px;
line-height: 42px;
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #4b4a4b;
letter-spacing: 0;
font-weight: 600;
}
}
.centers {
font-family: PingFangSC-Semibold;
font-size: 13px;
color: rgba(56, 63, 69, 0.6);
letter-spacing: 0.5px;
display: flex;
flex-direction: row;
margin-top: 8px;
.firsts1 {
width: 60px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 13px;
color: rgba(56, 63, 69, 0.6);
}
.seconds1 {
width: 70%;
margin-left: 16px;
height: auto;
font-family: PingFangSC-Regular;
font-size: 13px;
color: #4b4a4b;
}
}
}
.item {
width: 359px;
margin: 0 auto;
}
.search {
background-color: #fff;
padding: 8px 12px;
width: 100%;
height: 1.02rem;
z-index: 100;
margin-bottom: 8px;
input {
background: url("../../assets/contractStart/search1.png") 320px no-repeat;
background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55);
padding-left: 12px;
height: 36px;
line-height: 36px;
border-radius: 4px;
width: 100%;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #888c8f;
}
input::placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #888c8f;
letter-spacing: 0;
}
input:focus {
background: url("../../assets/contractStart/search2.png") 320px no-repeat;
background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55);
border: 2px solid #bcc6ff;
}
}
}
.platform-ios {
#product-list {
.scrollContent {
padding-top: 1.4rem;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#product-list {
.scrollContent {
padding-top: 1.8rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#product-list {
.scrollContent {
padding-top: 1.8rem;
}
.search {
input {
background: url("../../assets/contractStart/search1.png") 320px
no-repeat;
background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55);
padding: 8px 12px;
border-radius: 4px;
width: 100%;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #888c8f;
}
}
}
}
}
</style>
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
vum.forEach(returnData, function (data, index, array) { vum.forEach(returnData, function (data, index, array) {
vm.list.push(array[index]) vm.list.push(array[index])
}) })
vm.pagenum++
vm.$refs.scroll.update(true) vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { } else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) { vum.forEach(returnData, function (data, index, array) {
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
position: 'middle', position: 'middle',
}) */ }) */
} }
}, 40000) }, 60000)
}, },
/** /**
* 隐藏 * 隐藏
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment