|
@@ -1,108 +1,176 @@
|
|
<template>
|
|
<template>
|
|
<view class="container cashier">
|
|
<view class="container cashier">
|
|
- <view class="container-banner" :style="{paddingTop:CustomBar + 230 +'px'}">
|
|
|
|
|
|
+ <custom :navbar-data='nvabarData' />
|
|
|
|
+ <view class="container-banner" :style="{ paddingTop:CustomBar + 180 +'px' }">
|
|
|
|
+ <view class="login-input">
|
|
|
|
+ <input type="text"
|
|
|
|
+ v-model="params.ticket"
|
|
|
|
+ maxlength="20"
|
|
|
|
+ disabled="true"
|
|
|
|
+ class="input"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
<view class="login-input">
|
|
<view class="login-input">
|
|
<input type="text"
|
|
<input type="text"
|
|
v-model="params.name"
|
|
v-model="params.name"
|
|
|
|
+ maxlength="10"
|
|
|
|
+ class="input"
|
|
|
|
+ placeholder="您的姓名"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
|
|
+ <view class="login-input">
|
|
|
|
+ <input type="text"
|
|
|
|
+ v-model="params.idCard"
|
|
maxlength="20"
|
|
maxlength="20"
|
|
class="input"
|
|
class="input"
|
|
- placeholder="请填写您的姓名"
|
|
|
|
|
|
+ placeholder="证件号码(身份证/港澳台通行证/护照)"
|
|
/>
|
|
/>
|
|
</view>
|
|
</view>
|
|
<view class="login-input">
|
|
<view class="login-input">
|
|
- <input type="number"
|
|
|
|
- v-model="params.shareCode"
|
|
|
|
|
|
+ <input type="text"
|
|
|
|
+ v-model="params.mobile"
|
|
maxlength="11"
|
|
maxlength="11"
|
|
class="input"
|
|
class="input"
|
|
- placeholder="请填写您的手机号"
|
|
|
|
|
|
+ placeholder="您的联系电话"
|
|
/>
|
|
/>
|
|
</view>
|
|
</view>
|
|
- <view class="login-btn" @click="handleEntry">大会签到</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="login-input">
|
|
|
|
+ <input type="text"
|
|
|
|
+ v-model="params.work"
|
|
|
|
+ maxlength="15"
|
|
|
|
+ class="input"
|
|
|
|
+ placeholder="您的职业"
|
|
|
|
+ />
|
|
|
|
+ </view>
|
|
|
|
+ <view class="login-btn" @click="handleEntry">绑定采美账号</view>
|
|
|
|
+ <view class="login-text">
|
|
|
|
+ 说明:门票绑定的证件号码是作为进入大会会场的凭证。
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- 提示弹窗 -->
|
|
|
|
+ <tui-modal
|
|
|
|
+ :show="modal"
|
|
|
|
+ @click="handleClick"
|
|
|
|
+ :content="contentModalText"
|
|
|
|
+ :button="modalButton"
|
|
|
|
+ color="#333"
|
|
|
|
+ :size="32"
|
|
|
|
+ shape="circle"
|
|
|
|
+ :maskClosable="false"
|
|
|
|
+ />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
|
|
|
+<script>
|
|
|
|
+ import { mapState, mapMutations } from 'vuex'
|
|
|
|
+ import authorize from '@/common/config/authorize.js'
|
|
|
|
+ import wxLogin from '@/common/config/wxLogin.js'
|
|
export default{
|
|
export default{
|
|
data(){
|
|
data(){
|
|
- return{
|
|
|
|
- shopOrderId:0,
|
|
|
|
- payType:'',
|
|
|
|
- payStatus:true,
|
|
|
|
- payBtnStatus:false,
|
|
|
|
- amuntMoney:0,
|
|
|
|
- successText:'订单支付失败',
|
|
|
|
|
|
+ return{
|
|
|
|
+ nvabarData: { //顶部自定义导航
|
|
|
|
+ haveBack:false,
|
|
|
|
+ haveHome:true,
|
|
|
|
+ showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
|
|
|
|
+ showSearch: 0,
|
|
|
|
+ title: '', // 导航栏 中间的标题
|
|
|
|
+ textLeft:this.$store.state.isIphone
|
|
|
|
+ },
|
|
isIphoneX:this.$store.state.isIphoneX,
|
|
isIphoneX:this.$store.state.isIphoneX,
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
params:{
|
|
params:{
|
|
name:'',
|
|
name:'',
|
|
- shareCode:''
|
|
|
|
- }
|
|
|
|
|
|
+ idCard:'',
|
|
|
|
+ ticket:'',
|
|
|
|
+ mobile:'',
|
|
|
|
+ work:'',
|
|
|
|
+ userId:''
|
|
|
|
+ },
|
|
|
|
+ modal: false,
|
|
|
|
+ contentModalText: '', //操作文字提示语句
|
|
|
|
+ modalButton: [
|
|
|
|
+ {
|
|
|
|
+ text: '取消',
|
|
|
|
+ type: 'gray',
|
|
|
|
+ plain: true //是否空心
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '确认绑定',
|
|
|
|
+ customStyle: {
|
|
|
|
+ color: '#fff',
|
|
|
|
+ bgColor: '#e10078'
|
|
|
|
+ },
|
|
|
|
+ plain: false
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- filters:{
|
|
|
|
- NumFormat(value) {
|
|
|
|
- //处理金额
|
|
|
|
- if (value) {
|
|
|
|
- return Number(value).toFixed(2)
|
|
|
|
- } else {
|
|
|
|
- return '0.00'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- onLoad(option) {
|
|
|
|
- this.initData(option)
|
|
|
|
- },
|
|
|
|
- methods:{
|
|
|
|
- initOrderInfo() {
|
|
|
|
- this.orderInfo = uni.getStorageSync('orderInfo')
|
|
|
|
- uni.removeStorageSync('orderInfo')
|
|
|
|
- },
|
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
+ wxLogin.wxLoginAuthorize()
|
|
|
|
+ this.params.ticket = option.ticket
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.initData(option)
|
|
|
|
+ },2000)
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['hasLogin', 'userInfo', ])
|
|
|
|
+ },
|
|
|
|
+ methods:{
|
|
|
|
+ // 初始化
|
|
|
|
+ async initData(option) {
|
|
|
|
+ const userInfo = await this.$api.getStorage()
|
|
|
|
+ this.params.userId = userInfo.userId
|
|
|
|
+ this.contentModalText = `您的采美机构账号为【${userInfo.name}】,确认绑定吗?`
|
|
|
|
+ },
|
|
|
|
+ //确认操作
|
|
|
|
+ handleClick(e) {
|
|
|
|
+ if (e.index == 1) {
|
|
|
|
+ this.userTicketBind(this.params)
|
|
|
|
+ }
|
|
|
|
+ this.modal = false
|
|
|
|
+ },
|
|
|
|
+ //点击绑定
|
|
handleEntry(){
|
|
handleEntry(){
|
|
|
|
+ if(!this.hasLogin){
|
|
|
|
+ this.$util.msg('您还未登录采美机构账号,请先登录!', 2000)
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ const pages = getCurrentPages()
|
|
|
|
+ const page = pages[pages.length - 1]
|
|
|
|
+ uni.setStorageSync('LOGIN_REDIRECT_URL', page.$page.fullPath)
|
|
|
|
+ this.$api.navigateTo('/pages/login/login')
|
|
|
|
+ }, 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if(!this.params.name){
|
|
if(!this.params.name){
|
|
- this.$util.msg('请填写您的姓名',2000)
|
|
|
|
- return
|
|
|
|
|
|
+ this.$util.msg('请输入您的姓名~', 2000)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if(!this.params.shareCode){
|
|
|
|
- this.$util.msg('请填写您的联系方式',2000)
|
|
|
|
- return
|
|
|
|
|
|
+ if(!this.params.idCard){
|
|
|
|
+ this.$util.msg('请输入您的证件号码~', 2000)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- },
|
|
|
|
- initData(option){
|
|
|
|
- const data = JSON.parse(option.data)
|
|
|
|
- this.orderId = data.data.orderId
|
|
|
|
- this.shopOrderId = data.data.shopOrderId
|
|
|
|
- this.payType = data.data.type
|
|
|
|
- this.amuntMoney = data.data.payAmount
|
|
|
|
- if(this.payType == 'success'){
|
|
|
|
- this.payStatus = true
|
|
|
|
- this.successText = '订单支付成功'
|
|
|
|
- }else{
|
|
|
|
- this.payStatus = false
|
|
|
|
- this.successText = '订单支付失败'
|
|
|
|
- }
|
|
|
|
- this.PayOrderCheckoutCounter(this.shopOrderId)
|
|
|
|
- },
|
|
|
|
- async PayOrderCheckoutCounter(shopOrderId){//初始化支付信息
|
|
|
|
|
|
+ if(!this.params.mobile){
|
|
|
|
+ this.$util.msg('请输入您的联系电话~', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.params.work){
|
|
|
|
+ this.$util.msg('请输入您的职业~', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.modal = true
|
|
|
|
+ },
|
|
|
|
+ // 绑定门票
|
|
|
|
+ async userTicketBind(params){
|
|
try{
|
|
try{
|
|
- const res = await this.PayService.PayOrderCheckoutCounter({ shopOrderId : shopOrderId })
|
|
|
|
- const data = res.data.shopOrder
|
|
|
|
- const status = data.status //子订单状态
|
|
|
|
- this.mapStateArr.forEach(value => {
|
|
|
|
- if(status === value){
|
|
|
|
- this.payBtnStatus = true
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.isRepuest = true
|
|
|
|
|
|
+ await this.UserService.userTicketBind(params)
|
|
|
|
+ this.$util.msg('绑定成功', 2000, true, 'success')
|
|
|
|
+ this.params.idCard = ''
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.$api.switchTabTo('/pages/tabBar/home/index')
|
|
|
|
+ },2000)
|
|
}catch(error){
|
|
}catch(error){
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|
|
}
|
|
}
|
|
- },
|
|
|
|
- toAgainPay(){
|
|
|
|
- this.$api.reLaunch(`/pages/user/order/order-pay-list?shopOrderId=${this.shopOrderId}`)
|
|
|
|
- },
|
|
|
|
- details(){
|
|
|
|
- this.$api.reLaunch('/pages/user/order/order-details?type=share&shopOrderId='+this.shopOrderId)
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -122,13 +190,18 @@
|
|
background: url(https://admin.caimei365.com/userfiles/1/images/photo/2024/08/ziluo_bg.jpg) no-repeat;
|
|
background: url(https://admin.caimei365.com/userfiles/1/images/photo/2024/08/ziluo_bg.jpg) no-repeat;
|
|
background-size: contain;
|
|
background-size: contain;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- padding: 0 150rpx;
|
|
|
|
|
|
+ padding: 0 110rpx;
|
|
|
|
+ .login-title{
|
|
|
|
+ font-size: $font-size-28;
|
|
|
|
+ line-height: 58rpx;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ }
|
|
.login-input{
|
|
.login-input{
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 88rpx;
|
|
height: 88rpx;
|
|
padding:0 24rpx;
|
|
padding:0 24rpx;
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
- margin-bottom: 60rpx;
|
|
|
|
|
|
+ margin-bottom: 40rpx;
|
|
background: #FFFFFF;
|
|
background: #FFFFFF;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 50rpx;
|
|
border-radius: 50rpx;
|
|
@@ -149,11 +222,16 @@
|
|
line-height: 88rpx;
|
|
line-height: 88rpx;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
- margin-bottom: 24rpx;
|
|
|
|
text-align: center;
|
|
text-align: center;
|
|
background-color: #e10078;
|
|
background-color: #e10078;
|
|
border-radius: 50rpx;
|
|
border-radius: 50rpx;
|
|
}
|
|
}
|
|
|
|
+ .login-text{
|
|
|
|
+ font-size: $font-size-26;
|
|
|
|
+ line-height: 48rpx;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin-top: 50rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
</style>
|