Browse Source

修复一波问题

master
luyisha 3 years ago
parent
commit
3548f0f2f1
  1. 1
      common/js/api.js
  2. 5
      pages/NoticeDetails/NoticeDetails.vue
  3. 2
      pages/about/bannerManage/addBanner.vue
  4. 8
      pages/about/bonusSet/bonusList.vue
  5. 2
      pages/goodslist/goodslist.vue
  6. 6
      pages/home/home.vue
  7. 11
      pages/list/agent.vue
  8. 45
      pages/list/user.vue
  9. 65
      pages/scratchCard/scratchCard.vue
  10. 33
      pages/ucenter/ucenter.vue
  11. 30
      uni_modules/uni-id-pages/pages/login/login-withpwd.vue
  12. 27
      uni_modules/uni-id-pages/pages/register/register.vue
  13. 12
      uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue

1
common/js/api.js

@ -2,6 +2,7 @@
let baseUrl = 'http://192.168.66.16:8084'
let API = {
baseUrl: baseUrl,
// 注册
register(data, success, fail){
API.sendRequest('post', data, '/passport/register', success, fail)

5
pages/NoticeDetails/NoticeDetails.vue

@ -16,7 +16,7 @@
export default {
data() {
return {
title: '关于中奖概率调整问题',
title: '关于中奖概率调整问题关于中奖概率问题关于中奖概率调整问题关于中奖概率调整问题',
create_time: '发布时间:2023.08.10 23:00:00',
content: `关于中奖概率调整问题关于中奖概率调整问题关于中奖概率调整问题关于中奖概率调整问题关于中奖概率
调整问题关于中奖概率调整问题`
@ -62,7 +62,8 @@
.title{
font-size: 16px;
line-height: 50px;
line-height: 30px;
padding: 10px 0px;
}
.time{
font-size: 12px;

2
pages/about/bannerManage/addBanner.vue

@ -49,7 +49,7 @@
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
uni.uploadFile({
url: 'http://192.168.66.221:8000'+'/rotationChart/upload',
url: API.baseUrl+'/rotationChart/upload',
filePath: tempFilePaths[0],
name: 'file',
header: {

8
pages/about/bonusSet/bonusList.vue

@ -8,7 +8,7 @@
<view class=""><text>面值</text>{{item.price}}</view>
<view style="font-size: 12px;"><text>最高中奖金额</text>{{item.max_awards_amount}}</view>
</view>
<switch :checked="item.status" @change="clickSwitch($event, index)" color="#00E266" @click.stop="" />
<switch :checked="item.status==1" @change="clickSwitch($event, index)" color="#00E266" @click.stop="" />
</view>
</view>
</view>
@ -21,9 +21,9 @@
return {
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万'}
// {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,

2
pages/goodslist/goodslist.vue

@ -78,6 +78,8 @@
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0px 5px;
flex: 1;
}
.btn{
width: 78px;

6
pages/home/home.vue

@ -1,7 +1,7 @@
<template>
<view class="homePage">
<view class="nav_area dis-flex-between-center">
<view class="left-btn" @click="toUrl('login')" v-html="(!isLogin&&userType=='user')?'请登录':''"
<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'?'音乐':''"
@ -18,7 +18,7 @@
</swiper>
</view>
<view class="notice" @click="toUrl('notice')">
<view class="notice" @click="toUrl('notice')" v-if="notice.title">
<text class="notice_t">公告</text>
{{notice.title}}
</view>
@ -149,7 +149,7 @@
data: [155, 250, 360, 100, 180, 204]
},
notice: {
title: '公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告公告'
title: ''
}
}
},

11
pages/list/agent.vue

@ -7,7 +7,7 @@
</view>
<view class="search_area">
<view class="search_box">
<input type="text" v-model="keyword" placeholder="请输入代理人员id/手机号码" placeholder-style="color: #ededed;">
<input type="text" v-model="account" placeholder="请输入代理人员id/手机号码" placeholder-style="color: #ededed;">
<button @click="search()">搜索</button>
</view>
</view>
@ -72,7 +72,7 @@
<view class="">可提余额<text>{{scoreInfo.withdrawal_balance}}</text></view>
</view>
<view class="input_box">
<input password :placeholder="scoreTip" v-model="limit">
<input type="number" :placeholder="scoreTip" v-model="limit">
</view>
</view>
<view class="btngroup">
@ -89,7 +89,6 @@
export default {
data(){
return {
keyword: '',
listsData: [
{id:111,phone:'135XXXX7777',balance:'1000.00',withdrawal_balance:'1000.00'},
{id:123,phone:'135XXXX7777',balance:'1000.00',withdrawal_balance:'1000.00'},
@ -115,7 +114,7 @@
},
methods: {
getAgentList(){
API.request('/adminTeam/agentList', {
API.request('/adminAgentTeam/agentList', {
limit: 10,title: this.account,page: this.page
}, res=>{
if(res.data.list.length<10){
@ -227,7 +226,7 @@
})
return;
}
let url = this.modifyType===1?'/adminTeam/agentUpScores':'/adminTeam/agentDownScores'
let url = this.modifyType===1?'/adminAgentTeam/agentUpScores':'/adminAgentTeam/agentDownScores'
API.request(url, {
aid: this.scoreInfo.id,
quota: this.limit
@ -245,7 +244,7 @@
this.getAgentList();
}
},
onLoad() {
onShow() {
this.getAgentList();
},
onReachBottom() {

45
pages/list/user.vue

@ -73,7 +73,7 @@
<view class="">可提余额<text>{{scoreInfo.withdrawal_balance}}</text></view>
</view>
<view class="input_box">
<input password :placeholder="scoreTip" v-model="limit">
<input type="number" :placeholder="scoreTip" v-model="limit">
</view>
</view>
<view class="btngroup">
@ -115,7 +115,7 @@
},
methods: {
getUserList(){
API.request('/adminTeam/userList', {
API.request('/adminUserTeam/userList', {
limit: 10,title: this.account,page: this.page
}, res=>{
if(res.data.list.length<10){
@ -142,7 +142,7 @@
title:'温馨提示',
content:"确定是否删除该用户信息",
success() {
API.request('/adminTeam/deleteUser', {
API.request('/adminUserTeam/deleteUser', {
user_id: val.id
}, res=>{
uni.showToast({
@ -172,17 +172,32 @@
icon: 'none'
})
}
API.request('/adminTeam/editUser', {
user_id: this.editInfo.id,
phone: this.editInfo.phone,
password: this.editInfo.password
}, res=>{
uni.showToast({
title: res.msg
if(this.editType=='add'){
API.request('/adminUserTeam/addUser', {
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('/adminUserTeam/editUser', {
user_id: this.editInfo.id,
phone: this.editInfo.phone,
password: this.editInfo.password
}, res=>{
uni.showToast({
title: res.msg
})
this.account = '';
this.search();
})
}
this.showEdit = false;
},
add(){
this.title = "新增用户";
@ -212,7 +227,7 @@
})
return;
}
let url = this.modifyType===1?'/adminTeam/upScores':'/adminTeam/downScores'
let url = this.modifyType===1?'/adminUserTeam/upScores':'/adminUserTeam/downScores'
API.request(url, {
user_id: this.scoreInfo.id,
quota: this.limit
@ -230,7 +245,7 @@
this.getUserList();
}
},
onLoad() {
onShow() {
this.getUserList();
},
onReachBottom() {

65
pages/scratchCard/scratchCard.vue

@ -1,15 +1,17 @@
<template>
<view class="prizePage" :style="{'background-image':`url('${ticketInfo.bgImg}')`}">
<view class="prizePage" :style="{'background-image':`url('${ticketInfo.bg_image}')`}">
<view class="ticketInfoPrice">面值{{ticketInfo.price}}</view>
<view class="ticketInfoPrice2">面值{{ticketInfo.price}}</view>
<view class="scratch">
<view class="box">
<!-- 刮奖结果图片 -->
<!-- <image src="../../static/home/logo.png" class="img" :class="toDraw?'zIndex1':''" v-if="showResult||1"></image> -->
<view class="img" :class="toDraw?'zIndex1':''">
<view v-for="(item,index) in dataList" :key="index" class="data_item">
<image :src="item.image" mode=""></image>
<view class="">{{item.amount}}</view>
<view :class="toDraw?'zIndex1':''" style="" class="img">
<view v-for="(item,index) in dataList" :key="index" class="img_row">
<view v-for="(lineItem, lineIndex) in item" :key="lineIndex" class="data_item">
<image :src="lineItem.image" mode=""></image>
<view class="">{{lineItem.amount}}</view>
</view>
</view>
</view>
<!-- 刮奖canvas容器 -->
@ -66,19 +68,24 @@ export default {
},
awards_amount: '20',
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'},
{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'},
{image: '',amount:'100.00'},
{image: '',amount:'100.00'}
],
],
// dataList: [],
toDraw: false, //
showResult: false, //
isWin: false, //
@ -91,7 +98,8 @@ export default {
isThank: false,
// show: false,
guaCanvas: null,
isShow: false
isShow: false,
c_r_id: '',
}
},
updated() {
@ -137,13 +145,17 @@ export default {
beginLottery(){
API.beginLottery({zone_goods_id: this.id}, res=>{
this.dataList = res.data.list;
this.c_r_id = res.data.c_r_id;
this.toDraw = true;
this.initCanvas();
// console.log(this.dataList, 'dataList----');
})
},
//
doPrizeScratchTicketFun () {
// this.isWin = true;
// this.isThank = true;
API.endLottery({c_r_id: this.id}, res=>{
API.endLottery({c_r_id: this.c_r_id}, res=>{
this.awards_amount = res.data.awards_amount;
this.isWin = true;
}, fail=>{
@ -154,8 +166,7 @@ export default {
},
//
scratchStart () {
this.toDraw = true
this.initCanvas()
this.beginLottery()
},
//
@ -204,6 +215,7 @@ export default {
.scratch {
position: relative;
padding-top: 380px;
// padding-top: 280px;
width: 330px;
height: 280px;
margin: 0px auto;
@ -223,9 +235,14 @@ export default {
z-index: -1;
background-color: #DCDEDD;
display: flex;
flex-wrap: wrap;
align-content: space-around;
flex-direction: column;
justify-content: space-around;
.img_row{
display: flex;
flex-wrap: wrap;
align-content: space-around;
}
&.zIndex1{
z-index: 1;
}
@ -238,7 +255,7 @@ export default {
image{
width: 80rpx;
height: 60rpx;
background-color: #000;
// background-color: #000;
}
}
}

33
pages/ucenter/ucenter.vue

@ -13,8 +13,8 @@
<text class="uer-name" v-if="hasLogin">ID: {{userInfo.id}}</text>
<text class="uer-name" v-else @click.capture="toUserInfo">点击登陆</text>
</view>
<!-- <view class="logo-out" @click.stop="logoOut" v-if="hasLogin">
</view> -->
<view class="logo-out" @click.stop="logoOut" v-if="hasLogin">
</view>
</view>
<view class="balance_area" v-if="userType=='user'||userType=='agent'">
<view class="item">
@ -400,7 +400,25 @@
// })
},
logoOut(e){
let url = '/user/LogOut';
if(this.userType=='agent'){
url = '/agentTeam/logOut';
}else if(this.userType=='background'){
url = '/adminUser/logOut';
}
API.request(url, {}, res=>{
uni.showToast({
title: res.msg
})
uni.removeStorageSync('user_token');
setTimeout(()=>{
uni.reLaunch({
url: '/uni_modules/uni-id-pages/pages/login/login-withpwd'
})
}, 1000)
})
},
tapGrid(index) {
uni.showToast({
@ -554,11 +572,12 @@
title:'温馨提示',
content:"确定后,将清除所有缓存数据",
success() {
let tk = uni.getStorageSync('user_token');
let ut = uni.getStorageSync('userType');
uni.clearStorageSync();
uni.setStorageSync('user_token', tk);
uni.setStorageSync('userType', ut);
// let tk = uni.getStorageSync('user_token');
// let ut = uni.getStorageSync('userType');
// uni.clearStorageSync();
// uni.setStorageSync('user_token', tk);
// uni.setStorageSync('userType', ut);
}
})
},

30
uni_modules/uni-id-pages/pages/login/login-withpwd.vue

@ -29,7 +29,7 @@
<!-- <uni-id-pages-agreements scope="login" ref="agreements"></uni-id-pages-agreements> -->
<button class="uni-btn login-btn" type="primary" @click="pwdLogin">登录</button>
<!-- 忘记密码 -->
<view class="link-box">
<view class="link-box" v-if="this.userType=='user'">
<view v-if="!config.isAdmin">
<!-- <text class="forget" @click="toRetrievePwd">忘记密码</text> -->
<!-- <text class="link">找回密码</text> -->
@ -37,9 +37,9 @@
<text class="link" @click="toRegister">{{config.isAdmin ? '注册管理员账号': '新注册'}}</text>
<!-- <text class="link" @click="toRegister" v-if="!config.isAdmin">注册账号</text> -->
</view>
<view style="width: 100vw;text-align: center;color: #dcdcdc;font-size: 14px;line-height: 28px;position: fixed;bottom: 50px;left:0px">
<view v-if="this.userType=='user'" style="width: 100vw;text-align: center;color: #dcdcdc;font-size: 14px;line-height: 28px;position: fixed;bottom: 50px;left:0px">
温馨提示<br/>
验证码需要跟代理/平台客服获取
忘记密码请联系平台
</view>
<!-- 悬浮登录方式组件 -->
<!-- <uni-id-pages-fab-login ref="uniFabLogin"></uni-id-pages-fab-login> -->
@ -109,19 +109,19 @@
if (!this.username.length) {
this.focusUsername = true
return uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 3000
});
}
if (!/^1\d{10}$/.test(this.username)) {
this.focusUsername = true
return uni.showToast({
title: '请输入正确格式的手机号',
title: '请输入手机号/账号',
icon: 'none',
duration: 3000
});
}
// if (!/^1\d{10}$/.test(this.username)) {
// this.focusUsername = true
// return uni.showToast({
// title: '',
// icon: 'none',
// duration: 3000
// });
// }
if (!this.password.length) {
this.focusPassword = true
return uni.showToast({
@ -188,6 +188,9 @@
title: res.msg
})
uni.setStorageSync('user_token', res.data.token);
let accounts = uni.getStorageSync('accounts') || [];
accounts.push(this.username);
uni.setStorageSync('accounts', accounts);
uni.setStorageSync('userType', 'agent');
// updateTabBar.changeAgent();
setTimeout(()=>{
@ -208,6 +211,9 @@
title: res.msg
})
uni.setStorageSync('user_token', res.data.token);
let accounts = uni.getStorageSync('accounts') || [];
accounts.push(this.username);
uni.setStorageSync('accounts', accounts);
uni.setStorageSync('userType', 'background');
// updateTabBar.changebackground();
setTimeout(()=>{

27
uni_modules/uni-id-pages/pages/register/register.vue

@ -26,11 +26,11 @@
<uni-forms-item name="phone">
<uni-easyinput :inputBorder="false" :focus="focusUsername" @blur="focusUsername = false"
class="input-box" placeholder="手机号码" v-model="formData.phone" trim="both" />
<view class="getCaptchaCode">
<view class="getCaptchaCode" v-if="0">
获取验证码
</view>
</uni-forms-item>
<uni-forms-item name="phoneCaptcha">
<uni-forms-item name="phoneCaptcha" v-if="0">
<uni-easyinput :inputBorder="false" :focus="focusCaptcha" @blur="focusCaptcha = false"
class="input-box" placeholder="手机验证码" v-model="formData.phoneCaptcha" trim="both" />
</uni-forms-item>
@ -38,22 +38,23 @@
<uni-easyinput :inputBorder="false" :focus="focusCode" @blur="focusCode = false"
class="input-box" placeholder="邀请码" v-model="formData.invitationCode" trim="both" />
</uni-forms-item>
<!-- :placeholder="'请输入' + (config.passwordStrength == 'weak'?'6':'8') + '-16位密码'" -->
<uni-forms-item name="password" v-model="formData.password" >
<uni-easyinput :inputBorder="false" :focus="focusPassword" @blur="focusPassword = false"
class="input-box" maxlength="20"
:placeholder="'请输入' + (config.passwordStrength == 'weak'?'6':'8') + '-16位密码'" type="password"
placeholder="密码" type="password"
v-model="formData.password" trim="both" />
</uni-forms-item>
<uni-forms-item name="password2" v-model="formData.password2" >
<uni-easyinput :inputBorder="false" :focus="focusPassword2" @blur="focusPassword2 =false"
class="input-box" placeholder="再次输入密码" maxlength="20" type="password" v-model="formData.password2"
class="input-box" placeholder="确认密码" maxlength="20" type="password" v-model="formData.password2"
trim="both" />
</uni-forms-item>
<!-- <uni-forms-item>
<uni-captcha ref="captcha" scene="register" v-model="formData.captcha" />
</uni-forms-item> -->
<!-- <uni-id-pages-agreements scope="register" ref="agreements"></uni-id-pages-agreements> -->
<button class="uni-btn register-btn" type="primary" @click="submitForm">注册</button>
<button class="uni-btn register-btn" type="primary" @click="submitForm">立即注册</button>
<!-- <button @click="navigateBack" class="register-back">返回</button> -->
<match-media :min-width="690">
<view class="link-box">
@ -266,13 +267,14 @@
/deep/ .uni-easyinput__content-input{
padding-left: 0px !important;
}
.uni-forms .uni-forms-item.is-direction-left:nth-of-type(1) /deep/ .uni-easyinput__content-input{
flex: 0.6;
}
.uni-forms .uni-forms-item.is-direction-left:nth-of-type(1) /deep/ .content-clear-icon{
flex: 0.4;
text-align: left;
}
// .uni-forms .uni-forms-item.is-direction-left:nth-of-type(1) /deep/ .uni-easyinput__content-input{
// flex: 0.6;
// }
// .uni-forms .uni-forms-item.is-direction-left:nth-of-type(1) /deep/ .content-clear-icon{
// flex: 0.4;
// text-align: left;
// }
// 使
.getCaptchaCode{
position: absolute;
top: 0px;
@ -283,6 +285,7 @@
}
.register-btn{
border-radius: 10px;
margin-top: 100px;
}
button {
margin-top: 15px;

12
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue

@ -50,18 +50,18 @@
'newPassword2': '',
},
rules: {
oldPassword: {
newPassword: {
rules: [{
required: true,
errorMessage: '请输入新密码',
},
{
pattern: /^.{6,20}$/,
errorMessage: '密码为6 - 20位',
}
// {
// pattern: /^.{6,20}$/,
// errorMessage: '6 - 20',
// }
]
},
...passwordMod.getPwdRules('newPassword', 'newPassword2')
// ...passwordMod.getPwdRules('newPassword', 'newPassword2')
},
logo: "/static/logo.png"
}

Loading…
Cancel
Save