# Conflicts:
#	pages/components/my-notice-item-tg.vue
This commit is contained in:
Vinjor 2025-04-15 11:54:39 +08:00
commit 905d8c68b0
19 changed files with 986 additions and 325 deletions

View File

@ -43,3 +43,12 @@ export function initCouponList() {
method: 'get'
})
}
//------------------通用查询分类树方法-----------------------
export function categoryTreeData(params) {
return request({
url: '/base/category/treeData',
method: 'get',
params: params
})
}

View File

@ -16,6 +16,14 @@ export function queryDetail(params) {
params: params
})
}
//查询黑名单
export function blackList(params) {
return request({
url: '/member/blacklist/list',
method: 'get',
params: params
})
}
//保存博主
export function uniSaveMember(data) {
return request({

View File

@ -54,3 +54,64 @@ export function closeNotice(params) {
params: params
})
}
// 博主举报通告主
export function saveReport(data) {
return request({
url: '/busi/report/saveReport',
method: 'post',
data: data
})
}
// 我报名查询通告列表
export function myNoticeList(params) {
return request({
url: '/busi/notice/myNoticeList',
method: 'get',
params: params
})
}
// 通告主查询通告列表
export function myPublishNoticeList(params) {
return request({
url: '/busi/notice/myPublishNoticeList',
method: 'get',
params: params
})
}
// 发布通告
export function saveNotice(data) {
return request({
url: '/busi/notice/saveOrUpdate',
method: 'post',
data: data
})
}
// 发布通告
export function publishTakeDown(data) {
return request({
url: '/busi/notice/publishTakeDown?noticeId=' + data.noticeId + '&publishTakeDown=' + data
.publishTakeDown,
method: 'post'
})
}
//平台意见反馈
export function uniAddFeedBack(data) {
return request({
url: '/busi/feedback/uniAddFeedBack',
method: 'post',
data: data
})
}
// 查询意见反馈列表
export function feedbackList(params) {
return request({
url: '/busi/feedback/list',
method: 'get',
params: params
})
}

View File

@ -1,6 +1,9 @@
<template>
<view class="my-notice-item-box-tg">
<view class="notice-status">报名中</view>
<view>
<view class="my-notice-item-box-tg" v-for="(item,index) in dataList">
<view class="notice-status">{{item.reportStatusText}}</view>
<!-- 通告信息 -->
<view class="notice-main-box">
<notice-item :dataObj="item"></notice-item>
@ -8,87 +11,67 @@
<!-- 操作按钮 -->
<view class="opt-button-box">
<!-- 状态为待审核和已审核的可以关闭 -->
<view class="opt-item" v-if="item.approvalStatus=='0' || item.approvalStatus=='1'">关闭</view>
<view class="opt-item" v-if="item.approvalStatus!='2'" @click="updateStatus(0,item.id)">关闭</view>
<!-- 状态为已关闭的可以重启 -->
<view class="opt-item" v-if="item.approvalStatus=='2'">重启</view>
<view class="opt-item" v-if="item.approvalStatus=='2'" @click="updateStatus(1,item.id)">重启</view>
<view class="opt-item" @click="goDetail(item.id)">查看详情</view>
<view class="opt-item">发类似</view>
<view class="opt-item" @click="goEvaluate()">评价(demo)</view>
<view class="opt-item" @click="publish(item)">发类似</view>
<view class="opt-item" @click="evaluate(item)">评价(demo)</view>
</view>
</view>
</view>
</template>
<script>
import noticeItem from '@/pages/components/notice-item.vue'
import {
publishTakeDown
} from '@/api/business/notice.js'
export default {
props: {
dataList: {
type: Array,
default: []
}
},
components: {
noticeItem
},
data() {
return {
item: {
"creator": "1",
"createTime": "2025-03-28 15:41:18",
"updater": "1",
"updateTime": "2025-03-28 15:41:18",
"delFlag": "0",
"params": {},
"id": "4797bd2c87bd5c2a480e412f6adb2459",
"userId": 103,
"title": "找小红书达人种草【蓝月亮】洗衣液",
"platformCode": "xiaohongshu",
"province": "河北省",
"city": "唐山市",
"feeDown": 100.00,
"feeUp": null,
"isSelfPrice": 0,
"giftDetail": null,
"giftPrice": null,
"endDate": "2025-03-31",
"brand": "蓝月亮",
"isShowBrand": 1,
"needNum": 100,
"fansDown": 100,
"fansUp": 100000,
"isEligible": 0,
"pic": null,
"collect": null,
"detail": "<p>找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液</p>",
"images": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154103A008.png,/profile/upload/2025/03/28/1_20250328154109A009.png,/profile/upload/2025/03/28/2_20250328154109A010.png,/profile/upload/2025/03/28/3_20250328154109A011.png,/profile/upload/2025/03/28/4_20250328154109A012.png,/profile/upload/2025/03/28/5_20250328154109A013.png",
"bloggerTypes": "洗护,美妆,食品",
"isShowTel": 1,
"wechat": null,
"tel": null,
"groupImage": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154059A007.png",
"isUseCoupon": 0,
"approvalStatus": "1",
"approvalUserId": null,
"approvalTime": null,
"approvalRemark": null,
"similarityIds": null,
"userNickName": "微信用户",
"avatar": "",
"platformName": null,
"isSuper": null,
"signStatus": null,
"mainImage": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154103A008.png",
"viewNum": 31,
"reportNum": 0,
"bloggerTypesText": "洗护 美妆 食品",
"approvalUserName": null
}
}
},
methods: {
publish(item) {
this.$tab.navigateTo('/pages/notice/public-notice?sameId=' + item.id)
},
evaluate(){
this.$tab.navigateTo('/pages/mine/set/evaluate')
},
updateStatus(status, id) {
let data = {
publishTakeDown: status,
noticeId: id
}
publishTakeDown(data).then(res => {
uni.showToast({
icon: 'none',
duration: 1000,
title: '成功'
});
uni.$emit('updateList', {
msg: '页面更新'
})
})
},
/**
* 查看详情
* @param {Object} id
*/
goDetail(id) {
this.$emit("goDetail", id)
},
goEvaluate() {
this.$emit("goEvaluate")
}
}
}
@ -155,7 +138,7 @@
.opt-button-box {
width: 100%;
font-size: 30rpx;
font-size: 26rpx;
padding-top: 10rpx;
display: flex;
justify-content: flex-end;

View File

@ -1,19 +1,18 @@
<template>
<view>
<view class="my-notice-item-box" v-for="(item,index) in dataList">
<view class="notice-status">进行中</view>
<view class="notice-status">{{item.signStatus||''}}</view>
<view class="report-title">
<text class="status-text">已报名</text>
<view class="time-text">2025-04-03 10:07:32</view>
<view class="time-text">{{item.signTime||''}}</view>
</view>
<!-- 通告信息 -->
<view class="notice-main-box">
<notice-item :dataObj="itemObj"></notice-item>
<notice-item :dataObj="item"></notice-item>
</view>
<!-- 操作按钮 -->
<view class="opt-button-box">
<view class="opt-item">追加留言</view>
<view class="opt-item">查看详情</view>
<view class="opt-item" @click="goDetail(item)">查看详情</view>
</view>
</view>
</view>
@ -86,7 +85,15 @@
}
}
},
methods: {}
methods: {
/**
* 查看通告详情
* @param {Object} item
*/
goDetail(item) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
}
}
}
</script>

View File

@ -26,11 +26,17 @@
</template>
<script>
import {
myPublishNoticeList
} from '@/api/business/notice.js'
import {
toast,
hasRights
} from '@/utils/common.js'
import myNoticeItemTg from '@/pages/components/my-notice-item-tg.vue'
import {
getCatgByCode
} from '@/api/system/config.js'
export default {
components: {
myNoticeItemTg
@ -39,8 +45,9 @@
return {
menus: ['进行中', '已关闭'],
menuIndex: 0,
dataList: ['', ''],
dataList: [],
queryParams: {
status: '进行中',
pageNum: 1,
pageSize: 10,
},
@ -49,7 +56,61 @@
isTriggered: false
}
},
mounted() {
this.initData("dl_platform", "platformList")
this.initData("dl_blogger_type", "bloggerTypeList")
this.selectDataList()
let that = this
uni.$on('updateList', function(data) {
that.selectDataList()
})
},
methods: {
/**
* 查询数据
*/
selectDataList() {
myPublishNoticeList(this.queryParams).then(res => {
this.isTriggered = false
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.total
}
}).catch((e) => {
this.isTriggered = false
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**
* 初始化数据
* @param {Object} code
* @param {Object} dataObj
*/
initData(code, dataObj) {
let that = this
getCatgByCode({
code: code
}).then(res => {
if (res.code == 200) {
this[dataObj] = res.data
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**
* 菜单点击
* @param {Object} index
@ -58,7 +119,10 @@
itemClick(index, item) {
this.menuIndex = index
//
this.onRefresherrefresh()
this.queryParams.status = item
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
/**
* 上滑加载数据
@ -71,6 +135,7 @@
}
//+1,
this.queryParams.pageNum++
this.selectDataList()
},
/**
* 下拉刷新数据
@ -79,6 +144,7 @@
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
/**
/**

View File

@ -30,15 +30,22 @@
hasRights
} from '@/utils/common.js'
import myNoticeItem from '@/pages/components/my-notice-item.vue'
import {
myNoticeList
} from '@/api/business/notice.js'
import rightsCode from '@/utils/rightsCode'
import {
getCatgByCode
} from '@/api/system/config.js'
export default {
components: {
myNoticeItem
},
data() {
return {
menus: ['全部', '已报名', '待审核', '待发布', '已完成', '未合作'],
menus: ['全部', '审核中', '已通过', '未合作'],
menuIndex: 0,
dataList: ['', ''],
dataList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
@ -48,7 +55,63 @@
isTriggered: false
}
},
mounted() {
this.initData("dl_platform", "platformList")
this.initData("dl_blogger_type", "bloggerTypeList")
this.selectDataList()
},
methods: {
/**
* 初始化数据
* @param {Object} code
* @param {Object} dataObj
*/
initData(code, dataObj) {
let that = this
getCatgByCode({
code: code
}).then(res => {
if (res.code == 200) {
this[dataObj] = res.data
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**
* 查询数据
*/
selectDataList() {
myNoticeList(this.queryParams).then(res => {
this.isTriggered = false
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.total
}
}).catch((e) => {
this.isTriggered = false
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**
* 查看通告详情
* @param {Object} item
*/
goDetail(item) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
},
/**
* 菜单点击
* @param {Object} index
@ -56,6 +119,10 @@
*/
itemClick(index, item) {
this.menuIndex = index
this.queryParams.reportStatus = item
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
/**
* 上滑加载数据
@ -68,6 +135,7 @@
}
//+1,
this.queryParams.pageNum++
this.selectDataList()
},
/**
* 下拉刷新数据
@ -76,6 +144,8 @@
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
}
}

View File

@ -19,7 +19,7 @@
</view>
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 10rpx;">
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
<view class="dl-content">类型{{item.bloggerTypesText}}</view>
<view class="dl-content">类型{{item.bloggerTypesText||'无限制'}}</view>
</view>
<view class="text-item" style="padding-top: 10rpx;">
<view class="item-box" style="width: 40%;">

View File

@ -26,7 +26,7 @@
<view v-if="!ifChoose" class="item-opt" @click="toEdit(item.id)">
<uni-icons type="compose" color="#565656" size="16"></uni-icons><text></text>
</view>
<view v-if="ifChoose" class="item-opt" @click="chooseItem(item.id)">
<view v-if="ifChoose" class="item-opt" @click="chooseItem(item)">
<uni-icons type="paperplane" color="#565656" size="16"></uni-icons><text></text>
</view>
</view>
@ -68,7 +68,7 @@
isTriggered: false,
dataList: [],
//
ifChoose: true,
ifChoose: false,
}
},
@ -141,7 +141,10 @@
* 选择地址
* @param {Object} id
*/
chooseItem(id) {},
chooseItem(item) {
uni.$emit('updateAddr', item)
uni.navigateBack()
},
/**复制*/
toCopy(id) {
this.$tab.navigateTo(`/pages/mine/addr/addr-detail?id=` + id + `&isCopy=1`)

View File

@ -267,7 +267,7 @@
* 跳转建议列表
*/
goSuggest() {
this.$tab.navigateTo('/pages/mine/set/suggest')
this.$tab.navigateTo('/pages/mine/set/suggest?userType='+this.localUserType)
},
/**
* 跳转地址列表

View File

@ -9,7 +9,7 @@
<view class="dl-image-box">
<image v-if="!item.avatar" class="touxiang" src="@/static/images/profile.jpg" mode="aspectFit">
</image>
<image v-else class="touxiang" :src="item.avatar" mode="aspectFit"></image>
<image v-else class="touxiang" :src="uploadUrl+item.avatar" mode="aspectFit"></image>
<image class="sex" src="@/static/mine/sex_girl.png" mode="aspectFit"></image>
</view>
<view class="name-box">
@ -37,12 +37,16 @@
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {toast} from '@/utils/common.js'
import config from '@/config';
import {blackList} from '@/api/business/member.js';
export default {
components: {
navigationBarVue
},
data() {
return {
uploadUrl: config.baseUrl,
dataList: [{
nickName: "李林",
createTime: "2024-02-10 12:22:44",
@ -53,13 +57,34 @@
queryParams: {
pageNum: 1,
pageSize: 10,
userId:null
},
total: 0,
//
isTriggered: false
}
},
onLoad(option){
this.queryParams.userId = option.userId
this.initData()
},
methods: {
/**出事后数据*/
initData(){
blackList(this.queryParams).then(res=>{
this.isTriggered = false
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.data.total
}
})
},
/**
* 上滑加载数据
*/
@ -71,6 +96,7 @@
}
//+1,
this.queryParams.pageNum++
this.initData()
},
/**
* 下拉刷新数据
@ -79,6 +105,7 @@
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
this.initData()
},
remove(id) {}
}

View File

@ -116,7 +116,7 @@
},
methods: {
goMyBlackList() {
this.$tab.navigateTo('/pages/mine/set/black-list')
this.$tab.navigateTo('/pages/mine/set/black-list?userId='+this.userId)
},
submit(ref) {
this.valiFormData.avatar = this.fileImageUrl.join(',');

View File

@ -27,12 +27,18 @@
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {toast} from '@/utils/common.js'
import config from '@/config';
import {feedbackList} from '@/api/business/notice.js'
import constant from '@/utils/constant';
import {getJSONData} from '@/utils/auth.js'
export default {
components: {
navigationBarVue
},
data() {
return {
uploadUrl: config.baseUrl,
dataList: [{
createTime: "2024-02-10 12:22:44",
content: "我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见",
@ -48,13 +54,41 @@
queryParams: {
pageNum: 1,
pageSize: 10,
userId:null
},
total: 0,
//
isTriggered: false
}
},
onShow(){
this.initData();
},
methods: {
/**初始化数据*/
initData(){
this.queryParams.userId = getJSONData(constant.userInfo).userId
feedbackList(this.queryParams).then(res=>{
this.isTriggered = false
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
this.dataList = this.dataList.map(item => {
item.imagesList = item.images.split(',').map(image => ({ url: this.uploadUrl + image.trim() }));
return item;
});
} else {
this.dataList = this.dataList.concat(res.data.records)
this.dataList = this.dataList.map(item => {
item.imagesList = item.images.split(',').map(image => ({ url: this.uploadUrl + image.trim() }));
return item;
});
}
this.total = res.data.data.total
}
})
},
/**
* 上滑加载数据
*/
@ -66,6 +100,7 @@
}
//+1,
this.queryParams.pageNum++
this.initData()
},
/**
* 下拉刷新数据
@ -74,6 +109,7 @@
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
this.initData()
},
}
}

View File

@ -8,9 +8,10 @@
举报类型
</view>
<view class="item-value">
<uni-data-select v-model="firstCode" :localdata="firstList" @change="change"></uni-data-select>
<uni-data-select v-if="ifShowSecond" v-model="secondCode" :localdata="secondList"
@change="changeSecond"></uni-data-select>
<uni-data-picker placeholder="请选择" popup-title="请选择" :localdata="dataTree"
v-model="dataObj.reportType" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker>
</view>
</view>
<view class="item-field">
@ -48,16 +49,23 @@
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {categoryTreeData} from '@/api/business/base.js';
import {saveReport} from '@/api/business/notice.js';
import upload from '@/utils/upload'
import {toast} from '@/utils/common.js'
import config from '@/config';
export default {
components: {
navigationBarVue
},
data() {
return {
uploadUrl: config.baseUrl,
dataObj: {
content: ""
},
sizeType: ['compressed'],
dataTree:[],
firstList: [{
value: 0,
text: "篮球"
@ -92,9 +100,46 @@
secondCode: "",
//
ifShowSecond: false,
//id
reportUserId:'',
//id
reportNoticeId:''
}
},
onLoad(option){
this.reportUserId = option.userId
this.reportNoticeId = option.noticeId
},
onShow(){
//
this.getCategory()
},
methods: {
onnodeclick(e) {
console.log(e, 135);
},
onpopupopened(e) {
console.log('popupopened');
},
onpopupclosed(e) {
console.log('popupclosed');
},
onchange(e) {
console.log('onchange:', e);
},
/**获取分类树*/
getCategory(){
categoryTreeData({code:'report_type'}).then(res => {
if (res.code == 200) {
this.dataTree = res.data
}
})
},
switch1Change: function(e) {
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
},
@ -106,18 +151,40 @@
}).then((res) => {
console.log(res, '215')
this.fileList.push({
url: config.baseUrl + res.data
url: res.url
})
console.log(this.fileList, 'fileList')
})
}
},
deleteFile(file, index) {
console.log('删除文件');
this.fileList.splice(index, 1);
},
/**提交*/
submitForm() {},
submitForm() {
//
if (this.fileList.length > 0) {
this.dataObj.images = this.fileList
.map(item => item.url.replace(this.uploadUrl, ''))
.join(',');
}
this.dataObj.userType = '02'
this.dataObj.reportUserId = this.reportUserId
this.dataObj.reportUserType = '01'
this.dataObj.reportNoticeId = this.reportNoticeId
saveReport(this.dataObj).then(res=>{
if (res.code ==200) {
uni.showToast({
icon: 'success',
duration: 2000,
title: '举报成功'
});
uni.navigateBack()
}
}).catch((e)=>{
toast(e)
})
},
/**
* 去我的建议列表
*/

View File

@ -8,7 +8,7 @@
写下你的建议
</view>
<view class="item-value">
<textarea v-model="dataObj.content" placeholder="请输入" />
<uni-easyinput type="textarea" v-model="dataObj.content" placeholder="请输入" />
</view>
</view>
<view class="item-field">
@ -37,20 +37,29 @@
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import upload from '@/utils/upload'
import {toast} from '@/utils/common.js'
import config from '@/config';
import {uniAddFeedBack} from '@/api/business/notice.js'
export default {
components: {
navigationBarVue
},
data() {
return {
uploadUrl: config.baseUrl,
dataObj: {
content: ""
},
sizeType: ['compressed'],
//
fileList: [],
userType:"",
}
},
onLoad(option){
this.userType = option.userType
},
methods: {
afterRead(file) {
for (let i = 0; i < file.tempFilePaths.length; i++) {
@ -60,9 +69,8 @@
}).then((res) => {
console.log(res, '215')
this.fileList.push({
url: config.baseUrl + res.data
url: res.url
})
console.log(this.fileList, 'fileList')
})
}
},
@ -71,7 +79,27 @@
this.fileList.splice(index, 1);
},
/**提交*/
submitForm() {},
submitForm() {
//
if (this.fileList.length > 0) {
this.dataObj.images = this.fileList
.map(item => item.url.replace(this.uploadUrl, ''))
.join(',');
}
this.dataObj.userType = this.userType
uniAddFeedBack(this.dataObj).then(res => {
if (res.code == 200){
uni.showToast({
icon: 'success',
duration: 2000,
title: '举报成功'
});
uni.navigateBack()
}
}).catch((e)=>{
toast(e)
})
},
/**
* 去我的建议列表
*/
@ -144,14 +172,7 @@
border-radius: 8rpx;
}
textarea {
width: 100%;
height: 150rpx;
color: #686868;
padding: 10rpx 0 10rpx 20rpx;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
}
}
.submit-box {

View File

@ -75,13 +75,14 @@
{{formatNumberWithUnits(noticeDetail.fansDown)||'0'}}-{{formatNumberWithUnits(noticeDetail.fansUp)||''}}
</view>
</view>
<view class="dl-item">
<view class="dl-item" v-if='noticeDetail.province'>
<view class="dl-label">
地区要求
</view>
<view class="dl-value">{{noticeDetail.city||''}} </view>
<view class="dl-value">{{noticeDetail.province+(noticeDetail.city?('-'+noticeDetail.city):'')}}
</view>
<view class="dl-item">
</view>
<view class="dl-item" v-if='noticeDetail.bloggerTypes'>
<view class="dl-label">
博主类型
</view>
@ -107,28 +108,26 @@
<!-- 联系方式 -->
<view class="info-box notice-detail">
<view class="detail-title">联系方式</view>
<view class="field-box">
<view class="field-box" v-if="passSign">
<view class="dl-item">
<view class="dl-label">
联系人
微信群码图片
</view>
<view class="dl-value">报名后可查看 </view>
<view class="dl-value">
<image v-if="noticeDetail.groupImage" @click="preview([noticeDetail.groupImage])"
:src="imageUrl+noticeDetail.groupImage" mode="widthFix"></image>
<text v-else>未上传请等待通告主联系</text>
</view>
</view>
</view>
<view class="field-box" v-else>
<view class="dl-item">
<view class="dl-label">
微信号
</view>
<view class="dl-value">报名后可查看 </view>
</view>
<view class="dl-item">
<view class="dl-label">
微信二维码
</view>
<view class="dl-value">报名后可查看 </view>
</view>
<view class="dl-item">
<view class="dl-label">
加入通告二维码
微信群码图片
</view>
<view class="dl-value">报名后可查看 </view>
</view>
@ -136,19 +135,24 @@
</view>
<!-- 报名列表 -->
<view class="info-box notice-detail" v-if="!viewMy">
<view class="detail-title">已报名{{imageArray.length||0}}</view>
<view class="detail-title">已报名{{allImgNum}}</view>
<view class="image-box" v-if="imageArray.length>0"
:style="{height:(imageArray.length*(imageWidth+10)+20)+'rpx'}">
<view class="image-row" v-for="(row,rowIndex) in imageArray">
<image v-for="(item,i) in row"
:style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}"
<span v-for=" (item,i) in row">
<image v-if="item" :style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}"
:src="item" mode="aspectFit">
</image>
<image v-else :style="{ top:(imageWidth+10)*rowIndex+'rpx',left:imageWidth*i+'rpx'}"
src="@/static/images/profile.jpg" mode="aspectFit">
</image>
</span>
</view>
</view>
</view>
<!-- 去报名始终浮动下方 -->
<view class="dl-bottom-box" v-show="showBottom">
<view class="dl-bottom-box" v-show="showBottom&&type=='common'">
<!-- 报名 -->
<view class="report-box">
<view @click="goHome()">
@ -158,7 +162,8 @@
<image src="@/static/detail/share.png" mode="aspectFit"></image>
</view>
<view v-if="null==userInfo" class="join-report">请登录后报名</view>
<view v-else-if="ifBz" @click="goReport()" class="join-report">报名参加</view>
<view v-else-if="!isSign && ifBz" @click="goReport()" class="join-report">报名参加</view>
<view v-else-if="isSign && ifBz" class="join-report">已报名</view>
<view v-else class="join-report" @click="changeUserType()">切换博主后报名</view>
</view>
<!-- 通告发布人能操作的 -->
@ -236,6 +241,8 @@
imageArray: [
],
//
allImgNum: 0,
//rpx--
imageWidth: 70,
//
@ -243,7 +250,8 @@
//
isLove: false,
//
isSign: false,
passSign: false,
isSign: true,
//
userDetail: {
avatar: '',
@ -282,10 +290,11 @@
shareImage: '/static/bg.jpg', //
qrSize: 100, //
qrUrl: 'https://ext.dcloud.net.cn/plugin?id=5747', //
type: 'common'
}
},
onReady() {
this.calculateImagesPerRow();
//
this.checkUserType()
this.showBottom = true
@ -295,10 +304,16 @@
if (params.viewMy) {
this.viewMy = true
}
if (params.type) {
this.type = params.type
}
this.noticeId = params.id
if (null != getJSONData(constant.userInfo)) {
this.userInfo = getJSONData(constant.userInfo)
}
},
onShow() {
this.getDetail()
this.viewNotice()
},
@ -377,7 +392,7 @@
})
},
goReportForm() {
this.$tab.navigateTo('/pages/mine/set/report-form')
this.$tab.navigateTo('/pages/mine/set/report-form?userId='+this.userDetail.userId+'&noticeId='+this.noticeId)
},
goMemberIndex() {
this.$tab.navigateTo('/pages/mine/member/member-index')
@ -398,12 +413,14 @@
if (res.code == 200) {
this.noticeDetail = res.data.noticeDetail
this.userDetail = res.data.userDetail
this.imageArray = res.data.signUserAvatarList
this.isLove = res.data.isLove
this.passSign = res.data.passSign
this.isSign = res.data.isSign
if (this.noticeDetail.images) {
this.noticeDetail.imageArray = this.noticeDetail.images.split(",")
}
this.allImgNum = res.data.signUserAvatarList.length
this.calculateImagesPerRow(res.data.signUserAvatarList)
}
}).catch((e) => {
this.isTriggered = false
@ -521,7 +538,12 @@
/**
* 计算头像显示区域高度
*/
calculateImagesPerRow() {
calculateImagesPerRow(imgs) {
let tempImg = []
imgs.forEach(it => {
tempImg.push(this.imageUrl + it)
})
console.log(tempImg);
const systemInfo = uni.getSystemInfoSync();
//1rpx px
let rpxUnit = (systemInfo.screenWidth / 750)
@ -532,10 +554,7 @@
//
let imagesPerRow = Math.floor(screenWidth / imageWidthPx);
//
let thisArray = []
for (var i = 0; i < 50; i++) {
thisArray.push('/static/images/profile.jpg')
}
let thisArray = tempImg
for (let i = 0; i < thisArray.length; i += imagesPerRow) {
this.imageArray.push(thisArray.slice(i, i + imagesPerRow));
}
@ -803,14 +822,27 @@
.dl-item {
display: flex;
justify-content: center;
align-items: flex-start;
justify-content: start;
align-items: center;
margin-bottom: 10rpx;
.dl-label {}
.dl-label {
width: 300rpx;
display: flex;
justify-content: start;
align-items: center;
}
.dl-value {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
image {
width: 200rpx;
height: 80rpx;
}
}
}
}

View File

@ -19,8 +19,11 @@
<view class="data-list-box">
<view class="form-warn">
<image src="@/static/detail/warn.png" mode="aspectFit"></image>
<text>注意请勿发布直发代发等虚假通告</text>
<text>注意请勿发布直发代发等虚假通告
为了您的信息安全平台不建议填写您的银行卡号身份证号密码等隐私信息</text>
</view>
<view class="form-content">
<view class="item-field">
<view class="item-lable is-required">
@ -40,36 +43,6 @@
:imgCode="dataObj.platformCode"></uni-data-select>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
稿费
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.feeLimit" :localdata="ifHasRange"
@change="change($event,'fee')" :clear="false"></uni-data-select>
<view class="dl-drawer-item" v-if="dataObj.feeLimit">
<input class="uni-input" v-model="dataObj.feeDown" type="digit" placeholder="最低" />
<view></view>
<input class="uni-input" v-model="dataObj.feeUp" type="digit" placeholder="最高" />
</view>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
赠品
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.giftLimit" :localdata="ifHasRange"
@change="change($event,'gift')" :clear="false"></uni-data-select>
<view class="dl-drawer-item" v-if="dataObj.giftLimit">
<textarea v-model="dataObj.giftDetail" type="text" placeholder="请输入赠品明细" />
</view>
<view class="dl-drawer-item" v-if="dataObj.giftLimit">
<input class="uni-input" v-model="dataObj.giftDetail" type="number"
placeholder="请输入赠品价值(元)" />
</view>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
截止时间
@ -79,6 +52,67 @@
@maskClick="maskClick" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
稿费下限
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.feeDown" type="digit" placeholder="最低" />
</view>
</view>
<view class="item-field">
<view class="item-lable">
稿费上限
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.feeUp" type="digit" placeholder="最高(不填代表无上限)" />
</view>
</view>
<view class="item-field">
<view class="item-lable">
招募名额
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.needNum" type="number"
placeholder="请输入(不填代表无上限)" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
是否需自报价
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.isSelfPrice" :localdata="ifHasRange"
@change="change($event,'isSelfPrice')" :clear="false"></uni-data-select>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
是否平台结算
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.isPlatformFree" :localdata="ifHasRange"
@change="change($event,'isPlatformFree')" :clear="false"></uni-data-select>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
是否有赠品
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.haveGift" :localdata="ifHasRange"
@change="change($event,'gift')" :clear="false"></uni-data-select>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
是否公开品牌
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.isShowBrand" :localdata="ifHasRange"
@change="change($event,'isShowBrand')" :clear="false"></uni-data-select>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
品牌
@ -87,53 +121,39 @@
<input class="uni-input" v-model="dataObj.brand" type="text" placeholder="请输入" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
名额
粉丝下限
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.needNum" type="number" placeholder="请输入" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
粉丝
</view>
<view class="item-value">
<uni-data-select v-model="dataObj.fansLimit" :localdata="limitRange"
@change="change($event,'fans')" :clear="false"></uni-data-select>
<view class="dl-drawer-item" v-if="dataObj.fansLimit">
<input class="uni-input" v-model="dataObj.fansDown" type="digit" placeholder="最低" />
<view></view>
<input class="uni-input" v-model="dataObj.fansUp" type="digit" placeholder="最高" />
</view>
<view class="dl-drawer-item" v-if="dataObj.fansLimit">
<uni-data-checkbox @change="chooseBoxFun($event,'isEligible')" multiple
:localdata="isEligibleList" />
</view>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
通告明细
<view class="item-lable ">
粉丝上限
</view>
<view class="item-value">
<textarea v-model="dataObj.giftDetail" style="height: 600rpx;" type="text"
placeholder="请输入赠品明细" />
<input class="uni-input" v-model="dataObj.fansUp" type="digit" placeholder="最高(不填代表无上限)" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
产品图
<view class="item-lable ">
地区要求
</view>
<view class="item-value">
<uni-file-picker :value="fileList" :sizeType="sizeType"
@select="afterRead($event,'fileList')" @delete="deleteFile($event,'fileList')"
limit="9"></uni-file-picker>
<uni-data-picker placeholder="请选择" popup-title="请选择收件地址" :localdata="dataTree"
v-model="dataObj.cityId" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
<view class="item-lable">
博主类型 <text class="little-text">(可多选)</text>
</view>
<view class="item-value">
@ -148,65 +168,19 @@
</view>
</view>
</view>
</view>
<view class="form-content">
<view class="item-field">
<view class="item-lable is-required">
联系方式
<view class="item-lable ">
产品图
</view>
<view class="item-value">
<uni-file-picker :value="fileList" :sizeType="sizeType"
@select="afterRead($event,'fileList')" @delete="deleteFile($event,'fileList')"
limit="9"></uni-file-picker>
</view>
</view>
<view class="item-field-row">
<view class="item-lable is-required">
电话
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.tel" type="text" placeholder="请输入" />
</view>
</view>
<view class="item-field-row">
<view class="item-lable is-required">
微信
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.wechat" type="text" placeholder="请输入" />
</view>
</view>
<view class="item-field-row">
<view class="line-row">
<uni-data-checkbox @change="chooseBoxFun($event,'isShowTel')" multiple
:localdata="isShowTelList" />
</view>
</view>
</view>
<!-- 自定义表单 -->
<view class="form-content">
<view class="item-field-row" style="padding-top: 0;">
<view class="item-lable is-required" style="flex: 1;">
自定义报名信息收集
</view>
<view class="item-value" style="width: 200rpx;">
<uni-icons type="plusempty" size="18"></uni-icons><text @click="addNewField()"></text>
</view>
</view>
<view class="form-warn">
<image src="@/static/detail/warn.png" mode="aspectFit"></image>
<text>注意为了您的信息安全平台不建议填写您的银行卡号身份证号密码等隐私信息</text>
</view>
<view class="item-field-row" v-for="(item,index) in customFieldList">
<view class="item-lable is-required">
{{item.labelTitle}}
</view>
<view class="item-value">
<input class="uni-input" v-model="item.value" type="text" placeholder="请输入" />
</view>
</view>
</view>
<!-- 微信群码 -->
<view class="form-content">
<view class="item-field">
<view class="item-lable is-required">
<view class="item-lable ">
微信群码<text class="little-text">(选填)</text>
</view>
<view class="item-value">
@ -215,20 +189,45 @@
@delete="deleteFile($event,'groupImageList')" limit="1"></uni-file-picker>
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
通告明细
</view>
<view class="item-value">
<textarea v-model="dataObj.detail" style="height: 600rpx;" type="text"
placeholder="请输入通告明细" />
</view>
</view>
</view>
<!-- 自定义表单 -->
<view class="form-content">
<view class="item-field-row" style="padding-top: 0;">
<view class="item-lable " style="flex: 1;">
自定义报名信息收集
</view>
<view class="item-value" style="width: 200rpx;">
<uni-icons type="plusempty" size="18"></uni-icons><text @click="addNewField()"></text>
</view>
</view>
<view class="item-field-row" v-for="(item,index) in customFieldList">
<view class="item-lable is-required">
{{item}}
</view>
<view class="item-value">
<input class="uni-input" disabled type="text" placeholder="请输入" />
</view>
</view>
<view class="line-row-bottom">
<uni-data-checkbox @change="chooseBoxFun($event,'isRead')" multiple :localdata="readBookList" />
<text @click="handleUserAgrement(globalConfig.appInfo.agreements[1])"
class="text-red">{{globalConfig.appInfo.agreements[1].title}}</text>
</view>
</view>
</view>
<view class="dl-bottom-box">
<!-- 预览 -->
<view class="view-dom">
<view class="view-dom" @click="preview()">
预览
</view>
<view class="public-dom">
<view class="public-dom" @click="publish()">
发布
</view>
</view>
@ -255,12 +254,21 @@
uniListByParentCode
} from '@/api/system/config.js'
import config from '@/config';
import {
treeCity
} from '@/api/business/base.js'
import {
saveNotice,
getNoticeDetail
} from '@/api/business/notice';
export default {
components: {
navigationBarVue,
},
data() {
return {
//
dataTree: [],
//
showNum: 4,
globalConfig: getApp().globalData.config,
@ -276,33 +284,25 @@
//
groupImageList: [],
//
customFieldList: [{
labelTitle: "姓名",
value: "",
sort: 1
}, {
labelTitle: "身份证号",
value: "",
sort: 2
}],
customFieldList: [],
dataObj: {
isRead: false,
isRead: 0,
title: "",
brand: "",
platformCode: "",
feeLimit: false,
platformCode: "xiaohongshu",
feeLimit: 0,
feeDown: null,
feeUp: null,
giftLimit: false,
haveGift: null,
giftDetail: "",
giftPrice: null,
endDate: null,
needNum: null,
fansLimit: false,
fansLimit: 0,
fansDown: null,
fansUp: null,
// (0|1)
isEligible: 0,
isEligible: null,
//
bloggerTypes: "",
//便
@ -310,7 +310,7 @@
tel: "",
wechat: "",
// (0|1)
isShowTel: 0,
isShowTel: null,
},
isEligibleList: [{
text: '报名需符合粉丝要求',
@ -326,32 +326,267 @@
}],
//
ifHasRange: [{
value: false,
text: ""
value: 0,
text: ""
},
{
value: true,
text: ""
value: 1,
text: ""
}
],
//
limitRange: [{
value: false,
value: 0,
text: "不限制"
},
{
value: true,
value: 1,
text: "限制"
}
],
}
},
onLoad() {
onLoad(params) {
this.initData("dl_platform", 'platFormRange')
this.initData("dl_blogger_type", "bloggerTypeList")
this.initAddress()
if (params.sameId) {
this.getSameNotice(params.sameId)
}
},
methods: {
getSameNotice(sameId) {
getNoticeDetail({
noticeId: sameId
}).then(res => {
if (res.code == 200) {
this.dataObj = res.data.noticeDetail
this.dataObj.id = null
if (res.data.noticeDetail.bloggerTypes) {
this.dataObj.bloggerTypesList = res.data.noticeDetail.bloggerTypes.split(",")
}
//
if (this.dataObj.images) {
this.dataObj.images.split(',').forEach(it => {
this.fileList.push({
url: config.baseUrl + it
})
})
}
if (this.dataObj.groupImage) {
this.dataObj.groupImage.split(',').forEach(it => {
this.groupImageList.push({
url: config.baseUrl + it
})
})
}
if (this.dataObj.customForm) {
this.customFieldList = this.dataObj.customForm
}
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
validForm(data) {
if (!data.title) {
uni.showToast({
title: '标题必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.platformCode) {
uni.showToast({
title: '平台必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.endDate) {
uni.showToast({
title: '截止时间必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.feeDown) {
uni.showToast({
title: '稿费下限必填',
icon: 'none',
duration: 1000
})
return true;
}
if (data.isSelfPrice == null || data.isSelfPrice == undefined) {
uni.showToast({
title: '是否需自报价必填',
icon: 'none',
duration: 1000
})
return true;
}
if (data.isPlatformFree == null || data.isPlatformFree == undefined) {
uni.showToast({
title: '是否平台结算必填',
icon: 'none',
duration: 1000
})
return true;
}
if (data.haveGift == null || data.haveGift == undefined) {
uni.showToast({
title: '是否有赠品必填',
icon: 'none',
duration: 1000
})
return true;
}
if (data.isShowBrand == null || data.isShowBrand == undefined) {
uni.showToast({
title: '是否公开品牌必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.brand) {
uni.showToast({
title: '品牌必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.fansDown) {
uni.showToast({
title: '粉丝下限必填',
icon: 'none',
duration: 1000
})
return true;
}
if (!data.detail) {
uni.showToast({
title: '通告明细必填',
icon: 'none',
duration: 1000
})
return true;
}
},
//
preview() {
if (this.validForm(this.dataObj)) {
return
}
//稿
this.dataObj.approvalStatus = '8'
if (this.fileList && this.fileList.length > 0) {
this.dataObj.images = []
this.dataObj.groupImage = ''
this.fileList.forEach(it => {
this.dataObj.images.push(it.url.replace(config.baseUrl, ''))
})
if (this.dataObj.images && this.dataObj.images.length > 0) {
this.dataObj.images = this.dataObj.images.join(',')
}
}
this.groupImageList.forEach(it => {
this.dataObj.groupImage = it.url.replace(config.baseUrl, '')
})
this.dataObj.customForm = this.customFieldList
saveNotice(this.dataObj).then(res => {
this.dataObj.id = res.data.noticeId
this.goDetail(res.data.noticeId)
})
},
publish() {
if (this.validForm(this.dataObj)) {
return
}
//
this.dataObj.approvalStatus = '0'
if (this.fileList && this.fileList.length > 0) {
this.dataObj.images = []
this.dataObj.groupImage = ''
this.fileList.forEach(it => {
this.dataObj.images.push(it.url.replace(config.baseUrl, ''))
})
if (this.dataObj.images && this.dataObj.images.length > 0) {
this.dataObj.images = this.dataObj.images.join(',')
}
}
this.groupImageList.forEach(it => {
this.dataObj.groupImage = it.url.replace(config.baseUrl, '')
})
this.dataObj.customForm = this.customFieldList
saveNotice(this.dataObj).then(res => {
this.dataObj.id = res.data.noticeId
uni.showToast({
title: '发布成功等待审核',
icon: 'none',
duration: 1000
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
})
},
/**
* 查看通告详情
* @param {Object} item
*/
goDetail(noticeId) {
this.$tab.navigateTo(`/pages/notice/detail?id=${noticeId}&type=preview`)
},
saveData() {
console.log(this.dataObj, 357);
},
/**初始化树结构*/
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
});
})
},
//
handleUserAgrement(site) {
this.$tab.navigateTo(`/pages/common/richview/index?title=${site.title}&code=${site.code}`)
@ -475,18 +710,7 @@
this.$refs.inputDialog.close()
},
dialogInputConfirmCus(val) {
let thisObj = {
labelTitle: val,
value: ""
}
if (this.customFieldList.length == 0) {
//
thisObj.sort = 1
} else {
//
let endFieldObj = this.customFieldList[this.customFieldList.length - 1]
thisObj.sort = endFieldObj.sort + 1
}
let thisObj = val
this.customFieldList.push(thisObj)
//
this.$refs.inputDialogCus.close()
@ -620,7 +844,10 @@
justify-content: center;
}
.is-required {
.is-required:before {
content: "*";
color: #FC1F3E;
image {
width: 20rpx;
height: 20rpx;
@ -690,7 +917,10 @@
margin-bottom: 20rpx;
}
.is-required {
.is-required:before {
content: "*";
color: #FC1F3E;
image {
width: 20rpx;
height: 20rpx;
@ -792,7 +1022,7 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
z-index: 9;
.view-dom {
flex: 1;

View File

@ -55,12 +55,12 @@
</view>
</view>
<view class="card-bottom">
<view class="item-field-row">
<view class="item-field-row" v-if="noticeDetail.isSelfPrice=='1'">
<view class="item-lable is-required">
自报价
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.name" type="number" placeholder="请输入" />
<input class="uni-input" v-model="item.selfPrice" type="number" placeholder="请输入" />
</view>
</view>
<view class="item-field-row">
@ -68,7 +68,8 @@
附言
</view>
<view class="item-value">
<input class="uni-input" v-model="dataObj.name" type="text" placeholder="请输入" />
<textarea class="uni-input" placeholder="请输入" v-model="item.remark"></textarea>
</view>
</view>
</view>
@ -99,7 +100,7 @@
<text>{{userAddr.name}}</text>
<text>{{userAddr.tel}}</text>
</view>
<view class="change-addr-dom">切换</view>
<view class="change-addr-dom" @click="goSignAddr()">切换</view>
</view>
</view>
<!-- 去报名始终浮动下方 -->
@ -224,6 +225,9 @@
uni.$on('updateCard', function(data) {
that.updateCard(data)
})
uni.$on('updateAddr', function(data) {
that.updateAddr(data)
})
},
methods: {
@ -234,8 +238,11 @@
}
})
},
updateAddr(data) {
this.userAddr = data
},
updateCard(data) {
console.log(data, 211);
this.cardList = data
},
/**
@ -260,7 +267,11 @@
}
},
goSignCard() {
this.$tab.navigateTo('/pages/mine/card/my-card')
this.$tab.navigateTo('/pages/mine/card/my-card?ifChoose=true&noticeId=' +
this.noticeId)
},
goSignAddr() {
this.$tab.navigateTo('/pages/mine/addr/addr-list?ifChoose=true')
},
goMemberCard() {
this.$tab.navigateTo('/pages/mine/member/member-card')
@ -320,6 +331,28 @@
return
}
}
//
if (this.noticeDetail.isSelfPrice == '1') {
let flag1 = false
this.cardList.forEach(it => {
if (!it.selfPrice) {
flag1 = true
}
})
if (flag1) {
uni.showToast({
title: '请进行报价',
icon: 'none',
duration: 1000
})
return;
}
}
//
this.signFormData.noticeId = this.noticeId
this.signFormData.cardList = this.cardList

View File

@ -139,6 +139,9 @@ export function tansParams(params) {
* @param {Object} num
*/
export function formatNumberWithUnits(num) {
if (!num) {
return '无限制';
}
const units = ['', 'k', 'w', 'kw'];
// 获取绝对值以处理负数
let absNum = Math.abs(num);
@ -147,6 +150,7 @@ export function formatNumberWithUnits(num) {
return num;
}
// 寻找合适的单位
let unitIndex = 0;
if (absNum > 10000000) {
@ -182,12 +186,16 @@ export function calculateTimeDifference(time) {
// 计算完整的整天天数和剩余的小时数
const diffDays = Math.floor(diffHours / 24);
const remainingHours = diffHours % 24;
if (diffDays > 0) {
return parseInt(diffDays) + "天前"
} else {
if (parseInt(remainingHours) == 0) {
return "刚刚"
} else {
return parseInt(remainingHours) + "小时前"
}
}
}
/**