Commit 01078be8 authored by 刘文虎's avatar 刘文虎

更改用户授权方式-无需用户授权-code+手机验证码登录

parent 87f94581
......@@ -138,9 +138,9 @@ export default {
this.profileSet(this)
this.profileAppend(this)
} else {
uni.navigateTo({
url: "pages/login/index",
});
// uni.navigateTo({
// url: "pages/login/index",
// });
}
} else {
uni.showModal({
......
let commonApiFun = function(vm){
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let commonApiFun = function(vm){
/* 登录 */
let loginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization', params, {'content-type': 'application/x-www-form-urlencoded'});
/* 2023-04-18 新版登录 */
let newLoginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization/v2', params, {'content-type': 'application/x-www-form-urlencoded'});
/* 发送验证码 */
let sendCode = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/sendMessage', params, {'content-type': 'application/x-www-form-urlencoded'});
// 水印-查询用户自定义设置
let getUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark', params);
// 水印-保存用户自定义设置
......@@ -9,6 +16,8 @@ let commonApiFun = function(vm){
const commonApi = {
loginWechatAuth,
newLoginWechatAuth,
sendCode,
getUserWatermark,
saveUserWatermark,
saveImage
......
{
"name" : "自营平台",
"name" : "扳手会",
"appid" : "__UNI__05F3AA2",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"networkTimeout" : {
"connectSocket": 100000,
"uploadFile": 100000,
"downloadFile": 100000
"connectSocket" : 100000,
"uploadFile" : 100000,
"downloadFile" : 100000
},
"app-plus" : {
"optimization" : {
......@@ -67,7 +67,6 @@
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
/* 微信小程序特有相关 */
"appid" : "wx402a711597dddbaf",
"optimization" : {
"subPackages" : true
......@@ -80,22 +79,17 @@
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "方便查看订单与你的距离"
}
},
"requiredPrivateInfos": ["getLocation", "onLocationChange", "startLocationUpdate"],
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序获取所在地与订单地点的距离"
"desc" : "你的位置信息将用于小程序获取所在地与订单地点的距离"
}
},
"requiredPrivateInfos" : [ "getLocation", "onLocationChange", "startLocationUpdate" ],
"uniStatistics" : {
"enable" : true
},
"plugins": {
"contactPlugin": {
"version": "1.4.4",
"provider": "wx104a1a20c3f81ec2"
"plugins" : {
"contactPlugin" : {
"version" : "1.4.4",
"provider" : "wx104a1a20c3f81ec2"
}
}
},
......
......@@ -40,7 +40,7 @@
{
"path": "pages/login/index",
"style": {
// "navigationBarTitleText": "授权登录",
"navigationBarTitleText": "绑定手机",
"navigationBarBackgroundColor": "#FFFFFF",
"disableScroll": true
}
......
......@@ -205,6 +205,10 @@ export default {
this.loaded = true;
} else {
this.loaded = true;
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
}
},
loadMessageList() {
......
......@@ -787,6 +787,13 @@ export default {
},
//跳转到assessment页面
aaa(index) {
if (!this.vuex_token) {
uni.showToast({
icon:'none',
title:"请先登录"
})
return false;
}
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//考试完成分成通过、未通过
getApp().globalData.questionTime = this.examList[index].questionTime;
......
......@@ -272,7 +272,11 @@ export default {
app.getBaseInfo(self);
},
handleClick(path, isWarehouse) {
if (this.vuex_token) {
if(path==='about/about'){
this.$u.route({
url: 'pages/mine/' + path
});
}else if (this.vuex_token) {
// 没入驻不能进入仓配相关页面
if (isWarehouse && this.needSettled) {
this.$refs.uToast.show({
......
This diff is collapsed.
This diff is collapsed.
......@@ -40,13 +40,14 @@
},
methods: {
handleClick(path) {
if(this.vuex_token) {
this.$u.route({
url: 'pages/mine/' + path
})
} else {
this.$u.route({url: "pages/login/index"})
}
this.$u.route({
url: 'pages/mine/' + path
})
// if(this.vuex_token) {
// } else {
// this.$u.route({url: "pages/login/index"})
// }
},
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment