|
|
@ -68,6 +68,15 @@ |
|
|
</text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>. |
|
|
</text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>. |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="cellphone" style="padding-top: 15px;"> |
|
|
|
|
|
<view class="cellphone-box"> |
|
|
|
|
|
<view class="cellphone-minBox" v-if="cellphone == 2" @click="apple()"> <image src="../../static/img/AppleZ.png" mode=""></image></view> |
|
|
|
|
|
<!-- v-if="cellphone == 2" --> |
|
|
|
|
|
<view class="cellphone-minBox" @click="facebook()"><image src="../../static/img/facebookZ.png" mode=""></image></view> |
|
|
|
|
|
<view class="cellphone-minBox" v-if="cellphone == 1" @click="google()"> <image src="../../static/img/GoogleZ.png" mode=""></image></view> |
|
|
|
|
|
<!-- v-if="cellphone == 1" --> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <view class="mode"> |
|
|
<!-- <view class="mode"> |
|
|
@ -294,6 +303,42 @@ |
|
|
defaultRequest(data).then(res => { |
|
|
defaultRequest(data).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
if (res.error == 0) { |
|
|
if (res.error == 0) { |
|
|
|
|
|
this.loginErr = false |
|
|
|
|
|
res.data.isLogin = true |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: 'Login successful', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
let list = { |
|
|
|
|
|
email: res.data.email, |
|
|
|
|
|
cartlist: [] |
|
|
|
|
|
} |
|
|
|
|
|
let list2 = [] |
|
|
|
|
|
list2.push(list) |
|
|
|
|
|
uni.setStorageSync('cartlist', list2) |
|
|
|
|
|
uni.setStorageSync('isLogin', 1) |
|
|
|
|
|
uni.setStorageSync('user_info', res.data) |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
// uni.switchTab({ |
|
|
|
|
|
// delta: 1 |
|
|
|
|
|
// url:'../index/index' |
|
|
|
|
|
// }) |
|
|
|
|
|
} else { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.$refs.alertDialog.open() |
|
|
|
|
|
this.query.username = this.loginDate.username |
|
|
|
|
|
} else { |
|
|
|
|
|
this.loginErr = true |
|
|
|
|
|
this.errMsg = res.message |
|
|
|
|
|
console.log(this.errMsg); |
|
|
|
|
|
} |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title:'Login is successful, please reopen the App to load information', |
|
|
title:'Login is successful, please reopen the App to load information', |
|
|
icon:'none', |
|
|
icon:'none', |
|
|
@ -409,6 +454,42 @@ |
|
|
defaultRequest(data).then(res => { |
|
|
defaultRequest(data).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
if (res.error == 0) { |
|
|
if (res.error == 0) { |
|
|
|
|
|
this.loginErr = false |
|
|
|
|
|
res.data.isLogin = true |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: 'Login successful', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
let list = { |
|
|
|
|
|
email: res.data.email, |
|
|
|
|
|
cartlist: [] |
|
|
|
|
|
} |
|
|
|
|
|
let list2 = [] |
|
|
|
|
|
list2.push(list) |
|
|
|
|
|
uni.setStorageSync('cartlist', list2) |
|
|
|
|
|
uni.setStorageSync('isLogin', 1) |
|
|
|
|
|
uni.setStorageSync('user_info', res.data) |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
// uni.switchTab({ |
|
|
|
|
|
// delta: 1 |
|
|
|
|
|
// url:'../index/index' |
|
|
|
|
|
// }) |
|
|
|
|
|
} else { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.$refs.alertDialog.open() |
|
|
|
|
|
this.query.username = this.loginDate.username |
|
|
|
|
|
} else { |
|
|
|
|
|
this.loginErr = true |
|
|
|
|
|
this.errMsg = res.message |
|
|
|
|
|
console.log(this.errMsg); |
|
|
|
|
|
} |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: '加载中' |
|
|
title: '加载中' |
|
|
}); |
|
|
}); |
|
|
@ -472,6 +553,42 @@ |
|
|
defaultRequest(data).then(res => { |
|
|
defaultRequest(data).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
if (res.error == 0) { |
|
|
if (res.error == 0) { |
|
|
|
|
|
this.loginErr = false |
|
|
|
|
|
res.data.isLogin = true |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: 'Login successful', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
let list = { |
|
|
|
|
|
email: res.data.email, |
|
|
|
|
|
cartlist: [] |
|
|
|
|
|
} |
|
|
|
|
|
let list2 = [] |
|
|
|
|
|
list2.push(list) |
|
|
|
|
|
uni.setStorageSync('cartlist', list2) |
|
|
|
|
|
uni.setStorageSync('isLogin', 1) |
|
|
|
|
|
uni.setStorageSync('user_info', res.data) |
|
|
|
|
|
uni.navigateBack({ |
|
|
|
|
|
delta: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
// uni.switchTab({ |
|
|
|
|
|
// delta: 1 |
|
|
|
|
|
// url:'../index/index' |
|
|
|
|
|
// }) |
|
|
|
|
|
} else { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.$refs.alertDialog.open() |
|
|
|
|
|
this.query.username = this.loginDate.username |
|
|
|
|
|
} else { |
|
|
|
|
|
this.loginErr = true |
|
|
|
|
|
this.errMsg = res.message |
|
|
|
|
|
console.log(this.errMsg); |
|
|
|
|
|
} |
|
|
uni.navigateBack({ |
|
|
uni.navigateBack({ |
|
|
delta: 1 |
|
|
delta: 1 |
|
|
}); |
|
|
}); |
|
|
|