Browse Source

formal v1.0.0

master
刘嘉炜 4 years ago
parent
commit
33e5a18765
  1. 16
      README.md
  2. 4
      src/js/api.js
  3. 2
      src/manifest.json
  4. 2
      src/pages.json
  5. 4
      src/pages/approve/list/list.vue
  6. 17
      src/pages/approve/record/record.vue
  7. 3
      src/pages/course/experience/experience.vue
  8. 1
      src/pages/course/offer/offer.vue
  9. 5
      src/pages/shift/application/application.vue
  10. 16
      src/pages/site/manage/manage.vue
  11. 16
      src/pages/time/select/select.vue

16
README.md

@ -38,3 +38,19 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
padding-bottom: calc( 0 + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ padding-bottom: calc( 0 + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 0 + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ padding-bottom: calc( 0 + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
``` ```
正式服:
APPID:
wxd71043ec955dfecf
AppSecret:
dacec45d75df1cd109090e88855cefc8
测试服:
APPID:
wx7873af4ffca558fd
AppSecret:
9110b93981e88b0127a4f6a8c940dc90

4
src/js/api.js

@ -1,7 +1,7 @@
export const ORIGIN = `https://test.ouxuanzhineng.cn`; // 测试
// export const ORIGIN = `https://test.ouxuanzhineng.cn`; // 测试
// export const ORIGIN = `http://testmanager.ouxuanzhineng.cn`; // 测试 // export const ORIGIN = `http://testmanager.ouxuanzhineng.cn`; // 测试
// export const ORIGIN = `http://kahing.local:9090`; // 本地测试 // export const ORIGIN = `http://kahing.local:9090`; // 本地测试
// export const ORIGIN = `https://coach.ouxuanzhineng.cn`; // 正式
export const ORIGIN = `https://coach.ouxuanzhineng.cn`; // 正式
export const API = { export const API = {
coachLogin: `${ORIGIN}/stadium/coach/login`, // 小程序-账号登录 coachLogin: `${ORIGIN}/stadium/coach/login`, // 小程序-账号登录

2
src/manifest.json

@ -54,7 +54,7 @@
}, },
"mp-weixin": { /* */ "mp-weixin": { /* */
"appid": "wx7873af4ffca558fd",
"appid": "wxd71043ec955dfecf",
"setting": { "setting": {
"urlCheck": false "urlCheck": false
}, },

2
src/pages.json

@ -116,7 +116,7 @@
{ {
"path": "pages/approve/record/record", "path": "pages/approve/record/record",
"style": { "style": {
"navigationBarTitleText": "我的审批"
"navigationBarTitleText": "审批记录"
} }
}, },
{ {

4
src/pages/approve/list/list.vue

@ -49,9 +49,9 @@
</view> </view>
<view class="l-reason" v-if="e.approve_type == 1"> <view class="l-reason" v-if="e.approve_type == 1">
<view>原因:</view> <view>原因:</view>
<view :class="[e._isUnfold?'':'text-hide']">{{e.for_leave_reason || '-'}}</view>
<view :class="[e._isUnfold&&e.for_leave_reason.length<30?'':'text-hide']">{{e.for_leave_reason || '-'}}</view>
</view> </view>
<view class="l-unfold" v-if="e.approve_type == 1">
<view class="l-unfold" v-if="e.approve_type == 1&&e.for_leave_reason.length>30">
<view> <view>
<text @click.stop="unFoldBtn(i)">{{e._isUnfold?'收起':'展开'}}</text> <text @click.stop="unFoldBtn(i)">{{e._isUnfold?'收起':'展开'}}</text>
<image @click.stop="unFoldBtn(i)" :style="e._isUnfold?'transform: rotateZ(180deg);':''" mode="aspectFit" src="/static/images/arrow_c874.png"></image> <image @click.stop="unFoldBtn(i)" :style="e._isUnfold?'transform: rotateZ(180deg);':''" mode="aspectFit" src="/static/images/arrow_c874.png"></image>

17
src/pages/approve/record/record.vue

@ -47,12 +47,12 @@
</view> </view>
<view class="l-reason" v-if="e.approve_type == 1"> <view class="l-reason" v-if="e.approve_type == 1">
<view>原因:</view> <view>原因:</view>
<view>{{e.for_leave_reason || '-'}}</view>
<view :class="[e._isUnfold&&e.for_leave_reason.length<30?'':'text-hide']">{{e.for_leave_reason || '-'}}</view>
</view> </view>
<view class="l-unfold">
<view class="l-unfold" v-if="e.approve_type == 1&&e.for_leave_reason.length>30">
<view> <view>
<text>展开</text>
<image mode="aspectFit" src="/static/images/arrow_c874.png"></image>
<text @click.stop="unFoldBtn(i)">{{e._isUnfold?'收起':'展开'}}</text>
<image @click.stop="unFoldBtn(i)" :style="e._isUnfold?'transform: rotateZ(180deg);':''" mode="aspectFit" src="/static/images/arrow_c874.png"></image>
</view> </view>
</view> </view>
</view> </view>
@ -79,6 +79,11 @@ export default {
this.getApproveList(); this.getApproveList();
}, },
methods: { methods: {
unFoldBtn(i){
let _list = [...this.approveList];
_list[i]._isUnfold = !_list[i]._isUnfold;
this.approveList = [..._list];
},
tabChange: util.debounce(function(i){ tabChange: util.debounce(function(i){
this.approveList = []; this.approveList = [];
this.tabIdx = i; this.tabIdx = i;
@ -238,6 +243,10 @@ export default {
line-height: 40upx; line-height: 40upx;
font-size: 28upx; font-size: 28upx;
color: #9a9a9d; color: #9a9a9d;
word-break: break-all;
&.text-hide{
@include textHide(2);
}
} }
} }
} }

3
src/pages/course/experience/experience.vue

@ -121,7 +121,8 @@ export default {
if(_ids.length<=0)return; if(_ids.length<=0)return;
let _query = { let _query = {
occupyType: 'exp_booking', occupyType: 'exp_booking',
exp_booking_ids: _ids
exp_booking_ids: _ids,
course_id: this.course_id,
} }
util.routeTo(`/pages/site/manage/manage?query=${util.jsonStr(_query)}`, 'nT'); util.routeTo(`/pages/site/manage/manage?query=${util.jsonStr(_query)}`, 'nT');
}, },

1
src/pages/course/offer/offer.vue

@ -39,6 +39,7 @@
<view class="m-lines"> <view class="m-lines">
<view><text>课程名称:</text>{{optionsQuery.course_name || '-'}}</view> <view><text>课程名称:</text>{{optionsQuery.course_name || '-'}}</view>
<view><text>上课用户:</text>{{optionsQuery.user_name || '-'}}</view> <view><text>上课用户:</text>{{optionsQuery.user_name || '-'}}</view>
<view v-if="!!coachInfo"><text>上课教练:</text>{{coachInfo.name || '-'}}</view>
<view><text>课程次数:</text>{{courseNumber || '-'}}</view> <view><text>课程次数:</text>{{courseNumber || '-'}}</view>
<view><text>课程报价:</text>{{coursePrice || '-'}}</view> <view><text>课程报价:</text>{{coursePrice || '-'}}</view>
</view> </view>

5
src/pages/shift/application/application.vue

@ -227,16 +227,16 @@ export default {
// //
getCoachList(){ getCoachList(){
util.showLoad(); util.showLoad();
let { storeInfo } = this;
servers.get({ servers.get({
url: API.getCoachList, url: API.getCoachList,
data: { },
data: { stadium_id: storeInfo.id },
failMsg: '加载失败!' failMsg: '加载失败!'
}) })
.then(res=>{ .then(res=>{
util.hideLoad(); util.hideLoad();
let _list = res.list || []; let _list = res.list || [];
this.coachList = _list; this.coachList = _list;
console.warn(_list)
}) })
}, },
// //
@ -267,6 +267,7 @@ export default {
stadium_id: storeInfo.id, stadium_id: storeInfo.id,
is_experience_class, is_experience_class,
kind, kind,
have_class_way: 2,
}, },
failMsg: '加载失败!' failMsg: '加载失败!'
}) })

16
src/pages/site/manage/manage.vue

@ -118,6 +118,7 @@ export default {
occupyTypeInfo: { occupyTypeInfo: {
occupyType: 'normal', // normal: exp_booking occupyType: 'normal', // normal: exp_booking
exp_booking_ids: [], // id exp_booking_ids: [], // id
course_id: '', // id
}, },
} }
}, },
@ -130,19 +131,20 @@ export default {
tipTimer = null; tipTimer = null;
}, },
async onLoad(options){ async onLoad(options){
let _optionsQuery = {};
if(options.query){ if(options.query){
let _optionsQuery = util.jsonPar(options.query);
_optionsQuery = util.jsonPar(options.query);
if(!!_optionsQuery.occupyType)this.occupyTypeInfo = _optionsQuery; if(!!_optionsQuery.occupyType)this.occupyTypeInfo = _optionsQuery;
} }
try { try {
util.showLoad(); util.showLoad();
let _storeInfo = await this.getStoreList();
let _storeInfo = await this.getStoreList(_optionsQuery.course_id);
let _storeList = _storeInfo.stadium_data || []; let _storeList = _storeInfo.stadium_data || [];
if(!_storeList.length)return util.showNone('没有店铺信息!'); if(!_storeList.length)return util.showNone('没有店铺信息!');
this.storeList = _storeList ; this.storeList = _storeList ;
let _curStore = _storeList[0] || {}; let _curStore = _storeList[0] || {};
this.curStoreInfo = _curStore; this.curStoreInfo = _curStore;
let _typeInfo = await this.getClassify({ stadium_id: _curStore.id });
let _typeInfo = await this.getClassify({ stadium_id: _curStore.id, course_id: _optionsQuery.course_id });
let _typeList = _typeInfo || []; let _typeList = _typeInfo || [];
this.typeList = _typeList; this.typeList = _typeList;
if(!_typeList.length)return util.showNone('没有球类信息!'); if(!_typeList.length)return util.showNone('没有球类信息!');
@ -324,18 +326,18 @@ export default {
}) })
}, },
// //
getClassify({stadium_id}){
getClassify({stadium_id, course_id = ''}){
return servers.get({ return servers.get({
url: API.venueTypes, url: API.venueTypes,
data: {stadium_id},
data: { stadium_id, course_id },
failMsg: '加载分类失败!' failMsg: '加载分类失败!'
}) })
}, },
// //
getStoreList(){
getStoreList( course_id = '' ){
return servers.get({ return servers.get({
url: API.getHomeData, url: API.getHomeData,
data: {},
data: { course_id },
failMsg: '加载店铺失败!' failMsg: '加载店铺失败!'
}) })
}, },

16
src/pages/time/select/select.vue

@ -46,7 +46,7 @@
]" ]"
@click="timeSelect({i, j, k})" @click="timeSelect({i, j, k})"
> >
<view>{{k.remark || ''}}</view>
<view>{{ k.status == 2&&!!k.course_id ? k.course.name : k.remark }}</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -218,10 +218,16 @@ export default {
this.changeStatusIDX = e.detail.value; this.changeStatusIDX = e.detail.value;
}, },
timeSelect({i, j, k}){ timeSelect({i, j, k}){
if(k.status ==1 || k.status ==2)return util.showModal({
title: '备注',
content: k.remark
});
if(k.status ==1 || k.status ==2){
if(k.course_id)return util.showModal({
title: '课程',
content: k.course.name
});
return util.showModal({
title: '备注',
content: k.remark
});
}
let _list = [...this.timeList]; let _list = [...this.timeList];
_list[i].items[j]._selectStatus = !_list[i].items[j]._selectStatus; _list[i].items[j]._selectStatus = !_list[i].items[j]._selectStatus;
this.timeList = [..._list]; this.timeList = [..._list];

Loading…
Cancel
Save