登录页面两种文章的获取
This commit is contained in:
parent
37fb325872
commit
b40da3b4c1
|
|
@ -24,11 +24,11 @@ export function getArticleByType(params = {}) {
|
||||||
*/
|
*/
|
||||||
export function getServiceTerms() {
|
export function getServiceTerms() {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/article/listByType',
|
url: '/app/article/getNew',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
status: 1,
|
appId: '1',
|
||||||
type: '5',
|
type: '1', // 1:服务条款
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -39,11 +39,11 @@ export function getServiceTerms() {
|
||||||
*/
|
*/
|
||||||
export function getPrivacyPolicy() {
|
export function getPrivacyPolicy() {
|
||||||
return request({
|
return request({
|
||||||
url: '/app/article/listByType',
|
url: '/app/article/getNew',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
status: 1,
|
appId: '1',
|
||||||
type: '6',
|
type: '2', // 2:隐私政策
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -231,27 +231,27 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const that = this
|
// 使用箭头函数保持this指向
|
||||||
uni.login({
|
uni.login({
|
||||||
success(res) {
|
success: (res) => {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
console.log('登录!', res)
|
console.log('登录!', res)
|
||||||
const data = {
|
const data = {
|
||||||
loginCode: res.code,
|
loginCode: res.code,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (that.pageLoading) {
|
if (this.pageLoading) {
|
||||||
that.pageLoading.show('登录中...')
|
this.pageLoading.show('登录中...')
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogin(data)
|
wxLogin(data)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
if (that.pageLoading) {
|
if (this.pageLoading) {
|
||||||
that.pageLoading.hide()
|
this.pageLoading.hide()
|
||||||
}
|
}
|
||||||
forceHideLoading()
|
forceHideLoading()
|
||||||
|
|
||||||
if (res.code == 200) {
|
if (res.code === 200) {
|
||||||
console.log(res, 'resres')
|
console.log(res, 'resres')
|
||||||
uni.setStorageSync('token', res.token)
|
uni.setStorageSync('token', res.token)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -260,7 +260,7 @@ export default {
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.ceshi()
|
this.ceshi()
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -269,9 +269,9 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
if (that.pageLoading) {
|
if (this.pageLoading) {
|
||||||
that.pageLoading.hide()
|
this.pageLoading.hide()
|
||||||
}
|
}
|
||||||
forceHideLoading()
|
forceHideLoading()
|
||||||
|
|
||||||
|
|
@ -283,7 +283,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail: (err) => {
|
||||||
console.error('微信登录失败:', err)
|
console.error('微信登录失败:', err)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '微信登录失败',
|
title: '微信登录失败',
|
||||||
|
|
@ -472,19 +472,19 @@ page {
|
||||||
|
|
||||||
.popup-body {
|
.popup-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 30rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terms-content {
|
.terms-content {
|
||||||
|
padding: 20rpx;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
padding-bottom: 20rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-footer {
|
.popup-footer {
|
||||||
|
|
@ -506,7 +506,7 @@ page {
|
||||||
.popup-btn {
|
.popup-btn {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
|
background: #f15a04;
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user