mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:43:26 +08:00
Merge branch 'master' of http://git.coreshop.cn/jianweie/coreshoppro
This commit is contained in:
@@ -333,11 +333,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
//给sheet1添加第一行的头部标题
|
//给sheet1添加第一行的头部标题
|
||||||
var headerRow = mySheet.CreateRow(0);
|
var headerRow = mySheet.CreateRow(0);
|
||||||
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
||||||
|
var cellNum = 0;
|
||||||
{% for field in ModelFields %}
|
{% for field in ModelFields %}
|
||||||
var cell{{ forloop.index0 }} = headerRow.CreateCell({{ forloop.index0 }});
|
var cell{{ forloop.index0 }} = headerRow.CreateCell(cellNum);
|
||||||
cell{{ forloop.index0 }}.SetCellValue("{{field.ColumnDescription}}");
|
cell{{ forloop.index0 }}.SetCellValue("{{field.ColumnDescription}}");
|
||||||
cell{{ forloop.index0 }}.CellStyle = headerStyle;
|
cell{{ forloop.index0 }}.CellStyle = headerStyle;
|
||||||
mySheet.SetColumnWidth({{ forloop.index0 }}, 10 * 256);
|
mySheet.SetColumnWidth(cellNum, 10 * 256);
|
||||||
|
cellNum++;
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
headerRow.Height = 30 * 20;
|
headerRow.Height = 30 * 20;
|
||||||
var commonCellStyle = ExcelHelper.GetCommonStyle(book);
|
var commonCellStyle = ExcelHelper.GetCommonStyle(book);
|
||||||
@@ -346,10 +348,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
for (var i = 0; i < listModel.Count; i++)
|
for (var i = 0; i < listModel.Count; i++)
|
||||||
{
|
{
|
||||||
var rowTemp = mySheet.CreateRow(i + 1);
|
var rowTemp = mySheet.CreateRow(i + 1);
|
||||||
|
var cellNumTemp = 0;
|
||||||
{% for field in ModelFields %}
|
{% for field in ModelFields %}
|
||||||
var rowTemp{{ forloop.index0 }} = rowTemp.CreateCell({{ forloop.index0 }});
|
var rowTemp{{ forloop.index0 }} = rowTemp.CreateCell(cellNumTemp);
|
||||||
rowTemp{{ forloop.index0 }}.SetCellValue(listModel[i].{{field.DbColumnName}}.ToString());
|
rowTemp{{ forloop.index0 }}.SetCellValue(listModel[i].{{field.DbColumnName}}.ToString());
|
||||||
rowTemp{{ forloop.index0 }}.CellStyle = commonCellStyle;
|
rowTemp{{ forloop.index0 }}.CellStyle = commonCellStyle;
|
||||||
|
cellNumTemp++;
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
// 导出excel
|
// 导出excel
|
||||||
@@ -451,11 +455,13 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
//给sheet1添加第一行的头部标题
|
//给sheet1添加第一行的头部标题
|
||||||
var headerRow = mySheet.CreateRow(0);
|
var headerRow = mySheet.CreateRow(0);
|
||||||
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
var headerStyle = ExcelHelper.GetHeaderStyle(book);
|
||||||
|
var cellNum = 0;
|
||||||
{% for field in ModelFields %}
|
{% for field in ModelFields %}
|
||||||
var cell{{ forloop.index0 }} = headerRow.CreateCell({{ forloop.index0 }});
|
var cell{{ forloop.index0 }} = headerRow.CreateCell(cellNum);
|
||||||
cell{{ forloop.index0 }}.SetCellValue("{{field.ColumnDescription}}");
|
cell{{ forloop.index0 }}.SetCellValue("{{field.ColumnDescription}}");
|
||||||
cell{{ forloop.index0 }}.CellStyle = headerStyle;
|
cell{{ forloop.index0 }}.CellStyle = headerStyle;
|
||||||
mySheet.SetColumnWidth({{ forloop.index0 }}, 10 * 256);
|
mySheet.SetColumnWidth(cellNum, 10 * 256);
|
||||||
|
cellNum++;
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
headerRow.Height = 30 * 20;
|
headerRow.Height = 30 * 20;
|
||||||
@@ -465,12 +471,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
for (var i = 0; i < listModel.Count; i++)
|
for (var i = 0; i < listModel.Count; i++)
|
||||||
{
|
{
|
||||||
var rowTemp = mySheet.CreateRow(i + 1);
|
var rowTemp = mySheet.CreateRow(i + 1);
|
||||||
|
var cellNumTemp = 0;
|
||||||
{% for field in ModelFields %}
|
{% for field in ModelFields %}
|
||||||
|
var rowTemp{{ forloop.index0 }} = rowTemp.CreateCell(cellNumTemp);
|
||||||
var rowTemp{{ forloop.index0 }} = rowTemp.CreateCell({{ forloop.index0 }});
|
rowTemp{{ forloop.index0 }}.SetCellValue(listModel[i].{{field.DbColumnName}}.ToString());
|
||||||
rowTemp{{ forloop.index0 }}.SetCellValue(listModel[i].{{field.DbColumnName}}.ToString());
|
rowTemp{{ forloop.index0 }}.CellStyle = commonCellStyle;
|
||||||
rowTemp{{ forloop.index0 }}.CellStyle = commonCellStyle;
|
cellNumTemp++;
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
// 写入到excel
|
// 写入到excel
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
|
|
||||||
.wrap { font-size: 14px;
|
.wrap { font-size: 14px;
|
||||||
.content { width: 300px; margin: 40px auto 0;
|
.content { width: 350px; margin: 40px auto 0;
|
||||||
|
.title { text-align: center; font-size: 25px; font-weight: 500; margin-bottom: 50px; }
|
||||||
.title { text-align: left; font-size: 25px; font-weight: 500; margin-bottom: 50px; }
|
|
||||||
input { text-align: left; margin-bottom: 5px; padding-bottom: 3px; }
|
input { text-align: left; margin-bottom: 5px; padding-bottom: 3px; }
|
||||||
.tips { color: $u-type-info; margin-bottom: 30px; margin-top: 4px; }
|
.tips { color: $u-type-info; margin-bottom: 30px; margin-top: 4px; }
|
||||||
.getCaptcha { background-color: rgb(253, 243, 208); color: $u-tips-color; border: none; font-size: 15px; padding: 6px 0;
|
|
||||||
|
|
||||||
&::after { border: none; }
|
|
||||||
}
|
|
||||||
.alternative { color: $u-tips-color; display: flex; justify-content: space-between; margin-top: 15px; }
|
.alternative { color: $u-tips-color; display: flex; justify-content: space-between; margin-top: 15px; }
|
||||||
}
|
}
|
||||||
.buttom {
|
.buttom {
|
||||||
.loginType { display: flex; padding: 175px 75px 75px 75px; justify-content: center;
|
.loginType { display: flex; padding: 75px 75px 15px 75px; justify-content: center;
|
||||||
|
|
||||||
.item { display: flex; flex-direction: column; align-items: center; color: $u-content-color; font-size: 14px; }
|
.item { display: flex; flex-direction: column; align-items: center; color: $u-content-color; font-size: 14px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,8 +17,13 @@
|
|||||||
.link { color: $u-type-warning; }
|
.link { color: $u-type-warning; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.getCaptcha { background-color: rgb(253, 243, 208); color: $u-tips-color; border: none; font-size: 15px; padding: 6px 0; width: 100%;
|
||||||
|
&::after { border: none; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.agreement-checked-view { position: relative; padding: 10px 0px 10px 15px; display: flex; align-items: center; margin: 5px 0; font-size: 12px; justify-content: center; }
|
||||||
|
|
||||||
|
|
||||||
.wrapkey { padding: 40px 35px; }
|
.wrapkey { padding: 40px 35px; }
|
||||||
.box { margin: 15px 0; font-size: 15px; color: 555; }
|
.box { margin: 15px 0; font-size: 15px; color: 555; }
|
||||||
|
|||||||
@@ -14,31 +14,31 @@
|
|||||||
<view class="top"></view>
|
<view class="top"></view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">欢迎登录{{appTitle}}</view>
|
<view class="title">欢迎登录{{appTitle}}</view>
|
||||||
<input class="coreshop-solid-bottom" type="number" v-model="mobile" placeholder="请输入手机号" />
|
<u--input placeholder="请输入手机号"
|
||||||
<view class="tips">未注册的手机号验证后自动创建平台账号</view>
|
border="surround"
|
||||||
<button @tap="submit" :style="[inputStyle]" class="getCaptcha">获取短信验证码</button>
|
v-model="mobile"
|
||||||
<view class="alternative">
|
type="number"
|
||||||
<!--<view class="password">密码登录</view>-->
|
@change="change"></u--input>
|
||||||
<view class="issue">遇到问题</view>
|
<view class="tips coreshop-margin-10">未注册的手机号验证后自动创建平台账号</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="buttom">
|
<view class="buttom">
|
||||||
<view class="loginType">
|
<view class="loginType">
|
||||||
<!--#ifdef MP-WEIXIN-->
|
<button @tap="submit" :style="[inputStyle]" class="getCaptcha">获取短信验证码</button>
|
||||||
<view class="wechat item" @tap="goLoginByGetPhoneNumber()">
|
|
||||||
<view class="icon"><u-icon size="70" name="weixin-fill" color="rgb(83,194,64)"></u-icon></view>
|
|
||||||
微信手机号绑定
|
|
||||||
</view>
|
|
||||||
<!--#endif-->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="hint">
|
<!--服务协议-->
|
||||||
登录即代表你同意
|
<view class="coreshop-margin-top-15 coreshop-margin-bottom-30 agreement-checked-view">
|
||||||
<text @click="goUserAgreementPage()">用户协议</text>
|
<u-checkbox-group>
|
||||||
和
|
<u-checkbox v-model="agreement" :checked="agreement" @change="checkboxChange" size="20" active-color="#19be6b"></u-checkbox>
|
||||||
<text @click="goUserPrivacyPolicy()">隐私政策</text>,
|
</u-checkbox-group>
|
||||||
并授权使用您的{{appTitle}}账号信息(如昵称、头像、收获地址)以便您统一管理
|
<view class="coreshop-text-black-view">
|
||||||
|
<text class="coreshop-text-black">同意</text>
|
||||||
|
<text class="text-blue" @tap="goUserAgreementPage">《服务协议》</text>
|
||||||
|
<text class="coreshop-text-black">与</text>
|
||||||
|
<text class="text-blue" @tap="goUserPrivacyPolicy">《隐私协议》</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapkey" v-if="showCodeBox">
|
<view class="wrapkey" v-if="showCodeBox">
|
||||||
<view class="key-input">
|
<view class="key-input">
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
agreement: false,
|
||||||
maxMobile: 11,
|
maxMobile: 11,
|
||||||
mobile: '', // 用户手机号
|
mobile: '', // 用户手机号
|
||||||
code: '', // 短信验证码
|
code: '', // 短信验证码
|
||||||
@@ -143,15 +144,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goLoginByGetPhoneNumber() {
|
checkboxChange(e) {
|
||||||
this.$u.route({ type: 'redirectTo', url: '/pages/login/loginByGetPhoneNumber/loginByGetPhoneNumber?sessionAuthId=' + this.sessionAuthId });
|
this.agreement = e;
|
||||||
|
console.log(this.agreement);
|
||||||
|
},
|
||||||
|
change(e) {
|
||||||
|
console.log('change', e);
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.$u.test.mobile(this.mobile)) {
|
if (!this.$u.test.mobile(this.mobile)) {
|
||||||
this.sendCode();
|
|
||||||
} else {
|
|
||||||
this.$u.toast('请输入合法的手机号码!');
|
this.$u.toast('请输入合法的手机号码!');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.agreement == false) {
|
||||||
|
this.$u.toast('请先勾选同意《服务协议》与《隐私协议》!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.sendCode();
|
||||||
},
|
},
|
||||||
// 收不到验证码选择时的选择
|
// 收不到验证码选择时的选择
|
||||||
noCaptcha() {
|
noCaptcha() {
|
||||||
|
|||||||
@@ -135,6 +135,8 @@
|
|||||||
if (_this.$store.state.config.agentStore == '1') {
|
if (_this.$store.state.config.agentStore == '1') {
|
||||||
_this.utilityMenus.myStore.router = '/pages/member/agent/myStore/myStore?store=' + _this.info.store;
|
_this.utilityMenus.myStore.router = '/pages/member/agent/myStore/myStore?store=' + _this.info.store;
|
||||||
}
|
}
|
||||||
|
this.getShareUrl();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//报错了
|
//报错了
|
||||||
_this.$u.toast(res.msg);
|
_this.$u.toast(res.msg);
|
||||||
@@ -159,7 +161,6 @@
|
|||||||
if (res.status) {
|
if (res.status) {
|
||||||
_this.userInfo = res.data
|
_this.userInfo = res.data
|
||||||
}
|
}
|
||||||
this.getShareUrl();
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//去提现
|
//去提现
|
||||||
@@ -173,6 +174,9 @@
|
|||||||
url: this.$globalConstVars.shareUrl,
|
url: this.$globalConstVars.shareUrl,
|
||||||
type: this.$globalConstVars.shareModel.url,
|
type: this.$globalConstVars.shareModel.url,
|
||||||
page: this.$globalConstVars.shareType.agent,
|
page: this.$globalConstVars.shareType.agent,
|
||||||
|
params: {
|
||||||
|
store: this.info.store
|
||||||
|
},
|
||||||
};
|
};
|
||||||
let userToken = this.$db.get('userToken');
|
let userToken = this.$db.get('userToken');
|
||||||
if (userToken && userToken != '') {
|
if (userToken && userToken != '') {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
},
|
},
|
||||||
//跳转到首页
|
//跳转到首页
|
||||||
gotoIndex() {
|
gotoIndex() {
|
||||||
uni.switchTab({ url: '/pages/index/default/default' });
|
_this.$u.route({ type: 'switchTab', url: '/pages/index/default/default' });
|
||||||
},
|
},
|
||||||
//跳转到商品
|
//跳转到商品
|
||||||
gotoGoods(id) {
|
gotoGoods(id) {
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
url: '/pages/member/agent/myStore/myStore',
|
url: '/pages/member/agent/myStore/myStore',
|
||||||
type: 'redirectTo',
|
type: 'redirectTo',
|
||||||
params: {
|
params: {
|
||||||
id: id
|
store: id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -832,6 +832,176 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 后台生成代理商小程序码============================================================
|
||||||
|
|
||||||
|
// POST: Api/Tools/GetAgentWxCode
|
||||||
|
/// <summary>
|
||||||
|
/// 后台生成代理商小程序码
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Description("后台生成小程序码")]
|
||||||
|
public async Task<AdminUiCallBack> GetAgentWxCode([FromBody] FMIntId entity)
|
||||||
|
{
|
||||||
|
//返回数据
|
||||||
|
var jm = new AdminUiCallBack { code = 0 };
|
||||||
|
|
||||||
|
var filesStorageOptions = await _coreCmsSettingServices.GetFilesStorageOptions();
|
||||||
|
|
||||||
|
|
||||||
|
var userModel = await _userServices.QueryByIdAsync(entity.id);
|
||||||
|
if (userModel == null)
|
||||||
|
{
|
||||||
|
jm.code = 1;
|
||||||
|
jm.msg = "不存在此信息";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userCode = UserHelper.GetShareCodeByUserId(entity.id);
|
||||||
|
|
||||||
|
var path = "pages/share/jump/jump?scene=11-" + userCode + "-" + userCode;
|
||||||
|
|
||||||
|
var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
|
||||||
|
var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
|
||||||
|
var request = new CgibinWxaappCreateWxaQrcodeRequest();
|
||||||
|
request.AccessToken = accessToken;
|
||||||
|
request.Path = path;
|
||||||
|
|
||||||
|
var response = await client.ExecuteCgibinWxaappCreateWxaQrcodeAsync(request);
|
||||||
|
if (response.IsSuccessful())
|
||||||
|
{
|
||||||
|
var memStream = new MemoryStream(response.RawBytes);
|
||||||
|
|
||||||
|
string url = string.Empty;
|
||||||
|
if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.LocalStorage.ToString())
|
||||||
|
{
|
||||||
|
url = _toolsServices.UpLoadBase64ForLocalStorage(filesStorageOptions, memStream);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.AliYunOSS.ToString())
|
||||||
|
{
|
||||||
|
//上传到阿里云
|
||||||
|
url = await _toolsServices.UpLoadBase64ForAliYunOSS(filesStorageOptions, memStream);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.QCloudOSS.ToString())
|
||||||
|
{
|
||||||
|
//上传到腾讯云OSS
|
||||||
|
url = _toolsServices.UpLoadBase64ForQCloudOSS(filesStorageOptions, response.RawBytes);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.QiNiuKoDo.ToString())
|
||||||
|
{
|
||||||
|
//上传到七牛云kodo
|
||||||
|
url = _toolsServices.UpLoadBase64ForQiNiuKoDo(filesStorageOptions, response.RawBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
var bl = !string.IsNullOrEmpty(url);
|
||||||
|
jm.code = bl ? 0 : 1;
|
||||||
|
jm.msg = bl ? "上传成功!" : "上传失败";
|
||||||
|
jm.data = new
|
||||||
|
{
|
||||||
|
fileUrl = url,
|
||||||
|
src = url,
|
||||||
|
path
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jm.code = 1;
|
||||||
|
jm.msg = response.ErrorMessage;
|
||||||
|
}
|
||||||
|
jm.otherData = response;
|
||||||
|
|
||||||
|
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 后台生成分销商小程序码============================================================
|
||||||
|
|
||||||
|
// POST: Api/Tools/GetDistributionWxCode
|
||||||
|
/// <summary>
|
||||||
|
/// 后台生成分销商小程序码
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Description("后台生成小程序码")]
|
||||||
|
public async Task<AdminUiCallBack> GetDistributionWxCode([FromBody] FMIntId entity)
|
||||||
|
{
|
||||||
|
//返回数据
|
||||||
|
var jm = new AdminUiCallBack { code = 0 };
|
||||||
|
|
||||||
|
var filesStorageOptions = await _coreCmsSettingServices.GetFilesStorageOptions();
|
||||||
|
|
||||||
|
|
||||||
|
var userModel = await _userServices.QueryByIdAsync(entity.id);
|
||||||
|
if (userModel == null)
|
||||||
|
{
|
||||||
|
jm.code = 1;
|
||||||
|
jm.msg = "不存在此信息";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userCode = UserHelper.GetShareCodeByUserId(entity.id);
|
||||||
|
|
||||||
|
var path = "pages/share/jump/jump?scene=4-" + userCode + "-" + userCode;
|
||||||
|
|
||||||
|
var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
|
||||||
|
var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
|
||||||
|
var request = new CgibinWxaappCreateWxaQrcodeRequest();
|
||||||
|
request.AccessToken = accessToken;
|
||||||
|
request.Path = path;
|
||||||
|
|
||||||
|
var response = await client.ExecuteCgibinWxaappCreateWxaQrcodeAsync(request);
|
||||||
|
if (response.IsSuccessful())
|
||||||
|
{
|
||||||
|
var memStream = new MemoryStream(response.RawBytes);
|
||||||
|
|
||||||
|
string url = string.Empty;
|
||||||
|
if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.LocalStorage.ToString())
|
||||||
|
{
|
||||||
|
url = _toolsServices.UpLoadBase64ForLocalStorage(filesStorageOptions, memStream);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.AliYunOSS.ToString())
|
||||||
|
{
|
||||||
|
//上传到阿里云
|
||||||
|
url = await _toolsServices.UpLoadBase64ForAliYunOSS(filesStorageOptions, memStream);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.QCloudOSS.ToString())
|
||||||
|
{
|
||||||
|
//上传到腾讯云OSS
|
||||||
|
url = _toolsServices.UpLoadBase64ForQCloudOSS(filesStorageOptions, response.RawBytes);
|
||||||
|
}
|
||||||
|
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.QiNiuKoDo.ToString())
|
||||||
|
{
|
||||||
|
//上传到七牛云kodo
|
||||||
|
url = _toolsServices.UpLoadBase64ForQiNiuKoDo(filesStorageOptions, response.RawBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
var bl = !string.IsNullOrEmpty(url);
|
||||||
|
jm.code = bl ? 0 : 1;
|
||||||
|
jm.msg = bl ? "上传成功!" : "上传失败";
|
||||||
|
jm.data = new
|
||||||
|
{
|
||||||
|
fileUrl = url,
|
||||||
|
src = url
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jm.code = 1;
|
||||||
|
jm.msg = response.ErrorMessage;
|
||||||
|
}
|
||||||
|
jm.otherData = response;
|
||||||
|
|
||||||
|
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
//通用页面获取=========================================================================
|
//通用页面获取=========================================================================
|
||||||
|
|
||||||
#region 获取商品列表====================================================
|
#region 获取商品列表====================================================
|
||||||
|
|||||||
@@ -763,6 +763,18 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:CoreCms.Net.Web.Admin.Controllers.ToolsController.GetAgentWxCode(CoreCms.Net.Model.FromBody.FMIntId)">
|
||||||
|
<summary>
|
||||||
|
后台生成代理商小程序码
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:CoreCms.Net.Web.Admin.Controllers.ToolsController.GetDistributionWxCode(CoreCms.Net.Model.FromBody.FMIntId)">
|
||||||
|
<summary>
|
||||||
|
后台生成分销商小程序码
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.Admin.Controllers.ToolsController.GetGoods">
|
<member name="M:CoreCms.Net.Web.Admin.Controllers.ToolsController.GetGoods">
|
||||||
<summary>
|
<summary>
|
||||||
获取商品列表
|
获取商品列表
|
||||||
|
|||||||
@@ -82,6 +82,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="LAY-app-CoreCmsAgent-tableBox-bar">
|
<script type="text/html" id="LAY-app-CoreCmsAgent-tableBox-bar">
|
||||||
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsAgentTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsAgentTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
||||||
@@ -189,7 +190,7 @@
|
|||||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||||
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
||||||
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
||||||
{ width: 142, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsAgent-tableBox-bar' }
|
{ width: 222, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsAgent-tableBox-bar' }
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -226,6 +227,8 @@
|
|||||||
doDelete(obj);
|
doDelete(obj);
|
||||||
} else if (obj.event === 'edit') {
|
} else if (obj.event === 'edit') {
|
||||||
doEdit(obj)
|
doEdit(obj)
|
||||||
|
} else if (obj.event === 'qrcode') {
|
||||||
|
doQrCode(obj)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//执行创建操作
|
//执行创建操作
|
||||||
@@ -342,6 +345,28 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取小程序码
|
||||||
|
function doQrCode(obj) {
|
||||||
|
coreHelper.Post("Api/Tools/GetAgentWxCode", { id: obj.data.userId }, function (e) {
|
||||||
|
if (e.code === 0) {
|
||||||
|
admin.popup({
|
||||||
|
shadeClose: false,
|
||||||
|
title: '查看小程序码',
|
||||||
|
area: ['380px', '480px'],
|
||||||
|
id: 'LAY-popup-CoreCmsAgent-QrCode',
|
||||||
|
success: function (layero, index) {
|
||||||
|
view(this.id).render('agent/agents/qrCode', { data: e.data }).done(function () {
|
||||||
|
form.render();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(e.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//执行单个删除
|
//执行单个删除
|
||||||
function doDelete(obj) {
|
function doDelete(obj) {
|
||||||
//console.log(obj.data.id);
|
//console.log(obj.data.id);
|
||||||
|
|||||||
25
CoreCms.Net.Web.Admin/wwwroot/views/agent/agents/qrCode.html
Normal file
25
CoreCms.Net.Web.Admin/wwwroot/views/agent/agents/qrCode.html
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||||
|
<div style="text-align: center" lay-filter="LAY-app-CoreCmsAgent-QrCode" id="LAY-app-CoreCmsAgent-QrCode">
|
||||||
|
<img id="cavasimg" src="{{d.params.data.fileUrl}}" width="300" height="341" style="border: 1px solid #c0c0c0" />
|
||||||
|
<div style="width: 100%;text-align:center;margin-top: 20px;">
|
||||||
|
<a class="layui-btn" href="{{d.params.data.fileUrl}}" target="_blank">下载二维码</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
var debug = layui.setter.debug;
|
||||||
|
layui.data.done = function (d) {
|
||||||
|
//开启调试情况下获取接口赋值数据
|
||||||
|
if (debug) { console.log(d.params.data); }
|
||||||
|
|
||||||
|
layui.use(['admin', 'form', 'coreHelper'], function () {
|
||||||
|
var $ = layui.$
|
||||||
|
, setter = layui.setter
|
||||||
|
, admin = layui.admin
|
||||||
|
, coreHelper = layui.coreHelper
|
||||||
|
, form = layui.form;
|
||||||
|
form.render(null, 'LAY-app-CoreCmsAgent-detailsForm');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -103,6 +103,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/html" id="LAY-app-CoreCmsDistribution-tableBox-bar">
|
<script type="text/html" id="LAY-app-CoreCmsDistribution-tableBox-bar">
|
||||||
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||||
<a class="layui-btn layui-btn-xs" lay-event="edit">审核</a>
|
<a class="layui-btn layui-btn-xs" lay-event="edit">审核</a>
|
||||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
||||||
@@ -219,7 +220,7 @@
|
|||||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||||
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
||||||
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
||||||
{ width: 142, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsDistribution-tableBox-bar' }
|
{ width: 222, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsDistribution-tableBox-bar' }
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -256,6 +257,8 @@
|
|||||||
doDelete(obj);
|
doDelete(obj);
|
||||||
} else if (obj.event === 'edit') {
|
} else if (obj.event === 'edit') {
|
||||||
doEdit(obj)
|
doEdit(obj)
|
||||||
|
} else if (obj.event === 'qrcode') {
|
||||||
|
doQrCode(obj)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//执行创建操作
|
//执行创建操作
|
||||||
@@ -372,6 +375,28 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取小程序码
|
||||||
|
function doQrCode(obj) {
|
||||||
|
coreHelper.Post("Api/Tools/GetDistributionWxCode", { id: obj.data.userId }, function (e) {
|
||||||
|
if (e.code === 0) {
|
||||||
|
admin.popup({
|
||||||
|
shadeClose: false,
|
||||||
|
title: '查看小程序码',
|
||||||
|
area: ['380px', '480px'],
|
||||||
|
id: 'LAY-popup-CoreCmsDistributor-QrCode',
|
||||||
|
success: function (layero, index) {
|
||||||
|
view(this.id).render('distribution/distributor/qrCode', { data: e.data }).done(function () {
|
||||||
|
form.render();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(e.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//执行单个删除
|
//执行单个删除
|
||||||
function doDelete(obj) {
|
function doDelete(obj) {
|
||||||
//console.log(obj.data.id);
|
//console.log(obj.data.id);
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||||
|
<div style="text-align: center" lay-filter="LAY-app-CoreCmsDistributor-QrCode" id="LAY-app-CoreCmsDistributor-QrCode">
|
||||||
|
<img id="cavasimg" src="{{d.params.data.fileUrl}}" width="300" height="341" style="border: 1px solid #c0c0c0" />
|
||||||
|
<div style="width: 100%;text-align:center;margin-top: 20px;">
|
||||||
|
<a class="layui-btn" href="{{d.params.data.fileUrl}}" target="_blank">下载二维码</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
var debug = layui.setter.debug;
|
||||||
|
layui.data.done = function (d) {
|
||||||
|
//开启调试情况下获取接口赋值数据
|
||||||
|
if (debug) { console.log(d.params.data); }
|
||||||
|
|
||||||
|
layui.use(['admin', 'form', 'coreHelper'], function () {
|
||||||
|
var $ = layui.$
|
||||||
|
, setter = layui.setter
|
||||||
|
, admin = layui.admin
|
||||||
|
, coreHelper = layui.coreHelper
|
||||||
|
, form = layui.form;
|
||||||
|
form.render(null, 'LAY-app-CoreCmsDistributor-detailsForm');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user