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

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

parent 87f94581
...@@ -138,9 +138,9 @@ export default { ...@@ -138,9 +138,9 @@ export default {
this.profileSet(this) this.profileSet(this)
this.profileAppend(this) this.profileAppend(this)
} else { } else {
uni.navigateTo({ // uni.navigateTo({
url: "pages/login/index", // url: "pages/login/index",
}); // });
} }
} else { } else {
uni.showModal({ 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'}); 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); 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){ ...@@ -9,6 +16,8 @@ let commonApiFun = function(vm){
const commonApi = { const commonApi = {
loginWechatAuth, loginWechatAuth,
newLoginWechatAuth,
sendCode,
getUserWatermark, getUserWatermark,
saveUserWatermark, saveUserWatermark,
saveImage saveImage
......
{ {
"name" : "自营平台", "name" : "扳手会",
"appid" : "__UNI__05F3AA2", "appid" : "__UNI__05F3AA2",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"networkTimeout" : { "networkTimeout" : {
"connectSocket": 100000, "connectSocket" : 100000,
"uploadFile": 100000, "uploadFile" : 100000,
"downloadFile": 100000 "downloadFile" : 100000
}, },
"app-plus" : { "app-plus" : {
"optimization" : { "optimization" : {
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
"quickapp" : {}, "quickapp" : {},
/* 快应用特有相关 */ /* 快应用特有相关 */
"mp-weixin" : { "mp-weixin" : {
/* 微信小程序特有相关 */
"appid" : "wx402a711597dddbaf", "appid" : "wx402a711597dddbaf",
"optimization" : { "optimization" : {
"subPackages" : true "subPackages" : true
...@@ -80,22 +79,17 @@ ...@@ -80,22 +79,17 @@
"usingComponents" : true, "usingComponents" : true,
"permission" : { "permission" : {
"scope.userLocation" : { "scope.userLocation" : {
"desc" : "方便查看订单与你的距离" "desc" : "你的位置信息将用于小程序获取所在地与订单地点的距离"
}
},
"requiredPrivateInfos": ["getLocation", "onLocationChange", "startLocationUpdate"],
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序获取所在地与订单地点的距离"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "onLocationChange", "startLocationUpdate" ],
"uniStatistics" : { "uniStatistics" : {
"enable" : true "enable" : true
}, },
"plugins": { "plugins" : {
"contactPlugin": { "contactPlugin" : {
"version": "1.4.4", "version" : "1.4.4",
"provider": "wx104a1a20c3f81ec2" "provider" : "wx104a1a20c3f81ec2"
} }
} }
}, },
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
// "navigationBarTitleText": "授权登录", "navigationBarTitleText": "绑定手机",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"disableScroll": true "disableScroll": true
} }
......
...@@ -205,6 +205,10 @@ export default { ...@@ -205,6 +205,10 @@ export default {
this.loaded = true; this.loaded = true;
} else { } else {
this.loaded = true; this.loaded = true;
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
} }
}, },
loadMessageList() { loadMessageList() {
......
...@@ -787,6 +787,13 @@ export default { ...@@ -787,6 +787,13 @@ export default {
}, },
//跳转到assessment页面 //跳转到assessment页面
aaa(index) { aaa(index) {
if (!this.vuex_token) {
uni.showToast({
icon:'none',
title:"请先登录"
})
return false;
}
//examStatus 用户考试状态 0考试中 1考试完成 2未参与 //examStatus 用户考试状态 0考试中 1考试完成 2未参与
//考试完成分成通过、未通过 //考试完成分成通过、未通过
getApp().globalData.questionTime = this.examList[index].questionTime; getApp().globalData.questionTime = this.examList[index].questionTime;
......
...@@ -272,7 +272,11 @@ export default { ...@@ -272,7 +272,11 @@ export default {
app.getBaseInfo(self); app.getBaseInfo(self);
}, },
handleClick(path, isWarehouse) { 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) { if (isWarehouse && this.needSettled) {
this.$refs.uToast.show({ this.$refs.uToast.show({
......
This diff is collapsed.
This diff is collapsed.
...@@ -40,13 +40,14 @@ ...@@ -40,13 +40,14 @@
}, },
methods: { methods: {
handleClick(path) { handleClick(path) {
if(this.vuex_token) { this.$u.route({
this.$u.route({ url: 'pages/mine/' + path
url: 'pages/mine/' + path })
}) // if(this.vuex_token) {
} else {
this.$u.route({url: "pages/login/index"}) // } 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