<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://unpkg.com/cube-ui/lib/cube.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/cube-ui/lib/cube.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/vant.min.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>
<div id="app">
<div>
<van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />
</div>
<div>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<p>刷新次数: {{ count }}</p>
</van-pull-refresh>
</div>
<div>
<van-panel title="标题" desc="描述信息" status="状态">
<van-image style="float: left;" width="100" height="100" src="https://img.yzcdn.cn/vant/cat.jpeg" />
<div style="padding-left: 10px;padding-right: 10px;float:left; margin-left:10px;">内容</div>
</van-panel>
</div>
<div style="clear: both;"></div>
<div>
<van-tabs v-model="active">
<van-tab title="推荐">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in hotList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="小岛">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in islandList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="专题">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in appletList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="连载">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in seriesList" :key="item" :title="item" />
</van-list>
</van-tab>
</van-tabs>
</div>
<div>
<van-swipe-cell>
<van-card num="2" price="2.00" desc="描述信息" title="商品标题" class="goods-card"
thumb="https://img.yzcdn.cn/vant/cat.jpeg" />
<template #right>
<van-button square text="删除" type="danger" class="delete-button" />
</template>
</van-swipe-cell>
</div>
<div>
<van-collapse v-model="activeNames">
<van-collapse-item title="标题1" name="1">内容</van-collapse-item>
<van-collapse-item title="标题2" name="2">内容</van-collapse-item>
<van-collapse-item title="标题3" name="3" disabled>内容</van-collapse-item>
</van-collapse>
</div>
<div>
<van-uploader :after-read="afterRead" />
</div>
<div>
<van-tabbar v-model="active1">
<van-tabbar-item icon="home-o">
首页
</van-tabbar-item>
<van-tabbar-item icon="search">
关注
</van-tabbar-item>
<van-tabbar-item icon="friends-o">
简书砖
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
消息
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
我的
</van-tabbar-item>
</van-tabbar>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data: {
data: "cccccccccc",
value: "",
list: [1, 2, 3, 4, 5, 6],
hotList: ["推荐1", "推荐2", "推荐3", "推荐4", "推荐5", "推荐6"],
islandList: ["小岛1", "小岛2", "小岛3", "小岛4", "小岛5", "小岛6"],
appletList: ["专题1", "专题2", "专题3", "专题4", "专题5", "专题6"],
seriesList: ["系列1", "系列2", "系列3", "系列4", "系列5", "系列6"],
loading: "",
finished: true,
active: 1,
active1: 1,
count: 0,
isLoading: false,
activeNames: ['1'],
},
methods: {
onSearch() {
console.log("search")
},
afterRead(file) {
console.log(file);
},
onRefresh() {
setTimeout(() => {
Toast('刷新成功');
this.isLoading = false;
this.count++;
}, 1000);
},
},
created() {
}
})
</script>
<style>
.goods-card {
margin: 0;
background-color: white;
}
.delete-button {
height: 100%;
}
</style>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://unpkg.com/cube-ui/lib/cube.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/cube-ui/lib/cube.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/vant.min.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>
<div id="app">
<div>
<van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />
</div>
<div>
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item>1</van-swipe-item>
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
</van-swipe>
</div>
<div>
<van-tabs v-model="active">
<van-tab title="推荐">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in hotList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="小岛">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in islandList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="专题">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in appletList" :key="item" :title="item" />
</van-list>
</van-tab>
<van-tab title="连载">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了">
<van-cell v-for="item in seriesList" :key="item" :title="item" />
</van-list>
</van-tab>
</van-tabs>
</div>
<div>
<van-cell title="显示分享面板" @click="showShare = true" />
<van-share-sheet v-model="showShare" title="立即分享给好友" :options="options" @select="onSelect" />
</div>
<div>
<van-tabbar v-model="active1">
<van-tabbar-item icon="home-o">
首页
</van-tabbar-item>
<van-tabbar-item icon="search">
关注
</van-tabbar-item>
<van-tabbar-item icon="friends-o">
简书砖
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
消息
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
我的
</van-tabbar-item>
</van-tabbar>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data: {
data: "cccccccccc",
value: "",
list: [1, 2, 3, 4, 5, 6],
hotList: ["推荐1", "推荐2", "推荐3", "推荐4", "推荐5", "推荐6"],
islandList: ["小岛1", "小岛2", "小岛3", "小岛4", "小岛5", "小岛6"],
appletList: ["专题1", "专题2", "专题3", "专题4", "专题5", "专题6"],
seriesList: ["系列1", "系列2", "系列3", "系列4", "系列5", "系列6"],
loading: "",
finished: true,
active: 1,
active1: 1,
showShare: false,
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
options: [
{ name: '微信', icon: 'wechat' },
{ name: '微博', icon: 'weibo' },
{ name: '复制链接', icon: 'link' },
{ name: '分享海报', icon: 'poster' },
{ name: '二维码', icon: 'qrcode' },
],
},
methods: {
onSearch() {
console.log("search")
},
onSelect(option) {
this.showShare = false;
},
},
created() {
}
})
</script>
<style>
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
background-color: #39a9ed;
}
</style>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://unpkg.com/cube-ui/lib/cube.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/cube-ui/lib/cube.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/vant.min.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>
<div id="app">
<div>
<van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />
</div>
<div>
<van-empty description="描述文字" />
</div>
<div>
<van-contact-card :type="cardType" :name="currentContact.name" :tel="currentContact.tel"
@click="showList = true" />
<!-- 联系人列表 -->
<van-popup v-model="showList" position="bottom">
<van-contact-list v-model="chosenContactId" :list="list" @add="onAdd" @edit="onEdit"
@select="onSelect" />
</van-popup>
<!-- 联系人编辑 -->
<van-popup v-model="showEdit" position="bottom">
<van-contact-edit :contact-info="editingContact" :is-edit="isEdit" @save="onSave" @delete="onDelete" />
</van-popup>
</div>
<van-card num="2" price="2.00" desc="描述信息" title="商品标题" thumb="https://img.yzcdn.cn/vant/ipad.jpeg" />
<div>
<van-tabbar v-model="active1">
<van-tabbar-item icon="home-o">
首页
</van-tabbar-item>
<van-tabbar-item icon="search">
关注
</van-tabbar-item>
<van-tabbar-item icon="friends-o">
简书砖
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
消息
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
我的
</van-tabbar-item>
</van-tabbar>
</div>
</div>
</body>
<script>
new Vue({
el: '#app',
data: {
data: "cccccccccc",
value: "",
list: [1, 2, 3, 4, 5, 6],
hotList: ["推荐1", "推荐2", "推荐3", "推荐4", "推荐5", "推荐6"],
islandList: ["小岛1", "小岛2", "小岛3", "小岛4", "小岛5", "小岛6"],
appletList: ["专题1", "专题2", "专题3", "专题4", "专题5", "专题6"],
seriesList: ["系列1", "系列2", "系列3", "系列4", "系列5", "系列6"],
loading: "",
finished: true,
active: 1,
active1: 1,
count: 0,
isLoading: false,
activeNames: ['1'],
chosenContactId: null,
editingContact: {},
showList: false,
showEdit: false,
isEdit: false,
list: [
{
name: '张三',
tel: '13000000000',
id: 0,
},
],
},
computed: {
cardType() {
return this.chosenContactId !== null ? 'edit' : 'add';
},
currentContact() {
const id = this.chosenContactId;
return id !== null ? this.list.filter((item) => item.id === id)[0] : {};
},
},
methods: {
onSearch() {
console.log("search")
},
afterRead(file) {
console.log(file);
},
onRefresh() {
setTimeout(() => {
Toast('刷新成功');
this.isLoading = false;
this.count++;
}, 1000);
},
onAdd() {
this.editingContact = { id: this.list.length };
this.isEdit = false;
this.showEdit = true;
},
onEdit(item) {
this.isEdit = true;
this.showEdit = true;
this.editingContact = item;
},
onSelect() {
this.showList = false;
},
onSave(info) {
this.showEdit = false;
this.showList = false;
if (this.isEdit) {
this.list = this.list.map((item) =>
item.id === info.id ? info : item
);
} else {
this.list.push(info);
}
this.chosenContactId = info.id;
},
onDelete(info) {
this.showEdit = false;
this.list = this.list.filter((item) => item.id !== info.id);
if (this.chosenContactId === info.id) {
this.chosenContactId = null;
}
},
created() {
}
}
})
</script>
<style>
.goods-card {
margin: 0;
background-color: white;
}
.delete-button {
height: 100%;
}
</style>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://unpkg.com/cube-ui/lib/cube.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/cube-ui/lib/cube.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/vant.min.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>
<div id="app">
<div>
<van-search v-model="value" shape="round" background="#4fc08d" placeholder="请输入搜索关键词" />
</div>
<div>
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item>1</van-swipe-item>
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
</van-swipe>
</div>
<div>
<van-coupon-cell :coupons="coupons" :chosen-coupon="chosenCoupon" @click="showList = true" />
<!-- 优惠券列表 -->
<van-popup v-model="showList" round position="bottom" style="height: 90%; padding-top: 4px;">
<van-coupon-list :coupons="coupons" :chosen-coupon="chosenCoupon" :disabled-coupons="disabledCoupons"
@change="onChange" @exchange="onExchange" />
</van-popup>
</div>
<div>
<van-sku v-model="show" :sku="sku" :goods="goods" :goods-id="goodsId" :quota="quota" :quota-used="quotaUsed"
:hide-stock="sku.hide_stock" :message-config="messageConfig" @buy-clicked="onBuyClicked"
@add-cart="onAddCartClicked" />
</div>
<div>
<van-tabbar v-model="active1">
<van-tabbar-item icon="home-o">
首页
</van-tabbar-item>
<van-tabbar-item icon="search">
关注
</van-tabbar-item>
<van-tabbar-item icon="friends-o">
简书砖
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
消息
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item icon="setting-o">
我的
</van-tabbar-item>
</van-tabbar>
</div>
</div>
</body>
<script>
const coupon = {
available: 1,
condition: '无使用门槛\n最多优惠12元',
reason: '',
value: 150,
name: '优惠券名称',
startAt: 1489104000,
endAt: 1514592000,
valueDesc: '1.5',
unitDesc: '元',
};
new Vue({
el: '#app',
data: {
data: "cccccccccc",
value: "",
list: [1, 2, 3, 4, 5, 6],
hotList: ["推荐1", "推荐2", "推荐3", "推荐4", "推荐5", "推荐6"],
islandList: ["小岛1", "小岛2", "小岛3", "小岛4", "小岛5", "小岛6"],
appletList: ["专题1", "专题2", "专题3", "专题4", "专题5", "专题6"],
seriesList: ["系列1", "系列2", "系列3", "系列4", "系列5", "系列6"],
loading: "",
finished: true,
active: 1,
active1: 1,
showShare: false,
goodsId: '946755',
quota: 0,
quotaUsed: 1,
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg',
],
options: [
{ name: '微信', icon: 'wechat' },
{ name: '微博', icon: 'weibo' },
{ name: '复制链接', icon: 'link' },
{ name: '分享海报', icon: 'poster' },
{ name: '二维码', icon: 'qrcode' },
],
chosenCoupon: -1,
coupons: [coupon],
disabledCoupons: [coupon],
showList: false,
show: false,
sku: {
tree: [
{
k: '颜色',
v: [
{
id: '30349',
name: '红色',
imgUrl: 'https://img.yzcdn.cn/1.jpg',
previewImgUrl: 'https://img.yzcdn.cn/1p.jpg',
},
{
id: '1215',
name: '蓝色',
imgUrl: 'https://img.yzcdn.cn/2.jpg',
previewImgUrl: 'https://img.yzcdn.cn/2p.jpg',
}
],
k_s: 's1'
}
],
list: [
{
id: 2259,
price: 100,
s1: '1215',
s2: '1193',
s3: '0',
stock_num: 110
}
],
price: '1.00',
stock_num: 227,
collection_id: 2261,
none_sku: false,
messages: [
{
datetime: '0',
multiple: '0',
name: '留言',
type: 'text',
required: '1',
placeholder: ''
}
],
hide_stock: false
},
properties: [
{
k_id: 123,
k: '加料',
is_multiple: true,
v: [
{
id: 1222,
name: '珍珠',
price: 1,
},
{
id: 1223,
name: '椰果',
price: 1,
},
],
},
],
initialSku: {
s1: '30349',
s2: '1193',
selectedNum: 3,
selectedProp: {
123: [1222]
}
},
goods: {
picture: 'https://img.yzcdn.cn/1.jpg'
},
customStepperConfig: {
quotaText: '每次限购xxx件',
handleOverLimit: (data) => {
const { action, limitType, quota, quotaUsed, startSaleNum } = data;
if (action === 'minus') {
Toast(startSaleNum > 1 ? `${startSaleNum}件起售` : '至少选择一件商品');
} else if (action === 'plus') {
if (limitType === LIMIT_TYPE.QUOTA_LIMIT) {
let msg = `单次限购${quota}件`;
if (quotaUsed > 0) msg += `,你已购买${quotaUsed}`;
Toast(msg);
} else {
Toast('库存不够了');
}
}
},
handleStepperChange: currentValue => { },
stockNum: 1999,
stockFormatter: stockNum => { },
},
messageConfig: {
uploadImg: () => {
return new Promise((resolve) => {
setTimeout(() => resolve('https://img.yzcdn.cn/upload_files/2017/02/21/FjKTOxjVgnUuPmHJRdunvYky9OHP.jpg!100x100.jpg'), 1000);
});
},
uploadMaxSize: 3,
placeholderMap: {
text: 'xxx',
tel: 'xxx',
},
initialMessages: {
留言: '留言信息'
}
}
},
methods: {
onSearch() {
console.log("search")
},
onSelect(option) {
this.showShare = false;
},
onChange(index) {
this.showList = false;
this.chosenCoupon = index;
},
onExchange(code) {
this.coupons.push(coupon);
},
onBuyClicked() {
},
onAddCartClicked() {
}
},
created() {
}
})
</script>
<style>
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
background-color: #39a9ed;
}
</style>
</html>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>share-lesson</groupId>
<artifactId>lesson</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- Spring Boot 启动父依赖 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
</parent>
<dependencies>
<!-- Spring Boot web依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<build>
<finalName>patient-interaction</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>