小程序授权登录回复正常
110
App.vue
|
@ -1,8 +1,13 @@
|
||||||
|
<!-- <template>
|
||||||
|
<view>
|
||||||
|
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||||
|
scrolling="no" src="https://java.crmeb.net">
|
||||||
|
</iframe>
|
||||||
|
</view>
|
||||||
|
</template> -->
|
||||||
<script>
|
<script>
|
||||||
import { checkLogin } from "./libs/login";
|
import { checkLogin } from "./libs/login";
|
||||||
import { HTTP_REQUEST_URL } from './config/app';
|
import { HTTP_REQUEST_URL } from './config/app';
|
||||||
import Auth from './libs/wechat.js';
|
|
||||||
import Routine from './libs/routine.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
globalData: {
|
globalData: {
|
||||||
|
@ -23,16 +28,16 @@
|
||||||
switch (option.scene) {
|
switch (option.scene) {
|
||||||
//扫描小程序码
|
//扫描小程序码
|
||||||
case 1047:
|
case 1047:
|
||||||
// let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
|
||||||
that.globalData.spid = option.query.scene;
|
that.globalData.code = val.pid;
|
||||||
break;
|
break;
|
||||||
//长按图片识别小程序码
|
//长按图片识别小程序码
|
||||||
case 1048:
|
case 1048:
|
||||||
that.globalData.spid = option.query.scene;
|
that.globalData.code = option.query.scene;
|
||||||
break;
|
break;
|
||||||
//手机相册选取小程序码
|
//手机相册选取小程序码
|
||||||
case 1049:
|
case 1049:
|
||||||
that.globalData.spid = option.query.scene;
|
that.globalData.code = option.query.scene;
|
||||||
break;
|
break;
|
||||||
//直接进入小程序
|
//直接进入小程序
|
||||||
case 1001:
|
case 1001:
|
||||||
|
@ -47,100 +52,9 @@
|
||||||
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// #ifdef H5
|
|
||||||
let snsapiBase = 'snsapi_base';
|
|
||||||
let urlData = location.pathname + location.search;
|
|
||||||
if (!that.$store.getters.isLogin && Auth.isWeixin()) {
|
|
||||||
const { code, state, scope } = option.query;
|
|
||||||
if (code && location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
|
||||||
// 存储静默授权code
|
|
||||||
uni.setStorageSync('snsapiCode', code);
|
|
||||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
|
||||||
Auth.auth(code, that.$Cache.get('spread'))
|
|
||||||
.then(res => {
|
|
||||||
uni.setStorageSync('snRouter', decodeURIComponent(decodeURIComponent(option.query.back_url)));
|
|
||||||
if (res.type === 'register') {
|
|
||||||
this.$Cache.set('snsapiKey', res.key);
|
|
||||||
}
|
|
||||||
if(res.type === 'login'){
|
|
||||||
// let time = res.data.expires_time - this.$Cache.time();
|
|
||||||
this.$store.commit('LOGIN', {
|
|
||||||
token: res.token,
|
|
||||||
// time: time
|
|
||||||
});
|
|
||||||
// this.$store.commit('SETUID', res.data.userInfo.uid);
|
|
||||||
// this.$store.commit('UPDATE_USERINFO', res.data.userInfo);
|
|
||||||
//location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.$util.Tips({
|
|
||||||
title: error
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (!this.$Cache.has('snsapiKey')) {
|
|
||||||
console.log('app.vue页面中',location.pathname.indexOf('/pages/users/wechat_login/index') === -1)
|
|
||||||
//Auth.oAuth(snsapiBase, urlData);
|
|
||||||
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
|
|
||||||
Auth.oAuth(snsapiBase, urlData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (option.query.back_url) {
|
|
||||||
location.replace(uni.getStorageSync('snRouter'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #ifdef MP
|
|
||||||
// 小程序静默授权
|
|
||||||
if (!this.$store.getters.isLogin) {
|
|
||||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
|
||||||
Routine.getCode()
|
|
||||||
.then(code => {
|
|
||||||
Routine.authUserInfo(code,{'spread_spid': spread}).then(res => {
|
|
||||||
that.$store.commit('AuthorizeType', res.data.type);
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
// 小程序静默授权
|
|
||||||
silenceAuth(code) {
|
|
||||||
let that = this;
|
|
||||||
let spread = that.globalData.spid ? that.globalData.spid : 0;
|
|
||||||
silenceAuth({
|
|
||||||
code: code,
|
|
||||||
spread_spid: spread,
|
|
||||||
spread_code: that.globalData.code
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
if (res.data.token !== undefined && res.data.token) {
|
|
||||||
uni.hideLoading();
|
|
||||||
let time = res.data.expires_time - this.$Cache.time();
|
|
||||||
that.$store.commit('LOGIN', {
|
|
||||||
token: res.data.token,
|
|
||||||
time: time
|
|
||||||
});
|
|
||||||
that.$store.commit('SETUID', res.data.userInfo.uid);
|
|
||||||
that.$store.commit('UPDATE_USERINFO', res.data.userInfo);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
console.log(res);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
|
@ -195,4 +109,4 @@
|
||||||
height: 0;
|
height: 0;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
</style>
|
</style><!-- -->
|
|
@ -10,7 +10,8 @@
|
||||||
<button class='item grant' @click="setUserInfo">去授权</button>
|
<button class='item grant' @click="setUserInfo">去授权</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button>
|
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button> -->
|
||||||
|
<button hover-class="none" @tap="getUserProfile" class='item grant'>微信登录</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -58,6 +59,52 @@
|
||||||
this.setAuthStatus();
|
this.setAuthStatus();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getUserProfile() {
|
||||||
|
let self = this;
|
||||||
|
uni.showLoading({
|
||||||
|
title: '正在登录中'
|
||||||
|
});
|
||||||
|
Routine.getUserProfile()
|
||||||
|
.then(res => {
|
||||||
|
Routine.getCode()
|
||||||
|
.then(code => {
|
||||||
|
self.getWxUser(code, res);
|
||||||
|
})
|
||||||
|
.catch(res => {
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(res => {
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getWxUser(code, res) {
|
||||||
|
let self = this
|
||||||
|
let userInfo = res.userInfo;
|
||||||
|
userInfo.code = code;
|
||||||
|
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
|
||||||
|
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||||
|
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
||||||
|
userInfo.city = userInfo.userInfo.city;
|
||||||
|
userInfo.country = userInfo.userInfo.country;
|
||||||
|
userInfo.nickName = userInfo.userInfo.nickName;
|
||||||
|
userInfo.province = userInfo.userInfo.province;
|
||||||
|
userInfo.sex = userInfo.userInfo.gender;
|
||||||
|
userInfo.type = 'routine'
|
||||||
|
Routine.authUserInfo(code,userInfo).then(res=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
this.$emit('authColse',false);
|
||||||
|
this.$emit('onLoadFun',this.userInfo);
|
||||||
|
}).catch(res=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title:res.message,
|
||||||
|
icon:'none',
|
||||||
|
duration:2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
setAuthStatus(){
|
setAuthStatus(){
|
||||||
Routine.authorize().then(res=>{
|
Routine.authorize().then(res=>{
|
||||||
if(res.islogin === false)
|
if(res.islogin === false)
|
||||||
|
@ -71,6 +118,7 @@
|
||||||
},
|
},
|
||||||
getUserInfo(code){
|
getUserInfo(code){
|
||||||
Routine.getUserInfo().then(res=>{
|
Routine.getUserInfo().then(res=>{
|
||||||
|
console.log('res',res);
|
||||||
let userInfo = res.userInfo
|
let userInfo = res.userInfo
|
||||||
userInfo.code = code;
|
userInfo.code = code;
|
||||||
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import Cache from '../utils/cache';
|
import Cache from '../utils/cache';
|
||||||
import { Debounce } from '@/utils/validate.js'
|
|
||||||
// #ifdef H5 || APP-PLUS
|
// #ifdef H5 || APP-PLUS
|
||||||
import { isWeixin } from "../utils";
|
import { isWeixin } from "../utils";
|
||||||
import auth from './wechat';
|
import auth from './wechat';
|
||||||
|
@ -11,74 +10,31 @@ import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY} from './../config/c
|
||||||
function prePage(){
|
function prePage(){
|
||||||
let pages = getCurrentPages();
|
let pages = getCurrentPages();
|
||||||
let prePage = pages[pages.length - 1];
|
let prePage = pages[pages.length - 1];
|
||||||
// #ifndef APP-PLUS
|
|
||||||
return prePage.route;
|
return prePage.route;
|
||||||
// #endif
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
return prePage.$page.fullPath;
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const toLogin = Debounce(_toLogin,800)
|
export function toLogin(push, pathLogin) {
|
||||||
|
|
||||||
export function _toLogin(push, pathLogin) {
|
|
||||||
store.commit("LOGOUT");
|
store.commit("LOGOUT");
|
||||||
let path = prePage();
|
let path = prePage();
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// path = location.href;
|
path = location.href;
|
||||||
path = location.pathname + location.search;
|
|
||||||
// #endif
|
// #endif
|
||||||
if(!pathLogin)
|
if(!pathLogin)
|
||||||
pathLogin = '/page/users/login/index'
|
pathLogin = '/page/users/login/index'
|
||||||
Cache.set('login_back_url',path);
|
Cache.set('login_back_url',path);
|
||||||
// #ifdef H5
|
// #ifdef H5 || APP-PLUS
|
||||||
if (isWeixin()) {
|
if (isWeixin()) {
|
||||||
// auth.oAuth();
|
auth.oAuth();
|
||||||
let urlData = location.pathname + location.search
|
|
||||||
if (urlData.indexOf('?') !== -1) {
|
|
||||||
urlData += '&go_longin=1';
|
|
||||||
} else {
|
} else {
|
||||||
urlData += '?go_longin=1';
|
if (path !== pathLogin) {
|
||||||
}
|
push ? uni.navigateTo({
|
||||||
console.log('ppppp',Cache.has('snsapiKey'))
|
url:'/pages/users/login/index'
|
||||||
if (Cache.has('snsapiKey')) {
|
}) : uni.reLaunch({
|
||||||
uni.navigateTo({
|
url: '/pages/users/login/index'
|
||||||
url: '/pages/users/wechat_login/index',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// if (!Cache.has('snsapiKey')) {
|
|
||||||
|
|
||||||
// auth.oAuth('snsapi_base', urlData);
|
|
||||||
// } else {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/users/wechat_login/index',
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/users/login/index'
|
|
||||||
})
|
|
||||||
// if (path !== pathLogin) {
|
|
||||||
// push ? uni.navigateTo({
|
|
||||||
// url:'/pages/users/login/index'
|
|
||||||
// }) : uni.reLaunch({
|
|
||||||
// url: '/pages/users/login/index'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/users/wechat_login/index'
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/users/login/index'
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { checkLogin } from './login';
|
||||||
import { login } from '../api/public';
|
import { login } from '../api/public';
|
||||||
import Cache from '../utils/cache';
|
import Cache from '../utils/cache';
|
||||||
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
|
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
|
||||||
|
|
||||||
class Routine
|
class Routine
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,6 +25,16 @@ class Routine
|
||||||
getUserProfile(){
|
getUserProfile(){
|
||||||
let that = this , code = this.getUserCode();
|
let that = this , code = this.getUserCode();
|
||||||
return new Promise( (resolve,reject) => {
|
return new Promise( (resolve,reject) => {
|
||||||
|
// uni.getUserInfo({
|
||||||
|
// lang: 'zh_CN',
|
||||||
|
// success(user) {
|
||||||
|
// if(code) user.code = code;
|
||||||
|
// resolve({userInfo:user,islogin:false});
|
||||||
|
// },
|
||||||
|
// fail(res){
|
||||||
|
// reject(res);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
uni.getUserProfile({
|
uni.getUserProfile({
|
||||||
lang: 'zh_CN',
|
lang: 'zh_CN',
|
||||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||||
|
@ -65,6 +76,9 @@ class Routine
|
||||||
async getCode(){
|
async getCode(){
|
||||||
let provider = await this.getProvider();
|
let provider = await this.getProvider();
|
||||||
return new Promise((resolve,reject)=>{
|
return new Promise((resolve,reject)=>{
|
||||||
|
if(Cache.has(STATE_R_KEY)){
|
||||||
|
return resolve(Cache.get(STATE_R_KEY));
|
||||||
|
}
|
||||||
uni.login({
|
uni.login({
|
||||||
provider:provider,
|
provider:provider,
|
||||||
success(res) {
|
success(res) {
|
||||||
|
@ -121,16 +135,17 @@ class Routine
|
||||||
{
|
{
|
||||||
return new Promise((resolve, reject)=>{
|
return new Promise((resolve, reject)=>{
|
||||||
login(code,data).then(res=>{
|
login(code,data).then(res=>{
|
||||||
if(res.data.type==='login'){
|
// let time = res.data.expiresTime - Cache.time();
|
||||||
store.commit('LOGIN', {
|
store.commit('UPDATE_USERINFO', res.data.user);
|
||||||
token: res.data.token
|
store.commit('LOGIN', {token:res.data.token});
|
||||||
});
|
store.commit('SETUID', res.data.user.uid);
|
||||||
}
|
// Cache.set(EXPIRES_TIME,res.data.expiresTime,time);
|
||||||
|
Cache.set(USER_INFO,res.data.user);
|
||||||
return resolve(res);
|
return resolve(res);
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
return reject(res);
|
return reject(res);
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
main.js
|
@ -46,7 +46,7 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
|
||||||
let vConsole = new VConsole();
|
let vConsole = new VConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auth.isWeixin() && Auth.oAuth();
|
Auth.isWeixin() && Auth.oAuth();
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"appid" : "wxcda5a2b1b98b6a95",
|
"appid" : "wxcda5a2b1b98b6a95",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"minified" : true,
|
"minified" : false,
|
||||||
"postcss" : true,
|
"postcss" : true,
|
||||||
"es6" : true
|
"es6" : true
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -96,7 +96,13 @@
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.getBargainList();
|
this.getBargainList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -224,7 +224,7 @@
|
||||||
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -391,7 +391,13 @@
|
||||||
// '&spid=' + e.detail.uid;
|
// '&spid=' + e.detail.uid;
|
||||||
// this.$set(that, 'bargainPartake', e.detail.uid);
|
// this.$set(that, 'bargainPartake', e.detail.uid);
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@
|
||||||
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
|
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
|
||||||
|
@ -422,7 +422,13 @@
|
||||||
uni.setStorageSync('comGoodsId', options.id);
|
uni.setStorageSync('comGoodsId', options.id);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
// #endif
|
// #endif
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
<!-- 发送给朋友图片 -->
|
<!-- 发送给朋友图片 -->
|
||||||
<view class="share-box" v-if="H5ShareBox"><image src="/static/images/share-info.png" @click="H5ShareBox = false"></image></view>
|
<view class="share-box" v-if="H5ShareBox"><image src="/static/images/share-info.png" @click="H5ShareBox = false"></image></view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
<!-- <Product-window v-on:changeFun="changeFun" :attr="attr" :limitNum='1' :iSbnt='1'></Product-window> -->
|
<!-- <Product-window v-on:changeFun="changeFun" :attr="attr" :limitNum='1' :iSbnt='1'></Product-window> -->
|
||||||
|
@ -195,7 +195,13 @@ export default {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.pinkId = options.id;
|
that.pinkId = options.id;
|
||||||
if (that.isLogin == false) {
|
if (that.isLogin == false) {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
} else {
|
} else {
|
||||||
this.timestamp = (new Date()).getTime();
|
this.timestamp = (new Date()).getTime();
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
|
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
|
||||||
@attrVal="attrVal" @iptCartNum="iptCartNum"></product-window>
|
@attrVal="attrVal" @iptCartNum="iptCartNum"></product-window>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
<!-- 分享按钮 -->
|
<!-- 分享按钮 -->
|
||||||
|
@ -350,7 +350,13 @@
|
||||||
this.getProductReplyList();
|
this.getProductReplyList();
|
||||||
this.getProductReplyCount();
|
this.getProductReplyCount();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
},
|
},
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.type = options.type;
|
this.type = options.type;
|
||||||
|
cosole.log('hello')
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
let type = this.type;
|
let type = this.type;
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
<view class="mask" v-if="posters" @click="closePosters"></view>
|
<view class="mask" v-if="posters" @click="closePosters"></view>
|
||||||
<view class="mask" v-if="canvasStatus" @click="listenerActionClose"></view>
|
<view class="mask" v-if="canvasStatus" @click="listenerActionClose"></view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 海报展示 -->
|
<!-- 海报展示 -->
|
||||||
<view class='poster-pop' v-if="canvasStatus">
|
<view class='poster-pop' v-if="canvasStatus">
|
||||||
|
@ -904,7 +904,13 @@
|
||||||
setCollect: function() {
|
setCollect: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (this.isLogin === false) {
|
if (this.isLogin === false) {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
} else {
|
} else {
|
||||||
if (this.storeInfo.userCollect) {
|
if (this.storeInfo.userCollect) {
|
||||||
collectDel(this.storeInfo.id).then(res => {
|
collectDel(this.storeInfo.id).then(res => {
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- <coupon-window :window='window' :couponList="couponList" @onColse="onColse"></coupon-window> -->
|
<!-- <coupon-window :window='window' :couponList="couponList" @onColse="onColse"></coupon-window> -->
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" :isGoIndex="false"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -706,7 +706,13 @@
|
||||||
// 首发新品详情
|
// 首发新品详情
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
if (item.activityH5 && item.activityH5.type === "2" && !this.isLogin) {
|
if (item.activityH5 && item.activityH5.type === "2" && !this.isLogin) {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
// // #ifdef H5
|
// // #ifdef H5
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: '提示',
|
// title: '提示',
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
<productWindow :attr="attr" :isShow='1' :iSplus='1' :iScart='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
|
<productWindow :attr="attr" :isShow='1' :iSplus='1' :iScart='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
|
||||||
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" @goCat="reGoCat" id='product-window'></productWindow>
|
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" @goCat="reGoCat" id='product-window'></productWindow>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -203,7 +203,13 @@
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.isLogin == false) {
|
if (that.isLogin == false) {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
</view>
|
</view>
|
||||||
<home></home>
|
<home></home>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
||||||
</view>
|
</view>
|
||||||
|
@ -677,7 +677,13 @@
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else>返回首页</button>
|
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else>返回首页</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -88,16 +88,16 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin']),
|
computed: mapGetters(['isLogin']),
|
||||||
watch:{
|
// watch:{
|
||||||
isLogin:{
|
// isLogin:{
|
||||||
handler:function(newV,oldV){
|
// handler:function(newV,oldV){
|
||||||
if(newV){
|
// if(newV){
|
||||||
this.getOrderPayInfo();
|
// this.getOrderPayInfo();
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
deep:true
|
// deep:true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
if (!options.order_id) return this.$util.Tips({
|
if (!options.order_id) return this.$util.Tips({
|
||||||
title: '缺少参数无法查看订单支付状态'
|
title: '缺少参数无法查看订单支付状态'
|
||||||
|
@ -111,7 +111,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getOrderPayInfo();
|
this.getOrderPayInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
</view>
|
</view>
|
||||||
<img src="/static/images/support.png" alt="" class='support'>
|
<img src="/static/images/support.png" alt="" class='support'>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -201,11 +201,15 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$set(that, 'MyMenus', app.globalData.MyMenus);
|
that.$set(that, 'MyMenus', app.globalData.MyMenus);
|
||||||
console.log('user页面',that.isLogin)
|
console.log('user页面',that.isLogin)
|
||||||
if (that.isLogin == false) {
|
// if (that.isLogin == false) {
|
||||||
// #ifdef H5 || APP-PLUS
|
// // #ifdef H5 || APP-PLUS
|
||||||
toLogin()
|
// toLogin();
|
||||||
// #endif
|
// // #endif
|
||||||
}
|
// // #ifdef MP
|
||||||
|
// this.isAuto = true;
|
||||||
|
// this.$set(this, 'isShowAuth', true);
|
||||||
|
// // #endif
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -215,7 +219,13 @@
|
||||||
// this.setVisit();
|
// this.setVisit();
|
||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
}else{
|
}else{
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -258,8 +268,8 @@
|
||||||
},
|
},
|
||||||
// 打开授权
|
// 打开授权
|
||||||
openAuto() {
|
openAuto() {
|
||||||
console.log('点击事件','lala')
|
this.isAuto = true;
|
||||||
toLogin();
|
this.isShowAuth = true
|
||||||
},
|
},
|
||||||
// 授权回调
|
// 授权回调
|
||||||
onLoadFun() {
|
onLoadFun() {
|
||||||
|
@ -317,7 +327,13 @@
|
||||||
// 编辑页面
|
// 编辑页面
|
||||||
goEdit() {
|
goEdit() {
|
||||||
if (this.isLogin == false) {
|
if (this.isLogin == false) {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/users/user_info/index'
|
url: '/pages/users/user_info/index'
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -90,7 +90,13 @@
|
||||||
this.getBrokerageRankList();
|
this.getBrokerageRankList();
|
||||||
this.getBrokerageRankNumber(this.type);
|
this.getBrokerageRankNumber(this.type);
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -116,7 +116,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getOrderProduct();
|
this.getOrderProduct();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
|
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -106,7 +106,13 @@
|
||||||
this.getExpress();
|
this.getExpress();
|
||||||
this.get_host_product();
|
this.get_host_product();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady: function() {
|
onReady: function() {
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -111,7 +111,13 @@
|
||||||
this.getOrderInfo();
|
this.getOrderInfo();
|
||||||
this.getRefundReason();
|
this.getRefundReason();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -1,36 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-wrapper">
|
<div class="register absolute">
|
||||||
<div class="shading">
|
<div class="shading">
|
||||||
|
<div class="pictrue acea-row row-center-wrapper">
|
||||||
<image :src="logoUrl" v-if="logoUrl" />
|
<image :src="logoUrl" v-if="logoUrl" />
|
||||||
<image src="/static/images/logo2.png" v-else />
|
<image src="/static/images/logo2.png" v-else />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="whiteBg" v-if="formItem === 1">
|
<div class="whiteBg" v-if="formItem === 1">
|
||||||
<div class="list" v-if="current !== 1">
|
<div class="title acea-row row-center-wrapper">
|
||||||
|
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)"
|
||||||
|
:key="index">
|
||||||
|
{{ item }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="list" :hidden="current !== 1">
|
||||||
<form @submit.prevent="submit">
|
<form @submit.prevent="submit">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="acea-row row-middle">
|
<div class="acea-row row-middle">
|
||||||
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
|
<image src="/static/images/phone_1.png"></image>
|
||||||
<input type="text" placeholder="输入手机号码" v-model="account" required />
|
<input type="text" placeholder="输入手机号码" v-model="account" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="acea-row row-middle">
|
<div class="acea-row row-middle">
|
||||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
<image src="/static/images/code_2.png"></image>
|
||||||
<input type="password" placeholder="填写登录密码" v-model="password" required />
|
<input type="password" placeholder="填写登录密码" v-model="password" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
|
||||||
|
<span class="iconfont icon-wenti"></span>忘记密码
|
||||||
|
</navigator> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
|
<div class="list" :hidden="current !== 0">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="acea-row row-middle">
|
<div class="acea-row row-middle">
|
||||||
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
|
<image src="/static/images/phone_1.png"></image>
|
||||||
<input type="text" placeholder="输入手机号码" v-model="account" />
|
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="acea-row row-middle">
|
<div class="acea-row row-middle">
|
||||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
<image src="/static/images/code_2.png"></image>
|
||||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
|
@ -39,44 +50,59 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-if="isShowCode">
|
<div class="item" v-if="isShowCode">
|
||||||
<div class="acea-row row-middle">
|
<div class="acea-row row-middle">
|
||||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
<image src="/static/images/code_2.png"></image>
|
||||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||||
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="logon" @click="loginMobile" v-if="current !== 0">登录</div>
|
<div class="logon" @click="loginMobile" :hidden="current !== 0">登录</div>
|
||||||
<div class="logon" @click="submit" v-if="current === 0">登录</div>
|
<div class="logon" @click="submit" :hidden="current === 0">登录</div>
|
||||||
<!-- #ifndef APP-PLUS -->
|
<div class="tip">
|
||||||
<div class="tips">
|
<div :hidden="current !== 1">
|
||||||
<div v-if="current==0" @click="current = 1">快速登录</div>
|
没有账号?
|
||||||
<div v-if="current==1" @click="current = 0">账号登录</div>
|
<span @click="current = 0" class="font-color-red">快速登录</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- #endif -->
|
|
||||||
<!-- #ifdef APP-PLUS -->
|
|
||||||
<view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
|
|
||||||
<view class="hds">
|
|
||||||
<span class="line"></span>
|
|
||||||
<p>其他方式登录</p>
|
|
||||||
<span class="line"></span>
|
|
||||||
</view>
|
|
||||||
<view class="btn-wrapper">
|
|
||||||
<view class="btn wx" @click="wxLogin">
|
|
||||||
<span class="iconfont icon-s-weixindenglu1"></span>
|
|
||||||
</view>
|
|
||||||
<view class="btn mima" v-if="current == 1" @click="current =0">
|
|
||||||
<span class="iconfont icon-s-mimadenglu1"></span>
|
|
||||||
</view>
|
|
||||||
<view class="btn yanzheng" v-if="current == 0" @click="current =1">
|
|
||||||
<span class="iconfont icon-s-yanzhengmadenglu1"></span>
|
|
||||||
</view>
|
|
||||||
<view class="apple-btn" @click="appleLogin" v-if="appleShow">
|
|
||||||
<view class="iconfont icon-s-pingguo"></view>通过Apple登录
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- #endif -->
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="whiteBg" v-else>
|
||||||
|
<div class="title">注册账号</div>
|
||||||
|
<div class="list">
|
||||||
|
<div class="item">
|
||||||
|
<div class="acea-row row-middle">
|
||||||
|
<image src="/static/images/phone_1.png"></image>
|
||||||
|
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="acea-row row-middle">
|
||||||
|
<image src="/static/images/code_2.png"></image>
|
||||||
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||||
|
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||||
|
{{ text }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="acea-row row-middle">
|
||||||
|
<image src="/static/images/code_1.png"></image>
|
||||||
|
<input type="password" placeholder="填写您的登录密码" v-model="password" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" v-if="isShowCode">
|
||||||
|
<div class="acea-row row-middle">
|
||||||
|
<image src="/static/images/code_2.png"></image>
|
||||||
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||||
|
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="logon" @click="register">注册</div>
|
||||||
|
<div class="tip">
|
||||||
|
已有账号?
|
||||||
|
<span @click="formItem = 1" class="font-color-red">立即登录</span>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
<div class="bottom"></div>
|
<div class="bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -124,12 +150,7 @@
|
||||||
keyCode: "",
|
keyCode: "",
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
codeVal: "",
|
codeVal: "",
|
||||||
isShowCode: false,
|
isShowCode: false
|
||||||
appLoginStatus: false, // 微信登录强制绑定手机号码状态
|
|
||||||
appUserInfo: null, // 微信登录保存的用户信息
|
|
||||||
appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
|
|
||||||
appleUserInfo: null,
|
|
||||||
appleShow: false // 苹果登录版本必须要求ios13以上的
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
|
@ -146,133 +167,6 @@
|
||||||
this.getLogoImage();
|
this.getLogoImage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 苹果登录
|
|
||||||
appleLogin() {
|
|
||||||
let self = this
|
|
||||||
this.account = ''
|
|
||||||
this.captcha = ''
|
|
||||||
uni.showLoading({
|
|
||||||
title: '登录中'
|
|
||||||
})
|
|
||||||
uni.login({
|
|
||||||
provider: 'apple',
|
|
||||||
timeout: 10000,
|
|
||||||
success(loginRes) {
|
|
||||||
uni.getUserProfile({
|
|
||||||
provider: 'apple',
|
|
||||||
success: function(infoRes) {
|
|
||||||
console.log(infoRes.userInfo, 'yyyy')
|
|
||||||
self.appleUserInfo = infoRes.userInfo
|
|
||||||
self.appleLoginApi()
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
uni.showToast({
|
|
||||||
title: '获取用户信息失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
},
|
|
||||||
complete() {
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail(error) {
|
|
||||||
console.log(error)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 苹果登录Api
|
|
||||||
appleLoginApi() {
|
|
||||||
let self = this
|
|
||||||
appleLogin({
|
|
||||||
openId: self.appleUserInfo.openId,
|
|
||||||
email: self.appleUserInfo.email || '',
|
|
||||||
phone: this.account,
|
|
||||||
captcha: this.captcha
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data.isbind) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '请绑定手机号后,继续操作',
|
|
||||||
showCancel: false,
|
|
||||||
success: function(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
self.current = 1
|
|
||||||
self.appleLoginStatus = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
self.$store.commit("LOGIN", {
|
|
||||||
'token': data.token,
|
|
||||||
'time': data.expires_time - self.$Cache.time()
|
|
||||||
});
|
|
||||||
let backUrl = self.$Cache.get(BACK_URL) || "/pages/index/index";
|
|
||||||
self.$Cache.clear(BACK_URL);
|
|
||||||
self.$store.commit("SETUID", data.userInfo.uid);
|
|
||||||
uni.reLaunch({
|
|
||||||
url: backUrl
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: `错误信息${error}`,
|
|
||||||
success: function(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
console.log('用户点击确定');
|
|
||||||
} else if (res.cancel) {
|
|
||||||
console.log('用户点击取消');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// App微信登录
|
|
||||||
wxLogin() {
|
|
||||||
let self = this
|
|
||||||
this.account = ''
|
|
||||||
this.captcha = ''
|
|
||||||
uni.showLoading({
|
|
||||||
title: '登录中'
|
|
||||||
})
|
|
||||||
uni.login({
|
|
||||||
provider: 'weixin',
|
|
||||||
success: function(loginRes) {
|
|
||||||
// 获取用户信息
|
|
||||||
uni.getUserProfile({
|
|
||||||
provider: 'weixin',
|
|
||||||
success: function(infoRes) {
|
|
||||||
self.appUserInfo = infoRes.userInfo
|
|
||||||
self.wxLoginApi()
|
|
||||||
|
|
||||||
console.log(self.$store);
|
|
||||||
console.log(infoRes.userInfo);
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
uni.showToast({
|
|
||||||
title: '获取用户信息失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
},
|
|
||||||
complete() {
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
uni.showToast({
|
|
||||||
title: '登录失败',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
again() {
|
again() {
|
||||||
this.codeUrl =
|
this.codeUrl =
|
||||||
VUE_APP_API_URL +
|
VUE_APP_API_URL +
|
||||||
|
@ -327,9 +221,8 @@
|
||||||
});
|
});
|
||||||
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
||||||
that.$Cache.clear(BACK_URL);
|
that.$Cache.clear(BACK_URL);
|
||||||
getUserInfo().then(res => {
|
// getUserInfo().then(res => {
|
||||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
that.$store.commit("SETUID", res.data.user.uid);
|
||||||
that.$store.commit("SETUID", res.data.uid);
|
|
||||||
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ===
|
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ===
|
||||||
'/pages/user/index') {
|
'/pages/user/index') {
|
||||||
|
|
||||||
|
@ -338,12 +231,11 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.navigateBack()
|
uni.switchTab({
|
||||||
// uni.switchTab({
|
url: '/pages/index/index'
|
||||||
// url: '/pages/index/index'
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
that.$util.Tips({
|
that.$util.Tips({
|
||||||
|
@ -445,7 +337,6 @@
|
||||||
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
|
||||||
that.$Cache.clear(BACK_URL);
|
that.$Cache.clear(BACK_URL);
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
that.$store.commit("UPDATE_USERINFO", res.data);
|
|
||||||
that.$store.commit("SETUID", res.data.uid);
|
that.$store.commit("SETUID", res.data.uid);
|
||||||
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ==='/pages/user/index') {
|
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ==='/pages/user/index') {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
@ -467,81 +358,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.appLogin {
|
|
||||||
margin-top: 60rpx;
|
|
||||||
|
|
||||||
.hds {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #B4B4B4;
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 68rpx;
|
|
||||||
height: 1rpx;
|
|
||||||
background: #CCCCCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-wrapper {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 68rpx;
|
|
||||||
height: 68rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.apple-btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 246rpx;
|
|
||||||
height: 66rpx;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
background: #EAEAEA;
|
|
||||||
border-radius: 34rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
|
|
||||||
.icon-s-pingguo {
|
|
||||||
color: #333;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
font-size: 34rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size: 40rpx;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wx {
|
|
||||||
margin-right: 30rpx;
|
|
||||||
background-color: #61C64F;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mima {
|
|
||||||
background-color: #28B3E9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.yanzheng {
|
|
||||||
background-color: #F89C23;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.code img {
|
.code img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -550,67 +367,6 @@
|
||||||
.acea-row.row-middle {
|
.acea-row.row-middle {
|
||||||
input {
|
input {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.login-wrapper{
|
|
||||||
padding: 30rpx;
|
|
||||||
.shading{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 200rpx;
|
|
||||||
margin-top: 200rpx;
|
|
||||||
image{
|
|
||||||
width: 180rpx;
|
|
||||||
height: 180rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.whiteBg{
|
|
||||||
margin-top: 100rpx;
|
|
||||||
.list{
|
|
||||||
border-radius: 16rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
.item{
|
|
||||||
border-bottom: 1px solid #F0F0F0;
|
|
||||||
background: #fff;
|
|
||||||
.row-middle{
|
|
||||||
position: relative;
|
|
||||||
padding: 30rpx 45rpx;
|
|
||||||
input{
|
|
||||||
flex: 1;
|
|
||||||
font-size: 28rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
}
|
|
||||||
.code{
|
|
||||||
position: absolute;
|
|
||||||
right: 30rpx;
|
|
||||||
top: 50%;
|
|
||||||
color: #E93323;
|
|
||||||
font-size: 26rpx;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.logon{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 86rpx;
|
|
||||||
margin-top: 100rpx;
|
|
||||||
background-color: $theme-color;
|
|
||||||
border-radius: 120rpx;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
.tips{
|
|
||||||
margin:30rpx;
|
|
||||||
text-align: center;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -142,7 +142,7 @@
|
||||||
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address' :pagesUrl="pagesUrl"
|
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address' :pagesUrl="pagesUrl"
|
||||||
@OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
|
@OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -321,7 +321,13 @@
|
||||||
//调用子页面方法授权后执行获取地址列表
|
//调用子页面方法授权后执行获取地址列表
|
||||||
this.$nextTick(function() {})
|
this.$nextTick(function() {})
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
||||||
|
@ -173,7 +173,13 @@
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -119,7 +119,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.userSpreadNewList();
|
this.userSpreadNewList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -92,7 +92,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getRecordOrderList();
|
this.getRecordOrderList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -107,7 +107,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getRanklist();
|
this.getRanklist();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// onShow: function () {
|
// onShow: function () {
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -131,7 +131,13 @@
|
||||||
// this.initialize();
|
// this.initialize();
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -122,7 +122,13 @@
|
||||||
this.bargain = options.bargain || false;
|
this.bargain = options.bargain || false;
|
||||||
this.getAddressList(true);
|
this.getAddressList(true);
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -78,7 +78,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getUserBillList();
|
this.getUserBillList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -182,7 +182,13 @@
|
||||||
this.getUserExtractBank();
|
this.getUserExtractBank();
|
||||||
//this.getBrokerageCommission();
|
//this.getBrokerageCommission();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -87,7 +87,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getUseCoupons();
|
this.getUseCoupons();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -83,7 +83,13 @@
|
||||||
if(this.isLogin){
|
if(this.isLogin){
|
||||||
this.getUseCoupons();
|
this.getUseCoupons();
|
||||||
}else{
|
}else{
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<recommend :hostProduct="hostProduct"></recommend>
|
<recommend :hostProduct="hostProduct"></recommend>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -81,7 +81,13 @@
|
||||||
this.get_user_collect_product();
|
this.get_user_collect_product();
|
||||||
this.get_host_product();
|
this.get_host_product();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -113,7 +113,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -125,7 +125,13 @@
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.getIntegralList();
|
this.getIntegralList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
<recommend :hostProduct="hostProduct" v-if="hostProduct.length"></recommend>
|
<recommend :hostProduct="hostProduct" v-if="hostProduct.length"></recommend>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -194,7 +194,13 @@
|
||||||
this.get_activity();
|
this.get_activity();
|
||||||
this.userDalance();
|
this.userDalance();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -123,7 +123,13 @@
|
||||||
this.getRecharge();
|
this.getRecharge();
|
||||||
this.getUserExtractBank();
|
this.getUserExtractBank();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<button form-type="submit" v-if="!isNew" class="confirmBnt bg-color" @click="editPwd">保存</button>
|
<button form-type="submit" v-if="!isNew" class="confirmBnt bg-color" @click="editPwd">保存</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -71,7 +71,13 @@
|
||||||
// this.$set(this, 'key', res.data.key)
|
// this.$set(this, 'key', res.data.key)
|
||||||
// });
|
// });
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -77,7 +77,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -81,7 +81,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
<view class='mask' @touchmove.stop.prevent="false" :hidden='active==false'></view>
|
<view class='mask' @touchmove.stop.prevent="false" :hidden='active==false'></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -128,7 +128,13 @@
|
||||||
this.getSignSysteam();
|
this.getSignSysteam();
|
||||||
this.getSignList();
|
this.getSignList();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -65,7 +65,13 @@
|
||||||
if(this.isLogin){
|
if(this.isLogin){
|
||||||
this.getSignMoneList();
|
this.getSignMoneList();
|
||||||
}else{
|
}else{
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom: function () {
|
onReachBottom: function () {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="canvas" v-if="canvasStatus">
|
<view class="canvas" v-if="canvasStatus">
|
||||||
<canvas style="width:750px;height:1190px;" canvas-id="canvasOne"></canvas>
|
<canvas style="width:750px;height:1190px;" canvas-id="canvasOne"></canvas>
|
||||||
|
@ -99,7 +99,13 @@
|
||||||
this.userSpreadBannerList();
|
this.userSpreadBannerList();
|
||||||
// // #endif
|
// // #endif
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -113,7 +113,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.type = options.type;
|
this.type = options.type;
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<home></home>
|
<home></home>
|
||||||
</view>
|
</view>
|
||||||
|
@ -100,7 +100,13 @@
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
this.getSpreadInfo();
|
this.getSpreadInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// #ifdef H5 || APP-PLUS
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
this.isAuto = true;
|
||||||
|
this.$set(this, 'isShowAuth', true);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<button hover-class="none" @click="wechatLogin" class="bg-green btn1">微信登录</button>
|
<button hover-class="none" @click="wechatLogin" class="bg-green btn1">微信登录</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<button hover-class="none" @tap="getUserProfile" class="bg-green btn1">微信登录</button>
|
<button hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo" class="bg-green btn1">微信登录</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- <button hover-class="none" @click="isUp = true" class="btn2">手机号登录</button> -->
|
<!-- <button hover-class="none" @click="isUp = true" class="btn2">手机号登录</button> -->
|
||||||
</view>
|
</view>
|
||||||
|
@ -238,25 +238,6 @@
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getUserProfile() {
|
|
||||||
let self = this;
|
|
||||||
uni.showLoading({
|
|
||||||
title: '正在登录中'
|
|
||||||
});
|
|
||||||
Routine.getUserProfile()
|
|
||||||
.then(res => {
|
|
||||||
Routine.getCode()
|
|
||||||
.then(code => {
|
|
||||||
self.getWxUser(code, res);
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setUserInfo(e) {
|
setUserInfo(e) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在登录中'
|
title: '正在登录中'
|
||||||
|
@ -269,12 +250,15 @@
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getWxUser(code, res) {
|
getWxUser(code) {
|
||||||
let self = this
|
let self = this
|
||||||
|
Routine.getUserInfo()
|
||||||
|
.then(res => {
|
||||||
|
console.log('res1',res);
|
||||||
let userInfo = res.userInfo;
|
let userInfo = res.userInfo;
|
||||||
userInfo.code = code;
|
userInfo.code = code;
|
||||||
userInfo.spread_spid = app.globalData.spid; //获取推广人ID
|
userInfo.spread_spid = app.globalData.spid;//获取推广人ID
|
||||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
userInfo.spread_code = app.globalData.code;//获取推广人分享二维码ID
|
||||||
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
userInfo.avatar = userInfo.userInfo.avatarUrl;
|
||||||
userInfo.city = userInfo.userInfo.city;
|
userInfo.city = userInfo.userInfo.city;
|
||||||
userInfo.country = userInfo.userInfo.country;
|
userInfo.country = userInfo.userInfo.country;
|
||||||
|
@ -284,15 +268,17 @@
|
||||||
userInfo.type = 'routine'
|
userInfo.type = 'routine'
|
||||||
Routine.authUserInfo(userInfo.code, userInfo)
|
Routine.authUserInfo(userInfo.code, userInfo)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
self.authKey = res.data.key;
|
self.authKey = res.data.key;
|
||||||
if (res.data.type === 'register') {
|
if (res.data.type === 'register') {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
self.isPhoneBox = true
|
self.isPhoneBox = true
|
||||||
}
|
} else {
|
||||||
if (res.data.type === 'login') {
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
let time = res.data.expires_time - self.$Cache.time();
|
||||||
self.$store.commit('LOGIN', {
|
self.$store.commit('LOGIN', {
|
||||||
token: res.data.token
|
token: res.data.token,
|
||||||
|
time: time
|
||||||
});
|
});
|
||||||
self.$util.Tips({
|
self.$util.Tips({
|
||||||
title: res,
|
title: res,
|
||||||
|
@ -310,7 +296,10 @@
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch(res => {
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 900 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.1 KiB |
|
@ -22,6 +22,7 @@ function baseRequest(url, method, data, {
|
||||||
if (params != undefined) {
|
if (params != undefined) {
|
||||||
header = HEADERPARAMS;
|
header = HEADERPARAMS;
|
||||||
}
|
}
|
||||||
|
console.log('Url:',Url);
|
||||||
if (!noAuth) {
|
if (!noAuth) {
|
||||||
//登录过期自动登录
|
//登录过期自动登录
|
||||||
if (!store.state.app.token && !checkLogin()) {
|
if (!store.state.app.token && !checkLogin()) {
|
||||||
|
|