微信小程序
@ -45,7 +45,7 @@ class AppMiniAlipayList extends Common
|
||||
|
||||
// 参数
|
||||
$this->params = input();
|
||||
$params['application_name'] = 'alipay';
|
||||
$this->params['application_name'] = 'alipay';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
70
application/admin/controller/Appminiweixinconfig.php
Executable file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2018 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\service\ConfigService;
|
||||
|
||||
/**
|
||||
* 微信小程序 - 配置
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AppMiniWeixinConfig extends Common
|
||||
{
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::__construct();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 配置列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 配置信息
|
||||
$this->assign('data', ConfigService::ConfigList());
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 配置数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-02T23:08:19+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
return ConfigService::ConfigSave($_POST);
|
||||
}
|
||||
}
|
||||
?>
|
||||
102
application/admin/controller/Appminiweixinlist.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2018 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\service\AppMiniService;
|
||||
|
||||
/**
|
||||
* 微信小程序管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AppMiniWeixinList extends Common
|
||||
{
|
||||
private $application_name;
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::__construct();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
|
||||
// 参数
|
||||
$this->params = input();
|
||||
$this->params['application_name'] = 'weixin';
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
$this->assign('data', AppMiniService::DataList($this->params));
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Created 生成]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
*/
|
||||
public function Created()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 开始操作
|
||||
return AppMiniService::Created($this->params);
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除包]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 开始操作
|
||||
return AppMiniService::Delete($this->params);
|
||||
}
|
||||
}
|
||||
?>
|
||||
36
application/admin/view/default/appminiweixinconfig/index.html
Executable file
@ -0,0 +1,36 @@
|
||||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/appminiweixinconfig/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/appminiweixinconfig/index')}}">
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_app_mini_weixin_appid.name}}<span class="fs-12 fw-100 cr-999">({{$data.common_app_mini_weixin_appid.describe}})</span></label>
|
||||
<input type="text" name="{{$data.common_app_mini_weixin_appid.only_tag}}" placeholder="{{$data.common_app_mini_weixin_appid.name}}" data-validation-message="{{$data.common_app_mini_weixin_appid.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_app_mini_weixin_appid.value}}"{{/if}} required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_app_mini_weixin_appsecret.name}}<span class="fs-12 fw-100 cr-999">({{$data.common_app_mini_weixin_appsecret.describe}})</span></label>
|
||||
<input type="text" name="{{$data.common_app_mini_weixin_appsecret.only_tag}}" placeholder="{{$data.common_app_mini_weixin_appsecret.name}}" data-validation-message="{{$data.common_app_mini_weixin_appsecret.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_app_mini_weixin_appsecret.value}}"{{/if}} required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_app_mini_weixin_title.name}}</label>
|
||||
<input type="text" name="{{$data.common_app_mini_weixin_title.only_tag}}" placeholder="{{$data.common_app_mini_weixin_title.name}}" data-validation-message="{{$data.common_app_mini_weixin_title.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_app_mini_weixin_title.value}}"{{/if}} required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_app_mini_weixin_describe.name}}</label>
|
||||
<input type="text" name="{{$data.common_app_mini_weixin_describe.only_tag}}" placeholder="{{$data.common_app_mini_weixin_describe.name}}" data-validation-message="{{$data.common_app_mini_weixin_describe.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_app_mini_weixin_describe.value}}"{{/if}} required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
||||
51
application/admin/view/default/appminiweixinlist/index.html
Executable file
@ -0,0 +1,51 @@
|
||||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-ajax" data-url="{{:MyUrl('admin/appminiweixinlist/created')}}" data-view="reload" data-msg="生成时间比较长,请不要关闭浏览器窗口!"> 生成</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10 m-l-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>包名</th>
|
||||
<th>大小</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if !empty($data)}}
|
||||
{{foreach $data as $v}}
|
||||
<tr>
|
||||
<td>{{$v.name}}</td>
|
||||
<td>{{$v.size}}</td>
|
||||
<td>{{$v.time}}</td>
|
||||
<td class="view-operation">
|
||||
{{if !empty($v.url)}}
|
||||
<a href="{{$v.url}}">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-download"> 下载</button>
|
||||
</a>
|
||||
{{/if}}
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/appminiweixinlist/delete')}}" data-id="{{$v.name}}" data-view="reload"> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{else /}}
|
||||
<tr><td colspan="4" class="table-no">没有相关数据</td></tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- lis end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
||||
@ -113,7 +113,7 @@ class User extends Common
|
||||
*/
|
||||
public function WechatUserAuth()
|
||||
{
|
||||
$result = (new \base\Wechat('wx0a2012ebad94beff', 'd0e4e81180ea59b8fcc4299f6b05b362'))->GetAuthSessionKey(input('authcode'));
|
||||
$result = (new \base\Wechat(MyC('common_app_mini_weixin_appid'), MyC('common_app_mini_weixin_appsecret')))->GetAuthSessionKey(input('authcode'));
|
||||
if($result !== false)
|
||||
{
|
||||
return DataReturn('授权登录成功', 0, $result);
|
||||
@ -131,7 +131,7 @@ class User extends Common
|
||||
*/
|
||||
public function WechatUserInfo()
|
||||
{
|
||||
$result = (new \base\Wechat('wx0a2012ebad94beff', 'd0e4e81180ea59b8fcc4299f6b05b362'))->DecryptData(input('encrypted_data'), input('iv'), input('openid'));
|
||||
$result = (new \base\Wechat(MyC('common_app_mini_weixin_appid'), MyC('common_app_mini_weixin_appsecret')))->DecryptData(input('encrypted_data'), input('iv'), input('openid'));
|
||||
|
||||
if(is_array($result))
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ App({
|
||||
|
||||
// 请求地址
|
||||
request_url: "{{request_url}}",
|
||||
request_url: "https://test.shopxo.net/",
|
||||
//request_url: "https://test.shopxo.net/",
|
||||
//request_url: 'http://tp5-dev.com/',
|
||||
|
||||
// 基础信息
|
||||
|
||||
@ -60,7 +60,7 @@ App({
|
||||
|
||||
// 请求地址
|
||||
request_url: "{{request_url}}",
|
||||
request_url: 'https://test.shopxo.net/',
|
||||
//request_url: 'https://test.shopxo.net/',
|
||||
|
||||
// 基础信息
|
||||
application_title: "{{application_title}}",
|
||||
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |