Commit 540fc8d8 authored by 李超鹏's avatar 李超鹏

夏宝页面对接接口

parent 525386f6
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_MODE = 'development' VUE_APP_MODE = 'development'
VUE_APP_API_URL = '//system.dev.banshouhui.com' VUE_APP_API_URL = '//localhost:8182/'
import { request } from '@/utils/request'
// import { getToken } from '@/utils/auth'
// 获取厂商列表列表信息
export function getSpecification(query) {
return request({
url: '/wxh-cloud-rest/rest/thirdparty/xiabao/getSpecification',
method: 'get',
// headers: { 'Content-Type': 'application/json' },
params: query
})
}
export function getServiceMeasure(query) {
return request({
url: '/wxh-cloud-rest/rest/thirdparty/xiabao/getServiceMeasure',
method: 'get',
params: query
})
}
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<ul slot=""> <ul slot="">
<li v-for="(item, index) in filterResult" class="food-item" :class="{active:measure.index===index}" @click="selectMeasureFun(item,index)" :key="index"> <li v-for="(item, index) in filterResult" class="food-item" :class="{active:measure.index===index}" @click="selectMeasureFun(item,index)" :key="index">
<div class="content"> <div class="content">
<p class="name">{{item.RepairType +': ' + item.RepairContent}}</p> <p class="name">{{item.repairType +': ' + item.repairContent}}</p>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
</template> </template>
<script> <script>
import { import {
getAppreciationService, getSpecification,
getVap getServiceMeasure
} from '@/api/haier/order/service' } from '@/api/xiabao/order/sell-record'
import { Toast, Indicator } from 'mint-ui' import { Toast, Indicator } from 'mint-ui'
import BScroll from 'better-scroll' import BScroll from 'better-scroll'
export default { export default {
...@@ -70,46 +70,11 @@ export default { ...@@ -70,46 +70,11 @@ export default {
selectFoods: [], selectFoods: [],
specification: { specification: {
index: 0, index: 0,
list: [ list: []
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' },
{ id: '2P', name: '2P' },
{ id: '3P', name: '3P' }
]
}, },
measure: { measure: {
index: '', index: '',
list: [ list: [],
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件0', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件1', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件2', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件3', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件4', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件5', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件6', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件7', RepairFee: '120' },
{ productTypeName: '', RepairType: '中修', categoryType: '', RepairContent: '更改零件8', RepairFee: '120' }
],
selected: [] selected: []
}, },
keyword: '' keyword: ''
...@@ -123,7 +88,7 @@ export default { ...@@ -123,7 +88,7 @@ export default {
} }
const reg = new RegExp(this.keyword) const reg = new RegExp(this.keyword)
return this.measure.list.filter(item => { return this.measure.list.filter(item => {
const title = item.RepairContent + item.RepairType const title = item.repairContent + item.repairType
if (reg.test(title)) { if (reg.test(title)) {
return item return item
} }
...@@ -150,9 +115,9 @@ export default { ...@@ -150,9 +115,9 @@ export default {
}, },
methods: { methods: {
getOrderId(orderId) { getOrderId(orderId) {
this.orderId = orderId || '6099514' this.orderId = orderId || '10704411'
this.loading = false this.loading = false
// this.getList('specification') this.getList('specification')
}, },
selectMeasureFun(item, index) { selectMeasureFun(item, index) {
this.measure.index = index this.measure.index = index
...@@ -165,11 +130,14 @@ export default { ...@@ -165,11 +130,14 @@ export default {
getList(type) { getList(type) {
Indicator.open('加载中...') Indicator.open('加载中...')
const request = { const request = {
specification: getVap, specification: getSpecification,
measure: getVap measure: getServiceMeasure
} }
const selectSpecification = this.specification.list[this.specification.index]
const params = { const params = {
orderId: this.orderId orderId: this.orderId,
specificationName: selectSpecification ? selectSpecification.name : ''
} }
request[type](params).then(res => { request[type](params).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
...@@ -195,11 +163,13 @@ export default { ...@@ -195,11 +163,13 @@ export default {
}, },
initScroll(type) { initScroll(type) {
if (type === 'measure') { if (type === 'measure') {
// eslint-disable-next-line no-new
new BScroll(this.$refs.foodsWrapper, { new BScroll(this.$refs.foodsWrapper, {
// probeType: 3, // probeType: 3,
click: true click: true
}) })
} else { } else {
// eslint-disable-next-line no-new
new BScroll(this.$refs.menuWrapper, { new BScroll(this.$refs.menuWrapper, {
click: true click: true
}) })
...@@ -234,22 +204,6 @@ export default { ...@@ -234,22 +204,6 @@ export default {
}) })
return false return false
} }
getAppreciationService(data).then(res => {
if (res.code === 200) {
Toast({
message: 'operation success',
iconClass: 'icon icon-success'
})
if (window.parent.layer) {
window.parent.layer.closeAll()
}
} else {
Toast({
message: res.data.message,
duration: 3000
})
}
})
} }
} }
} }
......
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