v2.31.0 NFC卡解锁
This commit is contained in:
parent
a0e16e5b0e
commit
357e274a8f
|
|
@ -3,335 +3,135 @@
|
||||||
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
|
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
|
||||||
title-size='36' height='50'></u-navbar>
|
title-size='36' height='50'></u-navbar>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title">
|
<view class="title">基本信息</view>
|
||||||
基本信息
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="list_val">
|
<view class="list_val">
|
||||||
<view class="" style="padding-top:12rpx">备注名</view> <input type="text" v-model="beizhu"
|
<view class="" style="padding-top:12rpx">备注名</view>
|
||||||
placeholder="请输入备注名" />
|
<input type="text" v-model="beizhu" placeholder="请输入备注名" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list_val" style="position: relative;">
|
<view class="list_val" style="position: relative;">
|
||||||
<view class="" style="padding-top:12rpx;width: 176rpx;">身份类型</view> <input @click="show = true"
|
<view class="" style="padding-top:12rpx;width: 176rpx;">身份类型</view>
|
||||||
type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
<input @click="show = true" type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
||||||
<u-icon name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;"
|
<u-icon name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;" color="#808080"></u-icon>
|
||||||
color="#808080"></u-icon>
|
|
||||||
<u-select v-model="show" :list="arr" @confirm="confirm"></u-select>
|
<u-select v-model="show" :list="arr" @confirm="confirm"></u-select>
|
||||||
</view>
|
</view>
|
||||||
<view class="list_val">
|
<view class="list_val">
|
||||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" v-model="tel"
|
<view class="" style="padding-top:12rpx">手机号码</view>
|
||||||
placeholder="请输入手机号码" />
|
<input type="text" v-model="tel" placeholder="请输入手机号码" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list_val">
|
<view class="list_val">
|
||||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" v-model="bili"
|
<view class="" style="padding-top:12rpx">分成比例</view>
|
||||||
placeholder="请输入分成比例%" />
|
<input type="text" v-model="bili" placeholder="请输入分成比例%" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 权限区域 -->
|
||||||
|
<view class="section-header">
|
||||||
|
<view class="title">合作伙伴权限</view>
|
||||||
|
<view class="global-actions" v-if="permissionGroups.length > 0">
|
||||||
|
<text class="action-btn" @click="handleSelectAllGlobal">全选</text>
|
||||||
|
<text class="action-divider">|</text>
|
||||||
|
<text class="action-btn" @click="handleDeselectAllGlobal">取消全选</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="permissionsLoading" class="loading-tip">
|
||||||
|
<u-loading mode="circle" size="36"></u-loading>
|
||||||
|
<text style="margin-left: 12rpx; color: #999; font-size: 26rpx;">加载中...</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-for="(group, gi) in permissionGroups" :key="gi" class="permission-group">
|
||||||
|
<view class="group-header">
|
||||||
|
<text class="group-name">{{ group.group }}</text>
|
||||||
|
<view class="group-actions">
|
||||||
|
<text class="action-btn" @click="handleSelectAllGroup(gi)">全选</text>
|
||||||
|
<text class="action-divider">|</text>
|
||||||
|
<text class="action-btn" @click="handleDeselectAllGroup(gi)">取消</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
|
||||||
合作伙伴权限
|
|
||||||
</view>
|
</view>
|
||||||
<view class="swlist">
|
<view class="swlist">
|
||||||
<view class="swlist_val" v-for="(item,index) in list" :key="index">
|
<view class="swlist_val" v-for="(item, ii) in group.items" :key="ii">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<view class="one">
|
<view class="one">{{ item.name }}</view>
|
||||||
{{item.name}}
|
<view class="two">{{ item.description }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="two">
|
<view class="rt">
|
||||||
{{item.tit}}
|
<u-switch
|
||||||
</view>
|
v-model="item.checked"
|
||||||
</view>
|
:disabled="item.isDefault"
|
||||||
<view class="rt" v-if="item.name == '查看运营区'">
|
:active-color="item.isDefault ? '#2b2929' : '#4C97E7'"
|
||||||
<u-switch v-model="item.checked" :disabled="true" active-color="#2b2929" size="36"
|
size="36"
|
||||||
inactive-color="#eee"></u-switch>
|
inactive-color="#eee"
|
||||||
</view>
|
></u-switch>
|
||||||
<view class="rt" v-else>
|
|
||||||
<u-switch v-model="item.checked" active-color="#4C97E7" size="36"
|
|
||||||
inactive-color="#eee"></u-switch>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="baocun" @click="btncj">
|
|
||||||
{{tit}}
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="baocun" @click="btncj">{{ tit }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
bgc: {
|
bgc: { backgroundColor: "#fff" },
|
||||||
backgroundColor: "#fff"
|
|
||||||
},
|
|
||||||
level: '',
|
|
||||||
tel: '',
|
tel: '',
|
||||||
sheng: '请选择身份类型',
|
sheng: '请选择身份类型',
|
||||||
arr: [{
|
arr: [
|
||||||
label: '加盟商',
|
{ label: '加盟商', value: 1 },
|
||||||
value: 1
|
{ label: '合伙人', value: 2 }
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '合伙人',
|
|
||||||
value: 2
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
tit: '创建加盟伙伴',
|
tit: '创建加盟伙伴',
|
||||||
userId: '',
|
|
||||||
bili: '',
|
bili: '',
|
||||||
beizhu: '',
|
beizhu: '',
|
||||||
jiamtype: '',
|
jiamtype: '',
|
||||||
areaId: '',
|
areaId: '',
|
||||||
jiamid: '',
|
jiamid: '',
|
||||||
// 权限映射配置
|
permissionsLoading: false,
|
||||||
permissionConfig: {
|
permissionGroups: [],
|
||||||
'查看运营区': 'area:view',
|
// 编辑时临时保存待回填的权限列表
|
||||||
'操作运营区': 'area:edit',
|
pendingPermissions: null
|
||||||
'查看运营区推广': 'areaPromotion:view',
|
|
||||||
'操作运营区推广': 'areaPromotion:edit',
|
|
||||||
'查看停车区': 'areaSub:view',
|
|
||||||
'操作停车区': 'areaSub:edit',
|
|
||||||
'查看故障': 'fault:view',
|
|
||||||
'故障审核': 'fault:edit',
|
|
||||||
'查看订单': 'order:view',
|
|
||||||
'操作订单': 'order:edit',
|
|
||||||
'查看车辆': 'device:view',
|
|
||||||
'操作车辆': 'device:edit',
|
|
||||||
// '查看订单金额':'order:view:amount',
|
|
||||||
'查看广告': 'ad:view',
|
|
||||||
'操作广告': 'ad:edit',
|
|
||||||
'查看套餐': 'suit:view',
|
|
||||||
'操作套餐': 'suit:edit',
|
|
||||||
'查看车型': 'model:view',
|
|
||||||
'操作车型': 'model:edit',
|
|
||||||
'查看客服': 'customerService:view',
|
|
||||||
'操作客服': 'customerService:edit',
|
|
||||||
'查看卡券': 'vip:view',
|
|
||||||
'操作卡券': 'vip:edit',
|
|
||||||
'查看卡券订单': 'vipOrder:view',
|
|
||||||
'操作卡券订单': 'vipOrder:edit',
|
|
||||||
'查看用户卡券': 'vipUser:view',
|
|
||||||
'操作用户卡券': 'vipUser:edit',
|
|
||||||
'查看投诉': 'complaint:view',
|
|
||||||
'操作投诉': 'complaint:edit',
|
|
||||||
'查看协议': 'agreement:view',
|
|
||||||
'操作协议': 'agreement:edit',
|
|
||||||
'查看换电工单': 'powerWork:view',
|
|
||||||
'操作换电工单': 'powerWork:edit',
|
|
||||||
'查看调度日志': 'dispatchLog:view',
|
|
||||||
},
|
|
||||||
list: [{
|
|
||||||
name: '查看运营区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: true,
|
|
||||||
txt: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作运营区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看运营区推广',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作运营区推广',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看停车区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作停车区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看故障',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '故障审核',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 10
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看车辆',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 11
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作车辆',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 12
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看广告',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作广告',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看套餐',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作套餐',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看车型',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 17
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作车型',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 18
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看客服',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 19
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作客服',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 22
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看卡券订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 23
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作卡券订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 24
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看用户卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作用户卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 26
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看投诉',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 27
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作投诉',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 28
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看协议',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 29
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作协议',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 30
|
|
||||||
}, {
|
|
||||||
name: '查看换电工单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 31
|
|
||||||
},{
|
|
||||||
name: '操作换电工单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 32
|
|
||||||
},{
|
|
||||||
name: '查看调度日志',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 33
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.areaId = uni.getStorageSync('adminAreaid')
|
this.areaId = uni.getStorageSync('adminAreaid')
|
||||||
|
this.loadPermissions().then(() => {
|
||||||
if (option.item) {
|
if (option.item) {
|
||||||
this.tit = '编辑加盟伙伴'
|
this.tit = '编辑加盟伙伴'
|
||||||
const obj = JSON.parse(option.item)
|
const obj = JSON.parse(option.item)
|
||||||
this.initFormData(obj)
|
this.initFormData(obj)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化表单数据
|
/** 从接口加载权限分组 */
|
||||||
|
loadPermissions() {
|
||||||
|
this.permissionsLoading = true
|
||||||
|
return this.$u.get('/bst/areaJoin/permissions').then(res => {
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
// 为每个权限项添加 checked 状态
|
||||||
|
this.permissionGroups = res.data.map(group => ({
|
||||||
|
...group,
|
||||||
|
items: group.items.map(item => ({
|
||||||
|
...item,
|
||||||
|
checked: !!item.isDefault
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
uni.showToast({ title: '权限列表加载失败', icon: 'none' })
|
||||||
|
}).finally(() => {
|
||||||
|
this.permissionsLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 初始化表单数据 */
|
||||||
initFormData(obj) {
|
initFormData(obj) {
|
||||||
this.tel = obj.userPhone
|
this.tel = obj.userPhone
|
||||||
this.areaId = obj.areaId
|
this.areaId = obj.areaId
|
||||||
|
|
@ -339,75 +139,68 @@
|
||||||
this.jiamid = obj.id
|
this.jiamid = obj.id
|
||||||
this.beizhu = obj.remark
|
this.beizhu = obj.remark
|
||||||
this.jiamtype = obj.type
|
this.jiamtype = obj.type
|
||||||
|
|
||||||
// 设置权限选中状态
|
|
||||||
this.setPermissionStatus(obj.permissions)
|
|
||||||
|
|
||||||
// 设置身份类型显示
|
|
||||||
this.sheng = obj.type === 1 ? '加盟商' : '合伙人'
|
this.sheng = obj.type === 1 ? '加盟商' : '合伙人'
|
||||||
|
this.setPermissionStatus(obj.permissions || [])
|
||||||
},
|
},
|
||||||
|
|
||||||
// 设置权限选中状态
|
/** 根据权限 code 数组回填开关状态 */
|
||||||
setPermissionStatus(permissions) {
|
setPermissionStatus(permissions) {
|
||||||
const permissionMap = {
|
const permSet = new Set(permissions)
|
||||||
'area:view': 0,
|
this.permissionGroups.forEach(group => {
|
||||||
'area:edit': 1,
|
group.items.forEach(item => {
|
||||||
'areaPromotion:view': 2,
|
if (!item.isDefault) {
|
||||||
'areaPromotion:edit': 3,
|
item.checked = permSet.has(item.code)
|
||||||
'areaSub:view': 4,
|
|
||||||
'areaSub:edit': 5,
|
|
||||||
'fault:view': 6,
|
|
||||||
'fault:edit': 7,
|
|
||||||
'order:view': 8,
|
|
||||||
'order:edit': 9,
|
|
||||||
'device:view': 10,
|
|
||||||
'device:edit': 11,
|
|
||||||
'ad:view': 12,
|
|
||||||
'ad:edit': 13,
|
|
||||||
'suit:view': 14,
|
|
||||||
'suit:edit': 15,
|
|
||||||
'model:view': 16,
|
|
||||||
'model:edit': 17,
|
|
||||||
'customerService:view': 18,
|
|
||||||
'customerService:edit': 19,
|
|
||||||
'vip:view': 20,
|
|
||||||
'vip:edit': 21,
|
|
||||||
'vipOrder:view': 22,
|
|
||||||
'vipOrder:edit': 23,
|
|
||||||
'vipUser:view': 24,
|
|
||||||
'vipUser:edit': 25,
|
|
||||||
'complaint:view': 26,
|
|
||||||
'complaint:edit': 27,
|
|
||||||
'agreement:view': 28,
|
|
||||||
'agreement:edit': 29,
|
|
||||||
'powerWork:view': 30,
|
|
||||||
'powerWork:edit': 31,
|
|
||||||
'dispatchLog:view': 32
|
|
||||||
}
|
|
||||||
|
|
||||||
permissions.forEach(permission => {
|
|
||||||
const index = permissionMap[permission]
|
|
||||||
if (index !== undefined) {
|
|
||||||
this.list[index].checked = true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 身份选择确认
|
/** 全部全选 */
|
||||||
|
handleSelectAllGlobal() {
|
||||||
|
this.permissionGroups.forEach(group => {
|
||||||
|
group.items.forEach(item => { item.checked = true })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 全部取消(保留默认权限) */
|
||||||
|
handleDeselectAllGlobal() {
|
||||||
|
this.permissionGroups.forEach(group => {
|
||||||
|
group.items.forEach(item => {
|
||||||
|
if (!item.isDefault) item.checked = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 分组全选 */
|
||||||
|
handleSelectAllGroup(gi) {
|
||||||
|
this.permissionGroups[gi].items.forEach(item => { item.checked = true })
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 分组取消(保留该组默认权限) */
|
||||||
|
handleDeselectAllGroup(gi) {
|
||||||
|
this.permissionGroups[gi].items.forEach(item => {
|
||||||
|
if (!item.isDefault) item.checked = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 身份选择确认 */
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
this.sheng = e[0].label
|
this.sheng = e[0].label
|
||||||
this.jiamtype = e[0].value
|
this.jiamtype = e[0].value
|
||||||
},
|
},
|
||||||
|
|
||||||
// 收集选中的权限
|
/** 收集选中的权限 code */
|
||||||
collectPermissions() {
|
collectPermissions() {
|
||||||
return this.list
|
const codes = []
|
||||||
.filter(item => item.checked)
|
this.permissionGroups.forEach(group => {
|
||||||
.map(item => this.permissionConfig[item.name])
|
group.items.forEach(item => {
|
||||||
.filter(Boolean) // 过滤掉undefined
|
if (item.checked) codes.push(item.code)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return codes
|
||||||
},
|
},
|
||||||
|
|
||||||
// 构建请求数据
|
/** 构建请求数据 */
|
||||||
buildRequestData() {
|
buildRequestData() {
|
||||||
return {
|
return {
|
||||||
id: this.jiamid,
|
id: this.jiamid,
|
||||||
|
|
@ -420,43 +213,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理API响应
|
/** 处理 API 响应 */
|
||||||
handleApiResponse(res, successMessage) {
|
handleApiResponse(res, successMessage) {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({ title: successMessage, icon: 'success', duration: 2000 })
|
||||||
title: successMessage,
|
setTimeout(() => { uni.navigateBack() }, 2000)
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 2000)
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({ title: res.msg, icon: 'none', duration: 2000 })
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击创建/编辑
|
/** 点击创建/编辑 */
|
||||||
async btncj() {
|
async btncj() {
|
||||||
const data = this.buildRequestData()
|
const data = this.buildRequestData()
|
||||||
const isEdit = this.tit === '编辑加盟伙伴'
|
const isEdit = this.tit === '编辑加盟伙伴'
|
||||||
const apiMethod = isEdit ? 'put' : 'post'
|
const apiMethod = isEdit ? 'put' : 'post'
|
||||||
const apiUrl = '/bst/areaJoin'
|
|
||||||
const successMessage = isEdit ? '编辑成功' : '创建成功'
|
const successMessage = isEdit ? '编辑成功' : '创建成功'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await this.$u[apiMethod](apiUrl, data)
|
const res = await this.$u[apiMethod]('/bst/areaJoin', data)
|
||||||
this.handleApiResponse(res, successMessage)
|
this.handleApiResponse(res, successMessage)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.showToast({
|
uni.showToast({ title: '请求失败,请重试', icon: 'none', duration: 2000 })
|
||||||
title: '请求失败,请重试',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -469,8 +246,66 @@
|
||||||
padding-bottom: 22rpx;
|
padding-bottom: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.global-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #4C97E7;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-divider {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-tip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.permission-group {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 24rpx 28rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.group-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.group-name {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.swlist {
|
.swlist {
|
||||||
margin-top: 34rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
@ -478,38 +313,44 @@
|
||||||
.swlist_val {
|
.swlist_val {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 324rpx;
|
width: 48%;
|
||||||
height: 144rpx;
|
min-height: 120rpx;
|
||||||
background: #FFFFFF;
|
background: #F4F5F7;
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 16rpx;
|
||||||
padding-top: 28rpx;
|
padding: 20rpx 20rpx 20rpx 24rpx;
|
||||||
padding-left: 38rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 18rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lt {
|
.lt {
|
||||||
|
flex: 1;
|
||||||
|
padding-right: 12rpx;
|
||||||
|
|
||||||
.one {
|
.one {
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.two {
|
.two {
|
||||||
font-size: 24rpx;
|
font-size: 22rpx;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
margin-top: 12rpx;
|
margin-top: 8rpx;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rt {
|
.rt {
|
||||||
margin-top: 24rpx;
|
display: flex;
|
||||||
padding-right: 12rpx;
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
margin-top: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
|
|
@ -520,7 +361,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
background: #F4F5F7;
|
background: #F4F5F7;
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
||||||
padding: 32rpx 36rpx;
|
padding: 32rpx 36rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
|
|
@ -530,8 +370,8 @@
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
background: linear-gradient(270deg, #4C97E7 0%, #4C97E7 100%);
|
background: linear-gradient(270deg, #4C97E7 0%, #4C97E7 100%);
|
||||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
border-radius: 54rpx;
|
||||||
margin-top: 110rpx;
|
margin-top: 80rpx;
|
||||||
margin-bottom: 78rpx;
|
margin-bottom: 78rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
|
|
@ -540,58 +380,14 @@
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swlist {
|
|
||||||
margin-top: 34rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.swlist_val {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 324rpx;
|
|
||||||
height: 144rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
padding-top: 28rpx;
|
|
||||||
padding-left: 38rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-top: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lt {
|
|
||||||
.one {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #3D3D3D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.two {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #808080;
|
|
||||||
margin-top: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rt {
|
|
||||||
margin-top: 24rpx;
|
|
||||||
padding-right: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #3D3D3D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 578rpx;
|
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 24rpx;
|
||||||
padding: 46rpx 36rpx;
|
padding: 46rpx 36rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 34rpx;
|
margin-top: 34rpx;
|
||||||
margin-bottom: 47rpx;
|
margin-bottom: 0rpx;
|
||||||
|
|
||||||
.list_val {
|
.list_val {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -604,7 +400,7 @@
|
||||||
width: 430rpx;
|
width: 430rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
background: #F0F0F0;
|
background: #F0F0F0;
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx;
|
||||||
padding-left: 32rpx;
|
padding-left: 32rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
|
||||||
|
|
@ -128,14 +128,14 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var xBlufi = require("@/components/blufi/xBlufi.js")
|
var xBlufi = require("@/components/blufi/xBlufi.js")
|
||||||
import VehicleCard from './components/VehicleCard.vue'
|
|
||||||
import PackageSelector from './components/PackageSelector.vue'
|
|
||||||
import CheckVideoUploader from './components/CheckVideoUploader.vue'
|
import CheckVideoUploader from './components/CheckVideoUploader.vue'
|
||||||
import PaymentSelector from './components/PaymentSelector.vue'
|
|
||||||
import FeeDetailPanel from './components/FeeDetailPanel.vue'
|
import FeeDetailPanel from './components/FeeDetailPanel.vue'
|
||||||
import NoticeModal from './components/NoticeModal.vue'
|
|
||||||
import ServicePanel from './components/ServicePanel.vue'
|
|
||||||
import GuideVideoModal from './components/GuideVideoModal.vue'
|
import GuideVideoModal from './components/GuideVideoModal.vue'
|
||||||
|
import NoticeModal from './components/NoticeModal.vue'
|
||||||
|
import PackageSelector from './components/PackageSelector.vue'
|
||||||
|
import PaymentSelector from './components/PaymentSelector.vue'
|
||||||
|
import ServicePanel from './components/ServicePanel.vue'
|
||||||
|
import VehicleCard from './components/VehicleCard.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -153,10 +153,8 @@
|
||||||
iconobj: this.$store.state.iconobj,
|
iconobj: this.$store.state.iconobj,
|
||||||
bgc: { backgroundColor: "#4C97E7" },
|
bgc: { backgroundColor: "#4C97E7" },
|
||||||
fanganindex: 0,
|
fanganindex: 0,
|
||||||
zutime: 1,
|
|
||||||
checked: true,
|
checked: true,
|
||||||
mxflag: true,
|
mxflag: true,
|
||||||
macid: '',
|
|
||||||
modelId: '',
|
modelId: '',
|
||||||
taocanlist: [],
|
taocanlist: [],
|
||||||
chesn: '',
|
chesn: '',
|
||||||
|
|
@ -169,20 +167,15 @@
|
||||||
sn: '',
|
sn: '',
|
||||||
logoflag: false,
|
logoflag: false,
|
||||||
ver_dataflag: 1,
|
ver_dataflag: 1,
|
||||||
deviceId: '',
|
|
||||||
name: '',
|
|
||||||
zhezhaoflag: true,
|
zhezhaoflag: true,
|
||||||
actiobj: {},
|
actiobj: {},
|
||||||
paymentList: [],
|
paymentList: [],
|
||||||
selectedPayment: "",
|
|
||||||
selectedSubPayment: "",
|
selectedSubPayment: "",
|
||||||
mac: '',
|
mac: '',
|
||||||
deviceid: '',
|
deviceid: '',
|
||||||
devicename: '',
|
devicename: '',
|
||||||
devicesarr: [],
|
devicesarr: [],
|
||||||
findDeviceTimer: null,
|
findDeviceTimer: null,
|
||||||
lat: '',
|
|
||||||
lon: '',
|
|
||||||
show: false,
|
show: false,
|
||||||
huiyuanlist: [],
|
huiyuanlist: [],
|
||||||
huiyuanobj: {},
|
huiyuanobj: {},
|
||||||
|
|
@ -216,187 +209,80 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.duoirder) {
|
if (option.duoirder) this.duoirder = option.duoirder
|
||||||
this.duoirder = option.duoirder
|
|
||||||
}
|
|
||||||
this.$u.get(`/app/app/detail?id=${this.$store.state.appid}`).then(res => {
|
this.$u.get(`/app/app/detail?id=${this.$store.state.appid}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$store.state.app = res.data
|
this.$store.state.app = res.data
|
||||||
if (res.data.startArticleEnabled == true) {
|
if (res.data.startArticleEnabled && !uni.getStorageSync('xieyi')) {
|
||||||
if (uni.getStorageSync('xieyi')) {
|
uni.navigateTo({ url: '/pages/agreement?startArticleId=' + res.data.startArticleId + '&type=1&q=' + option.q })
|
||||||
// already agreed
|
|
||||||
} else {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/agreement?startArticleId=' + res.data.startArticleId + '&type=1' + '&q=' + option.q
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
xBlufi.initXBlufi(1)
|
xBlufi.initXBlufi(1)
|
||||||
xBlufi.notifyStartDiscoverBle({ 'isStart': true })
|
xBlufi.notifyStartDiscoverBle({ 'isStart': true })
|
||||||
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||||
uni.getLocation({
|
uni.getLocation({ type: 'gcj02', success() {}, fail() {} })
|
||||||
type: 'gcj02',
|
|
||||||
success: function(lb) {},
|
|
||||||
fail: function(error) {}
|
|
||||||
})
|
|
||||||
if (option.modelId) {
|
|
||||||
uni.showLoading({ title: '加载中...', mask: true })
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$u.get("/app/order/mineProcessing").then(res => {
|
this.$u.get("/app/order/mineProcessing").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200 && res.data && this.duoirder != 1) {
|
||||||
if (res.data && this.duoirder != 1) {
|
|
||||||
uni.switchTab({ url: '/pages/index/index' })
|
uni.switchTab({ url: '/pages/index/index' })
|
||||||
this.zhezhaoflag = false
|
this.zhezhaoflag = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
} else {
|
return
|
||||||
|
}
|
||||||
this.zhezhaoflag = false
|
this.zhezhaoflag = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.modelId = option.modelId
|
const doInit = () => option.modelId ? this._initWithModelId(option) : this._initFromQuery(option)
|
||||||
this.chesn = option.sn
|
res.code == 401 ? this.getlogo(doInit) : doInit()
|
||||||
this.sn = option.sn
|
|
||||||
this.taocanId = option.t || ''
|
|
||||||
this.getzaixian()
|
|
||||||
this.getQiniuToken()
|
|
||||||
this.gettaocan()
|
|
||||||
this.getcheliang()
|
|
||||||
}
|
|
||||||
} else if (res.code == 401) {
|
|
||||||
this.modelId = option.modelId
|
|
||||||
this.chesn = option.sn
|
|
||||||
this.zhezhaoflag = false
|
|
||||||
uni.hideLoading()
|
|
||||||
this.getlogo(() => {
|
|
||||||
this.sn = option.sn
|
|
||||||
this.taocanId = option.t || ''
|
|
||||||
this.getzaixian()
|
|
||||||
this.getQiniuToken()
|
|
||||||
this.gettaocan()
|
|
||||||
this.getcheliang()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
|
||||||
uni.showLoading({ title: '加载中...', mask: true })
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$u.get("/app/order/mineProcessing").then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (res.data && this.duoirder != 1) {
|
|
||||||
uni.switchTab({ url: '/pages/index/index' })
|
|
||||||
this.zhezhaoflag = false
|
|
||||||
uni.hideLoading()
|
|
||||||
} else {
|
|
||||||
this.zhezhaoflag = false
|
|
||||||
uni.hideLoading()
|
|
||||||
function getQueryParam(url, paramName) {
|
|
||||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
|
||||||
let results = regex.exec(url)
|
|
||||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
|
||||||
}
|
|
||||||
let sceneValue = option.q
|
|
||||||
let decodedValue = decodeURIComponent(sceneValue)
|
|
||||||
this.sn = getQueryParam(decodedValue, 's') || getQueryParam(decodedValue, 'sn')
|
|
||||||
this.taocanId = option.t || getQueryParam(decodedValue, 't') || ''
|
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (res.data) {
|
|
||||||
this.bikeobj = res.data
|
|
||||||
this.modelId = res.data.modelId
|
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
|
||||||
this.mac = res.data.mac
|
|
||||||
this.getzaixian()
|
|
||||||
this.gettaocan()
|
|
||||||
this.getcheliang()
|
|
||||||
this.getQiniuToken()
|
|
||||||
this.getAreaDetail()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showModal({ title: '提示', content: res.msg, showCancel: false, confirmText: '知道了' })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (res.code == 401) {
|
|
||||||
this.zhezhaoflag = false
|
|
||||||
uni.hideLoading()
|
|
||||||
this.getlogo(() => {
|
|
||||||
function getQueryParam(url, paramName) {
|
|
||||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
|
||||||
let results = regex.exec(url)
|
|
||||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
|
||||||
}
|
|
||||||
let sceneValue = option.q
|
|
||||||
let decodedValue = decodeURIComponent(sceneValue)
|
|
||||||
this.sn = getQueryParam(decodedValue, 's') || getQueryParam(decodedValue, 'sn')
|
|
||||||
this.taocanId = option.t || getQueryParam(decodedValue, 't') || ''
|
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (res.data) {
|
|
||||||
this.bikeobj = res.data
|
|
||||||
this.modelId = res.data.modelId
|
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
|
||||||
this.mac = res.data.mac
|
|
||||||
this.getzaixian()
|
|
||||||
this.gettaocan()
|
|
||||||
this.getcheliang()
|
|
||||||
this.getQiniuToken()
|
|
||||||
this.getAreaDetail()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showModal({ title: '提示', content: res.msg, showCancel: false, confirmText: '知道了' })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.zhezhaoflag = false
|
|
||||||
uni.hideLoading()
|
|
||||||
function getQueryParam(url, paramName) {
|
|
||||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
|
|
||||||
let results = regex.exec(url)
|
|
||||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
|
|
||||||
}
|
|
||||||
let sceneValue = option.q
|
|
||||||
let decodedValue = decodeURIComponent(sceneValue)
|
|
||||||
this.sn = getQueryParam(decodedValue, 's') || getQueryParam(decodedValue, 'sn')
|
|
||||||
this.taocanId = option.t || getQueryParam(decodedValue, 't') || ''
|
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
if (res.data) {
|
|
||||||
this.bikeobj = res.data
|
|
||||||
this.mac = res.data.mac
|
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
|
||||||
this.modelId = res.data.modelId
|
|
||||||
this.getzaixian()
|
|
||||||
this.getcheliang()
|
|
||||||
this.getQiniuToken()
|
|
||||||
this.gettaocan()
|
|
||||||
this.getAreaDetail()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uni.showModal({ title: '提示', content: res.msg, showCancel: false, confirmText: '知道了' })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
this.getgg()
|
|
||||||
this.gethuiyuan()
|
|
||||||
}, 1500)
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.bikeobj && this.bikeobj.areaId) {
|
if (this.bikeobj && this.bikeobj.areaId) {
|
||||||
this.getAreaDetail()
|
this.getAreaDetail()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide() {},
|
|
||||||
onUnload() {
|
onUnload() {
|
||||||
// findDeviceTimer 在 getzaixian/蓝牙搜索中用到
|
|
||||||
if (this.findDeviceTimer) clearTimeout(this.findDeviceTimer)
|
if (this.findDeviceTimer) clearTimeout(this.findDeviceTimer)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// ── onLoad 初始化辅助 ────────────────────────
|
||||||
|
_getQueryParam(url, paramName) {
|
||||||
|
const result = new RegExp(`[?&]${paramName}=([^&]*)`).exec(url)
|
||||||
|
return result ? decodeURIComponent(result[1].replace(/\+/g, ' ')) : null
|
||||||
|
},
|
||||||
|
_initWithModelId(option) {
|
||||||
|
this.modelId = option.modelId
|
||||||
|
this.chesn = option.sn
|
||||||
|
this.sn = option.sn
|
||||||
|
this.taocanId = option.t || ''
|
||||||
|
this.getzaixian()
|
||||||
|
this.getQiniuToken()
|
||||||
|
this.gettaocan()
|
||||||
|
this.getcheliang()
|
||||||
|
},
|
||||||
|
_initFromQuery(option) {
|
||||||
|
const decoded = decodeURIComponent(option.q || '')
|
||||||
|
this.sn = this._getQueryParam(decoded, 's') || this._getQueryParam(decoded, 'sn')
|
||||||
|
this.taocanId = option.t || this._getQueryParam(decoded, 't') || ''
|
||||||
|
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then(res => {
|
||||||
|
if (res.code == 200 && res.data) {
|
||||||
|
this.bikeobj = res.data
|
||||||
|
this.modelId = res.data.modelId
|
||||||
|
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
||||||
|
this.mac = res.data.mac
|
||||||
|
this.getzaixian()
|
||||||
|
this.getQiniuToken()
|
||||||
|
this.gettaocan()
|
||||||
|
this.getcheliang()
|
||||||
|
this.getAreaDetail()
|
||||||
|
} else {
|
||||||
|
uni.showModal({ title: '提示', content: res.msg, showCancel: false, confirmText: '知道了' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// ── 套餐选择 ──────────────────────────────────
|
// ── 套餐选择 ──────────────────────────────────
|
||||||
onPackageSelect(index, item) {
|
onPackageSelect(index, item) {
|
||||||
this.actiobj = item
|
this.actiobj = item
|
||||||
|
|
@ -572,10 +458,6 @@
|
||||||
uni.showToast({ title: '请不要频繁点击', icon: 'none', duration: 2000 })
|
uni.showToast({ title: '请不要频繁点击', icon: 'none', duration: 2000 })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tobuy(item) {
|
|
||||||
this.show = true
|
|
||||||
this.huiyuanobj = item
|
|
||||||
},
|
|
||||||
gethuiyuan() {
|
gethuiyuan() {
|
||||||
if (!this.bikeobj || !this.bikeobj.areaId) return
|
if (!this.bikeobj || !this.bikeobj.areaId) return
|
||||||
this.$u.get(`/app/vip/listByArea?areaId=${this.bikeobj.areaId}`).then(res => {
|
this.$u.get(`/app/vip/listByArea?areaId=${this.bikeobj.areaId}`).then(res => {
|
||||||
|
|
@ -624,6 +506,7 @@
|
||||||
|
|
||||||
// ── 公告 ─────────────────────────────────────
|
// ── 公告 ─────────────────────────────────────
|
||||||
getgg() {
|
getgg() {
|
||||||
|
if (!this.bikeobj || !this.bikeobj.areaId) return
|
||||||
this.$u.get(`/app/agreement/latest?areaId=${this.bikeobj.areaId}&agreementType=0`).then(res => {
|
this.$u.get(`/app/agreement/latest?areaId=${this.bikeobj.areaId}&agreementType=0`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.ggobj = res.data || null
|
this.ggobj = res.data || null
|
||||||
|
|
@ -969,22 +852,12 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
wxLoginAsync().then(async (data) => {
|
wxLoginAsync().then(async (data) => {
|
||||||
let datas = { mobileCode: data.mobileCode, loginCode: data.jscode, appId: this.$store.state.appid }
|
const datas = { mobileCode: data.mobileCode, loginCode: data.jscode, appId: this.$store.state.appid }
|
||||||
this.$u.post("/wxLogin", datas).then((res) => {
|
this.$u.post("/wxLogin", datas).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
wx.setStorageSync('token', res.token)
|
wx.setStorageSync('token', res.token)
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.sn == '' ? this.chesn : this.sn}`).then((res) => {
|
|
||||||
if (res.code == 200 && res.data) {
|
|
||||||
this.bikeobj = res.data
|
|
||||||
this.mac = res.data.mac
|
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
|
||||||
this.modelId = res.data.modelId
|
|
||||||
this.getcheliang()
|
|
||||||
} else {
|
|
||||||
uni.showModal({ title: '提示', content: res.msg, showCancel: false, confirmText: '知道了' })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.logoflag = false
|
this.logoflag = false
|
||||||
|
this.getcheliang()
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: res.msg, icon: 'none', duration: 2000 })
|
uni.showToast({ title: res.msg, icon: 'none', duration: 2000 })
|
||||||
}
|
}
|
||||||
|
|
@ -994,28 +867,20 @@
|
||||||
|
|
||||||
// ── 获取车辆信息 ─────────────────────────────
|
// ── 获取车辆信息 ─────────────────────────────
|
||||||
getcheliang() {
|
getcheliang() {
|
||||||
if (this.chesn == '') {
|
const sn = this.chesn || this.sn
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.sn}`).then((res) => {
|
this.$u.get(`/app/device/availableDetail?sn=${sn}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200 && res.data) {
|
||||||
this.bikeobj = res.data
|
this.bikeobj = res.data
|
||||||
|
this.modelId = res.data.modelId
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
||||||
this.mac = res.data.mac
|
this.mac = res.data.mac
|
||||||
this.$u.put(`/app/user/bindArea?areaId=${res.data.areaId}`).then(resp => {})
|
if (!this.chesn) this.$u.put(`/app/user/bindArea?areaId=${res.data.areaId}`).then(() => {})
|
||||||
this.gettaocan()
|
this.gettaocan()
|
||||||
this.getAreaDetail()
|
this.getAreaDetail()
|
||||||
|
this.getgg()
|
||||||
|
this.gethuiyuan()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
|
||||||
this.mac = res.data.mac
|
|
||||||
this.bikeobj = res.data
|
|
||||||
this.gettaocan()
|
|
||||||
this.getAreaDetail()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ── 获取套餐 ─────────────────────────────────
|
// ── 获取套餐 ─────────────────────────────────
|
||||||
|
|
|
||||||
|
|
@ -3,416 +3,182 @@
|
||||||
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
|
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
|
||||||
title-size='36' height='50'></u-navbar>
|
title-size='36' height='50'></u-navbar>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title">
|
<view class="title">基本信息</view>
|
||||||
基本信息
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="list_val">
|
<view class="list_val">
|
||||||
<view class="" style="padding-top:12rpx">备注名</view> <input type="text" v-model="beizhu"
|
<view class="" style="padding-top:12rpx">备注名</view>
|
||||||
placeholder="请输入备注名" />
|
<input type="text" v-model="beizhu" placeholder="请输入备注名" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list_val" style="position: relative;">
|
<view class="list_val" style="position: relative;">
|
||||||
<view class="" style="padding-top:12rpx;width: 176rpx;">身份类型</view> <input type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
<view class="" style="padding-top:12rpx;width: 176rpx;">身份类型</view>
|
||||||
<!-- <u-select v-model="show" :list="arr" @confirm="confirm"></u-select> -->
|
<input type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list_val">
|
<view class="list_val">
|
||||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" v-model="tel"
|
<view class="" style="padding-top:12rpx">手机号码</view>
|
||||||
placeholder="请输入手机号码" />
|
<input type="text" v-model="tel" placeholder="请输入手机号码" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="list_val">
|
|
||||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" v-model="bili"
|
|
||||||
placeholder="请输入分成比例%" />
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
|
<!-- 权限区域 -->
|
||||||
|
<view class="section-header">
|
||||||
|
<view class="title">权限</view>
|
||||||
|
<view class="global-actions" v-if="permissionGroups.length > 0">
|
||||||
|
<text class="action-btn" @click="handleSelectAllGlobal">全选</text>
|
||||||
|
<text class="action-divider">|</text>
|
||||||
|
<text class="action-btn" @click="handleDeselectAllGlobal">取消全选</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="permissionsLoading" class="loading-tip">
|
||||||
|
<u-loading mode="circle" size="36"></u-loading>
|
||||||
|
<text style="margin-left: 12rpx; color: #999; font-size: 26rpx;">加载中...</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-for="(group, gi) in permissionGroups" :key="gi" class="permission-group">
|
||||||
|
<view class="group-header">
|
||||||
|
<text class="group-name">{{ group.group }}</text>
|
||||||
|
<view class="group-actions">
|
||||||
|
<text class="action-btn" @click="handleSelectAllGroup(gi)">全选</text>
|
||||||
|
<text class="action-divider">|</text>
|
||||||
|
<text class="action-btn" @click="handleDeselectAllGroup(gi)">取消</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
|
||||||
权限
|
|
||||||
</view>
|
</view>
|
||||||
<view class="swlist">
|
<view class="swlist">
|
||||||
<view class="swlist_val" v-for="(item,index) in list" :key="index">
|
<view class="swlist_val" v-for="(item, ii) in group.items" :key="ii">
|
||||||
<view class="lt">
|
<view class="lt">
|
||||||
<view class="one">
|
<view class="one">{{ item.name }}</view>
|
||||||
{{item.name}}
|
<view class="two">{{ item.description }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="two">
|
<view class="rt">
|
||||||
{{item.tit}}
|
<u-switch
|
||||||
|
v-model="item.checked"
|
||||||
|
:disabled="item.isDefault"
|
||||||
|
:active-color="item.isDefault ? '#2b2929' : '#4C97E7'"
|
||||||
|
size="36"
|
||||||
|
inactive-color="#eee"
|
||||||
|
></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rt" v-if="item.name == '查看运营区'">
|
|
||||||
<u-switch v-model="item.checked" :disabled="true" active-color="#2b2929" size="36"
|
|
||||||
inactive-color="#eee"></u-switch>
|
|
||||||
</view>
|
|
||||||
<view class="rt" v-else>
|
|
||||||
<u-switch v-model="item.checked" active-color="#4C97E7" size="36"
|
|
||||||
inactive-color="#eee"></u-switch>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="baocun" @click="btncj">
|
<view class="baocun" @click="btncj">{{ tit }}</view>
|
||||||
{{tit}}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
bgc: { backgroundColor: "#fff" },
|
||||||
bgc: {
|
|
||||||
backgroundColor: "#fff"
|
|
||||||
},
|
|
||||||
level: '',
|
|
||||||
tel: '',
|
tel: '',
|
||||||
sheng: '运维',
|
sheng: '运维',
|
||||||
arr: [{
|
|
||||||
label: '加盟商',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '合伙人',
|
|
||||||
value: 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tit: '创建运维人员',
|
tit: '创建运维人员',
|
||||||
userId: '',
|
|
||||||
bili: '',
|
bili: '',
|
||||||
beizhu: '',
|
beizhu: '',
|
||||||
jiamtype: '',
|
jiamtype: 3,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
jiamid: '',
|
jiamid: '',
|
||||||
// 权限映射配置
|
permissionsLoading: false,
|
||||||
permissionConfig: {
|
permissionGroups: []
|
||||||
'查看运营区': 'area:view',
|
|
||||||
'操作运营区': 'area:edit',
|
|
||||||
'查看运营区推广': 'areaPromotion:view',
|
|
||||||
'操作运营区推广': 'areaPromotion:edit',
|
|
||||||
'查看停车区': 'areaSub:view',
|
|
||||||
'操作停车区': 'areaSub:edit',
|
|
||||||
'查看故障': 'fault:view',
|
|
||||||
'故障审核': 'fault:edit',
|
|
||||||
'查看订单': 'order:view',
|
|
||||||
'操作订单': 'order:edit',
|
|
||||||
'查看车辆': 'device:view',
|
|
||||||
'操作车辆': 'device:edit',
|
|
||||||
// '查看订单金额': 'order:view:amount',
|
|
||||||
'查看广告': 'ad:view',
|
|
||||||
'操作广告': 'ad:edit',
|
|
||||||
'查看套餐': 'suit:view',
|
|
||||||
'操作套餐': 'suit:edit',
|
|
||||||
'查看车型': 'model:view',
|
|
||||||
'操作车型': 'model:edit',
|
|
||||||
'查看客服': 'customerService:view',
|
|
||||||
'操作客服': 'customerService:edit',
|
|
||||||
'查看卡券': 'vip:view',
|
|
||||||
'操作卡券': 'vip:edit',
|
|
||||||
'查看卡券订单': 'vipOrder:view',
|
|
||||||
'操作卡券订单': 'vipOrder:edit',
|
|
||||||
'查看用户卡券': 'vipUser:view',
|
|
||||||
'操作用户卡券': 'vipUser:edit',
|
|
||||||
'查看投诉': 'complaint:view',
|
|
||||||
'操作投诉': 'complaint:edit',
|
|
||||||
'查看协议': 'agreement:view',
|
|
||||||
'操作协议': 'agreement:edit',
|
|
||||||
'查看换电工单': 'powerWork:view',
|
|
||||||
'操作换电工单': 'powerWork:edit',
|
|
||||||
'查看调度日志': 'dispatchLog:view',
|
|
||||||
},
|
|
||||||
list: [{
|
|
||||||
name: '查看运营区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: true,
|
|
||||||
txt: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作运营区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看运营区推广',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作运营区推广',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看停车区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作停车区',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看故障',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '故障审核',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 10
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看车辆',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 11
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作车辆',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 12
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看广告',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作广告',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看套餐',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作套餐',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看车型',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 17
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作车型',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 18
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// name: '查看订单金额',
|
|
||||||
// tit: '是否允许',
|
|
||||||
// checked: false,
|
|
||||||
// txt: 17
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
name: '查看客服',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 19
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作客服',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 22
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看卡券订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 23
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作卡券订单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 24
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看用户卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作用户卡券',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 26
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看投诉',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 27
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作投诉',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 28
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '查看协议',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 29
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '操作协议',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 30
|
|
||||||
}, {
|
|
||||||
name: '查看换电工单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 31
|
|
||||||
},{
|
|
||||||
name: '操作换电工单',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 32
|
|
||||||
},{
|
|
||||||
name: '查看调度日志',
|
|
||||||
tit: '是否允许',
|
|
||||||
checked: false,
|
|
||||||
txt: 33
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.areaId = uni.getStorageSync('adminAreaid')
|
this.areaId = uni.getStorageSync('adminAreaid')
|
||||||
|
this.loadPermissions().then(() => {
|
||||||
if (option.item) {
|
if (option.item) {
|
||||||
this.tit = '编辑运维人员'
|
this.tit = '编辑运维人员'
|
||||||
const obj = JSON.parse(option.item)
|
const obj = JSON.parse(option.item)
|
||||||
this.initFormData(obj)
|
this.initFormData(obj)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
// 初始化表单数据
|
|
||||||
initFormData(obj) {
|
|
||||||
this.tel = obj.userPhone
|
|
||||||
this.areaId = obj.areaId
|
|
||||||
this.bili = obj.point
|
|
||||||
this.jiamid = obj.id
|
|
||||||
this.beizhu = obj.remark
|
|
||||||
this.jiamtype = obj.type
|
|
||||||
|
|
||||||
// 设置权限选中状态
|
|
||||||
this.setPermissionStatus(obj.permissions)
|
|
||||||
|
|
||||||
// 设置身份类型显示
|
|
||||||
},
|
|
||||||
|
|
||||||
// 设置权限选中状态
|
|
||||||
setPermissionStatus(permissions) {
|
|
||||||
const permissionMap = {
|
|
||||||
'area:view': 0,
|
|
||||||
'area:edit': 1,
|
|
||||||
'areaPromotion:view': 2,
|
|
||||||
'areaPromotion:edit': 3,
|
|
||||||
'areaSub:view': 4,
|
|
||||||
'areaSub:edit': 5,
|
|
||||||
'fault:view': 6,
|
|
||||||
'fault:edit': 7,
|
|
||||||
'order:view': 8,
|
|
||||||
'order:edit': 9,
|
|
||||||
'device:view': 10,
|
|
||||||
'device:edit': 11,
|
|
||||||
'ad:view': 12,
|
|
||||||
'ad:edit': 13,
|
|
||||||
'suit:view': 14,
|
|
||||||
'suit:edit': 15,
|
|
||||||
'model:view': 16,
|
|
||||||
'model:edit': 17,
|
|
||||||
// 'order:view:amount': 16,
|
|
||||||
'customerService:view': 18,
|
|
||||||
'customerService:edit': 19,
|
|
||||||
'vip:view': 20,
|
|
||||||
'vip:edit': 21,
|
|
||||||
'vipOrder:view': 22,
|
|
||||||
'vipOrder:edit': 23,
|
|
||||||
'vipUser:view': 24,
|
|
||||||
'vipUser:edit': 25,
|
|
||||||
'complaint:view': 26,
|
|
||||||
'complaint:edit': 27,
|
|
||||||
'agreement:view': 28,
|
|
||||||
'agreement:edit': 29,
|
|
||||||
'powerWork:view': 30,
|
|
||||||
'powerWork:edit': 31,
|
|
||||||
'dispatchLog:view': 32
|
|
||||||
}
|
|
||||||
|
|
||||||
permissions.forEach(permission => {
|
|
||||||
const index = permissionMap[permission]
|
|
||||||
if (index !== undefined) {
|
|
||||||
this.list[index].checked = true
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 身份选择确认
|
methods: {
|
||||||
confirm(e) {
|
/** 从接口加载权限分组 */
|
||||||
this.sheng = e[0].label
|
loadPermissions() {
|
||||||
this.jiamtype = e[0].value
|
this.permissionsLoading = true
|
||||||
|
return this.$u.get('/bst/areaJoin/permissions').then(res => {
|
||||||
|
if (res.code === 200 && res.data) {
|
||||||
|
this.permissionGroups = res.data.map(group => ({
|
||||||
|
...group,
|
||||||
|
items: group.items.map(item => ({
|
||||||
|
...item,
|
||||||
|
checked: !!item.isDefault
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
uni.showToast({ title: '权限列表加载失败', icon: 'none' })
|
||||||
|
}).finally(() => {
|
||||||
|
this.permissionsLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 收集选中的权限
|
/** 初始化表单数据 */
|
||||||
|
initFormData(obj) {
|
||||||
|
this.tel = obj.userPhone
|
||||||
|
this.areaId = obj.areaId
|
||||||
|
this.jiamid = obj.id
|
||||||
|
this.beizhu = obj.remark
|
||||||
|
this.jiamtype = obj.type
|
||||||
|
this.setPermissionStatus(obj.permissions || [])
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 根据权限 code 数组回填开关状态 */
|
||||||
|
setPermissionStatus(permissions) {
|
||||||
|
const permSet = new Set(permissions)
|
||||||
|
this.permissionGroups.forEach(group => {
|
||||||
|
group.items.forEach(item => {
|
||||||
|
if (!item.isDefault) {
|
||||||
|
item.checked = permSet.has(item.code)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 全部全选 */
|
||||||
|
handleSelectAllGlobal() {
|
||||||
|
this.permissionGroups.forEach(group => {
|
||||||
|
group.items.forEach(item => { item.checked = true })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 全部取消(保留默认权限) */
|
||||||
|
handleDeselectAllGlobal() {
|
||||||
|
this.permissionGroups.forEach(group => {
|
||||||
|
group.items.forEach(item => {
|
||||||
|
if (!item.isDefault) item.checked = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 分组全选 */
|
||||||
|
handleSelectAllGroup(gi) {
|
||||||
|
this.permissionGroups[gi].items.forEach(item => { item.checked = true })
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 分组取消(保留该组默认权限) */
|
||||||
|
handleDeselectAllGroup(gi) {
|
||||||
|
this.permissionGroups[gi].items.forEach(item => {
|
||||||
|
if (!item.isDefault) item.checked = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 收集选中的权限 code */
|
||||||
collectPermissions() {
|
collectPermissions() {
|
||||||
return this.list
|
const codes = []
|
||||||
.filter(item => item.checked)
|
this.permissionGroups.forEach(group => {
|
||||||
.map(item => this.permissionConfig[item.name])
|
group.items.forEach(item => {
|
||||||
.filter(Boolean) // 过滤掉undefined
|
if (item.checked) codes.push(item.code)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return codes
|
||||||
},
|
},
|
||||||
|
|
||||||
// 构建请求数据
|
/** 构建请求数据 */
|
||||||
buildRequestData() {
|
buildRequestData() {
|
||||||
return {
|
return {
|
||||||
id: this.jiamid,
|
id: this.jiamid,
|
||||||
|
|
@ -425,43 +191,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理API响应
|
/** 处理 API 响应 */
|
||||||
handleApiResponse(res, successMessage) {
|
handleApiResponse(res, successMessage) {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({ title: successMessage, icon: 'success', duration: 2000 })
|
||||||
title: successMessage,
|
setTimeout(() => { uni.navigateBack() }, 2000)
|
||||||
icon: 'success',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 2000)
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({ title: res.msg, icon: 'none', duration: 2000 })
|
||||||
title: res.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击创建/编辑
|
/** 点击创建/编辑 */
|
||||||
async btncj() {
|
async btncj() {
|
||||||
const data = this.buildRequestData()
|
const data = this.buildRequestData()
|
||||||
const isEdit = this.tit === '编辑运维人员'
|
const isEdit = this.tit === '编辑运维人员'
|
||||||
const apiMethod = isEdit ? 'put' : 'post'
|
const apiMethod = isEdit ? 'put' : 'post'
|
||||||
const apiUrl = '/bst/areaJoin'
|
|
||||||
const successMessage = isEdit ? '编辑成功' : '创建成功'
|
const successMessage = isEdit ? '编辑成功' : '创建成功'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await this.$u[apiMethod](apiUrl, data)
|
const res = await this.$u[apiMethod]('/bst/areaJoin', data)
|
||||||
this.handleApiResponse(res, successMessage)
|
this.handleApiResponse(res, successMessage)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.showToast({
|
uni.showToast({ title: '请求失败,请重试', icon: 'none', duration: 2000 })
|
||||||
title: '请求失败,请重试',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -474,8 +224,66 @@
|
||||||
padding-bottom: 22rpx;
|
padding-bottom: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.global-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #4C97E7;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-divider {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-tip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.permission-group {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 24rpx 28rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.group-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.group-name {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #3D3D3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.swlist {
|
.swlist {
|
||||||
margin-top: 34rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
@ -483,38 +291,44 @@
|
||||||
.swlist_val {
|
.swlist_val {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 324rpx;
|
width: 48%;
|
||||||
height: 144rpx;
|
min-height: 120rpx;
|
||||||
background: #FFFFFF;
|
background: #F4F5F7;
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 16rpx;
|
||||||
padding-top: 28rpx;
|
padding: 20rpx 20rpx 20rpx 24rpx;
|
||||||
padding-left: 38rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 18rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lt {
|
.lt {
|
||||||
|
flex: 1;
|
||||||
|
padding-right: 12rpx;
|
||||||
|
|
||||||
.one {
|
.one {
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.two {
|
.two {
|
||||||
font-size: 24rpx;
|
font-size: 22rpx;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
margin-top: 12rpx;
|
margin-top: 8rpx;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rt {
|
.rt {
|
||||||
margin-top: 24rpx;
|
display: flex;
|
||||||
padding-right: 12rpx;
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
margin-top: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
|
|
@ -525,7 +339,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
background: #F4F5F7;
|
background: #F4F5F7;
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
||||||
padding: 32rpx 36rpx;
|
padding: 32rpx 36rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
|
|
@ -535,8 +348,8 @@
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
background: linear-gradient(270deg, #4C97E7 0%, #4C97E7 100%);
|
background: linear-gradient(270deg, #4C97E7 0%, #4C97E7 100%);
|
||||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
border-radius: 54rpx;
|
||||||
margin-top: 110rpx;
|
margin-top: 80rpx;
|
||||||
margin-bottom: 78rpx;
|
margin-bottom: 78rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
|
|
@ -545,58 +358,13 @@
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swlist {
|
|
||||||
margin-top: 34rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.swlist_val {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 324rpx;
|
|
||||||
height: 144rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
padding-top: 28rpx;
|
|
||||||
padding-left: 38rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-top: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lt {
|
|
||||||
.one {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #3D3D3D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.two {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #808080;
|
|
||||||
margin-top: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rt {
|
|
||||||
margin-top: 24rpx;
|
|
||||||
padding-right: 12rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #3D3D3D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 578rpx;
|
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 24rpx;
|
||||||
padding: 46rpx 36rpx;
|
padding: 46rpx 36rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 34rpx;
|
margin-top: 34rpx;
|
||||||
margin-bottom: 47rpx;
|
|
||||||
|
|
||||||
.list_val {
|
.list_val {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -609,7 +377,7 @@
|
||||||
width: 430rpx;
|
width: 430rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
background: #F0F0F0;
|
background: #F0F0F0;
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx;
|
||||||
padding-left: 32rpx;
|
padding-left: 32rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<view class="card" v-for="(item,index) in allList" :key="index" @click="toOrderDetail(item.deviceSn,item.id,item)">
|
<view class="card" v-for="(item,index) in allList" :key="index" @click="toOrderDetail(item.deviceSn,item.id,item)">
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="top_info">
|
<view class="top_info">
|
||||||
<view class="top_info_left" style="display: flex; align-items: center; flex-wrap: wrap;">
|
<view class="top_info_left" style="display: flex; align-items: center; ">
|
||||||
<text v-if="item.timeout == false">{{item.no}}</text>
|
<text v-if="item.timeout == false">{{item.no}}</text>
|
||||||
<text v-else style="color: red;">{{item.no}}</text>
|
<text v-else style="color: red;">{{item.no}}</text>
|
||||||
<text style="color: red;" v-if="item.timeout == true"> ·超时</text>
|
<text style="color: red;" v-if="item.timeout == true"> ·超时</text>
|
||||||
|
|
@ -135,9 +135,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TabBar from '@/page_shanghu/components/tab-bar/tab-bar.vue';
|
|
||||||
import { ChannelApiType } from '@/common/enums/channel';
|
import { ChannelApiType } from '@/common/enums/channel';
|
||||||
import ZhimaNoDepositBadge from '@/components/zhima-no-deposit-badge/zhima-no-deposit-badge.vue';
|
import ZhimaNoDepositBadge from '@/components/zhima-no-deposit-badge/zhima-no-deposit-badge.vue';
|
||||||
|
import TabBar from '@/page_shanghu/components/tab-bar/tab-bar.vue';
|
||||||
|
|
||||||
let timerId;
|
let timerId;
|
||||||
let timerId1;
|
let timerId1;
|
||||||
|
|
@ -602,11 +602,9 @@
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.top_info_left {
|
.top_info_left {
|
||||||
width: 70%;
|
flex: 1;
|
||||||
font-weight: 400;
|
font-size: 26rpx;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-mask :show="show" @click="handleClose" :z-index="100" />
|
<u-mask :show="show" :z-index="100" />
|
||||||
<view class="nfc-add-dialog" v-if="show">
|
<view class="nfc-add-dialog" v-if="show">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="dialog-title">添加NFC卡</view>
|
<view class="dialog-title">添加NFC卡</view>
|
||||||
|
|
@ -172,12 +172,12 @@
|
||||||
|
|
||||||
// NFC卡片发现回调
|
// NFC卡片发现回调
|
||||||
onNfcDiscovered(res) {
|
onNfcDiscovered(res) {
|
||||||
const uid = this.arrayBufferToHex(res.id)
|
const uid = this.arrayBufferToHex(res.id).toUpperCase().padStart(16, '0')
|
||||||
console.log('[NFC] 原始响应:', res)
|
console.log('[NFC] 原始响应:', res)
|
||||||
console.log('[NFC] 卡片UID (hex):', uid.toUpperCase())
|
console.log('[NFC] 卡片UID (hex):', uid)
|
||||||
console.log('[NFC] 技术类型 techs:', res.techs)
|
console.log('[NFC] 技术类型 techs:', res.techs)
|
||||||
console.log('[NFC] NDEF messages:', res.messages)
|
console.log('[NFC] NDEF messages:', res.messages)
|
||||||
this.form.nfcNo = uid.toUpperCase()
|
this.form.nfcNo = uid
|
||||||
this.nfcReadSuccess = true
|
this.nfcReadSuccess = true
|
||||||
this.stopNfcRead()
|
this.stopNfcRead()
|
||||||
uni.showToast({ title: '读取成功', icon: 'success', duration: 1500 })
|
uni.showToast({ title: '读取成功', icon: 'success', duration: 1500 })
|
||||||
|
|
@ -224,15 +224,15 @@
|
||||||
}
|
}
|
||||||
uni.showLoading({ title: '绑定中...', mask: true })
|
uni.showLoading({ title: '绑定中...', mask: true })
|
||||||
const data = {
|
const data = {
|
||||||
id: this.deviceId,
|
deviceId: this.deviceId,
|
||||||
nfcNo: this.form.nfcNo.trim(),
|
nfcNo: this.form.nfcNo.trim(),
|
||||||
type: this.form.type,
|
type: this.form.type,
|
||||||
remark: this.form.remark.trim() || undefined
|
remark: this.form.remark.trim() || undefined
|
||||||
}
|
}
|
||||||
this.$u.put('/bst/device/iot/bindNfc', data).then(res => {
|
this.$u.post('/bst/deviceNfc', data).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({ title: '绑定成功', icon: 'success' })
|
uni.showToast({ title: '新增成功', icon: 'success' })
|
||||||
this.$emit('success')
|
this.$emit('success')
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,7 @@
|
||||||
},
|
},
|
||||||
deleteNfc(item) {
|
deleteNfc(item) {
|
||||||
uni.showLoading({ title: '删除中...', mask: true })
|
uni.showLoading({ title: '删除中...', mask: true })
|
||||||
const data = {
|
this.$u.delete('/bst/deviceNfc?id=' + item.id).then(res => {
|
||||||
id: this.deviceId,
|
|
||||||
nfcNo: item.nfcNo,
|
|
||||||
type: item.type
|
|
||||||
}
|
|
||||||
this.$u.put('/bst/device/iot/unbindNfc', data).then(res => {
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({ title: '删除成功', icon: 'success' })
|
uni.showToast({ title: '删除成功', icon: 'success' })
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
<view class="info-card overview-card" style="z-index: 1;">
|
<view class="info-card overview-card" style="z-index: 1;">
|
||||||
<view class="card-header">
|
<view class="card-header">
|
||||||
<view class="order-no-box" style="display: flex; align-items: center;">
|
<view class="order-no-box" style="display: flex; align-items: center;">
|
||||||
<text class="label">订单编号:</text>
|
|
||||||
<text class="value">{{orderxqobj.no}}</text>
|
<text class="value">{{orderxqobj.no}}</text>
|
||||||
<zhima-no-deposit-badge v-if="orderxqobj.payChannelApiType === ChannelApiType.ZHIMA_DEPOSIT_ONLY.value" style="margin-left: 12rpx;" />
|
<zhima-no-deposit-badge v-if="orderxqobj.payChannelApiType === ChannelApiType.ZHIMA_DEPOSIT_ONLY.value" style="margin-left: 12rpx;" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -2975,7 +2974,7 @@
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.order-no-box {
|
.order-no-box {
|
||||||
font-size: 28rpx;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user