Commit 1b66c32e by liupt

m

parent a6264e81
...@@ -8,10 +8,5 @@ ...@@ -8,10 +8,5 @@
}], }],
"stage-2" "stage-2"
], ],
"plugins": ["transform-vue-jsx", "transform-runtime"], "plugins": ["transform-vue-jsx", "transform-runtime"]
"env": {
"test": {
"presets": ["env", "stage-2"]
}
}
} }
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
...@@ -4,9 +4,6 @@ node_modules/ ...@@ -4,9 +4,6 @@ node_modules/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
selenium-debug.log
# Editor directories and files # Editor directories and files
.idea .idea
......
# my-project # zhiyuanzhe
> my first vue project > A Vue.js project
## Build Setup ## Build Setup
...@@ -16,15 +16,6 @@ npm run build ...@@ -16,15 +16,6 @@ npm run build
# build for production and view the bundle analyzer report # build for production and view the bundle analyzer report
npm run build --report npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
``` ```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
...@@ -8,16 +8,7 @@ function resolve (dir) { ...@@ -8,16 +8,7 @@ function resolve (dir) {
return path.join(__dirname, '..', dir) return path.join(__dirname, '..', dir)
} }
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = { module.exports = {
context: path.resolve(__dirname, '../'), context: path.resolve(__dirname, '../'),
...@@ -40,7 +31,6 @@ module.exports = { ...@@ -40,7 +31,6 @@ module.exports = {
}, },
module: { module: {
rules: [ rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{ {
test: /\.vue$/, test: /\.vue$/,
loader: 'vue-loader', loader: 'vue-loader',
...@@ -88,5 +78,9 @@ module.exports = { ...@@ -88,5 +78,9 @@ module.exports = {
net: 'empty', net: 'empty',
tls: 'empty', tls: 'empty',
child_process: 'empty' child_process: 'empty'
},
externals: {
'BMap': 'BMap',
'AMap': 'AMap'
} }
} }
...@@ -11,9 +11,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin') ...@@ -11,9 +11,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = process.env.NODE_ENV === 'testing' const env = require('../config/prod.env')
? require('../config/test.env')
: require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, { const webpackConfig = merge(baseWebpackConfig, {
module: { module: {
...@@ -63,9 +61,7 @@ const webpackConfig = merge(baseWebpackConfig, { ...@@ -63,9 +61,7 @@ const webpackConfig = merge(baseWebpackConfig, {
// you can customize output by editing /index.html // you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin // see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
filename: process.env.NODE_ENV === 'testing' filename: config.build.index,
? 'index.html'
: config.build.index,
template: 'index.html', template: 'index.html',
inject: true, inject: true,
minify: { minify: {
......
...@@ -13,21 +13,14 @@ module.exports = { ...@@ -13,21 +13,14 @@ module.exports = {
proxyTable: {}, proxyTable: {},
// Various Dev Server settings // Various Dev Server settings
host: 'www.volunteer.test.console', // can be overwritten by process.env.HOST host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/** /**
* Source Maps * Source Maps
*/ */
......
'use strict'
const merge = require('webpack-merge')
const devEnv = require('./dev.env')
module.exports = merge(devEnv, {
NODE_ENV: '"testing"'
})
...@@ -2,8 +2,14 @@ ...@@ -2,8 +2,14 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>my-project</title> <!--<title>志愿者平台App</title>-->
<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
<!--高德地图-->
<!--<link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />-->
<link rel="stylesheet" href="./static/css/reset.css">
<script src="https://webapi.amap.com/maps?v=1.4.10&key=2fa9e2cfba15b57cdb8bfd448451be1b"></script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "my-project", "name": "zhiyuanzhe",
"version": "1.0.0", "version": "1.0.0",
"description": "my first vue project", "description": "A Vue.js project",
"author": "liupt <liupt@bbdtek.com>", "author": "zhangyy <zhangyy@bbdtek.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev", "start": "npm run dev",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"axios": "^0.18.0",
"mint-ui": "^2.2.13",
"vee-validate": "^2.1.3",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-router": "^3.0.1",
"vue-validator": "^3.0.0-alpha.2",
"vuex": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
...@@ -27,25 +28,13 @@ ...@@ -27,25 +28,13 @@
"babel-plugin-transform-vue-jsx": "^3.5.0", "babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0", "babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1", "chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1", "friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1", "html-webpack-plugin": "^2.30.1",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2", "node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0", "optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0", "ora": "^1.2.0",
...@@ -54,7 +43,6 @@ ...@@ -54,7 +43,6 @@
"postcss-loader": "^2.0.8", "postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1", "postcss-url": "^7.2.1",
"rimraf": "^2.6.0", "rimraf": "^2.6.0",
"selenium-server": "^3.0.1",
"semver": "^5.3.0", "semver": "^5.3.0",
"shelljs": "^0.7.6", "shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1", "uglifyjs-webpack-plugin": "^1.1.1",
......
<template> <template>
<div id="app"> <div id="app">
<img src="./assets/logo.png">
<router-view/> <router-view/>
</div> </div>
</template> </template>
<script> <script>
export default {
name: 'App' export default {
} name: 'App'
}
</script> </script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
text-decoration: none;
}
.mint-header{
color: #333;
background-color: #eee;
}
</style>
<template> <template>
<div class="hello"> <mt-button @click.native="handleClick">按钮</mt-button>
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
</div>
</template> </template>
<script> <script>
...@@ -12,6 +9,11 @@ export default { ...@@ -12,6 +9,11 @@ export default {
return { return {
msg: 'Welcome to Your Vue.js App' msg: 'Welcome to Your Vue.js App'
} }
},
methods:{
handleClick: function() {
this.$toast('Hello world!')
}
} }
} }
</script> </script>
......
<template>
<div class="bangdangtuan">
<mt-header title="团队榜单">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<ul class="volunteer">
<li v-for="(item,index) in sub3" :key="index" v-bind:class="{'volunteerblock':true,'active':index==1,'active2':index==2 }">
<div class="volunteerimg">
<img :src="item.imageUrl" alt="">
</div>
<p class="no">No.{{index+1}}</p>
<p>{{item.name}}</p>
<p>{{item.serviceHour}}H</p>
</li>
</ul>
<mt-cell v-for="(item,index) in sub4" :key="index" :title="item.name" :label="item.label">
<img slot="icon" :src="item.imageUrl" width="50" height="50">
<span>{{item.serviceHour}}H </span>
</mt-cell>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
Volunteer_lists:''
}
},
created(){
var _this=this;
axios({
method:'get',
url:_global.baseUrl+'/rank/getTeamRank'
}).then(res=>{
console.log(res.data.data);
_this.Volunteer_lists=res.data.data;
}).catch(function (error) {
console.log(error);
})
},
computed:{
sub3(){
return this.Volunteer_lists.slice(0,3);
},
sub4(){
return this.Volunteer_lists.slice(3);
}
}
}
</script>
<style scoped>
.volunteer{
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background-color: aliceblue;
}
.volunteerblock{
text-align: center;
}
.volunteerimg{
width: 1.4rem;
height: 1.4rem;
border-radius: 50%;
overflow: hidden;
border: 1px #cdcdcd dashed;
vertical-align: middle;
}
.volunteerimg img{
width: 100%;
height: auto;
}
.volunteerblock p{
line-height: 0.66rem;
color: #777;
font-size: 0.37rem;
}
.active{
padding-top: 0.5rem;
}
.active2{
padding-top: 1rem;
}
.volunteerblock .no{
font-weight: bold;
color: #c20202;
}
.mint-cell{
margin: 3px;
display: flex;
flex-direction: row;
justify-content: space-around;
text-align: left;
}
.mint-cell img{
margin-top: 5px;
border-radius: 50%;
text-align: left;
}
</style>
<template>
<div class="bangdanzhi">
<mt-header title="志愿者榜单">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<ul class="volunteer">
<li v-for="(item,index) in sub3" :key="index" v-bind:class="{'volunteerblock':true,'active':index==1,'active2':index==2 }">
<div class="volunteerimg">
<img :src="item.imageUrl" alt="">
</div>
<p class="no">No.{{index+1}}</p>
<p>{{item.name}}</p>
<p>{{item.serviceHour}}H</p>
</li>
</ul>
<mt-cell v-for="(item,index) in sub4" :key="index" :title="item.name" :label="item.label">
<img slot="icon" :src="item.imageUrl" width="50" height="50">
<span>{{item.serviceHour}}H </span>
</mt-cell>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
Volunteer_lists:''
}
},
created(){
var _this=this;
axios({
method:'get',
url:_global.baseUrl+'/rank/getMemberRank'
}).then(res=>{
console.log(res.data.data);
_this.Volunteer_lists=res.data.data;
}).catch(function (error) {
console.log(error);
})
},
computed:{
sub3(){
return this.Volunteer_lists.slice(0,3);
},
sub4(){
return this.Volunteer_lists.slice(3);
}
}
}
</script>
<style scoped>
.volunteer{
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background-color: aliceblue;
}
.volunteerblock{
text-align: center;
}
.volunteerimg{
width: 1.4rem;
height: 1.4rem;
border-radius: 50%;
overflow: hidden;
border: 1px #cdcdcd dashed;
vertical-align: middle;
}
.volunteerimg img{
width: 100%;
height: auto;
}
.volunteerblock p{
line-height: 0.66rem;
color: #777;
font-size: 0.37rem;
}
.active{
padding-top: 0.5rem;
}
.active2{
padding-top: 1rem;
}
.volunteerblock .no{
font-weight: bold;
color: #c20202;
}
.mint-cell{
margin: 3px;
display: flex;
flex-direction: row;
justify-content: space-around;
text-align: left;
}
.mint-cell img{
margin-top: 5px;
border-radius: 50%;
text-align: left;
}
</style>
<template>
<div class="choose">
<div class="btn">
<router-link to="/" type="primary" tag="mt-button" >
志愿者注册
</router-link>
<router-link to="/registerTuan" type="default" tag="mt-button">志愿团队注册</router-link>
</div>
</div>
</template>
<script>
export default {
name: "choose"
}
</script>
<style scoped>
.choose{
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
padding: 14px;
background-color:#f7fcfc;
position: absolute;
}
.btn{
display: flex;
flex-direction: column;
justify-content: center;
align-content:center;
margin-top:48%;
}
.btn .mint-button{
margin:24px;
}
</style>
<template>
<div class="">
</div>
</template>
<script>
export default {
name: 'HelloWorld',
data () {
return {
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
font-weight: normal;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
<script>
const baseUrl='http://volunteer-api-plus-volunteer-volunteer.apps.koalacloud.com';
export default
{
baseUrl
}
</script>
<template>
<div class="home">
<!--search-->
<!--<mt-search v-model="value" cancel-text="取消" placeholder="志愿团体/志愿活动/服务类型"></mt-search>-->
<!--轮播-->
<mt-swipe :auto="4000">
<mt-swipe-item><img src="../assets/imangs/banner1.png" alt=""></mt-swipe-item>
<mt-swipe-item><img src="../assets/imangs/banner2.png" alt=""></mt-swipe-item>
<mt-swipe-item><img src="../assets/imangs/banner3.png" alt=""></mt-swipe-item>
</mt-swipe>
<!---->
<ul class="types">
<li class="type-item" @click="findlists('huodong')">
<img src="../assets/icon/icon1.png" alt="">
<p class="text">志愿活动</p>
</li>
<li class="type-item" @click="findlists('tuandui')">
<img src="../assets/icon/icon2.png" alt="">
<p class="text">志愿团队</p>
</li>
<li class="type-item" @click="findlists('bangdanzhi')">
<img src="../assets/icon/icon3.png" alt="">
<p class="text">志愿者榜单</p>
</li>
<li class="type-item" @click="findlists('bangdangTuan')">
<img src="../assets/icon/icon4.png" alt="">
<p class="text">团队榜单</p>
</li>
</ul>
<!--资讯-->
<section class="hot-lists">
<p class="tab-title">热点资讯</p>
<ul class="online-wrap">
<li class="deal-item border-line" v-for="(item, index) in redhot" @click="xiangqing(item.id)">
<div class="good-detail">
<div class="good-title">{{item.title}}</div>
<div class="good-wrap">
<span> {{item.memberName}} </span>
<span> {{item.createTime}}</span>
</div>
</div>
<div class="good-img">
<img :src="item.address" alt="">
</div>
</li>
</ul>
</section>
<!--tabber-->
<tabbar></tabbar>
</div>
</template>
<script>
import _global from '@/components/global'
import tabbar from '@/components/tabbar.vue'
export default {
components: {
tabbar
},
data(){
return{
value:'',
redhot:[]
}
},
created(){
var _this=this;
axios({
method:'get',
url:_global.baseUrl+'/consultation/welcomeConsultation',
params:{type:'1'}
}).then(function (res) {
_this.redhot=res.data.data;
}).catch(function (error) {
console.log(error);
})
},
methods:{
findlists(name){
this.$router.push('/'+name)
},
xiangqing(id){
this.$router.push({path:"zixunxiangqing/"+id})
}
}
}
</script>
<style scoped>
.mint-search{
height: 60px;
}
.mint-swipe{
height: 220px;
}
.types{
display: -webkit-flex;
display: flex;;
flex-direction: row;
justify-content: space-between;
align-items: center;
align-content: center;
margin-top: .4275rem;
padding: 0 10px;
overflow: hidden;
}
.type-item{
margin-left: 0.2rem;
text-align: center;
}
.type-item img{
height: 1rem;
width :1rem;
}
.type-item .text{
margin-top: 0.2rem;
}
.hot-lists{
margin-top: 10px;
padding:0 12px;
background-color: #f6f6f6;
}
.tab-title{
text-align: left;
line-height: 40px;
width: 100%;
font-weight: bold;
}
.deal-item{
display: flex;
flex-direction: row;
justify-content: space-between;
position: relative;
padding: 4px 0;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
margin: -1px;
}
.good-detail{
width: 55%;
position: relative;
overflow: hidden;
text-align: left;
}
.good-title{
position: absolute;
top:0;
width: 100%;
height: 60px;
font-size: 0.3675rem;
line-height: 0.5rem;
}
.good-wrap{
position: absolute;
bottom: 0;
}
.good-img{
display: inline-block;
width: 1.6rem;
height: 1.6rem;
overflow: hidden;
}
.good-img img{
vertical-align: baseline;
width: 100%;
}
.online-wrap{
margin-bottom: 56px;
}
</style>
<template>
<div class="active">
<mt-header title="志愿活动">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<ul >
<li class="huodong" v-for="item in activelist" @click="xiangqing(item.id)">
<div class="huoodngblock">
<img :src="item.imgUrl" alt="">
</div>
<div class="huodongcontent">
<p>{{item.title}}</p>
<p>{{item.teamName}}</p>
<span>{{item.createdTime}}</span>
<p>计划招募 :{{item.fabulousNum}}</p>
</div>
</li>
</ul>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
activelist:''
}
},
created(){
var _this=this;
axios({
method:'post',
url:_global.baseUrl+'/activity/getActivityList',
params:{type:'1'}
}).then(res=> {
_this.activelist=res.data.data;
}).catch(error=> {
console.log(error);
})
},
methods:{
xiangqing(id){
this.$router.push({path:"huodongdetails/"+id})
}
}
}
</script>
<style scoped>
.huodong{
display: flex;
width: 100%;
flex-direction: row;
align-items: center;
padding: 4px 10px;
border-bottom: 1px solid #e6e6e6;
}
.huodong:active{
background-color: #f8f8f8;
}
.huoodngblock{
width: 1.6rem;
height: 1.6rem;
overflow: hidden;
border-radius: 50%;
}
.huoodngblock img{
width: 100%;
max-width:100%;
height: 100%;
}
.huodongcontent{
text-align: left;
padding-left: 14px;
}
.huodongcontent p{
line-height: 0.8rem;
}
.huodongcontent p:first-child{
font-weight: bold;
font-size: 0.36rem;
}
</style>
<template>
<div class="activedetails">
<mt-header title="活动详情">
<router-link to="/huodong" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<div class="hddheader">
<div class="hddheaderimg">
<img :src="activelist.imgUrl" alt="">
</div>
<div class="hddheadercon">
<p>{{activelist.title}}</p>
<p>{{activelist.teamName}}</p>
</div>
</div>
<div class="hdddetails">
<mt-cell title="活动地点" :value="activelist.address"></mt-cell>
<mt-cell title="活动日期" :value="activelist.beginTime"></mt-cell>
<mt-cell title="服务时间" :value="activelist.serviceTime"></mt-cell>
<mt-cell title="服务类别" :value="activelist.aimType"></mt-cell>
<mt-cell title="联系电话" :value="activelist.memberPhone"></mt-cell>
<mt-cell title="联系人" :value="activelist.memberName"></mt-cell>
</div>
<h3 class="tit">留言咨询</h3>
<div style="margin-bottom: 1.2rem;">
<div class="liuyan" v-for="item in liuyan">
<div class="liuyanimg">
<img :src="item.imgUrl" alt="">
</div>
<div class="liuyancontent">
<p>{{item.name}} <span>{{item.createTime}}</span></p>
<p>{{item.content}}</p>
<p v-for="liuer in item.commentReplyVOList">{{liuer.name}}<i class="huifu">回复</i>{{item.name}}:{{liuer.replyContent}} <span>{{liuer.createTime}}</span></p>
</div>
<mt-button type="primary" size="small" @click="huifu(item.id,item.name)">回复</mt-button>
</div>
</div>
<ul class="btn">
<li>
<mt-button type="primary" size="large" @click="liuyanac(activelist.id)">留言</mt-button>
</li>
<li>
<mt-button type="primary" size="large" @click="baoming(activelist.id)">我要报名</mt-button>
</li>
</ul>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
selected:'',
activelist:{},
liuyan:''
}
},
created(){
var _this=this
axios({
method:'post',
url:_global.baseUrl+'/activity/getActivityInfo',
params:{activityId:this.$route.params.id}
}).then(res=> {
_this.activelist=res.data.data;
}).catch(error=> {
console.log(error);
})
axios({
method:'post',
url:_global.baseUrl+'/activity/commentList',
params:{id:this.$route.params.id,type:1}
}).then(res=> {
_this.liuyan=res.data.data;
}).catch(error=> {
console.log(error);
})
},
methods:{
huifu(id,name){
this.$messagebox.prompt('请输入回复').then((value)=>{
if(value.action=='confirm'){
axios({
method:'post',
url:_global.baseUrl+'/comment/replyComment',
params:{
uuid:localStorage.getItem('uuid'),
username:localStorage.getItem('username'),
loginId:localStorage.getItem('loginId'),
loginType:localStorage.getItem('loginType'),
commentId:id,
content:value.value,
replyName:name
}
}).then(res=> {
if(res.data.code==200){
let _this=this
axios({
method:'post',
url:_global.baseUrl+'/activity/commentList',
params:{id:_this.$route.params.id,type:1}
}).then(res=> {
_this.liuyan=res.data.data;
}).catch(error=> {
console.log(error);
})
this.$messagebox.alert(res.data.message);
}else {
this.$messagebox.alert(res.data.message);
}
}).catch(error=> {
console.log(error);
})
}
});
},
liuyanac(id){
this.$messagebox.prompt('请输入回复').then((value)=> {
if (value.action == 'confirm') {
axios({
method: 'post',
url: _global.baseUrl + '/comment/addComment',
params: {
uuid: localStorage.getItem('uuid'),
username: localStorage.getItem('username'),
loginId: localStorage.getItem('loginId'),
loginType: localStorage.getItem('loginType'),
commentId: id,
content: value.value,
commentType:1
}
}).then(res=>{
if(res.data.code==200){
let _this=this
axios({
method:'post',
url:_global.baseUrl+'/activity/commentList',
params:{id:_this.$route.params.id,type:1}
}).then(res=> {
_this.liuyan=res.data.data;
}).catch(error=> {
console.log(error);
})
this.$messagebox.alert(res.data.message);
}else {
this.$messagebox.alert(res.data.message);
}
})
}
})
},
baoming(id){
axios({
method: 'post',
url: _global.baseUrl + '/afterActivity/enlistActivity',
params: {
uuid: localStorage.getItem('uuid'),
username: localStorage.getItem('username'),
loginId: localStorage.getItem('loginId'),
loginType: localStorage.getItem('loginType'),
activityId: id
}
}).then(res=>{
this.$messagebox.alert(res.data.message);
})
}
}
}
</script>
<style scoped>
.hddheader{
display: flex;
flex-direction: row;
align-items: center;
padding: 8px 10px;
/*border-bottom: 1px solid #dcdcdc;*/
}
.hddheaderimg{
width: 1.6rem;
height: 1.6rem;
overflow: hidden;
border-radius: 50%;
}
.hddheaderimg img{
width: 100%;
height: 100%;
}
.hddheadercon{
text-align: left;
margin-left: 16px;
}
.hddheadercon p{
line-height: 0.8rem;
font-size: 0.36rem;
}
.hddheadercon p:first-child{
font-weight: bold;
}
.mint-cell{
text-align: left;
}
.liuyan{
display: flex;
flex-direction: row;
/*justify-content: space-between;*/
border-bottom: 1px solid #dfdfdf;
padding: 8px;
}
.liuyanimg{
width: 1.2rem;
height: 1.2rem;
min-width:1.2rem;
min-height: 1.2rem;
overflow: hidden;
border-radius: 50%;
flex: 1;
}
.tit{
text-align: left;
padding-left: 10px;
height: 0.8rem;
font-size: 0.36rem;
background-color: aliceblue;
line-height: 0.8rem;
font-weight: bold;
}
.liuyanimg img{
width: 100%;
height: 100%;
}
.liuyancontent{
flex: 6;
text-align: left;
margin-left: 15px;
}
.liuyancontent p{
line-height: 0.54rem;
}
.liuyancontent p:first-child{
line-height: 0.8rem;
font-size: 0.38rem;
font-weight: bold;
}
.liuyancontent p span{
font-size: 0.36rem;
margin-left: 10px;
}
.mint-button{
flex: 1;
}
.huifu{
font-style: normal;
color: #1b96dc;
}
.mint-tabbar{
position: fixed;
bottom: -2px;
height: 1.2rem;
line-height: 1rem;
}
.mint-tab-item{
padding:16px 0;
}
.btn{
display: flex;
position: fixed;
bottom: 0;
left: 0;
background-color: #26a2ff;
width: 100%;
flex-direction: row;
}
.btn li{
width: 50%;
}
.mint-button{
font-size: 0.4rem;
}
</style>
<template>
<div class="login">
<mt-field placeholder="请输入用户名" v-model="userinfo.username"></mt-field>
<mt-field placeholder="请输入密码" v-model="userinfo.password" type="text"></mt-field>
<mt-button type="primary" size="large" @click="login">登录</mt-button>
<ul class="userlogin">
<li>
<a @click="register">我要注册</a>
</li>
<li>
<a @click="foget">忘记密码</a>
</li>
</ul>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
userinfo:{
username:'',
password:''
}
}
},
methods:{
login(){
if(this.userinfo.username==''){
this.$toast({
message: '用户名不能为空,请重新输入',
duration: 3000
})
}
if(this.userinfo.password==''){
this.$toast({
message: '密码不能为空,请重新输入',
duration: 3000
})
}
if(this.userinfo.username!=''||this.userinfo.password!=''){
let _this=this
axios({
method:'post',
url:_global.baseUrl+'/login/login',
params:{username:this.userinfo.username,password:this.userinfo.password}
}).then(function (res) {
// console.log(res.data.code);
if(res.data.code=='200'){
localStorage.setItem('loginId',res.data.data.loginId);
localStorage.setItem('loginName',res.data.data.loginName);
localStorage.setItem('loginType',res.data.data.loginType);
localStorage.setItem('uuid',res.data.data.uuid);
_this.$router.push('/');
}else{
_this.$toast({
message: res.data.message,
duration: 3000
})
}
}).catch(function (error) {
console.log(error);
})
}
},
register(){
this.$router.push('/register');
},
foget(){
// this.$router.push('/register');
}
}
}
</script>
<style scoped>
.login{
padding: 20px;
}
.userlogin{
display: flex;
flex-direction: row;
}
.userlogin li{
flex: 1;
line-height: 1rem;
}
.mint-cell{
background: none;
}
.mint-button{
margin-top: 1rem;
}
</style>
<template>
<div class="mp">
<mt-header title="我的名片">
<router-link to="/my" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<h1>二维码图片</h1>
</div>
</template>
<script>
export default {
name: "mingpian"
}
</script>
<style scoped>
</style>
<template>
<div class="my">
<!--个人设置-->
<div class="user-block">
<div class="user-login">
<div class="user-logo">
<img :src="userinfo.imgUrl" alt="">
</div>
<div class="operation">
<span class="signup">{{userinfo.memberInfo.username}}</span>
</div>
</div>
</div>
<ul class="user-info">
<li class="item"><span>{{userinfo.memberInfo.score}}</span><p>积分</p></li>
<li class="item"><span>{{userinfo.memberInfo.serviceHour}}</span><p>服务时长</p></li>
</ul>
<mt-cell title="我的志愿团队" to="/tuanduimy" is-link></mt-cell>
<mt-cell title="我的志愿活动" to="/myhuodong" is-link></mt-cell>
<mt-cell title="我的名片" to="/mingpian" is-link></mt-cell>
<tabbar></tabbar>
</div>
</template>
<script>
import _global from '@/components/global'
import tabbar from '@/components/tabbar.vue'
export default {
data(){
return{
userinfo:{}
}
},
components: {
tabbar
},
created(){
var _this=this;
axios({
method:'post',
url:_global.baseUrl+'/user/getMemberInfo',
params:{
uuid:localStorage.getItem('uuid'),
username:localStorage.getItem('loginName'),
loginId:localStorage.getItem('loginId'),
loginType:localStorage.getItem('loginType')
}
}).then(function (res) {
_this.userinfo=res.data.data;
}).catch(function (error) {
console.log(error);
})
}
}
</script>
<style scoped>
.user-block{
background-color: #f6f6f6;
padding: 8px;
overflow-x: hidden;
box-sizing: border-box;
}
.user-login{
display: flex;
flex-direction: row;
}
.user-logo{
overflow: hidden;
display: inline-block;
height: 1.8rem;
width: 1.8rem;
margin-left: 0.3rem;
border-radius: 50%;
border: 1px solid #ddd;
vertical-align: top;
}
.user-logo img{
height: 100%;
width: 100%;
border-radius: 70%;
}
.operation{
margin-left: 0.6rem;
}
.signup{
font-size: 0.5rem;
line-height: 2rem;
}
.user-info{
display: flex;
height: 1.8rem;
flex-direction: row;
text-align: center;
background-color: #f6f6f6;
font-size: 0.4rem;
}
.user-info .item{
flex: 1;
}
.user-info span{
line-height: 1rem;
}
.mint-cell{
text-align: left!important;
}
</style>
<template>
<div class="myhd">
<mt-header title="我的志愿活动">
<router-link to="/my" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<mt-navbar v-model="selected">
<mt-tab-item id="1">全部</mt-tab-item>
</mt-navbar>
<mt-tab-container v-model="selected">
<mt-tab-container-item id="1">
<mt-cell v-for="item in lists" :title="item.title" :label="item.beginTime"></mt-cell>
</mt-tab-container-item>
</mt-tab-container>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
selected:'1',
lists:[]
}
},
created(){
let _this=this
axios({
method:'post',
url:_global.baseUrl+'/user/myActivity',
params:{
uuid:localStorage.getItem('uuid'),
loginId:localStorage.getItem('loginId'),
loginType:localStorage.getItem('loginType')
}
}).then(res=>{
_this.lists=res.data.data;
console.log(res.data.data);
}).catch(error=>{
console.log(error);
})
}
}
</script>
<style scoped>
.mint-cell{
text-align: left;
}
</style>
<template>
<div class="qiandao">
<mt-header fixed title="签到">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<!--map-->
<div id="container"></div>
<mt-field label="活动编码" placeholder="请输入活动编码" v-model="coding"></mt-field>
<mt-button type="primary" size="small" @click="qiandao">我要签到</mt-button>
<mt-button type="default" size="small" @click="qiantui">我要签退</mt-button>
</div>
</template>
<script>
import AMap from 'AMap'
import _global from '@/components/global'
export default {
data(){
return{
position:{},
coding:''
}
},
mounted: function () {
this.init()
},
methods:{
init:function () {
let _this=this
let map = new AMap.Map('container', {
// center: [116.397428, 39.90923],
// resizeEnable: true,
// zoom: 5
})
AMap.plugin(['AMap.ToolBar'],
function () {
map.addControl(new AMap.ToolBar())
})
map.plugin(['AMap.Geolocation'], function () {
let geolocation = new AMap.Geolocation({
enableHighAccuracy: true, // 是否使用高精度定位,默认:true
timeout: 10000, // 超过10秒后停止定位,默认:无穷大
maximumAge: 0, // 定位结果缓存0毫秒,默认:0
convert: true, // 自动偏移坐标,偏移后的坐标为高德坐标,默认:true
showButton: true, // 显示定位按钮,默认:true
buttonPosition: 'LB', // 定位按钮停靠位置,默认:'LB',左下角
buttonOffset: new AMap.Pixel(10, 20), // 定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
showMarker: true, // 定位成功后在定位到的位置显示点标记,默认:true
showCircle: true, // 定位成功后用圆圈表示定位精度范围,默认:true
panToLocation: true, // 定位成功后将定位到的位置作为地图中心点,默认:true
zoomToAccuracy: true // 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
})
map.addControl(geolocation)
geolocation.getCurrentPosition(
function (status,result) {
console.log(result.position)
_this.position.latitude=result.position.lat
_this.position.longitude=result.position.lng
}
)
AMap.event.addListener(geolocation, 'complete',onComplete);//返回定位信息
AMap.event.addListener(geolocation, 'error', onError); //返回定位出错信息
})
},
qiandao(){
if(localStorage.getItem('uuid')==null){
this.$messagebox.alert('请先登录');
this.$router.push('/login')
return false
}else{
if(this.coding==''){
this.$messagebox.alert('请输入活动编码');
}
if(this.position=''){
this.$messagebox.alert('正在定位请稍等');
}
if(this.coding!='' || this.position!=''){
axios({
method:'post',
url:_global.baseUrl+'/member/signOut',
params:{memberId:localStorage.getItem('loginId'),activityNumber:this.coding,latitude:this.position.latitude,longitude:this.position.longitude}
}).then(res=>{
this.$messagebox.alert(res.data.message);
}).catch(error=>{
console.log(error)
})
}
}
},
qiantui(){
axios({
method:'post',
url:_global.baseUrl+'/member/signIn',
params:{memberId:localStorage.getItem('loginId'),activityNumber:this.coding,latitude:'39.920918',longitude:'116.426367'}
}).then(res=>{
this.$messagebox.alert(res.data.message);
}).catch(error=>{
console.log(error)
})
}
}
}
</script>
<style scoped>
#container{
width: 100%;
height: 8rem;
margin: 1rem 0;
}
.mint-cell{
margin: 20px 0;
}
</style>
<template>
<div class="register">
<mt-header title="志愿团队注册">
<router-link to="/choose" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<mt-field label="用户名" placeholder="请输入用户名" v-model="voluninfo.username"></mt-field>
<div class="mint-msgbox-errormsg" v-if="voluninfo.username==''">{{title}}</div>
<mt-field label="密码" placeholder="请输入密码" type="password" v-model="voluninfo.password" ></mt-field>
<!--<mt-field label="确认密码" placeholder="请再次输入密码" type="password" v-model="voluninfo.passwordagin"></mt-field>-->
<!--<div class="mint-msgbox-errormsg" v-if="voluninfo.password!=voluninfo.passwordagin ||voluninfo.passwordagin=='' ">{{tip1}}</div>-->
<mt-field label="邮箱" placeholder="请输入邮箱" type="email" v-model="voluninfo.email"></mt-field>
<mt-field label="真实姓名" placeholder="请输入真实姓名" v-model="voluninfo.relname"></mt-field>
<mt-field label="证件号码" placeholder="请输入证件号码" type="num" v-model="voluninfo.zjh"></mt-field>
<mt-radio title="性别" v-model="voluninfo.sex" :options="optionsex"></mt-radio>
<mt-field label="生日" placeholder="请输入生日" type="date" v-model="voluninfo.birthday"></mt-field>
<mt-radio title="政治面貌" v-model="voluninfo.mianm" :options="['党员','共青团员','群众']"></mt-radio>
<mt-field label="民族" placeholder="请输入民族" v-model="voluninfo.minzu"></mt-field>
<mt-field label="籍贯" placeholder="请输入籍贯" v-model="voluninfo.jiguan"></mt-field>
<mt-field label="手机号" placeholder="请输入手机号" type="num" v-model="voluninfo.tel"></mt-field>
<!--<mt-field label="详细地址" id="tipinput" placeholder="请输入详细地址" v-model="voluninfo.address" v-on:input="autoInput"></mt-field>-->
<div class="xiangxi">
<label>详细地址</label><input type="text" id="tipinput" placeholder="请输入详细地址" >
</div>
<p><span id="input-info"></span></p>
<h3 style="text-align: left;margin-left: 10px;font-size: 0.4rem;height: 0.4rem;margin-top: 7px;">请选择服务地区</h3>
<mt-picker :slots="datslist" value-key="name" @change="onValuesChange"></mt-picker>
<mt-radio title="最高学历" v-model="voluninfo.xueli" :options="['本科','专科','高中']"></mt-radio>
<mt-radio title="从业状况" v-model="voluninfo.congy" :options="['在职','无工作']"></mt-radio>
<mt-checklist title="服务类别" v-model="voluninfo.leibie" :options="optionsl"></mt-checklist>
<mt-checklist title="服务领域" v-model="voluninfo.lingy" :options="optionsy"></mt-checklist>
<mt-button type="primary" size="large" slot="icon" @click="tijiao()">立即注册</mt-button>
</div>
</template>
<script>
import AMap from 'AMap'
import _global from '@/components/global'
export default {
data() {
return {
opentips:[],
quyu:[],
title:'用户名不能为空',
voluninfo:{
leibie:[],
lingy:[],
sevicenation:'411',
sex:'',
longitude:'',
latitude:''
},
optionsex:[
{label: '男', value: '0'},
{label: '女', value: '1'}
],
optionsl: [
{label: '社区服务', value: '社区服务'},
{label: '文化教育', value: '文化教育'},
{label: '在线服务', value: '在线服务'},
{label: '赛会服务', value: '赛会服务'},
{label: '关爱服务', value: '关爱服务'}
],
optionsy:[
{label: '扶贫济困志愿者', value: '扶贫济困志愿者'},
{label: '青年志愿者', value: '青年志愿者'},
{label: '教育志愿者', value: '教育志愿者'},
{label: '助残志愿者', value: '助残志愿者'},
{label: '文化志愿者', value: '文化志愿者'},
{label: '文明志愿者', value: '文明志愿者'},
{label: '医疗志愿者', value: '医疗志愿者'},
{label: '社区志愿者', value: "社区志愿者"},
{label: '巾帼志愿者', value: "巾帼志愿者"},
{label: '红十字志愿者', value:"红十字志愿者"}
]
}
},
computed:{
datslist(){
let slots=[{flex: 1, values:this.quyu}]
return slots
}
},
created(){
let _this=this;
axios({
method:'post',
url:_global.baseUrl+'/area/getAreaInfo',
}).then(res=>{
_this.quyu=res.data.data
}).catch(error=>{
console.log(error)
})
},
mounted: function () {
this.init()
},
methods:{
// 获取输入提示信息
init:function () {
let _this=this;
AMap.plugin('AMap.Autocomplete', function() {
var autoOptions = {
city: "天津", //城市,默认全国
input:'tipinput'
};
let autocomplete = new AMap.Autocomplete(autoOptions);
AMap.event.addListener(autocomplete, "select", function(e) {
_this.voluninfo.longitude=e.poi.location.lng;
_this.voluninfo.latitude=e.poi.location.lat;
})
})
},
onValuesChange(picker,values){
this.voluninfo.sevicenation=values[0].id
},
tijiao(){
// console.log(this.voluninfo);
let _this=this;
axios({
method: 'post',
url:_global.baseUrl+'/login/register',
params:{
realName:_this.voluninfo.relname,
sex:_this.voluninfo.sex,
idCard:_this.voluninfo.zjh,
username:_this.voluninfo.username,
password:_this.voluninfo.username,
education:_this.voluninfo.xueli,
phone:_this.voluninfo.tel,
address:_this.voluninfo.address,
serviceType:_this.voluninfo.leibie.join(','),
email:_this.voluninfo.email,
birthday:_this.voluninfo.birthday,
country:'中国',
nativePlace:_this.voluninfo.jiguan,
jobStatus:_this.voluninfo.congy,
areaId:_this.voluninfo.sevicenation,
longitude:_this.voluninfo.longitude,
latitude:_this.voluninfo.latitude,
imgUrl:'',
political:_this.voluninfo.mianm,
nation:_this.voluninfo.minzu,
serviceScope:_this.voluninfo.lingy.join(','),
}
}).then(res=>{
if(res.data=='200'){
this.$messagebox.alert(res.data.message)
this.$route.push('')
}
}).catch(error=>{
console.log(error)
})
}
}
}
</script>
<style scoped>
.mint-cell{
text-align: left;
}
.mint-radiolist{
text-align: left;
}
.mint-radiolist-title{
color: #333;
font-size: 15px;
}
.mint-checklist{
text-align: left;
}
.xiangxi{
line-height: 1.4rem;
border-top: 1px solid #ddd;
margin-left: 10px;
text-align: left;
font-size: 0.4rem;
}
.xiangxi label{
width: 29%;
display: inline-block;
}
</style>
<template>
<div class="register">
<mt-header title="志愿团队注册">
<router-link to="/choose" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<mt-field label="用户名" placeholder="请输入用户名" v-model="teaminfo.username"></mt-field>
<div class="mint-msgbox-errormsg" v-if="teaminfo.username==''">{{title}}</div>
<mt-field label="密码" placeholder="请输入密码" type="password" v-model="teaminfo.password" ></mt-field>
<mt-field label="确认密码" placeholder="请再次输入密码" type="password" v-model="teaminfo.passwordagin"></mt-field>
<div class="mint-msgbox-errormsg" v-if="teaminfo.password!=teaminfo.passwordagin ||teaminfo.passwordagin=='' ">{{tip1}}</div>
<mt-field label="邮箱" placeholder="请输入邮箱" type="email" v-model="teaminfo.email"></mt-field>
<mt-field label="志愿团体名称" placeholder="请输入团体名称" v-model="teaminfo.nametuan"></mt-field>
<h3 style="text-align: left;margin-left: 10px;font-size: 0.4rem;height: 0.4rem;margin-top: 7px;">请选择主管单位类型</h3>
<mt-picker :slots="slots" @change="onValuesChange"></mt-picker>
<mt-field label="主管单位名称" placeholder="请输入单位名称" v-model="teaminfo.namezhu"></mt-field>
<div class="xiangxi">
<label>详细地址</label><input type="text" id="tipinput" placeholder="请输入详细地址" >
</div>
<!--<mt-field label="详细地址" placeholder="请输入详细地址" v-model="teaminfo.address"></mt-field>-->
<mt-field label="招募人数" placeholder="请输入招募人数" type="num" v-model="teaminfo.num" ></mt-field>
<mt-checklist title="服务类别" v-model="teaminfo.value1" :options="options"></mt-checklist>
<h3 style="text-align: left;margin-left: 10px;font-size: 0.4rem;height: 0.4rem;margin-top: 7px;">请选择服务地区</h3>
<mt-picker :slots="datslist" value-key="name" @change="onValuesChange1"></mt-picker>
<mt-field label="联系人姓名" placeholder="请输入联系人姓名" v-model="teaminfo.lname"></mt-field>
<mt-field label="联系人手机" placeholder="请输入联系人手机" v-model="teaminfo.lnum"></mt-field>
<mt-field label="联系人QQ" placeholder="请输入联系人QQ" type="num" v-model="teaminfo.lqq"></mt-field>
<mt-field label="负责人姓名" placeholder="请输入负责人姓名" v-model="teaminfo.fname"></mt-field>
<mt-field label="负责人身份证" placeholder="请输入负责人身份证" v-model="teaminfo.fshenfen"></mt-field>
<mt-field label="负责人手机" placeholder="请输入负责人手机" type="num" v-model="teaminfo.fnum"></mt-field>
<mt-button type="primary" size="large" slot="icon" @click="tijiao()">立即注册</mt-button>
</div>
</template>
<script>
import _global from '@/components/global'
import AMap from 'AMap'
export default {
data() {
return {
quyu:[],
dangz:[],
title:'用户名不能为空',
tip1: '两次密码不一致',
teaminfo:{
value1:[],
nation:'',
sevicenation:'411'
},
options : [
{label: '社区服务', value: '社区服务'},
{label: '文化教育', value: '文化教育'},
{label: '在线服务', value: '在线服务'},
{label: '赛会服务', value: '赛会服务'},
{label: '关爱服务', value: '关爱服务'}
],
slots: [
{flex: 1, values: ['党政机关','教育事业单位','卫生事业单位','科技事业单位','文化事业单位','社会福利事业单位','其他事业单位','群团组织','居委会或村委会','国有企业','非国有企业','其他'], className: 'slot1', textAlign: 'center'
}
]
}
},
computed:{
datslist(){
let slots2=[{flex: 1, values:this.quyu}]
return slots2
}
},
created(){
let _this=this;
axios({
method:'post',
url:_global.baseUrl+'/area/getAreaInfo',
}).then(res=>{
_this.quyu=res.data.data
}).catch(error=>{
console.log(error)
})
},
mounted:function(){
this.init()
},
methods:{
init:function () {
let _this=this;
AMap.plugin('AMap.Autocomplete', function() {
var autoOptions = {
city: "天津", //城市,默认全国
input:'tipinput'
};
let autocomplete = new AMap.Autocomplete(autoOptions);
AMap.event.addListener(autocomplete, "select", function(e) {
_this.teaminfo.longitude=e.poi.location.lng;
_this.teaminfo.latitude=e.poi.location.lat;
})
})
},
onValuesChange(picker,values){
this.teaminfo.nation=values[0]
},
onValuesChange1(picker,values){
this.teaminfo.sevicenation=values[0].id
},
tijiao(){
// console.log(this.teaminfo);
let _this=this;
axios({
method: 'post',
url:_global.baseUrl+'/team/register',
params:{
uuid:localStorage.getItem('uuid'),
memberId : localStorage.getItem('loginId'),
loginType : localStorage.getItem('loginType'),
username : _this.teaminfo.username,
password : _this.teaminfo.password,
mail : _this.teaminfo.email,
name : _this.teaminfo.nametuan,
description : '这是一个团队注册',
supervisorType: _this.teaminfo.nation,
supervisorName :_this.teaminfo.namezhu,
address : _this.teaminfo.address,
longitude:_this.voluninfo.longitude,
latitude:_this.voluninfo.latitude,
teamNum : _this.teaminfo.num,
serviceType:_this.teaminfo.value1.join(','),
areaId:_this.teaminfo.sevicenation,
linkName : _this.teaminfo.lname,
telPhone : _this.teaminfo.lnum,
personName : _this.teaminfo.fname,
linkQq: _this.teaminfo.lqq,
person_idcard : _this.teaminfo.fshenfen,
personPhone : _this.teaminfo.fnum,
imgUrl:''
}
}).then(res=>{
this.$messagebox.alert(res.data.message)
}).catch(error=>{
console.log(error)
})
}
}
}
</script>
<style scoped>
.mint-cell{
text-align: left;
}
.mint-radiolist{
text-align: left;
}
.mint-radiolist-title{
color: #333;
font-size: 15px;
}
.mint-checklist{
text-align: left;
}
.xiangxi{
line-height: 1.4rem;
border-top: 1px solid #ddd;
margin-left: 10px;
text-align: left;
font-size: 0.4rem;
}
.xiangxi label{
width: 29%;
display: inline-block;
}
</style>
<template>
<mt-tabbar v-model="selected" fixed>
<mt-tab-item id="首页">
<img slot="icon" :src="img1">
首页
</mt-tab-item>
<mt-tab-item id="签到" >
<img slot="icon" :src="img2">
签到
</mt-tab-item>
<mt-tab-item id="我的" >
<img slot="icon" :src="img3">
我的
</mt-tab-item>
</mt-tabbar>
</template>
<script>
export default {
data(){
return{
selected: '首页',
img1 :"static/icon/icon_sy2.png",
img2: "static/icon/icon_qd.png",
img3: "static/icon/icon_wd1.png"
}
},
computed: {
otherSelect () {
return this.$store.state.selectTab
}
},
watch:{
// 监听 是否从其他的页面跳转过来的数据
"otherSelect" () {
this.selected = this.$store.state.selectTab
},
'selected':{
handler (val,oldval) {
if (this.selected == "首页") {
this.$router.push('/')
this.img1="static/icon/icon_sy2.png"
} else {
this.img1="static/icon/icon_sy1.png"
}
if (this.selected == "签到") {
this.$router.push('/qiandao')
this.img2 = "static/icon/icon_qd.png"
}
if (this.selected == "我的") {
if(localStorage.getItem('uuid')==null){
this.$router.push('/login')
}else {
this.img3="static/icon/icon_wd2.png"
this.$router.push('/my')
}
}
}
}
},
}
</script>
<style scoped>
.mint-tab-item.is-selected{
color:#333;
text-decoration: none;
}
</style>
<template>
<div class="team">
<mt-header title="志愿团队">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<ul class="team-block">
<li class="team-list" v-for="item in teamLists" @click="getlist(item.teamId)">
<!--头像-->
<div class="team_touxiang" >
<img :src="item.image" alt="">
</div>
<!--内容-->
<div class="team-content">
<p class="team-title">{{item.name}}</p>
<span class="team-address">{{item.address}}</span>
<ul class="team-service">
<li >
<p style="font-weight: bold;text-overflow:ellipsis;">1235</p>
<p>服务时长</p>
</li>
<li >
<p style="font-weight: bold;text-overflow:ellipsis;">789</p>
<p>服务次数</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
teamLists:[],
}
},
created(){
var _this=this;
axios({
method:'post',
url:_global.baseUrl+'/team/getTeamList'
}).then(function (res) {
_this.teamLists=res.data.data;
console.log(res.data.data);
}).catch(function (error) {
console.log(error);
})
},
methods:{
getlist(id){
this.$router.push({path:"tuanduidetails/"+id})
}
}
}
</script>
<style scoped>
.team-block{
padding: 6px 12px;
}
.team-list{
display: flex;
padding: 12px 0;
flex-direction: row;
align-items: center;
border-bottom: 1px solid #ccc;
box-sizing: border-box;
}
.team_touxiang{
min-width: 1.68rem;
width: 1.68rem;
height: 1.68rem;
border: 1px solid #333;
border-radius: 50%;
overflow: hidden;
}
.team_touxiang img{
width: 100%;
height: 100%;
border-radius: 50%;
}
.team-content{
flex: 3.8;
text-align: left;
margin-left: 0.6rem;
width: 68%;
}
.team-title {
font-size: 0.4rem;
font-weight: bold;
}
.team-content p,span{
line-height: 0.6rem;
}
.team-address{
color: #888;
width: 100%;
display: inline-block;
height: 0.6rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.team-service{
text-align: center;
display: flex;
flex: 1;
line-height: 0.8rem;
justify-content: space-around;
flex-direction: row;
}
</style>
<template>
<div class="tuanduidetail">
<mt-header title="团队详情">
<router-link to="/tuandui" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<ul class="detailheader">
<!--头像-->
<li class="detailtouxiang">
<img :src="details.imgUrl" alt="">
</li>
<!--详情-->
<li class="detailcontent">
<p class="title">{{details.teamName}}</p>
<p>{{details.memberNum}}</p>
<p>时长 {{details.time}}</p>
<p>次数 {{details.time}}</p>
</li>
</ul>
<mt-navbar v-model="selected">
<mt-tab-item id="1">组织介绍</mt-tab-item>
<mt-tab-item id="2">团队活动</mt-tab-item>
</mt-navbar>
<!-- tab-container -->
<mt-tab-container v-model="selected">
<mt-tab-container-item id="1">
<mt-cell title="区域" :value="details.areaName"></mt-cell>
<mt-cell title="成立日期" :value="details.createTime"></mt-cell>
<mt-cell title="人员规模" :value="details.memberNum"></mt-cell>
<mt-cell title="详细地址" :value="details.address"></mt-cell>
</mt-tab-container-item>
<mt-tab-container-item id="2">
<mt-cell v-for="item in tuanduiactives" :title="item.title" :label="item.beginTime" :value="item.status"></mt-cell>
</mt-tab-container-item>
</mt-tab-container>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
selected:'1',
details:{},
tuanduiactives:[]
}
},
created(){
let _this=this
axios({
method:'post',
url: _global.baseUrl+'/team/teamDetail',
params:{teamId:this.$route.params.id}
}).then(res=>{
_this.details=res.data.data.teamDetail
_this.tuanduiactives=res.data.data.activityList
console.log(res.data.data);
}).catch(error=>{
console.log(error)
})
},
}
</script>
<style scoped>
.tuanduidetail{
overflow: hidden;
}
.detailheader{
display: flex;
padding: 10px;
align-items: center;
background-color: aliceblue;
}
.detailtouxiang{
min-width: 1.68rem;
width: 1.68rem;
height: 1.68rem;
border: 1px solid #333;
border-radius: 50%;
overflow: hidden;
}
.detailtouxiang img{
width: 100%;
height: 100%;
}
.title{
font-size: 0.4rem;
font-weight: bold;
}
.detailcontent{
margin-left: 0.6rem;
line-height:0.6rem;
text-align: left;
}
.mint-cell{
text-align: left;
}
</style>
<template>
<div class="mytuan">
<mt-header title="我的志愿团队">
<router-link to="/my" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<mt-navbar v-model="selected">
<mt-tab-item id="1">全部</mt-tab-item>
</mt-navbar>
<!-- tab-container -->
<mt-tab-container v-model="selected">
<mt-tab-container-item id="1">
<mt-cell v-for="item in lists" :title="item.teamName" :label="item.joinTime"></mt-cell>
</mt-tab-container-item>
</mt-tab-container>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
selected:'1',
lists:[]
}
},
created(){
let _this=this
axios({
method:'post',
url:_global.baseUrl+'/user/getMyTeamInfo',
params:{
uuid:localStorage.getItem('uuid'),
loginId:localStorage.getItem('loginId'),
loginType:localStorage.getItem('loginType')
}
}).then(res=>{
_this.lists=res.data.data.teamList;
console.log(res.data.data.teamList);
}).catch(error=>{
console.log(error);
})
}
}
</script>
<style scoped>
.mint-cell
{
text-align: left;
}
</style>
<template>
<div class="zixun">
<mt-header title="资讯详情">
<router-link to="/" slot="left">
<mt-button icon="back"></mt-button>
</router-link>
</mt-header>
<!--内容部分-->
<div class="zxcontent">
<p class="zxtitle">{{constent.title}}</p>
<p class="zxtiem">{{constent.updateTime}}</p>
<div class="content">
<p>{{constent.desc}}</p>
</div>
</div>
</div>
</template>
<script>
import _global from '@/components/global'
export default {
data(){
return{
constent:{}
}
},
created(){
let _this=this;
axios({
method:'get',
url:_global.baseUrl+'/consultation/consultationInfo',
params:{id:this.$route.params.id}
}).then(function (res) {
_this.constent=res.data.data;
// console.log(res.data.data);
}).catch(function (error) {
console.log(error);
})
},
}
</script>
<style scoped>
.zxcontent{
padding: 12px;
font-size: 0.34rem;
}
.zxtitle{
line-height: 0.8rem;
text-align: left;
font-size: 0.38rem;
font-weight: bold;
background-color: aliceblue;
}
.zxtiem{
color: #999;
margin-top: 5px;
}
.content{
margin-top: 12px;
text-align: left;
}
.content p{
line-height: 0.72rem;
}
</style>
import ajaxHttp from '@/http/http'
//接口
export const goodsList = data => ajaxHttp('/goods/list',data,'POST') // 商品列表
export const goodsDetails = data => ajaxHttp('/goods/selectOne', data, 'POST') // 商品详情
export const addOrder = data => ajaxHttp('/order/addOrder', data, 'POST') // 下单接口
export const orderStauts = data => ajaxHttp('/order/queryOrder', data, 'POST') // 下单接口
import axios from 'axios'
axios.defaults.withCredentials = true
// 配置接口路径
const http = axios.create({
// baseURL: 'https://ecocitytourism.bbdtek.com',
// baseURL: 'http://',
headers: { 'Content-Type': 'application/json' }
})
// 公共请求配置
export default async (url, data, type = 'GET') => {
if (type === 'GET') {
const res = http.get(url, { params: data })
return res
} else if (type === 'POST') {
const res = http.post(url, data)
return res
}
}
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import Vue from 'vue'
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
import App from './App' import App from './App'
import router from './router' import router from './router'
import store from './store/index.js'
import axios from 'axios'
axios.defaults.withCredentials = true //允许跨域
global.axios = axios //设置为全局引用
Vue.use(Mint);
Vue.config.productionTip = false Vue.config.productionTip = false
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
el: '#app', el: '#app',
router, router,
store,
components: { App }, components: { App },
template: '<App/>' template: '<App/>'
}) })
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld' import home from '@/components/home'
import qiandao from '@/components/qiandao'
import my from '@/components/my'
import huodong from '@/components/huodong'
import huodongdetails from '@/components/huodongdetails'
import tuandui from '@/components/tuandui'
import bangdangTuan from '@/components/bangdangTuan'
import bangdanzhi from '@/components/bangdanzhi'
import tuanduidetails from '@/components/tuanduidetails'
import choose from '@/components/choose'
import registerTuan from '@/components/registerTuan'
import register from '@/components/register'
import login from '@/components/login'
import zixunxiangqing from '@/components/zixunxiangqing'
import tuanduimy from '@/components/tuanduimy'
import mingpian from '@/components/mingpian'
import myhuodong from '@/components/myhuodong'
//懒路由加载
Vue.use(Router) Vue.use(Router)
...@@ -8,8 +26,93 @@ export default new Router({ ...@@ -8,8 +26,93 @@ export default new Router({
routes: [ routes: [
{ {
path: '/', path: '/',
name: 'HelloWorld', name: 'home',
component: HelloWorld component: home
},
{
path: '/qiandao',
name: 'qiandao',
component: qiandao
},
{
path: '/my',
name: 'my',
component: my
},
{
path: '/huodong',
name: 'huodong',
component: huodong
},
{
path: '/huodongdetails/:id',
name: 'huodongdetails',
component: huodongdetails
},
{
path: '/tuandui',
name: 'tuandui',
component: tuandui
},
{
path: '/bangdangTuan',
name: 'bangdangTuan',
component: bangdangTuan
},
{
path: '/bangdanzhi',
name: 'bangdanzhi',
component: bangdanzhi
},
{
path: '/tuanduidetails/:id',
name: 'tuanduidetails',
component: tuanduidetails
},
{
path: '/choose',
name: 'choose',
component: choose
},
{
path: '/registerTuan',
name: 'registerTuan',
component: registerTuan
},
{
path: '/register',
name: 'register',
component: register
},
{
path: '/login',
name: 'login',
component: login
},
{
path: '/huodong',
name: 'huodong',
component: huodong
},
{
path: '/zixunxiangqing/:id',
name: 'zixunxiangqing',
component: zixunxiangqing
},
{
path: '/tuanduimy',
name: 'tuanduimy',
component: tuanduimy
},
{
path: '/myhuodong',
name: 'myhuodong',
component: myhuodong
},
{
path: '/mingpian',
name: 'mingpian',
component: mingpian
} }
] ]
}) })
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const state={
selectTab: '首页'
}
export default new Vuex.Store({
state
})
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/
)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* custom */
a {
color: #7e8c8d;
text-decoration: none;
-webkit-backface-visibility: hidden;
}
li {
list-style: none;
}
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
height: 5px;
background-color: rgba(125, 125, 125, 0.7);
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:horizontal {
width: 5px;
background-color: rgba(125, 125, 125, 0.7);
-webkit-border-radius: 6px;
}
html, body {
width: 100%;
}
body {
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
import Vue from 'vue'
import VeeValidate, {Validator} from 'vee-validate'
import zh from 'vee-validate/dist/locale/zh_CN';//引入中文文件
// 配置中文
Validator.addLocale(zh);
const config = {
locale: 'zh_CN'
};
Vue.use(VeeValidate,config);
// 自定义validate
const dictionary = {
zh_CN: {
messages: {
email: () => '请输入正确的邮箱格式',
required: ( field )=> "请输入" + field
},
attributes:{
email:'邮箱',
password:'密码',
name: '账号',
phone: '手机'
}
}
};
Validator.updateDictionary(dictionary);
Validator.extend('phone', {
messages: {
zh_CN:field => field + '必须是11位手机号码',
},
validate: value => {
return value.length == 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/.test(value)
}
});
// A custom Nightwatch assertion.
// The assertion name is the filename.
// Example usage:
//
// browser.assert.elementCount(selector, count)
//
// For more information on custom assertions see:
// http://nightwatchjs.org/guide#writing-custom-assertions
exports.assertion = function (selector, count) {
this.message = 'Testing if element <' + selector + '> has count: ' + count
this.expected = count
this.pass = function (val) {
return val === this.expected
}
this.value = function (res) {
return res.value
}
this.command = function (cb) {
var self = this
return this.api.execute(function (selector) {
return document.querySelectorAll(selector).length
}, [selector], function (res) {
cb.call(self, res)
})
}
}
require('babel-register')
var config = require('../../config')
// http://nightwatchjs.org/gettingstarted#settings-file
module.exports = {
src_folders: ['test/e2e/specs'],
output_folder: 'test/e2e/reports',
custom_assertions_path: ['test/e2e/custom-assertions'],
selenium: {
start_process: true,
server_path: require('selenium-server').path,
host: '127.0.0.1',
port: 4444,
cli_args: {
'webdriver.chrome.driver': require('chromedriver').path
}
},
test_settings: {
default: {
selenium_port: 4444,
selenium_host: 'localhost',
silent: true,
globals: {
devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port)
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
}
}
}
// 1. start the dev server using production config
process.env.NODE_ENV = 'testing'
const webpack = require('webpack')
const DevServer = require('webpack-dev-server')
const webpackConfig = require('../../build/webpack.prod.conf')
const devConfigPromise = require('../../build/webpack.dev.conf')
let server
devConfigPromise.then(devConfig => {
const devServerOptions = devConfig.devServer
const compiler = webpack(webpackConfig)
server = new DevServer(compiler, devServerOptions)
const port = devServerOptions.port
const host = devServerOptions.host
return server.listen(port, host)
})
.then(() => {
// 2. run the nightwatch test suite against it
// to run in additional browsers:
// 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings"
// 2. add it to the --env flag below
// or override the environment flag, for example: `npm run e2e -- --env chrome,firefox`
// For more information on Nightwatch's config file, see
// http://nightwatchjs.org/guide#settings-file
let opts = process.argv.slice(2)
if (opts.indexOf('--config') === -1) {
opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js'])
}
if (opts.indexOf('--env') === -1) {
opts = opts.concat(['--env', 'chrome'])
}
const spawn = require('cross-spawn')
const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' })
runner.on('exit', function (code) {
server.close()
process.exit(code)
})
runner.on('error', function (err) {
server.close()
throw err
})
})
// For authoring Nightwatch tests, see
// http://nightwatchjs.org/guide#usage
module.exports = {
'default e2e tests': function (browser) {
// automatically uses dev Server port from /config.index.js
// default: http://localhost:8080
// see nightwatch.conf.js
const devServer = browser.globals.devServerURL
browser
.url(devServer)
.waitForElementVisible('#app', 5000)
.assert.elementPresent('.hello')
.assert.containsText('h1', 'Welcome to Your Vue.js App')
.assert.elementCount('img', 1)
.end()
}
}
{
"env": {
},
"globals": {
}
}
import Vue from 'vue'
import HelloWorld from '@/components/HelloWorld'
describe('HelloWorld.vue', () => {
it('should render correct contents', () => {
const Constructor = Vue.extend(HelloWorld)
const vm = new Constructor().$mount()
expect(vm.$el.querySelector('.hello h1').textContent)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment