Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
From-wh 2023-02-24 15:04:42 +08:00
commit 7ca75812f4
14 changed files with 119 additions and 60 deletions

View File

@ -37,7 +37,12 @@ class AuthController
/**
* 小程序授权登录
* @param Request $request
* @return mixed
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/02/24
*/
public function mp_auth(Request $request)
{

View File

@ -79,6 +79,23 @@ class AuthController
return app('json')->fail(410019);
}
/**
* 小程序绑定手机号
* @param string $code
* @param string $iv
* @param string $encryptedData
* @return \think\Response
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/02/24
*/
public function bindingPhone($code = '', $iv = '', $encryptedData = '')
{
if (!$code || !$iv || !$encryptedData) return app('json')->fail(100100);
$this->services->bindingPhone($code, $iv, $encryptedData);
return app('json')->success(410016);
}
/** 以下方法该版本暂未使用 */
/**
* 小程序授权登录

View File

@ -35,7 +35,9 @@ Route::group('v2', function () {
//是否强制绑定手机号
Route::get('bind_status', 'v2.PublicController/bindPhoneStatus');
//小程序授权绑定手机号
Route::post('auth_bindind_phone', 'v2.wechat.AuthController/authBindingPhone');
Route::post('auth_bindind_phone', 'v2.wechat.AuthController/bindingPhone');
//小程序授权后绑定手机号
Route::post('routine/binding_phone', 'v2.wechat.AuthController/authBindingPhone');
//小程序手机号登录直接绑定
Route::post('phone_silence_auth', 'v2.wechat.AuthController/silenceAuthBindingPhone');
//微信手机号登录直接绑定

View File

@ -461,6 +461,34 @@ class RoutineServices extends BaseServices
throw new ApiException(410019);
}
/**
* @param $code
* @param $iv
* @param $encryptedData
* @return bool
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/02/24
*/
public function bindingPhone($code, $iv, $encryptedData)
{
[$userInfoCong, $userInfo] = app()->make(OAuth::class, ['mini_program'])->oauth($code, [
'iv' => $iv,
'encryptedData' => $encryptedData
]);
if (!$userInfo || !isset($userInfo['purePhoneNumber'])) {
throw new ApiException(410079);
}
$uid = app()->make(WechatUserServices::class)->openidTouid($userInfoCong['openid']);
$userServices = app()->make(UserServices::class);
if ($userServices->count(['phone|account' => $userInfo['purePhoneNumber']])) {
throw new ApiException(410028);
}
$res = app()->make(UserServices::class)->update(['id' => $uid], ['phone' => $userInfo['purePhoneNumber']]);
if ($res) return true;
throw new ApiException(410017);
}
/**
* 更新用户信息

View File

@ -198,6 +198,10 @@ class WechatUserServices extends BaseServices
* 授权后获取用户信息
* @param $openid
* @param $user_type
* @return array|\think\Model|null
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/02/24
*/
public function getAuthUserInfo($openid, $user_type)
{
@ -256,10 +260,14 @@ class WechatUserServices extends BaseServices
/**
* 微信授权成功后
* @param $event
* @param array $data
* @return array|mixed|\think\Model|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/02/24
*/
public function wechatOauthAfter(array $data)
{

View File

@ -1,9 +1,7 @@
<template>
<div class="article-manager">
<div class="i-layout-page-header">
<div class="i-layout-page-header">
<div class="i-layout-page-header" style="padding: 18px 32px;border-bottom: 1px solid #f2f2f2;">
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
</div>
</div>
<Card :bordered="false" dis-hover class="ivu-mt">
<!-- 公众号设置 -->

View File

@ -1,6 +1,6 @@
<template>
<div>
<Card :bordered="false" dis-hover class="ive-mt tablebox">
<Card :bordered="false" dis-hover class="ive-mt">
<div class="ive-mt tabbox">
<Tabs @on-click="onClickTab" class="mb20">
<TabPane label="日账单" name="day" />

View File

@ -1,21 +1,5 @@
<template>
<div>
<div class="i-layout-page-header header_top">
<div class="i-layout-page-header fl_header">
<!-- <router-link :to="{ path: '/admin/marketing/lottery/index' }"
><Button icon="ios-arrow-back" size="small" type="text"
>返回</Button
></router-link
> -->
<!-- <Divider type="vertical" /> -->
<span
class="ivu-page-header-title mr20"
style="padding: 0"
v-text="$route.params.id ? '编辑抽奖信息' : '添加抽奖信息'"
></span>
</div>
</div>
<Card :bordered="false" dis-hover class="ivu-mt">
<div>
<Tabs v-model="formValidate.factor" @on-click="onClickTab">

View File

@ -1,5 +1,8 @@
<template>
<div :style="bgcolors">
<div class="i-layout-page-header">
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
</div>
<div class="box-wrapper">
<div v-if="name == 'sign_day_num'" class="iframe" :bordered="false">
<div class="iframe-box">
@ -1174,7 +1177,6 @@ export default {
padding: 20px;
background-color: #fff;
border-radius: 5px;
margin: 20px;
}
.iview-video-style {

View File

@ -348,12 +348,19 @@ export default {
</script>
<style scoped lang="stylus">
.tabBox_img
width 36px
height 36px
border-radius:4px
cursor pointer
img
width 100%
height 100%
.article-manager{
margin-top: 3px;
}
.tabBox_img{
width: 36px;
height: 36px;
border-radius:4px;
cursor: pointer;
img{
width: 100%;
height: 100%;
}
}
</style>

View File

@ -1,10 +1,5 @@
<template>
<div>
<div class="i-layout-page-header">
<div class="i-layout-page-header">
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
</div>
</div>
<Card :bordered="false" dis-hover class="ivu-mt">
<Form
ref="formValidate"

View File

@ -1,4 +1,9 @@
<template>
<div>
<div class="i-layout-page-header" style="padding: 18px 32px;border-bottom: 1px solid #f2f2f2;">
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
</div>
<div class="article-manager">
<Card :bordered="false" dis-hover class="ivu-mt fromBox">
<Tabs v-model="currentTab" @on-click="changeTab" v-if="headerList.length">
@ -22,6 +27,7 @@
<Spin size="large" fix v-if="spinShow"></Spin>
</Card>
</div>
</div>
</template>
<script>

View File

@ -892,7 +892,7 @@ export default {
.main-btn {}
.card-tree{
width: 270px;
height: calc(100vh - 190px);
height: calc(100vh - 115px);
overflow-y: scroll;
}
>>> .tree {
@ -981,7 +981,7 @@ export default {
}
.right-card {
flex: 1;
max-height: calc(100vh - 190px);
max-height: calc(100vh - 115px);
overflow-y: scroll;
}

View File

@ -1,9 +1,7 @@
<template>
<div>
<div class="i-layout-page-header">
<div class="i-layout-page-header">
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
</div>
</div>
<Row type="flex">
<Col span="24">
@ -105,10 +103,13 @@ export default {
</script>
<style scoped lang="stylus">
.i-layout-page-header{
padding: 18px 32px;
}
.maxInpt{
max-width 400px
margin-left auto
margin-right auto
max-width: 400px;
margin-left: auto;
margin-right: auto;
}
.index_from{
display: flex;
@ -117,27 +118,33 @@ export default {
align-items: center;
}
.trip{
width 400px
width: 400px;
text-align: left;
color #aaa
color: #aaa;
}
.page-account-container{
text-align center
padding 200px 0
text-align: center;
padding: 200px 0;
}
.page-account-top{
margin-bottom 50px
margin-bottom: 50px;
}
.page-account-top-tit
font-size 30px
color #1890FF
font-weight 500
.page-account-other
text-align center
color #1890FF
font-size 12px
span
cursor pointer
.page-account-top-tit{
font-size:30px;
color:#1890FF;
font-weight:500;
}
.page-account-other{
text-align:center;
color:#1890FF;
font-size:12px;
span{
cursor: pointe;
}
}
>>> .btn{
font-size: 15px !important;
}