wenan__demo
This commit is contained in:
parent
0ee9365fe4
commit
f5e11d5fec
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"vue": "^2.6.14"
|
||||
"element-ui": "^2.15.14",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -4,8 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<title>文案脚本</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
|
13
src/App.vue
13
src/App.vue
|
@ -1,28 +1,17 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB |
|
@ -1,58 +0,0 @@
|
|||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
|
@ -1,8 +1,14 @@
|
|||
import Vue from 'vue'
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import router from './router';
|
||||
import App from './App.vue'
|
||||
|
||||
|
||||
Vue.use(ElementUI)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App),
|
||||
}).$mount('#app')
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
import Vue from "vue";
|
||||
import Vuerouter from 'vue-router'
|
||||
|
||||
Vue.use(Vuerouter)
|
||||
|
||||
const router = new Vuerouter({
|
||||
routes: [{
|
||||
path: '/',
|
||||
redirect: '/home'
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
component: () => import('@/views/home.vue'),
|
||||
},
|
||||
{
|
||||
path: '/result',
|
||||
component: () => import('@/views/result.vue')
|
||||
}]
|
||||
})
|
||||
|
||||
export default router
|
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="城市">
|
||||
<el-input v-model="form.city" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体地点">
|
||||
<el-input v-model="form.address" maxlength="20" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="店类型">
|
||||
<el-input v-model="form.type" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="家乡">
|
||||
<el-input v-model="form.home" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓氏">
|
||||
<el-input v-model="form.firstName" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="从业年限">
|
||||
<el-input v-model="form.years" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业">
|
||||
<el-input v-model="form.hy" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="店名">
|
||||
<el-input v-model="form.shopName" maxlength="20" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="店数量">
|
||||
<el-input v-model="form.shopCount" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄段">
|
||||
<el-input v-model="form.age" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂房面积">
|
||||
<el-input v-model="form.cm" maxlength="10" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">提交</el-button>
|
||||
<el-button @click="reset">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'APP',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
city: '',
|
||||
address: '',
|
||||
type: '',
|
||||
home: '',
|
||||
firstName: "",
|
||||
years: '',
|
||||
hy: '',
|
||||
shopName: '',
|
||||
shopCount: '',
|
||||
age: '',
|
||||
name: '',
|
||||
cm: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
if (this.form.address !== '' || this.form.age !== '' || this.form.type !== '' || this.form.years !== '' || this.form.city !== '' || this.form.cm !== ''
|
||||
|| this.form.firstName !== '' || this.form.home !== '' || this.form.hy !== '' || this.form.name !== '' || this.form.shopCount !== '' || this.form.shopName !== '') {
|
||||
localStorage.setItem('form', JSON.stringify(this.form))
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.form.address = ''
|
||||
this.form.age = ''
|
||||
this.form.type = ''
|
||||
this.form.years = ''
|
||||
this.form.city = ''
|
||||
this.form.cm = ''
|
||||
this.form.firstName = ''
|
||||
this.form.home = ''
|
||||
this.form.hy = ''
|
||||
this.form.name = ''
|
||||
this.form.shopCount = ''
|
||||
this.form.shopName = ''
|
||||
this.$router.push('/result')
|
||||
} else {
|
||||
this.$message({
|
||||
message: '提交信息不能为空',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.form.address = ''
|
||||
this.form.age = ''
|
||||
this.form.type = ''
|
||||
this.form.years = ''
|
||||
this.form.city = ''
|
||||
this.form.cm = ''
|
||||
this.form.firstName = ''
|
||||
this.form.home = ''
|
||||
this.form.hy = ''
|
||||
this.form.name = ''
|
||||
this.form.shopCount = ''
|
||||
this.form.shopName = ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
我是{{this.form.name}},{{this.form.home}}人,在{{this.form.city}}做工厂短视频公司,一路走来有太多的心酸,感谢一路有你们。<br />
|
||||
<el-divider></el-divider>
|
||||
天气在变,服务不变,时代不变,品质不变,不管世界怎么变,我做短视频一直不变。<br />
|
||||
<el-divider></el-divider>
|
||||
{{this.form.age}},姓{{this.form.firstName}},在{{this.form.city}}开一家抖音短视频公司,有幸被你刷到,认识一下,奋斗路上寻找志同道合的人。<br />
|
||||
<el-divider></el-divider>
|
||||
我是{{this.form.name}},在{{this.form.city}}一年四季扛着相机走工厂,认识我,短视频交给我,你负责接单成交。<br />
|
||||
<el-divider></el-divider>
|
||||
我是{{this.form.name}},在{{this.form.city}}帮制造业拍短视频,每天为生活奔波,能为我点个赞吗。<br />
|
||||
<el-divider></el-divider>
|
||||
我是{{this.form.name}},在{{this.form.city}}做短视频运营,产品若是锦,服务就是花,合作才能锦上添花,赶紧行动起来吧。
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'APP',
|
||||
data() {
|
||||
return {
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
created() {
|
||||
this.form = JSON.parse(localStorage.getItem('form'))
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
Loading…
Reference in New Issue