广告接入

master
wqy 1 year ago
parent 01f7e5c587
commit 9bdadd152e

@ -85,10 +85,19 @@ export function viewStatistics(memberId){
})
}
export function getMiniWechatImg(){
export function getMiniWechatImg(params){
return request({
url: `/ums/member/wechat/code`,
method: 'get'
method: 'get',
params
})
}
export function judgeQrCode(params){
return request({
url: `/no-auth/verified/code`,
method: 'get',
params
})
}

@ -0,0 +1,70 @@
<template>
<el-dialog title="扫描解锁" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<p>使用微信扫描下方二维码观看完广告获取验证码</p>
<p class="red f13">如果第一次扫码未弹出广告请重新扫码进入</p>
<div class="flex-center">
<el-image class="qr-code"
:src="'data:image/png;base64,'+ miniImg"
fit="fill"
></el-image>
<el-input v-model="qrCode" class="left-input"/>
<el-button @click="asyncOk" class="right-btn" type="primary" :disabled="!qrCode">提交</el-button>
</div>
</el-dialog>
</template>
<script>
import {getMiniWechatImg, judgeQrCode} from "@/api/ums/member";
import {mapGetters} from "vuex";
export default {
computed: {
...mapGetters(['roles'])
},
data() {
return {
open: false,
miniImg: null,
qrCode: null
}
},
methods: {
initMiniWechatImg() {
getMiniWechatImg({scene: 2}).then(res => {
this.miniImg = res.data
})
},
show() {
//
if (this.roles.includes("admin")) {
this.$emit("confirmOk", true)
return
}
this.initMiniWechatImg()
this.open = true
},
async asyncOk(){
const res = await judgeQrCode({code: this.qrCode}).then(res=>{
return res.data
})
if (res) {
this.open = false
} else {
this.$message.error('验证码错误')
}
this.$emit("confirmOk", res)
}
}
}
</script>
<style lang="stylus">
.qr-code
min-width 150px
height 150px
margin 20px 20px 20px 0
.left-input
.el-input__inner
border-radius 4px 0 0 4px !important
.right-btn
border-radius 0 4px 4px 0 !important
</style>

@ -174,7 +174,8 @@ body
width 100%
.bolder-font
font-weight bolder
.f13
font-size 13px
.large-tip
font-size 16px
.dialog-form-two

@ -251,7 +251,7 @@ export default {
},
methods: {
initMiniWechatImg() {
getMiniWechatImg().then(res => {
getMiniWechatImg({scene: 1}).then(res => {
this.miniImg = res.data
})
},

@ -1,5 +1,6 @@
<template>
<div class="app-container">
<div v-show="show">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
<el-form-item label="申请状态" prop="status">
<DictRadio v-model="queryParams.status" :radioData="dict.type.oms_aftersale_status" size="small" :show-all="'all'" @change="handleQuery"></DictRadio>
@ -33,7 +34,6 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="omsAftersaleList" @selection-change="handleSelectionChange" border>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="售后单号" prop="id" width="160"/>
@ -100,7 +100,6 @@
</template>
</el-table-column>
</el-table>
<InBody v-show="total>0">
<pagination
:total="total"
@ -109,6 +108,8 @@
@pagination="getList"
/>
</InBody>
</div>
<SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>
<!-- 拒绝对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@ -151,12 +152,15 @@ import {
viewLog
} from "@/api/oms/aftersale";
import dateUtil from '@/utils/DateUtil';
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
export default {
name: "OmsAftersale",
components: {SeeAdsComponent},
dicts: ["oms_aftersale_type", "oms_aftersale_status"],
data() {
return {
show: false,
pickerOptions: {
shortcuts: dateUtil.getTimeShort2()
},
@ -219,9 +223,17 @@ export default {
if (status){
this.queryParams.status = status
}
this.getList();
this.$nextTick(()=>{
this.$refs.seeAdsComponentRef.show()
})
},
methods: {
confirmOk(success) {
if (success) {
this.show = true
this.getList();
}
},
copy(data) {
let url = data;
let oInput = document.createElement('input');

@ -1,5 +1,6 @@
<template>
<div class="app-container" v-if="show">
<div class="app-container">
<div v-show="show">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium"
class="ry_form">
<el-form-item label="订单状态" prop="status">
@ -31,7 +32,6 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="omsOrderList" border @selection-change="handleSelectionChange"
cell-class-name="my-cell">
<el-table-column type="selection" width="55" align="center"/>
@ -177,7 +177,6 @@
</template>
</el-table-column>
</el-table>
<InBody v-show="total>0">
<pagination
:total="total"
@ -186,8 +185,8 @@
@pagination="getList"
/>
</InBody>
</div>
<SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>
<!-- 发货对话框 -->
<el-dialog :title="deliveryObj.title" :visible.sync="deliveryObj.open" width="500px" append-to-body>
<el-form ref="deliveryForm" :model="deliveryObj.form" :rules="deliveryObj.rules" label-width="100px">
@ -285,6 +284,7 @@ import AddressSelector from "@/views/components/AddressSelector/index.vue";
import dateUtil, {dateFormat} from '@/utils/DateUtil';
import {isStarRepo} from "@/utils/is-star-plugin"
import {mapGetters} from "vuex";
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
export default {
computed:{
@ -293,6 +293,7 @@ export default {
name: "OmsOrder",
dicts: ["oms_order_status", "oms_pay_type"],
components: {
SeeAdsComponent,
AddressSelector
},
data() {
@ -411,6 +412,13 @@ export default {
};
},
async created() {
this.$nextTick(()=>{
this.$refs.seeAdsComponentRef.show()
})
},
methods: {
async confirmOk(success) {
if (success) {
const res = await isStarRepo('zccbbg', 'RuoYi-Mall', this.userId, 'https://mall.ichengle.top/order/order', 'ruoyi-mall-商城', 'https://gitee.com/zccbbg/RuoYi-Mall')
this.show = res;
if (res) {
@ -426,8 +434,8 @@ export default {
}
this.getList();
}
}
},
methods: {
/** 日期组件设置为今天 */
setToday() {
const temp = new Date();

@ -1,5 +1,6 @@
<template>
<div class="app-container" v-if="show">
<div class="app-container">
<div v-show="show">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
<el-form-item label="上架状态" prop="publishStatus">
<DictRadio v-model="queryParams.publishStatus" @change="handleQuery" size="small"
@ -118,15 +119,20 @@
/>
</InBody>
</div>
<SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>
</div>
</template>
<script>
import {delPmsProduct, listPmsProduct} from "@/api/pms/product";
import {isStarRepo} from "@/utils/is-star-plugin";
import {mapGetters} from "vuex";
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
export default {
name: "PmsProduct",
components: {SeeAdsComponent},
dicts: ['pms_publish_status'],
data() {
return {
@ -169,17 +175,24 @@ export default {
},
};
},
async created() {
created() {
this.$nextTick(()=>{
this.$refs.seeAdsComponentRef.show()
})
},
computed:{
...mapGetters(['userId']),
},
methods: {
async confirmOk(success) {
if (success) {
const res = await isStarRepo('zccbbg', 'RuoYi-Mall', this.userId, 'https://mall.ichengle.top/pms/product', 'ruoyi-mall-商城', 'https://gitee.com/zccbbg/RuoYi-Mall')
this.show = res;
if (res) {
this.getList();
}
}
},
computed:{
...mapGetters(['userId']),
},
methods: {
/** 查询商品信息列表 */
getList() {
this.loading = true;

@ -1,5 +1,6 @@
<template>
<div class="app-container" v-if="show">
<div class="app-container">
<div v-show="show">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
<el-form-item label="创建时间">
<el-date-picker
@ -15,14 +16,14 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="账号启用状态">-->
<!-- <el-select v-model="queryParams.status" placeholder="请选择" :clearable="true" size="small">-->
<!-- <el-option label="禁用" value="0">-->
<!-- </el-option>-->
<!-- <el-option label="启用" value="1">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="账号启用状态">-->
<!-- <el-select v-model="queryParams.status" placeholder="请选择" :clearable="true" size="small">-->
<!-- <el-option label="禁用" value="0">-->
<!-- </el-option>-->
<!-- <el-option label="启用" value="1">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="昵称" prop="nickname">
<el-input
v-model.trim="queryParams.nickname"
@ -116,6 +117,8 @@
@pagination="getList"
/>
</InBody>
</div>
<SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>
<!-- 统计 -->
<el-dialog :title="statisticsObj.title" :visible.sync="statisticsObj.open" width="500px" append-to-body>
<el-descriptions direction="vertical" :column="2" border>
@ -151,9 +154,11 @@ import {
import dateUtil from '@/utils/DateUtil';
import {isStarRepo} from "@/utils/is-star-plugin";
import {mapGetters} from "vuex";
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
export default {
name: "UmsMember",
components: {SeeAdsComponent},
data() {
return {
show: false,
@ -220,16 +225,23 @@ export default {
};
},
async created() {
this.$nextTick(()=>{
this.$refs.seeAdsComponentRef.show()
})
},
computed:{
...mapGetters(['userId']),
},
methods: {
async confirmOk(success) {
if (success) {
const res = await isStarRepo('zccbbg', 'RuoYi-Mall', this.userId, 'https://mall.ichengle.top/member/member', 'ruoyi-mall-商城', 'https://gitee.com/zccbbg/RuoYi-Mall')
this.show = res;
if (res) {
this.getList();
}
}
},
computed:{
...mapGetters(['userId']),
},
methods: {
showUpdateMark(record){
this.remarkModal = {
visible: true,

Loading…
Cancel
Save