bug修复,及体验优化
This commit is contained in:
@@ -302,6 +302,8 @@ Page({
|
||||
content: agree ? '确认接单成功,请通过联系方式与客户沟通开发细节' : '已拒绝成功',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
//标记该需求需要刷新,返回列表时同步最新状态与按钮
|
||||
wx.$util.markDemandRefresh(this.data.id);
|
||||
if (agree) {
|
||||
//刷新当前页面,等沟通群二维码渲染完成后再回到顶部,方便直接看到
|
||||
this.loadDemandDetail(this.data.id).then(() => {
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
</t-collapse>
|
||||
|
||||
|
||||
<!-- 开发人员 -->
|
||||
<view class="button-submit" wx:if="{{opType =='quote'}}">
|
||||
<!-- 开发人员(优先按列表传入的 opType,站内消息等无 opType 的入口按身份判断) -->
|
||||
<view class="button-submit" wx:if="{{_calc.isDevView(demandInfo, opType)}}">
|
||||
<block>
|
||||
<t-button wx:if="{{_calc.canSubmitBidding(demandInfo)}}" theme="danger" size="large" bind:tap="submitBidding" block>立即报名</t-button>
|
||||
<view class="button-layout-flex" wx:elif="{{_calc.canConfirmOrder(demandInfo)}}">
|
||||
|
||||
@@ -104,6 +104,17 @@ var isDelivered = function (demandInfo) {
|
||||
!!getDelivery(demandInfo);
|
||||
}
|
||||
|
||||
// 是否开发者视角(决定按钮区渲染开发者操作还是需求方操作)
|
||||
// 列表页会带 opType(quote=开发者视角,view=需求方视角);
|
||||
// 站内消息等入口跳转不带 opType,此时按身份判断:需求发布者为需求方视角,其余为开发者视角
|
||||
var isDevView = function (demandInfo, opType) {
|
||||
if (opType === 'view') return false;
|
||||
if (opType === 'quote') return true;
|
||||
// 数据未加载前先不渲染按钮,避免短暂闪成错误视角
|
||||
if (!demandInfo) return false;
|
||||
return !demandInfo.isMy;
|
||||
}
|
||||
|
||||
// 数值拼接单位,空值时不显示单位
|
||||
var withUnit = function (value, unit) {
|
||||
if (value === undefined || value === null || value === '') {
|
||||
@@ -125,5 +136,6 @@ module.exports = {
|
||||
getDelivery: getDelivery,
|
||||
canDeliverGoods: canDeliverGoods,
|
||||
isDelivered: isDelivered,
|
||||
isDevView: isDevView,
|
||||
withUnit: withUnit,
|
||||
};
|
||||
Reference in New Issue
Block a user