Browse Source

修改 bug

master
王泽彦 8 months ago
parent
commit
b53b0b4c64
  1. 17
      niucloud/app/api/controller/student/StudentController.php
  2. 13
      niucloud/app/service/api/student/StudentService.php
  3. 4
      uniapp/common/config.js
  4. 11
      uniapp/components/client-info-card/client-info-card.vue
  5. 5
      uniapp/pages-market/clue/clue_info.vue
  6. 9
      uniapp/pages-student/child/add.vue
  7. 26
      uniapp/pages.json
  8. 5
      uniapp/pages/common/home/index.vue
  9. 9
      uniapp/pages/student/home/index.vue
  10. 4
      uniapp/pages/student/login/login.vue

17
niucloud/app/api/controller/student/StudentController.php

@ -301,4 +301,21 @@ class StudentController extends BaseController
return fail($e->getMessage());
}
}
/**
* 获取学员标签列表
* @param Request $request
*/
public function getStudentTagList(Request $request)
{
try {
$service = new StudentService();
$result = $service->getStudentTagList();
return success($result);
} catch (\Exception $e) {
return fail($e->getMessage());
}
}
}

13
niucloud/app/service/api/student/StudentService.php

@ -8,6 +8,7 @@ namespace app\service\api\student;
use app\model\customer_resources\CustomerResources;
use app\model\student\Student;
use app\model\member\Member;
use app\model\student_label\StudentLabel;
use think\facade\Db;
use core\base\BaseService;
use core\exception\CommonException;
@ -660,4 +661,16 @@ class StudentService extends BaseService
// 如果都没有,抛出异常
throw new CommonException('用户未登录');
}
/**
* 学员标签
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getStudentTagList()
{
return (new StudentLabel())->order('sort desc,create_time desc')->select()->toArray();
}
}

4
uniapp/common/config.js

@ -1,6 +1,6 @@
// 环境变量配置
// const env = 'development'
const env = 'prod'
const env = 'development'
// const env = 'prod'
const isMockEnabled = false // 默认禁用Mock优先模式,仅作为回退
const isDebug = false // 默认启用调试模式
const devurl = 'http://localhost:20080/api'

11
uniapp/components/client-info-card/client-info-card.vue

@ -17,8 +17,8 @@
<view class="contact-btn phone-btn" @click="handleMakeCall">
<text class="contact-icon">📞</text>
</view>
<view class="action-toggle" @click="toggleActions" v-if="actions && actions.length > 0">
<text class="toggle-icon">{{ actionsExpanded ? '▲' : '▼' }}</text>
<view class="contact-btn message-btn" @click="handleSendMessage">
<text class="contact-icon">💬</text>
</view>
</view>
</view>
@ -89,6 +89,13 @@ export default {
handleAction(action) {
this.$emit('action', { action, client: this.clientInfo })
},
handleSendMessage() {
this.$util.navigateToPage('/pages-common/im_chat_info', {
from_id: uni.getStorageSync('userInfo').id,
to_id: this.$util.safeGet(this.clientInfo, 'customerResource.id', '')
})
}
}
}

5
uniapp/pages-market/clue/clue_info.vue

@ -357,7 +357,8 @@ export default {
{ id: 1, name: '基本资料' },
{ id: 3, name: '通话记录' },
{ id: 7, name: '修改资料' },
{ id: 6, name: '修改记录' }
{ id: 6, name: '修改记录' },
{ id: 8, name: '赠品记录' }
],
actionButtons: [
@ -905,7 +906,7 @@ export default {
if (!labelId) return []
// TODO: student_label
// const res = await apiRoute.getStudentLabel({ id: labelId })
const res = await apiRoute.getStudentLabel({ id: labelId })
//
const labelMap = {

9
uniapp/pages-student/child/add.vue

@ -33,7 +33,8 @@
<!-- 姓名输入 -->
<view class="form_item">
<view class="item_label required">姓名</view>
<input
<input
style="height: 90rpx;"
v-model="formData.name"
placeholder="请输入孩子姓名"
class="form_input"
@ -80,7 +81,8 @@
<!-- 紧急联系人 -->
<view class="form_item">
<view class="item_label">紧急联系人</view>
<input
<input
style="height: 90rpx;"
v-model="formData.emergency_contact"
placeholder="请输入紧急联系人姓名"
class="form_input"
@ -91,7 +93,8 @@
<!-- 联系电话 -->
<view class="form_item">
<view class="item_label">联系电话</view>
<input
<input
style="height: 90rpx;"
v-model="formData.contact_phone"
placeholder="请输入联系电话"
class="form_input"

26
uniapp/pages.json

@ -33,6 +33,15 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/common/profile/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#181A20",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/student/profile/index",
"style": {
@ -594,15 +603,6 @@
"backgroundColor": "#181A20"
}
},
{
"path": "profile/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#181A20",
"navigationBarTextStyle": "white"
}
},
{
"path": "profile/personal_info",
"style": {
@ -633,18 +633,18 @@
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"selectedColor": "#29d3b4",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"backgroundColor": "#1a1a1a",
"list": [
{
"pagePath": "pages/student/home/index",
"pagePath": "pages/common/home/index",
"iconPath": "static/icon-img/home.png",
"selectedIconPath": "static/icon-img/home-active.png",
"text": "首页"
},
{
"pagePath": "pages/student/profile/index",
"pagePath": "pages/common/profile/index",
"iconPath": "static/icon-img/profile.png",
"selectedIconPath": "static/icon-img/profile-active.png",
"text": "我的"

5
uniapp/pages/common/home/index.vue

@ -100,11 +100,6 @@
title: '资料库',
icon: 'folder-add-filled',
path: '/pages-coach/coach/my/teaching_management'
},
{
title: '系统设置',
icon: 'gear-filled',
path: '/pages-common/profile/index'
}
]
}

9
uniapp/pages/student/home/index.vue

@ -23,7 +23,7 @@
<view class="student_selector_section">
<view class="selector_header">
<view class="header_title">我的孩子</view>
<view class="switch_button" @click="openStudentPopup" v-if="studentList.length >= 1">
<view class="switch_button" @click="openStudentPopup">
{{ studentList.length > 1 ? '切换' : '学员' }} ({{ studentList.length }})
</view>
</view>
@ -322,13 +322,6 @@
},
openStudentPopup() {
if (this.studentList.length === 0) {
uni.showToast({
title: '暂无学员信息',
icon: 'none'
})
return
}
this.showStudentPopup = true
},

4
uniapp/pages/student/login/login.vue

@ -759,8 +759,8 @@
// tabBar使
const tabBarPages = [
'/pages/student/home/index',
'/pages/student/profile/index'
'/pages/common/home/index',
'/pages/common/profile/index'
];
if (tabBarPages.includes(openPath)) {

Loading…
Cancel
Save