mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
更新授权
This commit is contained in:
parent
9604e97a15
commit
cc31e05629
@ -109,8 +109,8 @@ class LoginServices extends BaseServices
|
||||
throw new ValidateException('unionid不存在');
|
||||
}
|
||||
if (!isset($wechatInfo['nickname'])) {
|
||||
$wechatInfo = WechatAuthService::getUserInfo($wechatInfo['openid']);
|
||||
if (!$wechatInfo['subscribe'] && !isset($wechatInfo['nickname']))
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->getUserInfo($wechatInfo['openid'])->toArray();
|
||||
if (!isset($wechatInfo['nickname']))
|
||||
throw new ValidateException('授权失败');
|
||||
if (isset($wechatInfo['tagid_list']))
|
||||
$wechatInfo['tagid_list'] = implode(',', $wechatInfo['tagid_list']);
|
||||
|
||||
@ -1779,34 +1779,33 @@ class UserServices extends BaseServices
|
||||
foreach ($noBeOpenids as $openid) {
|
||||
try {
|
||||
$info = WechatService::getUserInfo($openid);
|
||||
$info = is_object($info) ? $info->toArray() : $info;
|
||||
} catch (\Throwable $e) {
|
||||
$info = [];
|
||||
}
|
||||
if (!$info) continue;
|
||||
if ($info['subscribe'] == 1) {
|
||||
$data['nickname'] = $info['nickname'] ?? '';
|
||||
$data['headimgurl'] = $info['headimgurl'] ?? '';
|
||||
$userInfoData = $this->setUserInfo($data);
|
||||
if (!$userInfoData) {
|
||||
throw new AdminException('用户信息储存失败!');
|
||||
}
|
||||
$data['uid'] = $userInfoData['uid'];
|
||||
$data['subscribe'] = $info['subscribe'];
|
||||
$data['unionid'] = $info['unionid'] ?? '';
|
||||
$data['openid'] = $info['openid'] ?? '';
|
||||
$data['sex'] = $info['sex'] ?? 0;
|
||||
$data['language'] = $info['language'] ?? '';
|
||||
$data['city'] = $info['city'] ?? '';
|
||||
$data['province'] = $info['province'] ?? '';
|
||||
$data['country'] = $info['country'] ?? '';
|
||||
$data['subscribe_time'] = $info['subscribe_time'] ?? '';
|
||||
$data['groupid'] = $info['groupid'] ?? 0;
|
||||
$data['remark'] = $info['remark'] ?? '';
|
||||
$data['tagid_list'] = isset($info['tagid_list']) && $info['tagid_list'] ? implode(',', $info['tagid_list']) : '';
|
||||
$data['add_time'] = $time;
|
||||
$data['is_complete'] = 1;
|
||||
$dataAll[] = $data;
|
||||
$data['nickname'] = $info['nickname'] ?? '';
|
||||
$data['headimgurl'] = $info['headimgurl'] ?? '';
|
||||
$userInfoData = $this->setUserInfo($data);
|
||||
if (!$userInfoData) {
|
||||
throw new AdminException('用户信息储存失败!');
|
||||
}
|
||||
$data['uid'] = $userInfoData['uid'];
|
||||
$data['subscribe'] = $info['subscribe'] ?? 1;
|
||||
$data['unionid'] = $info['unionid'] ?? '';
|
||||
$data['openid'] = $info['openid'] ?? '';
|
||||
$data['sex'] = $info['sex'] ?? 0;
|
||||
$data['language'] = $info['language'] ?? '';
|
||||
$data['city'] = $info['city'] ?? '';
|
||||
$data['province'] = $info['province'] ?? '';
|
||||
$data['country'] = $info['country'] ?? '';
|
||||
$data['subscribe_time'] = $info['subscribe_time'] ?? '';
|
||||
$data['groupid'] = $info['groupid'] ?? 0;
|
||||
$data['remark'] = $info['remark'] ?? '';
|
||||
$data['tagid_list'] = isset($info['tagid_list']) && $info['tagid_list'] ? implode(',', $info['tagid_list']) : '';
|
||||
$data['add_time'] = $time;
|
||||
$data['is_complete'] = 1;
|
||||
$dataAll[] = $data;
|
||||
}
|
||||
if ($dataAll) {
|
||||
/** @var WechatUserServices $wechatUser */
|
||||
|
||||
@ -79,13 +79,13 @@ class WechatServices extends BaseServices
|
||||
public function auth($spreadId, $login_type)
|
||||
{
|
||||
try {
|
||||
$wechatInfo = WechatAuthService::oauthService()->user()->getOriginal();
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->oauth();
|
||||
} catch (\Exception $e) {
|
||||
throw new ValidateException('授权失败' . $e->getMessage() . 'line' . $e->getLine());
|
||||
}
|
||||
if (!isset($wechatInfo['nickname'])) {
|
||||
$wechatInfo = WechatAuthService::getUserInfo($wechatInfo['openid']);
|
||||
if (!$wechatInfo['subscribe'] && !isset($wechatInfo['nickname']))
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->getUserInfo($wechatInfo['openid'])->toArray();
|
||||
if (!isset($wechatInfo['nickname']))
|
||||
throw new ValidateException('授权失败');
|
||||
if (isset($wechatInfo['tagid_list']))
|
||||
$wechatInfo['tagid_list'] = implode(',', $wechatInfo['tagid_list']);
|
||||
@ -129,13 +129,13 @@ class WechatServices extends BaseServices
|
||||
public function newAuth($spreadId, $login_type)
|
||||
{
|
||||
try {
|
||||
$wechatInfo = WechatAuthService::oauthService()->user()->getOriginal();
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->oauth();
|
||||
} catch (\Exception $e) {
|
||||
throw new ValidateException('授权失败' . $e->getMessage() . 'line' . $e->getLine());
|
||||
}
|
||||
if (!isset($wechatInfo['nickname'])) {
|
||||
$wechatInfo = WechatAuthService::getUserInfo($wechatInfo['openid']);
|
||||
if (!$wechatInfo['subscribe'] && !isset($wechatInfo['nickname']))
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->getUserInfo($wechatInfo['openid'])->toArray();
|
||||
if (!isset($wechatInfo['nickname']))
|
||||
throw new ValidateException('授权失败');
|
||||
if (isset($wechatInfo['tagid_list']))
|
||||
$wechatInfo['tagid_list'] = implode(',', $wechatInfo['tagid_list']);
|
||||
@ -210,8 +210,8 @@ class WechatServices extends BaseServices
|
||||
*/
|
||||
public function silenceAuth($spread)
|
||||
{
|
||||
$wechatInfoConfig = WechatAuthService::oauthService()->user()->getOriginal();
|
||||
$wechatInfo = WechatAuthService::getUserInfo($wechatInfoConfig['openid'])->toArray();
|
||||
$wechatInfoConfig = WechatAuthService::oauth2Service()->oauth();
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->getUserInfo($wechatInfoConfig['openid'])->toArray();
|
||||
$openid = $wechatInfoConfig['openid'];
|
||||
/** @var WechatUserServices $wechatUserServices */
|
||||
$wechatUserServices = app()->make(WechatUserServices::class);
|
||||
@ -258,9 +258,16 @@ class WechatServices extends BaseServices
|
||||
*/
|
||||
public function silenceAuthNoLogin($spread)
|
||||
{
|
||||
$wechatInfoConfig = WechatAuthService::oauthService()->user()->getOriginal();
|
||||
$wechatInfo = WechatAuthService::getUserInfo($wechatInfoConfig['openid'])->toArray();
|
||||
$wechatInfoConfig = WechatAuthService::oauth2Service()->oauth();
|
||||
$openid = $wechatInfoConfig['openid'];
|
||||
try {
|
||||
$wechatInfo = WechatAuthService::oauth2Service()->getUserInfo($wechatInfoConfig['openid'])->toArray();
|
||||
} catch (\Throwable $e) {
|
||||
$createData = [$openid, [], $spread, '', 'wechat'];
|
||||
$userInfoKey = md5($openid . '_' . time() . '_wechat');
|
||||
Cache::setTokenBucket($userInfoKey, $createData, 7200);
|
||||
return ['auth_login' => 1, 'key' => $userInfoKey];
|
||||
}
|
||||
/** @var WechatUserServices $wechatUserServices */
|
||||
$wechatUserServices = app()->make(WechatUserServices::class);
|
||||
$user = $wechatUserServices->getAuthUserInfo($openid, 'wechat');
|
||||
@ -328,7 +335,7 @@ class WechatServices extends BaseServices
|
||||
public function isSubscribe(int $uid)
|
||||
{
|
||||
if ($uid) {
|
||||
$subscribe = $this->dao->value(['uid' => $uid], 'subscribe') ? true : false;
|
||||
$subscribe = (bool)$this->dao->value(['uid' => $uid], 'subscribe');
|
||||
} else {
|
||||
$subscribe = true;
|
||||
}
|
||||
|
||||
@ -123,8 +123,17 @@ class WechatUserServices extends BaseServices
|
||||
public function updateUser($openid)
|
||||
{
|
||||
$userInfo = WechatService::getUserInfo($openid);
|
||||
$userInfo['tagid_list'] = implode(',', $userInfo['tagid_list']);
|
||||
if (!$this->dao->update($openid, $userInfo->toArray(), 'openid'))
|
||||
$userInfo = is_object($userInfo) ? $userInfo->toArray() : $userInfo;
|
||||
if (isset($userInfo['nickname']) && $userInfo['nickname']) {
|
||||
$userInfo['nickname'] = filter_emoji($userInfo['nickname']);
|
||||
} else {
|
||||
mt_srand();
|
||||
$userInfo['nickname'] = 'wx' . rand(100000, 999999);
|
||||
}
|
||||
if (isset($userInfo['tagid_list'])) {
|
||||
$userInfo['tagid_list'] = implode(',', $userInfo['tagid_list']);
|
||||
}
|
||||
if (!$this->dao->update($openid, $userInfo, 'openid'))
|
||||
throw new AdminException('更新失败');
|
||||
return true;
|
||||
}
|
||||
@ -137,6 +146,12 @@ class WechatUserServices extends BaseServices
|
||||
public function setNewUser($openid)
|
||||
{
|
||||
$userInfo = WechatService::getUserInfo($openid);
|
||||
if (isset($userInfo['nickname']) && $userInfo['nickname']) {
|
||||
$userInfo['nickname'] = filter_emoji($userInfo['nickname']);
|
||||
} else {
|
||||
mt_srand();
|
||||
$userInfo['nickname'] = 'wx' . rand(100000, 999999);
|
||||
}
|
||||
if (!isset($userInfo['subscribe']) || !$userInfo['subscribe'] || !isset($userInfo['openid']))
|
||||
throw new ValidateException('请关注公众号!');
|
||||
$userInfo = $userInfo->toArray();
|
||||
|
||||
@ -13,7 +13,7 @@ namespace crmeb\services;
|
||||
|
||||
use app\services\pay\PayNotifyServices;
|
||||
use crmeb\exceptions\ApiException;
|
||||
use EasyWeChat\Foundation\Application;
|
||||
use crmeb\services\easywechat\Application;
|
||||
use think\exception\ValidateException;
|
||||
use crmeb\utils\Hook;
|
||||
use think\Response;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
namespace crmeb\services;
|
||||
|
||||
use EasyWeChat\Foundation\Application;
|
||||
use crmeb\services\easywechat\Application;
|
||||
|
||||
class WechatOpenService
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ use app\services\wechat\WechatReplyServices;
|
||||
use crmeb\exceptions\AdminException;
|
||||
use app\services\pay\PayNotifyServices;
|
||||
use crmeb\utils\ApiErrorCode;
|
||||
use EasyWeChat\Foundation\Application;
|
||||
use crmeb\services\easywechat\Application;
|
||||
use EasyWeChat\Message\Article;
|
||||
use EasyWeChat\Message\Image;
|
||||
use EasyWeChat\Message\Material;
|
||||
@ -27,6 +27,7 @@ use EasyWeChat\Message\Video;
|
||||
use EasyWeChat\Message\Voice;
|
||||
use EasyWeChat\Payment\Order;
|
||||
use EasyWeChat\Server\Guard;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use think\exception\ValidateException;
|
||||
use think\Response;
|
||||
use crmeb\utils\Hook;
|
||||
@ -242,6 +243,17 @@ class WechatService
|
||||
return self::application()->oauth;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网页授权
|
||||
* @return easywechat\oauth2\wechat\WechatOauth2Provider
|
||||
*/
|
||||
public static function oauth2Service()
|
||||
{
|
||||
$request = app()->request;
|
||||
self::application()->oauth2->setRequest(new Request($request->get(), $request->post(), [], [], [], $request->server(), $request->getContent()));
|
||||
return self::application()->oauth2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模板消息接口
|
||||
* @return \EasyWeChat\Notice\Notice
|
||||
|
||||
46
crmeb/crmeb/services/easywechat/Application.php
Normal file
46
crmeb/crmeb/services/easywechat/Application.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace crmeb\services\easywechat;
|
||||
|
||||
|
||||
use crmeb\services\easywechat\oauth2\wechat\WechatOauth2Provider;
|
||||
use crmeb\services\easywechat\wechatlive\ProgramProvider as LiveProgramProvider;
|
||||
|
||||
|
||||
/**
|
||||
* Class Application
|
||||
* @package crmeb\services\easywechat
|
||||
* @property LiveProgramProvider $wechat_live
|
||||
* @property WechatOauth2Provider $oauth2
|
||||
*/
|
||||
class Application extends \EasyWeChat\Foundation\Application
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $providersNew = [
|
||||
LiveProgramProvider::class,
|
||||
WechatOauth2Provider::class
|
||||
];
|
||||
|
||||
/**
|
||||
* Application constructor.
|
||||
* @param $config
|
||||
*/
|
||||
public function __construct($config)
|
||||
{
|
||||
$this->providers = array_merge($this->providers, $this->providersNew);
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
}
|
||||
282
crmeb/crmeb/services/easywechat/oauth2/wechat/WechatOauth.php
Normal file
282
crmeb/crmeb/services/easywechat/oauth2/wechat/WechatOauth.php
Normal file
@ -0,0 +1,282 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace crmeb\services\easywechat\oauth2\wechat;
|
||||
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Doctrine\Common\Cache\FilesystemCache;
|
||||
use EasyWeChat\Core\AbstractAPI;
|
||||
use EasyWeChat\Core\AccessToken;
|
||||
use EasyWeChat\Core\Exceptions\HttpException;
|
||||
use EasyWeChat\Core\Http;
|
||||
use EasyWeChat\Support\Collection;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* Class WechatOauth
|
||||
* @package crmeb\services\easywechat\oauth\wechat
|
||||
*/
|
||||
class WechatOauth extends AbstractAPI
|
||||
{
|
||||
/**
|
||||
* 通过code获取网页授权access_token
|
||||
*/
|
||||
const API_OAUTH_ACCESS_TOKEN = 'https://api.weixin.qq.com/sns/oauth2/access_token';
|
||||
|
||||
/**
|
||||
* 检验授权凭证(access_token)是否有效
|
||||
*/
|
||||
const API_OAUTH_CHECK_TOKEN = 'https://api.weixin.qq.com/sns/auth';
|
||||
|
||||
/**
|
||||
* 刷新access_token
|
||||
*/
|
||||
const API_OAUTH_REFRESH_TOKEN = 'https://api.weixin.qq.com/sns/oauth2/refresh_token';
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
const API_OAUTH_GET_USER_INFO = 'https://api.weixin.qq.com/sns/userinfo';
|
||||
|
||||
|
||||
/**
|
||||
* App ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $appId;
|
||||
|
||||
/**
|
||||
* App secret.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $secret;
|
||||
|
||||
/**
|
||||
* Cache.
|
||||
*
|
||||
* @var Cache
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
protected $openid;
|
||||
|
||||
/**
|
||||
* @var Request
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Query name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $queryName = 'access_token';
|
||||
|
||||
/**
|
||||
* Response Json key name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $tokenJsonKey = 'access_token';
|
||||
|
||||
|
||||
/**
|
||||
* Response Json key name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $refreshTokenJsonKey = 'refresh_token';
|
||||
|
||||
/**
|
||||
* Cache key prefix.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $prefix = 'easywechat.common.oauth.access_token.';
|
||||
|
||||
/**
|
||||
* WechatOauth constructor.
|
||||
* @param AccessToken $accessToken
|
||||
* @param $appId
|
||||
* @param $appSecret
|
||||
*/
|
||||
public function __construct(AccessToken $accessToken, $appId, $appSecret)
|
||||
{
|
||||
parent::__construct($accessToken);
|
||||
$this->appId = $appId;
|
||||
$this->secret = $appSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return $this
|
||||
*/
|
||||
public function setRequest(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取code
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->request->get('code');
|
||||
}
|
||||
|
||||
/**
|
||||
* 授权获取token
|
||||
* @param string $code
|
||||
* @return false|mixed
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function oauth(string $code = '')
|
||||
{
|
||||
$params = [
|
||||
'appid' => $this->appId,
|
||||
'secret' => $this->secret,
|
||||
'code' => $code ?: $this->getCode(),
|
||||
'grant_type' => 'authorization_code',
|
||||
];
|
||||
|
||||
$http = new Http();
|
||||
|
||||
$token = $http->parseJSON($http->get(self::API_OAUTH_ACCESS_TOKEN, $params));
|
||||
|
||||
if (empty($token[$this->tokenJsonKey])) {
|
||||
throw new HttpException('Request AccessToken fail. response: ' . json_encode($token, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
$this->setCache($token);
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新token
|
||||
* @param string $refresh_token
|
||||
* @return false|mixed
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function refreshToken(string $refresh_token)
|
||||
{
|
||||
$params = [
|
||||
'appid' => $this->appId,
|
||||
'refresh_token' => $refresh_token,
|
||||
'grant_type' => 'refresh_token',
|
||||
];
|
||||
|
||||
$http = new Http();
|
||||
|
||||
$token = $http->parseJSON($http->get(self::API_OAUTH_REFRESH_TOKEN, $params));
|
||||
|
||||
if (empty($token[$this->tokenJsonKey])) {
|
||||
throw new HttpException('Request AccessToken fail. response: ' . json_encode($token, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
$this->setCache($token);
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param $openId
|
||||
* @param string $lang
|
||||
* @return Collection|null
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function getUserInfo($openId, $lang = 'zh_CN')
|
||||
{
|
||||
$params = [
|
||||
'openid' => $openId,
|
||||
'lang' => $lang,
|
||||
];
|
||||
$this->openid = $openId;
|
||||
return $this->parseJSON('get', [self::API_OAUTH_GET_USER_INFO, $params]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
* @param false $forceRefresh
|
||||
* @return bool|mixed|string
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function getToken($forceRefresh = false)
|
||||
{
|
||||
$cacheKey = $this->prefix;
|
||||
$cached = $this->getCache()->fetch($cacheKey . $this->tokenJsonKey . $this->openid);
|
||||
|
||||
if ($forceRefresh || !$cached) {
|
||||
$refreshCached = $this->getCache()->fetch($cacheKey . $this->refreshTokenJsonKey . $this->openid);
|
||||
if ($refreshCached) {
|
||||
$token = $this->refreshToken($refreshCached);
|
||||
|
||||
return $token[$this->tokenJsonKey];
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
return $cached;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存token信息
|
||||
* @param $token
|
||||
* @return bool
|
||||
*/
|
||||
public function setCache($token)
|
||||
{
|
||||
$cacheKey = $this->prefix;
|
||||
// XXX: T_T... 7200 - 1500
|
||||
$this->getCache()->save($cacheKey . $this->tokenJsonKey . $token['openid'], $token[$this->tokenJsonKey], $token['expires_in'] - 1500);
|
||||
$this->getCache()->save($cacheKey . $this->refreshTokenJsonKey . $token['openid'], $token[$this->refreshTokenJsonKey], 30 * 24 * 3600);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the cache manager.
|
||||
*
|
||||
* @return \Doctrine\Common\Cache\Cache
|
||||
*/
|
||||
public function getCache()
|
||||
{
|
||||
return $this->cache ?: $this->cache = new FilesystemCache(sys_get_temp_dir());
|
||||
}
|
||||
|
||||
/**
|
||||
* Attache access token to request query.
|
||||
*
|
||||
* @return \Closure
|
||||
*/
|
||||
protected function accessTokenMiddleware()
|
||||
{
|
||||
return function (callable $handler) {
|
||||
return function (RequestInterface $request, array $options) use ($handler) {
|
||||
$token = $this->getToken();
|
||||
if (!$token) {
|
||||
return $handler($request, $options);
|
||||
}
|
||||
|
||||
$request = $request->withUri(Uri::withQueryValue($request->getUri(), $this->queryName, $token));
|
||||
|
||||
return $handler($request, $options);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace crmeb\services\easywechat\oauth2\wechat;
|
||||
|
||||
|
||||
use crmeb\services\SystemConfigService;
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use think\facade\Request;
|
||||
|
||||
/**
|
||||
* 微信网页授权
|
||||
* Class WechatOauthProvider
|
||||
* @package crmeb\services\easywechat\oauth\wechat
|
||||
* @method oauth(string $code = '') code授权获取acces_token openid
|
||||
* @method getUserInfo($openId, $lang = 'zh_CN') openid 获取用户信息
|
||||
* @method setRequest(Request $request) 设置request对象
|
||||
*/
|
||||
class WechatOauth2Provider implements ServiceProviderInterface
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Container $pimple
|
||||
*/
|
||||
public function register(Container $pimple)
|
||||
{
|
||||
$request = app('request');
|
||||
$wechat = SystemConfigService::more(['wechat_appid', 'wechat_app_appid', 'wechat_app_appsecret', 'wechat_appsecret']);
|
||||
if ($request->isApp()) {
|
||||
$appId = isset($wechat['wechat_app_appid']) ? trim($wechat['wechat_app_appid']) : '';
|
||||
$appsecret = isset($wechat['wechat_app_appsecret']) ? trim($wechat['wechat_app_appsecret']) : '';
|
||||
} else {
|
||||
$appId = isset($wechat['wechat_appid']) ? trim($wechat['wechat_appid']) : '';
|
||||
$appsecret = isset($wechat['wechat_appsecret']) ? trim($wechat['wechat_appsecret']) : '';
|
||||
}
|
||||
|
||||
$pimple['oauth2'] = function ($pimple) use ($appId, $appsecret) {
|
||||
return new WechatOauth($pimple['access_token'], $appId, $appsecret);
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1,2 +1,2 @@
|
||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加载中</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fd05f392.js></script><script src=/static/js/index.9482f767.js></script></body></html>
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b7cab945.js></script><script src=/static/js/index.32c09daf.js></script></body></html>
|
||||
13
crmeb/public/static/js/chunk-vendors.b7cab945.js
Normal file
13
crmeb/public/static/js/chunk-vendors.b7cab945.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
crmeb/public/static/js/index.32c09daf.js
Normal file
1
crmeb/public/static/js/index.32c09daf.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-activity-lottery-grids-record~pages-activity-presell_details-index~pages-goods_details-index~p~0dc3edf2"],{fd65:function(t,e,n){n("a4d3"),n("e01a"),n("d28b"),n("944a"),n("4160"),n("d81d"),n("fb6a"),n("0c47"),n("23dc"),n("3410"),n("131a"),n("d3b7"),n("25f0"),n("3ca3"),n("159b"),n("ddb0"),
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-activity-lottery-grids-record~pages-activity-presell_details-index~pages-goods_details-index~p~0dc3edf2"],{"912e":function(t,e,n){n("a4d3"),n("e01a"),n("d28b"),n("944a"),n("4160"),n("d81d"),n("fb6a"),n("0c47"),n("23dc"),n("3410"),n("131a"),n("d3b7"),n("25f0"),n("3ca3"),n("159b"),n("ddb0"),
|
||||
/*!
|
||||
* clipboard.js v2.0.6
|
||||
* https://clipboardjs.com/
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-offline_result-index"],{"04e4":function(t,n,r){"use strict";var a=r("1a21"),e=r.n(a);e.a},"1a21":function(t,n,r){var a=r("88d4");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var e=r("4f06").default;e("a653e660",a,!0,{sourceMap:!1,shadowMode:!1})},"289c":function(t,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={onLoad:function(t){var n=t.site_name||"";n&&uni.setNavigationBarTitle({title:n})}};n.default=a},3519:function(t,n,r){"use strict";var a=r("508a"),e=r.n(a);e.a},"43c4":function(t,n,r){"use strict";r.r(n);var a=r("289c"),e=r.n(a);for(var i in a)"default"!==i&&function(t){r.d(n,t,(function(){return a[t]}))}(i);n["default"]=e.a},"508a":function(t,n,r){var a=r("7153");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var e=r("4f06").default;e("3af961ee",a,!0,{sourceMap:!1,shadowMode:!1})},7153:function(t,n,r){var a=r("24fb");n=a(!1),n.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* crmeb颜色变量 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.result[data-v-781c8f0b]{margin-top:%?200?%}.result .image-wrap[data-v-781c8f0b]{width:%?267?%;height:%?223?%;margin:0 auto}.result .image[data-v-781c8f0b]{width:100%;height:100%}.result .text[data-v-781c8f0b]{margin-top:%?46?%;font-size:%?34?%;text-align:center;color:#282828}.link[data-v-781c8f0b]{width:%?560?%;height:%?86?%;border:%?1?% solid #f19d2f;border-radius:%?43?%;margin:%?90?% auto 0;font-size:%?30?%;line-height:%?86?%;text-align:center;color:#f19d2f}',""]),t.exports=n},"88d4":function(t,n,r){var a=r("24fb");n=a(!1),n.push([t.i,"uni-page-body[data-v-781c8f0b]{background-color:#fff}body.?%PAGE?%[data-v-781c8f0b]{background-color:#fff}",""]),t.exports=n},"89a7":function(t,n,r){"use strict";r.r(n);var a=r("c814"),e=r("43c4");for(var i in e)"default"!==i&&function(t){r.d(n,t,(function(){return e[t]}))}(i);r("04e4"),r("3519");var s,c=r("f0c5"),o=Object(c["a"])(e["default"],a["b"],a["c"],!1,null,"781c8f0b",null,!1,a["a"],s);n["default"]=o.exports},c814:function(t,n,r){"use strict";var a;r.d(n,"b",(function(){return e})),r.d(n,"c",(function(){return i})),r.d(n,"a",(function(){return a}));var e=function(){var t=this,n=t.$createElement,a=t._self._c||n;return a("v-uni-view",[a("v-uni-view",{staticClass:"result"},[a("v-uni-view",{staticClass:"image-wrap"},[a("v-uni-image",{staticClass:"image",attrs:{src:r("eb7b")}})],1),a("v-uni-view",{staticClass:"text"},[t._v("支付成功")])],1),a("v-uni-navigator",{staticClass:"link",attrs:{url:"/pages/index/index","open-type":"switchTab"}},[t._v("进入商城")])],1)},i=[]},eb7b:function(t,n,r){t.exports=r.p+"static/img/offline-result.42cf447a.png"}}]);
|
||||
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-offline_result-index"],{"1e00":function(t,n,a){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={onLoad:function(t){var n=t.site_name||"";n&&uni.setNavigationBarTitle({title:n})}};n.default=e},"267c":function(t,n,a){var e=a("892c");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var i=a("4f06").default;i("9573cb82",e,!0,{sourceMap:!1,shadowMode:!1})},3980:function(t,n,a){"use strict";var e=a("ec9b"),i=a.n(e);i.a},"3c21":function(t,n,a){"use strict";a.r(n);var e=a("1e00"),i=a.n(e);for(var r in e)"default"!==r&&function(t){a.d(n,t,(function(){return e[t]}))}(r);n["default"]=i.a},"5b3a":function(t,n,a){"use strict";var e;a.d(n,"b",(function(){return i})),a.d(n,"c",(function(){return r})),a.d(n,"a",(function(){return e}));var i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",[e("v-uni-view",{staticClass:"result"},[e("v-uni-view",{staticClass:"image-wrap"},[e("v-uni-image",{staticClass:"image",attrs:{src:a("71d3")}})],1),e("v-uni-view",{staticClass:"text"},[t._v("支付成功")])],1),e("v-uni-navigator",{staticClass:"link",attrs:{url:"/pages/index/index","open-type":"switchTab"}},[t._v("进入商城")])],1)},r=[]},"71d3":function(t,n,a){t.exports=a.p+"static/img/offline-result.42cf447a.png"},"892c":function(t,n,a){var e=a("24fb");n=e(!1),n.push([t.i,"uni-page-body[data-v-3c6c5ae6]{background-color:#fff}body.?%PAGE?%[data-v-3c6c5ae6]{background-color:#fff}",""]),t.exports=n},"92db":function(t,n,a){var e=a("24fb");n=e(!1),n.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* crmeb颜色变量 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.result[data-v-3c6c5ae6]{margin-top:%?200?%}.result .image-wrap[data-v-3c6c5ae6]{width:%?267?%;height:%?223?%;margin:0 auto}.result .image[data-v-3c6c5ae6]{width:100%;height:100%}.result .text[data-v-3c6c5ae6]{margin-top:%?46?%;font-size:%?34?%;text-align:center;color:#282828}.link[data-v-3c6c5ae6]{width:%?560?%;height:%?86?%;border:%?1?% solid #f19d2f;border-radius:%?43?%;margin:%?90?% auto 0;font-size:%?30?%;line-height:%?86?%;text-align:center;color:#f19d2f}',""]),t.exports=n},"951d":function(t,n,a){"use strict";var e=a("267c"),i=a.n(e);i.a},deaa:function(t,n,a){"use strict";a.r(n);var e=a("5b3a"),i=a("3c21");for(var r in i)"default"!==r&&function(t){a.d(n,t,(function(){return i[t]}))}(r);a("951d"),a("3980");var c,s=a("f0c5"),o=Object(s["a"])(i["default"],e["b"],e["c"],!1,null,"3c6c5ae6",null,!1,e["a"],c);n["default"]=o.exports},ec9b:function(t,n,a){var e=a("92db");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var i=a("4f06").default;i("90f21420",e,!0,{sourceMap:!1,shadowMode:!1})}}]);
|
||||
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-web_view-index"],{"720f":function(n,t,e){"use strict";e.r(t);var i=e("a34a"),r=e.n(i);for(var u in i)"default"!==u&&function(n){e.d(t,n,(function(){return i[n]}))}(u);t["default"]=r.a},"7f14":function(n,t,e){"use strict";var i;e.d(t,"b",(function(){return r})),e.d(t,"c",(function(){return u})),e.d(t,"a",(function(){return i}));var r=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("v-uni-web-view",{staticClass:"web-view",style:{width:n.windowW+"px",height:n.windowH+"px"},attrs:{"webview-styles":n.webviewStyles,src:n.url}})},u=[]},"967a":function(n,t,e){"use strict";e.r(t);var i=e("7f14"),r=e("720f");for(var u in r)"default"!==u&&function(n){e.d(t,n,(function(){return r[n]}))}(u);var a,o=e("f0c5"),w=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],a);t["default"]=w.exports},a34a:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{windowH:0,windowW:0,webviewStyles:{progress:{color:"transparent"}},url:""}},onLoad:function(n){this.url=n.url;try{var t=uni.getSystemInfoSync();this.windowW=t.windowWidth,this.windowH=t.windowHeight}catch(e){}}};t.default=i}}]);
|
||||
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-annex-web_view-index"],{"23a4":function(n,t,e){"use strict";var i;e.d(t,"b",(function(){return r})),e.d(t,"c",(function(){return u})),e.d(t,"a",(function(){return i}));var r=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("v-uni-web-view",{staticClass:"web-view",style:{width:n.windowW+"px",height:n.windowH+"px"},attrs:{"webview-styles":n.webviewStyles,src:n.url}})},u=[]},"34be":function(n,t,e){"use strict";e.r(t);var i=e("23a4"),r=e("effa");for(var u in r)"default"!==u&&function(n){e.d(t,n,(function(){return r[n]}))}(u);var a,o=e("f0c5"),c=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],a);t["default"]=c.exports},"8c2b":function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{windowH:0,windowW:0,webviewStyles:{progress:{color:"transparent"}},url:""}},onLoad:function(n){this.url=n.url;try{var t=uni.getSystemInfoSync();this.windowW=t.windowWidth,this.windowH=t.windowHeight}catch(e){}}};t.default=i},effa:function(n,t,e){"use strict";e.r(t);var i=e("8c2b"),r=e.n(i);for(var u in i)"default"!==u&&function(n){e.d(t,n,(function(){return i[n]}))}(u);t["default"]=r.a}}]);
|
||||
1
crmeb/public/static/js/pages-auth-index.1c2408a2.js
Normal file
1
crmeb/public/static/js/pages-auth-index.1c2408a2.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-columnGoods-HotNewGoods-feedback"],{2977:function(e,t,a){"use strict";a.r(t);var i=a("bc3c"),n=a("af90c");for(var f in n)"default"!==f&&function(e){a.d(t,e,(function(){return n[e]}))}(f);a("d1cc");var o,c=a("f0c5"),r=Object(c["a"])(n["default"],i["b"],i["c"],!1,null,"36a88f9f",null,!1,i["a"],o);t["default"]=r.exports},"3ef1":function(e,t,a){var i=a("e807");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("1f9a8497",i,!0,{sourceMap:!1,shadowMode:!1})},"7a05":function(e,t,a){e.exports=a.p+"static/img/feed-icon.99e39a74.png"},af90c:function(e,t,a){"use strict";a.r(t);var i=a("efd6"),n=a.n(i);for(var f in i)"default"!==f&&function(e){a.d(t,e,(function(){return i[e]}))}(f);t["default"]=n.a},bc3c:function(e,t,a){"use strict";var i;a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return f})),a.d(t,"a",(function(){return i}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"feedback-wrapper"},[i("v-uni-view",{staticClass:"head"},[i("v-uni-view",{staticClass:"left-wrapper"},[i("v-uni-view",{staticClass:"title"},[e._v("商城客服已离线")]),i("v-uni-view",{staticClass:"txt"},[e._v(e._s(e.feedback))])],1),i("v-uni-view",{staticClass:"img-box"},[i("v-uni-image",{attrs:{src:a("7a05"),mode:""}})],1)],1),i("v-uni-view",{staticClass:"main"},[i("v-uni-view",{staticClass:"title"},[e._v("我要反馈")]),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-input",{attrs:{type:"text",placeholder:"请输入您的姓名"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-input",{attrs:{type:"text",placeholder:"请输入您的联系电话"},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}})],1),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-textarea",{attrs:{type:"text",placeholder:"请填写内容"},model:{value:e.con,callback:function(t){e.con=t},expression:"con"}})],1),i("v-uni-view",{staticClass:"sub_btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.subMit.apply(void 0,arguments)}}},[e._v("提交")])],1)],1)},f=[]},d1cc:function(e,t,a){"use strict";var i=a("3ef1"),n=a.n(i);n.a},e807:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".feedback-wrapper .head[data-v-36a88f9f]{display:flex;align-items:center;justify-content:space-between;height:%?215?%;padding:%?0?% %?30?%;background-color:#3a3a3a}.feedback-wrapper .head .left-wrapper[data-v-36a88f9f]{width:%?456?%;color:#fff;font-size:%?24?%}.feedback-wrapper .head .left-wrapper .title[data-v-36a88f9f]{margin-bottom:%?15?%;font-size:%?32?%}.feedback-wrapper .head .img-box uni-image[data-v-36a88f9f]{width:%?173?%;height:%?156?%}.feedback-wrapper .info[data-v-36a88f9f]{display:flex;background-color:#fff}.feedback-wrapper .info .info-item[data-v-36a88f9f]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;height:%?138?%;border-right:1px solid #f0f1f2}.feedback-wrapper .info .info-item[data-v-36a88f9f]:last-child{border:none}.feedback-wrapper .info .info-item .big-txt[data-v-36a88f9f]{font-size:%?32?%;font-weight:700;color:#282828}.feedback-wrapper .info .info-item .small[data-v-36a88f9f]{margin-top:%?10?%;font-size:%?24?%;color:#9f9f9f}.feedback-wrapper .main[data-v-36a88f9f]{margin-top:%?16?%;padding:%?30?% %?30?% %?68?%;background-color:#fff}.feedback-wrapper .main .title[data-v-36a88f9f]{font-size:%?30?%;font-weight:700}.feedback-wrapper .main .input-box[data-v-36a88f9f]{margin-top:%?20?%}.feedback-wrapper .main .input-box uni-input[data-v-36a88f9f]{display:block;width:100%;height:%?78?%;background:#f5f5f5;font-size:%?28?%;padding-left:%?20?%}.feedback-wrapper .main .input-box uni-textarea[data-v-36a88f9f]{display:block;width:100%;height:%?260?%;padding:%?20?%;background:#f5f5f5;font-size:%?28?%}.feedback-wrapper .main .sub_btn[data-v-36a88f9f]{margin-top:%?130?%;width:100%;height:%?86?%;line-height:%?86?%;font-size:%?30?%;text-align:center;color:#fff;border-radius:%?43?%;background-color:#3875ea}",""]),e.exports=t},efd6:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a("da79"),n={name:"feedback",data:function(){return{name:"",phone:"",con:"",feedback:""}},onLoad:function(){this.getInfo()},methods:{getInfo:function(){var e=this;(0,i.serviceFeedBack)().then((function(t){e.feedback=t.data.feedback}))},subMit:function(){var e=this;return this.name?this.phone&&/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.phone)?this.con?void(0,i.feedBackPost)({rela_name:this.name,phone:this.phone,content:this.con}).then((function(t){e.$util.Tips({title:t.msg,icon:"success"},{tab:3})})).catch((function(e){that.$util.Tips({title:e})})):this.$util.Tips({title:"请填写内容"}):this.$util.Tips({title:"请填写正确的手机号码"}):this.$util.Tips({title:"请填写姓名"})}}};t.default=n}}]);
|
||||
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-columnGoods-HotNewGoods-feedback"],{"0146":function(a,e,t){var i=t("699c");"string"===typeof i&&(i=[[a.i,i,""]]),i.locals&&(a.exports=i.locals);var n=t("4f06").default;n("4e62c290",i,!0,{sourceMap:!1,shadowMode:!1})},"18aa":function(a,e,t){"use strict";t.r(e);var i=t("e051"),n=t.n(i);for(var o in i)"default"!==o&&function(a){t.d(e,a,(function(){return i[a]}))}(o);e["default"]=n.a},"318d":function(a,e,t){a.exports=t.p+"static/img/feed-icon.99e39a74.png"},"38dc":function(a,e,t){"use strict";var i=t("0146"),n=t.n(i);n.a},"699c":function(a,e,t){var i=t("24fb");e=i(!1),e.push([a.i,".feedback-wrapper .head[data-v-a3d267a6]{display:flex;align-items:center;justify-content:space-between;height:%?215?%;padding:%?0?% %?30?%;background-color:#3a3a3a}.feedback-wrapper .head .left-wrapper[data-v-a3d267a6]{width:%?456?%;color:#fff;font-size:%?24?%}.feedback-wrapper .head .left-wrapper .title[data-v-a3d267a6]{margin-bottom:%?15?%;font-size:%?32?%}.feedback-wrapper .head .img-box uni-image[data-v-a3d267a6]{width:%?173?%;height:%?156?%}.feedback-wrapper .info[data-v-a3d267a6]{display:flex;background-color:#fff}.feedback-wrapper .info .info-item[data-v-a3d267a6]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;height:%?138?%;border-right:1px solid #f0f1f2}.feedback-wrapper .info .info-item[data-v-a3d267a6]:last-child{border:none}.feedback-wrapper .info .info-item .big-txt[data-v-a3d267a6]{font-size:%?32?%;font-weight:700;color:#282828}.feedback-wrapper .info .info-item .small[data-v-a3d267a6]{margin-top:%?10?%;font-size:%?24?%;color:#9f9f9f}.feedback-wrapper .main[data-v-a3d267a6]{margin-top:%?16?%;padding:%?30?% %?30?% %?68?%;background-color:#fff}.feedback-wrapper .main .title[data-v-a3d267a6]{font-size:%?30?%;font-weight:700}.feedback-wrapper .main .input-box[data-v-a3d267a6]{margin-top:%?20?%}.feedback-wrapper .main .input-box uni-input[data-v-a3d267a6]{display:block;width:100%;height:%?78?%;background:#f5f5f5;font-size:%?28?%;padding-left:%?20?%}.feedback-wrapper .main .input-box uni-textarea[data-v-a3d267a6]{display:block;width:100%;height:%?260?%;padding:%?20?%;background:#f5f5f5;font-size:%?28?%}.feedback-wrapper .main .sub_btn[data-v-a3d267a6]{margin-top:%?130?%;width:100%;height:%?86?%;line-height:%?86?%;font-size:%?30?%;text-align:center;color:#fff;border-radius:%?43?%;background-color:#3875ea}",""]),a.exports=e},a945:function(a,e,t){"use strict";var i;t.d(e,"b",(function(){return n})),t.d(e,"c",(function(){return o})),t.d(e,"a",(function(){return i}));var n=function(){var a=this,e=a.$createElement,i=a._self._c||e;return i("v-uni-view",{staticClass:"feedback-wrapper"},[i("v-uni-view",{staticClass:"head"},[i("v-uni-view",{staticClass:"left-wrapper"},[i("v-uni-view",{staticClass:"title"},[a._v("商城客服已离线")]),i("v-uni-view",{staticClass:"txt"},[a._v(a._s(a.feedback))])],1),i("v-uni-view",{staticClass:"img-box"},[i("v-uni-image",{attrs:{src:t("318d"),mode:""}})],1)],1),i("v-uni-view",{staticClass:"main"},[i("v-uni-view",{staticClass:"title"},[a._v("我要反馈")]),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-input",{attrs:{type:"text",placeholder:"请输入您的姓名"},model:{value:a.name,callback:function(e){a.name=e},expression:"name"}})],1),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-input",{attrs:{type:"text",placeholder:"请输入您的联系电话"},model:{value:a.phone,callback:function(e){a.phone=e},expression:"phone"}})],1),i("v-uni-view",{staticClass:"input-box"},[i("v-uni-textarea",{attrs:{type:"text",placeholder:"请填写内容"},model:{value:a.con,callback:function(e){a.con=e},expression:"con"}})],1),i("v-uni-view",{staticClass:"sub_btn",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.subMit.apply(void 0,arguments)}}},[a._v("提交")])],1)],1)},o=[]},c9f1:function(a,e,t){"use strict";t.r(e);var i=t("a945"),n=t("18aa");for(var o in n)"default"!==o&&function(a){t.d(e,a,(function(){return n[a]}))}(o);t("38dc");var c,r=t("f0c5"),d=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"a3d267a6",null,!1,i["a"],c);e["default"]=d.exports},e051:function(a,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t("74cb"),n={name:"feedback",data:function(){return{name:"",phone:"",con:"",feedback:""}},onLoad:function(){this.getInfo()},methods:{getInfo:function(){var a=this;(0,i.serviceFeedBack)().then((function(e){a.feedback=e.data.feedback}))},subMit:function(){var a=this;return this.name?this.phone&&/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.phone)?this.con?void(0,i.feedBackPost)({rela_name:this.name,phone:this.phone,content:this.con}).then((function(e){a.$util.Tips({title:e.msg,icon:"success"},{tab:3})})).catch((function(a){that.$util.Tips({title:a})})):this.$util.Tips({title:"请填写内容"}):this.$util.Tips({title:"请填写正确的手机号码"}):this.$util.Tips({title:"请填写姓名"})}}};e.default=n}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
crmeb/public/static/js/pages-index-index.bddf71f1.js
Normal file
1
crmeb/public/static/js/pages-index-index.bddf71f1.js
Normal file
File diff suppressed because one or more lines are too long
1
crmeb/public/static/js/pages-live_list-index.2a20e2b8.js
Normal file
1
crmeb/public/static/js/pages-live_list-index.2a20e2b8.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
crmeb/public/static/js/pages-news_list-index.df21eec7.js
Normal file
1
crmeb/public/static/js/pages-news_list-index.df21eec7.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user