This commit is contained in:
吴鹏 2024-05-17 18:10:58 +08:00
parent c21fc37b9c
commit fdcd063c12
14 changed files with 697 additions and 482 deletions

View File

@ -1,6 +1,6 @@
const install = (Vue, vm) => { const install = (Vue, vm) => {
Vue.prototype.$u.http.setConfig({ 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', // baseUrl: 'https://znb.ccttiot.com',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,

View File

@ -7,19 +7,19 @@
</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" disabled="false" placeholder="2级代理" /> <view class="" style="padding-top:12rpx">代理级别</view> <input type="text" v-model="level" disabled="false" placeholder="2级代理" />
</view> </view>
<view class="list_val"> <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>
<view class="list_val"> <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>
<view class="list_val"> <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>
<view class="list_val"> <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> <u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
</view> </view>
</view> </view>
@ -27,125 +27,22 @@
商户权限 商户权限
</view> </view>
<view class="swlist"> <view class="swlist">
<view class="swlist_val"> <view class="swlist_val" v-for="(item,index) in list" :key="index">
<view class="lt"> <view class="lt">
<view class="one"> <view class="one">
允许登录 {{item.name}}
</view> </view>
<view class="two"> <view class="two">
代理登录系统 {{item.tit}}
</view> </view>
</view> </view>
<view class="rt"> <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>
<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>
<view class="baocun"> <view class="baocun" @click="btncj">
保存 保存
</view> </view>
</view> </view>
@ -156,16 +53,130 @@
export default { export default {
data() { data() {
return { 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, show:false,
bgc: { bgc: {
backgroundColor: " #25CE88", backgroundColor: " #25CE88",
}, },
level:'',
name:'',
ratio:'',
tel:'',
sheng:'请选择省市区',
arr:[],
arrqx:[]
} }
}, },
methods: { methods: {
confirm(e){ 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
})
}
})
}
} }
} }
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <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> height='38'></u-navbar>
<view class="box"> <view class="box">
<view class="shuju"> <view class="shuju">
@ -18,13 +18,22 @@
0 0
</view> </view>
<view class="shu"> <view class="shu">
商家> 店铺>
</view> </view>
</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>
<view class="tulist"> <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/uXquYtM06wNT6ElZQTlo" mode="" @click="btnshop(2)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uMtNJoZxvsMjIhAMoWdL" mode="" @click="btnshop(3)"></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uMtNJoZxvsMjIhAMoWdL" mode="" @click="btnshop(3)"></image>
</view> </view>
@ -59,7 +68,11 @@
}) })
}else if(num == 5){ }else if(num == 5){
uni.navigateTo({ 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; padding: 54rpx 78rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: space-between; // justify-content: space-between;
image{ image{
width: 96rpx; width: 96rpx;
height: 98rpx; height: 98rpx;
margin-right: 100rpx;
} }
} }
.shuju { .shuju {
display: flex; display: flex;
// justify-content: space-between; justify-content: space-between;
padding: 40rpx 60rpx; padding: 40rpx 60rpx;
box-sizing: border-box; box-sizing: border-box;
width: 680rpx; width: 680rpx;

View File

@ -24,22 +24,7 @@
<u-picker v-model="show" mode="region" @confirm="confirm"></u-picker> <u-picker v-model="show" mode="region" @confirm="confirm"></u-picker>
</view> </view>
</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 class="baocun">
保存 保存
</view> </view>

View File

@ -5,16 +5,16 @@
<view class="box"> <view class="box">
<view class="nav"> <view class="nav">
<view class="top"> <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> </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="top">
<view class="lt"> <view class="lt">
<view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">星途自助台球棋牌室</view> <view class="" style="font-weight: 500;font-size: 24rpx;color: #3D3D3D;">{{item.name}}</view>
<view class="" style="font-size: 20rpx;color: #808080;">12312345678-商家</view> <view class="" style="font-size: 20rpx;color: #808080;">ID:{{item.agentId}} - {{item.level}}级代理</view>
</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> <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_val">
<view class="list_shop"> <view class="list_shop">
<view class="" style="font-size: 24rpx;color: #808080;">代理</view> <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>
<view class="list_shebei"> <view class="list_shebei">
<view class="" style="font-size: 24rpx;color: #808080;">店铺数</view> <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>
<!-- <view class="list_shebei"> <!-- <view class="list_shebei">
<view class="" style="font-size: 24rpx;color: #808080;">商户人数</view> <view class="" style="font-size: 24rpx;color: #808080;">商户人数</view>
@ -36,12 +36,12 @@
</view> --> </view> -->
<view class="list_shebei"> <view class="list_shebei">
<view class="" style="font-size: 24rpx;color: #808080;">设备统计</view> <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> </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="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> </view>
</view> </view>
@ -54,14 +54,61 @@
bgc: { bgc: {
backgroundColor: " #25CE88" backgroundColor: " #25CE88"
}, },
pagenum: 1,
wateringList: [],
pagesize: 10, //
isLoading: false, //
noMoreData: false, //
total: 0,
keyword:''
} }
}, },
onShow() {
this.pagenum = 1
this.wateringList = []
this.getlist()
},
methods: { methods: {
btnxq(){ btnxq(item){
uni.navigateTo({ 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> </script>
@ -78,6 +125,7 @@
height:100%; height:100%;
background: #F4F5F7; background: #F4F5F7;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
padding-bottom: 200rpx;
.list{ .list{
width: 680rpx; width: 680rpx;
height: 336rpx; height: 336rpx;

View File

@ -1,193 +1,33 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="权限操作" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar> <u-navbar title="权限操作" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
<view class="box"> height='38'></u-navbar>
<view class="box">
<view class="title"> <view class="title">
权限操作 权限操作
</view> </view>
<!-- 代理权限 --> <!-- 代理权限 -->
<view class="swlist"> <view class="swlist">
<view class="swlist_val"> <view class="swlist_val" v-for="(item,index) in list" :key="index">
<view class="lt"> <view class="lt">
<view class="one"> <view class="one">
允许登录 {{item.name}}
</view> </view>
<view class="two"> <view class="two">
代理登录系统 {{item.tit}}
</view> </view>
</view> </view>
<view class="rt"> <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"
</view> inactive-color="#eee"></u-switch>
</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>
</view> </view>
</view> </view>
</view> </view>
<view class="baocun">
<view class="baocun" @click="btncj">
保存 保存
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -195,20 +35,120 @@
export default { export default {
data() { data() {
return { return {
checked: false, list: [{
show: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
},
{
name: '订单管理',
tit: '是否允许查看订单',
checked: false
}
],
show: false,
bgc: { bgc: {
backgroundColor: " #25CE88", 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: { methods: {
confirm(e){ change(e) {
console.log(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 { .page {
width: 750rpx; width: 750rpx;
// position: fixed; // position: fixed;
// top: 0; // top: 0;
// left: 0; // left: 0;
.box{ .box {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;
overflow-y:scroll; overflow-y: scroll;
background: #F4F5F7; background: #F4F5F7;
border-radius: 0rpx 0rpx 0rpx 0rpx; 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;
.baocun{
width: 584rpx; .baocun {
width: 584rpx;
height: 90rpx; height: 90rpx;
margin: auto; margin: auto;
background: linear-gradient( 270deg, #54DAA1 0%, #19CD82 100%); background: linear-gradient(270deg, #54DAA1 0%, #19CD82 100%);
border-radius: 54rpx 54rpx 54rpx 54rpx; border-radius: 54rpx 54rpx 54rpx 54rpx;
margin-top: 62rpx; margin-top: 62rpx;
margin-bottom: 78rpx; margin-bottom: 78rpx;
@ -247,59 +189,68 @@
text-align: center; text-align: center;
line-height: 90rpx; line-height: 90rpx;
} }
.swlist{
.swlist {
margin-top: 34rpx; margin-top: 34rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.swlist_val{
.swlist_val {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 324rpx; width: 324rpx;
height: 144rpx; height: 144rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
padding-top: 28rpx; padding-top: 28rpx;
padding-left: 38rpx; padding-left: 38rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 18rpx; margin-top: 18rpx;
} }
.lt{
.one{ .lt {
.one {
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.two{
.two {
font-size: 24rpx; font-size: 24rpx;
color: #808080; color: #808080;
margin-top: 12rpx; margin-top: 12rpx;
} }
} }
.rt{
.rt {
margin-top: 24rpx; margin-top: 24rpx;
padding-right: 12rpx; padding-right: 12rpx;
} }
} }
.title{
.title {
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.list{
width: 680rpx; .list {
height: 578rpx; width: 680rpx;
background: #FFFFFF; height: 578rpx;
border-radius: 24rpx 24rpx 24rpx 24rpx; background: #FFFFFF;
padding: 46rpx 36rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
box-sizing: border-box; padding: 46rpx 36rpx;
margin-top: 34rpx; box-sizing: border-box;
margin-bottom: 47rpx; margin-top: 34rpx;
.list_val{ margin-bottom: 47rpx;
.list_val {
display: flex; display: flex;
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
justify-content: space-between; justify-content: space-between;
margin-bottom: 32rpx; margin-bottom: 32rpx;
input{
input {
width: 430rpx; width: 430rpx;
height: 70rpx; height: 70rpx;
background: #F0F0F0; background: #F0F0F0;

View File

@ -4,26 +4,26 @@
height='38'></u-navbar> height='38'></u-navbar>
<view class="box"> <view class="box">
<view class="shopname"> <view class="shopname">
瑞斯特酒店龙安店--商家 {{listobj.name}}
</view> </view>
<view class="shoplist"> <view class="shoplist">
<view class="tit"> <view class="tit">
基本信息 基本信息
</view> </view>
<view class="jiben"> <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>
<view class="jiben"> <view class="jiben">
<text class="qian">分成比例</text> <text class="shen">90%</text> <text class="qian">分成比例</text> <text class="shen">{{listobj.point}}%</text>
</view> </view>
<view class="jiben"> <view class="jiben">
<text class="qian">手机号码</text> <text class="shen">12312345678</text> <text class="qian">手机号码</text> <text class="shen">{{listobj.mobile}}</text>
</view> </view>
<view class="jiben"> <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>
<view class="jiben"> <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> </view>
<view class="icons"> <view class="icons">
@ -44,44 +44,51 @@
show: false, show: false,
storeId:'', storeId:'',
listobj:{}, listobj:{},
flag:false flag:false,
agentId:''
} }
}, },
onLoad(option) { onLoad(option) {
if(option.flag){ this.agentId = option.agentId
this.flag = option.flag this.getxq()
}
}, },
methods: { methods: {
getxq(){
this.$u.get(`/agent/agent/${this.agentId}`).then(res => {
if (res.code == 200) {
this.listobj = res.data
}
})
},
btnpag(num){ btnpag(num){
if(num == 1){ if(num == 1){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/listshu/quanxian' url:'/page_user/listshu/quanxian?obj=' + JSON.stringify(this.listobj)
}) })
}else if(num == 2){ }else if(num == 2){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/listshu/edit' url:'/page_user/listshu/edit?obj=' + this.listobj
}) })
}else if(num == 3){ }else if(num == 3){
let vm = this let vm = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '你确定要注销这个店铺吗?', content: '你确定要注销这个代理吗?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
// vm.$u.delete("/app/store/" + vm.storeId).then(res => { vm.$u.delete(`/agent/agent/${vm.agentId}`).then(res => {
// if (res.code == 200) { if (res.code == 200) {
// uni.showToast({ uni.showToast({
// title: '', title: '注销成功',
// icon: 'success', icon: 'success',
// duration: 1000 duration: 1000
// }) })
// setTimeout(()=>{ setTimeout(()=>{
// uni.navigateBack() uni.navigateBack()
// },1500) },1500)
// } }
// }) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击了取消'); console.log('用户点击了取消');
} }

View File

@ -11,7 +11,7 @@
基本信息 基本信息
</view> </view>
<view class="jiben"> <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>
<view class="jiben"> <view class="jiben">
<text class="qian">营业时间</text> <text class="shen">{{listobj.businessTimeStart}}~{{listobj.businessTimeEnd}}</text> <text class="qian">营业时间</text> <text class="shen">{{listobj.businessTimeStart}}~{{listobj.businessTimeEnd}}</text>
@ -24,11 +24,11 @@
</view> </view>
</view> </view>
<view class="icons"> <view class="icons">
<image 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/uZEG6wcsyjAlik8iKnBZ" mode="" @click="btnpag(1)"></image>
<image 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/u3GbElGkYzgolFDVMcRF" mode="" @click="btnpag(2)"></image>
<image 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/umSzDeyl29aEeJDXY3lT" mode="" @click="btnpag(3)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u54XmWWxo1l0yY1mZtcG" mode="" @click="btnpag(4)"></image> <image v-if="flag" 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="flags" src="https://api.ccttiot.com/smartmeter/img/static/urIxP74GyW2Puz4uqfN9" style="width: 54rpx;" mode="" @click="btnpag(5)"></image>
</view> </view>
</view> </view>
@ -41,17 +41,29 @@
return { return {
show: false, show: false,
storeId:'', storeId:'',
listobj:{} listobj:{},
flag:false,
flags:false
} }
}, },
onLoad(option) { onLoad(option) {
console.log(option); this.storeId = option.storeId
this.storeId = option.id let userdata = uni.getStorageSync('userdata').permissions
// this.getdetail() 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: { methods: {
getdetail(){ getdetail(){
this.$u.get("/app/store/mch/" + this.storeId).then(res => { this.$u.get(`/agent/store/${this.storeId}`).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.listobj = res.data this.listobj = res.data
} }
@ -66,7 +78,7 @@
}) })
}else if(num == 2){ }else if(num == 2){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/shopedit' url:'/page_user/shopedit?obj=' + JSON.stringify(this.listobj)
}) })
}else if(num == 3){ }else if(num == 3){
let vm = this let vm = this
@ -75,10 +87,10 @@
content: '你确定要注销这个店铺吗?', content: '你确定要注销这个店铺吗?',
success: function (res) { success: function (res) {
if (res.confirm) { 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) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '删除成功', title: '注销成功',
icon: 'success', icon: 'success',
duration: 1000 duration: 1000
}) })

View File

@ -140,7 +140,7 @@
onLoad(option) { onLoad(option) {
let obj = JSON.parse(option.obj) let obj = JSON.parse(option.obj)
this.listobj = obj this.listobj = obj
console.log(this.listobj); // console.log(this.listobj);
this.shopname = this.listobj.name this.shopname = this.listobj.name
this.ksyy = this.listobj.businessTimeStart this.ksyy = this.listobj.businessTimeStart
this.jsyy = this.listobj.businessTimeEnd this.jsyy = this.listobj.businessTimeEnd
@ -267,11 +267,11 @@
type:this.selectorvalue, type:this.selectorvalue,
storeId:this.storeId storeId:this.storeId
} }
this.$u.put("/app/store",data).then(res => { this.$u.put("/agent/store",data).then(res => {
if (res.code == 500) { if (res.code == 500) {
uni.showToast({ uni.showToast({
title: 'res.msg', title: res.msg,
icon: 'success', icon: 'none',
duration: 1000 duration: 1000
}) })
}else{ }else{
@ -282,7 +282,7 @@
}) })
setTimeout(()=>{ setTimeout(()=>{
uni.navigateBack({ uni.navigateBack({
delta: 2 delta: 2
}) })
},1000) },1000)
} }
@ -368,7 +368,7 @@
<style lang="scss"> <style lang="scss">
page { 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 { .page {
@ -398,7 +398,7 @@
.baocun { .baocun {
width: 584rpx; width: 584rpx;
height: 90rpx; height: 90rpx;
background: linear-gradient(90deg, #8883F0 0%, #A29EFF 100%); background: linear-gradient(90deg, #25CE88 0%, #25CE88 100%);
border-radius: 54rpx 54rpx 54rpx 54rpx; border-radius: 54rpx 54rpx 54rpx 54rpx;
margin: auto; margin: auto;
text-align: center; text-align: center;

View File

@ -462,6 +462,20 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path": "daili/yunweilist",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "daili/dianpu",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }

View File

@ -4,26 +4,29 @@
height='38'></u-navbar> height='38'></u-navbar>
<view class="box"> <view class="box">
<view class="top"> <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"> <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"> <view class="toptit">
<u-icon name="calendar-fill" size="36"></u-icon> <u-icon name="calendar-fill" size="36"></u-icon>
<view class="tit"> <view class="tit">
星途自助台球棋 牌室 {{item.name}}
</view> </view>
<!-- <view class="bd"> <!-- <view class="bd">
绑定设备 绑定设备
</view> --> </view> -->
<view class="bd" @click="btnjif"> <view class="bd" @click="btnjifei">
计费规则 计费规则
</view> </view>
<view class="yuan" @click="btnxq"> <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
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></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>
<text
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
</view> </view>
</view> </view>
<view class="rishou"> <view class="rishou">
@ -31,7 +34,11 @@
<text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text> <text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text>
</view> </view>
<view class="rishouje"> <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> </view>
<view class="gzlist"> <view class="gzlist">
@ -39,15 +46,15 @@
<text>计费规则</text>3.00/小时前5分钟免费日封顶30.00 <text>计费规则</text>3.00/小时前5分钟免费日封顶30.00
</view> </view>
<view class="phone"> <view class="phone">
<text>联系电话</text>12312345678 <text>联系电话</text>{{item.contactMobile}}
</view> </view>
<view class="phones"> <view class="phones">
<text>绑定人员</text>星途自助台球棋牌室21260 <text>联系人员</text>{{item.contactName}}
</view> </view>
</view> </view>
<view class="yunxing"> <view class="yunxing">
<text>已运营68天</text> <text>2024-02-03 15:22:52</text> <text>已运营{{item.daysDifference + 1}}</text> <text>{{item.createTime}}</text>
</view> </view>
</view> </view>
@ -60,18 +67,82 @@
export default { export default {
data() { data() {
return { 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: { 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(){ btnjif(){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/jifei' url:'/page_user/jifei'
}) })
}, },
btnxq(){ btnxq(item){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/shopdetail' url:'/page_user/shopdetail?storeId=' + item.storeId
}) })
} }
} }
@ -103,7 +174,7 @@
padding: 12rpx 38rpx; padding: 12rpx 38rpx;
box-sizing: border-box; box-sizing: border-box;
width: 680rpx; width: 680rpx;
height: 510rpx; height: 460rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 38rpx 38rpx 38rpx 38rpx; border-radius: 38rpx 38rpx 38rpx 38rpx;
margin: auto; margin: auto;

View File

@ -2,17 +2,17 @@
<view class="page"> <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> height='38'></u-navbar>
<view class="box"> <view class="box">
<view class="top"> <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"> <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"> <view class="toptit">
<u-icon name="calendar-fill" size="36"></u-icon> <u-icon name="calendar-fill" size="36"></u-icon>
<view class="tit"> <view class="tit">
星途自助台球棋 牌室 {{item.name}}
</view> </view>
<!-- <view class="bd"> <!-- <view class="bd">
绑定设备 绑定设备
@ -20,10 +20,13 @@
<view class="bd" @click="btnjifei"> <view class="bd" @click="btnjifei">
计费规则 计费规则
</view> </view>
<view class="yuan" @click="btnxq"> <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
<text style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></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>
<text
style="width: 9rpx;height: 9rpx;border-radius: 50%;margin-right: 5rpx;background-color: #000;display: inline-block;"></text>
</view> </view>
</view> </view>
<view class="rishou"> <view class="rishou">
@ -31,7 +34,11 @@
<text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text> <text>日收</text><text>月收</text><text>上月收</text><text>在线</text><text>离线</text>
</view> </view>
<view class="rishouje"> <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> </view>
<view class="gzlist"> <view class="gzlist">
@ -39,20 +46,20 @@
<text>计费规则</text>3.00/小时前5分钟免费日封顶30.00 <text>计费规则</text>3.00/小时前5分钟免费日封顶30.00
</view> </view>
<view class="phone"> <view class="phone">
<text>联系电话</text>12312345678 <text>联系电话</text>{{item.contactMobile}}
</view> </view>
<view class="phones"> <view class="phones">
<text>绑定人员</text>星途自助台球棋牌室21260 <text>联系人员</text>{{item.contactName}}
</view> </view>
</view> </view>
<view class="yunxing"> <view class="yunxing">
<text>已运营68天</text> <text>2024-02-03 15:22:52</text> <text>已运营{{item.daysDifference + 1}}</text> <text>{{item.createTime}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -60,20 +67,82 @@
export default { export default {
data() { data() {
return { 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: { methods: {
btnxq(){ getlist() {
uni.navigateTo({ this.$u.get("/agent/store/listChildren?pageNum=" + this.pagenum + '&pageSize=' + this.pagesize +'&agentId=' +this.agentId + '&keyword=' + this.keyword).then(res => {
url:'/page_user/shopdetail' if (res.code == 200) {
}) this.total = res.total
}, if (res.rows.length > 0) {
btnjifei(){ //
uni.navigateTo({ this.wateringList = this.wateringList.concat(res.rows)
url:'/page_user/jifei' 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> </script>
@ -88,91 +157,109 @@
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
.box{
.box {
width: 750rpx; width: 750rpx;
height: 1440rpx; height: 1440rpx;
background: #F4F5F7; background: #F4F5F7;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
.list{
.list {
overflow-y: scroll; overflow-y: scroll;
height: 100vh; height: 100vh;
padding-bottom: 400rpx; padding-bottom: 400rpx;
margin-top: 26rpx; margin-top: 26rpx;
.listitem{
.listitem {
margin-bottom: 28rpx !important; margin-bottom: 28rpx !important;
padding: 12rpx 38rpx; padding: 12rpx 38rpx;
box-sizing: border-box; box-sizing: border-box;
width: 680rpx; width: 680rpx;
height: 510rpx; height: 460rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 38rpx 38rpx 38rpx 38rpx; border-radius: 38rpx 38rpx 38rpx 38rpx;
margin: auto; margin: auto;
.yunxing{
.yunxing {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 24rpx; font-size: 24rpx;
color: #808080; color: #808080;
margin-top: 26rpx; margin-top: 26rpx;
} }
.phones{
.phones {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #1DBE7B; color: #1DBE7B;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
padding-bottom: 26rpx; padding-bottom: 26rpx;
box-sizing: border-box; box-sizing: border-box;
text{
text {
color: #808080; color: #808080;
} }
} }
.phone{
.phone {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
text{
text {
color: #808080; color: #808080;
} }
} }
.gzlist{
.gzlist {
margin-top: 30rpx; margin-top: 30rpx;
.jfgz{
.jfgz {
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
text{
text {
color: #808080; color: #808080;
} }
} }
} }
.rishou{
.rishou {
margin-top: 26rpx; margin-top: 26rpx;
padding: 0 28rpx; padding: 0 28rpx;
box-sizing: border-box; box-sizing: border-box;
.rishouwz{
.rishouwz {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
text{
text {
font-size: 24rpx; font-size: 24rpx;
color: #808080; color: #808080;
} }
} }
.rishouje{
.rishouje {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 10rpx; margin-top: 10rpx;
text{
text {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
} }
} }
.toptit{
.toptit {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-bottom: 12rpx; padding-bottom: 12rpx;
box-sizing: border-box; box-sizing: border-box;
.tit{
.tit {
width: 350rpx; width: 350rpx;
background: #DBFAED; background: #DBFAED;
border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
@ -182,9 +269,10 @@
padding: 10rpx 12rpx; padding: 10rpx 12rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.bd{
.bd {
margin-top: 18rpx; margin-top: 18rpx;
height:100%; height: 100%;
font-size: 20rpx; font-size: 20rpx;
color: #FFFFFF; color: #FFFFFF;
padding: 4rpx 12rpx; padding: 4rpx 12rpx;
@ -192,24 +280,28 @@
background: #1DBE7B; background: #1DBE7B;
border-radius: 6rpx 6rpx 6rpx 6rpx; border-radius: 6rpx 6rpx 6rpx 6rpx;
} }
.yuan{
.yuan {
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
} }
} }
.top{
.top {
width: 750rpx; width: 750rpx;
height: 136rpx; height: 136rpx;
background: #FFFFFF; background: #FFFFFF;
padding: 32rpx 36rpx; padding: 32rpx 36rpx;
box-sizing: border-box; box-sizing: border-box;
/deep/ .u-content{
/deep/ .u-content {
border: 1px solid #ccc; 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; width: 112rpx;
height: 65rpx; height: 65rpx;
line-height: 65rpx; line-height: 65rpx;

View File

@ -241,7 +241,7 @@
contactMobile: this.lxphone, contactMobile: this.lxphone,
type: this.selectorvalue type: this.selectorvalue
} }
this.$u.post("/app/store", data).then(res => { this.$u.post("/agent/store", data).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '创建成功', title: '创建成功',

View File

@ -65,6 +65,7 @@
}, },
onShow() { onShow() {
this.jmlogin() this.jmlogin()
this.getuser()
}, },
methods: { methods: {
scanQRCode() { 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) { btnindex(num) {
if (num == 2) { if (num == 2) {