|
@@ -45,8 +45,9 @@
|
|
|
<view class="fs-30 fc-3 fw-400">手输条码</view>
|
|
<view class="fs-30 fc-3 fw-400">手输条码</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="shop_id == 299" class="box-2-shou flex-justify-center align-items-center" @click="openMenber()">
|
|
<view v-if="shop_id == 299" class="box-2-shou flex-justify-center align-items-center" @click="openMenber()">
|
|
|
- <image src="@/static/img/txm.png" mode=""></image>
|
|
|
|
|
- <view class="fs-30 fc-3 fw-400">扫会员码</view>
|
|
|
|
|
|
|
+ <image src="@/static/img/huiyuan.png" mode=""></image>
|
|
|
|
|
+ <view v-if="!member_id" class="fs-30 fc-3 fw-400">会员登录</view>
|
|
|
|
|
+ <view v-else class="fs-30 fc-3 fw-400">更换会员</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="member_id" class="flex-justify-center align-items-center">
|
|
<view v-if="member_id" class="flex-justify-center align-items-center">
|
|
|
<view class="fs-24 fc-074B86 fw-400">会员ID {{member_id}}</view>
|
|
<view class="fs-24 fc-074B86 fw-400">会员ID {{member_id}}</view>
|
|
@@ -110,13 +111,56 @@
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
|
|
- <!-- 手动输入 -->
|
|
|
|
|
|
|
+ <!-- 手动输入条形码 -->
|
|
|
<uni-popup ref="inputDialog" type="dialog">
|
|
<uni-popup ref="inputDialog" type="dialog">
|
|
|
<uni-popup-dialog v-model="headValue" mode="input" title="输入条码" placeholder="请输入条码"
|
|
<uni-popup-dialog v-model="headValue" mode="input" title="输入条码" placeholder="请输入条码"
|
|
|
@confirm="dialogInputConfirm"></uni-popup-dialog>
|
|
@confirm="dialogInputConfirm"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
-
|
|
|
|
|
- <!-- 会员码 -->
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 选择会员登录方式 -->
|
|
|
|
|
+ <uni-popup ref="memberType" type="center" :mask-click="false">
|
|
|
|
|
+ <view class="member-type-box">
|
|
|
|
|
+ <view class="member-type-box-title mb-40">
|
|
|
|
|
+ <view class="fs-32 fw-b text-align-center">选择会员登录方式</view>
|
|
|
|
|
+ <image @click="closeMemberTypePop()" src="@/static/member/close.png" mode=""></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-justify-around member-type-box-icon">
|
|
|
|
|
+ <view class="" @click="openPhone()">
|
|
|
|
|
+ <image src="@/static/img/phone-login.png" mode=""></image>
|
|
|
|
|
+ <view class="">手机号登录</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="" @click="openPOP()">
|
|
|
|
|
+ <image src="@/static/img/code-login.png" mode=""></image>
|
|
|
|
|
+ <view class="">扫码登录</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 会员输入手机号 -->
|
|
|
|
|
+ <uni-popup ref="inputPhone" type="bottom" :mask-click="false">
|
|
|
|
|
+ <view class="flex-common-css member-pop-view">
|
|
|
|
|
+ <view class="member-pop-phone-1 flex-1"></view>
|
|
|
|
|
+ <view class="member-pop-phone-2">
|
|
|
|
|
+ <view class="member-type-box-title mb-40">
|
|
|
|
|
+ <view class="fs-32 fw-b text-align-center">手机号登录会员</view>
|
|
|
|
|
+ <image @click="closePhone()" src="@/static/member/fanhui.png" mode=""></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="member-phone-input mb-25" :class="phone?'fc-3':'fc-9'">
|
|
|
|
|
+ {{phone||'请输入手机号'}}
|
|
|
|
|
+ <image @click="closeALL()" src="@/static/member/close.png" mode=""></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-wrap-wrap flex-justify-space">
|
|
|
|
|
+ <view class="phone-num-box text-align-center fw-600 fs-30" @click="inputPhoneNum(item)" v-for="(item,i) in numList" :key="i">{{item}}</view>
|
|
|
|
|
+ <view class="phone-num-box text-align-center fw-600 fs-30 fc-f bgc-lv" @click="memberPhoneLogin()">登录</view>
|
|
|
|
|
+ <view class="phone-num-box text-align-center fw-600 fs-30" @click="inputPhoneNum(0)">0</view>
|
|
|
|
|
+ <view class="phone-num-box text-align-center fw-600 fs-42 bgc-hui fc-ED301D" @click="delPhoneNum()">←</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 会员扫码 -->
|
|
|
<uni-popup ref="inputMember" type="bottom" :mask-click="false">
|
|
<uni-popup ref="inputMember" type="bottom" :mask-click="false">
|
|
|
<view class="flex-common-css member-pop-view">
|
|
<view class="flex-common-css member-pop-view">
|
|
|
<view class="member-pop-view-1"></view>
|
|
<view class="member-pop-view-1"></view>
|
|
@@ -196,7 +240,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- isMemeber: false,
|
|
|
|
|
|
|
+ isMemeber: false,//是否打开会员扫描
|
|
|
discount: 0, //折扣
|
|
discount: 0, //折扣
|
|
|
member_id: '', //会员id
|
|
member_id: '', //会员id
|
|
|
invite_code: '', //推荐码
|
|
invite_code: '', //推荐码
|
|
@@ -207,7 +251,7 @@
|
|
|
|
|
|
|
|
goodsList: [], //商品列表
|
|
goodsList: [], //商品列表
|
|
|
|
|
|
|
|
- outscan: false,
|
|
|
|
|
|
|
+ outscan: false,//是否加载扫码组件
|
|
|
keyArr: [],
|
|
keyArr: [],
|
|
|
nvalue: '',
|
|
nvalue: '',
|
|
|
auth_code: '', //付款码
|
|
auth_code: '', //付款码
|
|
@@ -215,10 +259,11 @@
|
|
|
payFLag: true, //支付还是添加商品 true 添加商品 false 结算扫码
|
|
payFLag: true, //支付还是添加商品 true 添加商品 false 结算扫码
|
|
|
|
|
|
|
|
isAJAX: false,
|
|
isAJAX: false,
|
|
|
-
|
|
|
|
|
headValue: '', //手动输入的值
|
|
headValue: '', //手动输入的值
|
|
|
-
|
|
|
|
|
shop_id: '',
|
|
shop_id: '',
|
|
|
|
|
+
|
|
|
|
|
+ phone:'',
|
|
|
|
|
+ numList:[1,2,3,4,5,6,7,8,9],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -423,33 +468,61 @@
|
|
|
this.getGoods();
|
|
this.getGoods();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 会员扫码
|
|
|
|
|
|
|
+ // 选择会员登录方式
|
|
|
openMenber() {
|
|
openMenber() {
|
|
|
- // let href = "https;//finance.jhcs888.com/3/pages/finance/index/membercode=16772058project=1";
|
|
|
|
|
- // let index = href.indexOf('membercode=') + 11
|
|
|
|
|
- // this.invite_code = href.substring(index,index+8)
|
|
|
|
|
- // projectDiscount({invite_code:this.invite_code}).then((res)=>{
|
|
|
|
|
- // if(res.code == 1){
|
|
|
|
|
- // this.isAJAX = false;
|
|
|
|
|
- // this.member_id = res.data.member_id;
|
|
|
|
|
- // this.discount = res.data.discount * 1;
|
|
|
|
|
- // }else{
|
|
|
|
|
- // this.isAJAX = false;
|
|
|
|
|
- // tools.error(res.msg)
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.$refs.memberType.open();
|
|
|
|
|
+ },
|
|
|
|
|
+ closeMemberTypePop(){
|
|
|
|
|
+ this.$refs.memberType.close();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 扫码登录会员
|
|
|
|
|
+ openPOP(){
|
|
|
this.isMemeber = true;
|
|
this.isMemeber = true;
|
|
|
|
|
+ this.$refs.memberType.close();
|
|
|
this.$refs.inputMember.open();
|
|
this.$refs.inputMember.open();
|
|
|
},
|
|
},
|
|
|
closePOP() {
|
|
closePOP() {
|
|
|
this.isMemeber = false;
|
|
this.isMemeber = false;
|
|
|
this.$refs.inputMember.close();
|
|
this.$refs.inputMember.close();
|
|
|
},
|
|
},
|
|
|
- lookBigImg(list, index) {
|
|
|
|
|
- uni.previewImage({
|
|
|
|
|
- urls: list,
|
|
|
|
|
- current: index,
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 手机号登录会员
|
|
|
|
|
+ openPhone(){
|
|
|
|
|
+ this.$refs.memberType.close();
|
|
|
|
|
+ this.$refs.inputPhone.open();
|
|
|
|
|
+ },
|
|
|
|
|
+ closePhone(){
|
|
|
|
|
+ this.$refs.inputPhone.close();
|
|
|
|
|
+ },
|
|
|
|
|
+ closeALL(){
|
|
|
|
|
+ this.phone = '';
|
|
|
|
|
+ },
|
|
|
|
|
+ inputPhoneNum(num){
|
|
|
|
|
+ this.phone = this.phone + num + ''
|
|
|
|
|
+ },
|
|
|
|
|
+ delPhoneNum(){
|
|
|
|
|
+ if(this.phone.length > 0){
|
|
|
|
|
+ this.phone = this.phone.slice(0,-1)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ memberPhoneLogin(){
|
|
|
|
|
+ if (this.isAJAX) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isAJAX = true;
|
|
|
|
|
+ projectDiscount({
|
|
|
|
|
+ phone: this.phone
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ this.isAJAX = false;
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ this.phone = '';
|
|
|
|
|
+ this.member_id = res.data.member_id;
|
|
|
|
|
+ this.discount = res.data.discount * 1 / 10;
|
|
|
|
|
+ this.$refs.inputPhone.close();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tools.error(res.msg)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
@@ -459,10 +532,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
|
+ .member-phone-input{
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 92rpx;
|
|
|
|
|
+ background: #F4F4F4;
|
|
|
|
|
+ border-radius: 25rpx;
|
|
|
|
|
+ border: 2rpx solid #333333;
|
|
|
|
|
+ line-height: 92rpx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 0 100rpx 0 30rpx;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ image{
|
|
|
|
|
+ width: 40rpx;
|
|
|
|
|
+ height: 40rpx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 20rpx;
|
|
|
|
|
+ top: 25rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .phone-num-box{
|
|
|
|
|
+ width: 32%;
|
|
|
|
|
+ height: 100rpx;
|
|
|
|
|
+ line-height: 100rpx;
|
|
|
|
|
+ border: 1rpx solid #ccc;
|
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .member-type-box-title{
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ image{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ width: 50rpx;
|
|
|
|
|
+ height: 50rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .member-type-box{
|
|
|
|
|
+ width: 600rpx;
|
|
|
|
|
+ height: 300rpx;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 24rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .member-type-box-icon{
|
|
|
|
|
+ image{
|
|
|
|
|
+ width: 100rpx;
|
|
|
|
|
+ height: 100rpx;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.member-pop-view {
|
|
.member-pop-view {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100vh;
|
|
height: 100vh;
|
|
|
background: #939394;
|
|
background: #939394;
|
|
|
|
|
+
|
|
|
|
|
+ .member-pop-phone-1{
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .member-pop-phone-2{
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ min-height: 600rpx;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 38rpx;
|
|
|
|
|
+ border-radius: 20rpx 20rpx 0 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
.member-pop-view-1 {
|
|
.member-pop-view-1 {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -613,6 +753,7 @@
|
|
|
image {
|
|
image {
|
|
|
width: 25rpx;
|
|
width: 25rpx;
|
|
|
height: 25rpx;
|
|
height: 25rpx;
|
|
|
|
|
+ margin-right: 2rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|