wenan__demo

This commit is contained in:
wangtianlong 2024-06-28 15:17:56 +08:00
parent 0ee9365fe4
commit f5e11d5fec
13 changed files with 13076 additions and 1033 deletions

BIN
dist.zip Normal file

Binary file not shown.

11794
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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')

21
src/router/index.js Normal file
View File

@ -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

119
src/views/home.vue Normal file
View File

@ -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>

35
src/views/result.vue Normal file
View File

@ -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>

2056
yarn.lock

File diff suppressed because it is too large Load Diff