forked from angelo/web-retail-h5
feat(share): 分享下单成功后自动登录
This commit is contained in:
parent
62a84cf66b
commit
68c6b0b443
1
App.vue
1
App.vue
|
|
@ -17,6 +17,7 @@ export default {
|
||||||
'pages/shareArea/hiList',
|
'pages/shareArea/hiList',
|
||||||
'pages/shareArea/hiOrder',
|
'pages/shareArea/hiOrder',
|
||||||
'pages/pay/hiPay',
|
'pages/pay/hiPay',
|
||||||
|
'pages/pay/success',
|
||||||
]
|
]
|
||||||
if (whiteList.indexOf(options.path) !== -1) return
|
if (whiteList.indexOf(options.path) !== -1) return
|
||||||
this.$store.dispatch('GetInfo')
|
this.$store.dispatch('GetInfo')
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- 背景图片,替代CSS background -->
|
<!-- 背景图片,替代CSS background -->
|
||||||
<img
|
<img
|
||||||
class="share-bg-image"
|
class="share-bg-image"
|
||||||
src="/static/images/share-bg.png"
|
src="/static/images/share-bg.jpg"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
@load="onBackgroundImageLoad"
|
@load="onBackgroundImageLoad"
|
||||||
|
|
@ -28,12 +28,7 @@
|
||||||
<!-- 会员编号样式区域 - 用户自定义样式位置 -->
|
<!-- 会员编号样式区域 - 用户自定义样式位置 -->
|
||||||
<text
|
<text
|
||||||
class="member-code-text"
|
class="member-code-text"
|
||||||
style="
|
style="font-size: 30rpx; color: #fff; font-weight: bold"
|
||||||
font-size: 30rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
"
|
|
||||||
>{{ desensitization(userInfo.memberCode) }}</text
|
>{{ desensitization(userInfo.memberCode) }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -187,22 +182,22 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 背景图片样式 */
|
/* 背景图片样式 */
|
||||||
.share-bg-image {
|
.share-bg-image {
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
// height: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
// object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-wrapper {
|
.share-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
top: 360rpx;
|
bottom: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -216,15 +211,14 @@ export default {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20rpx);
|
text-align: center;
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.portal-frame.is-loaded {
|
.portal-frame.is-loaded {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 二维码样式区域 - 用户自定义样式位置 */
|
/* 二维码样式区域 - 用户自定义样式位置 */
|
||||||
|
|
@ -275,6 +269,8 @@ export default {
|
||||||
|
|
||||||
/* 会员编号样式区域 - 用户自定义样式位置 */
|
/* 会员编号样式区域 - 用户自定义样式位置 */
|
||||||
.member-code-text {
|
.member-code-text {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
/* 用户可以在这里自定义会员编号的样式 */
|
/* 用户可以在这里自定义会员编号的样式 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,262 +1,282 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<u-popup :show="sucShow" closeable :round="10" mode="center" @close="sucShow= false">
|
<u-popup
|
||||||
<view class="pop_a">
|
:show="sucShow"
|
||||||
<view class="tit">
|
closeable
|
||||||
<u-icon name="checkmark-circle-fill" color="#029B00"></u-icon>
|
:round="10"
|
||||||
<view>{{'注册成功'}}</view>
|
mode="center"
|
||||||
</view>
|
@close="sucShow = false"
|
||||||
|
>
|
||||||
<view class="getCode" @tap="onCopy">{{'复制'}}</view>
|
<view class="pop_a">
|
||||||
<view class="form">
|
<view class="tit">
|
||||||
<u--form labelPosition="left" labelWidth="80px" :model="allData" ref="uForm">
|
<u-icon name="checkmark-circle-fill" color="#029B00"></u-icon>
|
||||||
<u-form-item :label="'会员姓名'+':'" borderBottom>
|
<view>{{ '注册成功' }}</view>
|
||||||
<u--input v-model="allData.memberName" border="none"></u--input>
|
</view>
|
||||||
</u-form-item>
|
|
||||||
<u-form-item :label="'会员编号'+':'" borderBottom>
|
<view class="getCode" @tap="onCopy">{{ '复制' }}</view>
|
||||||
<u--input v-model="allData.memberCode" border="none"></u--input>
|
<view class="form">
|
||||||
</u-form-item>
|
<u--form
|
||||||
<u-form-item :label="'会员电话'+':'" borderBottom>
|
labelPosition="left"
|
||||||
<u--input v-model="allData.phone" border="none"></u--input>
|
labelWidth="80px"
|
||||||
</u-form-item>
|
:model="allData"
|
||||||
<u-form-item :label="'登录密码'+':'" borderBottom>
|
ref="uForm"
|
||||||
<u--input v-model="allData.loginPassword" border="none">
|
>
|
||||||
</u--input>
|
<u-form-item :label="'会员姓名' + ':'" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="allData.memberName" border="none"></u--input>
|
||||||
<u-form-item :label="'支付密码'+':'" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="allData.payPassword" border="none">
|
<u-form-item :label="'会员编号' + ':'" borderBottom>
|
||||||
</u--input>
|
<u--input v-model="allData.memberCode" border="none"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item :label="'登录网址'+':'" borderBottom>
|
<u-form-item :label="'会员电话' + ':'" borderBottom>
|
||||||
<u--input v-model="allData.urlAddress" border="none"></u--input>
|
<u--input v-model="allData.phone" border="none"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
<u-form-item :label="'登录密码' + ':'" borderBottom>
|
||||||
<view class="disflx">
|
<u--input v-model="allData.loginPassword" border="none"> </u--input>
|
||||||
<u-button
|
</u-form-item>
|
||||||
type="success"
|
<u-form-item :label="'支付密码' + ':'" borderBottom>
|
||||||
class="uBtn"
|
<u--input v-model="allData.payPassword" border="none"> </u--input>
|
||||||
shape="circle"
|
</u-form-item>
|
||||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
<u-form-item :label="'登录网址' + ':'" borderBottom>
|
||||||
@tap="handleClose"
|
<u--input v-model="allData.urlAddress" border="none"></u--input>
|
||||||
>
|
</u-form-item>
|
||||||
确定
|
</u--form>
|
||||||
</u-button>
|
<view class="disflx">
|
||||||
</view>
|
<u-button
|
||||||
</view>
|
type="success"
|
||||||
<img class="yh" v-show="bia" src="@/static/images/yh.gif" alt="">
|
class="uBtn"
|
||||||
<img class="cd" v-show="bia" src="@/static/images/cd.gif" alt="">
|
shape="circle"
|
||||||
</view>
|
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||||
</u-popup>
|
@tap="handleClose"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<img class="yh" v-show="bia" src="@/static/images/yh.gif" alt="" />
|
||||||
|
<img class="cd" v-show="bia" src="@/static/images/cd.gif" alt="" />
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sucShow: false,
|
sucShow: false,
|
||||||
bia: false,
|
bia: false,
|
||||||
allData: '',
|
allData: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showSuccess(data) {
|
showSuccess(data) {
|
||||||
this.allData = data
|
this.allData = data
|
||||||
// this.allData.gzh = '海之圣'
|
// this.allData.gzh = '海之圣'
|
||||||
// this.allData.ios = 'http://yxydl.hzs413.com/q2efum'
|
// this.allData.ios = 'http://yxydl.hzs413.com/q2efum'
|
||||||
// this.allData.android = 'https://cn.hzs413.com/'
|
// this.allData.android = 'https://cn.hzs413.com/'
|
||||||
this.sucShow = true
|
this.sucShow = true
|
||||||
this.bia = true
|
this.bia = true
|
||||||
let that = this
|
let that = this
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.bia = false
|
that.bia = false
|
||||||
}, 3000)
|
}, 3000)
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.sucShow = false
|
this.sucShow = false
|
||||||
this.$emit('successClose')
|
this.$emit('successClose', this.allData)
|
||||||
},
|
},
|
||||||
payPw() {},
|
payPw() {},
|
||||||
onCopy() {
|
onCopy() {
|
||||||
let text =
|
let text =
|
||||||
'会员姓名' + ':' +
|
'会员姓名' +
|
||||||
this.allData.memberName +
|
':' +
|
||||||
'\n' +
|
this.allData.memberName +
|
||||||
'会员编号' + ':' +
|
'\n' +
|
||||||
this.allData.memberCode +
|
'会员编号' +
|
||||||
'\n' +
|
':' +
|
||||||
'会员电话' + ':' +
|
this.allData.memberCode +
|
||||||
this.allData.phone +
|
'\n' +
|
||||||
'\n' +
|
'会员电话' +
|
||||||
'登录密码' + ':' +
|
':' +
|
||||||
this.allData.loginPassword +
|
this.allData.phone +
|
||||||
'\n' +
|
'\n' +
|
||||||
'支付密码' + ':' +
|
'登录密码' +
|
||||||
this.allData.payPassword +
|
':' +
|
||||||
'\n' +
|
this.allData.loginPassword +
|
||||||
'登录网址' + ':' +
|
'\n' +
|
||||||
this.allData.urlAddress
|
'支付密码' +
|
||||||
// +
|
':' +
|
||||||
// '\n' +
|
this.allData.payPassword +
|
||||||
// '公众号搜索'+':' +
|
'\n' +
|
||||||
// this.allData.gzh+
|
'登录网址' +
|
||||||
// '\n' +
|
':' +
|
||||||
// 'APP'+`(${'苹果'})` +
|
this.allData.urlAddress
|
||||||
// ':' +
|
// +
|
||||||
// this.allData.ios+
|
// '\n' +
|
||||||
// '\n' +
|
// '公众号搜索'+':' +
|
||||||
// 'APP'+`(${'安卓'})` +
|
// this.allData.gzh+
|
||||||
// ':' +
|
// '\n' +
|
||||||
// this.allData.android
|
// 'APP'+`(${'苹果'})` +
|
||||||
this.$copyText(text).then((res) => {
|
// ':' +
|
||||||
uni.showToast({
|
// this.allData.ios+
|
||||||
title: '复制成功',
|
// '\n' +
|
||||||
icon: 'none',
|
// 'APP'+`(${'安卓'})` +
|
||||||
})
|
// ':' +
|
||||||
})
|
// this.allData.android
|
||||||
},
|
this.$copyText(text).then(res => {
|
||||||
},
|
uni.showToast({
|
||||||
}
|
title: '复制成功',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
background: #d5251d;
|
background: #d5251d;
|
||||||
border-radius: 6px 6px 6px 6px;
|
border-radius: 6px 6px 6px 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin: 25px auto;
|
margin: 25px auto;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hui {
|
.hui {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
border-radius: 6px 6px 6px 6px;
|
border-radius: 6px 6px 6px 6px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin: 25px auto;
|
margin: 25px auto;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-dialog {
|
::v-deep .el-dialog {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-dialog__body {
|
::v-deep .el-dialog__body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
// border-bottom: 1px solid #f2f2f2;
|
// border-bottom: 1px solid #f2f2f2;
|
||||||
// padding-bottom: 15px;
|
// padding-bottom: 15px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit1 {
|
.tit1 {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #005BAC;
|
color: #005bac;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.digBody {
|
.digBody {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: PingFang SC-Regular, PingFang SC;
|
font-family:
|
||||||
font-weight: 400;
|
PingFang SC-Regular,
|
||||||
color: #666666;
|
PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #666666;
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-family: PingFang SC-Regular, PingFang SC;
|
font-family:
|
||||||
font-weight: 400;
|
PingFang SC-Regular,
|
||||||
color: #f43c3a;
|
PingFang SC;
|
||||||
position: relative;
|
font-weight: 400;
|
||||||
line-height: 30px;
|
color: #f43c3a;
|
||||||
height: 30px;
|
position: relative;
|
||||||
|
line-height: 30px;
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
.copy {
|
.copy {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
top: 0;
|
top: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
color: #333;
|
color: #333;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.yh {
|
.yh {
|
||||||
width: 262px;
|
width: 262px;
|
||||||
height: 262px;
|
height: 262px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -100px;
|
top: -100px;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cd {
|
.cd {
|
||||||
width: 496px;
|
width: 496px;
|
||||||
height: 496px;
|
height: 496px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.getCode {
|
.getCode {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin: 48rpx 24rpx 0 0;
|
margin: 48rpx 24rpx 0 0;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
font-family: PingFang SC-Regular, PingFang SC;
|
font-family:
|
||||||
font-weight: 400;
|
PingFang SC-Regular,
|
||||||
color: #18acff;
|
PingFang SC;
|
||||||
}
|
font-weight: 400;
|
||||||
|
color: #18acff;
|
||||||
|
}
|
||||||
|
|
||||||
.pop_a {
|
.pop_a {
|
||||||
padding: 40rpx 40rpx;
|
padding: 40rpx 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uBtn {
|
.uBtn {
|
||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-popup__content {
|
::v-deep .u-popup__content {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-form-item__body__left__content__label {
|
::v-deep .u-form-item__body__left__content__label {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,11 @@ export const login = params =>
|
||||||
export const autoLogin = params =>
|
export const autoLogin = params =>
|
||||||
http.post('/member/api/retail-auth/auto-login', params)
|
http.post('/member/api/retail-auth/auto-login', params)
|
||||||
|
|
||||||
|
// 分享注册后自动登录
|
||||||
|
// registered-auto-login
|
||||||
|
export const registeredAutoLogin = params =>
|
||||||
|
http.post('/member/api/retail-auth/registered-auto-login', params)
|
||||||
|
|
||||||
//用户信息
|
//用户信息
|
||||||
export const getInfo = params =>
|
export const getInfo = params =>
|
||||||
http.get('/member/api/retail-member/get-info', { params })
|
http.get('/member/api/retail-member/get-info', { params })
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ '会员登录' }}
|
{{ '会员登录' }}
|
||||||
</view>
|
</view>
|
||||||
<u-form :model="loginForm"
|
<u-form :model="loginForm" labelWidth="auto" ref="uForm">
|
||||||
labelWidth="auto"
|
|
||||||
ref="uForm">
|
|
||||||
<view class="view-class pa">
|
<view class="view-class pa">
|
||||||
<!-- <view class="account-s">
|
<!-- <view class="account-s">
|
||||||
|
|
||||||
</view> -->
|
</view> -->
|
||||||
<u-form-item label=""
|
<u-form-item label="" prop="username">
|
||||||
prop="username">
|
<u-input
|
||||||
<u-input v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
clearable
|
clearable
|
||||||
placeholder-class="place-class"
|
placeholder-class="place-class"
|
||||||
class="border-color "
|
class="border-color"
|
||||||
:placeholder="'会员账号'">
|
:placeholder="'会员账号'"
|
||||||
<image class="tou"
|
>
|
||||||
slot="prefix"
|
<image
|
||||||
src="../../static/images/login/index-icon4.png"></image>
|
class="tou"
|
||||||
|
slot="prefix"
|
||||||
|
src="../../static/images/login/index-icon4.png"
|
||||||
|
></image>
|
||||||
</u-input>
|
</u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<!-- <view class="close-s"
|
<!-- <view class="close-s"
|
||||||
|
|
@ -33,62 +33,75 @@
|
||||||
<!-- <view class="account-s widths">
|
<!-- <view class="account-s widths">
|
||||||
<image src="../../static/images/login/index-icon2.png"></image>
|
<image src="../../static/images/login/index-icon2.png"></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<u-form-item label=""
|
<u-form-item label="" prop="password">
|
||||||
prop="password">
|
<u-input
|
||||||
<u-input placeholder-style="color:#333"
|
placeholder-style="color:#333"
|
||||||
:type="password"
|
:type="password"
|
||||||
class="border-color"
|
class="border-color"
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
:placeholder="'登录密码'">
|
:placeholder="'登录密码'"
|
||||||
<image class="mm"
|
>
|
||||||
slot="prefix"
|
<image
|
||||||
src="../../static/images/login/index-icon2.png"></image>
|
class="mm"
|
||||||
|
slot="prefix"
|
||||||
|
src="../../static/images/login/index-icon2.png"
|
||||||
|
></image>
|
||||||
<view slot="suffix">
|
<view slot="suffix">
|
||||||
<view v-if="password=='text'"
|
<view
|
||||||
@click="changeFlagTap('password')">
|
v-if="password == 'text'"
|
||||||
<image class="eye"
|
@click="changeFlagTap('password')"
|
||||||
src="../../static/images/login/icon1.png"></image>
|
>
|
||||||
|
<image
|
||||||
|
class="eye"
|
||||||
|
src="../../static/images/login/icon1.png"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-else
|
<view v-else @click="changeFlagTap('text')">
|
||||||
@click="changeFlagTap('text')">
|
<image
|
||||||
<image class="eye"
|
class="eye"
|
||||||
src="../../static/images/login/icon2.png"></image>
|
src="../../static/images/login/icon2.png"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-input>
|
</u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="view-class">
|
<view class="view-class">
|
||||||
<!-- <view class="account-s yzm">
|
<!-- <view class="account-s yzm">
|
||||||
<image src="../../static/images/login/index-icon1.png"></image>
|
<image src="../../static/images/login/index-icon1.png"></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<u-form-item label=""
|
<u-form-item label="" prop="code">
|
||||||
prop="code">
|
<u-input
|
||||||
<u-input v-model="loginForm.code"
|
v-model="loginForm.code"
|
||||||
placeholder-class="place-class"
|
placeholder-class="place-class"
|
||||||
class="border-color"
|
class="border-color"
|
||||||
:placeholder="'验证码'">
|
:placeholder="'验证码'"
|
||||||
<image class="mm"
|
>
|
||||||
slot="prefix"
|
<image
|
||||||
src="../../static/images/login/index-icon1.png"></image>
|
class="mm"
|
||||||
<img :src="codeUrl"
|
slot="prefix"
|
||||||
slot="suffix"
|
src="../../static/images/login/index-icon1.png"
|
||||||
style="height: 38px;"
|
></image>
|
||||||
@click="getVerifyCode" />
|
<img
|
||||||
|
:src="codeUrl"
|
||||||
|
slot="suffix"
|
||||||
|
style="height: 38px"
|
||||||
|
@click="getVerifyCode"
|
||||||
|
/>
|
||||||
</u-input>
|
</u-input>
|
||||||
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</u-form>
|
</u-form>
|
||||||
<u-button type="success"
|
<u-button
|
||||||
shape="circle"
|
type="success"
|
||||||
class="btn"
|
shape="circle"
|
||||||
:loading="isLoading"
|
class="btn"
|
||||||
:loadingText="'登录中'"
|
:loading="isLoading"
|
||||||
@click="toLogin">{{'登录'}}</u-button>
|
:loadingText="'登录中'"
|
||||||
<view class="paswwrod_btn"
|
@click="toLogin"
|
||||||
@click="submit">{{'忘记密码'}}</view>
|
>{{ '登录' }}</u-button
|
||||||
|
>
|
||||||
|
<view class="paswwrod_btn" @click="submit">{{ '忘记密码' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -116,7 +129,7 @@ export default {
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getVerifyCode()
|
this.getVerifyCode()
|
||||||
this.loginForm.username = uni.getStorageSync('username')||''
|
this.loginForm.username = uni.getStorageSync('username') || ''
|
||||||
// this.getLanguage()
|
// this.getLanguage()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -135,13 +148,13 @@ export default {
|
||||||
this.loginForm.username = ''
|
this.loginForm.username = ''
|
||||||
},
|
},
|
||||||
getVerifyCode() {
|
getVerifyCode() {
|
||||||
api.captchaImage().then((res) => {
|
api.captchaImage().then(res => {
|
||||||
this.codeUrl = 'data:image/gif;base64,' + res.img
|
this.codeUrl = 'data:image/gif;base64,' + res.img
|
||||||
this.loginForm.uuid = res.uuid
|
this.loginForm.uuid = res.uuid
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toLogin() {
|
toLogin() {
|
||||||
api.login(this.loginForm).then((res) => {
|
api.login(this.loginForm).then(res => {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
if (!res) {
|
if (!res) {
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
|
|
@ -165,29 +178,16 @@ export default {
|
||||||
url: url,
|
url: url,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
success: (res) => {},
|
success: res => {},
|
||||||
fail: (err) => {
|
fail: err => {
|
||||||
reject(err)
|
reject(err)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUseInfo() {
|
getUseInfo() {
|
||||||
store.dispatch('GetInfo').then((res) => {
|
store.dispatch('GetInfo').then(res => {
|
||||||
uni.switchTab({ url: '/pages/index/index' })
|
uni.switchTab({ url: '/pages/index/index' })
|
||||||
// 目前强制跳首页
|
|
||||||
// if (res.data.loginType == 1) {
|
|
||||||
// uni.redirectTo({ url: '/pages/specialMember/index' })
|
|
||||||
// } else {
|
|
||||||
// if (res.data.registerFans == 0) {
|
|
||||||
// uni.redirectTo({ url: '/pages/shareArea/index?specialArea=7' })
|
|
||||||
// } else if (res.data.registerShare == 0) {
|
|
||||||
// // uni.redirectTo({ url: '/pages/shareArea/haiNdex?specialArea=21 ' })
|
|
||||||
// uni.switchTab({ url: '/pages/index/index' })
|
|
||||||
// } else {
|
|
||||||
// uni.switchTab({ url: '/pages/index/index' })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
// api.getInfo().then((res) => {
|
// api.getInfo().then((res) => {
|
||||||
// uni.setStorage('User', res.data)
|
// uni.setStorage('User', res.data)
|
||||||
|
|
@ -239,7 +239,7 @@ body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
background-color: #005BAC;
|
background-color: #005bac;
|
||||||
border: none;
|
border: none;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
line-height: 92rpx;
|
line-height: 92rpx;
|
||||||
|
|
@ -329,4 +329,4 @@ body {
|
||||||
.pa {
|
.pa {
|
||||||
padding: 7px 20rpx;
|
padding: 7px 20rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view
|
<view
|
||||||
class="share-page"
|
class="share-page"
|
||||||
style="display: flex; flex-direction: column; height: 100vh"
|
style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100vh;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<view id="shareContainer" class="share-container">
|
<view id="shareContainer" class="share-container">
|
||||||
<!-- 默认场景 -->
|
<!-- 默认场景 -->
|
||||||
|
|
@ -19,13 +25,7 @@
|
||||||
class="wechat-fullscreen-overlay"
|
class="wechat-fullscreen-overlay"
|
||||||
v-show="(isWechat || userInfo.sharePosterImage) && generatedImageUrl"
|
v-show="(isWechat || userInfo.sharePosterImage) && generatedImageUrl"
|
||||||
>
|
>
|
||||||
<img
|
<img class="fullscreen-image" :src="generatedImageUrl" @click.stop="" />
|
||||||
class="fullscreen-image"
|
|
||||||
:src="generatedImageUrl"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
@click.stop=""
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<cl-tabbar class="tabbar" :current="2" />
|
<cl-tabbar class="tabbar" :current="2" />
|
||||||
|
|
@ -172,6 +172,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
@ -181,8 +182,8 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -194,9 +195,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-image {
|
.fullscreen-image {
|
||||||
width: 100vw;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<view class="action-section">
|
<view class="action-section">
|
||||||
<view class="button-group">
|
<view class="button-group">
|
||||||
<button
|
<button
|
||||||
v-if="!isRecharge"
|
v-if="!isRecharge && !isSharePay"
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
@click="goToOrderList"
|
@click="goToOrderList"
|
||||||
>
|
>
|
||||||
|
|
@ -61,8 +61,10 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { payStatus, registerInfo } from '@/config/pay.js'
|
import { payStatus, registerInfo } from '@/config/pay.js'
|
||||||
|
import { registeredAutoLogin } from '@/config/login.js'
|
||||||
import successDialog from '@/components/successDialog.vue'
|
import successDialog from '@/components/successDialog.vue'
|
||||||
|
import { setToken } from '@/config/auth.js'
|
||||||
|
import store from '@/store'
|
||||||
let paySetTimeoutFlag = null
|
let paySetTimeoutFlag = null
|
||||||
let getRegisterInfoTimeoutFlag = null
|
let getRegisterInfoTimeoutFlag = null
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -76,6 +78,7 @@ export default {
|
||||||
specialArea: null,
|
specialArea: null,
|
||||||
isRecharge: undefined,
|
isRecharge: undefined,
|
||||||
payStatus: 0,
|
payStatus: 0,
|
||||||
|
isSharePay: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -97,6 +100,7 @@ export default {
|
||||||
this.specialArea = extParam.specialArea
|
this.specialArea = extParam.specialArea
|
||||||
this.isRecharge = extParam.isRecharge
|
this.isRecharge = extParam.isRecharge
|
||||||
this.orderCode = extParam.orderCode || ''
|
this.orderCode = extParam.orderCode || ''
|
||||||
|
this.isSharePay = extParam.isSharePay
|
||||||
if (this.orderCode) {
|
if (this.orderCode) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.pollingPayStatus(this.orderCode)
|
this.pollingPayStatus(this.orderCode)
|
||||||
|
|
@ -152,7 +156,25 @@ export default {
|
||||||
url: '/pages/mine/order/index',
|
url: '/pages/mine/order/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
successClose() {
|
// 获取临时token
|
||||||
|
getTempToken({ memberCode, loginPassword, uuid }) {
|
||||||
|
registeredAutoLogin({
|
||||||
|
username: memberCode,
|
||||||
|
password: loginPassword,
|
||||||
|
uuid,
|
||||||
|
}).then(res => {
|
||||||
|
uni.setStorageSync('username', memberCode)
|
||||||
|
setToken(res.data.access_token)
|
||||||
|
store.dispatch('GetInfo').then(res => {
|
||||||
|
uni.switchTab({ url: '/pages/index/index' })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
successClose({ memberCode, loginPassword, uuid }) {
|
||||||
|
if (this.isSharePay) {
|
||||||
|
this.getTempToken({ memberCode, loginPassword, uuid })
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/mine/order/index',
|
url: '/pages/mine/order/index',
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 660 KiB |
Loading…
Reference in New Issue