diff --git a/manifest.json b/manifest.json index d3a2f0b..85daf63 100644 --- a/manifest.json +++ b/manifest.json @@ -95,7 +95,7 @@ "vueVersion" : "3", "h5" : { "router" : { - "base" : "/h5x/", + "base" : "/h5/", "mode" : "hash" }, "devServer" : { diff --git a/pages/auth/login.vue b/pages/auth/login.vue index a91e3f2..6b9ff1c 100644 --- a/pages/auth/login.vue +++ b/pages/auth/login.vue @@ -34,10 +34,10 @@ - + @@ -235,7 +235,23 @@ }) } }, + ranStr(e) { + //形参e,需要产生随机字符串的长度 + //如果没有传参,默认生成32位长度随机字符串 + e = e || 32; + //模拟随机字符串库 + var t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789", + a = t.length,//字符串t的长度,随机数生成最大值 + n = ""; + for (let i = 0; i < e; i++) { + //随机生成长度为e的随机字符串拼接 + n += t.charAt(Math.floor(Math.random() * a)); + } + //返回随机组合字符串 + return n + }, bindXX() { + let that = this; // #ifdef APP-PLUS let userInfo = uni.getStorageSync("userInfo") let secret = that.ranStr(12) @@ -249,6 +265,19 @@ uni.setStorageSync('mySecret', JSON.stringify(mySecret)) }).catch(e => {}) // #endif + // #ifdef H5 + let userInfo = uni.getStorageSync("userInfo") + let secret = that.ranStr(12) + let mySecret = { + 'username': userInfo.username, + 'secret': secret + } + this.$api.bindSecret({ + secret: secret + }).then(res => { + uni.setStorageSync('mySecret', JSON.stringify(mySecret)) + }).catch(e => {}) + // #endif // #ifdef MP-WEIXIN if(this.wxmp_openid != null) { this.$api.bindWxmp({"openid": this.wxmp_openid}).then(res=>{ diff --git a/pages/index/index.vue b/pages/index/index.vue index aea3518..bc02ffc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -8,7 +8,7 @@ - + @@ -22,7 +22,7 @@ - + 待办 3 @@ -56,25 +56,20 @@ moduleList: [{ navigate:'/pages/ofm/booking', url: '/static/yuding.png', - text: '预定会议室', + text: '会议预定', type: "primary", }, { navigate:'/pages/ofm/bookingRecord', url: '/static/meetingRecord.png', - text: '历史预定', + text: '预定记录', type: "success" }, { navigate:'/pages/ofm/mroom', url: '/static/huiyishi.png', - text: '会议室列表', + text: '会议室', type: "warning" - }, - { - url: '/static/renyuan.png', - text: '人员列表', - type: "error" } ] } @@ -109,16 +104,16 @@ \ No newline at end of file