添加:文创豆商城 - 分享任务支持后台设置分享内容
This commit is contained in:
parent
5ad3091def
commit
87afd29c3e
|
|
@ -1743,11 +1743,12 @@ class MemberController extends ApiController
|
|||
public function wxJsSdkConfig()
|
||||
{
|
||||
$member = \Setting::get('shop.member');
|
||||
$requestType = (int)request()->input('type');
|
||||
$info = [];
|
||||
$config = [];
|
||||
|
||||
$is_true = false;
|
||||
if (!$member['wechat_login_mode']) {
|
||||
if (!$member['wechat_login_mode'] || $requestType == 1) {
|
||||
if (config('app.framework') == 'platform') {
|
||||
if (app('plugins')->isEnabled('wechat')) {
|
||||
$is_true = true;
|
||||
|
|
|
|||
|
|
@ -462,9 +462,8 @@ class IndexController extends ApiController{
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Common: 获取相关统计信息
|
||||
* Common: 新文创空间数据 - 获取相关统计信息
|
||||
* Author: wu-hui
|
||||
* Time: 2023/12/01 18:18
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
|
@ -549,7 +548,7 @@ class IndexController extends ApiController{
|
|||
return $this->successJson('success',$info);
|
||||
}
|
||||
/**
|
||||
* Common: 获取相关信息列表
|
||||
* Common: 新文创空间数据 - 获获取相关信息列表
|
||||
* Author: wu-hui
|
||||
* Time: 2023/12/01 18:18
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
|
@ -617,7 +616,12 @@ class IndexController extends ApiController{
|
|||
'last_page' => (int)$result['last_page'],
|
||||
]);
|
||||
}
|
||||
// 获取相关结算信息
|
||||
/**
|
||||
* Common: 新文创空间数据 - 获获取相关结算信息
|
||||
* Author: wu-hui
|
||||
* Time: 2023/12/01 18:18
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getPublicDetails(){
|
||||
$withdrawId = request()->input('withdraw_id');
|
||||
$info = Withdraw::uniacid()
|
||||
|
|
@ -637,7 +641,33 @@ class IndexController extends ApiController{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Common: 获取文创商城分享信息
|
||||
* Author: wu-hui
|
||||
* Time: 2023/12/11 17:09
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getShopShareInfo(){
|
||||
// 设置信息获取
|
||||
$set = Setting::get('shop.shop');
|
||||
$culturalSpaceSet = Setting::get('plugin.cultural_space_set');
|
||||
// 处理入口地址
|
||||
if(strpos($culturalSpaceSet['shopping_share_link'],'https://') !== false || strpos($culturalSpaceSet['shopping_share_link'],'http://') !== false ){
|
||||
$link = $culturalSpaceSet['shopping_share_link'];
|
||||
}else {
|
||||
$link = !empty($culturalSpaceSet['shopping_share_link']) ? yzAppFullUrl($culturalSpaceSet['shopping_share_link']) : yzAppFullUrl('home');
|
||||
}
|
||||
|
||||
// 分享配置
|
||||
$shareData = [
|
||||
'title' => $culturalSpaceSet['shopping_share_title'] ?? $set['name'],
|
||||
'description' => $culturalSpaceSet['shopping_share_description'] ?? '',
|
||||
'imgUrl' => $culturalSpaceSet['shopping_share_image'] ?? yz_tomedia($set['logo']),
|
||||
'link' => $link,
|
||||
];
|
||||
|
||||
return $this->successJson('success',$shareData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@
|
|||
color: #b5b5b5;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.el-autocomplete{
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<div class="all" id="app">
|
||||
<el-form :model="set" label-width="170px">
|
||||
|
|
@ -149,6 +151,48 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分享设置" name="set_share">
|
||||
<div class="vue-main-title" >
|
||||
<div class="vue-main-title-left"></div>
|
||||
<div class="vue-main-title-content">文创豆商城分享设置</div>
|
||||
</div>
|
||||
<div class="vue-main-form">
|
||||
<el-form-item label="分享标题" prop="order_fund_ratio">
|
||||
<el-input type="text" placeholder="请输入分享标题" v-model="set.shopping_share_title" maxlength="10"></el-input>
|
||||
<div class="form-item_tips">标题长度不超过10个字符;默认为商城名称</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="分享描述" prop="order_fund_ratio">
|
||||
<el-input type="text" placeholder="请输入描述信息" v-model="set.shopping_share_description" maxlength="30"></el-input>
|
||||
<div class="form-item_tips">描述信息长度不超过30个字符,默认为空</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="入口地址" prop="order_fund_ratio">
|
||||
<el-autocomplete type="text"
|
||||
placeholder="请选择入口地址"
|
||||
v-model="set.shopping_share_link_title"
|
||||
:fetch-suggestions="querySearch"
|
||||
@select="handleSelect"
|
||||
></el-autocomplete>
|
||||
<div class="form-item_tips">用户分享给其他人后,点击进入的页面。默认为首页</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="分享图片">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<div class="upload-boxed">
|
||||
<div class="el-icon-plus" v-show="!set.shopping_share_image" @click="displaySelectMaterialPopup('shopping_share_image')"></div>
|
||||
<div>
|
||||
<img v-if="set.shopping_share_image" :src="set.shopping_share_image" />
|
||||
<i class="goods-images_remove el-icon-close" style="top:-6px" v-if="set.shopping_share_image" @click="removeVideo('shopping_share_image')"></i>
|
||||
</div>
|
||||
<div class="upload-boxed-text" @click="displaySelectMaterialPopup('shopping_share_image')">点击重新上传图片</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="form-item_tips">推荐图片比例为:200*200;默认为商城LOGO</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
</el-tabs>
|
||||
{{--保存按钮--}}
|
||||
<el-form-item>
|
||||
|
|
@ -157,7 +201,7 @@
|
|||
</div>
|
||||
</el-form>
|
||||
|
||||
|
||||
{{--商品图片选择器--}}
|
||||
<upload-multimedia-img
|
||||
:upload-show="showSelectMaterialPopup"
|
||||
:type="materialType"
|
||||
|
|
@ -167,6 +211,7 @@
|
|||
@replace="showSelectMaterialPopup = !showSelectMaterialPopup"
|
||||
@sure="selectedMaterial"
|
||||
></upload-multimedia-img>
|
||||
{{--入口地址选择器--}}
|
||||
</div>
|
||||
@include('public.admin.uploadMultimediaImg')
|
||||
<script>
|
||||
|
|
@ -182,7 +227,14 @@
|
|||
is_open_contribution_bonus: 0,
|
||||
},
|
||||
poster_list: JSON.parse('{!! json_encode($poster_list) !!}') || {},
|
||||
|
||||
home_link_list: [
|
||||
{ value: '商城首页', path: 'home'},
|
||||
{ value: '分类导航', path: 'category'},
|
||||
{ value: '全部商品', path: 'search'},
|
||||
{ value: '会员中心', path: 'member'},
|
||||
{ value: '文创豆商城', path: 'member/legumes/shopping'},
|
||||
{ value: '我的典藏', path: 'member/collection_room'},
|
||||
],
|
||||
showSelectMaterialPopup: false,
|
||||
materialType: "",
|
||||
formFieldName: "",
|
||||
|
|
@ -206,7 +258,6 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 视频选择
|
||||
displaySelectMaterialPopup(fieldName = "thumb", type = 1) {
|
||||
this.formFieldName = fieldName;
|
||||
|
|
@ -214,18 +265,41 @@
|
|||
this.materialType = String(type);
|
||||
},
|
||||
// 视频删除
|
||||
removeVideo(){
|
||||
this.set.task_video_link = ""
|
||||
removeVideo(fieldName = ''){
|
||||
if(name === 'shopping_share_image') this.set.shopping_share_image = '';
|
||||
else this.set.task_video_link = '';
|
||||
this.$forceUpdate()
|
||||
},
|
||||
// 选中
|
||||
selectedMaterial(name, image, imageUrl) {
|
||||
let originalImageUrl = JSON.parse(JSON.stringify(imageUrl))
|
||||
if(typeof imageUrl == 'string') {
|
||||
this.set.task_video_link = imageUrl;
|
||||
return
|
||||
}
|
||||
this.set.task_video_link = imageUrl[0].url
|
||||
// 链接获取
|
||||
let url = '';
|
||||
if(typeof imageUrl == 'string') url = originalImageUrl;
|
||||
url = originalImageUrl[0].url
|
||||
// 改变值
|
||||
if(name === 'shopping_share_image') this.set.shopping_share_image = url;
|
||||
else this.set.task_video_link = url;
|
||||
},
|
||||
// 分享入库选择
|
||||
querySearch(queryString, cb){
|
||||
let results = this.home_link_list;
|
||||
// results = queryString ? results.filter(this.createFilter(queryString)) : results;
|
||||
// 调用 callback 返回建议列表的数据
|
||||
cb(results);
|
||||
},
|
||||
createFilter(queryString) {
|
||||
return (restaurant) => {
|
||||
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
||||
};
|
||||
},
|
||||
handleSelect(item){
|
||||
this.set.shopping_share_link = item.path;
|
||||
this.set.shopping_share_link_title = item.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -344,6 +344,51 @@ class TeamAgencyController extends BaseController
|
|||
// $this->totalDividend += $TeamReturnService->totalDividend;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// 等级 升级记录校准
|
||||
/*$teamDividendList = TeamDividendAgencyModel::uniacid()->select(['id','uid','level','cultural_level_id'])->get()->toArray();
|
||||
$notUpLog = [];
|
||||
foreach($teamDividendList as $teamInfo){
|
||||
// 判断:普通等级是否存在升级记录
|
||||
if((int)$teamInfo['level'] > 0){
|
||||
$isHasLevelLog = (int)Uplog::uniacid()->where('uid',$teamInfo['uid'])->where('after_level_id',$teamInfo['level'])->value('id');
|
||||
if($isHasLevelLog <= 0) $notUpLog[$teamInfo['id']]['level_res'] = $teamInfo;
|
||||
}
|
||||
// 文创等级是否存在升级记录
|
||||
if((int)$teamInfo['cultural_level_id'] > 0){
|
||||
$isHasCulturalLevelLog = (int)Uplog::uniacid()->where('uid',$teamInfo['uid'])->where('after_level_id',$teamInfo['cultural_level_id'])->value('id');
|
||||
if($isHasCulturalLevelLog <= 0) {
|
||||
$teamInfo['info_count'] = Uplog::uniacid()->where('uid',$teamInfo['uid'])->count();
|
||||
$teamInfo['info_max_id'] = Uplog::uniacid()->where('uid',$teamInfo['uid'])->max('id');
|
||||
$teamInfo['info_list'] = Uplog::uniacid()->select('id','uid','before_level_id','after_level_id')->where('uid',$teamInfo['uid'])->get()->toArray();
|
||||
$notUpLog[$teamInfo['id']]['cultural_level_res'] = $teamInfo;
|
||||
|
||||
|
||||
// if($teamInfo['info_count'] >= 2 && $teamInfo['cultural_level_id'] == 6){
|
||||
// Uplog::uniacid()->where('id',$teamInfo['info_max_id'])->update([
|
||||
// 'after_level_id' => $teamInfo['cultural_level_id'],
|
||||
// 'after_level_setting' => '{"id":6,"uniacid":2,"level_name":"\u6d88\u8d39\u5546","cultural_level_name":"\u5e02\u573a\u670d\u52a1\u6d25\u8d34","level_weight":1,"level_type":1,"dividend_ratio":0,"code_num":"0","award_hierarchy":0,"award_ratio":"0","created_at":"2023-11-24 15:05:32","updated_at":"2023-11-30 10:49:36","deleted_at":null,"upgrade_reward_point":"0.00","upgrade_reward_gold":"0.00","award_gratitude":"0","hierarchy_limit":0,"auto_withdraw_day":"","auto_withdraw_period":"","number_limit":0,"culate_model":0,"current_md":null,"upgrade_reward_draw":0,"identity_type":0,"give_limit":0,"give_limit_level_id":5,"has_one_upgrade_set":{"id":6,"uniacid":"2","dividend_id":6,"parase":[{"self_buy_count":"1","become":"0"},{"order_money_2":"","order_num_2":"","order_money":"","first_money":"","order_count":"","first_order_count":"","first_order_count_to_goods":"","team_order_amount":"","team_shop_order_amount":"","team_profit_amount":"","team_goods_amount":"","team_goods_amount_to_goods":"","team_merchants_count":"","team_member_count":"","team_member_count_to_goods":"","first_lower_team_count":"","first_lower_team_count_to_goods":"","all_lower_team_count":"","first_lower_count":"","self_buy_money":"1","self_buy_count":"1","level":{"13":"","12":"","11":"","10":"","9":"","8":"","5":"","7":"","4":"","6":"","3":""},"first_child_level":{"13":"","12":"","11":"","10":"","9":"","8":"","5":"","7":"","4":"","6":"","3":""},"group_level":{"13":"","12":"","11":"","10":"","9":"","8":"","5":"","7":"","4":"","6":"","3":""},"level_line_num":"","level_line_level_id":"5","oneself":"0","level_line_people":"","level_line_area_num":"","level_line_area_level_id":"1","level_line_area_people":"","settle_money":"","first_cost_count":"","first_cost_num":"","dividend_and_peer_sum":"","first_second_cost_count":"","first_second_cost_num":"","team_new_order_number":"","team_new_order_number_to_goods":"","one_or_two":{"one_or_two_level_id":"5","one_or_two_people":""},"goods":"","many_good":["12","13","14"]}],"created_at":"2023-11-24 15:05:32","updated_at":"2023-11-30 10:49:36","deleted_at":null}}'
|
||||
//
|
||||
//
|
||||
// ]);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debug([
|
||||
'总数' => count($notUpLog),
|
||||
'uid' => implode(',',array_column(array_column($notUpLog,'cultural_level_res'),'uid')),
|
||||
'列表' => $notUpLog
|
||||
|
||||
]);*/
|
||||
|
||||
|
||||
|
||||
debug("结束");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue