diff --git a/App.vue b/App.vue index 4d3d6fe..b07d3f2 100644 --- a/App.vue +++ b/App.vue @@ -1,7 +1,6 @@ + + \ No newline at end of file diff --git a/config/app.js b/config/app.js index 2182f5b..9378ffa 100644 --- a/config/app.js +++ b/config/app.js @@ -2,11 +2,10 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user` // #endif +const MD5KEY = 'AK9F3AD3A7498A236D0DB76604CF1F3EA3' + let openPlantGrass = '-openPlantGrass-' let httpApi -let httpApiTwo -let httpApiThree -let httpApiFour // 在打包之前请检查当前环境是否正确 const env = 'dev'; // 开发 @@ -15,22 +14,13 @@ const env = 'dev'; // 开发 switch (env) { case 'prod': - httpApi = 'https://shop.lihaink.cn' // 生产 - httpApiTwo = 'https://nk.lihaink.cn' - httpApiThree = 'http://ceshi-oa.lihaink.cn' - httpApiFour = 'https://worker-task.lihaink.cn' + httpApi = 'https://middle.lihaink.cn' // 生产 break; case 'prew': - httpApi = 'https://test.shop.lihaink.cn' //预发布环境 - httpApiTwo = "https://nk.lihaink.cn" - httpApiThree = 'http://ceshi-oa.lihaink.cn' - httpApiFour = 'https://preview-worker-task.lihaink.cn' + httpApi = 'https://preview-middle.lihaink.cn' //预发布环境 break; default: - httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试 - httpApiTwo = "https://nk.lihaink.cn" - httpApiThree = 'http://ceshi-oa.lihaink.cn' - httpApiFour = 'https://ceshi-worker-task.lihaink.cn' + httpApi = "https://ceshi-middle.lihaink.cn" // 测试 } @@ -43,25 +33,28 @@ let wsApi = 'wss://shop.lihaink.cn' module.exports = { // 请求域名 格式: https://您的域名 // #ifdef MP || APP-PLUS - // HTTP_REQUEST_URL: httpApi, HTTP_REQUEST_URL: httpApi, - HTTP_REQUEST_URL_TWO: httpApiTwo, - HTTP_REQUEST_URL_THREE: httpApiThree, - HTTP_REQUEST_URL_FOUR: httpApiFour, + // HTTP_REQUEST_URL_TWO: httpApiTwo, + // HTTP_REQUEST_URL_THREE: httpApiThree, + // HTTP_REQUEST_URL_FOUR: httpApiFour, VUE_APP_WS_URL: `${wsApi}?type=user`, // #endif // #ifdef H5 //H5接口是浏览器地址 - HTTP_REQUEST_URL_FOUR: httpApiFour|| window.location.protocol + "//" + window.location.host, HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host, - HTTP_REQUEST_URL_TWO: httpApiTwo || window.location.protocol + "//" + window.location.host, + // HTTP_REQUEST_URL_FOUR: httpApiFour|| window.location.protocol + "//" + window.location.host, + // HTTP_REQUEST_URL_TWO: httpApiTwo || window.location.protocol + "//" + window.location.host, // 聊天长连接地址 VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL, // #endif + MD5KEY: MD5KEY, openPlantGrass: openPlantGrass, HEADER: { - 'content-type': 'application/json', + // 'content-type': 'application/json', + 'appid': 'AD1696910250', + 'url': 'https://middle.lihaink.cn', + 'timestamp': Date.now(), //#ifdef H5 'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5', //#endif @@ -73,7 +66,7 @@ module.exports = { //#endif }, // 回话密钥名称 请勿修改此配置 - TOKENNAME: 'X-Token', + TOKENNAME: 'token', // 缓存时间 0 永久 EXPIRE: 0, }; \ No newline at end of file diff --git a/libs/routine.js b/libs/routine.js index 7d1be4d..8039398 100644 --- a/libs/routine.js +++ b/libs/routine.js @@ -1,6 +1,6 @@ import store from '@/store'; import { checkLogin } from './login'; -import { login } from '@/api/pubic.js'; +import { login } from '@/api/public.js'; import Cache from '@/utils/cache'; import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS } from '@/config/cache'; diff --git a/manifest.json b/manifest.json index 12b9645..a8848d6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,71 +1,177 @@ { - "name" : "lihaiCenter", - "appid" : "__UNI__BBF059D", + "name" : "里海中台", + "appid" : "__UNI__3A527D1", "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", + "versionName" : "0.0.1", + "versionCode" : 1, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { + "titleNView" : true, "usingComponents" : true, + "nvueCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app", "compilerVersion" : 3, "splashscreen" : { - "alwaysShowBeforeRender" : false, + "alwaysShowBeforeRender" : true, "waiting" : true, - "autoclose" : false, + "autoclose" : true, "delay" : 0 }, /* 模块配置 */ "modules" : { + "VideoPlayer" : {}, + "iBeacon" : {}, + "Barcode" : {}, + "Camera" : {}, + "Geolocation" : {}, + "Payment" : {}, + "Share" : {}, + "OAuth" : {}, "UniMP" : { "description" : "uni小程序" + }, + "Maps" : {}, + "Push" : {} + }, + "safearea" : { + "bottom" : { + "offset" : "none" } }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ "android" : { + "resizeableActivity" : true, "permissions" : [ - "", - "", - "", - "", - "", - "", + "", + "", + "", "", + "", + "", + "", + "", + "", "", - "", - "", + "", + "", "", + "", + "", + "", + "", + "", + "", "", - "", - "", - "" - ] + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], + "permissionExternalStorage" : { + "request" : "none", + "prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" + }, + "permissionPhoneState" : { + "request" : "none" //拨打电话权限关闭 + } }, /* ios打包配置 */ "ios" : { + "privacyDescription" : { + "NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报", + "NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报", + "NSCameraUsageDescription" : "上传用户头像保存分享海报", + "NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店", + "NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店", + "NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店" + }, + "idfa" : false, "dSYMs" : false }, /* SDK配置 */ "sdkConfigs" : { + "maps" : { + "amap" : { + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", + "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1" + } + }, + "payment" : { + "weixin" : { + "__platform__" : [ "ios", "android" ], + "appid" : "wx9d68c92b550ddd1e", + "UniversalLinks" : "https://shop.lihaink.cn/" + } + }, + "share" : { + "weixin" : { + "appid" : "wx9d68c92b550ddd1e", + "UniversalLinks" : "https://shop.lihaink.cn/" + } + }, + "geolocation" : { + "amap" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "82af93ec51139c712c4118d84ba684ee", + "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1" + } + }, + "oauth" : {}, "ad" : {}, - "oauth" : {} + "push" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + }, + "splashscreen" : { + "useOriginalMsgbox" : true } }, "nativePlugins" : { "JG-JCore" : { - "JPUSH_APPKEY_IOS" : "", - "JPUSH_CHANNEL_IOS" : "", - "JPUSH_APPKEY_ANDROID" : "", + "JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3", + "JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3", + "JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e", "JPUSH_CHANNEL_ANDROID" : "", "__plugin_info__" : { "name" : "JG-JCore", "description" : "极光推送JCore插件", "platforms" : "Android,iOS", "url" : "", - "android_package_name" : "", + "android_package_name" : "uni.UNI3A527D1", "ios_bundle_id" : "", "isCloud" : false, "bought" : -1, @@ -74,7 +180,7 @@ "JPUSH_APPKEY_IOS" : { "des" : "[iOS]极光portal配置应用信息时分配的AppKey", "key" : "JCore:APP_KEY", - "value" : "" + "value" : "daebe19b547c43128796a078" }, "JPUSH_CHANNEL_IOS" : { "des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default", @@ -95,9 +201,9 @@ } }, "JG-JPush" : { - "JPUSH_ISPRODUCTION_IOS" : "", + "JPUSH_ISPRODUCTION_IOS" : "true", "JPUSH_ADVERTISINGID_IOS" : "", - "JPUSH_DEFAULTINITJPUSH_IOS" : "", + "JPUSH_DEFAULTINITJPUSH_IOS" : "true", "JPUSH_OPPO_APPKEY" : "", "JPUSH_OPPO_APPID" : "", "JPUSH_OPPO_APPSECRET" : "", @@ -112,7 +218,7 @@ "description" : "极光推送Hbuilder插件", "platforms" : "Android,iOS", "url" : "", - "android_package_name" : "", + "android_package_name" : "uni.UNI3A527D1", "ios_bundle_id" : "", "isCloud" : false, "bought" : -1, @@ -187,10 +293,19 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "", + "appid" : "wxfb4695444ab8d0d0", "setting" : { - "urlCheck" : false + "urlCheck" : false, + "minified" : true, + "postcss" : true, + "es6" : true }, + "permission" : { + "scope.userLocation" : { + "desc" : "获取您的位置" + } + }, + "requiredPrivateInfos" : [ "getLocation", "chooseAddress" ], "usingComponents" : true }, "mp-alipay" : { @@ -202,8 +317,34 @@ "mp-toutiao" : { "usingComponents" : true }, - "uniStatistics" : { - "enable" : false - }, - "vueVersion" : "2" + "h5" : { + "devServer" : { + "proxy" : { + "baseUrlTest/api" : { + "target" : "https://ceshi-middle.lihaink.cn", + "changeOrigin" : true, + "pathRewrite" : { + "^/baseUrlTest/api" : "/api" + } + } + } + }, + "router" : { + "mode" : "history", + "base" : "" + }, + "domain" : "", + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7" + } + } + }, + "title" : "加载中...", + "template" : "template.h5.html" + } } +//拨打电话权限关闭 +/* ios打包配置 */ + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b8e02f6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,17 @@ +{ + "name": "lihaiCenter", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "crypto-js": "^4.1.1" + } + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f84940e --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "crypto-js": "^4.1.1" + } +} diff --git a/pages.json b/pages.json index 34c0b2b..279c9de 100644 --- a/pages.json +++ b/pages.json @@ -17,35 +17,53 @@ "navigationBarTitleText": "个人", "enablePullDownRefresh": false } - } - ,{ - "path" : "pages/login/login", - "style" : - { - "navigationBarTitleText": "登录", - "enablePullDownRefresh": false - } - - } - ,{ - "path": "uni_modules/guyue-updater/pages/updater", - "style": { + }, { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录", + "enablePullDownRefresh": false + } + + }, { + "path": "uni_modules/guyue-updater/pages/updater", + "style": { "app-plus": { - "animationDuration": 200, - "animationType": "fade-in", - "background": "transparent", - "backgroundColorTop": "transparent", - "bounce": "none", - "popGesture": "none", - "scrollIndicator": false, - "titleNView": false + "animationDuration": 200, + "animationType": "fade-in", + "background": "transparent", + "backgroundColorTop": "transparent", + "bounce": "none", + "popGesture": "none", + "scrollIndicator": false, + "titleNView": false }, "backgroundColor": "transparent", "disableScroll": true, "navigationStyle": "custom" + } + }, { + "path": "pages/error/error", + "style": { + "navigationBarTitleText": "错误", + "enablePullDownRefresh": false + } + + }, { + "path": "pages/user/user", + "style": { + "navigationBarTitleText": "用户", + "enablePullDownRefresh": false + } + + },{ + "path": "pages/user/updatePassword", + "style": { + "navigationBarTitleText": "修改密码", + "enablePullDownRefresh": false + } + } -} -], + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "里海中心平台", @@ -57,8 +75,7 @@ "selectedColor": "#0122C7", "borderStyle": "white", "backgroundColor": "#ffffff", - "list": [ - { + "list": [{ "pagePath": "pages/index/index", "text": "首页" }, diff --git a/pages/error/error.vue b/pages/error/error.vue new file mode 100644 index 0000000..1abe786 --- /dev/null +++ b/pages/error/error.vue @@ -0,0 +1,30 @@ + + + 网站已关闭 + + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 906b394..1fb6918 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -19,10 +19,18 @@ }, methods: { test() { - mp.loadMP({ - id: '__UNI__3A527D1', - file: '/static/wgt/__UNI__3A527D1.wgt' + // mp.loadMPlocalhost({ + // id: '__UNI__3A527D1', + // file: '/static/wgt/__UNI__3A527D1.wgt' + // }) + mp.loadMPlocalhost({ + id: '__UNI__9EDFE40', + file: '/static/wgt/__UNI__9EDFE40.wgt' }) + // mp.loadMPlocalhost({ + // id: '__UNI__1EE148C', + // file: '/static/wgt/__UNI__1EE148C.wgt' + // }) } } } diff --git a/pages/login/login.vue b/pages/login/login.vue index 848227e..a4d8bbb 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -1,1282 +1,1288 @@ - - - - - - - - - - - - {{ item }} - - - - - - - - - - - - - - - - - - - 立即注册 - - 忘记密码 - - + + + + + + + + + + + + {{ item }} + + + + + + + + + + + + + + + + + + + 立即注册 + + 忘记密码 + + - - - - - - - - - - - - - - - - {{ text }} - - - - - - - - - - - - - + + + + + + + + - 登录 - 登录 - - - - 我已同意《用户协议》与《隐私政策》 - - - - - - 注册账号 - - - - - - - - - - - - - - {{ text }} - - - - - - - - - - - - - - - - - - - - - - - 已有账号? - 去登录 - - - 注册 - - - - 我已同意《用户协议》与《隐私政策》 - - - - - - - - - 用户协议与隐私政策 - - - - - - - - - - - - - - - - - - {{ text }} - - - - - - - - - 我已同意《用户协议》与《隐私政策》 - - - - 确认绑定 - 返回 - - - - {{ copyright.status == -1 ? `${copyright.year} ${copyright.url}` : copyright.Copyright }} - + + + - - + + + {{ text }} + + + + + + + + + + + + + + + 登录 + 登录 + + + + 我已同意《用户协议》与《隐私政策》 + + + + + + 注册账号 + + + + + + + + + + + + + + {{ text }} + + + + + + + + + + + + + + + + + + + + + + + 已有账号? + 去登录 + + + 注册 + + + + 我已同意《用户协议》与《隐私政策》 + + + + + + + + + 用户协议与隐私政策 + + + + + + + + + + + + + + + + + + {{ text }} + + + + + + + + + 我已同意《用户协议》与《隐私政策》 + + + + 确认绑定 + 返回 + + + + {{ copyright.status == -1 ? `${copyright.year} ${copyright.url}` : copyright.Copyright }} + + + + + \ No newline at end of file diff --git a/pages/my/my.vue b/pages/my/my.vue index bee39cf..7760b68 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,23 +1,492 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.nickname }} + + + + 当前账号 + + + 使用账号 + + + + + + + 头像 + + + + + + + + + + + + ID号 + + + + + + + 手机号码 + + 点击绑定手机号 + + + + + + + + 登录密码 + + + + + + + + 当前版本 + + + + + + + + 退出登录 + + + 退出登录 + + + + + + - - + .radius { + background-color: white; + width: 35rpx; + height: 35rpx; + border-radius: 50%; + border: 1px solid rgb(187, 43, 5); + line-height: 25rpx; + text-align: center; + position: absolute; + right: 0; + bottom: 0; + } + + .iconfonta { + border-radius: 50%; + font-size: 20rpx; + color: red; + } + + .avatar { + width: 120rpx; + height: 120rpx; + border-radius: 50%; + } + + .btnb { + border-radius: 0; + height: 100rpx; + line-height: 100rpx; + } + + .btna { + height: 100rpx; + line-height: 100rpx; + border-radius: 10rpx 10rpx 0 0; + } + + .btnc { + height: 130rpx; + line-height: 130rpx; + border-radius: 0; + } + + .personal-data { + padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/ + padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS<11.2/ + } + + .personal-data .wrapper { + margin: 10rpx 0; + background-color: #fff; + padding: 36rpx 30rpx 13rpx 30rpx; + } + + .personal-data .wrapper .title { + margin-bottom: 30rpx; + font-size: 32rpx; + color: #282828; + } + + .personal-data .wrapper .wrapList .item { + width: 690rpx; + height: 160rpx; + background-color: #f8f8f8; + border-radius: 20rpx; + margin-bottom: 22rpx; + padding: 0 30rpx; + position: relative; + border: 2rpx solid #f8f8f8; + box-sizing: border-box; + } + + .t-color { + color: var(--view-theme); + } + + .personal-data .wrapper .wrapList .item.on { + border-color: var(--view-theme); + border-radius: 20rpx; + //background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArIAAACgCAYAAADw+I85AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2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Ozvw1WAcrsgAAo2M1NoRV/iBkAQDGZeYlCPdCFgBgXHK7XYjYZrRAyAIAjMi5r8am+nI3rHoAAITsGNyWmBWyAAAjkncrOOexgjxSsBreIGQBAMbh8oyfew7Y2+0bhSwAgJA9ZQ+7Ivbcyx4AQMietvt9EStkAQDGIc/HntO/pKcSsCtlDwAwbufUbHkV9i4MdifwogAAjNfUdyvIJzhYhcHJDtQ9AMA0TGmsIJVYzZfH0B7M9fiRX/R/AQYA1i4UF+HkevkAAAAASUVORK5CYII="); + background-size: 100% 100%; + background-color: var(--view-minorColor); + background-repeat: no-repeat; + } + + .personal-data .wrapper .wrapList .item .picTxt { + width: 445rpx; + } + + .personal-data .wrapper .wrapList .item .picTxt .pictrue { + width: 96rpx; + height: 96rpx; + position: relative; + } + + .personal-data .wrapper .wrapList .item .picTxt .pictrue image { + width: 100%; + height: 100%; + border-radius: 50%; + } + + .personal-data .wrapper .wrapList .item .picTxt .text { + width: 325rpx; + } + + .personal-data .wrapper .wrapList .item .picTxt .text .name { + width: 100%; + font-size: 30rpx; + color: #282828; + } + + .personal-data .wrapper .wrapList .item .picTxt .text .phone { + font-size: 24rpx; + color: #999; + margin-top: 10rpx; + } + + .personal-data .wrapper .wrapList .item .bnt { + font-size: 24rpx; + background-color: #fff; + border-radius: 27rpx; + width: 140rpx; + height: 54rpx; + border: 2rpx solid var(--view-theme); + } + + .personal-data .wrapper .wrapList .item .currentBnt { + position: absolute; + right: 0; + top: 0; + font-size: 26rpx; + background-color: var(--view-minorColor); + width: 140rpx; + height: 48rpx; + border-radius: 0 20rpx 0 20rpx; + } + + .personal-data .list { + margin-top: 15rpx; + background-color: #fff; + } + + .personal-data .list .item { + padding: 30rpx 30rpx 30rpx 0; + border-bottom: 1px solid #f2f2f2; + margin-left: 30rpx; + font-size: 32rpx; + color: #282828; + } + + .personal-data .list .item .phone { + width: 160rpx; + height: 56rpx; + font-size: 24rpx; + color: #fff; + line-height: 56rpx; + border-radius: 32rpx + } + + .personal-data .list .item .pictrue { + width: 88rpx; + height: 88rpx; + } + + .personal-data .list .item .pictrue image { + width: 100%; + height: 100%; + border-radius: 50%; + } + + .personal-data .list .item .input { + min-width: 415rpx; + text-align: right; + color: #868686; + } + + .personal-data .list .item .input .id { + width: 365rpx; + } + + .personal-data .list .item .input .iconfont { + font-size: 35rpx; + } + + .personal-data .modifyBnt { + font-size: 32rpx; + color: #fff; + width: 690rpx; + height: 90rpx; + border-radius: 50rpx; + text-align: center; + line-height: 90rpx; + margin: 76rpx auto 0 auto; + background: var(--view-theme); + } + + .personal-data .logOut { + font-size: 32rpx; + text-align: center; + width: 690rpx; + height: 90rpx; + border-radius: 45rpx; + margin: 30rpx auto 0 auto; + color: var(--view-theme); + border: 1px solid var(--view-theme); + } + + .avatar-box { + width: 96rpx; + height: 96rpx; + background: transparent; + + image { + width: 100%; + height: 100%; + border-radius: 50%; + } + } + \ No newline at end of file diff --git a/pages/user/updatePassword.vue b/pages/user/updatePassword.vue new file mode 100644 index 0000000..302f6c2 --- /dev/null +++ b/pages/user/updatePassword.vue @@ -0,0 +1,306 @@ + + + + + + + + + + + {{userInfo.account}} + + + + + {{ text }} + + + + + + + + + + + + + + + + 确认 + + + + + + + + + + + diff --git a/pages/user/user.vue b/pages/user/user.vue new file mode 100644 index 0000000..bee39cf --- /dev/null +++ b/pages/user/user.vue @@ -0,0 +1,23 @@ + + + + + + + diff --git a/static/images/code_1.png b/static/images/code_1.png new file mode 100644 index 0000000..9d98bd9 Binary files /dev/null and b/static/images/code_1.png differ diff --git a/static/wgt/__UNI__1EE148C.wgt b/static/wgt/__UNI__1EE148C.wgt new file mode 100644 index 0000000..976e349 Binary files /dev/null and b/static/wgt/__UNI__1EE148C.wgt differ diff --git a/static/wgt/__UNI__9EDFE40.wgt b/static/wgt/__UNI__9EDFE40.wgt new file mode 100644 index 0000000..20bc707 Binary files /dev/null and b/static/wgt/__UNI__9EDFE40.wgt differ diff --git a/store/modules/app.js b/store/modules/app.js index 6436c7a..1aaf76b 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -16,7 +16,7 @@ const state = { location: Cache.get('LOCATION_DATA', true) || {}, token: Cache.get(LOGIN_STATUS) || null, backgroundColor: "#fff", - userInfo: Cache.get(USER_INFO)||null, + userInfo: Cache.get(USER_INFO, true)||null, uid: Cache.get(UID) || null, globalData: uni.getStorageSync('GLOBAL_DATA') || {}, homeActive: false, @@ -38,6 +38,7 @@ const mutations = { uni.removeStorageSync('auth_token'); }, SET_USERINFO(state, opt){ + console.log(opt); state.userInfo = opt; Cache.set(USER_INFO, opt); }, diff --git a/uni.scss b/uni.scss index 282e962..9026f7a 100644 --- a/uni.scss +++ b/uni.scss @@ -13,6 +13,10 @@ */ /* 颜色变量 */ +@import '@/uni_modules/uview-ui/theme.scss'; +/* 颜色变量 */ +$uni-theme-color: #f45846; +$uni-theme-bg-color: linear-gradient(180deg, #f98649 0%, #f34e45 100%); /* 行为相关颜色 */ $uni-color-primary: #007aff; diff --git a/utils/encrypt.js b/utils/encrypt.js new file mode 100644 index 0000000..fa84ebd --- /dev/null +++ b/utils/encrypt.js @@ -0,0 +1,66 @@ +import Base64 from "@/utils/base64.js" +import cryptoJS from "crypto-js" + +const key_code = 'gxzhptxiaochengxu_1'; + +// 加密 +const encode = (key, data='')=>{ + try{ + let str; + typeof data == 'object'? str = JSON.stringify(data) : str = data; + str = cryptoJS.AES.encrypt(str, key_code).toString(); + uni.setStorageSync(key, str) + return true; + }catch(e){ + console.log(e); + return false; + } +} + +// 解密 +const decode = (key)=>{ + try{ + let str = uni.getStorageSync(key); + str = cryptoJS.AES.decrypt(str, key_code).toString(cryptoJS.enc.Utf8); + isJSON(str) ? str = JSON.parse(str) : null; + return str; + }catch(e){ + console.log(e); + return undefined; + } +} + +const isJSON = (str)=>{ + try{ + JSON.parse(str) + return true; + }catch(e){ + return false; + } +} + + +const LOGIN = ()=>{ + return new Promise((reslove, reject) => { + uni.request({ + url: Url + '/api' + url, + method: 'POST', + data: data, + success: (res) => { + + }, + fail: (message) => { + uni.showToast({ + title: '网络错误', + icon: 'none' + }) + reject('请求失败'); + } + }) + }); +} + +export default { + encode, + decode +} \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index f1d77b5..723cc35 100644 --- a/utils/request.js +++ b/utils/request.js @@ -7,9 +7,11 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- -import { HTTP_REQUEST_URL, HEADER, TOKENNAME } from '@/config/app'; +import { HTTP_REQUEST_URL, HEADER, TOKENNAME, MD5KEY } from '@/config/app'; import { checkLogin } from '../libs/login'; +import { Toast } from "../libs/uniApi.js"; import store from '../store'; +import cryptoJS from "crypto-js" function toLogin() { @@ -30,6 +32,9 @@ function baseRequest(url, method, data, { }) { let Url = HTTP_REQUEST_URL, header = HEADER; + header.timestamp = Date.now(); + header.sign = cryptoJS.MD5(`appid=${header.appid}×tamp=${header.timestamp}&url=${header.url}&key=${MD5KEY}`).toString(); + // 以上是中台必要的请求头加密校验,请勿更改 if (!noAuth) { //登录过期自动登录 @@ -41,32 +46,30 @@ function baseRequest(url, method, data, { } } - if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; + if (store.state.app.token) header[TOKENNAME] = store.state.app.token; return new Promise((reslove, reject) => { uni.request({ url: Url + '/api/' + url, + // url: '/baseUrlTest/api/'+url, method: method || 'GET', header: header, data: data || {}, success: (res) => { - // #ifdef APP-PLUS - // console.log('app', Url + '/api/' + url, res.data); - // #endif if (noVerify) reslove(res.data, res); - else if (res.data.status == 200) + else if (res.data.code == 200||res.data.code == 1) reslove(res.data, res); - else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) { + else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) { toLogin(); reject(res.data); - } else if (res.data.status == 501) { + } else if (res.data.code == 501) { uni.reLaunch({ - url: '/pages/error/index' + url: '/pages/error/error' }) reject(res.data); } else - reject(res.data.message || '系统错误'); + reject(res.data.msg || '系统错误'); }, fail: (message) => { reject('请求失败'); diff --git a/utils/uniMP.js b/utils/uniMP.js index ed86f2a..142a975 100644 --- a/utils/uniMP.js +++ b/utils/uniMP.js @@ -216,6 +216,18 @@ const loadMPurl = async (e) => { }; +// 加载本地自带小程序 +const loadMPlocalhost = async (e) => { + appid = e.id; + wgtFile = e.file; + uni.showLoading({ + title: '初始化中...', + mask: true + }) + installMP(); + +}; + // 小程序版本信息 const getVersion = (id) => { appid = id; @@ -284,6 +296,7 @@ export default { loadMP, loadMPurl, loadMPx, + loadMPlocalhost, installMP, doInstallMP, getVersion,