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