luyisha 3 years ago
parent
commit
6abdd28e79
  1. 9
      common/js/api.js
  2. 9
      pages.json
  3. 1
      pages/about/bannerManage/addBanner.vue
  4. 16
      pages/about/bannerManage/bannerManage.vue
  5. 15
      pages/about/bonusSet/bonusSet.vue
  6. 2
      pages/about/bonusSet/index.vue
  7. 15
      pages/about/noticeManage/noticeManage.vue
  8. 23
      pages/about/serviceSet/serviceSet.vue
  9. 23
      pages/list/agent.vue
  10. 23
      pages/list/user.vue
  11. 136
      pages/recordsList/recordsList.vue
  12. 129
      pages/serivce/serivce.vue
  13. 8
      pages/ucenter/ucenter.vue
  14. BIN
      static/user/icon_manager2.png

9
common/js/api.js

@ -91,9 +91,16 @@ let API = {
...requestObj,
success(res) {
// console.log(res, '000');
// 200=成功, 400 = 失败错误返回、404 token验证失败
// 200=成功, 400 = 失败错误返回、404 token验证失败 ,403 token已过2小时失效
if(res.data.code==200){
success && success(res.data);
}else if(res.data.code==403){
uni.removeStorageSync('user_token');
setTimeout(()=>{
uni.reLaunch({
url: '/uni_modules/uni-id-pages/pages/login/login-withpwd'
})
}, 1000)
}else{
uni.showToast({
title: res.data.msg,

9
pages.json

@ -321,6 +321,15 @@
}
}
,{
"path" : "pages/serivce/serivce",
"style" :
{
"navigationBarTitleText": "联系客服",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{
"root": "uni_modules/uni-feedback",

1
pages/about/bannerManage/addBanner.vue

@ -93,6 +93,7 @@
this.id = e.id;
this.editInfo.title = e.title;
this.editInfo.image = e.image;
this.editInfo.img = e.image.split('/storage')[1];
this.editInfo.sort = e.sort;
}

16
pages/about/bannerManage/bannerManage.vue

@ -6,7 +6,7 @@
<view class="icon_new"><image :src="item.image" mode=""></image></view>
<view style="flex:1;" class="flex-col">
<view class="box3"><text>轮播名称</text>{{item.title}}</view>
<view class=""><text>排序</text>{{item.sort}}%</view>
<view class=""><text>排序</text>{{item.sort}}</view>
</view>
<view style="" class="flex-col">
<view class="red" @click="edit(item,index)">编辑</view>
@ -43,13 +43,15 @@
uni.showModal({
title:'温馨提示',
content:"确定是否删除该信息",
success() {
API.request('/rotationChart/delete', {id: val.id}, res=>{
uni.showToast({
title: res.msg
success(res) {
if(res.confirm){
API.request('/rotationChart/delete', {id: val.id}, res=>{
uni.showToast({
title: res.msg
})
_this.setList.splice(i, 1);
})
_this.setList.splice(i, 1);
})
}
}
})
},

15
pages/about/bonusSet/bonusSet.vue

@ -72,13 +72,16 @@
uni.showModal({
title:'温馨提示',
content:"确定是否删除该奖金信息",
success() {
API.request('/adminZoneManage/goodsParamDel', {z_g_p_id: val.id}, res=>{
uni.showToast({
title: res.msg
success(res) {
if(res.confirm){
API.request('/adminZoneManage/goodsParamDel', {z_g_p_id: val.id}, res=>{
uni.showToast({
title: res.msg
})
_this.setList.splice(i, 1);
})
_this.setList.splice(i, 1);
})
}
}
})
},

2
pages/about/bonusSet/index.vue

@ -57,7 +57,7 @@
}else{
this.bonusList = res.data;
}
}, fail=>{}, false)
}, fail=>{})
}
},
onLoad(e) {

15
pages/about/noticeManage/noticeManage.vue

@ -52,13 +52,16 @@
uni.showModal({
title:'温馨提示',
content:"确定是否删除该信息",
success() {
API.request('/notice/delete', {id: val.id}, res=>{
uni.showToast({
title: res.msg
success(res) {
if(res.confirm){
API.request('/notice/delete', {id: val.id}, res=>{
uni.showToast({
title: res.msg
})
_this.setList.splice(i, 1);
})
_this.setList.splice(i, 1);
})
}
}
})
},

23
pages/about/serviceSet/serviceSet.vue

@ -66,22 +66,25 @@
edit(val, i){
this.title = "编辑客服信息";
this.showEdit = true;
this.editInfo = val;
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
success(res) {
if(res.confirm){
API.request('/customerService/delete', {
id: val.id
}, res=>{
uni.showToast({
title: res.msg
})
_this.dataList.splice(i, 1);
})
_this.dataList.splice(i, 1);
})
}
}
})
},
@ -116,7 +119,7 @@
})
}
},
onLoad() {
onShow() {
this.getList();
},
onNavigationBarButtonTap(e){

23
pages/list/agent.vue

@ -140,17 +140,20 @@
uni.showModal({
title:'温馨提示',
content:"确定是否删除该代理信息",
success() {
API.request('/adminAgentTeam/deleteAgent', {
aid: val.id
}, res=>{
uni.showToast({
title: res.msg
success(res) {
if(res.confirm){
API.request('/adminAgentTeam/deleteAgent', {
aid: val.id
}, res=>{
uni.showToast({
title: res.msg
})
_this.listsData.splice(i, 1);
// _this.account = '';
// _this.search();
})
_this.listsData.splice(i, 1);
// _this.account = '';
// _this.search();
})
}
}
})
},

23
pages/list/user.vue

@ -141,17 +141,20 @@
uni.showModal({
title:'温馨提示',
content:"确定是否删除该用户信息",
success() {
API.request('/adminUserTeam/deleteUser', {
user_id: val.id
}, res=>{
uni.showToast({
title: res.msg
success(res) {
if(res.confirm){
API.request('/adminUserTeam/deleteUser', {
user_id: val.id
}, res=>{
uni.showToast({
title: res.msg
})
_this.listsData.splice(i, 1);
// _this.account = '';
// _this.search();
})
_this.listsData.splice(i, 1);
// _this.account = '';
// _this.search();
})
}
}
})
},

136
pages/recordsList/recordsList.vue

@ -4,8 +4,8 @@
<view v-for="(item,index) in recordsList" :key="index" class="record-item">
<view class="record-item-top">
<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=='UP'||type=='DOWN'">ID{{item.id}}<text v-if="item.type">{{item.type}}</text></view>
<view v-if="type=='CZ'">{{item.trade_type}}</view>
<view v-if="type=='TX'">可提余额</view>
<view class="" style="color: #CD2731;">
<!-- <text v-if="type=='CZ'||type=='ZJ'||type=='DOWN'">+</text>
@ -23,6 +23,9 @@
</view>
</view>
</view>
<view class="" v-if="recordsList.length===0" style="color: #999;text-align: center;padding: 40rpx;">
- 暂无记录 -
</view>
</view>
</template>
@ -31,27 +34,26 @@
export default {
data() {
return {
userType: '',
type: null,
recordsList:[
{
amount1: '100.00',
amount2: '1000.00',
time: '08月27日 12:00',
},
{
amount1: '100.00',
amount2: '1000.00',
time: '08月27日 12:00',
},
// {
// amount1: '100.00',
// amount2: '1000.00',
// time: '0827 12:00',
// },
// {
// amount1: '100.00',
// amount2: '1000.00',
// time: '0827 12:00',
// },
],
page: 1,
noMore: true,
}
},
methods: {
},
onLoad(e) {
this.userType = uni.getStorageSync('userType');
this.type = e.type;
let title = '';
switch(e.type){
@ -77,27 +79,26 @@
uni.setNavigationBarTitle({
title: title+'记录'
})
this['get'+this.type](this.page);
this['get'+this.type]();
},
methods: {
getTX(page=1){
getTX(){
API.getWithdrawal({
page: page,
page: this.page,
limit: 10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.withdrawal_amount,
amount2: item.withdrawal_balence,
time: item.apply_time,
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -108,23 +109,36 @@
}
})
},
getCZ(page=1){
API.getRecharge({
page: page,
getCZ(){
let url = '';
switch(this.userType){
case 'user':
url = '/user/rechargeRecords'
break;
case 'agent':
url = '/agentTeam/rechargeRecords'
break;
case 'background':
url = ''
break;
}
API.request(url,{
page: this.page,
limit: 10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.recharge_amount,
amount2: item.residue_amount,
time: item.recharge_time,
trade_type: item.trade_type
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -135,23 +149,23 @@
}
})
},
getXF(page=1){
getXF(){
API.getConsumption({
page: page,
page: this.page,
limit: 10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.actual_price,
amount2: item.residue_amount,
time: item.create_time,
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -162,23 +176,23 @@
}
})
},
getZJ(page=1){
getZJ(){
API.getAwards({
page: page,
page: this.page,
limit: 10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.awards_amount,
amount2: item.withdrawal_balance,
time: item.create_time,
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -190,23 +204,35 @@
})
},
getUP(){
API.request('/adminUser/upScoresList', {
let url = '';
switch(this.userType){
case 'user':
url = ''
break;
case 'agent':
url = '/agentTeam/upScoresList'
break;
case 'background':
url = '/adminUser/upScoresList'
break;
}
API.request(url, {
page: this.page,limit:10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.balance,
amount2: item.residue_amount,
time: item.create_time,
id: item.relation_id,
type: item.relation_type
type: item.relation_type||''
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -218,23 +244,35 @@
})
},
getDOWN(){
API.request('/adminUser/downScoresList', {
let url = '';
switch(this.userType){
case 'user':
url = ''
break;
case 'agent':
url = '/agentTeam/downScoresList'
break;
case 'background':
url = '/adminUser/downScoresList'
break;
}
API.request(url, {
page: this.page,limit:10
}, res=>{
let list = res.list.map(item=>{
let list = res.data.list.map(item=>{
return {
amount1: item.withdrawal_amount,
amount2: item.withdrawal_balance,
time: item.create_time,
id: item.relation_id,
type: item.relation_type
type: item.relation_type||''
}
});
if(page===1){
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.recordsList = list;
}else{
if(res.list.length==0){
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
@ -250,7 +288,7 @@
onReachBottom() {
if(this.noMore) return;
this.page++;
this['get'+this.type](this.page);
this['get'+this.type]();
}
}
</script>

129
pages/serivce/serivce.vue

@ -0,0 +1,129 @@
<template>
<view>
<view class="nav_area"></view>
<view v-for="(item,index) in serviceList" :key="index" class="record-item">
<view class="line1">
<image src="../../static/user/icon_manager2.png" mode=""></image>
<view class="">客服名<text style="color:#101010;">{{item.name}}</text></view>
</view>
<view class="line2">微信号码<text style="color:#101010;">{{item.wx}}</text></view>
<view class="btn" @click="copyNum(item.wx)">复制联系方式</view>
</view>
<view class="" v-if="serviceList.length===0" style="color: #999;text-align: center;padding: 40rpx;">
- 暂无记录 -
</view>
</view>
</template>
<script>
import API from '@/common/js/api.js'
export default {
data() {
return {
serviceList:[
{
name: '100.00',
wx: '17177771111',
},
{
name: '100.00',
wx: '1000.00',
},
],
page: 1,
noMore: true,
}
},
onLoad(e) {
this.getList();
},
methods: {
copyNum(num){
uni.setClipboardData({
data: num,
success() {
uni.showToast({
title: '复制成功'
})
}
})
},
getList(){
API.request('/user/getCustomerServiceList', {}, res=>{
let list = res.data.list;
if(this.page===1){
list.length>0 ? this.noMore=false : false;
this.serviceList = list;
}else{
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
})
this.noMore = true;
}
this.serviceList = this.serviceList.concat(list)
}
})
},
},
onReachBottom() {
if(this.noMore) return;
this.page++;
this.getList();
}
}
</script>
<style scoped lang="scss">
.nav_area {
position: fixed;
top: 0px;
left: 0px;
z-index: 99;
background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx;
height: 88rpx;
padding: 0px 25rpx;
padding-top: var(--status-bar-height);
box-sizing: content-box;
color: #b0b0b0;
font-size: 14px;
}
.record-item{
padding: 80rpx 88rpx 0px;
.line1{
width: 100%;
display: flex;
color: #999;
image{
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}
}
.line2{
width: 100%;
padding-left: 60rpx;
color: #999;
margin-top: 10px;
}
.btn{
width: 226rpx;
height: 68rpx;
line-height: 68rpx;
border: 1px solid #d6e6ff;
border-radius: 10px;
font-size: 12px;
text-align: center;
color: #6DA6FF;
margin: 40rpx auto 0px;
}
}
</style>

8
pages/ucenter/ucenter.vue

@ -208,7 +208,7 @@
[
{
"title": '在线客服',
"event": '',
"to": '/pages/serivce/serivce',
"icon": "compose",
"iconN": "people"
},
@ -573,8 +573,10 @@
uni.showModal({
title:'温馨提示',
content:"确定后,将清除所有缓存数据",
success() {
success(res) {
if(res.confirm){
}
// let tk = uni.getStorageSync('user_token');
// let ut = uni.getStorageSync('userType');
// uni.clearStorageSync();

BIN
static/user/icon_manager2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Loading…
Cancel
Save