@@ -0,0 +1,6 @@ | |||
VUE_APP_MODE=development | |||
VUE_APP_SERVER=http://49.232.159.78:9999 | |||
URL1=https://xingao.quhouse.com-----星奥正式 | |||
url2=https://mtest.quhouse.com | |||
url3=https://bj.chinawang.com | |||
url5=http://49.232.159.78:9999---测试 |
@@ -0,0 +1,7 @@ | |||
VUE_APP_MODE=production | |||
VUE_APP_SERVER=https://xingao.quhouse.com | |||
URL1=https://xiao.chinawang.com | |||
URL2=https://xingao.quhouse.com | |||
url3=https://bj.chinawang.com | |||
url4=http://49.232.159.78:9999 | |||
url5=https://chh.quhouse.com |
@@ -0,0 +1,2 @@ | |||
VUE_APP_MODE=test | |||
VUE_APP_SERVER=https://mtest.quhouse.com |
@@ -0,0 +1,23 @@ | |||
.DS_Store | |||
node_modules/ | |||
unpackage/ | |||
dist/ | |||
# local env files | |||
.env.local | |||
.env.*.local | |||
*.map | |||
# Log files | |||
npm-debug.log* | |||
yarn-debug.log* | |||
yarn-error.log* | |||
# Editor directories and files | |||
.project | |||
.idea | |||
.vscode | |||
*.suo | |||
*.ntvs* | |||
*.njsproj | |||
*.sln | |||
*.sw* |
@@ -0,0 +1,16 @@ | |||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ | |||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 | |||
"version": "0.0", | |||
"configurations": [{ | |||
"default" : | |||
{ | |||
"launchtype" : "local" | |||
}, | |||
"mp-weixin" : | |||
{ | |||
"launchtype" : "local" | |||
}, | |||
"type" : "uniCloud" | |||
} | |||
] | |||
} |
@@ -0,0 +1,19 @@ | |||
# mini-app | |||
## Project setup | |||
``` | |||
npm install | |||
``` | |||
### Compiles and hot-reloads for development | |||
``` | |||
npm run serve | |||
``` | |||
### Compiles and minifies for production | |||
``` | |||
npm run build | |||
``` | |||
### Customize configuration | |||
See [Configuration Reference](https://cli.vuejs.org/config/). |
@@ -0,0 +1,63 @@ | |||
const plugins = [] | |||
if (process.env.UNI_OPT_TREESHAKINGNG) { | |||
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js')) | |||
} | |||
if ( | |||
( | |||
process.env.UNI_PLATFORM === 'app-plus' && | |||
process.env.UNI_USING_V8 | |||
) || | |||
( | |||
process.env.UNI_PLATFORM === 'h5' && | |||
process.env.UNI_H5_BROWSER === 'builtin' | |||
) | |||
) { | |||
const path = require('path') | |||
const isWin = /^win/.test(process.platform) | |||
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path) | |||
const input = normalizePath(process.env.UNI_INPUT_DIR) | |||
try { | |||
plugins.push([ | |||
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'), | |||
{ | |||
file (file) { | |||
file = normalizePath(file) | |||
if (file.indexOf(input) === 0) { | |||
return path.relative(input, file) | |||
} | |||
return false | |||
} | |||
} | |||
]) | |||
} catch (e) {} | |||
} | |||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui'] | |||
process.UNI_LIBRARIES.forEach(libraryName => { | |||
plugins.push([ | |||
'import', | |||
{ | |||
'libraryName': libraryName, | |||
'customName': (name) => { | |||
return `${libraryName}/lib/${name}/${name}` | |||
} | |||
} | |||
]) | |||
}) | |||
module.exports = { | |||
presets: [ | |||
[ | |||
'@vue/app', | |||
{ | |||
modules: 'commonjs', | |||
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry' | |||
} | |||
] | |||
], | |||
plugins | |||
} |
@@ -0,0 +1,97 @@ | |||
{ | |||
"name": "mini-app-B", | |||
"version": "0.1.0", | |||
"private": true, | |||
"scripts": { | |||
"serve": "npm run dev:h5", | |||
"build": "npm run build:h5", | |||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", | |||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom", | |||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build", | |||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build", | |||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build", | |||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build", | |||
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build", | |||
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build", | |||
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build", | |||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build", | |||
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build", | |||
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build", | |||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build", | |||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build", | |||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch", | |||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom", | |||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve", | |||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch", | |||
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch", | |||
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch", | |||
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch", | |||
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch", | |||
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch", | |||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch", | |||
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch", | |||
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch", | |||
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch", | |||
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch", | |||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js", | |||
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js", | |||
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i", | |||
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i", | |||
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i", | |||
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i", | |||
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i" | |||
}, | |||
"dependencies": { | |||
"@dcloudio/uni-app-plus": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-h5": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-helper-json": "*", | |||
"@dcloudio/uni-mp-360": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-alipay": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-baidu": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-qq": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-toutiao": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-vue": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-mp-weixin": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-quickapp-native": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-quickapp-webview": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-stat": "^2.0.0-28920200927001", | |||
"@vue/shared": "^3.0.0-rc.4", | |||
"core-js": "^3.6.5", | |||
"crypto-js": "^4.0.0", | |||
"flyio": "^0.6.2", | |||
"regenerator-runtime": "^0.12.1", | |||
"uview-ui": "^1.7.3", | |||
"vue": "^2.6.11", | |||
"vuex": "^3.2.0" | |||
}, | |||
"devDependencies": { | |||
"@dcloudio/types": "*", | |||
"@dcloudio/uni-automator": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-cli-shared": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-migration": "^2.0.0-28920200927001", | |||
"@dcloudio/uni-template-compiler": "^2.0.0-28920200927001", | |||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-28920200927001", | |||
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-28920200927001", | |||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-28920200927001", | |||
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-28920200927001", | |||
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-28920200927001", | |||
"@vue/cli-plugin-babel": "~4.5.0", | |||
"@vue/cli-service": "~4.5.0", | |||
"babel-plugin-import": "^1.11.0", | |||
"cross-env": "^7.0.2", | |||
"jest": "^25.4.0", | |||
"mini-types": "*", | |||
"miniprogram-api-typings": "*", | |||
"node-sass": "^4.14.1", | |||
"postcss-comment": "^2.0.0", | |||
"sass-loader": "^10.0.3", | |||
"vue-template-compiler": "^2.6.11" | |||
}, | |||
"browserslist": [ | |||
"Android >= 4", | |||
"ios >= 8" | |||
], | |||
"uni-app": { | |||
"scripts": {} | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
const path = require('path') | |||
module.exports = { | |||
parser: require('postcss-comment'), | |||
plugins: [ | |||
require('postcss-import')({ | |||
resolve (id, basedir, importOptions) { | |||
if (id.startsWith('~@/')) { | |||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3)) | |||
} else if (id.startsWith('@/')) { | |||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2)) | |||
} else if (id.startsWith('/') && !id.startsWith('//')) { | |||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1)) | |||
} | |||
return id | |||
} | |||
}), | |||
require('autoprefixer')({ | |||
remove: process.env.UNI_PLATFORM !== 'h5' | |||
}), | |||
require('@dcloudio/vue-cli-plugin-uni/packages/postcss') | |||
] | |||
} |
@@ -0,0 +1,28 @@ | |||
<!DOCTYPE html> | |||
<html lang="zh-CN"> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||
<title> | |||
<%= htmlWebpackPlugin.options.title %> | |||
</title> | |||
<script> | |||
document.addEventListener('DOMContentLoaded', function() { | |||
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' | |||
}) | |||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) | |||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />') | |||
</script> | |||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" /> | |||
</head> | |||
<body> | |||
<noscript> | |||
<strong>Please enable JavaScript to continue.</strong> | |||
</noscript> | |||
<div id="app"></div> | |||
<!-- built files will be auto injected --> | |||
</body> | |||
</html> |
@@ -0,0 +1,22 @@ | |||
<script> | |||
export default { | |||
onLaunch: function() { | |||
console.log('App Launch') | |||
}, | |||
onShow: function() { | |||
console.log('App Show') | |||
}, | |||
methods: { | |||
}, | |||
onHide: function() { | |||
console.log('App Hide') | |||
} | |||
} | |||
</script> | |||
<style lang="scss"> | |||
@import "uview-ui/index.scss"; | |||
@import "common/common.scss"; | |||
/*每个页面公共css */ | |||
</style> |
@@ -0,0 +1,38 @@ | |||
// const CryptoJS = require('crypto-js'); //引用AES源码js | |||
// // const key = 'pigxpigxpigxpigx'; //十六位十六进制数作为密钥 | |||
// const key = CryptoJS.enc.Utf8.parse("pigxpigxpigxpigx"); //十六位十六进制数作为密钥 | |||
// const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234123412'); //十六位十六进制数作为密钥偏移量 | |||
// //解密方法 | |||
// function decrypt(word) { | |||
// let encryptedHexStr = CryptoJS.enc.Hex.parse(word); | |||
// let srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr); | |||
// let decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); | |||
// let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); | |||
// return decryptedStr.toString(); | |||
// } | |||
// //加密方法 | |||
// function encrypt(word) { | |||
// let srcs = CryptoJS.enc.Utf8.parse(word); | |||
// let encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); | |||
// return encrypted.ciphertext.toString().toUpperCase(); | |||
// } | |||
// export default { | |||
// decrypt, | |||
// encrypt | |||
// } | |||
import CryptoJS from 'crypto-js' | |||
/** | |||
* @word 要加密的内容 | |||
* @keyWord String 服务器随机返回的关键字 | |||
* */ | |||
export function aesEncrypt(word, keyWord = "XwKsGlMcdPMEhR1B") { | |||
var key = CryptoJS.enc.Utf8.parse(keyWord); | |||
var srcs = CryptoJS.enc.Utf8.parse(word); | |||
var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }); | |||
return encrypted.toString(); | |||
} |
@@ -0,0 +1,55 @@ | |||
export default class Drawer { | |||
constructor(options) { | |||
this.ctx = options.ctx | |||
this.canvas = options.canvas | |||
this.beforeDraw = [] | |||
this.finishDraw = [] | |||
this.tempList = [] | |||
this.drawList = [] | |||
} | |||
before (cb) { | |||
this.beforeDraw.push(cb) | |||
return this | |||
} | |||
draw (cb) { | |||
if (cb && typeof cb === 'function') { | |||
this.tempList.push((data) => { | |||
return new Promise((resolve) => { | |||
cb(resolve, data) | |||
}) | |||
}) | |||
this.drawList.push((data) => { | |||
return new Promise((resolve) => { | |||
cb(resolve, data) | |||
}) | |||
}) | |||
} | |||
return this | |||
} | |||
finished (cb) { | |||
this.finishDraw.push(cb) | |||
return this | |||
} | |||
async exec () { | |||
const draw = async (drawList) => { | |||
let tempResult = {} | |||
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); | |||
while (drawList.length) { | |||
const curCb = drawList.shift() | |||
tempResult = await curCb(tempResult) | |||
} | |||
} | |||
await draw(this.tempList) | |||
this.beforeDraw.forEach(item => { | |||
item() | |||
}) | |||
await draw(this.drawList) | |||
setTimeout(() => { | |||
this.finishDraw.forEach(item => { | |||
item() | |||
}) | |||
}, 0) | |||
} | |||
} |
@@ -0,0 +1,352 @@ | |||
/* #ifndef APP-NVUE */ | |||
view, | |||
text { | |||
box-sizing: border-box; | |||
} | |||
/* #endif */ | |||
@import "@/common/scss.scss"; | |||
body { | |||
background: $bg-color; | |||
width: 100%; | |||
overflow-x: hidden; | |||
} | |||
// 省略号 | |||
.linclamp { | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
letter-spacing: 1rpx; | |||
} | |||
.linclamp2 { | |||
overflow: hidden; | |||
text-overflow: -o-ellipsis-lastline; | |||
text-overflow: ellipsis; | |||
display: -webkit-box; | |||
-webkit-line-clamp: 2; | |||
line-clamp: 2; | |||
-webkit-box-orient: vertical; | |||
letter-spacing: 1rpx; | |||
} | |||
.linclamp3 { | |||
overflow: hidden; | |||
text-overflow: -o-ellipsis-lastline; | |||
text-overflow: ellipsis; | |||
display: -webkit-box; | |||
-webkit-line-clamp: 3; | |||
line-clamp: 3; | |||
-webkit-box-orient: vertical; | |||
letter-spacing: 1rpx; | |||
} | |||
// 右箭头 | |||
.arrorRight { | |||
display: inline-block; | |||
width: 30rpx; | |||
height: 30rpx; | |||
} | |||
// tab选项卡样式 | |||
.tabBox { | |||
height: 70rpx; | |||
align-items: center; | |||
margin-bottom: 20rpx; | |||
&_li { | |||
padding: 0 50rpx; | |||
font-size: 36rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
} | |||
&_li_active { | |||
font-size: 36rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
position: relative; | |||
} | |||
&_li_active::after { | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
width: 48rpx; | |||
height: 18rpx; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: -40%; | |||
background: url('https://static.quhouse.com/upload/pic/20210421102103429117.png') no-repeat; | |||
background-size: 40rpx 14rpx; | |||
} | |||
} | |||
// 提交按钮 | |||
.btnBox { | |||
position: fixed; | |||
bottom: 10rpx; | |||
left: 0; | |||
width: 100%; | |||
// background: #FFFFFF; | |||
padding: 20rpx; | |||
z-index: 9; | |||
.pushTranBtn { | |||
width: 690rpx; | |||
height: 86rpx; | |||
background: #DA2222; | |||
margin: 0 auto; | |||
border-radius: 44rpx; | |||
text-align: center; | |||
line-height: 86rpx; | |||
font-size: 36rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
} | |||
} | |||
// tab 列表内容公共样式 | |||
.relist { | |||
border-bottom: 10rpx solid #E7E7E7; | |||
.reli { | |||
padding: 20rpx 30rpx; | |||
align-items: flex-start; | |||
&_img { | |||
display: inline-block; | |||
width: 178rpx; | |||
height: 178rpx; | |||
margin-right: 20rpx; | |||
border-radius: 10rpx; | |||
} | |||
&_main { | |||
&_name { | |||
margin-bottom: 20rpx; | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 42rpx; | |||
} | |||
&_subname { | |||
margin-bottom: 10rpx; | |||
height: 30rpx; | |||
font-size: 22rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 30rpx; | |||
} | |||
} | |||
} | |||
.relicom { | |||
padding: 20rpx 30rpx; | |||
align-items: flex-start; | |||
position: relative; | |||
.rightArr { | |||
display: block; | |||
right: 20rpx; | |||
top: 50%; | |||
transform: translateY(-50%); | |||
width: 30rpx; | |||
height: 30rpx; | |||
position: absolute; | |||
} | |||
&_img { | |||
display: inline-block; | |||
width: 128rpx; | |||
height: 128rpx; | |||
margin-right: 20rpx; | |||
border-radius: 50%; | |||
} | |||
.reli_main { | |||
&_name { | |||
margin-bottom: 20rpx; | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 42rpx; | |||
} | |||
&_subname { | |||
margin-bottom: 10rpx; | |||
height: 30rpx; | |||
font-size: 22rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 30rpx; | |||
} | |||
} | |||
} | |||
} | |||
.relist:last-of-type { | |||
border-bottom: 0; | |||
} | |||
.acBoxhead { | |||
padding-left: 10rpx; | |||
position: relative; | |||
height: 50rpx; | |||
font-size: 32rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 50rpx; | |||
} | |||
.acBoxhead::after { | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
width: 6rpx; | |||
height: 32rpx; | |||
background: #FF8C13; | |||
border-radius: 4rpx; | |||
left: -3rpx; | |||
top: 50%; | |||
transform: translateY(-50%); | |||
} | |||
// 新增弹框 | |||
.addBox { | |||
position: fixed; | |||
// width: 100%; | |||
// height: 100%; | |||
background: rgba(0,0,0,0.4); | |||
left: 0; | |||
top: 0; | |||
bottom: 0; | |||
right: 0; | |||
z-index: 999; | |||
} | |||
.addmainBoxTi { | |||
padding: 40rpx 0 0 0; | |||
} | |||
.addmain { | |||
padding: 40rpx 0 0 0; | |||
width: 688rpx; | |||
border-radius: 20rpx; | |||
position: fixed; | |||
left: 50%; | |||
top: 50%; | |||
transform: translate(-50%, -50%); | |||
background: #FFFFFF; | |||
z-index: 9999; | |||
.addmainMain { | |||
padding: 0 40rpx 40rpx; | |||
.addtitle { | |||
width: 100%; | |||
text-align: center; | |||
margin-bottom: 30rpx; | |||
font-size: 36rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
} | |||
.stliComCont { | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 42rpx; | |||
} | |||
} | |||
.stliCom { | |||
height: 36rpx; | |||
align-items: center; | |||
margin-bottom: 30rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
.stliComImg { | |||
display: inline-block; | |||
width: 30rpx; | |||
height: 30rpx; | |||
margin: 0 14rpx 0 30rpx; | |||
} | |||
} | |||
.stmain { | |||
align-items: center; | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
padding: 0 30rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.stlili { | |||
flex-wrap: wrap; | |||
margin-bottom: 10rpx; | |||
.stlimain { | |||
padding: 0 16rpx; | |||
height: 70rpx; | |||
line-height: 70rpx; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #292929; | |||
border-radius: 6rpx; | |||
border: 1rpx solid #FF8C13; | |||
margin: 0 10rpx 10rpx 0; | |||
} | |||
.stlimain_Active { | |||
background: #FF8C13; | |||
color: #FFFFFF; | |||
border: 1px solid #FF8C13; | |||
} | |||
} | |||
.addBtnBox { | |||
height: 92rpx; | |||
align-items: center; | |||
border-top: 1rpx solid #E0E0E0; | |||
.addBtnBoxLeft { | |||
height: 92rpx; | |||
line-height: 92rpx; | |||
border-right: 1rpx solid #E0E0E0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
text-align: center; | |||
width: 50%; | |||
} | |||
.addBtnBoxright { | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #FF8C13; | |||
text-align: center; | |||
width: 50%; | |||
} | |||
} | |||
.addBtnBoxbrn { | |||
height: 124rpx; | |||
align-items: center; | |||
border-top: 1rpx solid #E0E0E0; | |||
font-size: 36rpx; | |||
font-weight: 400; | |||
color: #FF8C13; | |||
justify-content: center; | |||
width: 100%; | |||
} | |||
} | |||
// 选择按钮 | |||
.followList { | |||
flex-wrap: wrap; | |||
margin-bottom: 30rpx; | |||
&_li { | |||
padding: 0 10rpx; | |||
height: 70rpx; | |||
text-align: center; | |||
line-height: 70rpx; | |||
background: #FFFFFF; | |||
border-radius: 6rpx; | |||
margin: 0 20rpx 20rpx 0; | |||
border: 1px solid #333333; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #333; | |||
} | |||
&_li_Active { | |||
background: #FF8C13; | |||
color: #FFFFFF; | |||
border: 1px solid #FF8C13; | |||
} | |||
} |
@@ -0,0 +1,114 @@ | |||
let pageCoupon = 'b/cncoupon/page' | |||
let mobile = 'admin/mobile' | |||
let findByCodeurl = 'coupon/b/cncouponlog/findByCode' // 优惠券核销 | |||
let cncouponlogurl = 'coupon/b/cncouponlog/page' // 优惠券列表 核销 | |||
let writeOffurl = 'coupon/b/cncouponlog/writeOff' // 优惠券 核销 | |||
let checkParameterurl = 'activity/b/cnactivity/checkParameter' // 会员卡校验--wuyong | |||
let verificationOrderurl = 'activity/b/cnactivityconsumerecord/verificationOrder' // 会员卡核销码校验 | |||
let getBConsumeRecordPageurl = 'activity/b/vconsumerecord/getBConsumeRecordPage' // 会员卡列表 核销管理 | |||
let getByIdConsumeRecordurl = 'activity/b/vconsumerecord/getByIdConsumeRecord' // 会员卡 核销详情---回显 | |||
let getByVerificationCodeurl = 'activity/b/vconsumerecord/getByUseCodeConsumeRecord' // 会员卡 核销详情 | |||
let addCnActivityConsumeRecordurl = 'activity/b/vconsumerecord/addVConsumeRecord' // 会员卡 核销 | |||
let getFanYouTeamListPageurl = 'coupon/b/fxbrandperson/getFanYouTeamListPage' // 获取B端 饭友团队 | |||
let getCommissionRevenuesFanYouDetailedListurl = 'coupon/b/fxreward/getCommissionRevenuesFanYouDetailedList' // 获取服务员 收益明细 的列表 | |||
let getCommissionRevenuesFanYouDetailedCounturl = 'coupon/b/fxreward/getCommissionRevenuesFanYouDetailedCount' // 获取服务员 收益明细 的类型 统计 | |||
let getCommissionRevenuesDetailedurl = 'coupon/b/fxreward/getCommissionRevenuesDetailed' // 获取服务员 收益明细 统计信息 | |||
let getCommissionRevenuesurl = 'coupon/b/fxreward/getCommissionRevenues' // 获取服务员 佣金收益 统计 | |||
let getCommissionRevenuesFanYouCounturl = 'coupon/b/fxreward/getCommissionRevenuesFanYouCount' // 获取服务员 佣金收益统计下边的饭友列表 | |||
let addReadCounturl = 'coupon/c/fxcmsinfo/addReadCount' // 文章详情-添加阅读量 | |||
let wonderfulRecommendurl = 'coupon/c/fxcmsinfo/wonderfulRecommend' // 文章详情-精彩推荐 | |||
let fxcmsinfourl = 'coupon/b/fxCmsInfo' // 文章详情 | |||
let getUserExturl = 'coupon/user/getUserExt' // 账户概览预请求 | |||
let Anoverviewoftheaccounturl = 'coupon/b/fxreward/zhgl' // 账户概览 | |||
let getByCompanyurl = 'coupon/cnbrand/getByCompany' // 公司查品牌 | |||
let getShopListByCompanyIdurl = 'coupon/cnshop/getShopListByCompanyId' // 公司查门店 | |||
let getByBrandurl='coupon/cnshop/getByBrand' // 品牌查门店 | |||
let waiterRewardTopurl = '/coupon/b/fxreward/waiterRewardTop' // 服务员排行 | |||
let shopRewardTopurl = '/coupon/b/fxreward/shopRewardTop' // 店铺排行 | |||
let couponUseurl = '/coupon/b/fxreward/couponUse' // 优惠券核销情况 | |||
let couponUseTopurl = '/coupon/b/fxreward/couponUseTop' // 核销金额排行top10 | |||
let fxrwurl = '/coupon/b/fxreward/fxrw' // 分销任务 | |||
let changeSjurl = '/admin/user/changeSj/' // 切换商家 | |||
let getSoundRemindurl = '/coupon/fxreward/getSoundRemind' // 获取音效提醒 | |||
let getBindSjListurl = '/admin/b/user/getBindSjList' // 绑定商家列表信息 | |||
let exchangepageurl = '/box/b/exchange/page' // b端盲盒核销记录 | |||
const install = (Vue, vm) => { | |||
let exchangepage = (params) => vm.$u.get(exchangepageurl, params); | |||
let pageCouponList = (params) => vm.$u.get(pageCoupon, params); | |||
let mobileList = (params) => vm.$u.get(mobile, params); | |||
let findByCode = (params) => vm.$u.get(cncouponlogurl, params); | |||
let cncouponlog = (params) => vm.$u.get(findByCodeurl, params); | |||
let writeOff = (params) => vm.$u.post(writeOffurl, params); | |||
let getBConsumeRecordPage = (params) => vm.$u.get(getBConsumeRecordPageurl, params); | |||
let getByIdConsumeRecord = (params) => vm.$u.get(getByIdConsumeRecordurl, params); | |||
let checkParameter = (params) => vm.$u.post(checkParameterurl, params); | |||
let verificationOrder = (params) => vm.$u.post(verificationOrderurl, params); | |||
let getByVerificationCode = (params) => vm.$u.get(getByVerificationCodeurl, params); | |||
let addCnActivityConsumeRecord = (params) => vm.$u.post(addCnActivityConsumeRecordurl, params); | |||
let getFanYouTeamListPage = (params) => vm.$u.get(getFanYouTeamListPageurl, params); | |||
let getCommissionRevenuesFanYouDetailedList = (params) => vm.$u.get(getCommissionRevenuesFanYouDetailedListurl, params); | |||
let getCommissionRevenuesFanYouDetailedCount = (params) => vm.$u.get(getCommissionRevenuesFanYouDetailedCounturl, params); | |||
let getCommissionRevenuesDetailed = (params) => vm.$u.get(getCommissionRevenuesDetailedurl, params); | |||
let getCommissionRevenues = (params) => vm.$u.get(getCommissionRevenuesurl, params); | |||
let getCommissionRevenuesFanYouCount = (params) => vm.$u.get(getCommissionRevenuesFanYouCounturl, params); | |||
let addReadCount = (params) => vm.$u.put(addReadCounturl, params); | |||
let wonderfulRecommend = (params) => vm.$u.get(wonderfulRecommendurl, params); | |||
let fxcmsinfo = (id) => vm.$u.get(fxcmsinfourl + '/' + id); | |||
let getUserExt = (params) => vm.$u.get(getUserExturl, params); | |||
let Anoverviewoftheaccount = (params) => vm.$u.get(Anoverviewoftheaccounturl, params); | |||
let getByCompany = (params) => vm.$u.post(getByCompanyurl, params); | |||
let getShopListByCompanyId = (params) => vm.$u.get(getShopListByCompanyIdurl, params); | |||
let getByBrand = (params) => vm.$u.post(getByBrandurl, params); | |||
let waiterRewardTop = (params) => vm.$u.get(waiterRewardTopurl, params); | |||
let shopRewardTop = (params) => vm.$u.get(shopRewardTopurl, params); | |||
let couponUse = (params) => vm.$u.get(couponUseurl, params); | |||
let couponUseTop = (params) => vm.$u.get(couponUseTopurl, params); | |||
let fxrw = (params) => vm.$u.get(fxrwurl, params); | |||
let changeSj = (id) => vm.$u.get(changeSjurl+id); | |||
let getSoundRemind = () => vm.$u.get(getSoundRemindurl); | |||
let getBindSjList = () => vm.$u.post(getBindSjListurl); | |||
vm.$u.api = { | |||
exchangepage, | |||
getBindSjList, | |||
getSoundRemind, | |||
changeSj, | |||
fxrw, | |||
couponUse, | |||
couponUseTop, | |||
getUserExt, | |||
Anoverviewoftheaccount, | |||
getByCompany, | |||
getShopListByCompanyId, | |||
fxcmsinfo, | |||
waiterRewardTop, | |||
shopRewardTop, | |||
addReadCount, | |||
getByBrand, | |||
wonderfulRecommend, | |||
getCommissionRevenuesFanYouCount, | |||
getCommissionRevenues, | |||
getCommissionRevenuesDetailed, | |||
getCommissionRevenuesFanYouDetailedCount, | |||
getCommissionRevenuesFanYouDetailedList, | |||
getFanYouTeamListPage, | |||
pageCouponList, | |||
mobileList, | |||
findByCode, | |||
writeOff, | |||
cncouponlog, | |||
checkParameter, | |||
verificationOrder, | |||
getByVerificationCode, | |||
addCnActivityConsumeRecord, | |||
getBConsumeRecordPage, | |||
getByIdConsumeRecord | |||
} | |||
} | |||
export default { | |||
install | |||
} |
@@ -0,0 +1,57 @@ | |||
const install = (Vue, vm) => { | |||
Vue.prototype.$u.http.setConfig({ | |||
baseUrl: process.env.VUE_APP_SERVER, | |||
originalData: true, | |||
showLoading: false, | |||
timeout: 10000, | |||
// loadingText: '努力加载中~', | |||
header: { | |||
// 'Authorization': 'Bearer '+vm.vuex_token, | |||
} | |||
}); | |||
// 请求拦截 | |||
Vue.prototype.$u.http.interceptor.request = (config) => { | |||
// console.log(vm.vuex_token) | |||
if (vm.vuex_token) { | |||
config.header.Authorization = 'Bearer ' + vm.vuex_token | |||
} | |||
return config; | |||
} | |||
// 响应拦截 | |||
Vue.prototype.$u.http.interceptor.response = (res) => { | |||
// console.log(res) | |||
if (res.statusCode == 200) { | |||
return res.data.data; | |||
} else if (res.statusCode == 401) { | |||
uni.showToast({ | |||
title: res.data.msg || '未登录', | |||
icon: "none", | |||
duration: 3000 | |||
}) | |||
uni.navigateTo({ | |||
url: '/pages/login/type' | |||
}); | |||
return; | |||
} else if (res.statusCode == 500) { | |||
uni.showToast({ | |||
title: res.data.msg || '加载失败', | |||
icon: "none", | |||
duration: 3000 | |||
}) | |||
return; | |||
} else if (res.statusCode == 503) { | |||
uni.showToast({ | |||
title: '网络服务有问题', | |||
icon: "none", | |||
duration: 3000 | |||
}) | |||
return; | |||
} else { | |||
return; | |||
} | |||
} | |||
} | |||
export default { | |||
install | |||
} |
@@ -0,0 +1,4 @@ | |||
// 主题色 | |||
$theme-color: #FF9953; | |||
$bg-color:#ffffff; |
@@ -0,0 +1,35 @@ | |||
import * as CryptoJS from 'crypto-js' | |||
/** | |||
*加密处理 | |||
*/ | |||
export const encryption = (params) => { | |||
let { | |||
data, | |||
type, | |||
param, | |||
key | |||
} = params | |||
const result = JSON.parse(JSON.stringify(data)) | |||
if (type === 'Base64') { | |||
param.forEach(ele => { | |||
result[ele] = btoa(result[ele]) | |||
}) | |||
} else { | |||
param.forEach(ele => { | |||
var data = result[ele] | |||
key = CryptoJS.enc.Latin1.parse(key) | |||
var iv = key | |||
// 加密 | |||
var encrypted = CryptoJS.AES.encrypt( | |||
data, | |||
key, { | |||
iv: iv, | |||
mode: CryptoJS.mode.CBC, | |||
padding: CryptoJS.pad.ZeroPadding | |||
}) | |||
result[ele] = encrypted.toString() | |||
}) | |||
} | |||
return result | |||
} |
@@ -0,0 +1,29 @@ | |||
import Vue from 'vue' | |||
import App from './App' | |||
import store from '@/store'; | |||
import uView from "uview-ui"; | |||
import vuexStore from '@/store/$u.mixin.js'; | |||
import install from '@/common/http.interceptor.js' | |||
import httpApi from '@/common/http.api.js' | |||
import AES from '@/common/aes.js' // 密码加密 | |||
let mpShare = require('uview-ui/libs/mixin/mpShare.js'); | |||
Vue.config.productionTip = false | |||
App.mpType = 'app' | |||
Vue.use(uView); | |||
// 引入uView提供的对vuex的简写法文件 | |||
Vue.mixin(vuexStore); | |||
// 引入uView对小程序分享的mixin封装 | |||
Vue.mixin(mpShare) | |||
Vue.prototype.$AES = AES; | |||
const app = new Vue({ | |||
store, | |||
...App | |||
}) | |||
Vue.use(install, app) | |||
Vue.use(httpApi, app) | |||
app.$mount() |
@@ -0,0 +1,75 @@ | |||
{ | |||
"name" : "8090公寓", | |||
"appid" : "", | |||
"description" : "", | |||
"versionName" : "1.0.0", | |||
"versionCode" : "100", | |||
"transformPx" : false, | |||
"app-plus" : { | |||
/* 5+App特有相关 */ | |||
"usingComponents" : true, | |||
"splashscreen" : { | |||
"alwaysShowBeforeRender" : true, | |||
"waiting" : true, | |||
"autoclose" : true, | |||
"delay" : 0 | |||
}, | |||
"modules" : {}, | |||
/* 模块配置 */ | |||
"distribute" : { | |||
/* 应用发布信息 */ | |||
"android" : { | |||
/* android打包配置 */ | |||
"permissions" : [ | |||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", | |||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | |||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | |||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", | |||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", | |||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | |||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | |||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", | |||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", | |||
"<uses-feature android:name=\"android.hardware.camera\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", | |||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | |||
] | |||
}, | |||
"ios" : {}, | |||
/* ios打包配置 */ | |||
"sdkConfigs" : {} | |||
} | |||
}, | |||
/* SDK配置 */ | |||
"quickapp" : {}, | |||
/* 快应用特有相关 */ | |||
"mp-weixin" : { | |||
"appid" : "wxc72f5a997c67b668", | |||
"setting" : { | |||
"urlCheck" : true | |||
}, | |||
"usingComponents" : true | |||
}, | |||
"mp-alipay" : { | |||
"usingComponents" : true | |||
}, | |||
"mp-baidu" : { | |||
"usingComponents" : true | |||
}, | |||
"mp-toutiao" : { | |||
"usingComponents" : true | |||
}, | |||
"mp-qq" : { | |||
"usingComponents" : true | |||
} | |||
} |
@@ -0,0 +1,107 @@ | |||
{ | |||
"easycom": { | |||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" | |||
}, | |||
"condition": { | |||
"current": 0, | |||
"list": [{ | |||
"name": "test", | |||
"path": "pages/tabs/gonggao", | |||
"query": "" | |||
}] | |||
}, | |||
"permission": { | |||
"scope.userLocation": { | |||
"desc": "你的位置信息将用于小程序位置接口的效果展示" | |||
} | |||
}, | |||
"pages": [{ | |||
"path": "pages/tabs/index", | |||
"style": { | |||
"navigationBarTitleText": "8090公寓", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/tabs/customer", | |||
"style": { | |||
"navigationBarTitleText": "客户", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/tabs/gonggao", | |||
"style": { | |||
"navigationBarTitleText": "公告", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/tabs/me", | |||
"style": { | |||
"navigationBarTitleText": "我的", | |||
"navigationStyle": "custom", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/otherPage/mytodo", | |||
"style": { | |||
"navigationBarTitleText": "我的待办", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/otherPage/myapply", | |||
"style": { | |||
"navigationBarTitleText": "我的申请", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/otherPage/rent", | |||
"style": { | |||
"navigationBarTitleText": "出租专区", | |||
"navigationBarTextStyle": "black" | |||
} | |||
},{ | |||
"path": "pages/otherPage/jjrent", | |||
"style": { | |||
"navigationBarTitleText": "居间出租", | |||
"navigationBarTextStyle": "black" | |||
} | |||
} | |||
], | |||
"globalStyle": { | |||
"navigationBarTextStyle": "#fff", | |||
"navigationBarTitleText": "8090公寓", | |||
"navigationBarBackgroundColor": "#fff", | |||
"backgroundColor": "#fff" | |||
}, | |||
"subPackages": [], | |||
"tabBar": { | |||
"color": "#999999", | |||
"selectedColor": "#FF6D25", | |||
"backgroundColor": "#FFFFFF", | |||
"borderStyle": "black", | |||
"list": [{ | |||
"pagePath": "pages/tabs/index", | |||
"text": "首页", | |||
"iconPath": "static/tab_icons/index.png", | |||
"selectedIconPath": "static/tab_icons/index_active.png" | |||
}, | |||
{ | |||
"pagePath": "pages/tabs/customer", | |||
"text": "客户", | |||
"iconPath": "static/tab_icons/customer.png", | |||
"selectedIconPath": "static/tab_icons/customer_active.png" | |||
}, | |||
{ | |||
"pagePath": "pages/tabs/gonggao", | |||
"text": "公告", | |||
"iconPath": "static/tab_icons/gonggao.png", | |||
"selectedIconPath": "static/tab_icons/gonggao_active.png" | |||
}, | |||
{ | |||
"pagePath": "pages/tabs/me", | |||
"text": "我的", | |||
"iconPath": "static/tab_icons/me.png", | |||
"selectedIconPath": "static/tab_icons/me_active.png" | |||
} | |||
] | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
<template> | |||
<view class="container"> | |||
居间出租 | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: {}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -0,0 +1,81 @@ | |||
<template> | |||
<view class="container"> | |||
<view class="top-tabs"> | |||
<view class="tab"> | |||
<image class="img" src="/static/myapply/apply.png" mode="" /> | |||
待房申请 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myapply/clear.png" mode="" /> | |||
首次保洁 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myapply/repair.png" mode="" /> | |||
首次维修 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myapply/history.png" mode="" /> | |||
申请历史 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myapply/record.png" mode="" /> | |||
装修清单 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: { | |||
}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.container{ | |||
width: 100%; | |||
height: 100vh; | |||
background: #F8F8F8; | |||
overflow: auto; | |||
padding-top: 20rpx; | |||
.top-tabs{ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
flex-wrap: wrap; | |||
background: #fff; | |||
padding: 32rpx 45rpx; | |||
margin-bottom: 20rpx; | |||
.tab{ | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 26rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-bottom: 9rpx; | |||
.img{ | |||
width: 134rpx; | |||
height: 134rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,93 @@ | |||
<template> | |||
<view class="container"> | |||
<view class="top-tabs"> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/shenpi.png" mode="" /> | |||
带房审批 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/tool.png" mode="" /> | |||
开荒维修 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/repair.png" mode="" /> | |||
日常维修 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/clear.png" mode="" /> | |||
开荒保洁 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/check.png" mode="" /> | |||
改价审核 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/repairMan.png" mode="" /> | |||
维修员 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/fitment.png" mode="" /> | |||
合同审核 | |||
</view> | |||
<view class="tab"> | |||
<image class="img" src="/static/myTodo/djCheck.png" mode="" /> | |||
定金审核 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: { | |||
}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.container{ | |||
width: 100%; | |||
height: 100vh; | |||
background: #F8F8F8; | |||
overflow: auto; | |||
padding-top: 20rpx; | |||
.top-tabs{ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
flex-wrap: wrap; | |||
background: #fff; | |||
padding: 32rpx 45rpx; | |||
margin-bottom: 20rpx; | |||
.tab{ | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 26rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-bottom: 9rpx; | |||
.img{ | |||
width: 134rpx; | |||
height: 134rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,25 @@ | |||
<template> | |||
<view class="container"> | |||
出租专区 | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: {}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -0,0 +1,52 @@ | |||
<template> | |||
<view class="container"> | |||
<view class="top-box"> | |||
<view class="search-box"> | |||
<u-search v-model="keyword" :show-action="false" :clearabled="true" bg-color="#F8F8F8" shape="round" height="78"></u-search> | |||
</view> | |||
<view class="addCustomer">增加客户</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
keyword: '' | |||
}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: {}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.top-box{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.search-box{ | |||
width: 532rpx; | |||
height: 78rpx; | |||
} | |||
.addCustomer{ | |||
width: 128px; | |||
height: 44px; | |||
font-size: 32px; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #FF6D25; | |||
line-height: 44px; | |||
} | |||
</style> |
@@ -0,0 +1,146 @@ | |||
<template> | |||
<view class="container"> | |||
<view class="list" v-for="(item,index) in list" :key="index"> | |||
<view class="item-top"> | |||
<view class="title" :class="{'boldtitle':item.dot}"> | |||
<view class="dot" v-if="item.dot"></view> | |||
<view class="u-line-1" style="max-width: 580rpx;">{{item.name}}</view> | |||
</view> | |||
<image class="arrow" src="/static/index/right-arrow.png" mode="" /> | |||
</view> | |||
<view class="item-mid"> | |||
<view class="time">{{item.time}}</view> | |||
<view class="from">{{item.from}}</view> | |||
</view> | |||
<view class="item-bot"> | |||
<view class="btn"><image class="img" src="/static/answer.png" mode="" />回复列表</view> | |||
<view class="btn"><image class="img" src="/static/list.png" mode="" />查看记录</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
list: [{ | |||
name: '办公区管理制度', | |||
dot: true, | |||
time: '2022-05-20 18:00:00', | |||
from:'来自人力资源部' | |||
},{ | |||
name: '关于人才招聘及新员工试用期管理实施办法', | |||
dot: true, | |||
time: '2022-05-20 18:00:00', | |||
from:'来自人力资源部' | |||
},{ | |||
name: '关于李秀峰等人的岗位调整与任命通知', | |||
dot: false, | |||
time: '2022-05-20 18:00:00', | |||
from:'来自人力资源部' | |||
}] | |||
}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: {}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.container{ | |||
width: 100%; | |||
min-height: 100vh; | |||
background: #f8f8f8; | |||
padding: 20rpx 30rpx; | |||
.list{ | |||
width: 690rpx; | |||
height: 253rpx; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 12rpx 0px rgba(224,224,224,0.3); | |||
border-radius: 12rpx; | |||
margin-bottom: 20rpx; | |||
padding: 30rpx 30rpx 0; | |||
box-sizing: border-box; | |||
.item-top{ | |||
display: flex; | |||
justify-content: space-between; | |||
margin-bottom: 20rpx; | |||
.title{ | |||
display: flex; | |||
align-items: center; | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #303030; | |||
line-height: 42rpx; | |||
.boldtitle{ | |||
font-weight: 500; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
} | |||
.dot{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #E7483C; | |||
border-radius: 50%; | |||
margin-right: 10rpx; | |||
} | |||
} | |||
.arrow{ | |||
width: 12rpx; | |||
height: 28rpx; | |||
} | |||
} | |||
.item-mid{ | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
height: 40rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 40rpx; | |||
margin-bottom: 30rpx; | |||
.time{ | |||
} | |||
.from{ | |||
} | |||
} | |||
.item-bot{ | |||
display: flex; | |||
height: 90rpx; | |||
align-items: center; | |||
justify-content: center; | |||
border-top:1px solid #E0E0E0; | |||
.btn{ | |||
flex:1; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
font-size: 30rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #303030; | |||
&:first-child{ | |||
border-right: 1px solid #f8f8f8; | |||
} | |||
.img{ | |||
width: 30rpx; | |||
height: 30rpx; | |||
margin-right: 12rpx; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,331 @@ | |||
<template> | |||
<view class="container"> | |||
<view class="top-tabs"> | |||
<view class="tab" @click="topage('rent')"> | |||
<image class="img" src="/static/index/czzq.png" mode="" /> | |||
出租专区 | |||
</view> | |||
<view class="tab" @click="topage('jjrent')"> | |||
<image class="img" src="/static/index/jjcz.png" mode="" /> | |||
居间出租 | |||
</view> | |||
<view class="tab" @click="topage('myapply')"> | |||
<image class="img" src="/static/index/wdsq.png" mode="" /> | |||
我的申请 | |||
</view> | |||
<view class="tab" @click="topage('mytodo')"> | |||
<image class="img" src="/static/index/wddb.png" mode="" /> | |||
我的待办 | |||
</view> | |||
</view> | |||
<view class="gonggao"> | |||
<view class="left"> | |||
<view class="title">公告</view> | |||
<view class="dot"></view> | |||
</view> | |||
<view class="right"> | |||
<!-- 关于人才招聘及新员工试用期管理实施... --> | |||
<u-notice-bar type="none" padding="18rpx 0" font-size="28" color="#303030" mode="vertical" :volume-icon="false" :more-icon="false" :list="list"></u-notice-bar> | |||
</view> | |||
<image class="more-icon" src="/static/index/right-arrow.png" mode="" /> | |||
</view> | |||
<view class="report-tab"> | |||
<u-tabs :list="tabList" bar-width="60" bar-height="6" active-color="#FF6D25" inactive-color="#666666" font-size="30" :is-scroll="false" :current="current" @change="change"></u-tabs> | |||
</view> | |||
<view class="tongji"> | |||
<view class="tongji-item" v-for="(item,index) in tongjiList" :key="index"> | |||
<view class="num">{{item.num}}</view> | |||
<view class="text">{{item.text}}</view> | |||
</view> | |||
<view class="lookall" @click="topage(1)">查看全部 | |||
<image class="more-icon" src="/static/index/right-arrow.png" mode="" /> | |||
</view> | |||
</view> | |||
<view class="report-tab"> | |||
<u-tabs :list="tabList1" bar-width="60" bar-height="6" active-color="#FF6D25" inactive-color="#666666" font-size="30" :is-scroll="false" :current="current1" @change="change1"></u-tabs> | |||
</view> | |||
<view class="rank-box"> | |||
<view class="rank-item" v-for="(item,index) in rankList" :key="index"> | |||
<view class="left"> | |||
<image class="top-img" :src="'/static/index/top'+(index+1)+'.png'" mode="" /> | |||
<image class="avatar" src="/static/avatar.png" mode="" /> | |||
<view class="name u-line-1">王柏翘</view> | |||
</view> | |||
<view class="right"> | |||
<view class="top"><view class="number">7</view>套</view> | |||
<view class="desc">累计成交</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
list: ['关于人才招聘及新员工试用期管理实施', | |||
'平明送客楚山孤平明送客楚山孤', | |||
'关于人才招聘及新员工试用期管理实施123', | |||
'一片冰心在玉壶一片冰心在玉壶一片冰心在玉壶'], | |||
tabList: [{ | |||
name: '今日战报' | |||
}, { | |||
name: '本周战报' | |||
}, { | |||
name: '本月战报' | |||
}], | |||
tabList1: [{ | |||
name: '经纪人排名' | |||
}, { | |||
name: '组排名' | |||
}], | |||
tongjiList: [ | |||
{ | |||
num: 29, | |||
text: '新增成交' | |||
}, | |||
{ | |||
num: 5, | |||
text: '新增代理合同' | |||
}, | |||
{ | |||
num: 0, | |||
text: '新增带看' | |||
}, | |||
{ | |||
num: 9, | |||
text: '新增客户' | |||
}, | |||
{ | |||
num: 0, | |||
text: '新增带看' | |||
}, | |||
{ | |||
num: 9, | |||
text: '新增客户' | |||
}, | |||
], | |||
rankList: [{},{},{}], | |||
current: 0, | |||
current1: 0, | |||
}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: { | |||
change(index){ | |||
this.current = index | |||
}, | |||
change1(index){ | |||
this.current1 = index | |||
}, | |||
topage(type){ | |||
uni.navigateTo({ | |||
url: '/pages/otherPage/' + type | |||
}) | |||
}, | |||
}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.container{ | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
overflow: auto; | |||
.top-tabs{ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
background: #fff; | |||
padding: 32rpx 45rpx; | |||
margin-bottom: 20rpx; | |||
.tab{ | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
font-size: 26rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #333333; | |||
.img{ | |||
width: 98rpx; | |||
height: 98rpx; | |||
margin-bottom: 4rpx; | |||
} | |||
} | |||
} | |||
.gonggao{ | |||
width: 750rpx; | |||
height: 80rpx; | |||
background: #FFFFFF; | |||
display: flex; | |||
align-items: center; | |||
padding: 0 30rpx; | |||
margin-bottom: 20rpx; | |||
.left{ | |||
display: flex; | |||
align-items: center; | |||
.title{ | |||
text-align: center; | |||
width: 96rpx; | |||
height: 48rpx; | |||
line-height: 48rpx; | |||
background: rgba(255, 109, 37, 0.1); | |||
border-radius: 8rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #FF6D25; | |||
} | |||
.dot{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #E7483C; | |||
border-radius: 50%; | |||
margin: 0 10rpx 0 20rpx; | |||
} | |||
} | |||
.right{ | |||
flex: 1; | |||
width: 490rpx; | |||
} | |||
.more-icon{ | |||
width: 12rpx; | |||
height: 28rpx; | |||
} | |||
} | |||
.report-tab{ | |||
border-bottom: 1px solid rgba(224,224,224,0.5); | |||
} | |||
.tongji{ | |||
display: flex; | |||
flex-wrap: wrap; | |||
background: #fff; | |||
padding: 20rpx 0; | |||
margin-bottom: 20rpx; | |||
.tongji-item{ | |||
width: 25%; | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
.num{ | |||
height: 56rpx; | |||
font-size: 40rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 56rpx; | |||
margin-bottom: 6rpx; | |||
} | |||
.text{ | |||
height: 36rpx; | |||
font-size: 26rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 36rpx; | |||
margin-bottom: 28rpx; | |||
} | |||
} | |||
.lookall{ | |||
width: 750rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
height: 40rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 40rpx; | |||
border-top: 1px solid #e0e0e0; | |||
padding-top: 20rpx; | |||
.more-icon{ | |||
width: 12rpx; | |||
height: 20rpx; | |||
margin-left: 8rpx; | |||
} | |||
} | |||
} | |||
.rank-box{ | |||
padding: 40rpx 30rpx; | |||
background: #fff; | |||
.rank-item{ | |||
margin-bottom: 40rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
&:last-child{ | |||
margin-bottom: 0; | |||
} | |||
.left{ | |||
display: flex; | |||
align-items: center; | |||
.top-img{ | |||
width: 44rpx; | |||
height: 58rpx; | |||
margin-right: 32rpx; | |||
} | |||
.avatar{ | |||
width: 96rpx; | |||
height: 96rpx; | |||
border-radius: 50%; | |||
overflow: hidden; | |||
margin-right: 20rpx; | |||
} | |||
.name{ | |||
max-width: 200rpx; | |||
height: 40rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 40rpx; | |||
} | |||
} | |||
.right{ | |||
.top{ | |||
font-size: 24rpx; | |||
line-height: 50rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #666666; | |||
display: flex; | |||
margin-bottom: 9rpx; | |||
justify-content: flex-end; | |||
.number{ | |||
font-size: 36rpx; | |||
font-weight: 500; | |||
color: #FF6D25; | |||
margin-right: 4rpx; | |||
} | |||
} | |||
.desc{ | |||
text-align: right; | |||
width: 96rpx; | |||
height: 32rpx; | |||
font-size: 24rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 32rpx; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,169 @@ | |||
<template> | |||
<view class="container" style="background:url('/static/my/my_bg.png')no-repeat;background-size: contain;"> | |||
<u-navbar :is-back="false" :border-bottom="false" title="我的" background="none"></u-navbar> | |||
<view class="info"> | |||
<image class="avatar" src="/static/avatar.png" mode="" /> | |||
<view class="name u-line-1">章三章三章三章三章三</view> | |||
</view> | |||
<view class="menu"> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/news.png" mode="" /> | |||
消息通知 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/call.png" mode="" /> | |||
通讯录 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/house.png" mode="" /> | |||
应收房租 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/goonhetong.png" mode="" /> | |||
续期合同 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/phone.png" mode="" /> | |||
客服电话 | |||
</view> | |||
<view> | |||
400-8113936<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/net.png" mode="" /> | |||
网络查询 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/lock.png" mode="" /> | |||
修改密码 | |||
</view> | |||
<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
<view class="menu-item" style="border:0"> | |||
<view style="display:flex;"> | |||
<image class="icon" src="/static/my/system.png" mode="" /> | |||
系统版本 | |||
</view> | |||
<view>V2.1.11<image class="arrow" src="/static/my/arrow.png" mode="" /> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="logout">退出登录</view> | |||
<view class="agreement"> | |||
<view>隐私政策</view> | |||
<view>服务协议</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
onLoad(options) { | |||
}, | |||
onShow() { | |||
}, | |||
methods: {}, | |||
onLoad: function(options) { | |||
}, | |||
onHide: function() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.container{ | |||
width: 100%; | |||
min-height: 100vh; | |||
padding: 0 40rpx 30rpx; | |||
.info{ | |||
display: flex; | |||
align-items: center; | |||
margin: 40rpx 0 30rpx; | |||
.avatar{ | |||
width: 100rpx; | |||
height: 100rpx; | |||
border-radius: 50%; | |||
margin-right: 24rpx; | |||
flex: 0 0 100rpx; | |||
} | |||
.name{ | |||
font-size: 32rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 44rpx; | |||
max-width: 590rpx; | |||
} | |||
} | |||
.menu{ | |||
width: 670rpx; | |||
.menu-item{ | |||
width: 100%; | |||
height: 104rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
border-bottom: 1px solid #e0e0e0; | |||
.icon{ | |||
width: 36rpx; | |||
height: 36rpx; | |||
margin-right: 20rpx; | |||
} | |||
.arrow{ | |||
width: 12rpx; | |||
height: 28rpx; | |||
margin-left: 20rpx; | |||
} | |||
} | |||
} | |||
.logout{ | |||
width: 670rpx; | |||
height: 92rpx; | |||
line-height: 92rpx; | |||
text-align: center; | |||
background: #F8F8F8; | |||
border-radius: 12rpx; | |||
margin: 50rpx auto 30rpx; | |||
font-size: 32rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #333333; | |||
} | |||
.agreement{ | |||
width: 670rpx; | |||
margin: 0 auto; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
height: 33rpx; | |||
font-size: 24rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
font-weight: 400; | |||
color: #FF6D25; | |||
line-height: 33rpx; | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,26 @@ | |||
import { mapState } from 'vuex' | |||
import store from "@/store" | |||
// 尝试将用户在根目录中的store/index.js的vuex的state变量,全部加载到全局变量中 | |||
let $uStoreKey = []; | |||
try{ | |||
$uStoreKey = store.state ? Object.keys(store.state) : []; | |||
}catch(e){ | |||
} | |||
export default { | |||
created() { | |||
// 将vuex方法挂在到$u中 | |||
this.$u.vuex = (name, value) => { | |||
this.$store.commit('$uStore', { | |||
name,value | |||
}) | |||
} | |||
}, | |||
computed: { | |||
// 将vuex的state中的所有变量,解构到全局混入的mixin中 | |||
...mapState($uStoreKey) | |||
}, | |||
methods: {} | |||
} |
@@ -0,0 +1,61 @@ | |||
import Vue from 'vue' | |||
import Vuex from 'vuex' | |||
Vue.use(Vuex) | |||
let lifeData = {}; | |||
try{ | |||
// 尝试获取本地是否存在lifeData变量,第一次启动APP时是不存在的 | |||
lifeData = uni.getStorageSync('lifeData'); | |||
}catch(e){ | |||
} | |||
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名 | |||
let saveStateKeys = ['vuex_user', 'vuex_token']; | |||
// 保存变量到本地存储中 | |||
const saveLifeData = function(key, value){ | |||
// 判断变量名是否在需要存储的数组中 | |||
if(saveStateKeys.indexOf(key) != -1) { | |||
// 获取本地存储的lifeData对象,将变量添加到对象中 | |||
let tmp = uni.getStorageSync('lifeData'); | |||
// 第一次打开APP,不存在lifeData变量,故放一个{}空对象 | |||
tmp = tmp ? tmp : {}; | |||
tmp[key] = value; | |||
// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中 | |||
uni.setStorageSync('lifeData', tmp); | |||
} | |||
} | |||
const store = new Vuex.Store({ | |||
state: { | |||
vuex_token: '', | |||
vuex_user: {},//用户信息 | |||
hx_code: {}, // 优惠券核销参数 | |||
hx_vip_code: {},// 会员卡核销参数 | |||
vuex_loadingImg: 'https://static.quhouse.com/aa8490daa5ae4f50b3b572127163ba14.png', // 默认图显示 | |||
detailId: '' | |||
}, | |||
mutations: { | |||
$uStore(state, payload) { | |||
// 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1 | |||
let nameArr = payload.name.split('.'); | |||
let saveKey = ''; | |||
let len = nameArr.length; | |||
if(len >= 2) { | |||
let obj = state[nameArr[0]]; | |||
for(let i = 1; i < len - 1; i ++) { | |||
obj = obj[nameArr[i]]; | |||
} | |||
obj[nameArr[len - 1]] = payload.value; | |||
saveKey = nameArr[0]; | |||
} else { | |||
// 单层级变量,在state就是一个普通变量的情况 | |||
state[payload.name] = payload.value; | |||
saveKey = payload.name; | |||
} | |||
// 保存变量到本地 | |||
saveLifeData(saveKey, state[saveKey]) | |||
} | |||
} | |||
}) | |||
export default store |
@@ -0,0 +1,3 @@ | |||
/* 颜色变量 */ | |||
@import 'uview-ui/theme.scss'; |
@@ -0,0 +1,9 @@ | |||
{ | |||
"compilerOptions": { | |||
"types": [ | |||
"@dcloudio/types", | |||
"miniprogram-api-typings", | |||
"mini-types" | |||
] | |||
} | |||
} |