Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘川
wly-APP
Commits
754220b5
Commit
754220b5
authored
Jun 29, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提报市场违约线索提交接口调试
parent
19dbf056
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
277 additions
and
58 deletions
+277
-58
breakwords-clue.vue
pages/breakwords-clue/breakwords-clue.vue
+188
-31
select-clue-terminal.nvue
pages/select-clue-terminal/select-clue-terminal.nvue
+69
-27
breakwords.js
servers/breakwords.js
+20
-0
No files found.
pages/breakwords-clue/breakwords-clue.vue
View file @
754220b5
This diff is collapsed.
Click to expand it.
pages/select-clue-terminal/select-clue-terminal.nvue
View file @
754220b5
...
@@ -4,17 +4,18 @@
...
@@ -4,17 +4,18 @@
<view class="listview">
<view class="listview">
<list class="cell-list" v-if="lists.length > 0" :show-scrollbar='false' loadmoreoffset='100'
<list class="cell-list" v-if="lists.length > 0" :show-scrollbar='false' loadmoreoffset='100'
@loadmore="scrolltolower">
@loadmore="scrolltolower">
<cell @click="handleChecked(item)" v-for="item in lists" :key='item.
zcode
'>
<cell @click="handleChecked(item)" v-for="item in lists" :key='item.
id
'>
<view class="cell-list-block">
<view class="cell-list-block">
<view class="cell-list-block__content">
<view class="cell-list-block__content">
<view class="list-block-item">
<view class="list-block-item">
<text class="list-block-item__title1">{{item.zzfld000098}}</text>
<text class="list-block-item__title1">{{item.name}}</text>
<text class="list-block-item__label">{{item.address}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</cell>
</cell>
<cell>
<cell>
<view class="loading-more" v-if='lists.length>1
4
'>
<view class="loading-more" v-if='lists.length>1
5
'>
<text class="loading-more-text">{{loadingText}}</text>
<text class="loading-more-text">{{loadingText}}</text>
</view>
</view>
</cell>
</cell>
...
@@ -30,8 +31,8 @@
...
@@ -30,8 +31,8 @@
} from 'vuex'
} from 'vuex'
import {
import {
apiGet
PengmaInfo
apiGet
Terminal
} from '@/servers/
groupOrder
.js'
} from '@/servers/
breakwords
.js'
import noData from '@/components/nodata.nvue';
import noData from '@/components/nodata.nvue';
...
@@ -49,11 +50,14 @@
...
@@ -49,11 +50,14 @@
isDone: false,
isDone: false,
isRefresh: false
isRefresh: false
},
},
page: {
"currentPage": "1",
"pageSize": "15",
},
lists: [],
lists: [],
selected
PaintDesign
: {},
selected
ClueTerminal
: {},
toPageParams: {
toPageParams: {
page: '',
keywords: '',
head: ""
}
}
}
}
},
},
...
@@ -63,31 +67,34 @@
...
@@ -63,31 +67,34 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
'height': `${this.sysinfo.safeArea.top + 44}px`
}
}
},
},
...mapState(['sysinfo'
, 'userInfo'
])
...mapState(['sysinfo'])
},
},
onLoad(option) {
onLoad(option) {
console.log('select-saleplan', option)
console.log('select-saleplan', option)
if (option && option.
from
) {
if (option && option.
keywords
) {
const {
const {
from,
keywords
head
} = option
} = option
this.toPageParams.page = from
this.toPageParams.keywords = keywords || ''
this.toPageParams.head = JSON.parse(head)
}
}
},
},
onPullDownRefresh() {
onPullDownRefresh() {
console.log('refresh');
console.log('refresh');
this.getPengmaInfo()
this.reset()
this.getTerminal()
setTimeout(function() {
setTimeout(function() {
uni.stopPullDownRefresh();
uni.stopPullDownRefresh();
}, 600);
}, 600);
},
},
created() {
created() {
this.getPengmaInfo()
this.reset()
this.getTerminal()
},
},
methods: {
methods: {
async getPengmaInfo(isRefresh) {
async getTerminal(isRefresh) {
if (this.loadParams.isDone) {
return
}
uni.showLoading({
uni.showLoading({
title: '加载中'
title: '加载中'
...
@@ -95,25 +102,59 @@
...
@@ -95,25 +102,59 @@
setTimeout(function() {
setTimeout(function() {
uni.hideLoading();
uni.hideLoading();
}, 2000);
}, 2000);
const res = await apiGetPengmaInfo()
const params = {
id: '',
name: this.toPageParams.keywords,
...this.page
}
const res = await apiGetTerminal(params)
uni.hideLoading();
uni.hideLoading();
this.lists = res.info
this.loadingText = '-- 到底了 --'
const {
totalNumberOfResults,
numberOfPages
} = res.data.pagination
this.loadParams.total = totalNumberOfResults
this.loadParams.totalPage = numberOfPages
if (isRefresh) {
this.lists = res.data.results
this.loadParams.isDone = false
} else {
this.lists = this.lists.concat(res.data.results)
}
},
},
scrolltolower() {
scrolltolower() {
console.log('onReachBottom');
if (this.page.currentPage < this.loadParams.totalPage) {
this.page.currentPage++
this.getTerminal()
} else {
this.loadParams.isDone = true
this.loadingText = '-- 到底了 --'
}
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.currentPage = 1
this.lists = []
this.loadingText = '加载中'
},
},
handleChecked(item) {
handleChecked(item) {
this.selected
PaintDesign
= item
this.selected
ClueTerminal
= item
uni.$emit('select
edPaintDesign
', {
uni.$emit('select
ClueTerminal
', {
selected
PaintDesign
: item
selected
ClueTerminal
: item
})
})
uni.navigateBack()
uni.navigateBack()
},
},
loadMore() {
loadMore() {
// this.getPengmaInfo()
this.reset()
this.getTerminal(true)
}
}
}
}
}
}
...
@@ -179,13 +220,14 @@
...
@@ -179,13 +220,14 @@
.list-block-item {
.list-block-item {
display: flex;
display: flex;
align-items: center
;
flex-direction: column
;
}
}
.list-block-item__title1 {
.list-block-item__title1 {
color: #333;
color: #333;
font-weight: 400;
font-weight: 400;
font-size: 28rpx;
font-size: 28rpx;
margin-bottom: 4px;
}
}
.list-block-item__label {
.list-block-item__label {
...
@@ -218,7 +260,7 @@
...
@@ -218,7 +260,7 @@
.cell-list-block {
.cell-list-block {
display: flex;
display: flex;
flex: 1;
flex: 1;
height: 1
0
0rpx;
height: 1
2
0rpx;
background: #fff;
background: #fff;
align-items: center;
align-items: center;
border-bottom: 1px solid #f4f5f6;
border-bottom: 1px solid #f4f5f6;
...
...
servers/breakwords.js
View file @
754220b5
...
@@ -20,6 +20,26 @@ export async function apiGetTerminal(params) {
...
@@ -20,6 +20,26 @@ export async function apiGetTerminal(params) {
return
res
return
res
}
}
/**
* 扫码查询产品信息
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetClueProduct
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/clue/product'
,
params
)
return
res
}
/**
* 扫码查询经销商信息
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetClueDistributer
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/wmdpwebservices/clue/distributer'
,
params
)
return
res
}
/**
/**
* 线索提交
* 线索提交
* @param name 账户名
* @param name 账户名
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment