You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bocai_supplyChain/components/job-sub/index.js

114 lines
2.5 KiB
JavaScript

const app = getApp()
// let app = null;
Component({
1 year ago
data: {
labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"],
bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"],
1 year ago
corpUserFlag: false,
1 year ago
},
properties: {
// 抽屉高度
recordList: {
type: Array,
value: [],
},
isLogin: {
type: Boolean,
value: true
},
storeJobListSearchForm: {
type: Object,
value: {},
},
agencyStatus: {
12 months ago
type: Number,
value: 0
},
hasUserInfo: {
type: Number,
value: 0
},
selectJob: {
type: Boolean,
value: false
},
loginUserInfo: {
type: Object,
value: {}
},
type: {
type: String,
value: ''
}
},
lifetimes: {
attached: function () {
app.getLoginUserTokenInfo().then(() => {
this.setData({
corpUserFlag: this.properties.loginUserInfo.corpUserFlag
})
});
// 在组件实例进入页面节点树时执行
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
1 year ago
ready () {
// console.log('app.globalData.loginUserInfo.corpUserFlag', app.globalData.loginUserInfo.corpUserFlag);
console.log('this.properties.loginUserInfo', this.properties.loginUserInfo);
// app.getLoginUserTokenInfo().then(() => {
// });
1 year ago
},
methods: {
goLogin () {
wx.setStorageSync("comeFromPage", "firstBill");
wx.navigateTo({
url: "/pages/login/index",
});
},
stoptap (e) {
return false;
},
getPhoneNumber (e) {
let that = this
that.triggerEvent("getPhoneNumber", e.detail);
},
collectPaste (e) {
let that = this
console.log('collectPaste', e);
that.triggerEvent("collectPaste", e.currentTarget);
},
getUserInfoBtn (e) {
let that = this
console.log('getUserInfoBtn', e);
that.triggerEvent("getUserInfoBtn", e.currentTarget);
},
goDetail (e) {
console.log(e);
var that = this;
1 year ago
if (!that.data.isLogin) {
wx.navigateTo({
url: `../login/index`
});
}
if (that.data.selectJob) {
that.triggerEvent("getDetail", e.currentTarget);
} else {
wx.navigateTo({
1 year ago
url: `../detail/index?storeJobId=${e.currentTarget.dataset.id}&jobClassify=${e.currentTarget.dataset.info.jobClassify}`,
});
}
},
}
})