aaa
This commit is contained in:
parent
c21fc37b9c
commit
fdcd063c12
|
@ -1,6 +1,6 @@
|
|||
const install = (Vue, vm) => {
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
baseUrl: 'http://192.168.2.17:3100/dev-api',
|
||||
baseUrl: 'http://192.168.2.24:3100/dev-api',
|
||||
// baseUrl: 'https://znb.ccttiot.com',
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 800,
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
</view>
|
||||
<view class="list">
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">代理级别</view> <input type="text" disabled="false" placeholder="2级代理" />
|
||||
<view class="" style="padding-top:12rpx">代理级别</view> <input type="text" v-model="level" disabled="false" placeholder="2级代理" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">代理名称</view> <input type="text" placeholder="请输入代理名称" />
|
||||
<view class="" style="padding-top:12rpx">代理名称</view> <input type="text" v-model="name" placeholder="请输入代理名称" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" placeholder="请输入分成比例 %" />
|
||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" v-model="ratio" placeholder="请输入分成比例 %" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" placeholder="请输入手机号码" />
|
||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" v-model="tel" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx;margin-right: 88rpx;">省市区</view> <input @click="show = true" type="text" placeholder="请选择省市区" />
|
||||
<view class="" style="padding-top:12rpx;margin-right: 88rpx;">省市区</view> <input @click="show = true" type="text" disabled="false" v-model="sheng" :placeholder="sheng" />
|
||||
<u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -27,125 +27,22 @@
|
|||
商户权限
|
||||
</view>
|
||||
<view class="swlist">
|
||||
<view class="swlist_val">
|
||||
<view class="swlist_val" v-for="(item,index) in list" :key="index">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许登录
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="two">
|
||||
代理登录系统
|
||||
{{item.tit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
<u-switch v-model="item.checked" @change="change" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许提现
|
||||
</view>
|
||||
<view class="two">
|
||||
代理钱包余额提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
展示分成比例
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示分成比例
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
代理操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示操作代理
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
设备显示
|
||||
</view>
|
||||
<view class="two">
|
||||
是否允许设备显示
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
设备操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示设备操作
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
店铺操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示店铺操作
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
订单管理
|
||||
</view>
|
||||
<view class="two">
|
||||
是否允许查看订单
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
风控设置
|
||||
</view>
|
||||
<view class="two">
|
||||
是否显示风控设置
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<view class="baocun">
|
||||
<view class="baocun" @click="btncj">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
|
@ -156,16 +53,130 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked: false,
|
||||
list:[
|
||||
{name:'允许登录',tit:'代理登录系统',checked:false},
|
||||
{name:'允许提现',tit:'代理钱包余额提现',checked:false},
|
||||
{name:'展示分成比例',tit:'是否展示分成比例',checked:false},
|
||||
{name:'代理操作',tit:'是否展示操作代理',checked:false},
|
||||
{name:'设备显示',tit:'是否允许设备显示',checked:false},
|
||||
{name:'设备操作',tit:'是否展示设备操作',checked:false},
|
||||
{name:'店铺操作',tit:'是否展示店铺操作',checked:false},
|
||||
{name:'订单管理',tit:'是否允许查看订单',checked:false}
|
||||
],
|
||||
show:false,
|
||||
bgc: {
|
||||
backgroundColor: " #25CE88",
|
||||
},
|
||||
level:'',
|
||||
name:'',
|
||||
ratio:'',
|
||||
tel:'',
|
||||
sheng:'请选择省市区',
|
||||
arr:[],
|
||||
arrqx:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirm(e){
|
||||
console.log(e);
|
||||
this.arr = []
|
||||
this.sheng = e.province.label + '/' + e.city.label + "/" + e.area.label
|
||||
this.arr.push(e.province.label)
|
||||
this.arr.push(e.city.label)
|
||||
this.arr.push(e.area.label)
|
||||
},
|
||||
change(e){
|
||||
console.log(this.list)
|
||||
|
||||
},
|
||||
|
||||
btncj(){
|
||||
if(this.name == '' || this.name == '请输入代理名称'){
|
||||
uni.showToast({
|
||||
title: '请输入代理名称',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else if(this.ratio == '' || this.ratio == '请输入分成比例 %'){
|
||||
uni.showToast({
|
||||
title: '请输入分成比例 %',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else if(this.tel == '' || this.tel == '请输入手机号码'){
|
||||
uni.showToast({
|
||||
title: '请输入手机号码',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else if(this.sheng == '请选择省市区'){
|
||||
uni.showToast({
|
||||
title: '请选择省市区',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else{
|
||||
this.arrqx = []
|
||||
const mapping = {
|
||||
'允许登录': 'agent:login',
|
||||
'允许提现': 'agent:withdraw',
|
||||
'展示分成比例': 'agent:point:show',
|
||||
'代理操作': 'agent:operation',
|
||||
'设备显示': 'agent:device:show',
|
||||
'设备操作': 'agent:device:operation',
|
||||
'店铺操作': 'agent:store:operation',
|
||||
'订单管理': 'agent:order:manage'
|
||||
};
|
||||
this.list.forEach((item) => {
|
||||
if (item.checked && mapping.hasOwnProperty(item.name)) {
|
||||
this.arrqx.push(mapping[item.name]);
|
||||
}
|
||||
})
|
||||
|
||||
let data = {
|
||||
name:this.name,
|
||||
point:this.ratio,
|
||||
mobile:this.tel,
|
||||
area:this.arr,
|
||||
permissions:this.arrqx
|
||||
}
|
||||
this.$u.post('/agent/agent',data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '创建成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1500)
|
||||
}else if(res.msg == '请输入正确的手机号'){
|
||||
uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else if(res.msg == '该手机号所绑定的用户已经是代理商,请勿重复绑定'){
|
||||
uni.showToast({
|
||||
title: '该手机号所绑定的用户已经是代理商,请勿重复绑定',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else if(res.msg == '分成比例不允许超过上级代理,最高:90.00'){
|
||||
uni.showToast({
|
||||
title: '分成比例不允许超过上级代理,最高:90.00',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title: '分成比例必须为数字',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="shuju">
|
||||
|
@ -18,13 +18,22 @@
|
|||
0
|
||||
</view>
|
||||
<view class="shu">
|
||||
商家>
|
||||
店铺>
|
||||
</view>
|
||||
</view>
|
||||
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;margin:24rpx 50rpx;"></text>
|
||||
<view class="ddje" @click="btnshop(6)">
|
||||
<view class="sb">
|
||||
0
|
||||
</view>
|
||||
<view class="shu">
|
||||
运维>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tulist">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uThIyaWrhh5a9Oh8zbbn" mode="" @click="btnshop(1)"></image>
|
||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uThIyaWrhh5a9Oh8zbbn" mode="" @click="btnshop(1)"></image> -->
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uXquYtM06wNT6ElZQTlo" mode="" @click="btnshop(2)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uMtNJoZxvsMjIhAMoWdL" mode="" @click="btnshop(3)"></image>
|
||||
</view>
|
||||
|
@ -59,7 +68,11 @@
|
|||
})
|
||||
}else if(num == 5){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/listshu/shangjialist'
|
||||
url:'/page_user/daili/dianpu'
|
||||
})
|
||||
}else if(num == 6){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/daili/yunweilist'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -93,15 +106,16 @@
|
|||
padding: 54rpx 78rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
image{
|
||||
width: 96rpx;
|
||||
height: 98rpx;
|
||||
margin-right: 100rpx;
|
||||
}
|
||||
}
|
||||
.shuju {
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
padding: 40rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
width: 680rpx;
|
||||
|
|
|
@ -24,22 +24,7 @@
|
|||
<u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商家 -->
|
||||
<view class="list">
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">商户名称</view> <input type="text" placeholder="请输入代理名称" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">分成比例</view> <input type="text" placeholder="请输入分成比例 %" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx">手机号码</view> <input type="text" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
<view class="list_val">
|
||||
<view class="" style="padding-top:12rpx;margin-right: 88rpx;">省市区</view> <input @click="show = true" type="text" placeholder="请选择省市区" />
|
||||
<u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="baocun">
|
||||
保存
|
||||
</view>
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
<view class="box">
|
||||
<view class="nav">
|
||||
<view class="top">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword"></u-search>
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" v-for="(item,index) in 3" :key="index">
|
||||
<view class="list" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="top">
|
||||
<view class="lt">
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">星途自助台球棋牌室</view>
|
||||
<view class="" style="font-size: 20rpx;color: #808080;">12312345678-商家</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.name}}</view>
|
||||
<view class="" style="font-size: 20rpx;color: #808080;">ID:{{item.agentId}} - {{item.level}}级代理</view>
|
||||
</view>
|
||||
<view class="rt" @click="btnxq">
|
||||
<view class="rt" @click="btnxq(item)">
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;display: inline-block;background-color: #575B66;"></text>
|
||||
|
@ -24,11 +24,11 @@
|
|||
<view class="list_val">
|
||||
<view class="list_shop">
|
||||
<view class="" style="font-size: 24rpx;color: #808080;">代理</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">1</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.childrenCount}}</view>
|
||||
</view>
|
||||
<view class="list_shebei">
|
||||
<view class="" style="font-size: 24rpx;color: #808080;">店铺数</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">1</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.storeCount}}</view>
|
||||
</view>
|
||||
<!-- <view class="list_shebei">
|
||||
<view class="" style="font-size: 24rpx;color: #808080;">商户人数</view>
|
||||
|
@ -36,12 +36,12 @@
|
|||
</view> -->
|
||||
<view class="list_shebei">
|
||||
<view class="" style="font-size: 24rpx;color: #808080;">设备统计</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">1</view>
|
||||
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.cabinetCount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="photo" style="color: #808080;font-size: 24rpx;">联系电话:<text style="color: #3D3D3D;">12312345678</text> </view>
|
||||
<view class="photo" style="color: #808080;font-size: 24rpx;">联系电话:<text style="color: #3D3D3D;">{{item.mobile}}</text> </view>
|
||||
<view class="" style="width: 680rpx;height: 1px;background: #F0F0F0;margin-left: -30rpx;margin-top: 14rpx;"></view>
|
||||
<view class="" style="font-size: 24rpx;color: #3D3D3D;margin-top: 10rpx;">2024-02-18</view>
|
||||
<view class="" style="font-size: 24rpx;color: #3D3D3D;margin-top: 10rpx;">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -54,14 +54,61 @@
|
|||
bgc: {
|
||||
backgroundColor: " #25CE88"
|
||||
},
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
keyword:''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
btnxq(){
|
||||
btnxq(item){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/listshu/xqdetail?flag=' + true
|
||||
url:'/page_user/listshu/xqdetail?agentId=' + item.agentId
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getlist() {
|
||||
this.$u.get("/agent/agent/list?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this.keyword).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
searchs(){
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多代理人员了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -78,6 +125,7 @@
|
|||
height:100%;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-bottom: 200rpx;
|
||||
.list{
|
||||
width: 680rpx;
|
||||
height: 336rpx;
|
||||
|
|
|
@ -1,193 +1,33 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="权限操作" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<u-navbar title="权限操作" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="title">
|
||||
权限操作
|
||||
</view>
|
||||
<!-- 代理权限 -->
|
||||
<view class="swlist">
|
||||
<view class="swlist_val">
|
||||
<view class="swlist_val" v-for="(item,index) in list" :key="index">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许登录
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="two">
|
||||
代理登录系统
|
||||
{{item.tit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许提现
|
||||
</view>
|
||||
<view class="two">
|
||||
代理钱包余额提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
展示分成比例
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示分成比例
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
代理操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示操作代理
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
设备显示
|
||||
</view>
|
||||
<view class="two">
|
||||
是否允许设备显示
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
设备操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示设备操作
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
店铺操作
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示店铺操作
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
订单管理
|
||||
</view>
|
||||
<view class="two">
|
||||
是否允许查看订单
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商户权限 -->
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 商家权限 -->
|
||||
<view class="swlist">
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许登录
|
||||
</view>
|
||||
<view class="two">
|
||||
代理登录系统
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
允许提现
|
||||
</view>
|
||||
<view class="two">
|
||||
代理钱包余额提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
展示分成比例
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示分成比例
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
设备管理显示
|
||||
</view>
|
||||
<view class="two">
|
||||
是否允许设备显示
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="swlist_val">
|
||||
<view class="lt">
|
||||
<view class="one">
|
||||
我的店铺
|
||||
</view>
|
||||
<view class="two">
|
||||
是否展示我的店铺
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<u-switch v-model="checked" active-color="#19CD82 " size="36" inactive-color="#eee"></u-switch>
|
||||
<u-switch v-model="item.checked" @change="change" active-color="#19CD82 " size="36"
|
||||
inactive-color="#eee"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="baocun">
|
||||
|
||||
<view class="baocun" @click="btncj">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -195,20 +35,120 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked: false,
|
||||
show:false,
|
||||
list: [{
|
||||
name: '允许登录',
|
||||
tit: '代理登录系统',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '允许提现',
|
||||
tit: '代理钱包余额提现',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '展示分成比例',
|
||||
tit: '是否展示分成比例',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '代理操作',
|
||||
tit: '是否展示操作代理',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '设备显示',
|
||||
tit: '是否允许设备显示',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '设备操作',
|
||||
tit: '是否展示设备操作',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '店铺操作',
|
||||
tit: '是否展示店铺操作',
|
||||
checked: false
|
||||
},
|
||||
{
|
||||
name: '订单管理',
|
||||
tit: '是否允许查看订单',
|
||||
checked: false
|
||||
}
|
||||
],
|
||||
show: false,
|
||||
bgc: {
|
||||
backgroundColor: " #25CE88",
|
||||
},
|
||||
|
||||
listobj: {},
|
||||
arrqx:[]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(option) {
|
||||
this.listobj = JSON.parse(option.obj)
|
||||
console.log(this.listobj.permissions);
|
||||
this.listobj.permissions.forEach((item) => {
|
||||
if (item == 'agent:login') {
|
||||
this.list[0].checked = true
|
||||
} else if (item == 'agent:withdraw') {
|
||||
this.list[1].checked = true
|
||||
} else if (item == 'agent:point:show') {
|
||||
this.list[2].checked = true
|
||||
} else if (item == 'agent:operation') {
|
||||
this.list[3].checked = true
|
||||
} else if (item == 'agent:device:show') {
|
||||
this.list[4].checked = true
|
||||
} else if (item == 'agent:device:operation') {
|
||||
this.list[5].checked = true
|
||||
} else if (item == 'agent:store:operation') {
|
||||
this.list[6].checked = true
|
||||
} else if (item == 'agent:order:manage') {
|
||||
this.list[7].checked = true
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
confirm(e){
|
||||
change(e) {
|
||||
console.log(e);
|
||||
},
|
||||
|
||||
btncj() {
|
||||
this.arrqx = []
|
||||
const mapping = {
|
||||
'允许登录': 'agent:login',
|
||||
'允许提现': 'agent:withdraw',
|
||||
'展示分成比例': 'agent:point:show',
|
||||
'代理操作': 'agent:operation',
|
||||
'设备显示': 'agent:device:show',
|
||||
'设备操作': 'agent:device:operation',
|
||||
'店铺操作': 'agent:store:operation',
|
||||
'订单管理': 'agent:order:manage'
|
||||
};
|
||||
this.list.forEach((item) => {
|
||||
if (item.checked && mapping.hasOwnProperty(item.name)) {
|
||||
this.arrqx.push(mapping[item.name]);
|
||||
}
|
||||
})
|
||||
|
||||
let data = {
|
||||
agentId:this.listobj.agentId,
|
||||
permissions: this.arrqx
|
||||
}
|
||||
this.$u.put('/agent/agent', data).then(res => {
|
||||
if(res.code == 200){
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
},1500)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,23 +161,25 @@
|
|||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
.box{
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
overflow-y:scroll;
|
||||
overflow-y: scroll;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding: 32rpx 36rpx;
|
||||
padding: 32rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 100rpx;
|
||||
.baocun{
|
||||
width: 584rpx;
|
||||
|
||||
.baocun {
|
||||
width: 584rpx;
|
||||
height: 90rpx;
|
||||
margin: auto;
|
||||
background: linear-gradient( 270deg, #54DAA1 0%, #19CD82 100%);
|
||||
background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
margin-top: 62rpx;
|
||||
margin-bottom: 78rpx;
|
||||
|
@ -247,59 +189,68 @@
|
|||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.swlist{
|
||||
|
||||
.swlist {
|
||||
margin-top: 34rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
.swlist_val{
|
||||
flex-wrap: wrap;
|
||||
|
||||
.swlist_val {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 324rpx;
|
||||
height: 144rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
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{
|
||||
|
||||
.lt {
|
||||
.one {
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.two{
|
||||
|
||||
.two {
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
.rt{
|
||||
|
||||
.rt {
|
||||
margin-top: 24rpx;
|
||||
padding-right: 12rpx;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.list{
|
||||
width: 680rpx;
|
||||
height: 578rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
padding: 46rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 34rpx;
|
||||
margin-bottom: 47rpx;
|
||||
.list_val{
|
||||
|
||||
.list {
|
||||
width: 680rpx;
|
||||
height: 578rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
padding: 46rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 34rpx;
|
||||
margin-bottom: 47rpx;
|
||||
|
||||
.list_val {
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
input{
|
||||
|
||||
input {
|
||||
width: 430rpx;
|
||||
height: 70rpx;
|
||||
background: #F0F0F0;
|
||||
|
|
|
@ -4,26 +4,26 @@
|
|||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="shopname">
|
||||
瑞斯特酒店(龙安店)--商家
|
||||
{{listobj.name}}
|
||||
</view>
|
||||
<view class="shoplist">
|
||||
<view class="tit">
|
||||
基本信息
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">ID:</text> <text class="shen">12312345678</text>
|
||||
<text class="qian">ID:</text> <text class="shen">{{listobj.agentId}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">分成比例:</text> <text class="shen">90%</text>
|
||||
<text class="qian">分成比例:</text> <text class="shen">{{listobj.point}}%</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">手机号码:</text> <text class="shen">12312345678</text>
|
||||
<text class="qian">手机号码:</text> <text class="shen">{{listobj.mobile}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">创建时间:</text> <text class="shen">2023-10-04</text>
|
||||
<text class="qian">创建时间:</text> <text class="shen">{{listobj.createTime}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">累计订单:</text> <text class="shen">130单</text>
|
||||
<text class="qian">累计订单:</text> <text class="shen">{{listobj.orderCount}}单</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="icons">
|
||||
|
@ -44,44 +44,51 @@
|
|||
show: false,
|
||||
storeId:'',
|
||||
listobj:{},
|
||||
flag:false
|
||||
flag:false,
|
||||
agentId:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option.flag){
|
||||
this.flag = option.flag
|
||||
}
|
||||
this.agentId = option.agentId
|
||||
this.getxq()
|
||||
},
|
||||
methods: {
|
||||
getxq(){
|
||||
this.$u.get(`/agent/agent/${this.agentId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.listobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
btnpag(num){
|
||||
if(num == 1){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/listshu/quanxian'
|
||||
url:'/page_user/listshu/quanxian?obj=' + JSON.stringify(this.listobj)
|
||||
})
|
||||
}else if(num == 2){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/listshu/edit'
|
||||
url:'/page_user/listshu/edit?obj=' + this.listobj
|
||||
})
|
||||
}else if(num == 3){
|
||||
let vm = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '你确定要注销这个店铺吗?',
|
||||
content: '你确定要注销这个代理吗?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
// vm.$u.delete("/app/store/" + vm.storeId).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// uni.showToast({
|
||||
// title: '删除成功',
|
||||
// icon: 'success',
|
||||
// duration: 1000
|
||||
// })
|
||||
// setTimeout(()=>{
|
||||
// uni.navigateBack()
|
||||
// },1500)
|
||||
// }
|
||||
// })
|
||||
vm.$u.delete(`/agent/agent/${vm.agentId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '注销成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1500)
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击了取消');
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
基本信息
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">绑定设备:</text> <text class="shen">{{listobj.deviceCount}}</text>
|
||||
<text class="qian">设备数量:</text> <text class="shen">{{listobj.cabinetCount}}</text>
|
||||
</view>
|
||||
<view class="jiben">
|
||||
<text class="qian">营业时间:</text> <text class="shen">{{listobj.businessTimeStart}}~{{listobj.businessTimeEnd}}</text>
|
||||
|
@ -24,11 +24,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="icons">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uZEG6wcsyjAlik8iKnBZ" mode="" @click="btnpag(1)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u3GbElGkYzgolFDVMcRF" mode="" @click="btnpag(2)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/umSzDeyl29aEeJDXY3lT" mode="" @click="btnpag(3)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u54XmWWxo1l0yY1mZtcG" mode="" @click="btnpag(4)"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/urIxP74GyW2Puz4uqfN9" style="width: 54rpx;" mode="" @click="btnpag(5)"></image>
|
||||
<image v-if="flag" src="https://api.ccttiot.com/smartmeter/img/static/uZEG6wcsyjAlik8iKnBZ" mode="" @click="btnpag(1)"></image>
|
||||
<image v-if="flag" src="https://api.ccttiot.com/smartmeter/img/static/u3GbElGkYzgolFDVMcRF" mode="" @click="btnpag(2)"></image>
|
||||
<image v-if="flag" src="https://api.ccttiot.com/smartmeter/img/static/umSzDeyl29aEeJDXY3lT" mode="" @click="btnpag(3)"></image>
|
||||
<image v-if="flag" src="https://api.ccttiot.com/smartmeter/img/static/u54XmWWxo1l0yY1mZtcG" mode="" @click="btnpag(4)"></image>
|
||||
<image v-if="flags" src="https://api.ccttiot.com/smartmeter/img/static/urIxP74GyW2Puz4uqfN9" style="width: 54rpx;" mode="" @click="btnpag(5)"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -41,17 +41,29 @@
|
|||
return {
|
||||
show: false,
|
||||
storeId:'',
|
||||
listobj:{}
|
||||
listobj:{},
|
||||
flag:false,
|
||||
flags:false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.storeId = option.id
|
||||
// this.getdetail()
|
||||
this.storeId = option.storeId
|
||||
let userdata = uni.getStorageSync('userdata').permissions
|
||||
if (Array.isArray(userdata) && userdata.includes('agent:store:operation')) {
|
||||
this.flag = true
|
||||
} else {
|
||||
this.flag = false
|
||||
}
|
||||
if (Array.isArray(userdata) && userdata.includes('agent:device:show')) {
|
||||
this.flags = true
|
||||
} else {
|
||||
this.flags = false
|
||||
}
|
||||
this.getdetail()
|
||||
},
|
||||
methods: {
|
||||
getdetail(){
|
||||
this.$u.get("/app/store/mch/" + this.storeId).then(res => {
|
||||
this.$u.get(`/agent/store/${this.storeId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.listobj = res.data
|
||||
}
|
||||
|
@ -66,7 +78,7 @@
|
|||
})
|
||||
}else if(num == 2){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shopedit'
|
||||
url:'/page_user/shopedit?obj=' + JSON.stringify(this.listobj)
|
||||
})
|
||||
}else if(num == 3){
|
||||
let vm = this
|
||||
|
@ -75,10 +87,10 @@
|
|||
content: '你确定要注销这个店铺吗?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
vm.$u.delete("/app/store/" + vm.storeId).then(res => {
|
||||
vm.$u.delete(`/agent/store/${vm.storeId}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
title: '注销成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
onLoad(option) {
|
||||
let obj = JSON.parse(option.obj)
|
||||
this.listobj = obj
|
||||
console.log(this.listobj);
|
||||
// console.log(this.listobj);
|
||||
this.shopname = this.listobj.name
|
||||
this.ksyy = this.listobj.businessTimeStart
|
||||
this.jsyy = this.listobj.businessTimeEnd
|
||||
|
@ -267,11 +267,11 @@
|
|||
type:this.selectorvalue,
|
||||
storeId:this.storeId
|
||||
}
|
||||
this.$u.put("/app/store",data).then(res => {
|
||||
this.$u.put("/agent/store",data).then(res => {
|
||||
if (res.code == 500) {
|
||||
uni.showToast({
|
||||
title: 'res.msg',
|
||||
icon: 'success',
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
}else{
|
||||
|
@ -282,7 +282,7 @@
|
|||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
delta: 2
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
|
@ -368,7 +368,7 @@
|
|||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
|
@ -398,7 +398,7 @@
|
|||
.baocun {
|
||||
width: 584rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(90deg, #8883F0 0%, #A29EFF 100%);
|
||||
background: linear-gradient(90deg, #25CE88 0%, #25CE88 100%);
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
|
|
14
pages.json
14
pages.json
|
@ -462,6 +462,20 @@
|
|||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "daili/yunweilist",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "daili/dianpu",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,26 +4,29 @@
|
|||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="top">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword"></u-search>
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="listitem" v-for="(item,index) in 10" :key="index">
|
||||
<view class="listitem" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="toptit">
|
||||
<u-icon name="calendar-fill" size="36"></u-icon>
|
||||
<view class="tit">
|
||||
星途自助台球棋 牌室
|
||||
<view class="tit">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<!-- <view class="bd">
|
||||
绑定设备
|
||||
</view> -->
|
||||
<view class="bd" @click="btnjif">
|
||||
<view class="bd" @click="btnjifei">
|
||||
计费规则
|
||||
</view>
|
||||
<view class="yuan" @click="btnxq">
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<view class="yuan" @click="btnxq(item)">
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rishou">
|
||||
|
@ -31,7 +34,11 @@
|
|||
<text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text>
|
||||
</view>
|
||||
<view class="rishouje">
|
||||
<text>6¥</text><text>48¥</text><text>0¥</text><text>2台</text><text>0台</text>
|
||||
<text>{{item.todayIncome}}¥</text>
|
||||
<text>{{item.monthIncome}}¥</text>
|
||||
<text>{{item.lastMonthIncome}}¥</text>
|
||||
<text>{{item.onlineCount}}台</text>
|
||||
<text>{{item.offlineCount}}台</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gzlist">
|
||||
|
@ -39,15 +46,15 @@
|
|||
<text>计费规则:</text>3.00元/小时,前5分钟免费,日封顶30.00元
|
||||
</view>
|
||||
<view class="phone">
|
||||
<text>联系电话:</text>12312345678
|
||||
<text>联系电话:</text>{{item.contactMobile}}
|
||||
</view>
|
||||
<view class="phones">
|
||||
<text>绑定人员:</text>星途自助台球棋牌室(21260)
|
||||
<text>联系人员:</text>{{item.contactName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="yunxing">
|
||||
<text>已运营68天</text> <text>2024-02-03 15:22:52</text>
|
||||
</view>
|
||||
<text>已运营{{item.daysDifference + 1}}天</text> <text>{{item.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -60,18 +67,82 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
agentId:'',
|
||||
keyword:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.agentId = uni.getStorageSync('userdata').agentId
|
||||
// this.getlist()
|
||||
},
|
||||
onShow() {
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
getlist() {
|
||||
this.$u.get("/agent/store/listChildren?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize +'&excludeAgents=' +this.agentId + '&keyword=' + this.keyword).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
|
||||
// 计算创建到现在运行了多少天
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime);
|
||||
if (isNaN(dateTime.getTime())) {
|
||||
console.error(`无法解析日期时间字符串: ${item.createTime}`);
|
||||
return;
|
||||
}
|
||||
var now = new Date().getTime();
|
||||
var differenceInMilliseconds = now - dateTime.getTime();
|
||||
var differenceInDays = Math.floor(differenceInMilliseconds / (1000 * 60 * 60 * 24));
|
||||
// 直接修改原数组中的对象,添加daysDifference属性
|
||||
item.daysDifference = differenceInDays;
|
||||
})
|
||||
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
searchs(){
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多订单记录了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
btnjif(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/jifei'
|
||||
})
|
||||
},
|
||||
btnxq(){
|
||||
btnxq(item){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shopdetail'
|
||||
url:'/page_user/shopdetail?storeId=' + item.storeId
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +174,7 @@
|
|||
padding: 12rpx 38rpx;
|
||||
box-sizing: border-box;
|
||||
width: 680rpx;
|
||||
height: 510rpx;
|
||||
height: 460rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||
margin: auto;
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
<view class="page">
|
||||
<u-navbar title="我的店铺" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
||||
height='38'></u-navbar>
|
||||
<view class="box">
|
||||
<view class="top">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="box">
|
||||
<view class="top">
|
||||
<u-search placeholder="搜索" input-align="center" v-model="keyword" @custom="searchs"></u-search>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="listitem" v-for="(item,index) in 10" :key="index">
|
||||
<view class="listitem" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
|
||||
<view class="toptit">
|
||||
<u-icon name="calendar-fill" size="36"></u-icon>
|
||||
<view class="tit">
|
||||
星途自助台球棋 牌室
|
||||
<view class="tit">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<!-- <view class="bd">
|
||||
绑定设备
|
||||
|
@ -20,10 +20,13 @@
|
|||
<view class="bd" @click="btnjifei">
|
||||
计费规则
|
||||
</view>
|
||||
<view class="yuan" @click="btnxq">
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<view class="yuan" @click="btnxq(item)">
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
<text
|
||||
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rishou">
|
||||
|
@ -31,7 +34,11 @@
|
|||
<text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text>
|
||||
</view>
|
||||
<view class="rishouje">
|
||||
<text>6¥</text><text>48¥</text><text>0¥</text><text>2台</text><text>0台</text>
|
||||
<text>{{item.todayIncome}}¥</text>
|
||||
<text>{{item.monthIncome}}¥</text>
|
||||
<text>{{item.lastMonthIncome}}¥</text>
|
||||
<text>{{item.onlineCount}}台</text>
|
||||
<text>{{item.offlineCount}}台</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gzlist">
|
||||
|
@ -39,20 +46,20 @@
|
|||
<text>计费规则:</text>3.00元/小时,前5分钟免费,日封顶30.00元
|
||||
</view>
|
||||
<view class="phone">
|
||||
<text>联系电话:</text>12312345678
|
||||
<text>联系电话:</text>{{item.contactMobile}}
|
||||
</view>
|
||||
<view class="phones">
|
||||
<text>绑定人员:</text>星途自助台球棋牌室(21260)
|
||||
<text>联系人员:</text>{{item.contactName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="yunxing">
|
||||
<text>已运营68天</text> <text>2024-02-03 15:22:52</text>
|
||||
</view>
|
||||
<text>已运营{{item.daysDifference + 1}}天</text> <text>{{item.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -60,20 +67,82 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
total: 0,
|
||||
agentId:'',
|
||||
keyword:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.agentId = uni.getStorageSync('userdata').agentId
|
||||
},
|
||||
onShow() {
|
||||
this.pagenum = 1
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
btnxq(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/shopdetail'
|
||||
})
|
||||
},
|
||||
btnjifei(){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/jifei'
|
||||
})
|
||||
}
|
||||
getlist() {
|
||||
this.$u.get("/agent/store/listChildren?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize +'&agentId=' +this.agentId + '&keyword=' + this.keyword).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if (res.rows.length > 0) {
|
||||
// 有数据,追加到列表
|
||||
this.wateringList = this.wateringList.concat(res.rows)
|
||||
this.pagenum++
|
||||
|
||||
// 计算创建到现在运行了多少天
|
||||
this.wateringList.forEach((item, index) => {
|
||||
var dateTime = new Date(item.createTime);
|
||||
if (isNaN(dateTime.getTime())) {
|
||||
console.error(`无法解析日期时间字符串: ${item.createTime}`);
|
||||
return;
|
||||
}
|
||||
var now = new Date().getTime();
|
||||
var differenceInMilliseconds = now - dateTime.getTime();
|
||||
var differenceInDays = Math.floor(differenceInMilliseconds / (1000 * 60 * 60 * 24));
|
||||
// 直接修改原数组中的对象,添加daysDifference属性
|
||||
item.daysDifference = differenceInDays;
|
||||
})
|
||||
|
||||
} else {
|
||||
// 没有更多数据
|
||||
this.noMoreData = true;
|
||||
}
|
||||
this.isLoading = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
searchs(){
|
||||
this.wateringList = []
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
let sum = this.total / this.pagesize
|
||||
if (this.pagenum-1 < sum) {
|
||||
this.getlist(); // 上拉加载更多
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有更多订单记录了',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
},
|
||||
btnxq(item) {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/shopdetail?storeId=' + item.storeId
|
||||
})
|
||||
},
|
||||
btnjifei() {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/jifei'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -88,91 +157,109 @@
|
|||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.box{
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
.list{
|
||||
|
||||
.list {
|
||||
overflow-y: scroll;
|
||||
height: 100vh;
|
||||
padding-bottom: 400rpx;
|
||||
margin-top: 26rpx;
|
||||
.listitem{
|
||||
|
||||
.listitem {
|
||||
margin-bottom: 28rpx !important;
|
||||
padding: 12rpx 38rpx;
|
||||
box-sizing: border-box;
|
||||
width: 680rpx;
|
||||
height: 510rpx;
|
||||
height: 460rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||
margin: auto;
|
||||
.yunxing{
|
||||
|
||||
.yunxing {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
.phones{
|
||||
|
||||
.phones {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #1DBE7B;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 26rpx;
|
||||
box-sizing: border-box;
|
||||
text{
|
||||
|
||||
text {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
.phone{
|
||||
|
||||
.phone {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
text{
|
||||
|
||||
text {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
.gzlist{
|
||||
|
||||
.gzlist {
|
||||
margin-top: 30rpx;
|
||||
.jfgz{
|
||||
|
||||
.jfgz {
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
text{
|
||||
|
||||
text {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
}
|
||||
.rishou{
|
||||
|
||||
.rishou {
|
||||
margin-top: 26rpx;
|
||||
padding: 0 28rpx;
|
||||
box-sizing: border-box;
|
||||
.rishouwz{
|
||||
|
||||
.rishouwz {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
.rishouje{
|
||||
|
||||
.rishouje {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
text{
|
||||
|
||||
text {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
.toptit{
|
||||
|
||||
.toptit {
|
||||
border-bottom: 1px solid #ccc;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 12rpx;
|
||||
box-sizing: border-box;
|
||||
.tit{
|
||||
|
||||
.tit {
|
||||
width: 350rpx;
|
||||
background: #DBFAED;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
|
@ -182,9 +269,10 @@
|
|||
padding: 10rpx 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bd{
|
||||
|
||||
.bd {
|
||||
margin-top: 18rpx;
|
||||
height:100%;
|
||||
height: 100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 4rpx 12rpx;
|
||||
|
@ -192,24 +280,28 @@
|
|||
background: #1DBE7B;
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
}
|
||||
.yuan{
|
||||
|
||||
.yuan {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.top{
|
||||
|
||||
.top {
|
||||
width: 750rpx;
|
||||
height: 136rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx 36rpx;
|
||||
box-sizing: border-box;
|
||||
/deep/ .u-content{
|
||||
|
||||
/deep/ .u-content {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 50rpx 0 0 50rpx !important;
|
||||
border-radius: 50rpx 0 0 50rpx !important;
|
||||
}
|
||||
/deep/ .u-action{
|
||||
border-radius: 0 50rpx 50rpx 0 !important;
|
||||
|
||||
/deep/ .u-action {
|
||||
border-radius: 0 50rpx 50rpx 0 !important;
|
||||
width: 112rpx;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
contactMobile: this.lxphone,
|
||||
type: this.selectorvalue
|
||||
}
|
||||
this.$u.post("/app/store", data).then(res => {
|
||||
this.$u.post("/agent/store", data).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '创建成功',
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
},
|
||||
onShow() {
|
||||
this.jmlogin()
|
||||
this.getuser()
|
||||
},
|
||||
methods: {
|
||||
scanQRCode() {
|
||||
|
@ -86,7 +87,16 @@
|
|||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
// 保存当前用户信息
|
||||
getuser() {
|
||||
this.$u.get('/app/user/userInfo').then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync('userdata', res.data)
|
||||
// console.log(uni.getStorageSync('userdata'));
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
btnindex(num) {
|
||||
if (num == 2) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user