通告功能
This commit is contained in:
parent
c03efe220a
commit
c76258b433
@ -62,8 +62,8 @@
|
|||||||
},
|
},
|
||||||
"title": "RuoYi-App",
|
"title": "RuoYi-App",
|
||||||
"router": {
|
"router": {
|
||||||
"mode" : "hash",
|
"mode": "history",
|
||||||
"base" : "./"
|
"base": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cos-js-sdk-v5": "^1.8.7",
|
"cos-js-sdk-v5": "^1.8.7",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"rich-text-parser": "^1.0.2"
|
"jweixin-module": "^1.6.0",
|
||||||
|
"rich-text-parser": "^1.0.2",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"rich-text-parser": "^1.0.2"
|
"rich-text-parser": "^1.0.2"
|
||||||
|
|||||||
@ -144,6 +144,15 @@
|
|||||||
placeholder="最高" />
|
placeholder="最高" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="uni-form-item uni-column">
|
||||||
|
<view class="title">地区</view>
|
||||||
|
<view class="dl-drawer-item">
|
||||||
|
<uni-data-picker placeholder="请选择" popup-title="请选择地址" :localdata="dataTree"
|
||||||
|
v-model="queryParams.cityId" @change="onchange" @nodeclick="onnodeclick"
|
||||||
|
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||||
|
</uni-data-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view style="display: flex;margin-top: 10rpx;">
|
<view style="display: flex;margin-top: 10rpx;">
|
||||||
<button class="mini-btn" type="default" size="mini" @click="reset()">重置</button>
|
<button class="mini-btn" type="default" size="mini" @click="reset()">重置</button>
|
||||||
<button class="mini-btn" type="warn" size="mini"
|
<button class="mini-btn" type="warn" size="mini"
|
||||||
@ -191,12 +200,17 @@
|
|||||||
import {
|
import {
|
||||||
changeUserType
|
changeUserType
|
||||||
} from '@/utils/common.js'
|
} from '@/utils/common.js'
|
||||||
|
import {
|
||||||
|
treeCity
|
||||||
|
} from '@/api/business/base.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
noticeItem
|
noticeItem
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//城市树结构
|
||||||
|
dataTree: [],
|
||||||
menus: ['全部', '最新', '平台结算', '急招', '品牌置换'],
|
menus: ['全部', '最新', '平台结算', '急招', '品牌置换'],
|
||||||
menuIndex: 0,
|
menuIndex: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
@ -243,6 +257,7 @@
|
|||||||
this.initData("dl_blogger_type", "bloggerTypeList")
|
this.initData("dl_blogger_type", "bloggerTypeList")
|
||||||
this.getByCodeInfo()
|
this.getByCodeInfo()
|
||||||
this.selectDataList()
|
this.selectDataList()
|
||||||
|
this.initAddress()
|
||||||
//鉴权
|
//鉴权
|
||||||
// this.checkRights()
|
// this.checkRights()
|
||||||
},
|
},
|
||||||
@ -250,6 +265,25 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**初始化树结构*/
|
||||||
|
initAddress() {
|
||||||
|
treeCity().then(res => {
|
||||||
|
res.data.forEach(it => {
|
||||||
|
if (it.children) {
|
||||||
|
it.children.forEach(item => {
|
||||||
|
item.children = null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataTree = res.data
|
||||||
|
}).catch((e) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
duration: 2000,
|
||||||
|
title: e
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 去发布
|
* 去发布
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -45,6 +45,9 @@
|
|||||||
hasRights
|
hasRights
|
||||||
} from '@/utils/common.js'
|
} from '@/utils/common.js'
|
||||||
import rightsCode from '@/utils/rightsCode'
|
import rightsCode from '@/utils/rightsCode'
|
||||||
|
import {
|
||||||
|
getMemberDetail
|
||||||
|
} from '@/api/business/member.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tabBarVue,
|
tabBarVue,
|
||||||
@ -124,7 +127,18 @@
|
|||||||
async changeMenu(code) {
|
async changeMenu(code) {
|
||||||
this.nowUserType = getUserType()
|
this.nowUserType = getUserType()
|
||||||
if ("fabu" == code) {
|
if ("fabu" == code) {
|
||||||
|
getMemberDetail().then(res => {
|
||||||
|
if (!res.data.identityType) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂未通告主认证,请先认证',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
this.$tab.navigateTo('/pages/notice/public-notice')
|
this.$tab.navigateTo('/pages/notice/public-notice')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (code == 'dingyue') {
|
if (code == 'dingyue') {
|
||||||
if (!await this.checkIfHasRights(rightsCode.subscribeSelect)) {
|
if (!await this.checkIfHasRights(rightsCode.subscribeSelect)) {
|
||||||
|
|||||||
@ -194,12 +194,12 @@
|
|||||||
/*#endif*/
|
/*#endif*/
|
||||||
/*#ifdef H5*/
|
/*#ifdef H5*/
|
||||||
// 在浏览器端(H5)执行的逻辑
|
// 在浏览器端(H5)执行的逻辑
|
||||||
if (!getToken()) {
|
|
||||||
//未登录状态
|
//未登录状态
|
||||||
getCodeUrl("01", "pages/mine/coupon/my-coupon").then(res => {
|
getCodeUrl("01", "pages/mine/coupon/my-coupon").then(res => {
|
||||||
window.location.href = res.codeUrl;
|
window.location.href = res.codeUrl;
|
||||||
})
|
})
|
||||||
}
|
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
/*#ifdef MP-WEIXIN*/
|
/*#ifdef MP-WEIXIN*/
|
||||||
// 微信小程序端执行的逻辑
|
// 微信小程序端执行的逻辑
|
||||||
|
|||||||
@ -185,18 +185,10 @@
|
|||||||
let userTypeTemp = options.userType
|
let userTypeTemp = options.userType
|
||||||
this.initData(userTypeTemp);
|
this.initData(userTypeTemp);
|
||||||
//获取url中的search
|
//获取url中的search
|
||||||
if (location.search) {
|
if (options.code) {
|
||||||
let search = location.search.slice(1);
|
userTypeTemp = options.state
|
||||||
let arr = search.split("&");
|
|
||||||
let result = {};
|
|
||||||
arr.forEach(function(item) {
|
|
||||||
let itemArr = item.split('=');
|
|
||||||
result[itemArr[0]] = itemArr[1];
|
|
||||||
})
|
|
||||||
if (result.code) {
|
|
||||||
userTypeTemp = result.state
|
|
||||||
let that = this
|
let that = this
|
||||||
getWebAccessTokenAndOpenid(result.code).then(res => {
|
getWebAccessTokenAndOpenid(options.code).then(res => {
|
||||||
that.$store.dispatch('GzhLogin', res).then(() => {
|
that.$store.dispatch('GzhLogin', res).then(() => {
|
||||||
that.initData(userTypeTemp);
|
that.initData(userTypeTemp);
|
||||||
that.loginSuccess()
|
that.loginSuccess()
|
||||||
@ -211,8 +203,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.toLogin(userTypeTemp)
|
this.toLogin(userTypeTemp)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openVip() {
|
openVip() {
|
||||||
@ -238,12 +228,12 @@
|
|||||||
/*#endif*/
|
/*#endif*/
|
||||||
/*#ifdef H5*/
|
/*#ifdef H5*/
|
||||||
// 在浏览器端(H5)执行的逻辑
|
// 在浏览器端(H5)执行的逻辑
|
||||||
if (!getToken()) {
|
|
||||||
//未登录状态
|
//未登录状态
|
||||||
getCodeUrl(userType, "pages/mine/member/member-card").then(res => {
|
getCodeUrl(userType, "pages/mine/member/member-card").then(res => {
|
||||||
window.location.href = res.codeUrl;
|
window.location.href = res.codeUrl;
|
||||||
})
|
})
|
||||||
}
|
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
/*#ifdef MP-WEIXIN*/
|
/*#ifdef MP-WEIXIN*/
|
||||||
// 微信小程序端执行的逻辑
|
// 微信小程序端执行的逻辑
|
||||||
|
|||||||
@ -155,7 +155,7 @@
|
|||||||
地区要求
|
地区要求
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
<view class="item-value">
|
||||||
<uni-data-picker placeholder="请选择" popup-title="请选择收件地址" :localdata="dataTree"
|
<uni-data-picker placeholder="请选择" popup-title="请选择地址" :localdata="dataTree"
|
||||||
v-model="dataObj.cityId" @change="onchange" @nodeclick="onnodeclick"
|
v-model="dataObj.cityId" @change="onchange" @nodeclick="onnodeclick"
|
||||||
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||||
</uni-data-picker>
|
</uni-data-picker>
|
||||||
@ -257,9 +257,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||||
import {
|
|
||||||
toast
|
|
||||||
} from '@/utils/common.js'
|
|
||||||
import upload from '@/utils/upload'
|
import upload from '@/utils/upload'
|
||||||
import {
|
import {
|
||||||
uniListByParentCode
|
uniListByParentCode
|
||||||
@ -273,6 +271,12 @@
|
|||||||
getNoticeDetail
|
getNoticeDetail
|
||||||
} from '@/api/business/notice';
|
} from '@/api/business/notice';
|
||||||
import fuckTextarea from '@/components/fuck-textarea/fuck-textarea.vue'
|
import fuckTextarea from '@/components/fuck-textarea/fuck-textarea.vue'
|
||||||
|
import {
|
||||||
|
toast,
|
||||||
|
hasRights
|
||||||
|
} from '@/utils/common.js'
|
||||||
|
import constant from '@/utils/constant';
|
||||||
|
import rightsCode from '@/utils/rightsCode'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue,
|
navigationBarVue,
|
||||||
@ -369,6 +373,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 鉴权通用方法
|
||||||
|
* @param {Object} rigthsCode
|
||||||
|
*/
|
||||||
|
async checkIfHasRights() {
|
||||||
|
let res = await hasRights(rightsCode.reportInfoCollect)
|
||||||
|
if (!res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '如有需要请开通通告主卡',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
getSameNotice(sameId) {
|
getSameNotice(sameId) {
|
||||||
getNoticeDetail({
|
getNoticeDetail({
|
||||||
noticeId: sameId
|
noticeId: sameId
|
||||||
@ -610,7 +630,11 @@
|
|||||||
/**
|
/**
|
||||||
* 添加字段
|
* 添加字段
|
||||||
*/
|
*/
|
||||||
addNewField() {
|
async addNewField() {
|
||||||
|
//鉴权
|
||||||
|
if (!await this.checkIfHasRights(rightsCode.reportInfoCollect)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$refs.inputDialogCus.open()
|
this.$refs.inputDialogCus.open()
|
||||||
},
|
},
|
||||||
// 查看相关协议
|
// 查看相关协议
|
||||||
@ -1082,4 +1106,3 @@
|
|||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user