no message
Showing
8 changed files
with
9 additions
and
433 deletions
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | ||
| 5 | // staging | 5 | // staging |
| 6 | // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/"; | 6 | // const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/"; |
| 7 | const baseUrl_api = "http://192.168.1.11:8787"; | 7 | const baseUrl_api = "http://182.92.233.247/stage-api/"; |
| 8 | 8 | ||
| 9 | export default { | 9 | export default { |
| 10 | baseUrl_api | 10 | baseUrl_api | ... | ... |
| ... | @@ -38,7 +38,8 @@ | ... | @@ -38,7 +38,8 @@ |
| 38 | "quickapp" : {}, | 38 | "quickapp" : {}, |
| 39 | /* 小程序特有相关 */ | 39 | /* 小程序特有相关 */ |
| 40 | "mp-weixin" : { | 40 | "mp-weixin" : { |
| 41 | "appid" : "wx5d51e8ed31bbdbb7",//J系统 | 41 | "appid" : "wx5d51e8ed31bbdbb7", //J系统 |
| 42 | |||
| 42 | // "appid" : "wx70f16625f10de4fe",//新跆联 | 43 | // "appid" : "wx70f16625f10de4fe",//新跆联 |
| 43 | // "appid" : "wx5e2471ed6210c3a6", | 44 | // "appid" : "wx5e2471ed6210c3a6", |
| 44 | "setting" : { | 45 | "setting" : { |
| ... | @@ -48,7 +49,9 @@ | ... | @@ -48,7 +49,9 @@ |
| 48 | }, | 49 | }, |
| 49 | "usingComponents" : true, | 50 | "usingComponents" : true, |
| 50 | "permission" : {}, | 51 | "permission" : {}, |
| 51 | "optimization":{"subPackages":true} | 52 | "optimization" : { |
| 53 | "subPackages" : true | ||
| 54 | } | ||
| 52 | }, | 55 | }, |
| 53 | "mp-alipay" : { | 56 | "mp-alipay" : { |
| 54 | "usingComponents" : true | 57 | "usingComponents" : true | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="graybg"> | ||
| 3 | <view v-if="formData.type=='0'"> | ||
| 4 | <view v-html="formData.content" class="richContent"></view> | ||
| 5 | </view> | ||
| 6 | <view v-if="formData.type=='1'" class="formBox"> | ||
| 7 | <view @click="clickImg"> | ||
| 8 | <image style="width: 100%;height: 50vw;" mode="aspectFit" v-for="p in formData.picArr" :src="p"/> | ||
| 9 | </view> | ||
| 10 | |||
| 11 | <view v-if="formData.content2" v-html="formData.content2" class="richContent2"></view> | ||
| 12 | |||
| 13 | <uni-forms ref="baseForm" :modelValue="baseFormData"> | ||
| 14 | <uni-forms-item label="姓名" required v-if="formData.fields.indexOf('0')>-1"> | ||
| 15 | <uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" /> | ||
| 16 | </uni-forms-item> | ||
| 17 | <uni-forms-item label="手机号" required v-if="formData.fields.indexOf('1')>-1"> | ||
| 18 | <uni-easyinput v-model="baseFormData.telno" placeholder="请输入手机号" /> | ||
| 19 | </uni-forms-item> | ||
| 20 | <uni-forms-item label="需求描述" required v-if="formData.fields.indexOf('2')>-1"> | ||
| 21 | <uni-easyinput type="textarea" v-model="baseFormData.requirement" placeholder="请输入需求描述" /> | ||
| 22 | </uni-forms-item> | ||
| 23 | </uni-forms> | ||
| 24 | <button type="primary" @click="submit">提交</button> | ||
| 25 | </view> | ||
| 26 | </view> | ||
| 27 | 2 | ||
| 28 | <uni-popup ref="alertPayOk" type="dialog"> | ||
| 29 | <uni-popup-dialog type="success" confirmText="返回主页" content="提交成功" @confirm="goIndex"> | ||
| 30 | </uni-popup-dialog> | ||
| 31 | </uni-popup> | ||
| 32 | </template> | 3 | </template> |
| 33 | 4 | ||
| 34 | <script setup> | 5 | <script setup> |
| ... | @@ -42,85 +13,7 @@ | ... | @@ -42,85 +13,7 @@ |
| 42 | import * as api from '@/common/api.js'; | 13 | import * as api from '@/common/api.js'; |
| 43 | const { proxy } = getCurrentInstance() | 14 | const { proxy } = getCurrentInstance() |
| 44 | const app = getApp(); | 15 | const app = getApp(); |
| 45 | const telNo = ref(''); | 16 | |
| 46 | const alertPayOk = ref(null); | ||
| 47 | const isActive = ref(null); | ||
| 48 | const formData = ref({}) | ||
| 49 | const baseFormData = ref({}) | ||
| 50 | const rules= ref({ | ||
| 51 | name: {rules: [{required: true,errorMessage: '请输入姓名'}]}, | ||
| 52 | telno: {rules: [{required: true,errorMessage: '请输入手机号'}]}, | ||
| 53 | requirement: {rules: [{required: true,errorMessage: '请输入需求描述'}]}, | ||
| 54 | }) | ||
| 55 | |||
| 56 | onReady(()=>{ | ||
| 57 | // 修改页头标题 | ||
| 58 | uni.setNavigationBarTitle({ | ||
| 59 | title: formData.value.name | ||
| 60 | }); | ||
| 61 | }) | ||
| 62 | onShow(() => { | ||
| 63 | formData.value = JSON.parse(app.globalData.venue.miniappCustConfig) | ||
| 64 | formData.value.picArr = formData.value.pics.split(',') | ||
| 65 | }); | ||
| 66 | |||
| 67 | function goIndex() { | ||
| 68 | uni.redirectTo({ | ||
| 69 | url: `/pages/index/index` | ||
| 70 | }) | ||
| 71 | } | ||
| 72 | function submit(){ | ||
| 73 | // 姓名 | ||
| 74 | if((formData.value.fields.indexOf('0')>-1) && baseFormData.value.name==undefined){ | ||
| 75 | uni.showToast({ | ||
| 76 | title: '请输入姓名', | ||
| 77 | icon: 'none', | ||
| 78 | duration: 2000 | ||
| 79 | }); | ||
| 80 | return | ||
| 81 | } | ||
| 82 | // 手机号 | ||
| 83 | if(formData.value.fields.indexOf('1')>-1&&baseFormData.value.telno==undefined){ | ||
| 84 | uni.showToast({ | ||
| 85 | title: '请输入手机号', | ||
| 86 | icon: 'none', | ||
| 87 | duration: 2000 | ||
| 88 | }); | ||
| 89 | return | ||
| 90 | } | ||
| 91 | // 需求描述 | ||
| 92 | if(formData.value.fields.indexOf('2')>-1&&baseFormData.value.requirement==undefined){ | ||
| 93 | uni.showToast({ | ||
| 94 | title: '请输入需求描述', | ||
| 95 | icon: 'none', | ||
| 96 | duration: 2000 | ||
| 97 | }); | ||
| 98 | return | ||
| 99 | } | ||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | api.miniappData(baseFormData.value).then((res)=>{ | ||
| 104 | baseFormData.value = [] | ||
| 105 | alertPayOk.value.open() | ||
| 106 | }) | ||
| 107 | |||
| 108 | } | ||
| 109 | function clickImg() { | ||
| 110 | uni.previewImage({ | ||
| 111 | urls: formData.value.picArr, | ||
| 112 | // current: 0, | ||
| 113 | success: function(res) { | ||
| 114 | console.log('success', res) | ||
| 115 | }, | ||
| 116 | fail: function(res) { | ||
| 117 | console.log('fail', res) | ||
| 118 | }, | ||
| 119 | complete: function(res) { | ||
| 120 | console.log('complete', res) | ||
| 121 | } | ||
| 122 | }) | ||
| 123 | } | ||
| 124 | </script> | 17 | </script> |
| 125 | 18 | ||
| 126 | <style scoped> | 19 | <style scoped> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="graybg"> | 2 | <view> |
| 3 | <view class="pads"> | 3 | |
| 4 | <view class="box"> | ||
| 5 | <view class="billItem" @click="showDetail(b)" v-for="b in billsList" :key="b.id"> | ||
| 6 | <!-- parentType --> | ||
| 7 | <view> | ||
| 8 | 订单编号: | ||
| 9 | <text>{{ b.orderCode }}</text> | ||
| 10 | </view> | ||
| 11 | <view v-if="b.verificationCode"> | ||
| 12 | 验证码: | ||
| 13 | <text>【{{ b.verificationCode }}】</text> | ||
| 14 | </view> | ||
| 15 | <view v-if="b.siteName"> | ||
| 16 | 预订项目: | ||
| 17 | <text>{{b.projectName||b.sonList[0].projectName}} {{ b.siteName }}</text> | ||
| 18 | </view> | ||
| 19 | <view v-if="b.orderDate"> | ||
| 20 | 预订时间: | ||
| 21 | <text>{{ b.orderDate }} {{ b.orderTimePeriod.replace(/,/,'-') }}</text> | ||
| 22 | </view> | ||
| 23 | <view class="billFoot"> | ||
| 24 | <view class="status" v-if="b.payStatus == 1">{{ b.payStatusStr }}</view> | ||
| 25 | <view class="status warning" v-else>{{ b.payStatusStr }}</view> | ||
| 26 | <view class="price"> | ||
| 27 | <text class="tip" v-if="b.payStatus == 0 && b.parentType == 2">*子订单不支持独立支付</text> | ||
| 28 | <!--payStatus 0 未支付 1 已支付 2 部分退款 3 已退款--> | ||
| 29 | <!--orderType 预定类型 0 普通预定 1 长租预定 2 预留 3 锁场 --> | ||
| 30 | |||
| 31 | <text v-if="b.payStatus==0">原价¥{{b.orderAmount}}</text> | ||
| 32 | <text v-if="b.payStatus>0">¥{{b.finalOrderAmount}}</text> | ||
| 33 | <text class="danger" v-if="b.payStatus==2||b.payStatus==3"> | ||
| 34 | (已退款¥{{b.refundAmount}})</text> | ||
| 35 | |||
| 36 | |||
| 37 | <button class="billbtn" v-if="b.payStatusStr == '未支付' && b.parentType != 2" @click.stop="goBooking(b)">去支付</button> | ||
| 38 | </view> | ||
| 39 | </view> | ||
| 40 | </view> | ||
| 41 | |||
| 42 | <view v-show="isLoadMore" @click="clickLoadMore"> | ||
| 43 | <uni-load-more :status="loadStatus" :content-text="contentText"></uni-load-more> | ||
| 44 | </view> | ||
| 45 | <view class="nodata" v-if="billsList.length==0"> | ||
| 46 | <image mode="aspectFit" src="/static/nodata.png"></image> | ||
| 47 | </view> | ||
| 48 | </view> | ||
| 49 | </view> | ||
| 50 | </view> | 4 | </view> |
| 51 | </template> | 5 | </template> |
| 52 | 6 | ||
| 53 | <script setup> | ||
| 54 | import { ref } from 'vue'; | ||
| 55 | import { onShow,onPullDownRefresh,onReachBottom} from '@dcloudio/uni-app'; | ||
| 56 | import * as api from '@/common/api.js'; | ||
| 57 | import _ from 'lodash'; | ||
| 58 | const billsList = ref([]); | ||
| 59 | const alertDialog = ref(null); | ||
| 60 | const isLoadMore = ref(false); | ||
| 61 | const loadStatus = ref('loading'); | ||
| 62 | const contentText = ref({ | ||
| 63 | contentdown: '点击查看更多', | ||
| 64 | contentrefresh: '正在加载...', | ||
| 65 | contentnomore: '没有更多数据了' | ||
| 66 | }) | ||
| 67 | const queryparam = ref({ | ||
| 68 | pageNum:1, | ||
| 69 | pageSize: 10 | ||
| 70 | }) | ||
| 71 | onShow(() => { | ||
| 72 | billsList.value = [] | ||
| 73 | getBills() | ||
| 74 | }); | ||
| 75 | function clickLoadMore() { | ||
| 76 | if(loadStatus.value=='nomore'){ | ||
| 77 | return | ||
| 78 | } | ||
| 79 | queryparam.value.pageNum+=1 | ||
| 80 | getBills() | ||
| 81 | |||
| 82 | } | ||
| 83 | function getBills() { | ||
| 84 | isLoadMore.value = false | ||
| 85 | api.getMalist(queryparam.value).then(res => { | ||
| 86 | _.each(res.rows,(r)=>{ | ||
| 87 | billsList.value.push(r) | ||
| 88 | }) | ||
| 89 | // billsList.value = res.rows; | ||
| 90 | if(res.total < (queryparam.value.pageSize*queryparam.value.pageNum)){ | ||
| 91 | isLoadMore.value = true | ||
| 92 | loadStatus.value='nomore' | ||
| 93 | } else { | ||
| 94 | isLoadMore.value = true | ||
| 95 | loadStatus.value='more' | ||
| 96 | } | ||
| 97 | }); | ||
| 98 | } | ||
| 99 | function goBooking(b) { | ||
| 100 | let path = `/pages/index/booking?id=${b.id}`; | ||
| 101 | uni.navigateTo({ | ||
| 102 | url: path | ||
| 103 | }); | ||
| 104 | } | ||
| 105 | function showDetail(b) { | ||
| 106 | let path = `/pages/usercenter/billsDetail?id=${b.id}`; | ||
| 107 | uni.navigateTo({ | ||
| 108 | url: path | ||
| 109 | }); | ||
| 110 | } | ||
| 111 | function pay() { | ||
| 112 | alertDialog.value.open(); | ||
| 113 | } | ||
| 114 | function dialogConfirm() { | ||
| 115 | // 微信支付 | ||
| 116 | } | ||
| 117 | function dialogClose() { | ||
| 118 | alertDialog.value.close(); | ||
| 119 | } | ||
| 120 | </script> | ||
| 121 | 7 | ||
| 122 | <style lang="scss" scoped> | ||
| 123 | .pads{padding:0 25rpx 70rpx;} | ||
| 124 | .billItem { | ||
| 125 | width: auto; padding-bottom: 1px; | ||
| 126 | .uni-input { | ||
| 127 | padding: 15rpx 0; | ||
| 128 | color: #000; | ||
| 129 | } | ||
| 130 | .billFoot{ margin-bottom: 20rpx;} | ||
| 131 | } | ||
| 132 | .rrcard .box { | ||
| 133 | padding: 0 0 1px; | ||
| 134 | margin: 20rpx 0 0; | ||
| 135 | } | ||
| 136 | .graybg { | ||
| 137 | background: #f7f8fa; | ||
| 138 | height: 100vh; | ||
| 139 | width: 100vw; | ||
| 140 | overflow: auto; | ||
| 141 | } | ||
| 142 | .whitebg { | ||
| 143 | background: #fff; | ||
| 144 | margin-top: 15rpx; | ||
| 145 | border-radius: 20rpx; | ||
| 146 | margin-bottom: 180rpx; | ||
| 147 | } | ||
| 148 | .payBtn { | ||
| 149 | width: 750rpx; | ||
| 150 | line-height: 90rpx; | ||
| 151 | height: 120rpx; | ||
| 152 | text-align: center; | ||
| 153 | background: #ff8124; | ||
| 154 | color: #ffffff; | ||
| 155 | font-size: 36rpx; | ||
| 156 | border-radius: 20rpx 20rpx 0px 0px; | ||
| 157 | position: fixed; | ||
| 158 | bottom: 0; | ||
| 159 | } | ||
| 160 | .uni-list-cell::after { | ||
| 161 | display: none; | ||
| 162 | } | ||
| 163 | .littleimgBox { | ||
| 164 | display: flex; | ||
| 165 | align-items: center; | ||
| 166 | } | ||
| 167 | .littleimg { | ||
| 168 | width: 50rpx; | ||
| 169 | height: 50rpx; | ||
| 170 | margin-right: 15rpx; | ||
| 171 | } | ||
| 172 | .padh20 { | ||
| 173 | padding: 0 25rpx; | ||
| 174 | } | ||
| 175 | .billFoot .tip { | ||
| 176 | font-size: 24rpx; | ||
| 177 | font-size: 24rpx; | ||
| 178 | color: #999; | ||
| 179 | font-weight: 500; | ||
| 180 | margin: 0 20rpx; | ||
| 181 | } | ||
| 182 | .billFoot text{white-space: nowrap;} | ||
| 183 | .billFoot text.danger{color: #da2a2a;} | ||
| 184 | </style> | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <view class="fixedbody"> | ||
| 3 | <uni-group mode="card" title="我的参赛队" top="20"> | ||
| 4 | <view class="wBox"> | ||
| 5 | <button class="poKxBtn" type="primary" plain="true" @click="newGroup">+新建参赛队</button> | ||
| 6 | <view class="matchItem" v-for="(g,index) in dataList" :key="index"> | ||
| 7 | <view class="leftImg"> | ||
| 8 | <image :src="g.imgUrl" mode="aspectFill"></image> | ||
| 9 | </view> | ||
| 10 | <view class="rightWen"> | ||
| 11 | <view class="name">{{g.name}}</view> | ||
| 12 | <view class="pp">地区: | ||
| 13 | {{g.regionStr}} | ||
| 14 | </view> | ||
| 15 | <view class="pp">类型:{{g.typeStr}}</view> | ||
| 16 | </view> | ||
| 17 | <view class="bottomFunc"> | ||
| 18 | <view class="textButtom" @click="view(g)">查看</view> | ||
| 19 | <text class="greenline">|</text> | ||
| 20 | <view class="textButtom" @click="del(g)">删除</view> | ||
| 21 | </view> | ||
| 22 | </view> | ||
| 23 | <view class="nodata" v-if="dataList.length==0"> | ||
| 24 | <image mode="aspectFit" src="/static/nodata.png"></image> | ||
| 25 | <text>还没有参赛队,点击新建参赛队立即创建吧~</text> | ||
| 26 | </view> | ||
| 27 | </view> | ||
| 28 | </uni-group> | ||
| 29 | 2 | ||
| 30 | |||
| 31 | </view> | ||
| 32 | </template> | 3 | </template> |
| 33 | 4 | ||
| 34 | <script setup> | ||
| 35 | import { ref } from 'vue'; | ||
| 36 | import * as match from '@/common/match.js' | ||
| 37 | import { onShow } from '@dcloudio/uni-app' | ||
| 38 | const baseFormData = ref({}); | ||
| 39 | const dataList = ref([]); | ||
| 40 | const memberList = ref([{id:1},{id:2}]); | ||
| 41 | const avatarUrl = ref(''); | ||
| 42 | const kindList = ref(['全部','运动员','教练','领队','其他']); | ||
| 43 | const tagList = ref([{text: '运动员',value: 0},{text: '教练',value: 1},{text: '领队',value: 2},{text: '其他',value: 3},]); | ||
| 44 | const typeList = ref([{text: '学校',value: 0}, {text: '场馆',value: 1}, {text: '俱乐部',value: 2}, {text: '机构',value: 3}]); | ||
| 45 | const regionsList = ref([]); | ||
| 46 | const current = ref(0); | ||
| 47 | const editIng = ref(false); | ||
| 48 | const showEditForm = ref(false); | ||
| 49 | const query = ref({ | ||
| 50 | type: 0 | ||
| 51 | }) | ||
| 52 | |||
| 53 | onShow(()=>{ | ||
| 54 | getRegionsList() | ||
| 55 | getList() | ||
| 56 | }) | ||
| 57 | |||
| 58 | function getList(){ | ||
| 59 | match.getMyGroupList(query).then(res => { | ||
| 60 | dataList.value = res.data | ||
| 61 | }) | ||
| 62 | } | ||
| 63 | function newGroup() { | ||
| 64 | uni.navigateTo({ | ||
| 65 | url: `/pages/usercenter/teamInfo` | ||
| 66 | }); | ||
| 67 | } | ||
| 68 | function getRegionsList(){ | ||
| 69 | match.regionsList().then(res => { | ||
| 70 | regionsList.value = res.data | ||
| 71 | }) | ||
| 72 | } | ||
| 73 | function onchange(){ | ||
| 74 | |||
| 75 | } | ||
| 76 | function onnodeclick(){ | ||
| 77 | |||
| 78 | } | ||
| 79 | function onClickItem(e){ | ||
| 80 | console.log(current.value) | ||
| 81 | if (current.value != e.currentIndex) { | ||
| 82 | current.value = e.currentIndex; | ||
| 83 | } | ||
| 84 | } | ||
| 85 | function goNext() { | ||
| 86 | baseFormData.value.src = avatarUrl.value | ||
| 87 | |||
| 88 | } | ||
| 89 | function onChooseavatar(e) { | ||
| 90 | if(editIng.value){ | ||
| 91 | match.uploadFile(e).then(data => { | ||
| 92 | avatarUrl.value = data.data | ||
| 93 | }) | ||
| 94 | } else { | ||
| 95 | return | ||
| 96 | } | ||
| 97 | |||
| 98 | } | ||
| 99 | function editTeamInfo(){ | ||
| 100 | editIng.value = true | ||
| 101 | } | ||
| 102 | function goChooseCoach(n){ | ||
| 103 | uni.navigateTo({ | ||
| 104 | url: `/pages_match/match/choose_coach?id=${n||0}` | ||
| 105 | }); | ||
| 106 | } | ||
| 107 | function goEditCoach(n){ | ||
| 108 | uni.navigateTo({ | ||
| 109 | url: `/pages_match/match/add_coach?id=${n||0}` | ||
| 110 | }); | ||
| 111 | } | ||
| 112 | function view(g){ | ||
| 113 | uni.navigateTo({ | ||
| 114 | url: `/pages/usercenter/teamInfo?groupId=${g.id}` | ||
| 115 | }); | ||
| 116 | } | ||
| 117 | function del(g){ | ||
| 118 | // 删除团 | ||
| 119 | uni.showModal({ | ||
| 120 | title: '提示', | ||
| 121 | content: '确定删除吗', | ||
| 122 | success: function (res) { | ||
| 123 | if (res.confirm) { | ||
| 124 | match.deleteMyGroup(g.id).then(res=>{ | ||
| 125 | uni.showToast({ | ||
| 126 | icon:'none', | ||
| 127 | title: res.msg | ||
| 128 | }) | ||
| 129 | getList() | ||
| 130 | }) | ||
| 131 | } else if (res.cancel) { | ||
| 132 | console.log('用户点击取消'); | ||
| 133 | } | ||
| 134 | } | ||
| 135 | }); | ||
| 136 | } | ||
| 137 | function saveMyteam() { | ||
| 138 | match.saveMyGroup(baseFormData.value).then(res=>{ | ||
| 139 | uni.showToast({ | ||
| 140 | title: '保存成功', | ||
| 141 | duration: 2000 | ||
| 142 | }); | ||
| 143 | editIng.value = false | ||
| 144 | }) | ||
| 145 | } | ||
| 146 | </script> | ||
| 147 | |||
| 148 | <style scope lang="scss"> | 5 | <style scope lang="scss"> |
| 149 | .wBox {position: relative;background: #ffffff;border-radius: 15px;box-sizing: border-box;} | 6 | .wBox {position: relative;background: #ffffff;border-radius: 15px;box-sizing: border-box;} |
| 150 | .avatarUrl{width: 200rpx;height:200rpx;} | 7 | .avatarUrl{width: 200rpx;height:200rpx;} | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment