1.链接更新

v1.0.0
sws 2024-09-28 14:40:00 +08:00
parent 05ca8cad94
commit bd11b15233
9 changed files with 46 additions and 37 deletions

View File

@ -117,10 +117,11 @@ const row_click = (row: any) => {
const new_table_data = JSON.parse(JSON.stringify(tableData.value));
template_selection.value = new_table_data.findIndex((item: pageLinkList) => item.id == row.id).toString();
if (props.selectIsUrl) {
const page = '/pages/article-detail/article-detail?id=' + row.id;
const new_row = {
id: row.id,
name: row.name,
page: '/pages/article-detail/article-detail?id=' + row.id,
name: row.name || row.title || page,
page: page,
};
modelValue.value = [new_row];
} else {
@ -132,10 +133,11 @@ const handle_select = (selection: any) => {
if (props.selectIsUrl) {
// selection
const new_selection = selection.map((item: any) => {
const page = '/pages/article-detail/article-detail?id=' + item.id;
return {
id: item.id,
name: item.name,
page: '/pages/article-detail/article-detail?id=' + item.id,
name: item.name || item.title || page,
page: page,
};
});
modelValue.value = new_selection;

View File

@ -122,10 +122,11 @@ const row_click = (row: any) => {
const new_table_data = JSON.parse(JSON.stringify(tableData.value));
template_selection.value = new_table_data.findIndex((item: pageLinkList) => item.id == row.id).toString();
if (props.selectIsUrl) {
const page = '/pages/goods-search/goods-search?brand=' + row.id;
const new_row = {
id: row.id,
name: row.name,
page: '/pages/goods-search/goods-search?brand=' + row.id,
name: row.name || row.title || page,
page: page,
};
modelValue.value = [new_row];
} else {
@ -137,10 +138,11 @@ const handle_select = (selection: any) => {
if (props.selectIsUrl) {
// selection
const new_selection = selection.map((item: any) => {
const page = '/pages/goods-search/goods-search?brand=' + item.id;
return {
id: item.id,
name: item.name,
page: '/pages/goods-search/goods-search?brand=' + item.id,
name: item.name || item.title || page,
page: page,
};
});
modelValue.value = new_selection;

View File

@ -12,25 +12,25 @@
<el-input v-model="form.link" class="link-input" placeholder="请输入跳转路径" clearable />
</el-form-item>
<div class="tips">
<h4>WEB端</h4>
<p class="title">WEB端</p>
<p>1. 以http开头</p>
<p>2. 如小程序中使用WEB页面需要在小程序后台加入白名单</p>
<h5>内部页面(小程序/APP内部地址)</h5>
<p class="title">内部页面(小程序/APP内部地址)</p>
<p>1. 小程序以/pages开始</p>
<p>2. 例如/pages/user/user支持带参数 ?x=xx</p>
<p>3. 示例/pages/goods-detail/goods-detail?id=1</p>
<h5>打开外部小程序</h5>
<p class="title">打开外部小程序</p>
<p>1. 以appid://</p>
<p>2. 例如appid://wx88888888|path</p>
<p>3. 示例appid://wx88888888|/pages/goods-detail/goods-detail?id=1</p>
<h5>打开外部小程序链接</h5>
<p class="title">打开外部小程序链接</p>
<p>1. 以shortlink://</p>
<p>2. 例如shortlink://-></p>
<p>3. 示例shortlink://#://ShopXO/WxblCyRUmDqGpcz</p>
<h5>拨打电话</h5>
<p class="title">拨打电话</p>
<p>1. 以tel://</p>
<p>2. 例如tel://wx13222222222</p>
<p>跳转原生地图查看指定位置</p>
<p class="title">跳转原生地图查看指定位置</p>
<p>1. 以map://</p>
<p>2. 例如map://|||</p>
<p>3. 示例map://ShopXO|XXX|121.626444|31.20843</p>
@ -232,15 +232,15 @@ const reset_data = () => {
}
}
.tips {
h4,
h5 {
margin-bottom: 1rem;
color: #666;
}
p {
padding-left: 2rem;
padding-left: 4rem;
color: #666;
font-size: 1.2rem;
&.title {
margin: 1rem 0;
color: #333;
padding-left: 2rem;
}
}
}
</style>

View File

@ -126,10 +126,11 @@ const row_click = (row: any) => {
const new_table_datas = array_conversion(JSON.parse(JSON.stringify(new_table_data.value)));
template_selection.value = new_table_datas.findIndex((item: pageLinkList) => item.id == row.id).toString();
if (props.selectIsUrl) {
const page = '/pages/goods-search/goods-search?category_id=' + row.id;
const new_row = {
id: row.id,
name: row.name,
page: '/pages/goods-search/goods-search?category_id=' + row.id,
name: row.name || row.title || page,
page: page,
};
modelValue.value = [new_row];
} else {

View File

@ -132,10 +132,11 @@ const row_click = (row: any) => {
const new_table_data = JSON.parse(JSON.stringify(tableData.value));
template_selection.value = new_table_data.findIndex((item: pageLinkList) => item.id == row.id).toString();
if (props.selectIsUrl) {
const page = '/pages/goods-detail/goods-detail?id=' + row.id;
const new_row = {
id: row.id,
name: row.name,
page: '/pages/goods-detail/goods-detail?id=' + row.id,
name: row.name || row.title || page,
page: page,
};
modelValue.value = [new_row];
} else {
@ -147,10 +148,11 @@ const handle_select = (selection: any) => {
if (props.selectIsUrl) {
// selection
const new_selection = selection.map((item: any) => {
const page = '/pages/goods-detail/goods-detail?id=' + item.id;
return {
id: item.id,
name: item.name,
page: '/pages/goods-detail/goods-detail?id=' + item.id,
name: item.name || item.title || page,
page: page,
};
});
modelValue.value = new_selection;

View File

@ -133,10 +133,11 @@ const row_click = (row: any) => {
const new_table_data = JSON.parse(JSON.stringify(tableData.value));
template_selection.value = new_table_data.findIndex((item: pageLinkList) => item.id == row.id).toString();
if (props.selectIsUrl) {
const page = computer_link.value + row.id;
const new_row = {
id: row.id,
name: row.name,
page: computer_link.value + row.id,
name: row.name || row.title || page,
page: page,
};
modelValue.value = [new_row];
} else {
@ -148,10 +149,11 @@ const handle_select = (selection: any) => {
if (props.selectIsUrl) {
// selection
const new_selection = selection.map((item: any) => {
const page = computer_link.value + item.id;
return {
id: item.id,
name: item.name,
page: computer_link.value + item.id,
name: item.name || item.title || page,
page: page,
};
});
modelValue.value = new_selection;

View File

@ -3,12 +3,12 @@
<el-form :model="form" label-width="70">
<card-container>
<div class="mb-12">展示设置</div>
<el-form-item label="图标样式" class="align-s">
<el-form-item label="左侧图标" class="align-s">
<el-row class="w">
<el-col :span="24"><el-switch v-model="form.is_icon_show" active-value="1" inactive-value="0"></el-switch></el-col>
</el-row>
<template v-if="form.is_icon_show == '1'">
<el-row class="mt-10 w">
<el-row class="mt-10 w">
<el-col :span="24">
<upload v-model="form.icon_img" v-model:icon-value="form.icon_class" is-icon :limit="1" size="50"></upload>
</el-col>
@ -100,7 +100,7 @@ const on_sort = (new_list: hot_word_list[]) => {
form.value.hot_word_list = new_list;
};
const search_color_change = (color: string, old_hot_word: hot_word_list) => {
const index = form.value.hot_word_list.findIndex((item: { id: string; }) => item.id == old_hot_word.id);
const index = form.value.hot_word_list.findIndex((item: { id: string }) => item.id == old_hot_word.id);
(<arrayIndex>form.value.hot_word_list)[index].color = color;
};
</script>

View File

@ -12,7 +12,7 @@
<el-form-item label="是否居中">
<el-switch v-model="form.is_title_center" active-value="1" inactive-value="0"/>
</el-form-item>
<el-form-item label="上传图片">
<el-form-item label="图片/图标">
<upload v-model="form.img_src" v-model:icon-value="form.icon_class" is-icon :limit="1" size="50"></upload>
</el-form-item>
<el-form-item label="副标题">

View File

@ -6,12 +6,12 @@
<template v-if="!isEmpty(content.icon_class)">
<el-form-item label="左侧图标">
<div class="flex-col w gap-10">
<el-form-item label="大小" label-width="40" class="form-item-child-label">
<slider v-model="form.icon_size" :max="100"></slider>
</el-form-item>
<el-form-item label="颜色" label-width="40" class="form-item-child-label">
<color-picker v-model="form.icon_color" default-color="#999"></color-picker>
</el-form-item>
<el-form-item label="大小" label-width="40" class="form-item-child-label">
<slider v-model="form.icon_size" :max="100"></slider>
</el-form-item>
</div>
</el-form-item>
</template>