Browse Source

feat: 停止发布

old
wangqing 4 years ago
parent
commit
1bebea8781
  1. 9
      src/assets/styles/btn.scss
  2. 26
      src/views/account/member.vue
  3. 10
      src/views/form/publish.vue
  4. 2
      src/views/form/setting.vue
  5. 4
      src/views/form/theme.vue
  6. 62
      src/views/project/MyProject.vue

9
src/assets/styles/btn.scss

@ -18,12 +18,21 @@
.red-btn { .red-btn {
@include colorBtn($red); @include colorBtn($red);
} }
.pink-text-btn {
color: $pink;
}
.pink-btn { .pink-btn {
@include colorBtn($pink); @include colorBtn($pink);
} }
.green-btn { .green-btn {
@include colorBtn($green); @include colorBtn($green);
} }
.green-text-btn {
color: $green;
}
.tiffany-btn { .tiffany-btn {
@include colorBtn($tiffany); @include colorBtn($tiffany);
} }

26
src/views/account/member.vue

@ -51,31 +51,33 @@
<td width="80" style="text-align: right;">用户名</td> <td width="80" style="text-align: right;">用户名</td>
<td> <td>
{{ userInfo.name }} {{ userInfo.name }}
<el-link type="primary" @click="editNameDialogVisible=true">修改</el-link> <el-button type="text" @click="editNameDialogVisible=true">
修改
</el-button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="80" style="text-align: right;">账号邮箱</td> <td width="80" style="text-align: right;">账号邮箱</td>
<td> <td>
{{ userInfo.email }} {{ userInfo.email }}
<el-link type="primary" @click="emailDialogVisible=true">绑定</el-link> <el-button type="text" @click="emailDialogVisible=true">绑定</el-button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="80" style="text-align: right;">密码</td> <td width="80" style="text-align: right;">密码</td>
<td> <td>
****** ******
<el-link type="primary" @click="pwdDialogVisible=true">修改</el-link> <el-button type="text" @click="pwdDialogVisible=true">修改</el-button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="80" style="text-align: right;">手机号</td> <td width="80" style="text-align: right;">手机号</td>
<td> <td>
{{ userInfo.phoneNumber }} {{ userInfo.phoneNumber }}
<el-link v-if="userInfo.phoneNumber" type="primary" @click="phoneDialogVisible=true"> <el-button v-if="userInfo.phoneNumber" type="text" @click="phoneDialogVisible=true">
修改 修改
</el-link> </el-button>
<el-link v-else type="primary" @click="phoneDialogVisible=true">绑定</el-link> <el-button v-else type="text" @click="phoneDialogVisible=true">绑定</el-button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -108,7 +110,7 @@
<span v-if="userInfo.wxName"> <span v-if="userInfo.wxName">
{{ userInfo.wxName }}(已绑定) {{ userInfo.wxName }}(已绑定)
</span> </span>
<el-link v-else type="primary" @click="bindWxHandle">绑定</el-link> <el-button v-else type="text" @click="bindWxHandle">绑定</el-button>
<el-dialog title="微信扫描二维码绑定" <el-dialog title="微信扫描二维码绑定"
width="400px" width="400px"
center center
@ -126,14 +128,14 @@
<span v-if="userInfo.qqName"> <span v-if="userInfo.qqName">
{{ userInfo.qqName }}(已绑定) {{ userInfo.qqName }}(已绑定)
</span> </span>
<el-link v-else type="primary" @click="redirectUrl(qqLoginAuthorizeUrl)">绑定</el-link> <el-button v-else type="text" @click="redirectUrl(qqLoginAuthorizeUrl)">绑定</el-button>
</div> </div>
<div class="account-icon-view"> <div class="account-icon-view">
<font-icon class="fa fa-weibo icon" /> <font-icon class="fa fa-weibo icon" />
<span v-if="userInfo.wbName"> <span v-if="userInfo.wbName">
{{ userInfo.wbName }}(已绑定) {{ userInfo.wbName }}(已绑定)
</span> </span>
<el-link v-else type="primary">绑定</el-link> <el-button v-else type="text">绑定</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -150,19 +152,19 @@
<tr> <tr>
<td width="80" style="text-align: right;">企业logo</td> <td width="80" style="text-align: right;">企业logo</td>
<td> <td>
<el-link type="primary">上传Logo</el-link> <el-button type="text">上传Logo</el-button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="100" style="text-align: right;">自定义域名</td> <td width="100" style="text-align: right;">自定义域名</td>
<td> <td>
www.zjtd.com.cn xxxx
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="80" style="text-align: right;">所在地址</td> <td width="80" style="text-align: right;">所在地址</td>
<td> <td>
上海市闵行区漕河泾创意产业园1812号1654号 xxxxx
</td> </td>
</tr> </tr>
</tbody> </tbody>

10
src/views/form/publish.vue

@ -23,12 +23,18 @@
<p class="link-text"> {{ writeLink }}</p> <p class="link-text"> {{ writeLink }}</p>
</div> </div>
<el-row> <el-row>
<el-col :span="6" :offset="6">
<el-col :span="6" :offset="3">
<el-button v-clipboard:copy="writeLink" <el-button v-clipboard:copy="writeLink"
v-clipboard:success="()=>{this.msgSuccess('复制成功')}" v-clipboard:success="()=>{this.msgSuccess('复制成功')}"
v-clipboard:error="()=>{this.msgError('复制失败')}" type="primary">复制链接 v-clipboard:error="()=>{this.msgError('复制失败')}" type="primary">复制链接
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="6" >
<el-button
type="danger">停止发布
</el-button>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-button <el-button
@click="toFeedbackPageHandle" @click="toFeedbackPageHandle"
@ -82,7 +88,7 @@ export default {
}, methods: { }, methods: {
getProjectStatus() { getProjectStatus() {
this.$api.get(`/user/project/${this.projectKey}`).then(res => { this.$api.get(`/user/project/${this.projectKey}`).then(res => {
if (res.data.status != 1) { if (res.data.status == 2) {
this.publishStatus = true this.publishStatus = true
} }
}) })

2
src/views/form/setting.vue

@ -34,7 +34,7 @@
:on-success="uploadSubmitPromptHandle" :on-success="uploadSubmitPromptHandle"
:action="getUploadUrl" :action="getUploadUrl"
:show-file-list="false"> :show-file-list="false">
<el-link slot="trigger" size="small" type="primary">请上传提示图片 *</el-link> <el-button slot="trigger" size="small" type="text">请上传提示图片 *</el-button>
</el-upload> </el-upload>
</div> </div>
<el-row type="flex" align="middle"> <el-row type="flex" align="middle">

4
src/views/form/theme.vue

@ -88,7 +88,7 @@
:on-success="uploadLogoHandle" :on-success="uploadLogoHandle"
:action="getUploadUrl" :action="getUploadUrl"
:show-file-list="false"> :show-file-list="false">
<el-link slot="trigger" size="small" type="primary">上传Logo</el-link> <el-button slot="trigger" size="small" type="text">上传Logo</el-button>
</el-upload> </el-upload>
</el-col> </el-col>
</el-row> </el-row>
@ -166,7 +166,7 @@
:on-success="uploadBackgroundHandle" :on-success="uploadBackgroundHandle"
:action="getUploadUrl" :action="getUploadUrl"
:show-file-list="false"> :show-file-list="false">
<el-link slot="trigger" size="small" type="primary">上传背景</el-link> <el-button slot="trigger" size="small" type="text">上传背景</el-button>
</el-upload> </el-upload>
</el-col> </el-col>
</el-row> </el-row>

62
src/views/project/MyProject.vue

@ -159,25 +159,45 @@
/> />
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" <el-button type="text"
style="margin: 2px;" @click="toProjectHandle(scope.row.key,1)"
@click="toProjectHandle(scope.row.key,1)"
> >
编辑 编辑
</el-link> </el-button>
<el-link <span>
v-if="scope.row.status!=1" <el-button
type="success" v-if="scope.row.status!=1"
style="margin: 2px;" type="text"
@click="toProjectHandle(scope.row.key,5)" class="green-text-btn"
@click="toProjectHandle(scope.row.key,5)"
>
统计
</el-button>
</span>
<el-popconfirm
v-if="scope.row.status==2"
title="确定停止收集该项目吗?"
@confirm="stopProject(scope.row.key)"
> >
统计 <el-button slot="reference"
</el-link> class="pink-text-btn"
<el-link type="text"
type="danger" style="margin: 2px;" @click="deleteProject(scope.row.key)" >
停止
</el-button>
</el-popconfirm>
<el-popconfirm
v-if="scope.row.status==3"
title="确定删除该项目吗?"
@confirm="deleteProject(scope.row.key)"
> >
删除 <el-button slot="reference"
</el-link> class="pink-text-btn"
type="text"
>
删除
</el-button>
</el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -202,7 +222,7 @@ import dayjs from 'dayjs'
let projectStatusList = [ let projectStatusList = [
{code: 1, name: '未发布', color: '#006EFF'}, {code: 1, name: '未发布', color: '#006EFF'},
{code: 2, name: '收集中', color: '#34C82A'}, {code: 2, name: '收集中', color: '#34C82A'},
{code: 4, name: '已结束', color: '#955A45'} {code: 3, name: '已结束', color: '#955A45'}
] ]
export default { export default {
@ -252,10 +272,18 @@ export default {
this.$router.push({path: '/project/form', query: {key: key, active: type}}) this.$router.push({path: '/project/form', query: {key: key, active: type}})
}, },
deleteProject(key) { deleteProject(key) {
this.$api.post('/user/project/delete', {'key': key}).then(res => { this.$api.post('/user/project/delete', {'key': key}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('刪除成功') this.msgSuccess('刪除成功')
this.queryProjectPage()
}
})
},
stopProject(key) {
this.$api.post('/user/project/stop', {'key': key}).then(res => {
if (res.data) {
this.msgSuccess('停止成功')
this.queryProjectPage()
} }
}) })
}, },

Loading…
Cancel
Save