Browse Source

更新

master
luyisha 3 years ago
parent
commit
523f9f0909
  1. 63
      pages/about/bonusSet/bonusList.vue
  2. 55
      pages/about/bonusSet/bonusSet.vue
  3. 38
      pages/about/bonusSet/index.vue
  4. 66
      pages/about/serviceSet/serviceSet.vue
  5. 114
      pages/home/home.vue
  6. 46
      pages/list/agent.vue
  7. 13
      pages/list/user.vue
  8. 63
      pages/recordsList/recordsList.vue
  9. 12
      pages/ucenter/ucenter.vue

63
pages/about/bonusSet/bonusList.vue

@ -2,30 +2,63 @@
<view>
<view class="nav_area"></view>
<view class="setPage">
<view class="switch_item" v-for="(item, index) in datasList" @click="toSet">
<view class="icon_new"><image src="" mode=""></image></view>
<view class="switch_item" v-for="(item, index) in datasList" @click="toSet(item.id)">
<view class="icon_new"><image :src="item.cover_image" mode=""></image></view>
<view style="flex:1;">
<view class=""><text>面值</text>{{amount}}</view>
<view style="font-size: 12px;"><text>最高中奖金额</text>20</view>
<view class=""><text>面值</text>{{item.price}}</view>
<view style="font-size: 12px;"><text>最高中奖金额</text>{{item.max_awards_amount}}</view>
</view>
<switch checked="true" @change="" color="#00E266" @click.stop="" />
<switch :checked="item.status" @change="clickSwitch($event, index)" color="#00E266" @click.stop="" />
</view>
</view>
</view>
</template>
<script>
import API from '@/common/js/api.js'
export default {
data() {
return {
datasList: [1,2,3],
amount: '',
id: '',
datasList: [
{price: '20',status: true,max_awards_amount: '20万'},
{price: '20',status: true,max_awards_amount: '20万'},
{price: '20',status: true,max_awards_amount: '20万'}
],
noMore: false,
page: 1,
}
},
methods: {
toSet(){
toSet(id){
uni.navigateTo({
url: '/pages/about/bonusSet/bonusSet'
url: '/pages/about/bonusSet/bonusSet?id='+id
})
},
getList(){
API.request('/adminZoneManage/zoneGoodsList', {zone_id: this.id}, res=>{
if(res.data.length<10){
this.noMore = true;
}
if(this.page>1){
this.datasList = this.datasList.concat(res.data);
}else{
this.datasList = res.data;
}
})
},
clickSwitch(e, i){
// console.log(e.detail.value,i);
this.datasList[i].status = e.detail.value?'1':'0';
API.request('/adminZoneManage/zoneGoodsChangeStatus', {
zone_goods_id: this.datasList[i].id,
status: this.datasList[i].status,
}, res=>{
uni.showToast({
title: res.msg
})
})
}
},
@ -34,6 +67,18 @@
title: e.title
})
this.amount = e.title.split('专区')[0];
this.id = e.id;
this.getList();
},
onReachBottom() {
if(!this.noMore){
this.page++;
this.getList();
}else{
uni.showToast({
title: '没有更多了'
})
}
}
}
</script>

55
pages/about/bonusSet/bonusSet.vue

@ -3,10 +3,10 @@
<view class="nav_area"></view>
<view class="setPage">
<view v-for="(item,index) in setList" :key="index" class="set_item">
<view class="icon_new"><image src="" mode=""></image></view>
<view class="icon_new"><image :src="item.image" mode=""></image></view>
<view style="flex:1;" class="flex-col">
<view class=""><text>中奖金额</text>{{item.zj}}</view>
<view class=""><text>中奖率</text>{{item.gl}}%</view>
<view class=""><text>中奖金额</text>{{item.amount_str}}</view>
<view class=""><text>中奖率</text>{{item.probability}}%</view>
</view>
<view style="" class="flex-col">
<view class="blue" @click="edit(item,index)">编辑</view>
@ -21,14 +21,14 @@
<view class="input_box">
<view class="">奖金金额:</view>
<view class="input_box2">
<input type="text" placeholder="请输入奖金金额" placeholder-style="color: #999;">
<input type="text" v-model="editInfo.amount" placeholder="请输入奖金金额" placeholder-style="color: #999;">
<text></text>
</view>
</view>
<view class="input_box">
<view class="">中奖率:</view>
<view class="input_box2">
<input type="text" placeholder="请输入中奖概率" placeholder-style="color: #999;">
<input type="text" v-model="editInfo.probability" placeholder="请输入中奖概率" placeholder-style="color: #999;">
<text>%</text>
</view>
</view>
@ -43,14 +43,15 @@
</template>
<script>
import API from '@/common/js/api.js'
export default {
data() {
return {
setList: [
{zj:'5',gl:'80'},
{zj:'0',gl:'80'},
{zj:'10',gl:'60'},
{zj:'20000',gl:'0.001'}
{amount:'50000',amount_str:'5万元',probability:'80'},
{amount:'50000',amount_str:'0万元',probability:'80'},
{amount:'50000',amount_str:'10万元',probability:'60'},
{amount:'50000',amount_str:'20000万元',probability:'0.001'}
],
showEdit: false,
@ -64,14 +65,20 @@
edit(val, i){
this.title = "编辑";
this.showEdit = true;
this.editInfo = item;
this.editInfo = val;
},
remove(val, i){
let _this = this;
uni.showModal({
title:'温馨提示',
content:"确定是否该奖金信息",
content:"确定是否删除该奖金信息",
success() {
API.request('/adminZoneManage/goodsParamDel', {z_g_p_id: val.id}, res=>{
uni.showToast({
title: res.msg
})
_this.setList.splice(i, 1);
})
}
})
},
@ -80,9 +87,33 @@
this.editInfo = {};
},
confirm(){
let data = {
zone_goods_id: this.id,
amount: this.editInfo.amount,
probability: this.editInfo.probability
};
if(this.title = '编辑'){
data.z_g_p_id = this.editInfo.id;
}
API.request('/adminZoneManage/goodsParamSave', data, res=>{
uni.showToast({
title: res.msg
})
this.showEdit = false;
this.editInfo = {};
})
},
getList(){
API.request('/adminZoneManage/goodsParamList', {zone_goods_id:this.id}, res=>{
this.setList = res.data;
})
}
},
onLoad(e) {
this.id = e.id;
this.getList();
},
onNavigationBarButtonTap() {
this.title = "添加奖金";
this.showEdit = true;

38
pages/about/bonusSet/index.vue

@ -2,9 +2,9 @@
<view>
<view class="nav_area"></view>
<view class="setPage">
<uni-list class="center-list" v-for="(listitem,index) in bonusList" :key="index">
<uni-list-item v-for="(item,i) in listitem" :title="item.title" link :rightText="item.rightText" :key="i"
:clickable="true" :to="'/pages/about/bonusSet/bonusList?title='+item.title" @click="bonusListClick(item)" :show-extra-icon="true"
<uni-list class="center-list">
<uni-list-item v-for="(item,i) in bonusList" :title="item.title" link :rightText="item.rightText" :key="i"
:clickable="true" :to="'/pages/about/bonusSet/bonusList?title='+item.title+'&id='+item.id" @click="bonusListClick(item)" :show-extra-icon="true"
:extraIcon="{type:'compose',color:'#999'}">
<template v-slot:footer>
<view class="icon_new">
@ -22,11 +22,11 @@
</template>
<script>
import API from '@/common/js/api.js'
export default {
data() {
return {
bonusList: [
[
{
"title": '3元专区'
},
@ -36,8 +36,9 @@
{
"title": '10元专区'
}
]
]
],
noMore: false,
page: 1,
}
},
methods: {
@ -46,6 +47,31 @@
this[item.event]();
}
},
getList(){
API.request('/zone/zoneList', {}, res=>{
if(res.data.length<10){
this.noMore = true;
}
if(this.page>1){
this.bonusList = this.bonusList.concat(res.data);
}else{
this.bonusList = res.data;
}
})
}
},
onLoad(e) {
this.getList();
},
onReachBottom() {
if(!this.noMore){
this.page++;
this.getList();
}else{
uni.showToast({
title: '没有更多了'
})
}
}
}
</script>

66
pages/about/serviceSet/serviceSet.vue

@ -8,11 +8,11 @@
<view class="icon_new"></view>
<view class="">
客服名
<text>钱多多</text>
<text>{{item.name}}</text>
</view>
<view class="">
微信号码
<text>18655554444</text>
<text>{{item.wx_number}}</text>
</view>
</view>
<view class="item_bottom">
@ -27,11 +27,11 @@
<view class="content">
<view class="input_box">
<view class="">客服名称:</view>
<input type="text" placeholder="请输入客服名称" placeholder-style="color: #999;">
<input type="text" v-model="editInfo.name" placeholder="请输入客服名称" placeholder-style="color: #999;">
</view>
<view class="input_box">
<view class="">微信号码:</view>
<input type="text" placeholder="请输入微信号码" placeholder-style="color: #999;">
<input type="text" v-model="editInfo.wx_number" placeholder="请输入微信号码" placeholder-style="color: #999;">
</view>
</view>
<view class="btngroup">
@ -45,31 +45,43 @@
</template>
<script>
import API from '@/common/js/api.js'
export default {
data() {
return {
dataList: [
{name:'11'}
{name:'11'},
{name:'22'}
],
showEdit: false,
title: "添加客服",
editInfo: {
}
},
noMore: false,
page: 1,
}
},
methods: {
edit(val, i){
this.title = "编辑客服信息";
this.showEdit = true;
this.editInfo = item;
this.editInfo = val;
},
remove(val, i){
let _this = this;
uni.showModal({
title:'温馨提示',
content:"确定是否删除该客服信息",
success() {
API.request('/customerService/delete', {
id: val.id
}, res=>{
uni.showToast({
title: res.msg
})
_this.dataList.splice(i, 1);
})
}
})
},
@ -78,12 +90,47 @@
this.editInfo = {};
},
confirm(){
API.request('/customerService/save', {
name: this.editInfo.name, wx_number: this.editInfo.wx_number, id: this.editInfo.id
}, res=>{
uni.showToast({
title: res.msg
})
this.showEdit = false;
this.editInfo = {};
})
},
getList(){
API.request('/customerService/list', {
page: this.page, limit: 10
}, res=>{
if(res.data.list.length<10){
this.noMore = true;
}
if(this.page>1){
this.dataList = this.dataList.concat(res.data.list);
}else{
this.dataList = res.data.list;
}
})
}
},
onLoad() {
this.getList();
},
onNavigationBarButtonTap(e){
this.title = "添加客服";
this.showEdit = true;
},
onReachBottom() {
if(!this.noMore){
this.page++;
this.getList();
}else{
uni.showToast({
title: '没有更多了'
})
}
}
}
</script>
@ -114,6 +161,7 @@
border-radius: 10px;
font-size: 14px;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.11);
margin-bottom: 20px;
.item_top{
height: 50%;

114
pages/home/home.vue

@ -45,11 +45,11 @@
<view class="home_2" v-if="userType=='background'">
<view class="">
<view class="title">
待办<text style="color: #999;font-size: 12px;">更新于2023/08/30 19:00</text>
待办<text style="color: #999;font-size: 12px;">更新于{{needInfo.update_time}}</text>
</view>
<view class="card">
<view class="">待下分额度</view>
<view class="t2">10000.00</view>
<view class="">{{needInfo.down_scores_quota.title}}</view>
<view class="t2">{{needInfo.down_scores_quota.quota}}</view>
</view>
</view>
<view class="">
@ -64,16 +64,16 @@
<view class="right1">
<view class="">
<view class="label" style="font-size: 12px;">代理人数</view>
<view class="" style="font-weight: bold;padding-left: 20px;">1200</view>
<view class="" style="font-weight: bold;padding-left: 20px;">{{userStatistics.agent.num}}</view>
</view>
<view class="" style="font-weight: bold;">20%</view>
<view class="" style="font-weight: bold;">{{userStatistics.agent.rate}}</view>
</view>
<view class="right1">
<view class="">
<view class="label" style="font-size: 12px;">用户人数</view>
<view class="" style="font-weight: bold;padding-left: 20px;">120000</view>
<view class="" style="font-weight: bold;padding-left: 20px;">{{userStatistics.user.num}}</view>
</view>
<view class="" style="font-weight: bold;">80%</view>
<view class="" style="font-weight: bold;">{{userStatistics.user.rate}}</view>
</view>
</view>
</view>
@ -83,13 +83,13 @@
上下分数据
</view>
<view class="chart_tab">
<view class="item" @click="changeChartIndex(0)" :class="chartIndex==0?'active':''">上分统计</view>
<view class="item" @click="changeChartIndex(1)" :class="chartIndex==1?'active':''">下分数据</view>
<view class="item" @click="changeChartIndex(1)" :class="chartIndex==1?'active':''">上分统计</view>
<view class="item" @click="changeChartIndex(2)" :class="chartIndex==2?'active':''">下分数据</view>
</view>
<view class="chart_area">
<view class="chart">
<view class="" style="color: #999;font-size: 14px;">
{{ chartIndex==0?'上分总数':'下分总数' }}<text style="color: #101010;">{{ chartIndex==0?'1200':'12000' }}</text>
{{ chartIndex==1?'上分总数':'下分总数' }}<text style="color: #101010;">{{ UpDownSta.sum_value }}</text>
</view>
<view class="" id="mychart" style="width: 670rpx;height: 250px;"></view>
</view>
@ -110,13 +110,43 @@
bannerList: [],
goodsList: [],
recordsList: [1,2,3,4,5,6],
chartIndex: 0,
chartIndex: 1,//12
myChart: null,
pieChart: null,
innerAudioContext: null,
isPlay: false,
nomore: false,
page: 1
page: 1,
needInfo: {
update_time: '2023/08/30 19:00',
down_scores_quota: {
title: '待下分额度',
quota: '10010.00'
}
},
userStatistics: {
agent: {
num: '7',
rate: '36.84%'
},
user: {
num: '12',
rate: '63.16%'
},
sum: {
num: "19人" //
}
},
UpDownSta: {
"histogram": [
{"date": "09", //
"value": "20.00" //
},
], //
"sum_value": "20.00" ,//,
xData: ['1月', '2月', '3月', '4月', '5月'],
data: [155, 250, 360, 100, 180, 204]
}
}
},
computed: {
@ -130,9 +160,16 @@
},
created() {
this.userType = uni.getStorageSync('userType');
this.getRotationChart();
this.getZoneList();
if(this.userType=='user'){
this.getZoneList();
this.getRotationChart();
}
if(this.userType=='background'){
this.getNeedSta();
this.getUserSta();
this.getUpDownSta();
}
},
mounted() {
if(this.userType=='user'){
@ -180,12 +217,16 @@
},
changeChartIndex(type){
this.chartIndex = type;
this.myChart.clear();
this.renderChart();
this.getUpDownSta(type);
setTimeout(()=>{
this.myChart.clear();
this.renderChart();
}, 200)
},
renderChart(){
let yMax = 450;
let yMax = ([...this.UpDownSta.data].sort())[this.UpDownSta.data.length-1];
let interval = yMax / 5;
// yMax = interval*6;
let option = {
color: ['#5087EC','#74C0C8'],
// title: {
@ -202,7 +243,7 @@
},
tooltip: {},
xAxis: {
data: ['1月', '2月', '3月', '4月', '5月'],
data: this.UpDownSta.xData,
},
yAxis: [{
@ -220,12 +261,13 @@
name: '',
type: 'bar',
barMaxWidth: 30,
data: [155, 250, 360, 100, 180, 204]
data: this.UpDownSta.data
},
{
name: '',
type: 'line',
data: [175, 180, 410, 208, 195, 330],
// data: [175, 180, 410, 208, 195, 330],
data: this.UpDownSta.data,
yAxisIndex: 1
}
]
@ -262,8 +304,8 @@
show: false
},
data: [
{ value: 1200, name: 'Search Engine' },
{ value: 12000, name: 'Direct' }
{ value: this.userStatistics.agent.num, name: 'Search Engine' },
{ value: this.userStatistics.user.num, name: 'Direct' }
]
}
]
@ -306,7 +348,33 @@
this.nomore = true;
}
})
},
},
/*总后台待办*/
getNeedSta(){
API.request('/adminStatistics/needStatistics', {}, res=>{
this.needInfo = res.data;
})
},
/*总后台用户统计*/
getUserSta(){
API.request('/adminStatistics/userStatistics', {}, res=>{
this.userStatistics = res.data;
})
},
/*总后台上下分统计数据*/
getUpDownSta(type=1){
API.request('/adminStatistics/upAndDownStatistics', {type: type}, res=>{
this.UpDownSta = res.data;
this.UpDownSta.xData = this.UpDownSta.histogram.map(item=>{
return item.date;
})
this.UpDownSta.data = this.UpDownSta.histogram.map(item=>{
return item.value;
})
})
}
},
onReachBottom() {
if(!this.nomore){

46
pages/list/agent.vue

@ -39,11 +39,12 @@
<view class="content">
<view class="input_box" v-if="editType=='edit'">
<view class="">ID:</view>
<input type="text" disabled v-model="editInfo.id">
<input type="text" disabled v-model="editInfo.id" class="disabled">
</view>
<view class="input_box">
<view class="">电话:</view>
<input type="text" placeholder="电话为登陆账号" v-model="editInfo.phone" :disabled="editType=='edit'">
<input type="text" placeholder="电话为登陆账号" v-model="editInfo.phone"
:disabled="editType=='edit'" :class="editType=='edit'?'disabled':''">
</view>
<view class="input_box">
<view class="">密码:</view>
@ -117,7 +118,7 @@
API.request('/adminTeam/agentList', {
limit: 10,title: this.account,page: this.page
}, res=>{
if(res.data.length<10){
if(res.data.list.length<10){
this.noMore = true;
}
if(this.page>1){
@ -156,7 +157,6 @@
},
cancel(){
this.showEdit = false;
this.editInfo = this.originInfo;
},
//
confirm(){
@ -172,21 +172,38 @@
icon: 'none'
})
}
API.request('/adminAgentTeam/editUser', {
aid: this.editInfo.id,
password: this.editInfo.password
}, res=>{
uni.showToast({
title: res.msg
if(this.editType=='add'){
API.request('/adminAgentTeam/addAgent', {
phone: this.editInfo.phone,
password: this.editInfo.password
}, res=>{
uni.showToast({
title: res.msg
})
this.account = '';
this.search();
})
this.account = '';
this.search();
})
}else if(this.editType=='edit'){
API.request('/adminAgentTeam/editUser', {
aid: this.editInfo.id,
password: this.editInfo.password
}, res=>{
uni.showToast({
title: res.msg
})
this.account = '';
this.search();
})
}
this.showEdit = false;
},
add(){
this.title = "新增代理";
this.editType = "add";
this.showEdit = true;
this.editInfo = this.originInfo;
},
//
modifyScore(type, val, i){
@ -425,6 +442,9 @@
flex: 1;
text-align: center;
}
.disabled /deep/ .uni-input-input{
background: #ebebeb !important;
}
input{
width: 430rpx;
height: 80rpx;

13
pages/list/user.vue

@ -40,11 +40,12 @@
<view class="content">
<view class="input_box" v-if="editType=='edit'">
<view class="">ID:</view>
<input type="text" disabled v-model="editInfo.id">
<input type="text" disabled v-model="editInfo.id" class="disabled">
</view>
<view class="input_box">
<view class="">电话:</view>
<input type="text" placeholder="电话为登陆账号" v-model="editInfo.phone" :disabled="editType=='edit'">
<input type="text" placeholder="电话为登陆账号" v-model="editInfo.phone"
:disabled="editType=='edit'" :class="editType=='edit'?'disabled':''">
</view>
<view class="input_box">
<view class="">密码:</view>
@ -117,7 +118,7 @@
API.request('/adminTeam/userList', {
limit: 10,title: this.account,page: this.page
}, res=>{
if(res.data.length<10){
if(res.data.list.length<10){
this.noMore = true;
}
if(this.page>1){
@ -156,7 +157,6 @@
},
cancel(){
this.showEdit = false;
this.editInfo = this.originInfo;
},
//
confirm(){
@ -188,6 +188,7 @@
this.title = "新增用户";
this.editType = "add";
this.showEdit = true;
this.editInfo = this.originInfo;
},
//
modifyScore(type, val, i){
@ -426,6 +427,9 @@
flex: 1;
text-align: center;
}
.disabled /deep/ .uni-input-input{
background: #ebebeb !important;
}
input{
width: 430rpx;
height: 80rpx;
@ -468,6 +472,7 @@
border-radius: 5px;
border: 1px solid #ededed;
text-align: center;
input{
height: 80rpx;
font-size: 14px;

63
pages/recordsList/recordsList.vue

@ -3,10 +3,13 @@
<view class="nav_area"></view>
<view v-for="(item,index) in recordsList" :key="index" class="record-item">
<view class="record-item-top">
<view class="">记录事项名称</view>
<view v-if="type=='XF'||type=='ZJ'">消费中奖记录</view>
<view v-if="type=='UP'||type=='DOWN'">ID{{item.id}}{{item.type}}</view>
<view v-if="type=='CZ'">余额</view>
<view v-if="type=='TX'">可提余额</view>
<view class="" style="color: #CD2731;">
<text v-if="type=='CZ'||type=='ZJ'||type=='DOWN'">+</text>
<text v-else>-</text>
<!-- <text v-if="type=='CZ'||type=='ZJ'||type=='DOWN'">+</text>
<text v-else>-</text> -->
{{item.amount1}}
</view>
</view>
@ -187,10 +190,60 @@
})
},
getUP(){
API.request('/adminUser/upScoresList', {
page: this.page,limit:10
}, res=>{
let list = res.list.map(item=>{
return {
amount1: item.balance,
amount2: item.residue_amount,
time: item.create_time,
id: item.relation_id,
type: item.relation_type
}
});
if(page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
})
this.noMore = true;
}
this.recordsList = this.recordsList.concat(list)
}
})
},
getDOWN(){
API.request('/adminUser/downScoresList', {
page: this.page,limit:10
}, res=>{
let list = res.list.map(item=>{
return {
amount1: item.withdrawal_amount,
amount2: item.withdrawal_balance,
time: item.create_time,
id: item.relation_id,
type: item.relation_type
}
});
if(page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
})
this.noMore = true;
}
this.recordsList = this.recordsList.concat(list)
}
})
},
},

12
pages/ucenter/ucenter.vue

@ -323,7 +323,12 @@
showBadge: this.appVersion.hasNew
})
//#endif
this.getUserInfo();
if(uni.getStorageSync('userType')=='background'){
this.getAdminUserInfo();
}else{
this.getUserInfo();
}
},
onShow() {
this.userType = uni.getStorageSync('userType');
@ -560,6 +565,11 @@
API.request('/user/userInfo', {}, res=>{
this.userInfo = res.data.userInfo;
})
},
getAdminUserInfo(){
API.request('/adminUser/userInfo', {}, res=>{
this.userInfo = res.data.data;
})
}
}

Loading…
Cancel
Save