|
@@ -2,10 +2,10 @@
|
|
|
* Copyright(c) 2022 dongke All rights reserved. / Confidential
|
|
* Copyright(c) 2022 dongke All rights reserved. / Confidential
|
|
|
* 类的信息:
|
|
* 类的信息:
|
|
|
* 1.程序名称:
|
|
* 1.程序名称:
|
|
|
-* 2.功能描述:登录画面
|
|
|
|
|
|
|
+* 2.功能描述:欢迎页面画面
|
|
|
* 编辑履历:
|
|
* 编辑履历:
|
|
|
* 作者 日期 版本 修改内容
|
|
* 作者 日期 版本 修改内容
|
|
|
-* admin 2022-11-22 1.00 新建
|
|
|
|
|
|
|
+* 姜永辉 2022-11-22 1.00 新建
|
|
|
*******************************************************************************/
|
|
*******************************************************************************/
|
|
|
const app = getApp()
|
|
const app = getApp()
|
|
|
|
|
|
|
@@ -17,14 +17,14 @@ Page({
|
|
|
* 页面的初始数据
|
|
* 页面的初始数据
|
|
|
*/
|
|
*/
|
|
|
data: {
|
|
data: {
|
|
|
- backgroud: '/static/img/login.png'
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
*/
|
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
|
- console.log("welcome",options);
|
|
|
|
|
|
|
+ console.log("welcome", options);
|
|
|
// options 中的 scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
|
// options 中的 scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
|
|
if (options.scene) {
|
|
if (options.scene) {
|
|
|
var scene = decodeURIComponent(options.scene)
|
|
var scene = decodeURIComponent(options.scene)
|
|
@@ -58,6 +58,7 @@ Page({
|
|
|
onShow: function () {
|
|
onShow: function () {
|
|
|
// 登录 code
|
|
// 登录 code
|
|
|
this.wx_login()
|
|
this.wx_login()
|
|
|
|
|
+ console.log("app.global", app.globalData);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -123,8 +124,8 @@ Page({
|
|
|
app.globalData.user = res.data.data
|
|
app.globalData.user = res.data.data
|
|
|
app.globalData.token = res.data.data.accessToken
|
|
app.globalData.token = res.data.data.accessToken
|
|
|
wx.reLaunch({
|
|
wx.reLaunch({
|
|
|
- // url: '../../pages/home-page/home-page' ,
|
|
|
|
|
- url: '../../pages/home-page/home-page' ,
|
|
|
|
|
|
|
+ url: '../../pages/login/login' ,
|
|
|
|
|
+ // url: '../../pages/home-page/home-page',
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// if (res.data.code === Constants.SUCESS_CODE) {
|
|
// if (res.data.code === Constants.SUCESS_CODE) {
|
|
@@ -172,6 +173,17 @@ Page({
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 获取语言的方法
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2024/1/19
|
|
|
|
|
+ */
|
|
|
|
|
+ $t(name) {
|
|
|
|
|
+ if (this.data.$t[name]) {
|
|
|
|
|
+ return this.data.$t[name];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return name;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
})
|
|
})
|