Merge remote-tracking branch 'origin/master'

This commit is contained in:
2023-12-07 09:09:51 +08:00
5 changed files with 693 additions and 81 deletions
+263
View File
@@ -0,0 +1,263 @@
<template>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>您有<em style="color: #bf2b28;padding: 0 3px;font-weight: 500">{{ num }}</em>条未读消息</span>
<el-button style="float: right; padding: 3px 0; color: #666" type="text" @click="onSetting"><i class="el-icon-setting"></i> 消息推送设置</el-button>
</div>
<!-- 消息列表 -->
<div class="notice-list">
<div class="item" v-for="(item,index) in noticeList" :key="index">
<div class="title-box">
<div class="title-box">
<el-badge is-dot class="badge" v-if="item.status === 0"></el-badge>
<div class="title">{{ item.title }}</div>
<div class="time">{{ item.time }}</div>
</div>
<div class="right">
<div class="btn" @click="onStatus(index)">
<i class="el-icon-sunset"></i>标记为已读
</div>
<div class="btn" @click="onDelete(index)">
<i class="el-icon-delete"></i>删除
</div>
</div>
</div>
<div class="desc">
{{ item.comments }}
</div>
</div>
</div>
<!-- 添加或编辑的弹窗结束 -->
</el-card>
</template>
<script>
let that;
const originalForms = {sort: 0, enable: true}
// import { VueCropper } from 'vue-cropper'
export default {
components: {
// VueCropper
},
data() {
return {
num: 1,
noticeList: [
{
id: 1,
title: '恭喜!您已注册成功!',
comments: '尊敬的用户,恭喜您已成功注册金久信钢铁交易平台,感谢您的支持!',
time: '2023-05-18 10:15:00',
status: 0
}
],
// 表格相关开始 -----------------------------------------------------------
table1: {
// 表格数据请求地址
action: "client/seal/kh/getList",
// 表格字段显示规则
columns: [
{
key: "imageUrl",
title: "印章",
type: "image",
width: 280,
},
{
key: "remark",
title: "备注",
type: "text",
},
{
key: "_add_time",
title: "添加时间",
type: "time",
width: 160
},
],
// 多选框选中的值
multipleSelection: [],
// 当前高亮的记录
selectItem: ""
},
// 表格相关结束 -----------------------------------------------------------
// 表单相关开始 -----------------------------------------------------------
form1: {
// 表单请求数据,此处可以设置默认值
data: {
enable: true
},
// 表单属性
props: {
// 表单请求地址
action: "",
// 表单字段显示规则
columns: [
{
key:"imageUrl", title:"印章图片", type:"image",
limit: 1,
tips: '图片格式:PNG,需设置为透明底;图片尺寸:企业章 166x166 像素,个人章 134x60 像素,印章紧密贴紧四周,尽量避免留白;',
watch: (data) => {
const { value, formData, column, index, option, $set } = data
if(!value) {
this.form1.data.imageBase64 = ""
}else {
vk.showLoading('正在上传')
vk.myfn.urlTobase64(value).then(res => {
this.form1.data.imageBase64 = res
vk.hideLoading();
})
}
}
},
{
key:"remark", title:"备注", type:"text"
},
{ key: "enable", title: "启用", type: "switch", activeValue: true, inactiveValue: false, width: 100 },
],
// 表单验证规则
rules: {
imageUrl: [
{ required:true, message:'印章不能为空', trigger:'blur' },
{ required:true, message:'印章不能为空', trigger:'blur' },
],
label:[
{ required:true, message:'属性名称不能为空', trigger:'blur' },
],
values:[
{ required:true, message:'可选值不能为空', trigger:'blur' },
],
},
// add 代表添加 update 代表修改
formType: "",
// 是否显示表单的弹窗
show: false,
beforeAction:(formData)=>{
// 可在此处修改 formData 后返回 formData,若在此处return false,则表单不触发提交请求。
return formData;
},
}
},
// 其他弹窗表单
// 表单相关结束 -----------------------------------------------------------
}
},
created() {
that = this
},
methods: {
addBtn() {
that.resetForm();
that.form1.props.action = 'client/seal/kh/add';
that.form1.props.formType = 'add';
that.form1.props.title = '添加';
that.form1.props.show = true;
},
// 显示修改页面
updateBtn({
item
}) {
that.form1.props.action = 'client/seal/kh/update';
that.form1.props.formType = 'update';
that.form1.props.title = '编辑';
that.form1.props.show = true;
that.form1.data = item;
},
closeForm() {
this.form1.props.show = false
this.form1.data = {
sort: 0,
enable: true
}
},
// 删除按钮
deleteBtn({
item,
deleteFn
}) {
deleteFn({
action: "client/seal/kh/delete",
data: {
_id: item._id
},
});
},
// 表单重置
resetForm() {
vk.pubfn.resetForm(originalForms, that);
},
// 搜索
search() {
that.$refs.table1.search();
},
// 刷新
refresh() {
that.$refs.table1.refresh();
},
onStatus(index){
this.noticeList[index].status = 1;
},
onDelete(index){
this.noticeList.splice(index,1)
},
onSetting(){
this.$emit('done','setting')
}
}
}
</script>
<style lang="less">
.el-icon-setting{
padding: 0 5px;
}
.notice-list{
.item{
display: flex;
flex-direction: column;
.title-box{
display: flex;
align-items: center;
justify-content: space-between;
.title{
font-size: 14px;
}
.time{
margin-left: 10px;
color: #999999;
}
.badge{
display: flex;
flex-direction: column;
margin-right: 10px;
}
}
.desc{
color: #999999;
line-height: 2em;
}
.right{
display: flex;
.btn{
color: #bf2b28;
cursor: pointer;
i{
padding: 0 5px;
margin-left: 10px;
}
}
.active{
}
}
}
}
</style>
+169
View File
@@ -0,0 +1,169 @@
<template>
<el-card class="box-card">
<div slot="header" class="clearfix" style="text-align: center">
<span style="font-size: 20px;line-height: 2em;">消息推送设置</span>
<div style="color: #999999">我们将针对您的选择,为您精准推送询价信息</div>
</div>
<el-row class="setting-list" :gutter="50">
<el-col span="12" v-for="(item,index) in settingList" :key="index">
<div class="item">
<div class="title">
<el-badge is-dot class="badge"></el-badge>
{{ item.title }}
</div>
<div class="btn">
<el-switch
v-model="item.status">
</el-switch>
</div>
</div>
</el-col>
</el-row>
<el-divider></el-divider>
<div class="form">
<div class="form-title">
* 请选择产品:
</div>
<el-form ref="form" :model="form" label-position="left" label-width="120px">
<el-form-item label="螺纹钢、高线">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="钢材">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="钢版">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="型材">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="配件、耗材">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="二手钢材、设备">
<el-checkbox-group v-model="group1" size="small">
<el-checkbox label="螺纹钢" border></el-checkbox>
<el-checkbox label="盘螺" border></el-checkbox>
<el-checkbox label="盘圆" border></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
</div>
<el-divider></el-divider>
<div class="form">
<div class="form-title">
* 请选择服务地区:
</div>
<el-form ref="form" :model="form" label-position="left" label-width="120px">
广西-南宁
</el-form>
</div>
<el-divider></el-divider>
<el-button type="danger" round>保存设置</el-button>
</el-card>
</template>
<script>
let that;
const originalForms = {sort: 0, enable: true}
// import { VueCropper } from 'vue-cropper'
export default {
components: {
// VueCropper
},
data() {
return {
settingList: [
{
id: 1,
title: '金融服务',
status: true
},
{
id: 2,
title: '金融服务',
status: true
},
{
id: 3,
title: '找合作信息推送服务',
status: true
},
{
id: 4,
title: '找加工信息推送服务',
status: false
},
{
id: 5,
title: '旧货信息交易推送服务',
status: true
},
{
id: 6,
title: '询价单和选项推送服务',
status: false
}
],
form: {},
group1: []
}
},
created() {
that = this
},
methods: {
}
}
</script>
<style lang="less">
.setting-list{
.item{
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 5px auto;
.title{
display: flex;
align-items: center;
.badge{
display: flex;
align-items: center;
padding: 0 5px;
}
}
}
}
.form-title{
color: #bf2b28;
font-size: 16px;
font-weight: 500;
line-height: 2em;
margin-bottom: 10px;
}
.form{
padding: 10px;
}
</style>
+155
View File
@@ -0,0 +1,155 @@
<template>
<view class="yaoqing">
<view class="title">邀请新用户免费兑换会员</view>
<view class="p2">
<view class="item">
<view class="text">共邀请<text class="red">7</text>人</view>
<view class="btn">邀请列表</view>
</view>
<view class="item">
<view class="text">我的邀请码</view>
<text class="red">12456</text>
</view>
</view>
<view class="p3">
<view class="item" v-for="item in huiyuan">
<view class="t">{{item.title}}</view>
<view class="b">{{item.subtitle}}</view>
</view>
</view>
<view class="p4">
<view class="wrapper">
<view class="bg" :style="`width: ${p}%;`"></view>
</view>
<view class="tip" :style="`left: ${p}%;`">已邀请7人</view>
</view>
<view class="btns">
<view class="btn">复制邀请码</view>
<view class="btn red">兑换会员</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
huiyuan:[
{title:'黄金vip LV1',subtitle:'邀请4人可兑换'},
{title:'铂金vip LV1',subtitle:'邀请6人可兑换'},
{title:'钻石vip LV1',subtitle:'邀请9人可兑换'},
],
p:45
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.yaoqing{
padding: 100upx;
background-color: #fff;
.title{
font-size: 50upx;
color: #A92924;
}
.p2{
margin-top: 80upx;
display: flex;
align-items: center;
.item{
display: flex;align-items: center;
font-size: 30upx;
margin-right: 100upx;
text.red{
color: #A92924;
}
.btn{
margin-left:10upx;
padding: 4upx 10upx;
border-radius: 10upx;
color: #fff;
background-color: #ff8100;
font-size: 24upx;
}
}
}
.p3{
margin-top: 80upx;
display: flex;
.item{
width: 250upx;
height: 180upx;
border-radius: 10upx;
box-shadow: 1px 1px 15px 1px #A92924;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24upx;
color: #A92924;
margin-right: 100upx;
.t{
font-size: 30upx;
}
}
}
.p4{
margin-top: 80upx;
position: relative;
width: 100%;
.wrapper{
position: relative;
height: 30upx;
border-radius: 15upx;
overflow: hidden;
background-color: #ddd;
}
.bg{
position: absolute;
// width: 50%;
height: 100%;
background-color: #A92924;
}
.tip{
position: absolute;
// left: 45%;
top: -15upx;
transform: translateX(-5%);
padding: 0 20upx;
height: 60upx;
line-height: 60upx;
border-radius: 30upx;
background-color: #A92924;
color: #fff;
font-size: 26upx;
}
}
.btns{
margin-top: 80upx;
display: flex;
.btn{
width: 400upx;
height: 120upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 50upx;
border: 1px solid #A92924;
}
.btn.red{
margin-left: 100upx;
color: #fff;
background-color: #A92924;
}
}
}
</style>
+105 -80
View File
@@ -1,93 +1,118 @@
<template> <template>
<view> <view>
<top-bar></top-bar> <top-bar></top-bar>
<common-header></common-header> <common-header></common-header>
<category-bar></category-bar> <category-bar></category-bar>
<view class="w-1200"> <view class="w-1200">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo"> <el-menu @select="menuSelect" :default-active="currMenu" class="el-menu-vertical-demo">
<el-menu-item index="fadada"> <el-menu-item index="fadada">
<i class="el-icon-menu"></i> <i class="el-icon-menu"></i>
<span slot="title">实名认证</span> <span slot="title">实名认证</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="business-card"> <el-menu-item index="business-card">
<i class="el-icon-setting"></i> <i class="el-icon-setting"></i>
<span slot="title">我的名片</span> <span slot="title">我的名片</span>
</el-menu-item> </el-menu-item>
<!-- <el-menu-item index="seal"> <!-- <el-menu-item index="seal">
<i class="el-icon-s-check"></i> <i class="el-icon-s-check"></i>
<span slot="title">我的印章</span> <span slot="title">我的印章</span>
</el-menu-item> --> </el-menu-item> -->
<el-menu-item index="equity"> <el-menu-item index="notice">
<i class="el-icon-wallet"></i> <i class="el-icon-bell"></i>
<span slot="title">平台权益</span> <span slot="title">我的消息</span>
</el-menu-item> </el-menu-item>
<!-- <el-menu-item index="grade">--> <el-menu-item index="equity">
<!-- <i class="el-icon-user"></i>--> <i class="el-icon-wallet"></i>
<!-- <span slot="title">会员等级(临时)</span>--> <span slot="title">平台权益</span>
<!-- </el-menu-item>--> </el-menu-item>
<!-- <el-menu-item index="added">--> <el-menu-item index="yaoqing">
<!-- <i class="el-icon-medal"></i>--> <i class="el-icon-user"></i>
<!-- <span slot="title">购买增值服务(临时)</span>--> <span slot="title">我的邀请</span>
<!-- </el-menu-item>--> </el-menu-item>
</el-menu> <!-- <el-menu-item index="grade">-->
</el-col> <!-- <i class="el-icon-user"></i>-->
<el-col :span="18"> <!-- <span slot="title">会员等级(临时)</span>-->
<personal v-if="currMenu === 'fadada'"></personal> <!-- </el-menu-item>-->
<business-card v-else-if="currMenu === 'business-card'"></business-card> <!-- <el-menu-item index="added">-->
<seal v-else-if="currMenu === 'seal'"></seal> <!-- <i class="el-icon-medal"></i>-->
<equity v-else-if="currMenu === 'equity'" @done="onDone"></equity> <!-- <span slot="title">购买增值服务(临时)</span>-->
<payment v-else-if="currMenu === 'payment'" @done="onDone"></payment> <!-- </el-menu-item>-->
<grade v-else-if="currMenu === 'grade'" @done="onDone"></grade> </el-menu>
<Added v-else-if="currMenu === 'added'" @done="onDone"></Added> </el-col>
</el-col> <el-col :span="18">
</el-row> <personal v-if="currMenu === 'fadada'"></personal>
<business-card v-else-if="currMenu === 'business-card'"></business-card>
<seal v-else-if="currMenu === 'seal'"></seal>
<notice v-else-if="currMenu === 'notice'" @done="onDone"></notice>
<setting v-else-if="currMenu === 'setting'" @done="onDone"></setting>
<equity v-else-if="currMenu === 'equity'" @done="onDone"></equity>
<payment v-else-if="currMenu === 'payment'" @done="onDone"></payment>
<grade v-else-if="currMenu === 'grade'" @done="onDone"></grade>
<Added v-else-if="currMenu === 'added'" @done="onDone"></Added>
<Yaoqing v-else-if="currMenu === 'yaoqing'" @done="onDone"></Yaoqing>
</el-col>
</el-row>
</view> </view>
<!-- 现货市场 end --> <!-- 现货市场 end -->
<gap height="100"/> <gap height="100" />
<common-footer></common-footer> <common-footer></common-footer>
<right-bar></right-bar> <right-bar></right-bar>
</view> </view>
</template> </template>
<script> <script>
import Personal from './components/personal' import Personal from './components/personal'
import BusinessCard from './components/business-card' import BusinessCard from './components/business-card'
import Seal from './components/seal' import Seal from './components/seal'
import Equity from './components/equity' import Notice from './components/notice'
import Grade from './components/grade' import Setting from './components/setting'
import Added from './components/added' import Equity from './components/equity'
import Payment from './components/payment' import Grade from './components/grade'
import Added from './components/added'
import Payment from './components/payment'
import Yaoqing from './components/yaoqing'
export default { export default {
components: {Personal, BusinessCard, Seal, Equity, Grade, Added, Payment}, components: {
data() { Personal,
return { BusinessCard,
currMenu: 'fadada', Seal,
}; Notice,
}, Equity,
onLoad(options) { Setting,
if (options && options.menu) { Grade,
this.currMenu = options.menu Added,
} Payment,
}, Yaoqing
methods: { },
menuSelect(e) { data() {
this.currMenu = e return {
}, currMenu: 'fadada',
onDone(index){ };
this.currMenu = index },
} onLoad(options) {
} if (options && options.menu) {
} this.currMenu = options.menu
}
},
methods: {
menuSelect(e) {
this.currMenu = e
},
onDone(index) {
this.currMenu = index
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.w-1200 { .w-1200 {
width: 1200px; width: 1200px;
margin: 20px auto; margin: 20px auto;
} }
</style> </style>
+1 -1
View File
@@ -285,4 +285,4 @@ export default {
border-top: 8px solid #F4F4F4; border-top: 8px solid #F4F4F4;
} }
} }
</style> </style>