1
This commit is contained in:
parent
ed0978dee9
commit
2bae866b15
@ -8,6 +8,14 @@ export function getTaskList(param) {
|
|||||||
params: param
|
params: param
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getSelfTaskList(param) {
|
||||||
|
return request({
|
||||||
|
url: '/employee/task/selfList',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function getTaskDetails(param) {
|
export function getTaskDetails(param) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -75,3 +75,11 @@ export function getCodeImg() {
|
|||||||
timeout: 20000
|
timeout: 20000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function verifyToken() {
|
||||||
|
console.log("verifyToken")
|
||||||
|
return request({
|
||||||
|
url: '/merchant/user/verifyToken',
|
||||||
|
'method': 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/wxlogin",
|
"path": "pages/wxlogin",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "微信授权登录"
|
"navigationBarTitleText": "手机号快捷登录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskList, cancelBaoming } from "@/api/employee/task";
|
import { getTaskList, getSelfTaskList, cancelBaoming } from "@/api/employee/task";
|
||||||
// import { getCodeImg } from '@/api/employee/login'
|
// import { getCodeImg } from '@/api/employee/login'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -247,6 +247,8 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function() {
|
created: function() {
|
||||||
|
console.log("dddddddddddddd")
|
||||||
|
|
||||||
this.realName = this.$store.state.user.nickName
|
this.realName = this.$store.state.user.nickName
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
@ -339,26 +341,49 @@
|
|||||||
if (this.showNoMore && this.queryParams.pageNum > 1){
|
if (this.showNoMore && this.queryParams.pageNum > 1){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this;
|
||||||
getTaskList(this.queryParams).then(response => {
|
if (this.nowTab == 1) {
|
||||||
if (that.queryParams.pageNum > 1){
|
getTaskList(this.queryParams).then(response => {
|
||||||
that.taskList = that.taskList.concat(response.rows);
|
if (that.queryParams.pageNum > 1) {
|
||||||
}else{
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
that.taskList = response.rows;
|
} else {
|
||||||
}
|
that.taskList = response.rows;
|
||||||
|
}
|
||||||
|
|
||||||
that.queryParams.pageNum++;
|
that.queryParams.pageNum++;
|
||||||
if (response.rows.length < this.queryParams.pageSize){
|
if (response.rows.length < this.queryParams.pageSize) {
|
||||||
that.showNoMore = true;
|
that.showNoMore = true;
|
||||||
}else{
|
} else {
|
||||||
that.showNoMore = false;
|
that.showNoMore = false;
|
||||||
}
|
}
|
||||||
that.showLoading = false;
|
that.showLoading = false;
|
||||||
that.triggered = false;
|
that.triggered = false;
|
||||||
that.total = response.total;
|
that.total = response.total;
|
||||||
|
|
||||||
|
console.log(response)
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
getSelfTaskList(this.queryParams).then(response => {
|
||||||
|
if (that.queryParams.pageNum > 1){
|
||||||
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
|
}else{
|
||||||
|
that.taskList = response.rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
that.queryParams.pageNum++;
|
||||||
|
if (response.rows.length < this.queryParams.pageSize){
|
||||||
|
that.showNoMore = true;
|
||||||
|
}else{
|
||||||
|
that.showNoMore = false;
|
||||||
|
}
|
||||||
|
that.showLoading = false;
|
||||||
|
that.triggered = false;
|
||||||
|
that.total = response.total;
|
||||||
|
|
||||||
|
console.log(response)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
console.log(response)
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
goDetails(task){
|
goDetails(task){
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTaskList } from "@/api/employee/task";
|
import { getSelfTaskList } from "@/api/employee/task";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
titleTop: {type: Number},
|
titleTop: {type: Number},
|
||||||
@ -154,7 +154,7 @@
|
|||||||
}
|
}
|
||||||
var that = this;
|
var that = this;
|
||||||
this.queryParams.self = true;
|
this.queryParams.self = true;
|
||||||
getTaskList(this.queryParams).then(response => {
|
getSelfTaskList(this.queryParams).then(response => {
|
||||||
if (that.queryParams.pageNum > 1){
|
if (that.queryParams.pageNum > 1){
|
||||||
that.taskList = that.taskList.concat(response.rows);
|
that.taskList = that.taskList.concat(response.rows);
|
||||||
}else{
|
}else{
|
||||||
@ -193,6 +193,9 @@
|
|||||||
this.nowTab = tab;
|
this.nowTab = tab;
|
||||||
},
|
},
|
||||||
getPayStatus(sign){
|
getPayStatus(sign){
|
||||||
|
if (sign == null){
|
||||||
|
return {"text": "未发放", "status": 0};
|
||||||
|
}
|
||||||
if (sign.stEmployeeFundRecord == null || sign.stEmployeeFundRecord.payStatus == 0){
|
if (sign.stEmployeeFundRecord == null || sign.stEmployeeFundRecord.payStatus == 0){
|
||||||
return {"text": "未发放", "status": 0};
|
return {"text": "未发放", "status": 0};
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getTaskList } from "@/api/task";
|
import { getTaskList } from "@/api/task";
|
||||||
// import { getCodeImg } from '@/api/login'
|
// import { getCodeImg } from '@/api/login'
|
||||||
export default {
|
import { verifyToken } from '@/api/login'
|
||||||
|
|
||||||
|
export default {
|
||||||
props: {
|
props: {
|
||||||
titleTop: {type: Number},
|
titleTop: {type: Number},
|
||||||
nowTab1: {type: Number},
|
nowTab1: {type: Number},
|
||||||
@ -174,12 +176,24 @@
|
|||||||
},
|
},
|
||||||
created: function() {
|
created: function() {
|
||||||
this.realName = this.$store.state.user.nickName
|
this.realName = this.$store.state.user.nickName
|
||||||
this.getList();
|
verifyToken().then(response => {
|
||||||
|
if (response.code == 401){
|
||||||
|
this.$store.state.user.roleType = 1;//跳转到无状态的劳动者任务列表页
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index'
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
reload(){
|
reload(){
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
|
|
||||||
openSelect(){
|
openSelect(){
|
||||||
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
|
||||||
this.$refs.popup.open('bottom')
|
this.$refs.popup.open('bottom')
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="action-btn">
|
<view class="action-btn">
|
||||||
<button v-if="radio" class="login-btn cu-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</button>
|
<button v-if="radio" class="login-btn cu-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号快捷登录</button>
|
||||||
<button v-else="radio" class="login-btn cu-btn block bg-blue lg round" @click="checkgetPhoneNumber">微信授权登录</button>
|
<button v-else="radio" class="login-btn cu-btn block bg-blue lg round" @click="checkgetPhoneNumber">手机号快捷登录</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<view class="action-btn">
|
<view class="action-btn">
|
||||||
<button v-if="radio" class="login-btn cu-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</button>
|
<button v-if="radio" class="login-btn cu-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号快捷登录</button>
|
||||||
<button v-else="radio" class="login-btn cu-btn block bg-blue lg round" @click="checkgetPhoneNumber">微信授权登录</button>
|
<button v-else="radio" class="login-btn cu-btn block bg-blue lg round" @click="checkgetPhoneNumber">手机号快捷登录</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user