移動端

This commit is contained in:
ryx 2026-01-21 22:14:26 +08:00
parent e7ce198cbd
commit de7ee42319
8 changed files with 445 additions and 75 deletions

View File

@ -34,13 +34,13 @@
// selecticon: svg.replaceAll(/{{bg1}}/g, bgsel1).replaceAll(/{{bg2}}/g, bgsel2),
// icon: svg.replaceAll(/{{bg1}}/g, bggray1).replaceAll(/{{bg2}}/g, bggray2)
// });
// var svg = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M207,110h614c109,0,197,88,197,197v416c0,109-88,197-197,197H207c-109,0-197-88-197-197V308C9,198,97,110,207,110z" fill="{{bg2}}"></path><path d="M865,819H118c-10,0-19-9-19-19c0-3,1-7,2-10l26-35c3-6,10-9,17-9h748c10,0,19,9,19,19c0,3-1,7-2,10l-26,35C878,815,872,819,865,819z M451,285c0-8-6-14-14-14h-246c-8,0-14,6-14,14v246c0,8,6,14,14,14h246c8,0,14-6,14-14V285z M909,503c0-8-6-14-14-14H562c-8,0-14,6-14,14v25c0,8,6,14,14,14h333c8,0,14-6,14-14V503z" fill="{{bg1}}"></path></svg>';
// app.globalData.tabbarArr.push({
// name: 'tabbar.cd',
// fullpath: '/pages/card',
// selecticon: svg.replaceAll(/{{bg1}}/g, bgsel1).replaceAll(/{{bg2}}/g, bgsel2),
// icon: svg.replaceAll(/{{bg1}}/g, bggray1).replaceAll(/{{bg2}}/g, bggray2)
// });
var svg = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M207,110h614c109,0,197,88,197,197v416c0,109-88,197-197,197H207c-109,0-197-88-197-197V308C9,198,97,110,207,110z" fill="{{bg2}}"></path><path d="M865,819H118c-10,0-19-9-19-19c0-3,1-7,2-10l26-35c3-6,10-9,17-9h748c10,0,19,9,19,19c0,3-1,7-2,10l-26,35C878,815,872,819,865,819z M451,285c0-8-6-14-14-14h-246c-8,0-14,6-14,14v246c0,8,6,14,14,14h246c8,0,14-6,14-14V285z M909,503c0-8-6-14-14-14H562c-8,0-14,6-14,14v25c0,8,6,14,14,14h333c8,0,14-6,14-14V503z" fill="{{bg1}}"></path></svg>';
app.globalData.tabbarArr.push({
name: 'tabbar.notify',
fullpath: '/pages/main/notify',
selecticon: svg.replaceAll(/{{bg1}}/g, bgsel1).replaceAll(/{{bg2}}/g, bgsel2),
icon: svg.replaceAll(/{{bg1}}/g, bggray1).replaceAll(/{{bg2}}/g, bggray2)
});
var svg = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M706,460c64-38,107-104,107-179c0-118-106-213-237-213c-131,0-237,95-237,213c0,75,43,141,107,179c-181,51-311,206-311,385c0,39,35,70,78,70H938c43,0,78-32,78-70v-5C1017,661,886,511,706,460L706,460z" fill="{{bg1}}"/><path d="M580,472c64-42,107-115,107-197c0-131-106-237-237-237c-131,0-237,106-237,237c0,83,43,155,107,199c-181,57-311,228-311,427c0,43,14,76,57,76l745,1c43,0,78-35,78-78v-6C891,696,761,528,580,472L580,472z" fill="{{bg2}}"/></svg>';
app.globalData.tabbarArr.push({
name: 'tabbar.me',
@ -57,7 +57,7 @@
app.globalData.srv = 't';
app.globalData.jsnajax = 'ambap/';
app.globalData.jsnurl = {};
app.globalData.jsnurl.t = 'https://ciyon.ciy.cn/';
app.globalData.jsnurl.t = 'https://labsci.ciy.cn/';
app.globalData.demourl = 'https://i.qiboc.cn/app.goc'; //
app.globalData.tokenfield = "ciyap";
app.globalData.tokensalt = "ast34h$3";
@ -67,15 +67,15 @@
app.globalData.dupsec = 60;
app.globalData.storselect = '/';
app.globalData.storlist = {
'/': 'https://ciyon.ciy.cn/ud/',
'/': 'https://labsci.ciy.cn/ud/',
'A': 'https://cf5.nyyzsoft.cn/ud/'
};
app.globalData.stortransfer = ['/'];
if (process.env.NODE_ENV === 'development') {
//#ifdef H5
app.globalData.jsnurl.t = 'https://ciyon.local.ciy.cn/';
app.globalData.storlist['/'] = 'https://ciyon.local.ciy.cn/ud/';
app.globalData.jsnurl.t = 'https://labsci.local.ciy.cn/';
app.globalData.storlist['/'] = 'https://labsci.local.ciy.cn/ud/';
//golang
// app.globalData.jsnurl.t = 'http://ciyonhgo.local.ciy.cn/';

View File

@ -6,6 +6,12 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/notify",
"style": {
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/me",
"style": {
@ -51,6 +57,9 @@
{
"pagePath": "pages/main/index"
},
{
"pagePath": "pages/main/notify"
},
{
"pagePath": "pages/main/me"
}

View File

@ -22,9 +22,9 @@
<view class="icon" :style="{backgroundImage:svg2bg(svg.cqd)}"></view>
<view class="name">游客页面</view>
</view>
<view class="grid" @tap="gourl" data-url="$/pages/me/suggest">
<view class="grid" @tap="gourl" data-url="$/pages/lab/userlist">
<view class="icon" :style="{backgroundImage:svg2bg(svg.cjf)}"></view>
<view class="name">用户页面</view>
<view class="name">成员管理</view>
</view>
<view class="grid" @tap="gourl" data-url="!4187|js_shangpin">
<view class="icon" :style="{backgroundImage:svg2bg(svg.cmh)}"></view>
@ -55,6 +55,7 @@
}
},
onLoad() {
console.log('onload');
if (this.opn.u) {
uni.navigateTo({
url: decodeURIComponent(this.opn.u)
@ -76,6 +77,7 @@
onShow() {
if (this._meid === this.me.id)
return;
console.log('onshow 12');
this._meid = this.me.id;
this.pageno = 0;
this.init.members = [];

View File

@ -0,0 +1,412 @@
<template>
<ciy-header title="我的" mode="scroll"></ciy-header>
<view class="topbg"></view>
<view :style="{height:header_statusbar_height+'px'}"></view>
<view style="padding-top:1rem;">
<view class="avartop">
<image :src="file_stor(me.icon?me.icon:'/img/face.png')" mode="scaleToFill" />
</view>
</view>
<view class="maincard" style="margin-top: -2.5rem;">
<view class="flex flex-center">
<view class="nick" @tap="gourl" data-url="$/pages/me/user_info">{{me.id>0?(me.name?me.name:'游客'):'登录/注册'}}</view>
<view class="icon zy" style="margin-left:1rem;" v-if="showbalance" @tap="getbalance(2)"></view>
<view class="icon by" style="margin-left:1rem;" v-else @tap="getbalance(1)"></view>
</view>
<view class="abs r0 t0" style="opacity: 0;" @tap="gourl" data-url="/pages/demo/index">Demo</view>
<view class="abs r1 b1 txt-smmm" @tap="copyboard('E' + me.eid)" v-if="me.id>0">E{{me.eid}}</view>
<view class="usrnum">
<view>
<view class="num" v-if="showbalance">
<ciy-shownum speed="80" :value="me.mymoney" unit=",100,2|万,1000000,2|亿,10000000000,2"></ciy-shownum>
</view>
<view class="num" v-else>---</view>
<view class="tit">可消费余额</view>
</view>
<view>
<view class="num" v-if="showbalance">
<ciy-shownum :value="me.mycashmoney" unit=",100,2|万,1000000,2|亿,10000000000,2"></ciy-shownum>
</view>
<view class="num" v-else>---</view>
<view class="tit">可提现余额</view>
</view>
<view>
<view class="num" v-if="showbalance">
<ciy-shownum :value="me.mypnt" unit=",1,0|万,10000,2|亿,100000000,2"></ciy-shownum>
</view>
<view class="num" v-else>---</view>
<view class="tit" @tap="gourl" data-url="$/pages/me/pnt_lst">积分</view>
</view>
</view>
</view>
<view class="maincard px4" v-if="me.id>0">
<template v-if="me.accounttimes>tostamp()">
<view class="caption">有效会员</view>
<view class="expdate">{{ccode(g.userlevel, me.userlevel)}} 有效期至 {{todatetime(me.accounttimes, 'd')}}</view>
</template>
<template v-else>
<view class="caption">会员已到期</view>
<view class="expdate" style="color:var(--dag5);">{{ccode(g.userlevel, me.userlevel)}} 到期日 {{todatetime(me.accounttimes, 'd')}}</view>
</template>
<view class="ciy-hr"></view>
<view class="caption">选择{{me.accounttimes>tostamp()?'续费':'付费'}}方案</view>
<view class="userpay" v-if="init.userbuys">
<view class="item" @tap="buyuser(item)" v-for="(item,index) in init.userbuys" :key="index">
<view class="price">{{item.usermoney/100}}</view>
<view class="memo">{{item.name}}</view>
<view class="recommend" v-if="init.recommend == item.id">推荐</view>
</view>
</view>
xiaoxi 消息
<view class="caption">付费会员权益</view>
<view class="cgrid">
<view class="item">
<view class="icon">📇</view>
<view class="txt">权益1</view>
</view>
<view class="item">
<view class="icon">🤝</view>
<view class="txt">权益2</view>
</view>
</view>
</view>
<view class="maincard">
<view class="ciy-grid">
<view class="grid" data-url="$/pages/me/cash_charge" @tap="gourl">
<view class="icon" :style="{backgroundImage:svg2bg(svg.v1)}"></view>
<view class="name">充值</view>
</view>
<view class="grid" data-url="$/pages/me/cashie_lst" @tap="gourl">
<view class="icon" :style="{backgroundImage:svg2bg(svg.v3)}"></view>
<view class="name">收支明细</view>
</view>
<view class="grid" data-url="$/pages/me/cashout_cash" @tap="gourl">
<view class="icon" :style="{backgroundImage:svg2bg(svg.v2)}"></view>
<view class="name">提现</view>
</view>
<view class="grid" data-url="$/pages/me/cashoe_lst" @tap="gourl">
<view class="icon" :style="{backgroundImage:svg2bg(svg.v3)}"></view>
<view class="name">收益明细</view>
</view>
</view>
<view class="ciy-grid">
<view class="grid">
<view class="icon" :style="{backgroundImage:svg2bg(svg.ciy)}"></view>
<view class="name">图标名称</view>
</view>
<view class="grid">
<view class="icon" :style="{backgroundImage:svg2bg(svg.ciy)}"></view>
<view class="name">图标名称</view>
</view>
<view class="grid">
<view class="icon" :style="{backgroundImage:svg2bg(svg.ciy)}"></view>
<view class="name">图标名称</view>
</view>
<view class="grid">
<view class="icon" :style="{backgroundImage:svg2bg(svg.ciy)}"></view>
<view class="name">图标名称</view>
</view>
</view>
</view>
<view class="bg5" style="height:0.3rem;"></view>
<ciy-swipelist v-if="me.id>0" title="众识码" data-url="$/pages/me/safe_ccub" @tap="gourl" :right="tocciy(me.cciy)" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="实名认证" data-url="$/pages/me/safe_real" @tap="gourl" :right="tomsk(me.truename, '#***')" more></ciy-swipelist>
<view class="bg5" style="height:0.3rem;"></view>
<ciy-swipelist v-if="me.id>0" title="个人信息" @tap="gourl" data-url="$/pages/me/user_info" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="收款银行" @tap="gourl" data-url="$/pages/me/user_bank" :right="me.bankaccount?'已设置':'未设置'" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="收货地址" @tap="gourl" data-url="$/pages/me/user_shipaddr" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="我要开票" @tap="gourl" data-url="$/pages/me/invoicing" :right="me.myinvmoney>=1000?'可开票':'未达开票金额'" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="分享二维码" @tap="gourl" data-url="$/pages/me/share_qrcode" more></ciy-swipelist>
<ciy-swipelist v-if="me.mobile" :title="me.needpass?'设置密码':'修改密码'" @tap="gourl" data-url="$/pages/me/safe_password" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="意见建议" @tap="gourl" data-url="$/pages/me/suggest" right="留下您的宝贵建议" more></ciy-swipelist>
<ciy-swipelist title="帮助中心" @tap="gourl" data-url="/pages/pub/psection?id=1" right="FAQ" more></ciy-swipelist>
<ciy-swipelist v-if="me.id>0" title="工单提问" @tap="gourl" data-url="$/pages/me/problem_pub" right="提交您的问题" more></ciy-swipelist>
<ciy-swipelist title="联系客服" more>
<button open-type="contact" plain class="btn tran" style="color:var(--txt5)">在线客服</button>
</ciy-swipelist>
<ciy-swipelist title="关于我们" @tap="gourl" data-url="/pages/pub/paper?id=1" right="众产" more></ciy-swipelist>
<ciy-swipelist title="软件版本" @tap="upver" :right="version" more></ciy-swipelist>
<view class="bg5" v-if="me.id>0" style="height:0.5rem;"></view>
<ciy-swipelist v-if="me.id>0" title="重新登录" @tap="relogin" more></ciy-swipelist>
<ciy-tabbar ref="tabbar"></ciy-tabbar>
</template>
<script>
export default {
data() {
return {
svg: {},
version:'',
showbalance: false,
}
},
onLoad() {
var app = getApp();
this.version = app.globalData._version;
this.load_svgicon(this.file_stor('/svgicon/me.txt')).then(svgs => {
this.svg = svgs;
});
this.getinit();
},
onPullDownRefresh(b) {
var app = getApp();
app.globalData._restorage = true;
uni.stopPullDownRefresh();
},
methods: {
async getinit() {
await this.getauth();
var retjson = await this.callfunc({
func: 'main.me_init',
//cache: 86400,
});
if (retjson.code != 1)
return this.alert(retjson.errmsg);
this.init = retjson;
},
async getbalance(act) {
if (this._loading)
return;
await this.getauth();
if (this.me.id == 0)
return;
if (act == 2) {
this.showbalance = false;
return;
}
this._loading = true;
var retjson = await this.callfunc({
func: 'me.me_balance_get',
data: {}
});
this._loading = false;
if (retjson.code != 1)
return this.alert(retjson.errmsg);
this.showbalance = true;
this.me = this.objdeepmerge(this.me, retjson.user);
this.setstorage('me', this.me);
},
async buyuser(item) {
if (item.userlevel < this.me.userlevel) {
if (await this.askmsg('您当前会员等级高于续费等级,\n是否降级续费', '降级') != 'ok')
return;
}
if (this._loading)
return;
this._loading = true;
var retjson = await this.callfunc({
func: 'me.me_userbuy_create',
data: {
id: item.id
}
});
this._loading = false;
if (retjson.code != 1)
return this.alert(retjson.errmsg);
retjson.provider = 'wxpay';
try {
var retpay = await uni.requestPayment(retjson);
await this.sleep(1000);
var retjson2 = await this.callfunc({
func: 'me.me_userbuy_chk',
data: {
orderid: retjson.orderid
}
});
if (retjson2.code != 1)
return this.toast(retjson2.errmsg);
this.me.accounttimes = retjson2.accounttimes;
this.me.userlevel = retjson2.userlevel;
this.setstorage('me', this.me);
this.toast('支付成功');
} catch (e) {}
},
relogin() {
this.clearstorage();
this.getauth('relogin');
},
upver() {
var app = getApp();
app.appupdate('all', async verinfo => {
return await this.askmsg(verinfo, '更新') == 'ok';
});
},
}
}
</script>
<style>
.topbg {
height: 10rem;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.topbg::before {
content: '';
left: -5rem;
right: -5rem;
border-radius: 0 0 100vw 100vw;
height: 100%;
background: linear-gradient(60deg, var(--e-userbg1), var(--e-userbg2));
position: absolute;
top: 0;
pointer-events: none;
z-index: 0;
}
.avartop {
position: relative;
display: flex;
margin: 0 0 0 1.5rem;
width: 5rem;
height: 5rem;
border-radius: 50%;
background: var(--bg2);
border: 2px solid var(--bg1);
overflow: hidden;
z-index: 3;
}
.avartop>image {
width: 100%;
height: 100%;
}
.maincard {
position: relative;
background: var(--bg1);
color: var(--txt6);
padding: 0.5rem;
margin: 0 1rem 1rem 1rem;
border-radius: 0.3rem;
box-shadow: 0 4px 8px var(--bg6);
}
.maincard .nick {
font-size: 1.2rem;
font-weight: bold;
padding-left: 4.5rem;
}
.expdate {
display: block;
padding-left: 1rem;
margin-top: -1rem;
margin-bottom: 1rem;
font-size: 0.9rem;
color: var(--succ5);
}
.caption {
font-size: 1.2rem;
font-weight: bold;
padding: 1em 0;
}
.userpay {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.userpay>.item {
position: relative;
width: 30%;
padding: 1em 0;
text-align: center;
border: 1px solid var(--bg4);
border-radius: 1rem;
}
.userpay>.item>.price {
display: block;
font-size: 1.2rem;
font-weight: bold;
color: var(--man5);
}
.userpay>.item>.memo {
font-size: 13px;
color: var(--txt4);
}
.userpay>.item>.recommend {
position: absolute;
top: -0.5rem;
right: 0.5rem;
padding: 0.2rem 0.8rem;
font-size: 0.8rem;
color: var(--dagt);
background: var(--dag5);
border-radius: 1rem;
}
.cgrid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.cgrid .item {
width: 48%;
margin-bottom: 1rem;
padding: 1rem;
display: flex;
flex-direction: column;
align-items: center;
background: var(--bg3);
border-radius: 1rem;
}
.cgrid .icon {
width: 2rem;
height: 2rem;
margin-bottom: 0.5rem;
border-radius: 50%;
background: linear-gradient(-25deg, #1890ff, #c0e1ff);
display: flex;
justify-content: center;
align-items: center;
font-size: 1.5rem;
}
.icon {
width: 1.5rem;
height: 1.5rem;
}
.icon.by {
background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkyNi4wMzM5MiAzMzkuODcwNzJjLTkuODY2MjQgMC0xOS4xNjkyOCA0LjE0MjA4LTI2LjE3ODU2IDExLjA4NDgt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ODQgNjEuNTczMTItNzUuNjQ4IDEyNS43NTIzMi0xMjQuNTU5MzZDMzUxLjgxMDU2IDMyMC43NjI4OCA0MzkuNjQ5MjggMjg0LjE5MDcyIDUxMiAyODQuMTkwNzJtMC03MC44NzYxNmMtMjIwLjMyODk2IDAtNDUwLjU2IDI1MC41OTMyOC00NTAuNTYgMjk4LjY4NTQ0czIzNS4xODIwOCAyOTguNjg1NDQgNDUwLjU2IDI5OC42ODU0NGMyMTAuNDI2ODggMCA0NTAuNTYtMjQ1LjUyOTYgNDUwLjU2LTI5OC42ODU0NCAwLTQ4LjA5MjE2LTIzMC4yMzEwNC0yOTguNjg1NDQtNDUwLjU2LTI5OC42ODU0NHoiIGZpbGw9IiM2NjY2NjYiPjwvcGF0aD48cGF0aCBkPSJNNTEyIDQ0Ni4xODc1MmMzNi4yODU0NCAwIDY1LjgxMjQ4IDI5LjUyMTkyIDY1LjgxMjQ4IDY1LjgxMjQ4cy0yOS41MjcwNCA2NS44MTI0OC02NS44MTI0OCA2NS44MTI0OFM0NDYuMTg3NTIgNTQ4LjI5MDU2IDQ0Ni4xODc1MiA1MTIgNDc1LjcxNDU2IDQ0Ni4xODc1MiA1MTIgNDQ2LjE4NzUybTAtNzAuODc2MTZjLTc1LjQ4OTI4IDAtMTM2LjY4ODY0IDYxLjE5NDI0LTEzNi42ODg2NCAxMzYuNjg4NjRTNDM2LjUxMDcyIDY0OC42ODg2NCA1MTIgNjQ4LjY4ODY0czEzNi42ODg2NC02MS4xOTQyNCAxMzYuNjg4NjQtMTM2LjY4ODY0UzU4Ny40ODkyOCAzNzUuMzExMzYgNTEyIDM3NS4zMTEzNnoiIGZpbGw9IiM2NjY2NjYiPjwvcGF0aD48L3N2Zz4=");
}
.usrnum {
padding-top: 1rem;
padding-bottom: 0.5rem;
display: flex;
}
.usrnum>view {
flex: 1;
text-align: center;
}
.usrnum .num {
height: 2.5rem;
padding-top: 0.2rem;
font-size: 1.3rem;
}
.usrnum .tit {
font-size: 0.9rem;
}
</style>

View File

@ -19,6 +19,7 @@
"多语言切换": "多语言切换",
"tabbar.index": "广场",
"tabbar.notify": "消息",
"tabbar.me": "我的",
"login.xieyi": "/pages/main/paper?id=3",
"login.tablogin": "登录",

View File

@ -42,7 +42,7 @@ function verifyuser($post = null) {
$auth = json_decode(encrypt($ciyauth, 'D', $_token['salt']), true);
if ($auth == null)
return null;
$csql = new \ciy\sql('ap_user'); //弃用redis集群
$csql = new \ciy\sql('lab_user'); //弃用redis集群
$csql->where('id', $auth['id']);
$userrow = $db->getone($csql);
if (!is_array($userrow))
@ -53,22 +53,12 @@ function verifyuser($post = null) {
return null;
if ($userrow['exptimes'] < time() - $_token['expsec'])
return null;
if ($post && $userrow['upid'] == 0) {
$upid = $post->getint('upid');
if ($upid > 0) {
$updata = array();
$updata['upid'] = $upid;
$csql = new \ciy\sql('ap_user');
$csql->where('id', $userrow['id']);
$db->update($csql, $updata);
}
}
if ($userrow['exptimes'] > time())
return $userrow;
$exp = time() + $_token['swapsec'];
$sid = randstr(10);
$auth['_s'] = $sid;
if ($db->execute('update ap_user set exptimes=?,sid=? where id=?', array($exp, $sid, $auth['id'])) === false)
if ($db->execute('update lab_user set exptimes=?,sid=? where id=?', array($exp, $sid, $auth['id'])) === false)
return null;
$authstr = json_encode($auth, JSON_PARTIAL_OUTPUT_ON_ERROR);
$enauth = encrypt($authstr, 'E', $_token['salt']);

View File

@ -24,7 +24,7 @@ class login {
$user = $post->get('user');
if (empty($user))
return errjson('请填写用户名');
$csql = new \ciy\sql('ap_user');
$csql = new \ciy\sql('lab_user');
$csql->where('mobile', $user);
$rsuser = $db->getone($csql);
if ($rsuser === false)
@ -52,7 +52,7 @@ class login {
$updata = array();
$updata['trytime'] = array('trytime+1');
$updata['logintimes'] = tostamp();
$csql = new \ciy\sql('ap_user');
$csql = new \ciy\sql('lab_user');
$csql->where('id', $rsuser['id']);
$db->update($csql, $updata);
savelog($db, $rsuser['id'], 'LOGINERR', '用户[' . $user . ']登录密码错误' . md5('1' . $_token['salt']));
@ -67,30 +67,12 @@ class login {
$updata['sid'] = $sid;
$updata['exptimes'] = $exp;
$updata['ip'] = getip();
$csql = new \ciy\sql('ap_user');
$csql = new \ciy\sql('lab_user');
$csql->where('id', $id);
if ($db->update($csql, $updata) === false)
return errjson('user数据库更新失败:' . $db->error);
if (!empty($appcid)) {
$csql = new \ciy\sql('ap_usr_ext');
$csql->where('id', $rsuser['id']);
$extrow = $db->getone($csql);
if (is_array($extrow)) {
if ($extrow['appcid'] != $appcid) {
$updata = array();
$updata['appcid'] = $appcid;
if ($db->update($csql, $updata) === false)
throw new \Exception('ext更新失败:' . $db->error);
}
} else {
$updata = array();
$updata['appcid'] = $appcid;
$updata['id'] = $rsuser['id'];
if ($db->insert($csql, $updata) === false)
throw new \Exception('ext新增失败:' . $db->error);
}
}
self::savelug($db, 1, $rsuser['id'], $model);
$ret = self::getsync($rsuser, $sid);
$csql = new \ciy\sql('zc_debug_user');
@ -392,40 +374,14 @@ class login {
$ret['pnttrack'] = $db->get($csql);
$ret['me'] = array();
$ret['me']['addtimes'] = $userrow['addtimes'];
$ret['me']['accounttimes'] = $userrow['accounttimes'];
//$ret['me']['saasid_a'] = $userrow['saasid_a'];
$ret['me']['id'] = $userrow['id'];
$ret['me']['eid'] = enid($userrow['id']);
$ret['me']['upid'] = $userrow['upid'];
$ret['me']['icon'] = $userrow['icon'];
$ret['me']['mobile'] = $userrow['mobile'];
$ret['me']['name'] = $userrow['name'];
$ret['me']['userlevel'] = $userrow['userlevel'];
$ret['me']['mymoney'] = $userrow['mymoney'];
$ret['me']['mycashmoney'] = $userrow['mycashmoney'];
$ret['me']['myinvmoney'] = $userrow['myinvmoney'];
$ret['me']['mybondmoney'] = $userrow['mybondmoney'];
$ret['me']['mypnt'] = $userrow['mypnt'];
$ret['me']['certs'] = $userrow['certs'];
$ret['me']['dvotecnt'] = $userrow['dvotecnt'];
$ret['me']['needpass'] = empty($userrow['password']);
$ret['me']['cciy'] = '';
$csql = new \ciy\sql('ap_usr_ext');
$csql->where('id', $userrow['id']);
$extrow = $db->getone($csql);
if (is_array($extrow)) {
$ret['me']['truename'] = $extrow['truename'];
$ret['me']['email'] = $extrow['email'];
$ret['me']['wxno'] = $extrow['wxno'];
$ret['me']['idid'] = $extrow['idid'];
$ret['me']['cciy'] = $extrow['cciy'] . '';
$ret['me']['cashtype'] = $extrow['cashtype'];
$ret['me']['bankno'] = $extrow['bankno'];
$ret['me']['bankname'] = $extrow['bankname'];
$ret['me']['bankaccount'] = $extrow['bankaccount'];
$ret['me']['bankcode'] = $extrow['bankcode'];
} else {
$ret['me']['truename'] = '';
}
return succjson($ret);
}
public static function json_logout() {

View File

@ -1,5 +1,5 @@
cqd:<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M546.334118 258.198588V106.315294h288.527058V57.825882c0-31.924706-25.840941-57.825882-57.825882-57.825882H103.002353a57.825882 57.825882 0 0 0-57.825882 57.825882v886.66353C45.176471 976.414118 71.077647 1002.315294 103.002353 1002.315294H777.035294a57.765647 57.765647 0 0 0 57.795765-57.825882v-63.668706H121.133176v-151.853177H834.861176v-55.717647H121.133176v-151.823058H834.861176v-55.717648h-288.527058v-151.823058h288.527058v-55.717647h-288.527058z" fill="#A267F8"></path><path d="M834.861176 465.679059h121.494589V313.825882H834.861176z" fill="#F9D11F"></path><path d="M546.334118 465.679059h288.527058V313.825882h-288.527058z" fill="#7E42B9"></path><path d="M834.861176 673.249882h121.494589v-151.853176H834.861176z" fill="#F9D11F"></path><path d="M121.103059 673.249882h713.728v-151.853176H121.103059z" fill="#7E42B9"></path><path d="M834.861176 258.168471h121.494589V106.315294H834.861176z" fill="#F9D11F"></path><path d="M546.334118 258.168471h288.527058V106.315294h-288.527058z" fill="#7E42B9"></path><path d="M834.861176 880.790588h121.494589v-151.853176H834.861176z" fill="#F9D11F"></path><path d="M121.103059 880.790588h713.728v-151.853176H121.103059z" fill="#7E42B9"></path><path d="M485.586824 465.709176H121.103059v-81.799529a70.053647 70.053647 0 0 1 70.053647-70.053647h224.37647a70.053647 70.053647 0 0 1 70.053648 70.053647v81.799529zM386.891294 189.831529a83.516235 83.516235 0 1 1-167.03247 0 83.516235 83.516235 0 0 1 167.03247 0" fill="#FFFFFF"></path></svg>
cjf:<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M902.384941 257.114353H245.338353a98.454588 98.454588 0 0 0-98.454588 98.424471V746.315294a98.484706 98.484706 0 0 0 98.484706 98.454588h57.675294v141.914353c0 13.914353 16.745412 20.841412 26.593882 11.023059l152.937412-152.937412h419.84a98.484706 98.484706 0 0 0 98.42447-98.484706V355.568941a98.454588 98.454588 0 0 0-98.454588-98.42447" fill="#FF7E50"></path><path d="M98.424471 0h657.046588a98.454588 98.454588 0 0 1 98.484706 98.424471v390.806588a98.424471 98.424471 0 0 1-98.484706 98.42447H697.825882v141.914353a15.570824 15.570824 0 0 1-26.593882 11.023059l-152.997647-152.937412H98.424471A98.454588 98.454588 0 0 1 0 489.231059V98.424471A98.484706 98.484706 0 0 1 98.484706 0" fill="#F9D11F"></path><path d="M671.232 740.592941a15.600941 15.600941 0 0 0 26.624-11.023059v-141.94447h57.645176a98.394353 98.394353 0 0 0 98.424471-98.424471V257.084235H245.338353a98.424471 98.424471 0 0 0-98.424471 98.424471v232.116706h371.350589l152.967529 152.997647z" fill="#ED4042"></path><path d="M303.043765 468.269176h394.812235V358.098824H303.043765z" fill="#FFFFFF"></path></svg>
cjf:<svg t="1769003754041" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1280" width="200" height="200"><path d="M665.9 904.25a1962 1962 0 0 1-312.52 0 262.4 262.4 0 0 1-240.67-240.67 1962 1962 0 0 1 0-312.52 262.4 262.4 0 0 1 240.67-240.67 1962 1962 0 0 1 312.52 0 262.4 262.4 0 0 1 240.67 240.67 1962 1962 0 0 1 0 312.52A262.4 262.4 0 0 1 665.9 904.25z" fill="#FFE4CF" p-id="1281"></path><path d="M270.33 694.43l-4.66-44.23q-4.56-57-4.57-114.18c0-38.33 1.52-92.3 4.57-130.53l2.57-32.12a154.49 154.49 0 0 1 141.69-141.7l37.6-3c34.16-2.73 90.06-2.73 124.22 0l37.59 3A154.49 154.49 0 0 1 751 373.37l2.57 32.12c3 38.12 4.57 92 4.57 130.18s-1.53 76.41-4.57 114.53L749 694.43c-0.14 1.75-0.32 3.48-0.53 5.2-9.83 80.49-106.62 116.59-167.47 63C556.93 741.5 536 721 509.64 721c-24.7 0-47.76 20.64-72.4 41.78C375.46 815.73 278.72 778 270.56 697c-0.08-0.85-0.16-1.71-0.23-2.57z" fill="#FF6E1F" p-id="1282"></path><path d="M529.75 389.31l23.7 48a22.43 22.43 0 0 0 16.89 12.27l53 7.7c18.39 2.67 25.74 25.28 12.43 38.26l-38.35 37.37a22.47 22.47 0 0 0-6.42 19.87l9 52.78c3.14 18.32-16.09 32.29-32.55 23.64l-47.39-24.91a22.41 22.41 0 0 0-20.88 0l-47.37 24.91c-16.46 8.65-35.69-5.32-32.55-23.64l9.06-52.78a22.44 22.44 0 0 0-6.46-19.85l-38.34-37.37c-13.31-13-6-35.59 12.43-38.26l53-7.7a22.43 22.43 0 0 0 16.89-12.27l23.7-48c8.21-16.69 31.98-16.69 40.21-0.02z" fill="#FFE4CF" p-id="1283"></path></svg>
cmh:<svg viewBox="0 0 1355 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M663.491765 1002.315294c-162.454588 0-294.159059-131.734588-294.159059-294.189176V109.236706A109.236706 109.236706 0 0 1 478.569412 0h369.844706a109.236706 109.236706 0 0 1 109.236706 109.236706v598.889412c0 162.454588-131.704471 294.159059-294.159059 294.159058" fill="#31EC7C"></path><path d="M871.484235 916.148706c-114.868706 114.868706-301.116235 114.868706-416.015059 0L32.015059 492.634353a109.206588 109.206588 0 0 1 0-154.443294l261.511529-261.541647a109.206588 109.206588 0 0 1 154.443294 0l423.514353 423.454117c114.868706 114.928941 114.868706 301.176471 0 416.045177" fill="#A267F8"></path><path d="M455.499294 916.148706c-114.868706-114.868706-114.868706-301.116235 0-416.015059L879.013647 76.649412a109.206588 109.206588 0 0 1 154.443294 0l261.541647 261.541647a109.206588 109.206588 0 0 1 0 154.443294L871.514353 916.148706c-114.898824 114.868706-301.176471 114.868706-416.015059 0" fill="#F83CB6"></path><path d="M871.484235 500.133647L663.491765 292.141176l-208.022589 207.992471c-114.838588 114.868706-114.838588 301.116235 0 416.015059 114.898824 114.868706 301.176471 114.868706 416.015059 0 114.868706-114.898824 114.868706-301.146353 0-416.015059" fill="#7E42B9"></path><path d="M740.532706 636.235294a101.707294 101.707294 0 0 1-143.811765 143.811765 101.707294 101.707294 0 0 1 143.811765-143.811765" fill="#FFFFFF"></path></svg>
ctg:<svg viewBox="0 0 1114 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M801.039059 672.677647l-198.415059 198.415059-198.415059-198.415059-155.888941-155.888941 198.415059-198.415059 155.888941 155.888941 220.16-220.129882V133.150118a133.150118 133.150118 0 0 0-133.150118-133.12H118.211765C44.664471 0 0 59.632941 0 133.12v735.954824C0 942.682353 44.664471 1002.315294 118.211765 1002.315294h571.422117a133.12 133.12 0 0 0 133.12-133.180235v-218.172235l-21.714823 21.744941z" fill="#F9D11F"></path><path d="M1105.92 367.766588l-198.384941-198.415059-84.751059 84.781177v396.8z" fill="#3193FF"></path><path d="M446.735059 318.403765L248.32 516.818824l155.888941 155.888941 198.415059 198.415059 198.415059-198.415059 21.744941-21.744941V254.132706l-220.16 220.16z" fill="#006FD9"></path><path d="M119.657412 239.344941h583.439059v-134.625882H119.657412zM119.687529 882.627765h179.501177v-134.625883h-179.501177z" fill="#FFFFFF"></path></svg>