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.
117 lines
3.2 KiB
Vue
117 lines
3.2 KiB
Vue
<template>
|
|
<view class="p-root-merchantManagement-dynamicNotice g_bg_f_5 g_p_10 g_pb_120" style="min-height: 100vh; padding-top: 24px">
|
|
<view class="g_pt_10" hover-class="none" hover-stop-propagation="false">
|
|
<view class="g_mb_4 g_pl_10 g_c_6">预览</view>
|
|
<view class="g_flex_row_start flex_center g_bg_f g_radius_8" style="overflow: hidden">
|
|
<view class="g_flex_column_center g_h_48">
|
|
<image class="g_w_48 g_h_48" :src="noticeImg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""> </image>
|
|
</view>
|
|
<u-notice-bar color="#333" padding="0rpx" :playState="playState" font-size="32" style="width: calc(100% - 54px)" :speed="100" :volume-icon="false" type="none" :list="noticList"></u-notice-bar>
|
|
</view>
|
|
</view>
|
|
<view class="g_mt_32">
|
|
<view class="g_mb_4 g_pl_10 g_c_6">公告内容</view>
|
|
<view class="g_bg_f g_pl_10 g_radius_8">
|
|
<u-input type="textarea" height="240" :customStyle="{ fontSize: '34rpx' }" :clearable="false" autoHeight :value="notice" @input="changeNotice"></u-input>
|
|
</view>
|
|
<view class="g_mt_32" hover-class="none" hover-stop-propagation="false">
|
|
<g-button :type="isChange ? 'primary' : 'disabled'" btnText="提交" @clickBtn="subNameInfo" :loading="isSubmit" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
onShareAppMessage() {
|
|
return this.G.shareFun();
|
|
},
|
|
onLoad(options) {
|
|
let appId = getApp().globalData.appId;
|
|
this.noticeImg = "../../static/image/noticIcon.png";
|
|
console.log(this.appInfo);
|
|
var reg = /[\r\n]/g;
|
|
this.noticList[0] = this.appInfo.notice.replace(reg, "");
|
|
this.notice = this.appInfo.notice;
|
|
this.sqlStr = this.appInfo.notice;
|
|
this.playState = "play";
|
|
},
|
|
data() {
|
|
return {
|
|
sqlStr: "",
|
|
noticeImg: "",
|
|
noticList: [""],
|
|
notice: "",
|
|
playState: "paused",
|
|
appInfo: uni.getStorageSync("miniApp-info"),
|
|
|
|
isSubmit: false,
|
|
isChange: false,
|
|
};
|
|
},
|
|
methods: {
|
|
changeNotice(e) {
|
|
console.log(e);
|
|
let that = this;
|
|
if (that.sqlStr == e) {
|
|
this.isChange = false;
|
|
} else {
|
|
this.isChange = true;
|
|
}
|
|
this.playState = "paused";
|
|
var reg = /[\r\n]/g;
|
|
this.notice = e;
|
|
this.noticList[0] = e.replace(reg, "");
|
|
this.playState = "play";
|
|
if (e == "") {
|
|
this.playState = "paused";
|
|
}
|
|
},
|
|
subNameInfo() {
|
|
let that = this;
|
|
if (!that.isChange) {
|
|
return false;
|
|
}
|
|
that.isSubmit = true;
|
|
this.G.Put(
|
|
this.api.merchantManagement_updateField,
|
|
{ fieldName: "notice", fieldValue: this.noticList[0] },
|
|
() => {
|
|
that.isSubmit = false;
|
|
uni.showToast({
|
|
title: "修改成功",
|
|
icon: "none",
|
|
});
|
|
that.isChange = false;
|
|
that.G.getAgencyInfo();
|
|
},
|
|
() => {
|
|
that.isSubmit = false;
|
|
}
|
|
);
|
|
// 在这里,使用世界前沿的人工智能技术,为用户甄选海量的在招职位,用更流畅,更快捷,更精准的搜索体验,带你去发现多彩的世界。
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.p-root-person-idform {
|
|
.m-submit {
|
|
.bocai_btn_type_infro {
|
|
background: #ccc !important;
|
|
color: #fff !important;
|
|
font-weight: 600 !important;
|
|
font-size: 18px !important;
|
|
}
|
|
}
|
|
.cardText {
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style>
|