1、app下面栏怎么弄得
app.vue
<template> <div id="app"> <router-view /> <div style=" position:fixed;bottom:0;100%;"> <van-row class="user-links" > <van-col span="8"> <router-link to='list'> 首页 </router-link> </van-col> <van-col span="8"> <router-link to='add'> 发文 </router-link> </van-col> <van-col span="8"> <router-link v-if="!$store.state.logined" to='login'> 未登陆 </router-link> <router-link v-if="$store.state.logined" to='user'> 用户 </router-link> </van-col> </van-row> </div> </div> </template> <script> </script> <style> body { font-size: 16px; background-color: #f8f8f8; -webkit-font-smoothing: antialiased; } </style>
2、Cannot find module './model/mysqlApi'
let mysql = require('mysql'); let db_config={ //Options host:'10.**', port:'**', user:'**', password:'**', database:'test' } const pool = mysql.createPool(db_config) let query = function( sql, values ) { return new Promise(( resolve, reject )=> { pool.getConnection(function(err, connection) { if(err) { reject( err ) } else { connection.query(sql, values, ( err, rows) => { if ( err ) { reject( err ) } else { resolve( rows ) } connection.release() }) } }) }) } exports.query = query