Commit b9308f8c by damodmg

添加上皮内推广的功能

parent fdceef6d
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/integral-mall/static/css/app.0bd27768f9a263265816d415aa08962e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/integral-mall/static/js/manifest.003beacb9c9ae622c7f2.js></script><script type=text/javascript src=/integral-mall/static/js/vendor.b2d5add275329279664d.js></script><script type=text/javascript src=/integral-mall/static/js/app.b120b76a4aafe97f90e5.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/integral-mall/static/css/app.8ed66e782953e710c2a9c492aaf2152a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/integral-mall/static/js/manifest.003beacb9c9ae622c7f2.js></script><script type=text/javascript src=/integral-mall/static/js/vendor.b2d5add275329279664d.js></script><script type=text/javascript src=/integral-mall/static/js/app.ed6be291815339c5f076.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,7 +18,7 @@ request = axios.create({
request.interceptors.request.use(
config => {
config.params={
requestProject:"mall",
requestProject:"integral-mall",
...config.params
}
......
<template>
<el-dialog title="商品链接" :visible.sync="modalData.show" width="450px">
<div class="dialog-body">
<div class="wechat-url" style="margin-bottom:30px;">
<p style="font-weight: 600;margin-bottom:15px">页面链接</p>
<div style="display:flex;align-items: center">
<el-input
type="textarea"
:rows="2"
v-model="modalData.pageUrl"
disabled>
</el-input>
<a
href="javaScript:void(0)"
style="width:40px;margin-left:20px"
v-clipboard:copy="modalData.pageUrl"
v-clipboard:success="onCopy"
v-clipboard:error="onError"
>
复制
</a>
</div>
</div>
<div class="wechat-img-box" v-loading="modalData.loading">
<p style="font-weight: 600;margin-bottom:15px">小程序二维码</p>
<img
:src="modalData.imgUrl"
class="wechat-img"
style="width:140px;height:140px;margin-left:130px">
</div>
</div>
</el-dialog>
</template>
<script>
import request from '../../../api/request.js'
import common from '../../../../static/js/common.js';
export default {
props:{
modalData:{
type:Object,
}
},
data() {
return {
// loading:true,
}
},
mounted(){
},
methods: {
onCopy(e){
this.$message.success("复制成功")
},
onError(e){
this.$message.error("复制失败")
}
}
}
</script>
<style scoped>
.wechat-img-box{
margin:0 auto;
text-align: center;
}
.wechat-img{
width:200px;
height:200px;
}
<style>
\ No newline at end of file
......@@ -45,8 +45,9 @@
{{renderShowStatus(scope.row)}}
</template>
</el-table-column>
<el-table-column label="操作" align="left">
<el-table-column label="操作" align="left" min-width="160px">
<template slot-scope="scope">
<el-button type="text" @click="getLink(scope.row.integralMallProId)">推广</el-button>
<el-button type="text" @click="$router.push('/coupon/info/'+scope.row.integralMallProId)">编辑</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该优惠券?">
<el-button type="text">删除</el-button>
......@@ -55,16 +56,21 @@
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<!-- 推广 -->
<eqCodeDialog :modalData="modalData"></eqCodeDialog>
</section>
</template>
<script>
import { getPageCardsList, deleteProService } from '@/service/api/mallApi.js';
import updateCount from '../common/update-count';
import {formateDateTimeByType,format} from '@/utils/index.js';
import eqCodeDialog from '../common/eqCode.vue'
import request from '../../../api/request.js'
export default {
name: 'coupon-list',
components: {
updateCount
updateCount,
eqCodeDialog
},
data () {
return {
......@@ -79,7 +85,12 @@ export default {
currentPage:1,
pageSize:20
},
total:0
total:0,
modalData:{
show:false,
imgUrl:'',
loading:false
},
}
},
created() {
......@@ -223,7 +234,25 @@ export default {
}).catch(err => {
this.$tips({type: 'error',message: '删除失败!'});
})
}
},
// 推广
getLink(mallProId){
this.modalData.loading=true
let params={
integralMallProId:mallProId
}
this.modalData.show=true
request.get('/api-integral-mall/get-qRCode',{params}).then(res => {
if(res.data.errorCode===0){
this.modalData.show=true
this.modalData.pageUrl=res.data.result.page
this.modalData.imgUrl=res.data.result.url
this.modalData.loading=false
}else{
this.$message.error(res.data.message)
}
})
},
}
}
</script>
......
......@@ -84,8 +84,9 @@
{{renderShowStatus(scope.row)}}
</template>
</el-table-column>
<el-table-column label="操作" align="left" fixed="right">
<el-table-column label="操作" align="left" fixed="right" min-width="160">
<template slot-scope="scope">
<el-button type="text" @click="getLink(scope.row.integralMallProId)">推广</el-button>
<el-button type="text" @click="$router.push('/gift/info/'+scope.row.integralMallProId)">编辑</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该优惠券?">
<el-button type="text">删除</el-button>
......@@ -94,16 +95,21 @@
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
<!-- 推广 -->
<eqCodeDialog :modalData="modalData"></eqCodeDialog>
</section>
</template>
<script>
import { getPageGiftList, getCategoryList, deleteProService ,setHotStatusService} from '@/service/api/mallApi.js';
import updateCount from '../common/update-count';
import {formateDateTimeByType,format} from '@/utils/index.js';
import eqCodeDialog from '../common/eqCode.vue'
import request from '../../../api/request.js'
export default {
name: 'gift-list',
components: {
updateCount
updateCount,
eqCodeDialog
},
data () {
return {
......@@ -127,6 +133,11 @@ export default {
releaseTypeOptions:[{label:'所有兑换状态',value:-1},{label:'兑换',value:1},{label:'不可兑换',value:0}],
changeTypeOptions:[{label:'所有兑换方式',value:-1},{label:'微信兑换',value:1},{label:'快递发货',value:2},{label:'在线发货',value:3}],
showStatusOptions:[{label:'所有显示状态',value:-1},{label:'显示',value:1},{label:'不显示',value:2}],
modalData:{
show:false,
imgUrl:'',
loading:false
},
}
},
created() {
......@@ -281,6 +292,24 @@ export default {
this.$tips({type: 'error',message: '删除失败!'});
})
},
// 推广
getLink(mallProId){
this.modalData.loading=true
let params={
integralMallProId:mallProId
}
this.modalData.show=true
request.get('/api-integral-mall/get-qRCode',{params}).then(res => {
if(res.data.errorCode===0){
this.modalData.show=true
this.modalData.pageUrl=res.data.result.page
this.modalData.imgUrl=res.data.result.url
this.modalData.loading=false
}else{
this.$message.error(res.data.message)
}
})
},
// 热门推荐
changeHotFun(row) {
setHotStatusService({status:Number(row.proHot),integralMallProId:row.integralMallProId}).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment