Commit 11b1b712 by LJM

js

parent 9172c69c
......@@ -179,7 +179,7 @@ export default {
},
toUrl() {
uni.navigateTo({
url: '/pages/mine/login'
url: '/pages/mine/auth'
});
},
gridClick(item, index) {
......
<template>
<view class="page-auth column rowCenter verCenter">
<text class="logo"></text>
<text class="title">SCM商务系统</text>
<text class="title">SCMWMS</text>
<button class="share row rowCenter verCenter" @tap="getUserProfileChange">
<text class="iconfont icon-jinggao1"></text>
<text class="t1">微信授权登录</text>
......@@ -47,7 +47,8 @@ export default {
wx.getUserProfile({
desc: '用于完善会员资料',
success: res => {
self.request(API.getOpenId, 'GET', { code: self.code }, true).then(data => {
self.request(API.getWechatInfo, 'GET', { code: self.code }, true).then(data => {
console.log(data);
if (data.err_code === 0) {
uni.setStorageSync('openid', data.data.openid);
uni.setStorageSync('session_key', data.data.session_key);
......
......@@ -14,6 +14,10 @@ const API = {
* */
login: API_BASE + '/supplywechatsignfor/login',
/**
* 获取用户微信信息
* */
getWechatInfo: API_BASE + '/supplywechatwms/getWechatInfo',
/**
* 上传文件
* */
upload: API_BASE + '/oss/upload',
......
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 sign in to comment