main
parent
34f3bde38d
commit
ba1a5ef6c8
@ -0,0 +1,28 @@ |
||||
{ |
||||
"version" : "1", |
||||
"prompt" : "template", |
||||
"title" : "服务协议与隐私政策", |
||||
"message" : "\t请务必审慎阅读、充分理解“服务协议与 隐私政策”各条款,包括但不限于:为了 向你提供即时通讯、内容分享等服务,我 们需要收集你的设备信息、操作日志等个 人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。<br/>\r\r |
||||
\t你可以阅读 <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>了解详细信息。如你同意,请点击“我同意”开始接受我们的服务。", |
||||
"buttonAccept" : "同意并接受", |
||||
"buttonRefuse" : "暂不同意", |
||||
"second" : { |
||||
"title" : "确认提示", |
||||
"message" : "进入应用前,你需先同意<a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_user_agree\">《用户协议》</a> 与 <a href=\"https://admin.njshengsong.cn/pages/users/user_about/index?from=sys_userr_privacy\">《隐私政策》</a>,否则将退出应用。", |
||||
"buttonAccept" : "同意并继续", |
||||
"buttonRefuse" : "退出应用" |
||||
}, |
||||
"styles" : { |
||||
"backgroundColor" : "#fff", |
||||
"borderRadius" : "5px", |
||||
"title" : { |
||||
"color" : "#000" |
||||
}, |
||||
"buttonAccept" : { |
||||
"color" : "#fff" |
||||
}, |
||||
"buttonRefuse" : { |
||||
"color" : "#ccc" |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,45 @@ |
||||
import { request } from './request' |
||||
const api = { |
||||
|
||||
//发送验证码
|
||||
sendMsm(data) { |
||||
return request({ |
||||
url: 'api/sendSmsCode', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
}, |
||||
//登录
|
||||
toLogin(data) { |
||||
return request({ |
||||
url: 'api/loginByCode', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
}, |
||||
//授权登录
|
||||
mnpLogin(data) { |
||||
return request({ |
||||
url: 'api/Login/mnpLogin', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
}, |
||||
//修改用户信息
|
||||
editMember(data) { |
||||
return request({ |
||||
url: 'api/user/profile', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
}, |
||||
//用户信息
|
||||
getMemberInfo(data) { |
||||
return request({ |
||||
url: 'api/user/getinfo', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
} |
||||
export default api |
@ -0,0 +1,52 @@ |
||||
import Vue from 'vue' |
||||
let baseUrl = 'https://zhengxin.njrenzhou.cn'; |
||||
Vue.prototype.$baseUrl = baseUrl; |
||||
|
||||
export function request(prams) { |
||||
return new Promise((resolve, reject) => { |
||||
let url; |
||||
url = baseUrl+"/"+prams.url; |
||||
console.log(url) |
||||
uni.request({ |
||||
url: url, |
||||
data: prams.data, |
||||
method: prams.method, |
||||
header: {
|
||||
"token": uni.getStorageSync('token'), |
||||
"Content-type": "application/x-www-form-urlencoded" |
||||
}, |
||||
success: (res) => { |
||||
if (res.data.code == 1 ){ |
||||
resolve(res.data); |
||||
}else if(res.data.code == 401){ |
||||
uni.showModal({ |
||||
title: "温馨提示", |
||||
content: "当前账号已过期,是否重新登录", |
||||
confirmColor: "#05754D", |
||||
success(res) { |
||||
uni.removeStorageSync("userInfo") |
||||
uni.removeStorageSync("token") |
||||
uni.navigateTo({ |
||||
url: "/pages/login/login" |
||||
}) |
||||
} |
||||
}) |
||||
} else { |
||||
reject(res.data); |
||||
uni.showToast({ |
||||
icon: "none", |
||||
title: res.data.msg, |
||||
duration: 3000 |
||||
}); |
||||
} |
||||
|
||||
}, |
||||
fail: (err) => { |
||||
reject(err); |
||||
}, |
||||
complete: () => { |
||||
//console.log('请求完成')
|
||||
} |
||||
}); |
||||
}) |
||||
} |
@ -0,0 +1 @@ |
||||
https://console-docs.apipost.cn/preview/fcdafa982d33921a/a79bbc0bf3e503dc |
Loading…
Reference in new issue