开关
This commit is contained in:
parent
d96b457f36
commit
1f99299bd7
|
@ -1,9 +1,6 @@
|
|||
const install = (Vue, vm) => {
|
||||
|
||||
// Vue.prototype.$u.http.setConfig({
|
||||
|
||||
// baseURL: 'https://yruibao.com/admin',
|
||||
|
||||
// // baseUrl: 'http://192.168.10.104:8088',
|
||||
// method: 'POST',
|
||||
// // 设置为json,返回后会对数据进行一次JSON.parse()
|
||||
|
@ -34,12 +31,9 @@ const install = (Vue, vm) => {
|
|||
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式
|
||||
// 见:https://uviewui.com/components/globalVariable.html
|
||||
// config.header.token = vm.token;
|
||||
|
||||
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
|
||||
// config.header.token = vm.$store.state.token;
|
||||
|
||||
// 方式三,如果token放在了globalData,通过getApp().globalData获取
|
||||
|
||||
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
|
||||
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
|
||||
const token = uni.getStorageSync('token');
|
||||
|
|
|
@ -736,22 +736,12 @@
|
|||
},
|
||||
// 点击结束订单
|
||||
btnjieshu() {
|
||||
// this.getprice()
|
||||
// if (this.detaobj.suitFeeMode == 1) {
|
||||
let currentTime = new Date();
|
||||
let endTimeString = this.detaobj.suitEndTime
|
||||
let endTimeParts = endTimeString.split(/[- :]/)
|
||||
let endTime = new Date(endTimeParts[0], endTimeParts[1] - 1, endTimeParts[2], endTimeParts[3], endTimeParts[4], endTimeParts[5]);
|
||||
// 比较当前时间和结束时间
|
||||
if (currentTime > endTime) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
}else if (this.onlineStatus == 1) {
|
||||
if (this.detaobj.suitFeeType == 2 || this.detaobj.suitFeeType == 3){
|
||||
if (this.onlineStatus == 1) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要提前结束订单吗,将不会产生任何退款和赔偿?',
|
||||
content: '您确定要提前结束订单吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
|
@ -775,6 +765,11 @@
|
|||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -835,6 +830,110 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
}else{
|
||||
let currentTime = new Date();
|
||||
let endTimeString = this.detaobj.suitEndTime
|
||||
let endTimeParts = endTimeString.split(/[- :]/)
|
||||
let endTime = new Date(endTimeParts[0], endTimeParts[1] - 1, endTimeParts[2], endTimeParts[3], endTimeParts[4], endTimeParts[5]);
|
||||
// 比较当前时间和结束时间
|
||||
if (currentTime > endTime) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
}else if (this.onlineStatus == 1) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要提前结束订单吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
billId: that.billId
|
||||
}
|
||||
that.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '结束成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},500)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
},500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (this.ver_data == null) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '正在连接蓝牙,请尽量靠近设备',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.jieshufalg = true
|
||||
let data = {
|
||||
billId: this.billId,
|
||||
}
|
||||
this.$u.put(`/app/bill/endUse`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
let that = this
|
||||
setTimeout(() => {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: 'time0@'
|
||||
})
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: '11time0@'
|
||||
})
|
||||
let datas = {
|
||||
mac:that.qrResult,
|
||||
reason:'用户结束订单操作',
|
||||
command:'11time0@',
|
||||
result:'成功'
|
||||
}
|
||||
that.$u.post(`/app/commandLog/bluetooth`,datas).then(res => {})
|
||||
that.jieshufalg = false
|
||||
uni.showToast({
|
||||
title:'结束成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/shouye/index'
|
||||
})
|
||||
}, 2000)
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 每一分钟请求更新一次
|
||||
startTimers() {
|
||||
|
|
|
@ -89,10 +89,10 @@
|
|||
</view>
|
||||
<view class="" style="width: 100%" v-if="item.feeType == 3 || item.feeType == 4">
|
||||
<u-collapse>
|
||||
<u-collapse-item title="收费详情">
|
||||
<view class="" style="margin-bottom: 6rpx;font-size: 24rpx;">
|
||||
收费时间段(滑动查看各时段费用)
|
||||
</view>
|
||||
<u-collapse-item title="收费详情">
|
||||
<view class="" style="margin-bottom: 6rpx;font-size: 24rpx;">
|
||||
收费时间段(滑动查看各时段费用)
|
||||
</view>
|
||||
<view class="ulbox">
|
||||
<view class="ulli">
|
||||
<view class="li" v-for="(val,gearAmountindex) in item.arr" :key="gearAmountindex">
|
||||
|
@ -105,8 +105,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</view>
|
||||
<view class="" style="margin-top: 10rpx;">
|
||||
套餐说明:{{item.description == null ? '无' : item.description}}
|
||||
|
@ -126,7 +126,7 @@
|
|||
{{item.price == null ? '--' :item.price}}元
|
||||
</view>
|
||||
<view class="txt2">
|
||||
每单享{{item.discount == item.discount}}折
|
||||
每单享{{item.discount == null ? '--' : item.discount}}折
|
||||
</view>
|
||||
<view class="buy_btn">
|
||||
前去购买
|
||||
|
@ -134,7 +134,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="youhui" @click="huiyuanflag = true">
|
||||
<view class="youhui" v-if="discountAmount != ''" @click="huiyuanflag = true">
|
||||
<view style="color: #666;">{{vipLevelName}}</view>
|
||||
<view class="yh">
|
||||
<text class="yi">已优惠{{discountAmount}}元</text> <u-icon name="arrow-right" color="rgb(128, 128, 128)" size="28"></u-icon>
|
||||
|
@ -150,7 +150,7 @@
|
|||
立即支付
|
||||
</button>
|
||||
<view class="zf" @click="btnzhifu" v-else>
|
||||
立即支付
|
||||
¥{{payPrice}} 立即支付
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="zhifuflag"></view>
|
||||
|
@ -195,7 +195,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="yinsiflag"></view>
|
||||
<!-- 选择会员卡弹窗 -->
|
||||
<!-- 选择会员弹窗 -->
|
||||
<view class="huiyuantc" v-if="huiyuanflag">
|
||||
<view class="cha" @click="huiyuanflag = false">
|
||||
×
|
||||
|
@ -205,7 +205,18 @@
|
|||
</view>
|
||||
<view class="vip_box1" v-for="(item,index) in storelist" :key="index" @click="btnxzhuiyuan(item)">
|
||||
<view class="txt1">{{item.vipLevelName}}</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余次数/{{item.surplusCount}}次</view>
|
||||
<view class="txt1" style="position: absolute;top: 70rpx;font-size: 24rpx;font-weight: 400;display: flex;">每单享{{item.discount == null ? '--' : item.discount}}折
|
||||
<view class="" v-if="item.limitType == 1">
|
||||
使用无限制
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 2">
|
||||
每周最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 3">
|
||||
每30天最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余{{item.surplusCount}}次</view>
|
||||
<view class="btn">
|
||||
使用
|
||||
</view>
|
||||
|
@ -284,17 +295,17 @@
|
|||
this.swindleflag = true
|
||||
if (option.q) {
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
||||
let results = regex.exec(url)
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
||||
}
|
||||
this.sceneValue = option.q
|
||||
let decodedValue = decodeURIComponent(this.sceneValue);
|
||||
let decodedValue = decodeURIComponent(this.sceneValue)
|
||||
this.id = getQueryParam(decodedValue, 's')
|
||||
} else {
|
||||
this.id = option.id
|
||||
}
|
||||
console.log(this.id);
|
||||
console.log(this.id)
|
||||
},
|
||||
computed: {
|
||||
|
||||
|
@ -324,10 +335,10 @@
|
|||
uni.removeStorage({
|
||||
key: 'tcid',
|
||||
success: function () {
|
||||
console.log('本地存储项 tcid 已删除');
|
||||
console.log('本地存储项 tcid 已删除')
|
||||
},
|
||||
fail: function (err) {
|
||||
console.error('删除本地存储项失败:', err);
|
||||
console.error('删除本地存储项失败:', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -340,7 +351,7 @@
|
|||
wx.openBluetoothAdapter({
|
||||
success: function (res) {
|
||||
this.lanyaflag = false
|
||||
console.log('蓝牙适配器初始化成功');
|
||||
console.log('蓝牙适配器初始化成功')
|
||||
// 你可以在这里继续调用其他蓝牙相关的API
|
||||
},
|
||||
fail: function (err) {
|
||||
|
@ -368,7 +379,7 @@
|
|||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': false
|
||||
});
|
||||
})
|
||||
},
|
||||
onBeforeUnmount() {
|
||||
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
|
||||
|
@ -388,10 +399,10 @@
|
|||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
console.log(res,'resresres');
|
||||
console.log(res,'resresres')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err);
|
||||
console.error('获取位置失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -476,7 +487,7 @@
|
|||
that.arrlists.push(res.data)
|
||||
that.onlineStatus = res.data.onlineStatus
|
||||
that.mac = 'CTKG-' + res.data.mac
|
||||
if(that.onlineStatus == 0){
|
||||
if(that.onlineStatus == 0){ //判断离线默认连蓝牙
|
||||
that.getlanya()
|
||||
}
|
||||
}
|
||||
|
@ -495,7 +506,7 @@
|
|||
})
|
||||
this.gettaoc()
|
||||
},
|
||||
|
||||
// 连接蓝牙函数
|
||||
getlanya(){
|
||||
if (this.ver_data == '') {
|
||||
this.czflag = true
|
||||
|
@ -530,12 +541,13 @@
|
|||
},15000)
|
||||
}
|
||||
},
|
||||
|
||||
// 自定义点击返回首页
|
||||
btnshouye(){
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
},
|
||||
// 点击我已知晓
|
||||
btnjxcz() {
|
||||
wx.openBluetoothAdapter({
|
||||
success: function (res) {
|
||||
|
@ -556,7 +568,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 点击拨打电话
|
||||
call() {
|
||||
let phoneNumber = ''
|
||||
if (this.deviceobj.storeContactMobile == null) {
|
||||
|
@ -578,12 +590,13 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
//
|
||||
//点击跳转隐私政策
|
||||
btnyinsi(){
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/statulist/about/index?tit=' + '隐私政策'
|
||||
})
|
||||
},
|
||||
// 点击跳转服务协议
|
||||
btnyonghu(){
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/statulist/about/index?tit=' + '用户服务协议'
|
||||
|
@ -598,6 +611,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 请求个人信息
|
||||
getuserinfo() {
|
||||
this.$u.get("/app/user/userInfo").then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -804,7 +818,7 @@
|
|||
let data = {
|
||||
deviceNo: that.id,
|
||||
suitId: that.zfobj.suitId,
|
||||
money: this.payPrice,
|
||||
money: that.payPrice, // that.zfobj.price
|
||||
suitDeposit:that.zfobj.deposit,
|
||||
suitTime: that.zfobj.value,
|
||||
suitTimeUnit:that.suitTimeUnit,
|
||||
|
@ -813,9 +827,9 @@
|
|||
suitGearAmount:that.suitGearAmount,
|
||||
suitGearTime:that.suitGearTime,
|
||||
suitPrice:that.suitPrice,
|
||||
vipId:this.huiyuanid,
|
||||
vipDiscount:this.zhekou,
|
||||
discountAmount:this.discountAmount
|
||||
vipId:that.huiyuanid,
|
||||
vipDiscount:that.zhekou,
|
||||
discountAmount:that.discountAmount
|
||||
}
|
||||
that.$u.post('/app/bill/recharge', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -850,6 +864,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
that.$u.put(`/app/bill/recharge/cancel/${that.orderno}`).then(res => {})
|
||||
that.zhifuflag = false
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
|
@ -897,6 +912,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
that.$u.put(`/app/bill/recharge/cancel/${that.orderno}`).then(res => {})
|
||||
that.zhifuflag = false
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
|
@ -942,7 +958,7 @@
|
|||
let data = {
|
||||
deviceNo: that.id,
|
||||
suitId: that.zfobj.suitId,
|
||||
money: this.payPrice,
|
||||
money: that.payPrice,//that.zfobj.price
|
||||
suitDeposit:that.zfobj.deposit,
|
||||
suitTime: that.zfobj.value,
|
||||
suitTimeUnit:that.suitTimeUnit,
|
||||
|
@ -951,9 +967,9 @@
|
|||
suitGearAmount:that.suitGearAmount,
|
||||
suitGearTime:that.suitGearTime,
|
||||
suitPrice:that.suitPrice,
|
||||
vipId:this.huiyuanid,
|
||||
vipDiscount:this.zhekou,
|
||||
discountAmount:this.discountAmount
|
||||
vipId:that.huiyuanid,
|
||||
vipDiscount:that.zhekou,
|
||||
discountAmount:that.discountAmount
|
||||
}
|
||||
that.$u.post('/app/bill/recharge', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -983,7 +999,7 @@
|
|||
let timesc = res.data.syncDeviceSeconds
|
||||
let suitEnabledVoid = res.data.suitEnabledVoid
|
||||
let suitVoidMinute = res.data.suitVoidMinute
|
||||
console.log('12121',res,suitEnabledVoid,suitVoidMinute);
|
||||
// console.log('12121',res,suitEnabledVoid,suitVoidMinute)
|
||||
if (res.code == 200) {
|
||||
let datas = {
|
||||
mac:that.mac,
|
||||
|
@ -1056,6 +1072,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.$u.put(`/app/bill/recharge/cancel/${that.orderno}`).then(res => {})
|
||||
this.zhifuflag = false
|
||||
setTimeout(() => {
|
||||
this.czflag = false
|
||||
|
@ -1246,18 +1263,19 @@
|
|||
// })
|
||||
// },
|
||||
|
||||
|
||||
// 蓝牙充值动画
|
||||
startLoading() {
|
||||
this.isLoading = true;
|
||||
this.isLoading = true
|
||||
const intervalId = setInterval(() => {
|
||||
this.progress += 100 / 100; // 每次增加 1
|
||||
this.progress += 100 / 100 // 每次增加 1
|
||||
if (this.progress >= 99) {
|
||||
clearInterval(intervalId);
|
||||
this.isLoading = false;
|
||||
this.progress = 98; // 确保进度条最终达到98
|
||||
clearInterval(intervalId)
|
||||
this.isLoading = false
|
||||
this.progress = 98 // 确保进度条最终达到98
|
||||
}
|
||||
}, 15);
|
||||
}, 15)
|
||||
},
|
||||
// 点击同意政策
|
||||
checkboxChange(e) {
|
||||
this.checked = e.value
|
||||
},
|
||||
|
@ -1281,17 +1299,17 @@
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||
if (options.result) {
|
||||
let devicesarr = options.data
|
||||
console.log(devicesarr,this.mac,'111');
|
||||
console.log(devicesarr,this.mac,'111')
|
||||
devicesarr.forEach(device => {
|
||||
const mac = device.name.substring(4);
|
||||
const mac = device.name.substring(4)
|
||||
if (device.name.slice(-12) == this.mac.slice(-12)) {
|
||||
this.deviceId = device.deviceId
|
||||
this.name = device.name
|
||||
// console.log(device.name,this.mac,'222');
|
||||
this.devicesList.push(device);
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
// console.log(device.name,this.mac,'222')
|
||||
this.devicesList.push(device)
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList))
|
||||
// 将去重后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = uniqueDevicesList;
|
||||
this.devicesList = uniqueDevicesList
|
||||
} else {
|
||||
|
||||
}
|
||||
|
@ -1299,13 +1317,13 @@
|
|||
}
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
|
||||
console.log("连接回调:" + JSON.stringify(options));
|
||||
console.log("连接回调:" + JSON.stringify(options))
|
||||
if (options.result) {
|
||||
// console.log('125451245')
|
||||
{
|
||||
xBlufi.notifyInitBleEsp32({
|
||||
deviceId: this.deviceId
|
||||
});
|
||||
})
|
||||
this.deviceIds = options.data.deviceId
|
||||
this.name = this.name
|
||||
}
|
||||
|
@ -1317,7 +1335,7 @@
|
|||
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
|
||||
this.ver_data = this.parseCustomData(options.data)
|
||||
this.ver_dataflag = 3
|
||||
console.log("1收到设备发来的自定义数据结果:",options.data);
|
||||
console.log("1收到设备发来的自定义数据结果:",options.data)
|
||||
setTimeout(()=>{
|
||||
this.czflag = false
|
||||
this.zhifuflag = false
|
||||
|
@ -1334,15 +1352,15 @@
|
|||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||
if (options.result) {
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) === "CTKG");
|
||||
let uniqueDevicesList = Array.from(new Set(this.devicesList))
|
||||
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 4) === "CTKG")
|
||||
// 将过滤后的数组重新赋值给 this.devicesList
|
||||
this.devicesList = filteredDevices;
|
||||
this.devicesList = filteredDevices
|
||||
}
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
if (!options.result) {
|
||||
console.log('蓝牙未开启');
|
||||
console.log('蓝牙未开启')
|
||||
// uni.showToast({
|
||||
// title: '蓝牙未开启',
|
||||
// icon: 'none',
|
||||
|
@ -1371,8 +1389,8 @@
|
|||
},
|
||||
|
||||
parseCustomData(data) {
|
||||
const dataArray = data.split('@');
|
||||
const parsedData = {};
|
||||
const dataArray = data.split('@')
|
||||
const parsedData = {}
|
||||
const prefixMap = {
|
||||
'V': 'voltage',
|
||||
'S': 'switchState',
|
||||
|
@ -1394,7 +1412,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
return parsedData;
|
||||
return parsedData
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -1454,7 +1472,6 @@
|
|||
font-size: 39rpx;
|
||||
color: #B07C1E;
|
||||
}
|
||||
|
||||
.txt2 {
|
||||
position: absolute;
|
||||
left: 171rpx;
|
||||
|
@ -1463,7 +1480,6 @@
|
|||
font-size: 25rpx;
|
||||
color: #B07C1E;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -1505,11 +1521,10 @@
|
|||
top: 90rpx;
|
||||
width: 100%; /* 根据需要调整宽度 */
|
||||
height: auto; /* 根据内容自动调整高度 */
|
||||
|
||||
.auto_li {
|
||||
position: relative;
|
||||
padding: 24rpx 28rpx;
|
||||
margin-right: 22rpx;
|
||||
position: relative;
|
||||
padding: 24rpx 28rpx;
|
||||
margin-right: 22rpx;
|
||||
width: 408rpx;
|
||||
height: 176rpx;
|
||||
flex-shrink: 0; /* 防止子元素被压缩 */
|
||||
|
@ -1653,9 +1668,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.u-icon__icon{
|
||||
// margin-right: 20rpx;
|
||||
}
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
@ -1702,7 +1714,6 @@
|
|||
padding-bottom: 600rpx;
|
||||
height: 100vh;
|
||||
overflow: scroll;
|
||||
|
||||
.jxcz {
|
||||
width: 563rpx;
|
||||
height: 100rpx;
|
||||
|
@ -1717,73 +1728,51 @@
|
|||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.top {
|
||||
font-size: 40rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.tishi {
|
||||
font-size: 31rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.li {
|
||||
margin-top: 50rpx;
|
||||
font-size: 31rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
image {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .u-title {
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
||||
/deep/ .u-checkbox__label {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
// /deep/ .u-icon__icon{
|
||||
// padding-bottom: 41rpx;
|
||||
// }
|
||||
page {
|
||||
background: linear-gradient(180deg,rgb(136, 131,240) 30%, rgba(255, 255, 255, 0) 100%);
|
||||
// background-color: rgb(136, 131,240);
|
||||
}
|
||||
|
||||
.active {
|
||||
// background-color: #8883F0 !important;
|
||||
// color: #fff !important;
|
||||
border: 4rpx solid #8883F0 !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
overflow: hidden;
|
||||
height: 100vh;
|
||||
|
||||
.tip_box {
|
||||
position: fixed;
|
||||
left: 72rpx;
|
||||
top: 700rpx;
|
||||
width: 610rpx;
|
||||
// height: 282rpx;
|
||||
background: #F7FAFE;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
z-index: 10000000;
|
||||
|
||||
.top {
|
||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||
|
||||
.txt {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
@ -1792,13 +1781,11 @@
|
|||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
|
||||
.bot {
|
||||
border-top: 2rpx solid #D8D8D8;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
height: 100%;
|
||||
|
||||
.bot_left {
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
|
@ -1809,24 +1796,19 @@
|
|||
font-size: 36rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.bot_right {
|
||||
width: 50%;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
border-left: 2rpx solid #D8D8D8;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #8883F0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 40rpx;
|
||||
padding-left: 32rpx;
|
||||
|
@ -1836,7 +1818,6 @@
|
|||
margin-bottom: 45rpx;
|
||||
margin-top: 110rpx;
|
||||
height: 126rpx;
|
||||
|
||||
.wz {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
|
@ -1852,7 +1833,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 66vh;
|
||||
|
@ -1863,20 +1843,17 @@
|
|||
padding-bottom: 400rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
|
||||
.tongyi {
|
||||
width: 590rpx;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
text {
|
||||
color: #638DFF;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.zf {
|
||||
width: 590rpx;
|
||||
height: 84rpx;
|
||||
|
@ -1890,7 +1867,6 @@
|
|||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.shuom {
|
||||
width: 648rpx;
|
||||
max-height: 100%;
|
||||
|
@ -1902,43 +1878,35 @@
|
|||
margin-top: 36rpx;
|
||||
padding: 20rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.tits {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.wz {
|
||||
font-size: 28rpx;
|
||||
color: #ccc;
|
||||
margin-top: 30rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.list_val {
|
||||
.tc {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #525252;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 26rpx;
|
||||
color: #525252;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.rt {
|
||||
font-size: 40rpx;
|
||||
color: #525252;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-size: 40rpx;
|
||||
color: #383838;
|
||||
|
|
|
@ -228,9 +228,6 @@
|
|||
},
|
||||
btntz(){
|
||||
this.maskflag = true
|
||||
// uni.navigateTo({
|
||||
// url:'/page_user/sbdetail?id=' + this.detailobj.deviceId + '&flag=' + true
|
||||
// })
|
||||
},
|
||||
getlist(){
|
||||
this.$u.get(`/app/bill/${this.billId}`).then((res) => {
|
||||
|
@ -241,7 +238,6 @@
|
|||
}else{
|
||||
this.userflag = false
|
||||
}
|
||||
// console.log(res.data.mchId ,this.userType.userId);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -267,7 +263,6 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -276,9 +271,6 @@
|
|||
/deep/ .u-title{
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
/deep/ .u-icon__icon{
|
||||
// padding-bottom: 22rpx;
|
||||
}
|
||||
.mask{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
|
@ -292,13 +284,8 @@
|
|||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
|
||||
.tanc {
|
||||
width: 594rpx;
|
||||
height: 420rpx;
|
||||
|
@ -309,7 +296,6 @@
|
|||
transform: translateX(-50%);
|
||||
top: 506rpx;
|
||||
z-index: 98;
|
||||
|
||||
.anniu {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -317,7 +303,6 @@
|
|||
box-sizing: border-box;
|
||||
margin-top: 64rpx;
|
||||
width: 100%;
|
||||
|
||||
.qux {
|
||||
width: 234rpx;
|
||||
height: 80rpx;
|
||||
|
@ -328,7 +313,6 @@
|
|||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.qd {
|
||||
width: 234rpx;
|
||||
height: 80rpx;
|
||||
|
@ -340,16 +324,12 @@
|
|||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.shuzhi {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// justify-content: space-between;
|
||||
justify-content: center;
|
||||
// padding: 0 60rpx;
|
||||
margin-top: 50rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
input {
|
||||
width: 500rpx;
|
||||
height: 76rpx;
|
||||
|
@ -361,7 +341,6 @@
|
|||
z-index: 99 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
|
@ -371,7 +350,6 @@
|
|||
padding-top: 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 198rpx;
|
||||
height: 172rpx;
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uaG7R4JLfYOzBhWfDN0j" mode=""></image><input type="text" v-model="keyword" placeholder="搜索门店"/> <view class="sousuo" @click="searchs">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="top" v-if="types == 11">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
</view>
|
||||
<view class="top" style="display: flex;justify-content: space-between;" v-else>
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
<view class="cjshop" @click="creadshop">创建店铺</view>
|
||||
</view> -->
|
||||
|
||||
<view class="list" @scrolltolower="onReachBottom">
|
||||
<view class="listitem" v-for="(item,index) in wateringList" :key="index" @click="btnshopxq(item.storeId)">
|
||||
|
@ -193,8 +186,14 @@
|
|||
uni.navigateTo({
|
||||
url:'/page_geren/buyCard?storeId=' + item.storeId
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '功能暂未开放',
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// })
|
||||
}
|
||||
},
|
||||
// 点击跳转到合伙人
|
||||
nav(item){
|
||||
uni.navigateTo({
|
||||
url:'/page_fenbao/hehuoren/index?storeId=' + item.storeId,
|
||||
|
@ -216,7 +215,6 @@
|
|||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
|
||||
// 计算创建到现在运行了多少天
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime)
|
||||
|
@ -254,7 +252,6 @@
|
|||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
|
||||
// 计算创建到现在运行了多少天
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime)
|
||||
|
@ -280,12 +277,12 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 点击搜索店铺
|
||||
searchs() {
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
|
||||
// 上拉加载更多
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum - 1 < sum) {
|
||||
|
@ -295,15 +292,16 @@
|
|||
title: '没有更多店铺了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 点击跳转到新建店铺
|
||||
creadshop() {
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/statulist/myshop/shopxx/index'
|
||||
})
|
||||
},
|
||||
// 点击跳转到店铺详情
|
||||
btnshopxq(id) {
|
||||
uni.navigateTo({
|
||||
url: '/page_fenbao/statulist/myshop/shopdetail/index?id=' + id
|
||||
|
|
|
@ -281,6 +281,11 @@
|
|||
uni.navigateTo({
|
||||
url:'/page_geren/buyCard?storeId=' + item.storeId
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '功能暂未开放',
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// })
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -386,7 +386,7 @@
|
|||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('获取地图缩放级别失败:', error)
|
||||
// console.error('获取地图缩放级别失败:', error)
|
||||
// 额外的错误处理逻辑...
|
||||
},
|
||||
});
|
||||
|
|
|
@ -244,8 +244,6 @@
|
|||
} else {
|
||||
this.shibaiflag = true
|
||||
this.bluetoothflag = false
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
|
||||
|
@ -284,13 +282,10 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
// console.log('蓝牙停止搜索ok')
|
||||
// this.mengcflag = false
|
||||
if (this.devicesLists.length == 0) {
|
||||
this.titleflag = true
|
||||
} else {
|
||||
let arr = []
|
||||
// console.log(this.devicesLists,'101010');
|
||||
this.devicesLists.forEach(item => {
|
||||
arr.push(item.name.slice(-12))
|
||||
})
|
||||
|
@ -316,8 +311,8 @@
|
|||
this.devicesLists.sort((a, b) => {
|
||||
if (a.found && !b.found) return 1 // b排在a前面(即a在后面)
|
||||
if (!a.found && b.found) return -1 // a排在b前面
|
||||
return 0;
|
||||
});
|
||||
return 0
|
||||
})
|
||||
}
|
||||
})
|
||||
setTimeout(()=>{
|
||||
|
|
|
@ -5,39 +5,39 @@
|
|||
<view class="box">
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
<text>*</text>会员卡名称
|
||||
<text>*</text>会员名称
|
||||
</view>
|
||||
<input type="text" v-model="name" placeholder="请输入会员卡名称"/>
|
||||
<input type="text" v-model="name" placeholder="请输入会员名称"/>
|
||||
</view>
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
会员卡原价/元
|
||||
会员原价/元
|
||||
</view>
|
||||
<input type="number" v-model="yuanjia" placeholder="请输入会员卡原价"/>
|
||||
<input type="number" v-model="yuanjia" placeholder="请输入会员原价"/>
|
||||
</view>
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
<text>*</text>会员卡现价/元
|
||||
<text>*</text>会员现价/元
|
||||
</view>
|
||||
<input type="number" v-model="xianjia" placeholder="请输入会员卡现价"/>
|
||||
<input type="number" v-model="xianjia" placeholder="请输入会员现价"/>
|
||||
</view>
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
<text>*</text>会员卡时长/天
|
||||
<text>*</text>会员时长/天
|
||||
</view>
|
||||
<input type="number" v-model="qixian" placeholder="请输入会员卡时长"/>
|
||||
<input type="number" v-model="qixian" placeholder="请输入会员时长"/>
|
||||
</view>
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
<text>*</text>会员卡折扣/折
|
||||
<text>*</text>会员折扣/折
|
||||
</view>
|
||||
<input type="text" v-model="zhekou" placeholder="请输入会员卡折扣"/>
|
||||
<input type="text" v-model="zhekou" placeholder="请输入会员折扣"/>
|
||||
</view>
|
||||
<view class="ul">
|
||||
<view class="name">
|
||||
<text>*</text>会员卡使用次数/次
|
||||
<text>*</text>会员使用次数/次
|
||||
</view>
|
||||
<input type="number" v-model="shangxian" placeholder="请输入会员卡使用次数"/>
|
||||
<input type="number" v-model="shangxian" placeholder="请输入会员使用次数"/>
|
||||
</view>
|
||||
<view class="ul" @click="show = true">
|
||||
<view class="name">
|
||||
|
@ -143,19 +143,19 @@
|
|||
onLoad(option) {
|
||||
this.storeId = option.storeId
|
||||
if(option.id){
|
||||
this.tit = '修改会员卡'
|
||||
this.tit = '修改会员'
|
||||
this.deltit = '删除'
|
||||
this.addtit = '修改'
|
||||
this.id = option.id
|
||||
this.getxq()
|
||||
}else{
|
||||
this.tit = '新增会员卡'
|
||||
this.tit = '新增会员'
|
||||
this.deltit = '取消'
|
||||
this.addtit = '新增'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询会员卡详情
|
||||
// 查询会员详情
|
||||
getxq(){
|
||||
this.$u.get(`/mch/vipLevel/${this.id}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -204,7 +204,7 @@
|
|||
let that = this
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '您是否要删除此会员卡?',
|
||||
content: '您是否要删除此会员?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="会员卡列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
<u-navbar title="会员列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='45'></u-navbar>
|
||||
<view class="cont">
|
||||
<view class="card2" v-for="(item,index) in huiyuanlist" :key="index">
|
||||
|
@ -51,12 +51,12 @@
|
|||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;text-align: center;margin-top: 30rpx;font-size: 32rpx;color: #ccc;">
|
||||
没有更多会员卡啦...
|
||||
没有更多会员啦...
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="anniu" @click="btnadd">
|
||||
新增会员卡
|
||||
新增会员
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -81,7 +81,7 @@
|
|||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 请求店铺会员卡列表
|
||||
// 请求店铺会员列表
|
||||
getlist(){
|
||||
this.$u.get(`/mch/vipLevel/list?pageNum=1&pageSize=999&storeId=${this.storeId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 点击新建会员卡
|
||||
// 点击新建会员
|
||||
btnadd(){
|
||||
uni.navigateTo({
|
||||
url:'/page_geren/addhuiyuan?storeId=' + this.storeId
|
||||
|
|
|
@ -4,33 +4,12 @@
|
|||
<u-navbar :title="tit" :border-bottom="false" :background="background" title-color='#000' title-size='36'
|
||||
back-icon-color='#000' height='45'></u-navbar>
|
||||
</view>
|
||||
<view class="" style="height: 500rpx;overflow: scroll;" v-if="storeId != ''">
|
||||
<view class="vip_box1" v-for="(item,index) in huiyuanlist" :key="index">
|
||||
<view class="txt1">{{item.vipLevelName == null ? '--' : item.vipLevelName}}</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余次数/{{item.surplusCount}}次</view>
|
||||
<view class="btn">
|
||||
已开通
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height: 1400rpx;overflow: scroll;" v-else>
|
||||
<view class="vip_box1" v-for="(item,index) in huiyuanlist" :key="index">
|
||||
<view class="txt1">{{item.vipLevelName == null ? '--' : item.vipLevelName}}</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余次数/{{item.surplusCount}}次</view>
|
||||
<view class="btn">
|
||||
已开通
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="zanwuflag && storeId == '' " style="width: 100%;text-align: center;margin-top: 50rpx;font-size: 32rpx;color: #ccc;">
|
||||
暂无更多会员卡...
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="" v-if="typeflag">
|
||||
<view class="vipcard">
|
||||
<view class="card_top">
|
||||
<view class="name">
|
||||
购买会员卡
|
||||
购买会员
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_bot">
|
||||
|
@ -38,7 +17,7 @@
|
|||
开通立享超值会员特权
|
||||
</view>
|
||||
<view class="txts" v-if="flase">
|
||||
会员卡23天后到期
|
||||
会员23天后到期
|
||||
</view>
|
||||
<view class="topage" @click="topage">
|
||||
购买记录 >
|
||||
|
@ -67,7 +46,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
总共可用{{item.limitTotal == null ? '--' : item.limitTotal}}/次
|
||||
总共可用{{item.limitTotal == null ? '--' : item.limitTotal}}次
|
||||
</view>
|
||||
<view class="money">
|
||||
¥ {{item.price == null ? '--' : item.price}}
|
||||
|
@ -81,7 +60,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="txt">
|
||||
该卡只能用于付费享折扣
|
||||
该会员只能用于付费享折扣
|
||||
</view>
|
||||
</view>
|
||||
<view class="pay_btn" @click="btnzf">
|
||||
|
@ -89,6 +68,50 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="height: 500rpx;overflow: scroll;" v-if="storeId != ''">
|
||||
<view class="vip_box1" v-for="(item,index) in huiyuanlist" :key="index">
|
||||
<view class="txt1">{{item.vipLevelName == null ? '--' : item.vipLevelName}}</view>
|
||||
<view class="txt1" style="position: absolute;top: 70rpx;font-size: 24rpx;font-weight: 400;display: flex;">每单享{{item.discount == null ? '--' : item.discount}}折
|
||||
<view class="" v-if="item.limitType == 1">
|
||||
使用无限制
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 2">
|
||||
每周最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 3">
|
||||
每30天最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余{{item.surplusCount}}次</view>
|
||||
<view class="btn">
|
||||
已开通
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="height: 1400rpx;overflow: scroll;" v-else>
|
||||
<view class="vip_box1" v-for="(item,index) in huiyuanlist" :key="index">
|
||||
<view class="txt1" >{{item.vipLevelName == null ? '--' : item.vipLevelName}}</view>
|
||||
<view class="txt1" style="position: absolute;top: 70rpx;font-size: 24rpx;font-weight: 400;display: flex;">每单享{{item.discount == null ? '--' : item.discount}}折
|
||||
<view class="" v-if="item.limitType == 1">
|
||||
使用无限制
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 2">
|
||||
每周最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
<view class="" v-if="item.limitType == 3">
|
||||
每30天最多用{{item.limitCount == null ? '--' : item.limitCount}}次
|
||||
</view>
|
||||
</view>
|
||||
<view class="txt2">会员将在{{item.endTime.slice(0,10)}}后到期,剩余{{item.surplusCount}}次</view>
|
||||
<view class="btn">
|
||||
已开通
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="zanwuflag && storeId == '' " style="width: 100%;text-align: center;margin-top: 50rpx;font-size: 32rpx;color: #ccc;">
|
||||
暂无更多会员...
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -183,12 +206,6 @@ export default {
|
|||
url:'/page_geren/vip_his'
|
||||
})
|
||||
},
|
||||
|
||||
tobuy(){
|
||||
uni.navigateTo({
|
||||
url:'/page_geren/buyCard'
|
||||
})
|
||||
},
|
||||
// 点击切换高亮
|
||||
choose(itm,idx){
|
||||
this.price = itm.price
|
||||
|
@ -230,8 +247,11 @@ export default {
|
|||
paySign: res.data.payParams.paySign,
|
||||
success(ress) {
|
||||
// 刷新支付接口
|
||||
that.$u.put(`/app/vipOrder/refreshPayResult?orderNo=${res.data.orderNo}`).then(res =>{})
|
||||
uni.navigateBack()
|
||||
that.$u.put(`/app/vipOrder/refreshPayResult?orderNo=${res.data.orderNo}`).then(res =>{
|
||||
uni.navigateBack()
|
||||
}).catch(()=>{
|
||||
uni.navigateBack()
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
|
@ -651,7 +671,7 @@ export default {
|
|||
background-position: center;
|
||||
/* 背景图片居中显示 */
|
||||
background-repeat: no-repeat;
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.txt1 {
|
||||
top: 20rpx;
|
||||
left: 171rpx;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
开通立享超值会员特权
|
||||
</view>
|
||||
<view class="txts" v-if="flase">
|
||||
会员卡23天后到期
|
||||
会员23天后到期
|
||||
</view>
|
||||
<view class="topage" @click="topage">
|
||||
购买记录 >
|
||||
|
@ -34,7 +34,7 @@
|
|||
<view class="cont_box">
|
||||
<view class="cont_li" v-for="(item,index) in 3" :key="index" @click="choose(item,index)" :class="chooseidx==index?'act1':''">
|
||||
<view class="tit">
|
||||
会员卡
|
||||
会员
|
||||
</view>
|
||||
<view class="tips">
|
||||
40天享7折
|
||||
|
|
|
@ -2,31 +2,30 @@
|
|||
<view class="page">
|
||||
<u-navbar title="购买记录" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='45'></u-navbar>
|
||||
|
||||
<view class="cont">
|
||||
<view class="vip_card" v-for="(item,index) in 3" :key="index">
|
||||
<view class="top">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uac2wTu5kmOGPkonvNcl" mode=""></image>
|
||||
会员卡
|
||||
</view>
|
||||
<view class="bot">
|
||||
<view class="left">
|
||||
<image src=" https://lxnapi.ccttiot.com/bike/img/static/uvGHCob7uexyCsuMCt2c" mode=""></image>
|
||||
<scroll-view class="cont" scroll-y="true" :scroll-with-animation="true" @scrolltolower="handleScrollToLower">
|
||||
<view class="vip_card" v-for="(item,index) in CouponLists" :key="index">
|
||||
<view class="top">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uac2wTu5kmOGPkonvNcl" mode=""></image>
|
||||
{{item.levelName}}
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="tit">
|
||||
购买时长:20天
|
||||
<view class="bot">
|
||||
<view class="left">
|
||||
<image src=" https://lxnapi.ccttiot.com/bike/img/static/uvGHCob7uexyCsuMCt2c" mode=""></image>
|
||||
</view>
|
||||
<view class="data">
|
||||
有效期: 2025-01-21至2025-04-21
|
||||
</view>
|
||||
<view class="data">
|
||||
支付时间: 2025-01-21
|
||||
<view class="right">
|
||||
<view class="tit">
|
||||
购买时长:{{item.levelTime}}天
|
||||
</view>
|
||||
<view class="data">
|
||||
可用店铺:{{item.storeName}}
|
||||
</view>
|
||||
<view class="data">
|
||||
支付时间:{{item.payTime == null ? '--' : item.payTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -37,60 +36,65 @@
|
|||
bgc: {
|
||||
backgroundColor: '#fff'
|
||||
},
|
||||
sn: '',
|
||||
istrue: false,
|
||||
CouponLists:[]
|
||||
CouponLists:[],
|
||||
pagenum:1,
|
||||
pagesize:10,
|
||||
total:0,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.getinfo()
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
getinfo() {
|
||||
this.$u.get("/getAppInfo").then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$store.commit('SET_USERID', res.user.userId);
|
||||
this.userinfo = res.user
|
||||
this.getcard()
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
getcard(){
|
||||
let data={
|
||||
userId:this.userinfo.userId,
|
||||
typeList:'1'
|
||||
// 监听滚动到底部
|
||||
handleScrollToLower() {
|
||||
if(this.total == this.CouponLists.length){
|
||||
uni.showToast({
|
||||
title: '没有更多会员记录了',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}else{
|
||||
this.getlist()
|
||||
}
|
||||
this.$u.get("/appVerify/couponBuyRecord?",data ).then((res) => {
|
||||
},
|
||||
// 请求订单列表
|
||||
getlist() {
|
||||
this.$u.get(`/app/vipOrder/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.CouponLists = res.data
|
||||
}
|
||||
this.total = res.total
|
||||
if(this.pagenum > 1){
|
||||
this.pagenum++
|
||||
this.CouponLists = this.CouponLists.concat(res.rows)
|
||||
}else{
|
||||
this.pagenum++
|
||||
this.CouponLists = res.rows
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="less">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
|
||||
.cont {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
height: 88vh;
|
||||
width: 680rpx;
|
||||
margin: auto;
|
||||
.tit1 {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.tit2 {
|
||||
margin-top: 10rpx;
|
||||
font-weight: 500;
|
||||
|
@ -99,7 +103,6 @@
|
|||
}
|
||||
.vip_card{
|
||||
margin-top: 20rpx;
|
||||
// margin: 0 auto;
|
||||
width: 680rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background: #FFFFFF;
|
||||
|
@ -148,7 +151,5 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
|
@ -288,7 +288,7 @@
|
|||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('获取地图缩放级别失败:', error);
|
||||
// console.error('获取地图缩放级别失败:', error);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<text style="color: #00BA88;border: 1px solid #00BA88;padding: 2rpx 8rpx;box-sizing: border-box;border-radius: 10rpx;">使用中</text>
|
||||
</div>
|
||||
<div class="tip" v-if="deviceInfo.storeName != null">
|
||||
<text style="color: #8883F0;border: 1px solid #8883F0;padding: 2rpx 8rpx;box-sizing: border-box;border-radius: 10rpx;">{{deviceInfo.storeName}}</text>
|
||||
<text style="color: #8883F0;border: 1px solid #8883F0;padding: 2rpx 8rpx;box-sizing: border-box;border-radius: 10rpx;">{{deviceInfo.storeName.length > 5 ? deviceInfo.storeName.slice(0,5) + '...' : deviceInfo.storeName}}</text>
|
||||
</div>
|
||||
</view>
|
||||
<view v-if="deviceInfo.onlineStatus==0" style="font-size: 28rpx;color: #95989D;margin-top: 18rpx;">
|
||||
|
@ -1881,7 +1881,7 @@
|
|||
.mid_bot {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-right: 102rpx;
|
||||
// padding-right: 102rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
.tip {
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<view v-else :class="item.onlineStatus == 0 ? 'activewzgl' : ''"
|
||||
style="color: #95989D;padding-top: 20rpx;font-size: 26rpx;"
|
||||
@click="todetail(item.deviceId)">
|
||||
店铺:{{item.storeName == null ? '--' : item.storeName}}
|
||||
店铺:{{item.storeName.length > 5 ? item.storeName.slice(0,5) + '...' : item.storeName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right" @click="todetail(item.deviceId)">
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
</view>
|
||||
<!-- <view style="margin-top:40rpx" class="botcard" @click="btnhuiyuan">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uAjP0V10qIEJn4ruztGa" mode="aspectFit"></image>
|
||||
<view class="txt">会员卡</view>
|
||||
<view class="txt">会员</view>
|
||||
</view> -->
|
||||
<view style="margin-top:40rpx" class="botcard" @click="btntuichu">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uSBN3RkeyeJLJev5Sk2F" mode="aspectFit"></image>
|
||||
|
@ -155,7 +155,7 @@
|
|||
// })
|
||||
// },
|
||||
// 点击跳转到帮助中心
|
||||
// 点击跳转到会员卡
|
||||
// 点击跳转到会员
|
||||
btnhuiyuan(){
|
||||
uni.navigateTo({
|
||||
url:'/page_geren/buyCard'
|
||||
|
|
|
@ -103,7 +103,6 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="czflag"></view>
|
||||
|
||||
<view class="weizf" v-if="weiflag">
|
||||
<view class="" style="font-size: 50rpx;width: 100%;text-align: right" @click="weiflag = false">
|
||||
×
|
||||
|
@ -149,7 +148,8 @@
|
|||
<view class="biaoti">
|
||||
{{gonggaoxq.noticeTitle}}
|
||||
</view>
|
||||
<view class="cont" v-html="gonggaoxq.noticeContent"></view>
|
||||
<!-- <view class="cont" v-html="gonggaoxq.noticeContent"></view> -->
|
||||
<u-parse :html="gonggaoxq.noticeContent" style="width: 100%;height: 620rpx;background-color: #efefef;padding: 10rpx;box-sizing: border-box;margin-top: 20rpx;"></u-parse>
|
||||
<view class="btn" @click="btnggtc">
|
||||
我知道了
|
||||
</view>
|
||||
|
@ -265,7 +265,6 @@
|
|||
this.networkInterval = null
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 点击跳转到个人中心
|
||||
btngeren(){
|
||||
|
@ -282,7 +281,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 点击公共我知道了
|
||||
// 点击公告我知道了
|
||||
btnggtc(){
|
||||
this.gonggaoflag = false
|
||||
uni.setStorageSync('noticeId', this.announcements.noticeId)
|
||||
|
@ -303,9 +302,11 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 点击隐藏合伙人和商户
|
||||
btnyc(){
|
||||
this.xuanzeflag = false
|
||||
},
|
||||
// 点击跳转到商户
|
||||
btnsh(){
|
||||
this.$u.get("/app/user/userInfo").then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -333,6 +334,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 点击跳转到合伙人
|
||||
btngr(){
|
||||
this.$u.get("/app/user/userInfo").then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -370,7 +372,6 @@
|
|||
this.covers = []
|
||||
this.listmap = res.data
|
||||
this.listmap.forEach(item => {
|
||||
// if (item.deviceCount !== null && item.deviceCount > 0) {
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
|
@ -390,15 +391,11 @@
|
|||
}
|
||||
}
|
||||
this.covers.push(shopCover)
|
||||
// console.log(this.covers);
|
||||
// }
|
||||
})
|
||||
}
|
||||
})
|
||||
this.iconflag = false
|
||||
} else {
|
||||
// this.iconflag = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 点击弹窗去支付
|
||||
|
@ -418,6 +415,7 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
// 获取是否有无网络
|
||||
startNetworkCheck() {
|
||||
this.networkInterval = setInterval(() => {
|
||||
uni.getNetworkType({
|
||||
|
@ -429,9 +427,9 @@
|
|||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取网络类型失败', err);
|
||||
console.error('获取网络类型失败', err)
|
||||
}
|
||||
});
|
||||
})
|
||||
}, 3000)
|
||||
},
|
||||
// 请求正在使用的设备列表
|
||||
|
@ -545,18 +543,10 @@
|
|||
})
|
||||
}
|
||||
} else if (res.data == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '该设备未录入,请先进行录入',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// uni.navigateTo({
|
||||
// url: '/page_fenbao/zhuce?sn=' + id
|
||||
// })
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: '该设备未录入',
|
||||
icon: 'none',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -694,11 +684,11 @@
|
|||
})
|
||||
})
|
||||
};
|
||||
await setScale();
|
||||
await setScale()
|
||||
mapContext.moveToLocation({
|
||||
success: (res) => {
|
||||
const timer = setTimeout(() => {
|
||||
clearTimeout(timer);
|
||||
clearTimeout(timer)
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
|
@ -720,7 +710,6 @@
|
|||
if (res.code == 200) {
|
||||
this.listmap = res.data
|
||||
res.data.forEach(item => {
|
||||
// if (item.deviceCount !== null && item.deviceCount > 0) {
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
|
@ -757,13 +746,12 @@
|
|||
}
|
||||
}
|
||||
this.covers.push(shopCover)
|
||||
// }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err);
|
||||
console.error('获取位置失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -785,46 +773,42 @@
|
|||
},
|
||||
addMarkersWithoutLabels() {
|
||||
this.listmap.forEach((item) => {
|
||||
// if (item.deviceCount !== null && item.deviceCount > 0) {
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
borderColor: '#fff',
|
||||
borderRadius: 5,
|
||||
bgColor: '#fff'
|
||||
};
|
||||
this.covers.push(shopCover)
|
||||
// }
|
||||
});
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
borderColor: '#fff',
|
||||
borderRadius: 5,
|
||||
bgColor: '#fff'
|
||||
}
|
||||
this.covers.push(shopCover)
|
||||
})
|
||||
},
|
||||
|
||||
addMarkersWithLabels() {
|
||||
this.listmap.forEach((item) => {
|
||||
// if (item.deviceCount !== null && item.deviceCount > 0) {
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
label: {
|
||||
content: item.name,
|
||||
anchorX: this.calculateAnchorX(item.name),
|
||||
fontWeight: 700,
|
||||
color: '#8883F0',
|
||||
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
|
||||
borderColor: '#fff',
|
||||
borderRadius: 5,
|
||||
bgColor: '#fff'
|
||||
}
|
||||
const shopCover = {
|
||||
id: parseFloat(item.storeId),
|
||||
latitude: item.lat,
|
||||
longitude: item.lng,
|
||||
width: 25,
|
||||
height: 30,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
label: {
|
||||
content: item.name,
|
||||
anchorX: this.calculateAnchorX(item.name),
|
||||
fontWeight: 700,
|
||||
color: '#8883F0',
|
||||
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
|
||||
borderColor: '#fff',
|
||||
borderRadius: 5,
|
||||
bgColor: '#fff'
|
||||
}
|
||||
this.covers.push(shopCover)
|
||||
// }
|
||||
}
|
||||
this.covers.push(shopCover)
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -982,7 +966,6 @@
|
|||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.scroll-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
@ -991,13 +974,11 @@
|
|||
white-space: nowrap;
|
||||
animation: scroll 8s linear infinite;
|
||||
}
|
||||
|
||||
.scroll-item {
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@keyframes scroll {
|
||||
0% {
|
||||
transform: translateX(100%);
|
||||
|
@ -1080,7 +1061,6 @@
|
|||
font-size: 40rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.one{
|
||||
width: 552rpx;
|
||||
height: 130rpx;
|
||||
|
@ -1170,7 +1150,6 @@
|
|||
/deep/ .u-title {
|
||||
padding-bottom: 22rpx;
|
||||
}
|
||||
|
||||
/deep/ .map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
Loading…
Reference in New Issue
Block a user