完善云菜窖小程序

This commit is contained in:
myTest383
2025-02-06 13:40:47 +08:00
parent 81fa122a45
commit a81067eb23
51 changed files with 1634 additions and 1626 deletions

View File

@@ -6,7 +6,7 @@
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj_new1.png" mode="scaleToFill"
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj_new1.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>

View File

@@ -1,18 +1,18 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj3.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj3.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -37,106 +37,106 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定企业卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定企业卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#89DAFB,#5C9EFD); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#89DAFB,#5C9EFD); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
}
}
},
onLoad() {
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
}
}
},
onLoad() {
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.empcardBind(this.page).then((resp) => {
bus.$emit('order3', "监听回调");
uni.navigateBack()
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.empcardBind(this.page).then((resp) => {
bus.$emit('order3', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -1,21 +1,21 @@
<template>
<!-- 扫码进入 携带参数 -->
<!-- 扫码进入 携带参数 -->
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定企业卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj3.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定企业卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj3.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -40,164 +40,164 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定企业卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定企业卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#89DAFB,#5C9EFD); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#89DAFB,#5C9EFD); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
getApp().globalData.token = res.data.data.token
uni.setStorageSync("satoken",res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
_this.page.customerSid = getApp().globalData.sid
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
getApp().globalData.token = res.data.data.token
uni.setStorageSync("satoken", res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
_this.page.customerSid = getApp().globalData.sid
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)
if (options) {
console.log("options", options)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
var code = q.split('=')[1]
var code = q.split('=')[1]
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
console.log("提货卡编码", code)
this.page.code = code
}
console.log("提货卡编码", code)
this.page.code = code
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.empcardBind(this.page).then((resp) => {
bus.$emit('order3', "监听回调");
uni.switchTab({
url: '/pages/home/corporateCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.empcardBind(this.page).then((resp) => {
bus.$emit('order3', "监听回调");
uni.switchTab({
url: '/pages/home/corporateCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>

View File

@@ -1,18 +1,18 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj2.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj2.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -37,121 +37,121 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定福礼卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定福礼卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FF8585,#FF3F22); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FF8585,#FF3F22); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order2', "监听回调");
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/giftCard'
})
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order2', "监听回调");
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/giftCard'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -1,21 +1,21 @@
<template>
<!-- 扫码进入 携带参数 -->
<!-- 扫码进入 携带参数 -->
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj2.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj2.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -40,161 +40,161 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定福礼卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定福礼卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FF8585,#FF3F22); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FF8585,#FF3F22); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)
if (options) {
console.log("options", options)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
var code = q.split('=')[1]
var code = q.split('=')[1]
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
console.log("提货卡编码", code)
this.page.code = code
}
console.log("提货卡编码", code)
this.page.code = code
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order2', "监听回调");
uni.switchTab({
url: '/pages/home/giftCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order2', "监听回调");
uni.switchTab({
url: '/pages/home/giftCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>

View File

@@ -1,18 +1,18 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj1.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj1.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -37,124 +37,124 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定个人卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定个人卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/personCard'
})
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/personCard'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -1,21 +1,21 @@
<template>
<!-- 扫码进入 携带参数 -->
<!-- 扫码进入 携带参数 -->
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj1.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj1.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -40,161 +40,161 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定个人卡</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定个人卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
绑定</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)
if (options) {
console.log("options", options)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
var code = q.split('=')[1]
var code = q.split('=')[1]
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
console.log("提货卡编码", code)
this.page.code = code
}
console.log("提货卡编码", code)
this.page.code = code
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/personCard'
})
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/personCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>

View File

@@ -1,18 +1,18 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -37,26 +37,26 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<!-- <view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<!-- <view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" /> -->
</view>
<!-- <text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
</view>
<!-- <text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
@@ -64,97 +64,97 @@
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view> -->
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
接收</view>
</view>
</view>
接收</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.code = options.code
this.page.codeKey = options.codeKey
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入20位提货编码')
return
}
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入20位提货编码')
return
}
// if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
// this.shortToast('请输入6位提货密码')
// return
// }
let _this = this
_this.$api.bindAllCard(this.page).then((resp) => {
// bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/myCellar'
})
}
// if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
// this.shortToast('请输入6位提货密码')
// return
// }
let _this = this
_this.$api.bindAllCard(this.page).then((resp) => {
// bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/myCellar'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -1,21 +1,21 @@
<template>
<!-- 扫码进入 携带参数 -->
<!-- 扫码进入 携带参数 -->
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://ordermall.yxtsoft.com/lpkui/image/bind_bj.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
@@ -40,167 +40,167 @@
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
接收</view>
</view>
</view>
接收</view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)
if (options) {
console.log("options", options)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
var code = q.split('=')[1]
var code = q.split('=')[1]
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
console.log("提货卡编码", code)
this.page.code = code
}
console.log("提货卡编码", code)
this.page.code = code
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
this.page.customerSid = getApp().globalData.sid
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
console.log("+++++++++++", this.page);
this.page.customerSid = getApp().globalData.sid
_this.$api.bindAllCard(this.page).then((resp) => {
// bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/myCellar'
})
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
console.log("+++++++++++", this.page);
_this.$api.bindAllCard(this.page).then((resp) => {
// bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/myCellar'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>