|
@@ -179,37 +179,74 @@
|
|
this.keyword = ""
|
|
this.keyword = ""
|
|
},
|
|
},
|
|
release() {
|
|
release() {
|
|
- this.getCompany.loginPhone = this.userInfo.phone
|
|
|
|
- this.$api.doRequest('get', '/settledCompanyInfo/companyList', this.getCompany)
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- console.log("companyList",res)
|
|
|
|
- if(res.data.data.length > 0){
|
|
|
|
|
|
+ if (!this.hasLogin) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '登录提示',
|
|
|
|
+ content: '您尚未登录,是否立即登录?',
|
|
|
|
+ showCancel: true,
|
|
|
|
+ confirmText: '登录',
|
|
|
|
+ success: (e) => {
|
|
|
|
+ if (e.confirm) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/pages/grain_pulse/release`
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- uni.showModal({
|
|
|
|
- content: "您还没有入驻粮脉,不能发布,是否前去完善入驻信息!",
|
|
|
|
- showCancel: true,
|
|
|
|
- confirmText: '前往',
|
|
|
|
- success: function(res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pages/grain_pulse/enter`
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ url: '/pages/public/login'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ fail: () => {},
|
|
|
|
+ complete: () => {}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ this.getCompany.loginPhone = this.userInfo.phone
|
|
|
|
+ this.$api.doRequest('get', '/settledCompanyInfo/companyList', this.getCompany)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ console.log("companyList",res)
|
|
|
|
+ if(res.data.data.length > 0){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/grain_pulse/release`
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ uni.showModal({
|
|
|
|
+ content: "您还没有入驻粮脉,不能发布,是否前去完善入驻信息!",
|
|
|
|
+ showCancel: true,
|
|
|
|
+ confirmText: '前往',
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/grain_pulse/enter`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
record() {
|
|
record() {
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pages/grain_pulse/record`
|
|
|
|
- })
|
|
|
|
|
|
+ if (!this.hasLogin) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '登录提示',
|
|
|
|
+ content: '您尚未登录,是否立即登录?',
|
|
|
|
+ showCancel: true,
|
|
|
|
+ confirmText: '登录',
|
|
|
|
+ success: (e) => {
|
|
|
|
+ if (e.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/public/login'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fail: () => {},
|
|
|
|
+ complete: () => {}
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/grain_pulse/record`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|