“i 收藏”开放接口

i 收藏

http://isc.net.cn/
i 收藏:个人网址收藏,为第三方网站提供收藏接口

  • 统一管理

  • 快速部署

  • 网站导出

  • 用户导出

快速部署

1. 引入 js 文件

<!-- jquery -->
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
	
<!-- vue -->
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>

<!-- i 收藏 -->
<script src="http://isc.net.cn/sc/api.js"></script>

2. 设计样式

基础样式:

演示:
http://t.isc.net.cn/test-isc/basic.html

<div id="ishoucang" @click="click" auto>
	<template v-if="state=='未查询'">
		查询
	</template>
	<template v-if="state=='未登录'">
		登录并收藏
	</template>
	<template v-if="state=='未收藏'">
		添加收藏
	</template>
	<template v-if="state=='已收藏'">
		取消收藏
	</template>
</div>

添加 auto 属性,开启自动查询。

简单样式:

演示:
http://t.isc.net.cn/test-isc/simple.html

<div id="ishoucang" @click="click" auto style="cursor:pointer;">
	<template v-if="state=='未登录'">
		<span style="color:grey;">添加收藏</span>
	</template>
	<template v-if="state=='未收藏'">
		<span style="color:black;">添加收藏</span>
	</template>
	<template v-if="state=='已收藏'">
		<span style="color:green;">取消收藏</span>
	</template>
</div>
深度学习推荐
深度学习推荐

墨之科技,版权所有 © Copyright 2017-2027

湘ICP备14012786号     邮箱:ai@inksci.com