Browse Source

移除uniap默认密码

master
xsx 2 years ago
parent
commit
735d9e6deb
  1. 10
      im-platform/src/main/resources/application.yml
  2. 2
      im-server/src/main/resources/application.yml
  3. 1
      im-ui/src/store/index.js
  4. 8
      im-uniapp/package.json
  5. 9
      im-uniapp/pages/login/login.vue

10
im-platform/src/main/resources/application.yml

@ -7,7 +7,7 @@ spring:
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/box-im?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true url: jdbc:mysql://localhost:3306/box-im?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
username: root username: root
password: root password: root123456
redis: redis:
host: 127.0.0.1 host: 127.0.0.1
@ -29,11 +29,11 @@ mybatis-plus:
# *.xml的具体路径 # *.xml的具体路径
- classpath*:mapper/*.xml - classpath*:mapper/*.xml
minio: minio:
endpoint: http://127.0.0.1:9001 #内网地址 endpoint: http://42.194.187.243:9001 #内网地址
public: http://127.0.0.1:9001 #外网访问地址 public: http://42.194.187.243:9001 #外网访问地址
accessKey: admin accessKey: admin
secretKey: 12345678 secretKey: admin123456
bucketName: box-im bucketName: box-im2
imagePath: image imagePath: image
filePath: file filePath: file

2
im-server/src/main/resources/application.yml

@ -12,7 +12,7 @@ websocket:
port: 8878 port: 8878
tcpsocket: tcpsocket:
enable: false # 暂时不开启 enable: true # 暂时不开启
port: 8879 port: 8879
jwt: jwt:

1
im-ui/src/store/index.js

@ -25,7 +25,6 @@ export default new Vuex.Store({
this.commit("initGroupStore"); this.commit("initGroupStore");
this.commit("initChatStore"); this.commit("initChatStore");
} }
}, },
strict: process.env.NODE_ENV !== 'production' strict: process.env.NODE_ENV !== 'production'
}) })

8
im-uniapp/package.json

@ -6,16 +6,16 @@
"browser":"chrome", "browser":"chrome",
"env": { "env": {
"UNI_PLATFORM": "h5", "UNI_PLATFORM": "h5",
"BASE_URL": "http://192.168.1.5:8888", "BASE_URL": "http://192.168.43.6:8888",
"WS_URL": "ws://192.168.1.5:8878/im" "WS_URL": "ws://192.168.43.6:8878/im"
} }
}, },
"dev-wx-mini": { "dev-wx-mini": {
"title": "开发环境-微信小程序", "title": "开发环境-微信小程序",
"env": { "env": {
"UNI_PLATFORM": "mp-weixin", "UNI_PLATFORM": "mp-weixin",
"BASE_URL": "http://192.168.1.5:8888", "BASE_URL": "http://192.168.43.6:8888",
"WS_URL": "ws://192.168.1.5:8878/im" "WS_URL": "ws://192.168.43.6:8878/im"
} }
}, },
"prod-h5": { "prod-h5": {

9
im-uniapp/pages/login/login.vue

@ -20,8 +20,8 @@
return { return {
loginForm: { loginForm: {
terminal: 1, // APP terminal: 1, // APP
userName: 'blue', userName: '',
password: '123456' password: ''
}, },
rules: { rules: {
userName: { userName: {
@ -48,6 +48,9 @@
}).then(data => { }).then(data => {
console.log("登录成功,自动跳转到聊天页面...") console.log("登录成功,自动跳转到聊天页面...")
uni.setStorageSync("loginInfo", data); uni.setStorageSync("loginInfo", data);
uni.setStorageSync("userName", this.loginForm.userName);
uni.setStorageSync("password", this.loginForm.password);
// App.vue // App.vue
getApp().init() getApp().init()
// //
@ -58,6 +61,8 @@
} }
}, },
onLoad() { onLoad() {
this.loginForm.userName = uni.getStorageSync("userName");
this.loginForm.password = uni.getStorageSync("password");
let loginInfo = uni.getStorageSync("loginInfo"); let loginInfo = uni.getStorageSync("loginInfo");
if (loginInfo) { if (loginInfo) {
// //

Loading…
Cancel
Save