luyisha 3 years ago
parent
commit
5b3d9248db
  1. 1
      common/js/api.js
  2. 18
      common/js/updateTabBar.js
  3. 8
      pages/goodslist/goodslist.vue
  4. 28
      pages/home/home.vue
  5. 40
      pages/list/agent.vue
  6. 24
      pages/list/team.vue
  7. 36
      pages/list/user.vue
  8. 4
      pages/recordsList/recordsList.vue
  9. 199
      pages/scratchCard/scratchCard.vue
  10. 48
      pages/ucenter/invite/invite.vue
  11. 166
      pages/ucenter/ucenter.vue
  12. BIN
      static/user/haibao_1.png
  13. BIN
      static/user/ze-exchange@2x.png

1
common/js/api.js

@ -1,5 +1,6 @@
// let baseUrl = 'http://192.168.66.221:8000'
let baseUrl = 'http://192.168.66.16:8084'
// baseUrl = 'https://ggl.xingtongworld.com'
// baseUrl = ''
let API = {

18
common/js/updateTabBar.js

@ -20,7 +20,11 @@ export default {
changeAgent(){
uni.setTabBarItem({
index:0,
visible: false
visible: true
})
uni.setTabBarItem({
index:1,
visible: true
})
uni.setTabBarItem({
index:2,
@ -30,16 +34,16 @@ export default {
index:3,
visible: false
})
uni.setTabBarItem({
index:1,
visible: true
})
},
changebackground(){
uni.setTabBarItem({
index:0,
visible: true
})
uni.setTabBarItem({
index:1,
visible: false
})
uni.setTabBarItem({
index:2,
visible: true
@ -48,9 +52,5 @@ export default {
index:3,
visible: true
})
uni.setTabBarItem({
index:1,
visible: false
})
},
}

8
pages/goodslist/goodslist.vue

@ -22,10 +22,10 @@
id: '',
type: '20元',
goodsList: [
{cover_image:'../../static/home/tem11.png', title: '超级加倍', "id": 1, "important": "最高奖金100万元", "price": "20.00", },
{cover_image:'../../static/home/tem11.png', title: '超级加倍', "id": 1, "important": "最高奖金100万元", "price": "20.00", },
{cover_image:'../../static/home/tem11.png', title: '超级加倍', "id": 1, "important": "最高奖金100万元", "price": "20.00", },
{cover_image:'../../static/home/tem11.png', title: '超级加倍', "id": 1, "important": "最高奖金100万元", "price": "20.00", }
// {cover_image:'../../static/home/tem11.png', title: '', "id": 1, "important": "100", "price": "20.00", },
// {cover_image:'../../static/home/tem11.png', title: '', "id": 1, "important": "100", "price": "20.00", },
// {cover_image:'../../static/home/tem11.png', title: '', "id": 1, "important": "100", "price": "20.00", },
// {cover_image:'../../static/home/tem11.png', title: '', "id": 1, "important": "100", "price": "20.00", }
],
}
},

28
pages/home/home.vue

@ -1,15 +1,15 @@
<template>
<view class="homePage">
<view class="nav_area dis-flex-between-center">
<view class="left-btn" v-html="(!isLogin&&userType=='user')?'请登录':''"
:class="(!isLogin&&userType=='user')?'haveIcon':''"></view>
<view class="" style="font-size: 18px;color: #101010;" v-html="userType=='user'?'顶呱刮':'顶呱刮-总平台'"></view>
<view class="right-btn" @click="changeAudio" v-html="userType=='user'?'音乐':''"
:class="(userType=='user'&&!isPlay)?'playIcon':(userType=='user'&&isPlay)?'pauseIcon':''">
<view class="left-btn" v-html="(!isLogin&&userType!=='background')?'请登录':''"
:class="(!isLogin&&userType!=='background')?'haveIcon':''"></view>
<view class="" style="font-size: 18px;color: #101010;" v-html="userType!=='background'?'顶呱刮':'顶呱刮-总平台'"></view>
<view class="right-btn" @click="changeAudio" v-html="userType!=='background'?'音乐':''"
:class="(userType!=='background'&&!isPlay)?'playIcon':(userType!=='background'&&isPlay)?'pauseIcon':''">
<!-- <audio src="../../static/audio/pd-5b7671cee8051387.mp3" poster="" name="" author="" action="" controls></audio> -->
</view>
</view>
<view class="home_1" v-if="userType=='user'">
<view class="home_1" v-if="userType!=='background'">
<view class="banner_area">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item, index) in bannerList" :key="index">
@ -253,7 +253,7 @@
},
methods: {
changeAudio(){
if(this.userType!=='user') return;
if(this.userType!=='user' && this.userType!=='agent') return;
if(this.isPlay){
this.isPlay = false;
this.innerAudioContext.pause();
@ -454,7 +454,7 @@
},
},
mounted() {
if(this.userType=='user'){
if(this.userType!=='background'){
this.innerAudioContext = uni.createInnerAudioContext();
this.innerAudioContext.autoplay = false;
this.innerAudioContext.loop = true;
@ -480,8 +480,12 @@
onShow() {
setTimeout(()=>{
// debugger;
if(this.userType=='user'){
updateTabBar.changeUser();
if(this.userType!=='background'){
if(this.userType=='user'){
updateTabBar.changeUser();
}else if(this.userType=='agent'){
updateTabBar.changeAgent();
}
this.getZoneList();
this.getRotationChart();
this.getAwardRecords();
@ -517,13 +521,13 @@
this.userType = uni.getStorageSync('userType');
},
onReachBottom() {
if(this.userType=='user' && !this.nomore){
if(this.userType!=='background' && !this.nomore){
this.page++;
this.getAwardRecords(this.page, 10);
}
},
onUnload(){
if(this.userType=='user' && this.isPlay){
if(this.userType!=='background' && this.isPlay){
this.isPlay = false;
this.innerAudioContext.pause();
}

40
pages/list/agent.vue

@ -38,18 +38,22 @@
<view class="title">{{title}}</view>
<view class="content">
<view class="input_box" v-if="editType=='edit'">
<view class="">ID:</view>
<view class="" style="text-align: right;margin-right: 30rpx;">ID:</view>
<input type="text" disabled v-model="editInfo.id" class="disabled">
</view>
<view class="input_box">
<view class="">电话:</view>
<view class="" style="text-align: right;margin-right: 30rpx;">电话:</view>
<input type="text" placeholder="电话为登陆账号" v-model="editInfo.phone"
:disabled="editType=='edit'" :class="editType=='edit'?'disabled':''">
</view>
<view class="input_box">
<view class="">密码:</view>
<view class="" style="text-align: right;margin-right: 30rpx;">密码:</view>
<input placeholder="请输入新密码" v-model="editInfo.password">
</view>
<view class="input_box">
<view class="" style="text-align: right;margin-right: 30rpx;">返点比例:</view>
<input type="text" placeholder="请输入百分百" v-model="editInfo.rebate_ratio">
</view>
</view>
<view class="btngroup">
<view class="cancel" @click="cancel">取消</view>
@ -98,7 +102,7 @@
editType: 'add',//add/edit
title: "新增代理",
originInfo: {
id: '',phone: '',password: ''
id: '',phone: '',password: '',rebate_ratio:""
},
editInfo: {},
showScore: false,
@ -162,12 +166,6 @@
},
//
confirm(){
if(!this.editInfo.password){
uni.showToast({
title: '请输入新密码',
icon: 'none'
})
}
if(!this.editInfo.phone){
uni.showToast({
title: '请输入登陆账号',
@ -175,9 +173,16 @@
})
}
if(this.editType=='add'){
if(!this.editInfo.password){
uni.showToast({
title: '请输入新密码',
icon: 'none'
})
}
API.request('/adminAgentTeam/addAgent', {
phone: this.editInfo.phone,
password: this.editInfo.password
password: this.editInfo.password,
rebate_ratio: this.editInfo.rebate_ratio
}, res=>{
uni.showToast({
title: res.msg
@ -189,7 +194,8 @@
}else if(this.editType=='edit'){
API.request('/adminAgentTeam/editAgent', {
aid: this.editInfo.id,
password: this.editInfo.password
password: this.editInfo.password,
rebate_ratio: this.editInfo.rebate_ratio
}, res=>{
uni.showToast({
title: res.msg
@ -421,17 +427,17 @@
background-color: #fff;
color: #444;
&.add{
height: 480rpx;
// height: 480rpx;
margin: calc(50vh - 240rpx) auto;
.content{
height: 248rpx;
// height: 248rpx;
}
}
&.edit{
height: 626rpx;
// height: 626rpx;
margin: calc(50vh - 313rpx) auto;
.content{
height: 394rpx;
// height: 394rpx;
}
}
@ -440,7 +446,7 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 0px 40rpx;
padding: 0px 30rpx;
margin-bottom: 40rpx;
font-size: 16px;
view{

24
pages/list/team.vue

@ -10,8 +10,10 @@
<view class="list_area">
<view v-for="(item,index) in listsData" :key="index" class="list-item">
<view class="info">
<image :src="item.avatar" mode=""></image>
<view class="">ID{{item.id}}</view>
<view class="" style="font-size: 12px;color: #F14128;line-height: 52rpx;margin-top: -8rpx;">
<image :src="item.avatar" mode="" style="vertical-align: middle;margin-right: 12rpx;"></image>{{item.identity_str}}
</view>
<view>ID{{item.id}}</view>
</view>
<view class="amount">
<view class="amount1">
@ -209,24 +211,30 @@
border-radius: 10px;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.11);
box-sizing: border-box;
padding: 10px;
padding: 15px 8px 15px 13px;
margin: 20px auto;
display: flex;
align-items: center;
font-size: 14px;
}
.info{
text-align: center;
margin-right: 10px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.amount{
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.amount1{
display: flex;
justify-content: space-between;
padding: 0px 10px;
margin: 10px 0px;
padding: 0px 10px 0px 0px;
}
text{
color: #999;
@ -235,8 +243,8 @@
color: #F05859;
}
image{
width: 80rpx;
height: 80rpx;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
}
}

36
pages/list/user.vue

@ -15,6 +15,7 @@
<view v-for="(item,index) in listsData" :key="index" class="list-item">
<view class="edit" @click="edit(item, index)"></view>
<view class="delete" @click="remove(item, index)">删除</view>
<view class="update" @click="update(item, index)">升级代理</view>
<view class="info">
<image :src="item.avatar" mode=""></image>
<view class="">ID{{item.id}}</view>
@ -158,6 +159,27 @@
}
})
},
update(val, i){
let _this = this;
uni.showModal({
title:'温馨提示',
content:"确定该用户是否升级代理",
success(res) {
if(res.confirm){
API.request('/adminUserTeam/upGradationAgent', {
aid: val.id
}, res=>{
uni.showToast({
title: res.msg
})
_this.account = '';
_this.search();
})
}
}
})
},
cancel(){
this.showEdit = false;
},
@ -356,6 +378,20 @@
color: #999;
background-color: #f1f1f1;
}
.update{
position: absolute;
// width: 76rpx;
padding: 0px 5px;
height: 48rpx;
top: 0px;
left: 0px;
border-radius: 10px 3px 3px 3px;
font-size: 12px;
line-height: 48rpx;
text-align: center;
color: #F14128;
background-color: #f1f1f1;
}
}
.info{
text-align: center;

4
pages/recordsList/recordsList.vue

@ -1,5 +1,5 @@
<template>
<view>
<view style="padding-top: 20rpx;">
<view class="nav_area"></view>
<view v-for="(item,index) in recordsList" :key="index" class="record-item">
<view class="record-item-top">
@ -91,7 +91,7 @@
let list = res.data.list.map(item=>{
return {
amount1: item.withdrawal_amount,
amount2: item.withdrawal_balence,
amount2: item.withdrawal_balance,
time: item.apply_time,
trade_type: item.trade_type
}

199
pages/scratchCard/scratchCard.vue

@ -1,60 +1,63 @@
<template>
<view class="prizePage" :style="{'background-image':`url('${ticketInfo.bg_image}')`}">
<!-- <view class="bg" :style="{'background-image':`url('${ticketInfo.bg_image}')`}" v-if="gai"></view> -->
<view class="scratch">
<view class="box">
<!-- 刮奖结果图片 -->
<view :class="toDraw?'zIndex1':''" style="" class="result_img">
<view style="font-size: 12px;text-align: center;margin-top: 8px;">中奖号码</view>
<view class="img_row" style="border-bottom: 1px solid #333;width: 90%;margin: 5px auto;">
<view v-for="(prizeItem,prizeIndex) in prizeList" :key="prizeIndex" class="data_item">
<image :src="prizeItem" mode="aspectFill"></image>
<view class="prizePage" >
<view class="prizeBg" :style="{'background-image':`url('${ticketInfo.bg_image}')`}"></view>
<view class="prizeContent" :style="{'background-image':`url('${ticketInfo.bg_image}')`}">
<!-- <view class="bg" :style="{'background-image':`url('${ticketInfo.bg_image}')`}" v-if="gai"></view> -->
<view class="scratch">
<view class="box">
<!-- 刮奖结果图片 -->
<view :class="showBackboard?'zIndex1':'hide'" style="" class="result_img">
<view style="font-size: 12px;text-align: center;margin-top: 8px;">中奖号码</view>
<view class="img_row" style="border-bottom: 1px solid #333;width: 90%;margin: 5px auto;">
<view v-for="(prizeItem,prizeIndex) in prizeList" :key="prizeIndex" class="data_item">
<image :src="prizeItem" mode="aspectFill"></image>
</view>
</view>
</view>
<view v-for="(item,index) in dataList" :key="index" class="img_row">
<view v-for="(lineItem, lineIndex) in item" :key="lineIndex" class="data_item"
style="border-bottom: 1px dashed #333;">
<image :src="lineItem.image" mode="aspectFill"></image>
<view class="">{{lineItem.amount}}</view>
<view style="font-size: 12px;font-weight: normal;transform: scale(0.8);">{{lineItem.pinyin}}</view>
<view class="circle" :class="lineItem.is_awards?'show':''"></view>
<view v-for="(item,index) in dataList" :key="index" class="img_row">
<view v-for="(lineItem, lineIndex) in item" :key="lineIndex" class="data_item"
style="border-bottom: 1px dashed #333;">
<image :src="lineItem.image" mode="aspectFill"></image>
<view class="">{{lineItem.amount}}</view>
<view style="font-size: 12px;font-weight: normal;transform: scale(0.8);">{{lineItem.pinyin}}</view>
<view class="circle" :class="(lineItem.is_awards&&awards_amount)?'show':''"></view>
</view>
</view>
</view>
</view>
<!-- 刮奖canvas容器 -->
<canvas v-if="!isWin && !isThank"
class="canvas-box"
canvas-id="guagua"
:disable-scroll="true"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
></canvas>
<!-- 刮奖前提示消息开始刮奖后隐藏 -->
<cover-view class="tip" v-if="!toDraw">
<!-- 开始刮奖按钮 -->
<cover-view class="btn" @tap="scratchStart()">
<cover-view class="text">立即刮奖</cover-view>
</cover-view>
</cover-view>
</view>
</view>
<view class="mask" v-if="showResult">
<!-- 刮奖canvas容器 -->
<canvas v-if="!isWin && !isThank"
class="canvas-box"
canvas-id="guagua"
:disable-scroll="true"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
></canvas>
<!-- 刮奖前提示消息开始刮奖后隐藏 -->
<cover-view class="tip" v-if="!toDraw">
<!-- 开始刮奖按钮 -->
<cover-view class="btn" @tap="scratchStart()">
<cover-view class="text">立即刮奖</cover-view>
</cover-view>
</cover-view>
</view>
</view>
<view class="mask" v-if="showResult">
</view>
<view class="winPrize" v-if="isWin">
{{awards_amount}}
<cover-view class="again" @click="again"></cover-view>
<view class="close" @click="close(1)"></view>
</view>
<view class="noPrize_box" v-if="isThank">
<cover-view class="noPrize" v-if="isThank"></cover-view>
<cover-view class="again" v-if="isThank"></cover-view>
<cover-view class="again_mask" @click="again" v-if="isThank"></cover-view>
<cover-view class="close" @click="close(2)" v-if="isThank"></cover-view>
</view>
</view>
<view class="winPrize" v-if="isWin">
{{awards_amount}}
<cover-view class="again" @click="again"></cover-view>
<view class="close" @click="close(1)"></view>
</view>
<view class="noPrize_box" v-if="isThank">
<cover-view class="noPrize" v-if="isThank"></cover-view>
<cover-view class="again" v-if="isThank"></cover-view>
<cover-view class="again_mask" @click="again" v-if="isThank"></cover-view>
<cover-view class="close" @click="close(2)" v-if="isThank"></cover-view>
</view>
</view>
</template>
@ -68,41 +71,41 @@ export default {
return {
id: '',
ticketInfo: {
bg_image: '../../static/home/4.jpg',
// bg_image: '',
// bg_image: '../../static/home/4.jpg',
bg_image: '',
price: '20',
content: `刮开覆盖膜,如果出现背书标志“1倍”、“2倍”、“5倍”、“10倍”、“20倍”、
50100既中得该标志下方所示的金额乘以该倍数
如果在全中区出现标志即中图刮开区内所示的20个金额之和`
},
awards_amount: '20',
awards_amount: 0,
prizeList: ['','',''],
dataList: [
[
{image: '',amount:'100.00'},
{image: '',amount:'100.00'},
{image: '',amount:'100.00'}
],
[
{image: '',amount:'100.00'},
{image: '',amount:'100.00'},
{image: '',amount:'100.00'},
{image: '',amount:'100.00'}
],
[
{image: '',amount:'100.00'},
{image: '',amount:'100.00'},
{image: '',amount:'100.00'}
],
],
// dataList: [],
toDraw: false, //
// dataList: [
// [
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'}
// ],
// [
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'}
// ],
// [
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'},
// {image: '',amount:'100.00'}
// ],
// ],
dataList: [],
toDraw: false, // ,
showResult: false, //
isWin: false, //
scratchWidth: 330, // -375330
scratchHeight: 300, // -375300
scratchSize: 10, //
scratchScale: 0.6, //
scratchScale: 0.8, //
prize_img: '', //
isScratching: false, // ,
isThank: false,
@ -111,7 +114,7 @@ export default {
c_r_id: '',
gai: true,
screenWidth: 375,
showBackboard: false,//
}
},
updated() {
@ -179,13 +182,15 @@ export default {
this.toDraw = true;
this.initCanvas();
this.dataList = res.data.list;
this.prizeList = res.data.prizes_data;
// console.log(this.dataList, 'dataList----');
setTimeout(()=>{
this.showBackboard = true;
}, 1000)
})
},
//
doPrizeScratchTicketFun () {
// this.isWin = true;
// this.isThank = true;
uni.showLoading({
title: '加载中'
})
@ -200,8 +205,6 @@ export default {
this.isThank = true;
this.guaCanvas = null;
}
this.dataList = res.data.list;
this.prizeList = res.data.prizes_data;
}, fail=>{
// this.isScratching = false
@ -210,7 +213,7 @@ export default {
},
//
scratchStart () {
this.beginLottery()
this.beginLottery();
},
//
again(){
@ -220,6 +223,8 @@ export default {
this.gai = true;
this.isScratching = false;
this.isShow = false;
this.showBackboard = false;
this.awards_amount = 0;
API.request('/zone/beginInitInfo', {zone_goods_id: this.id}, res=>{
this.ticketInfo = res.data.data;
@ -248,16 +253,41 @@ export default {
<style lang="scss" scoped>
.prizePage{
width: 750rpx;
// min-height: calc(100vh - 88rpx - var(--status-bar-height));
height: calc(100vh - 88rpx - var(--status-bar-height));
// padding-top: calc((100vh - 88rpx - var(--status-bar-height) - (750rpx * 1700 / 1080)) / 2);
// filter: blur(5px);
overflow: hidden;
}
.prizeBg{
width: 750rpx;
min-height: calc(100vh - 88rpx - var(--status-bar-height));
background-repeat: no-repeat;
// background-size: 100% 100%;
background-size: cover;
background-position: center;
filter: blur(5px);
position: fixed;
top: 88rpx;
z-index: -1;
}
.prizeContent{
width: 750rpx;
height: calc(750rpx * 1700 / 1080);
background-repeat: no-repeat;
background-size: contain;
background-color: #fff;
margin-top: calc((100vh - 88rpx - var(--status-bar-height) - (750rpx * 1700 / 1080)) / 2);
//
// background-size: auto 100%;
// background-color: #fff;
// height: 590px;
// background-position: center top;
// position: fixed;
// top: calc((100vh - 88rpx - var(--status-bar-height) - (750rpx * 1700 / 1080)) / 2 + 88rpx);
// z-index: 4;
}
.bg{
position: fixed;
@ -279,6 +309,10 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-around;
&.hide{
opacity: 0;
}
.img_row{
display: flex;
@ -287,6 +321,7 @@ export default {
}
&.zIndex1{
z-index: 1;
opacity: 1;
}
.data_item{
width: 22%;

48
pages/ucenter/invite/invite.vue

@ -1,7 +1,13 @@
<template>
<view class="">
<view class="invitePage">
<view class="invite_code">{{Invite_code}}</view>
<view class="invitePage" :style="userType=='agent'?'background-image: url(../../../static/user/haibao.png);':'background-image: url(../../../static/user/haibao_1.png);'">
<view class="" v-if="userType=='agent'">
<view class="invite_code">{{Invite_code}}</view>
<view class="invite_code" style="margin-top: 20px;font-size: 14px;" @click="copy">复制下载链接</view>
</view>
<view class="" v-if="userType=='user'">
<view class="invite_code" style="margin-top: 320px;font-size: 16px;" @click="copy">复制下载链接</view>
</view>
</view>
<view class="about" v-if="0">
<view class="box">
@ -34,6 +40,7 @@
},
data() {
return {
userType: 'background',//user|agent|background
about: {},
code: "",
Invite_code: '',
@ -46,7 +53,7 @@
};
},
created() {
this.getDatas();
this.about = this.uniStarterConfig.about
this.downloadUrl = this.uniStarterConfig.download
this.year = (new Date).getFullYear()
@ -57,13 +64,16 @@
this.isWeixin = ua.indexOf('micromessenger') != -1;
//ios
this.isIos = !!userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
this.userType = uni.getStorageSync('userType');
if(this.userType=='agent'){
this.getDatas();
}
},
onLoad({
code
}) {
this.code = code
document.getElementById("openApp").style.display = 'none'
document.getElementsByTagName("body")[0].style = ""
onLoad({code}) {
// this.code = code
// document.getElementById("openApp").style.display = 'none'
// document.getElementsByTagName("body")[0].style = ""
},
methods: {
getDatas(){
@ -95,6 +105,22 @@
window.location.href = this.downloadUrl.android
}
}
},
copy(){
API.request('/user/downloadApp', {}, res=>{
let url = res.data.app_url;
uni.setClipboardData({
data: url,
complete: (e) => {
console.log(e);
// uni.hideToast()
/* 以下临时解决setClipboardData h5端样式和键盘弹出端错误解决方案,后续会直接内置*/
document.getElementById("#clipboard").style.top = '-999px';
uni.hideKeyboard()
}
})
})
}
}
}
@ -115,14 +141,14 @@
.invitePage{
width: 750rpx;
height: 1200rpx;
background-image: url("../../../static/user/haibao.png");
background-size: contain;
.invite_code{
text-align: center;
color: #3658E7;
font-size: 36px;
margin-top: 325px;
margin-top: 310px;
}
}
.about {

166
pages/ucenter/ucenter.vue

@ -27,7 +27,14 @@
<view class="line"></view>
<view class="item">
<text style="font-size: 20px;margin-bottom: 10rpx;">{{userInfo.withdrawal_balance}}</text>
<text>可提余额</text>
<!-- <text>可提余额</text> -->
<view class="item_btn" :style="(userType=='user'||userType=='agent')?'justify-content: space-between;':''">
<text>可提余额</text>
<block v-if="userType=='user'||userType=='agent'">
<image @click="toTransfer()" src="../../static/user/ze-exchange@2x.png" style="width: 32rpx;height: 32rpx;margin: 8rpx 0px 0px 24rpx;"></image>
<text @click="toTransfer()" style="color: #4976FF;">余额</text>
</block>
</view>
</view>
</view>
<uni-grid class="grid" :column="4" :showBorder="false" :square="true" v-if="0">
@ -67,21 +74,6 @@
</template>
</uni-list-item>
</template>
<template v-if="userType=='user'||userType=='agent'">
<uni-list-item v-for="(item,i) in ucenterList[2]" :title="item.title" link :rightText="item.rightText" :key="item.title"
:clickable="true" :to="item.to" @click="ucenterListClick(item)" :show-extra-icon="true"
:extraIcon="{type:item.icon,color:'#999'}">
<template v-slot:footer>
<view class="icon_new" v-if="item.iconN">
<image :src="'../../static/user/icon_'+item.iconN+'.png'" mode=""></image>
</view>
<view v-if="item.showBadge" class="item-footer">
<text class="item-footer-text">{{item.rightText}}</text>
<view class="item-footer-badge"></view>
</view>
</template>
</uni-list-item>
</template>
<template v-if="userType=='background'">
<uni-list-item v-for="(item,i) in ucenterList[3]" :title="item.title" link :rightText="item.rightText" :key="item.title"
:clickable="true" :to="item.to" @click="ucenterListClick(item)" :show-extra-icon="true"
@ -111,6 +103,17 @@
</view>
</view>
</view>
<view class="showTransfer" v-if="showTransfer">
<view class="showTransfer_box">
<view class="grey">温馨提示</view>
<view style="width: 310rpx;margin: 10px auto;font-size: 14px;">确认是否将可提余额全部转到余额中</view>
<view class="grey" style="font-size: 12px;">转过去余额后将无法转回来可提余额</view>
<view class="btn_box">
<view class="grey" @click="cancelTransfer">取消</view>
<view class="blue" @click="confirmTransfer">确定</view>
</view>
</view>
</view>
</view>
</template>
@ -190,15 +193,63 @@
"event": '',
"icon": "compose",
"iconN": "smile"
}
},
{
"title": '联系客服',
"to": '/pages/service/service',
"icon": "compose",
"iconN": "people"
},
{
"title": '修改密码',
"event": 'toChangePWD',
"icon": "compose",
"iconN": "lock"
},
{
"title": '邀请码',
"to": '/pages/ucenter/invite/invite',
"icon": "compose",
"iconN": "menu"
},
],
[
{
"title": '中奖记录',
"to": '/pages/recordsList/recordsList?type=ZJ',
"icon": "compose",
"iconN": "target"
},
{
"title": '消费记录',
"to": '/pages/recordsList/recordsList?type=XF',
"icon": "compose",
"iconN": "card"
},
{
"title": '充值记录',
"to": '/pages/recordsList/recordsList?type=CZ',
"icon": "compose",
"iconN": "card"
"iconN": "gold"
},
{
"title": '提现记录',
"to": '/pages/recordsList/recordsList?type=TX',
"icon": "compose",
"iconN": "wallet"
},
{
"title": '规则中心',
"event": '',
"icon": "compose",
"iconN": "smile"
},
// {
// "title": '',
// "to": '/pages/recordsList/recordsList?type=CZ',
// "icon": "compose",
// "iconN": "card"
// },
{
"title": '上分记录',
"to": '/pages/recordsList/recordsList?type=UP',
@ -217,10 +268,8 @@
"icon": "compose",
"iconN": "menu"
},
],
[
{
"title": '在线客服',
"title": '联系客服',
"to": '/pages/service/service',
"icon": "compose",
"iconN": "people"
@ -231,6 +280,8 @@
"icon": "compose",
"iconN": "lock"
},
],
[
// {
// "title": '',
// "to": '/pages/ucenter/about/about',
@ -326,6 +377,7 @@
userInfo: {},
showClear: false,
password: '',
showTransfer: false,
}
},
onLoad() {
@ -586,6 +638,25 @@
url: "/pages/recharge/recharge"
})
},
toTransfer(){
this.showTransfer = true;
},
cancelTransfer(){
this.showTransfer = false;
},
confirmTransfer(){
API.request('/user/transferBalance', {}, res=>{
uni.showToast({
title: res.msg
})
this.showTransfer = false;
if(uni.getStorageSync('userType')=='agent'){
this.getAgentInfo();
}else{
this.getUserInfo();
}
})
},
clearCache(){
this.showClear = true;
@ -906,4 +977,57 @@
font-size: 14px;
}
}
.showTransfer{
width: 100vw;
height: 100vh;
position: fixed;
top: 0px;
left: 0px;
z-index: 999;
background-color: rgba(0, 0, 0, 0.5);
color: #444;
.showTransfer_box{
width: 570rpx;
// height: 340rpx;
border-radius: 10px;
background-color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
padding-top: 40rpx;
line-height: 54rpx;
}
input{
background-color: #f5f5f5;
padding: 8px;
margin: 16rpx 50rpx 0px;
border-radius: 10px;
}
.btn_box{
line-height: 90rpx;
display: flex;
flex-direction: row;
border-top: 1px solid #f1f1f1;
margin-top: 40rpx;
font-size: 14px;
view{
flex: 1;
}
.grey{
border-right: 1px solid #f1f1f1;
}
.blue{
color: #4876FF;
}
}
.grey{
color: #999;
font-size: 14px;
}
}
</style>

BIN
static/user/haibao_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
static/user/ze-exchange@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Loading…
Cancel
Save