通告功能
This commit is contained in:
parent
c03efe220a
commit
c76258b433
@ -62,8 +62,8 @@
|
||||
},
|
||||
"title": "RuoYi-App",
|
||||
"router": {
|
||||
"mode" : "hash",
|
||||
"base" : "./"
|
||||
"mode": "history",
|
||||
"base": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,9 @@
|
||||
"dependencies": {
|
||||
"cos-js-sdk-v5": "^1.8.7",
|
||||
"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": {
|
||||
"rich-text-parser": "^1.0.2"
|
||||
|
@ -144,6 +144,15 @@
|
||||
placeholder="最高" />
|
||||
</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;">
|
||||
<button class="mini-btn" type="default" size="mini" @click="reset()">重置</button>
|
||||
<button class="mini-btn" type="warn" size="mini"
|
||||
@ -191,12 +200,17 @@
|
||||
import {
|
||||
changeUserType
|
||||
} from '@/utils/common.js'
|
||||
import {
|
||||
treeCity
|
||||
} from '@/api/business/base.js'
|
||||
export default {
|
||||
components: {
|
||||
noticeItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//城市树结构
|
||||
dataTree: [],
|
||||
menus: ['全部', '最新', '平台结算', '急招', '品牌置换'],
|
||||
menuIndex: 0,
|
||||
dataList: [],
|
||||
@ -243,6 +257,7 @@
|
||||
this.initData("dl_blogger_type", "bloggerTypeList")
|
||||
this.getByCodeInfo()
|
||||
this.selectDataList()
|
||||
this.initAddress()
|
||||
//鉴权
|
||||
// this.checkRights()
|
||||
},
|
||||
@ -250,6 +265,25 @@
|
||||
|
||||
},
|
||||
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
|
||||
} from '@/utils/common.js'
|
||||
import rightsCode from '@/utils/rightsCode'
|
||||
import {
|
||||
getMemberDetail
|
||||
} from '@/api/business/member.js'
|
||||
export default {
|
||||
components: {
|
||||
tabBarVue,
|
||||
@ -124,7 +127,18 @@
|
||||
async changeMenu(code) {
|
||||
this.nowUserType = getUserType()
|
||||
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')
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
if (code == 'dingyue') {
|
||||
if (!await this.checkIfHasRights(rightsCode.subscribeSelect)) {
|
||||
|
@ -194,12 +194,12 @@
|
||||
/*#endif*/
|
||||
/*#ifdef H5*/
|
||||
// 在浏览器端(H5)执行的逻辑
|
||||
if (!getToken()) {
|
||||
|
||||
//未登录状态
|
||||
getCodeUrl("01", "pages/mine/coupon/my-coupon").then(res => {
|
||||
window.location.href = res.codeUrl;
|
||||
})
|
||||
}
|
||||
|
||||
/*#endif*/
|
||||
/*#ifdef MP-WEIXIN*/
|
||||
// 微信小程序端执行的逻辑
|
||||
|
@ -185,18 +185,10 @@
|
||||
let userTypeTemp = options.userType
|
||||
this.initData(userTypeTemp);
|
||||
//获取url中的search
|
||||
if (location.search) {
|
||||
let search = location.search.slice(1);
|
||||
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
|
||||
if (options.code) {
|
||||
userTypeTemp = options.state
|
||||
let that = this
|
||||
getWebAccessTokenAndOpenid(result.code).then(res => {
|
||||
getWebAccessTokenAndOpenid(options.code).then(res => {
|
||||
that.$store.dispatch('GzhLogin', res).then(() => {
|
||||
that.initData(userTypeTemp);
|
||||
that.loginSuccess()
|
||||
@ -211,8 +203,6 @@
|
||||
} else {
|
||||
this.toLogin(userTypeTemp)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
openVip() {
|
||||
@ -238,12 +228,12 @@
|
||||
/*#endif*/
|
||||
/*#ifdef H5*/
|
||||
// 在浏览器端(H5)执行的逻辑
|
||||
if (!getToken()) {
|
||||
|
||||
//未登录状态
|
||||
getCodeUrl(userType, "pages/mine/member/member-card").then(res => {
|
||||
window.location.href = res.codeUrl;
|
||||
})
|
||||
}
|
||||
|
||||
/*#endif*/
|
||||
/*#ifdef MP-WEIXIN*/
|
||||
// 微信小程序端执行的逻辑
|
||||
|
@ -155,7 +155,7 @@
|
||||
地区要求
|
||||
</view>
|
||||
<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"
|
||||
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||
</uni-data-picker>
|
||||
@ -257,9 +257,7 @@
|
||||
|
||||
<script>
|
||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||
import {
|
||||
toast
|
||||
} from '@/utils/common.js'
|
||||
|
||||
import upload from '@/utils/upload'
|
||||
import {
|
||||
uniListByParentCode
|
||||
@ -273,6 +271,12 @@
|
||||
getNoticeDetail
|
||||
} from '@/api/business/notice';
|
||||
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 {
|
||||
components: {
|
||||
navigationBarVue,
|
||||
@ -369,6 +373,22 @@
|
||||
}
|
||||
},
|
||||
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) {
|
||||
getNoticeDetail({
|
||||
noticeId: sameId
|
||||
@ -610,7 +630,11 @@
|
||||
/**
|
||||
* 添加字段
|
||||
*/
|
||||
addNewField() {
|
||||
async addNewField() {
|
||||
//鉴权
|
||||
if (!await this.checkIfHasRights(rightsCode.reportInfoCollect)) {
|
||||
return
|
||||
}
|
||||
this.$refs.inputDialogCus.open()
|
||||
},
|
||||
// 查看相关协议
|
||||
@ -1082,4 +1106,3 @@
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user