提交 7ab36055 作者: wk

新闻时间格式

父级 68f9dc25
...@@ -45,6 +45,11 @@ const $date = { ...@@ -45,6 +45,11 @@ const $date = {
return date.getFullYear() + "-" + StringUtils.add0(date.getMonth() + 1) + "-" + StringUtils.add0(date return date.getFullYear() + "-" + StringUtils.add0(date.getMonth() + 1) + "-" + StringUtils.add0(date
.getDate()) + " " + StringUtils.add0(date.getHours()) + ":" + StringUtils.add0(date.getMinutes()) + .getDate()) + " " + StringUtils.add0(date.getHours()) + ":" + StringUtils.add0(date.getMinutes()) +
":" + StringUtils.add0(date.getSeconds()) ":" + StringUtils.add0(date.getSeconds())
},
stampToDay(time) {
var date = new Date(time)
return date.getFullYear() + "-" + StringUtils.add0(date.getMonth() + 1) + "-" + StringUtils.add0(date
.getDate())
} }
} }
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
} }
.tabbar-container .item-active { .tabbar-container .item-active {
color: #0B5794; color: #3B73FE;
} }
.tabbar-container .center-item { .tabbar-container .center-item {
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
return richtext; return richtext;
}, },
timeChange(time) { timeChange(time) {
return this.$date.stampToDate(time) return this.$date.stampToDay(time)
}, },
toLinkDetail(item) { toLinkDetail(item) {
uni.navigateTo({ uni.navigateTo({
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
}, },
methods: { methods: {
timeChange(time) { timeChange(time) {
return this.$date.stampToDate(time) return this.$date.stampToDay(time)
}, },
httpToHttps(url) { httpToHttps(url) {
return this.$imageUtils.httpToHttps(url) return this.$imageUtils.httpToHttps(url)
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
.shop-list-content { .shop-list-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 235px 30rpx 30rpx 30rpx; margin: 132px 30rpx 30rpx 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
padding: 30rpx; padding: 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
......
...@@ -98,6 +98,35 @@ ...@@ -98,6 +98,35 @@
} }
}) })
}, },
directLogin: function() {
Api.bindLogin({
data: {
unique_token: this.unique_token
}
}).then((result) => {
console.log("登录用户信息:", result);
if (result.code == 0) {
uni.setStorageSync("short_token", result.data.short_token)
uni.setStorageSync("token", result.data.access_token)
uni.setStorageSync("user_info", result.data)
uni.setStorageSync("company_id", result.data.comp_id)
uni.showToast({
title: "授权登录成功",
icon: 'none'
})
uni.switchTab({
url: "/pages/index/index"
})
} else {
uni.showToast({
title: result.msg,
icon: 'none'
})
}
}, (err) => {
this.$toast.showToast(err.msg)
})
},
getJsCode() { getJsCode() {
let _this = this; let _this = this;
// 1.wx获取登录用户code // 1.wx获取登录用户code
...@@ -124,6 +153,22 @@ ...@@ -124,6 +153,22 @@
}, },
}); });
} }
checkBind: function() {
Api.checkBind({
data: {
unique_token: this.unique_token
}
}).then((res) => {
let code = res.code
if (code == 0) { //已绑定直接登录
this.directLogin()
} else { //其他
this.wxPhoneLogin()
}
}, (err) => {
this.$toast.showToast(err.msg)
})
},
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment