0 version

This commit is contained in:
Vion 2022-01-07 18:23:25 +08:00
parent fe641bb3c5
commit 802f98d8a5
7 changed files with 28900 additions and 0 deletions

69
rc-busness/README.md Normal file
View File

@ -0,0 +1,69 @@
# rc-busness
## Build Setup
```bash
# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
## Special Directories
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
### `assets`
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
### `components`
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
### `layouts`
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
### `pages`
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
### `plugins`
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
### `static`
This directory contains your static files. Each file inside this directory is mapped to `/`.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
### `store`
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).

BIN
rc-busness/assets/image/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,22 @@
// 乘法函数
const accMul = function (arg1, arg2) {
var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
try {
m += s1.split(".")[1].length;
}
catch (e) {
}
try {
m += s2.split(".")[1].length;
}
catch (e) {
}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
};
// 小数位数
const Dec = function(num,str){
return parseFloat(num).toFixed(str);
}
export { accMul, Dec}

89
rc-busness/nuxt.config.js Normal file
View File

@ -0,0 +1,89 @@
const rem = '!function(e){var t,n=document,i=window,o=n.documentElement;function u(){var t=o.getBoundingClientRect().width/e*100;o.style.fontSize=t+"px"}u(),i.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(u,300)},!1),i.addEventListener("pageshow",function(e){e.persisted&&(clearTimeout(t),t=setTimeout(u,300))},!1)}(750);';
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'rc-busness',
htmlAttrs: {
lang: 'en'
},
script: [
{ src: '/js/rem.js' },
// { src: '/js/flexible.js', type: 'text/javascript', charset: 'utf-8'},
{ src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' },
{ src: '"https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14054/index.js"' }
// { innerHTML: rem, type: 'text/javascript', charset: 'utf-8'}
],
__dangerouslyDisableSanitizers: ['script'],
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1,target-densitydpi =1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'vant/lib/index.css',
'element-ui/lib/theme-chalk/index.css',
{ src: "swiper/css/swiper.css" }
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'@/plugins/vant',
'@/plugins/ElementUI',
{ src: "~/plugins/swiper.js", ssr: false },
{ src: '@/plugins/localStorage', ssr: false }
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'@nuxtjs/axios',
['nuxt-tailvue', {toast: true}],
],
styleResources: {
less: '@/assets/style/less/default.less' // less文件路径
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
},
// axios: {
// proxy: true,
// // prefix: '/api/',
// credentials: true
// // See https://github.com/nuxt-community/axios-module#options
// },
// proxy: {
// '/api/': {
// target: 'http://47.96.75.242:10086/smart-admin-api',//这个网站是开源的可以请求到数据的
// pathRewrite: {
// '^/api/': '/',
// changeOrigin: true
// },
// }
// },
}

28673
rc-busness/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

39
rc-busness/package.json Normal file
View File

@ -0,0 +1,39 @@
{
"name": "rc-busness",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"config": {
"nuxt": {
"host": "192.168.10.108",
"port": "8080"
}
},
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@vant/touch-emulator": "^1.3.2",
"amfe-flexible": "^2.2.1",
"core-js": "^3.15.1",
"element-ui": "^2.15.6",
"ip": "^1.1.5",
"jquery": "^3.6.0",
"less": "^4.1.2",
"less-loader": "^6.0.0",
"nuxt": "^2.15.7",
"nuxt-tailvue": "^1.0.95",
"postcss-px2rem": "^0.3.0",
"qrcodejs2": "^0.0.2",
"vant": "^2.12.22",
"vue-awesome-swiper": "^4.1.1"
},
"devDependencies": {
"@vant/area-data": "^1.1.5",
"webpack": "^4.46.0"
}
}

View File

@ -0,0 +1,8 @@
module.exports = {
plugins: {
'postcss-pxtorem': {
rootValue: 192, //假设设计稿为1920
propList: ['*']
}
}
}