Skip to content

Commit de5f5bc

Browse files
committed
修正细节
1 parent af665f6 commit de5f5bc

File tree

6 files changed

+83
-59
lines changed

6 files changed

+83
-59
lines changed

Sourcecode/Song.ViewData/Methods/Account.cs

+29-24
Original file line numberDiff line numberDiff line change
@@ -1739,33 +1739,38 @@ public Song.Entities.Accounts UserUnbind(string field)
17391739
[HttpPost]
17401740
public Song.Entities.Accounts UserCreate(Song.Entities.Accounts acc, string openid,string field)
17411741
{
1742-
//账号为空,则自动创建;如果不为空,则判断是否重复
1743-
bool accexist = false;
1744-
if (string.IsNullOrWhiteSpace(acc.Ac_AccName))
1745-
acc.Ac_AccName = WeiSha.Core.Request.SnowID().ToString();
1742+
if (string.IsNullOrWhiteSpace(acc.Ac_AccName)) acc.Ac_AccName = WeiSha.Core.Request.SnowID().ToString();
1743+
//判断账号是否已经存在
1744+
Accounts accorig = Business.Do<IAccounts>().IsAccountsExist(acc.Ac_AccName);
1745+
//如果不存在,则新增
1746+
if (accorig == null)
1747+
{
1748+
//默认账号为审核通过和启用
1749+
acc.Ac_IsPass = acc.Ac_IsUse = true;
1750+
acc.Ac_Pw = WeiSha.Core.Request.UniqueID();
1751+
//头像图片
1752+
string headurl = acc.Ac_Photo;
1753+
if (!string.IsNullOrWhiteSpace(headurl))
1754+
{
1755+
string photoPath = _phyPath + openid + ".jpg";
1756+
WeiSha.Core.Request.LoadFile(headurl, photoPath);
1757+
acc.Ac_Photo = openid + ".jpg";
1758+
}
1759+
Business.Do<IAccounts>().AccountsAdd(acc);
1760+
Business.Do<IAccounts>().BindThirdparty(acc, openid, acc.Ac_Name, headurl, field);
1761+
accorig = Business.Do<IAccounts>().AccountsSingle(acc.Ac_ID);
1762+
}
17461763
else
1747-
accexist = Business.Do<IAccounts>().IsAccountExist(acc.Ac_AccName, -1);
1748-
if (accexist) acc.Ac_AccName += "_" + WeiSha.Core.Request.SnowID().ToString();
1749-
1750-
acc.Ac_IsPass = acc.Ac_IsUse = true;
1751-
acc.Ac_Pw = WeiSha.Core.Request.UniqueID();
1752-
//头像图片
1753-
string headurl = acc.Ac_Photo;
1754-
if (!string.IsNullOrWhiteSpace(headurl))
17551764
{
1756-
string photoPath = _phyPath + openid + ".jpg";
1757-
WeiSha.Core.Request.LoadFile(headurl, photoPath);
1758-
acc.Ac_Photo = openid + ".jpg";
1765+
//生成绑定记录
1766+
Business.Do<IAccounts>().BindThirdparty(accorig, openid, acc.Ac_Name, acc.Ac_Photo, field);
17591767
}
1760-
int acid = Business.Do<IAccounts>().AccountsAdd(acc);
1761-
//生成绑定记录
1762-
acc = Business.Do<IAccounts>().BindThirdparty(acc, openid, acc.Ac_Name, headurl, field);
1763-
Song.Entities.Accounts nacc = Business.Do<IAccounts>().AccountsSingle(acid);
1764-
_tran(nacc);
1765-
nacc = Business.Do<IAccounts>().AccountsLogin(nacc);
1766-
nacc.Ac_Pw = LoginAccount.Status.Generate_Checkcode(nacc);
1767-
LoginAccount.Status.Fresh(nacc);
1768-
return nacc;
1768+
1769+
_tran(accorig);
1770+
accorig = Business.Do<IAccounts>().AccountsLogin(accorig);
1771+
accorig.Ac_Pw = LoginAccount.Status.Generate_Checkcode(accorig);
1772+
LoginAccount.Status.Fresh(accorig);
1773+
return accorig;
17691774
}
17701775
/// <summary>
17711776
/// 获取学员账号绑定的第三方平台的信息

Sourcecode/Song.WebSite/Templates/OrgAdmin/Default/Learningcard/OutputExcel.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<el-card shadow="never" class="files">
3333
<div slot="header" class="clearfix">
34-
<span icon="&#xe6a7"> 文件列表
34+
<span icon="&#xe6a7"> 导出文件的下载列表
3535
<span v-if="files.length>0">({{files.length}})</span>
3636
</span>
3737
<el-popconfirm title="确定删除所有文件吗?" @confirm="deleteFileAll()" v-if="files.length>0">

Sourcecode/Song.WebSite/Templates/OrgAdmin/Default/RechargeCode/Codeset.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
</el-link>
4444
</template>
4545
</el-table-column>
46-
<el-table-column label="数量" width="150" class-name="countscope">
46+
<el-table-column label="数量" width="150" class-name="countscope">
4747
<template slot-scope="scope">
48-
<span title="已经使用">{{scope.row.Rs_UsedCount}}</span>
48+
<span title="已经使用">{{scope.row.Rs_UsedCount}}</span>
4949
<span> / </span>
5050
<span title="总数">{{scope.row.Rs_Count}}</span>
5151
</template>
@@ -56,7 +56,7 @@
5656

5757
</template>
5858
</el-table-column>
59-
<el-table-column label="有效期" width="250" align="center">
59+
<el-table-column label="有效期" width="250" align="center">
6060
<template slot-scope="scope">
6161
<span class="limit">{{scope.row.Rs_LimitStart|date('yyyy-MM-dd')}}</span>
6262
@@ -84,9 +84,11 @@
8484
查看充值码
8585
</span>
8686
</el-dropdown-item>
87-
<el-dropdown-item icon="el-icon-position" @click.native="outputExcel(scope.row)">导出Excel
87+
<el-dropdown-item @click.native="outputExcel(scope.row)">
88+
<span icon="&#xe85e">导出Excel</span>
8889
</el-dropdown-item>
89-
<el-dropdown-item icon="el-icon-position" @click.native="outputQrCode(scope.row)">导出二维码
90+
<el-dropdown-item @click.native="outputQrCode(scope.row)">
91+
<span icon="&#xa053">导出二维码</span>
9092
</el-dropdown-item>
9193

9294

Sourcecode/Song.WebSite/Templates/OrgAdmin/Default/Student/Batchdisable.html

+19-12
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@
99

1010
<body>
1111
<div id="vapp" v-cloak>
12-
13-
<el-tabs v-model="activeName" type="border-card">
14-
<el-tab-pane label="信息录入" name="first">
12+
<div class="panel">
13+
<el-tabs v-model="activeName" type="border-card">
14+
<el-tab-pane label="信息录入" name="first">
15+
</el-tab-pane>
16+
<el-tab-pane label="录入数据解析" name="second">
17+
</el-tab-pane>
18+
<el-tab-pane label="帮助" name="help">
19+
<span slot="label">
20+
<icon>&#xa026</icon> 操作说明
21+
</span>
22+
</el-tab-pane>
23+
</el-tabs>
24+
<div v-show="activeName=='first'" remark="信息录入" tab="first">
1525
<div class="first_intro">
1626
请在下面输入框录入学员信息,换行分隔<br />并明确录入的是:
1727
<el-radio-group v-model="search_type">
@@ -22,8 +32,8 @@
2232
</div>
2333
<el-input type="textarea" class="inputText" :rows="2" placeholder="请输入内容" v-model="inputText">
2434
</el-input>
25-
</el-tab-pane>
26-
<el-tab-pane label="录入数据解析" name="second">
35+
</div>
36+
<div v-show="activeName=='second'" remark="录入数据解析" tab="second">
2737
<el-table ref="datatables" border resizable :stripe="true" :data="datas" tooltip-effect="dark"
2838
style="width: 100%">
2939
<el-table-column type="index" label="#" align="center">
@@ -51,11 +61,8 @@
5161
</template>
5262
</el-table-column>
5363
</el-table>
54-
</el-tab-pane>
55-
<el-tab-pane label="帮助" name="help">
56-
<span slot="label">
57-
<icon>&#xa026</icon> 操作说明
58-
</span>
64+
</div>
65+
<div v-show="activeName=='help'" remark="基本信息" tab="help">
5966
<div class="help_title">
6067
第一步:
6168
</div>
@@ -74,8 +81,8 @@
7481
<div class="help_intro">
7582
点击按钮“批量禁用学员”,等待完成即可。
7683
</div>
77-
</el-tab-pane>
78-
</el-tabs>
84+
</div>
85+
</div>
7986
<div class="footer">
8087
<el-button type="primary" native-type="submit" :loading="loading" plain @click="btnBatch()">
8188
<icon v-if="!loading">&#xa048</icon>批量禁用学员

Sourcecode/Song.WebSite/Templates/OrgAdmin/Default/Student/Styles/Batchdisable.css

+24-13
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
@charset "utf-8";
22

3-
#vapp {
4-
padding: 10px;
3+
.panel {
4+
width: 100%;
5+
height: calc(100% - 55px);
6+
border: 1px solid #DCDFE6;
57
box-sizing: border-box;
68
}
79

8-
.el-tabs {
9-
height: calc(100% - 40px);
10+
.panel>div:not(:first-child) {
11+
border-top: none;
12+
}
13+
.panel>div[tab]{
14+
box-sizing: border-box;
15+
height: calc(100% - 50px);
16+
padding: 10px;
17+
overflow-y: auto;
18+
overflow-x: hidden;
19+
box-sizing: border-box;
20+
}
21+
.panel>div[tab='second']{
22+
padding: 0px;
23+
}
24+
.el-tabs__content {
25+
display: none;
26+
}
27+
.el-tabs--border-card {
28+
box-shadow: none;
29+
border: none;
1030
}
1131

1232
.first_intro {
1333
margin: 10px 0px 10px 0px;
1434
line-height: 30px;
1535
}
1636

17-
div.el-tabs__content {
18-
height: calc(100% - 70px);
19-
overflow-y: auto;
20-
}
21-
22-
div.el-tabs__content>div {
23-
height: calc(100% - 10px);
24-
}
25-
2637
.inputText {
2738
height: calc(100% - 80px);
2839
}

Sourcecode/Song.WebSite/Utilities/Styles/Public.css

+3-4
Original file line numberDiff line numberDiff line change
@@ -260,28 +260,27 @@ dl.files {
260260
counter-reset: dd;
261261
list-style-type: none;
262262
margin: 8px 0px;
263+
padding: 0px;
263264
}
264265

265-
dl.files, dl.files dd, dl.files dt {
266+
dl.files dd, dl.files dt {
266267
padding: 0px;
267268
margin: 0px;
268269
}
269270

270271
dl.files dt {
271272
padding: 8px;
272-
273273
}
274274

275275
dl.files dd::before {
276276
counter-increment: dd;
277277
content: ""counter(dd) " . ";
278-
279278
}
280279

281280
dl.files dd {
282281
display: flex;
283282
justify-content: space-between;
284-
padding: 3px 10px;
283+
padding: 3px 10px 3px 15px;
285284
box-sizing: content-box;
286285
}
287286

0 commit comments

Comments
 (0)