ssm41471/src/main/webapp/front/pages/messages/liuyan.vue
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<template>
<view class="content my-publish-pv">
<form>
<view class="cu-form-group">
<!-- <view :style="userInfoForm.list.title" class="title">留言人</view> -->
<input :style='{"boxShadow":"0 0 0px rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"rgba(255, 170, 51, 1)","borderRadius":"8rpx","color":"rgba(0, 0, 0, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"80rpx"}' v-model="ruleForm.username" placeholder="留言人用户名"></input>
</view>
<view class="cu-form-group">
<!-- <view :style="userInfoForm.list.title" class="title">留言内容</view> -->
<textarea :style='{"boxShadow":"0 0 0px rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"rgba(255, 107, 19, 1)","borderRadius":"8rpx","color":"rgba(0, 0, 0, 1)","borderWidth":"2rpx","fontSize":"26rpx","borderStyle":"solid","height":"300rpx"}' v-model="ruleForm.content" placeholder="留言内容"></textarea>
</view>
<view class="cu-form-group" style="text-align:center">
<button :style='{"boxShadow":"0 0 0px rgba(0,0,0,0) inset","backgroundColor":"rgba(255, 107, 19, 1)","borderColor":"#409EFF","borderRadius":"20rpx","color":"#fff","borderWidth":"0","width":"100%","fontSize":"32rpx","borderStyle":"solid","height":"88rpx"}' @tap="onSubmitTap" class="bg-red margin-tb-sm">提交</button>
</view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
ruleForm: {
userid: '',
username: '',
content: '',
reply: '',
},
user: {}
}
},
async onLoad(options) {
let table = uni.getStorageSync("nowTable");
// 获取用户信息
let res = await this.$api.session(table);
this.user = res.data;
// 如果有登陆,获取登陆后保存的userid
this.ruleForm.userid = uni.getStorageSync("userid")
if(table == `xuesheng`){
this.ruleForm.username = this.user.xueshengzhanghao
}
if(table == `jiaoshi`){
this.ruleForm.username = this.user.jiaoshizhanghao
}
this.styleChange()
},
methods: {
styleChange() {
this.$nextTick(()=>{
// document.querySelectorAll('.my-publish-pv .uni-input-input').forEach(el=>{
// el.style.backgroundColor = this.myPublishForm.content.input.backgroundColor
// })
})
},
async onSubmitTap() {
if(this.ruleForm.content){
await this.$api.add(`messages`, this.ruleForm);
this.$utils.msgBack('提交成功');
}else{
this.$utils.msg("请填写留言内容")
后面还有 71 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
