微信跳转调整

This commit is contained in:
墨大叔 2024-05-30 15:52:59 +08:00
parent e7f207d4b5
commit fa5bc9f385
5 changed files with 24 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :title="title" :visible.sync="show" width="500px" center @open="open" @close="close"> <el-dialog :title="title" :visible="show" width="500px" center @open="open" @close="close">
<el-form :model="form" :rules="rules" ref="form"> <el-form :model="form" :rules="rules" ref="form">
<el-form-item label="审核意见" prop="remark"> <el-form-item label="审核意见" prop="remark">
<el-input <el-input

View File

@ -6,13 +6,13 @@ export function getWxSchemeUrl(path, query) {
} }
export function getWxIndexUrl(query) { export function getWxIndexUrl(query) {
let url = `https://kaiguan.chuantewulian.cn/wxjump/index?action=device`; let url = `https://kg.chuantewulian.cn/w`;
if (query != null ) { if (query != null ) {
if (query instanceof Object) { if (query instanceof Object) {
query = tansParams(query).slice(0, -1); query = tansParams(query).slice(0, -1);
} }
if (query.length > 0) { if (query.length > 0) {
url += `&${query}`; url += `?${query}`;
} }
} }
console.log("wx_url", url); console.log("wx_url", url);

View File

@ -84,6 +84,11 @@
<image-preview :src="scope.row.picture" :width="50" :height="50"/> <image-preview :src="scope.row.picture" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="跳转类型" align="center" prop="urlType">
<template slot-scope="scope">
<dict-tag :options="dict.type.ss_ad_url_type" :value="scope.row.urlType"/>
</template>
</el-table-column>
<el-table-column label="跳转链接" align="center" prop="url" /> <el-table-column label="跳转链接" align="center" prop="url" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -130,6 +135,16 @@
<el-form-item label="广告图片" prop="picture"> <el-form-item label="广告图片" prop="picture">
<image-upload v-model="form.picture" :limit="1"/> <image-upload v-model="form.picture" :limit="1"/>
</el-form-item> </el-form-item>
<el-form-item label="跳转类型" prop="urlType">
<el-select v-model="form.urlType" placeholder="请选择跳转类型">
<el-option
v-for="dict in dict.type.ss_ad_url_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="跳转链接" prop="url"> <el-form-item label="跳转链接" prop="url">
<el-input v-model="form.url" placeholder="请输入跳转链接" /> <el-input v-model="form.url" placeholder="请输入跳转链接" />
</el-form-item> </el-form-item>
@ -150,7 +165,7 @@ import { listAd, getAd, delAd, addAd, updateAd } from "@/api/ss/ad";
export default { export default {
name: "Ad", name: "Ad",
dicts: ['ss_ad_type'], dicts: ['ss_ad_type', 'ss_ad_url_type'],
data() { data() {
return { return {
// //
@ -185,12 +200,9 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
createTime: [ urlType: [
{ required: true, message: "创建时间不能为空", trigger: "blur" } { required: true, message: "跳转链接类型不允许为空", trigger: "blur" }
], ],
deleted: [
{ required: true, message: "逻辑删除标志0否1是不能为空", trigger: "blur" }
]
} }
}; };
}, },
@ -218,6 +230,7 @@ export default {
adId: null, adId: null,
type: null, type: null,
picture: null, picture: null,
urlType: "1",
url: null, url: null,
createBy: null, createBy: null,
createTime: null, createTime: null,

View File

@ -99,7 +99,7 @@ export default {
computed: { computed: {
qrCodeText() { qrCodeText() {
return (device) => { return (device) => {
return getWxIndexUrl({ deviceNo: device.deviceNo}); return getWxIndexUrl({ s: device.deviceNo});
} }
}, },
}, },

View File

@ -338,7 +338,7 @@ export default {
// //
qrCodeText() { qrCodeText() {
return (device) => { return (device) => {
return getWxIndexUrl({ deviceNo: device.deviceNo}); return getWxIndexUrl({ s: device.deviceNo});
} }
}, },
}, },