无参数需求大厅优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// pages/demand/list/index.js
|
||||
import { fetchDemandList } from '../../../services/demand/fetchDemand';
|
||||
import { fetchConfig } from '../../../services/home/home';
|
||||
import { withPromoter } from '../../../utils/promoter';
|
||||
|
||||
Page({
|
||||
|
||||
@@ -282,12 +283,23 @@ Page({
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
// 参与投标仅开发者可进入报价;未入驻先去申请,提交成功后由入驻页返回本页
|
||||
// 参与投标仅开发者可进入报价;未入驻先提示,确定后再去申请
|
||||
if (item.button && item.button.key === 'bid') {
|
||||
const role = (wx.getStorageSync('userInfo') || {}).role || '';
|
||||
if (role !== 'dev') {
|
||||
wx.navigateTo({
|
||||
url: '/pages/developer/join/index',
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请先申请成为开发者',
|
||||
confirmText: '确定',
|
||||
cancelText: '取消',
|
||||
success: (res) => {
|
||||
if (!res.confirm) {
|
||||
return;
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: '/pages/developer/join/index',
|
||||
});
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -307,7 +319,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const opType = options.opType || '';
|
||||
// 分享卡片不带 opType,缺省进需求大厅;我的/我投标的仍由入口显式传入
|
||||
const opType = options.opType || 'all';
|
||||
this.setData({ opType });
|
||||
wx.setNavigationBarTitle({
|
||||
title: opType == 'all' ? '需求大厅' : (opType == 'myQuote' ? '我投标的需求' : '我发布的需求')
|
||||
@@ -384,6 +397,9 @@ Page({
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
return {
|
||||
title: '需求大厅',
|
||||
path: withPromoter('/pages/demand/list/index?opType=all'),
|
||||
};
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user