|
@@ -66,7 +66,8 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
<el-button
|
|
|
- @click="() => copyCode(scope.row.catalogId)"
|
|
|
+ v-if="scope.row.slots && scope.row.slots.length"
|
|
|
+ @click="() => copyCode(scope.row)"
|
|
|
link
|
|
|
type="primary"
|
|
|
size="small"
|
|
@@ -182,15 +183,16 @@ const saveEdit = (row: CatalogTreeOri) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const copyCode = (id: number) => {
|
|
|
+const copyCode = (row: CatalogTreeOri) => {
|
|
|
+ const slots = row.slots || []
|
|
|
ElNotification({
|
|
|
title: '请复制下文',
|
|
|
- message: `<script src="http://cxzx.smcic.net/ad/catalog/${id}.js" /> `,
|
|
|
+ message: `<script src="http://cxzx.smcic.net/ad/catalog/${row.catalogId}.js" /> `,
|
|
|
duration: 0,
|
|
|
})
|
|
|
ElNotification({
|
|
|
title: 'divID',
|
|
|
- message: ``,
|
|
|
+ message: '当前id为:' + slots.map((v) => '#sxtv-ad-' + v.slotId).join(','),
|
|
|
duration: 0,
|
|
|
offset: 200,
|
|
|
})
|