需求按钮状态优化
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// demandInfo 首屏为 null,所有判断需先做空值保护
|
||||
var canSubmitBidding = function (demandInfo) {
|
||||
if (!demandInfo) return false;
|
||||
// 发布者不能给自己的需求报名
|
||||
if (demandInfo.isMy) return false;
|
||||
return demandInfo.status == 1 && !demandInfo.myBidding;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,16 +283,12 @@ Page({
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
// 交易完成只允许发布者和接单开发者进入详情
|
||||
// 交易完成只允许发布者和接单开发者进入详情,其他人点击无反应
|
||||
if (item.button && item.button.key === 'finished' && !item.isMy && !item.isMyWin) {
|
||||
wx.showToast({
|
||||
title: '仅发布者和接单开发者可查看',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 参与投标仅开发者可进入报价;未入驻先提示,确定后再去申请
|
||||
if (item.button && item.button.key === 'bid') {
|
||||
// 参与投标仅开发者可进入报价;发布者不能给自己报名。未入驻先提示,确定后再去申请
|
||||
if (item.button && item.button.key === 'bid' && !item.isMy) {
|
||||
const role = (wx.getStorageSync('userInfo') || {}).role || '';
|
||||
if (role !== 'dev') {
|
||||
wx.showModal({
|
||||
@@ -314,7 +310,8 @@ Page({
|
||||
}
|
||||
const { id } = item;
|
||||
const type = this.data.opType;
|
||||
const opType = type == 'all' || type == 'myQuote' ? 'quote' : 'view';
|
||||
// 大厅和我投标的默认是开发者视角;发布者看自己的需求走客户视角,避免进入报名
|
||||
const opType = (type == 'all' || type == 'myQuote') && !item.isMy ? 'quote' : 'view';
|
||||
//按后端返回的按钮动作标识判断(acceptPassed=验收),
|
||||
//命中时带标记,详情页据此弹出「先到沟通群体验后再验收」的提示
|
||||
const isAccept = !!item.button && item.button.key === 'acceptPassed';
|
||||
|
||||
Reference in New Issue
Block a user