From ea6deea758f1c7866c694f63a04730e86a463264 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Wed, 29 Oct 2025 09:05:43 +0800
Subject: [PATCH] Merge branch 'master' of http://git.zlxm286.com/r/companyProjecet
---
branch_vue/src/views/member/member/index.vue | 1
shop_vue/src/api/branch.js | 4 +
mobile/pages/branch/activity/detail/popup/reg.vue | 73 +++++++++++++++++++++--
admin/app/branch/controller/position/Position.php | 75 +++++++++++++++++++++++++
branch_vue/src/api/branch.js | 10 +++
5 files changed, 155 insertions(+), 8 deletions(-)
diff --git a/admin/app/branch/controller/position/Position.php b/admin/app/branch/controller/position/Position.php
new file mode 100644
index 0000000..46f700b
--- /dev/null
+++ b/admin/app/branch/controller/position/Position.php
@@ -0,0 +1,75 @@
+<?php
+
+namespace app\branch\controller\position;
+
+use app\branch\controller\Controller;
+use app\branch\model\position\Position as PositionModel;
+
+/**
+ * 职务管理控制器
+ */
+class Position extends Controller
+{
+ /**
+ * 获取列表
+ */
+ public function index()
+ {
+ // 列表
+ $model = new PositionModel;
+ $list = $model->getAll();
+ return $this->renderSuccess('', compact('list'));
+ }
+
+ /**
+ * 添加
+ */
+ public function add()
+ {
+ $model = new PositionModel;
+ // 新增记录
+ if ($model->add($this->postData())) {
+ return $this->renderSuccess('添加成功');
+ }
+ return $this->renderError($model->getError() ?: '添加失败');
+ }
+
+ /**
+ * 编辑
+ */
+ public function edit($position_id)
+ {
+ // 分类详情
+ $model = PositionModel::detail($position_id);
+ // 更新记录
+ if ($model->edit($this->postData())) {
+ return $this->renderSuccess('更新成功');
+ }
+ return $this->renderError($model->getError() ?: '更新失败');
+ }
+
+ /**
+ * 删除
+ */
+ public function delete($position_id)
+ {
+ $model = PositionModel::detail($position_id);
+ if (!$model->remove()) {
+ return $this->renderError('该职务使用中,删除失败');
+ }
+ return $this->renderSuccess('删除成功');
+ }
+
+ /**
+ * 开启禁止
+ */
+ public function status($position_id, $status)
+ {
+ // 商品详情
+ $model = PositionModel::detail($position_id);
+ if (!$model->setStatus($status)) {
+ return $this->renderError('操作失败');
+ }
+ return $this->renderSuccess('操作成功');
+ }
+}
\ No newline at end of file
diff --git a/branch_vue/src/api/branch.js b/branch_vue/src/api/branch.js
index 135206e..069f39e 100644
--- a/branch_vue/src/api/branch.js
+++ b/branch_vue/src/api/branch.js
@@ -34,6 +34,11 @@
return request._post('/branch/member.member/index', data, errorback);
},
+ /*添加成员*/
+ addMember(data, errorback) {
+ return request._post('/branch/member.member/add', data, errorback);
+ },
+
/*分会待审核列表*/
branchPendList(data, errorback) {
return request._post('/branch/branch.branch/apply', data, errorback);
@@ -87,6 +92,11 @@
return request._post('/branch/activity.file/delete', data, errorback);
},
+ /*获取职务*/
+ positionList(data, errorback) {
+ return request._post('/branch/position.position/index', data, errorback);
+ },
+
/*分会设置*/
branchSet(data, errorback) {
return request._get('/branch/setting.branch/index', data, errorback);
diff --git a/branch_vue/src/views/member/member/index.vue b/branch_vue/src/views/member/member/index.vue
index 7a2fd4a..22fba77 100644
--- a/branch_vue/src/views/member/member/index.vue
+++ b/branch_vue/src/views/member/member/index.vue
@@ -115,6 +115,7 @@
},
created() {
/*获取列表*/
+ this.getPosition();
this.getData();
},
methods: {
diff --git a/mobile/pages/branch/activity/detail/popup/reg.vue b/mobile/pages/branch/activity/detail/popup/reg.vue
index f217c86..7bbce7d 100644
--- a/mobile/pages/branch/activity/detail/popup/reg.vue
+++ b/mobile/pages/branch/activity/detail/popup/reg.vue
@@ -106,6 +106,7 @@
</template>
<script>
+ import { pay } from '@/common/pay.js';
import PointsForm from './points'; // 积分选择弹窗
export default {
components: {
@@ -141,11 +142,22 @@
activityData: {},
isOpenPoints: false, // 是否打开积分弹窗
validate: false,
+ payData: [], // 半屏小程序相关
+ isFirst: false,
};
},
props: ['isOpenReg', 'in_radius'],
onLoad() {},
+ onShow() {
+ let self = this;
+ let options = wx.getEnterOptionsSync();
+ // 从半屏小程序返回时执行
+ if (options.scene == '1038' && self.isFirst == true) {
+ self.isFirst = false;
+ self.onPayResult(options.referrerInfo.extraData);
+ }
+ },
mounted() {
this.init();
},
@@ -197,6 +209,37 @@
}
},
+ // 半屏小程序返回
+ onPayResult(e) {
+ let self = this;
+ self.loading = false;
+ uni.hideLoading();
+ self.isFirst = false;
+ if (e.pay_result == 'success') {
+ self.paySuccess(self.payData);
+ } else {
+ if(self.order_id > 0){
+ //兼容重新付款
+ }else{
+ self.payError(self.payData);
+ }
+ }
+ },
+
+ paySuccess(result) {
+ let self = this;
+ self.showSuccess("支付成功", function() {
+ self.$emit('close', 1);
+ })
+
+ },
+ payError(result) {
+ let self = this;
+ self.showSuccess("支付成功", function() {
+ self.$emit('close', 2);
+ })
+ },
+
// 是否使用余额支付
onUseBalance(e) {
if (e.target.value == true) {
@@ -238,15 +281,29 @@
in_radius: self.in_radius ? 1 : 0 // 如果为1,报名成功后直接签到
})
)
- }, function(result) {
+ }, function(res) {
uni.hideLoading();
- if (result.data.online_money) {
- pay(result, self, function() {
-
- }, function() {
- reg_success = 2; // 失败
- });
- } else if (result.code != 1) {
+ if (res.data.online_money) {
+ // 半屏小程序支付 by lyzflash
+ if (res.data.payment.is_embed) {
+ // console.log(res.data.payment);
+ self.isFirst = true;
+ uni.openEmbeddedMiniProgram({
+ appId: res.data.payment.embed_app_id,
+ path: res.data.payment.embed_path,
+ extraData: res.data.payment.extraData,
+ envVersion: 'release', // develop开发版 trial体验版 release正式版
+ success:function() {
+ console.log('打开半屏小程序成功');
+ },
+ fail:function() {
+ console.log('打开半屏小程序失败');
+ }
+ });
+ return;
+ }
+ pay(res, self, self.paySuccess, self.payError);
+ } else if (res.code != 1) {
reg_success = 2; // 失败
}
self.$emit('close', reg_success);
diff --git a/shop_vue/src/api/branch.js b/shop_vue/src/api/branch.js
index b0675eb..e1a19e5 100644
--- a/shop_vue/src/api/branch.js
+++ b/shop_vue/src/api/branch.js
@@ -33,6 +33,10 @@
memberList(data, errorback) {
return request._post('/shop/branch.member/index', data, errorback);
},
+ /*添加成员*/
+ addMember(data, errorback) {
+ return request._post('/shop/branch.member/add', data, errorback);
+ },
/*提现记录*/
cashList(data, errorback) {
return request._post('/shop/branch.cash/index', data, errorback);
--
Gitblit v1.9.2