32172fb1 by 杨炀

no message

1 parent 5bd03939
......@@ -4,7 +4,7 @@
// staging
// const baseUrl_api = "http://22yidpjzjifv.ngrok.xiaomiqiu123.top/stage-api/";
const baseUrl_api = "http://192.168.1.11:8787";
const baseUrl_api = "http://182.92.233.247/stage-api/";
export default {
baseUrl_api
......
......@@ -38,7 +38,8 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx5d51e8ed31bbdbb7",//J系统
"appid" : "wx5d51e8ed31bbdbb7", //J系统
// "appid" : "wx70f16625f10de4fe",//新跆联
// "appid" : "wx5e2471ed6210c3a6",
"setting" : {
......@@ -48,7 +49,9 @@
},
"usingComponents" : true,
"permission" : {},
"optimization":{"subPackages":true}
"optimization" : {
"subPackages" : true
}
},
"mp-alipay" : {
"usingComponents" : true
......
<template>
<view class="graybg">
<view v-if="formData.type=='0'">
<view v-html="formData.content" class="richContent"></view>
</view>
<view v-if="formData.type=='1'" class="formBox">
<view @click="clickImg">
<image style="width: 100%;height: 50vw;" mode="aspectFit" v-for="p in formData.picArr" :src="p"/>
</view>
<view v-if="formData.content2" v-html="formData.content2" class="richContent2"></view>
<uni-forms ref="baseForm" :modelValue="baseFormData">
<uni-forms-item label="姓名" required v-if="formData.fields.indexOf('0')>-1">
<uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="手机号" required v-if="formData.fields.indexOf('1')>-1">
<uni-easyinput v-model="baseFormData.telno" placeholder="请输入手机号" />
</uni-forms-item>
<uni-forms-item label="需求描述" required v-if="formData.fields.indexOf('2')>-1">
<uni-easyinput type="textarea" v-model="baseFormData.requirement" placeholder="请输入需求描述" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="submit">提交</button>
</view>
</view>
<uni-popup ref="alertPayOk" type="dialog">
<uni-popup-dialog type="success" confirmText="返回主页" content="提交成功" @confirm="goIndex">
</uni-popup-dialog>
</uni-popup>
</template>
<script setup>
......@@ -42,85 +13,7 @@
import * as api from '@/common/api.js';
const { proxy } = getCurrentInstance()
const app = getApp();
const telNo = ref('');
const alertPayOk = ref(null);
const isActive = ref(null);
const formData = ref({})
const baseFormData = ref({})
const rules= ref({
name: {rules: [{required: true,errorMessage: '请输入姓名'}]},
telno: {rules: [{required: true,errorMessage: '请输入手机号'}]},
requirement: {rules: [{required: true,errorMessage: '请输入需求描述'}]},
})
onReady(()=>{
// 修改页头标题
uni.setNavigationBarTitle({
title: formData.value.name
});
})
onShow(() => {
formData.value = JSON.parse(app.globalData.venue.miniappCustConfig)
formData.value.picArr = formData.value.pics.split(',')
});
function goIndex() {
uni.redirectTo({
url: `/pages/index/index`
})
}
function submit(){
// 姓名
if((formData.value.fields.indexOf('0')>-1) && baseFormData.value.name==undefined){
uni.showToast({
title: '请输入姓名',
icon: 'none',
duration: 2000
});
return
}
// 手机号
if(formData.value.fields.indexOf('1')>-1&&baseFormData.value.telno==undefined){
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 2000
});
return
}
// 需求描述
if(formData.value.fields.indexOf('2')>-1&&baseFormData.value.requirement==undefined){
uni.showToast({
title: '请输入需求描述',
icon: 'none',
duration: 2000
});
return
}
api.miniappData(baseFormData.value).then((res)=>{
baseFormData.value = []
alertPayOk.value.open()
})
}
function clickImg() {
uni.previewImage({
urls: formData.value.picArr,
// current: 0,
success: function(res) {
console.log('success', res)
},
fail: function(res) {
console.log('fail', res)
},
complete: function(res) {
console.log('complete', res)
}
})
}
</script>
<style scoped>
......
<template>
<view class="graybg">
<view class="pads">
<view class="box">
<view class="billItem" @click="showDetail(b)" v-for="b in billsList" :key="b.id">
<!-- parentType -->
<view>
订单编号:
<text>{{ b.orderCode }}</text>
</view>
<view v-if="b.verificationCode">
验证码:
<text>{{ b.verificationCode }}</text>
</view>
<view v-if="b.siteName">
预订项目:
<text>{{b.projectName||b.sonList[0].projectName}} {{ b.siteName }}</text>
</view>
<view v-if="b.orderDate">
预订时间:
<text>{{ b.orderDate }} {{ b.orderTimePeriod.replace(/,/,'-') }}</text>
</view>
<view class="billFoot">
<view class="status" v-if="b.payStatus == 1">{{ b.payStatusStr }}</view>
<view class="status warning" v-else>{{ b.payStatusStr }}</view>
<view class="price">
<text class="tip" v-if="b.payStatus == 0 && b.parentType == 2">*子订单不支持独立支付</text>
<!--payStatus 0 未支付 1 已支付 2 部分退款 3 已退款-->
<!--orderType 预定类型 0 普通预定 1 长租预定 2 预留 3 锁场 -->
<text v-if="b.payStatus==0">原价¥{{b.orderAmount}}</text>
<text v-if="b.payStatus>0">{{b.finalOrderAmount}}</text>
<text class="danger" v-if="b.payStatus==2||b.payStatus==3">
(已退款¥{{b.refundAmount}})</text>
<button class="billbtn" v-if="b.payStatusStr == '未支付' && b.parentType != 2" @click.stop="goBooking(b)">去支付</button>
</view>
</view>
</view>
<view v-show="isLoadMore" @click="clickLoadMore">
<uni-load-more :status="loadStatus" :content-text="contentText"></uni-load-more>
</view>
<view class="nodata" v-if="billsList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import { onShow,onPullDownRefresh,onReachBottom} from '@dcloudio/uni-app';
import * as api from '@/common/api.js';
import _ from 'lodash';
const billsList = ref([]);
const alertDialog = ref(null);
const isLoadMore = ref(false);
const loadStatus = ref('loading');
const contentText = ref({
contentdown: '点击查看更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
})
const queryparam = ref({
pageNum:1,
pageSize: 10
})
onShow(() => {
billsList.value = []
getBills()
});
function clickLoadMore() {
if(loadStatus.value=='nomore'){
return
}
queryparam.value.pageNum+=1
getBills()
}
function getBills() {
isLoadMore.value = false
api.getMalist(queryparam.value).then(res => {
_.each(res.rows,(r)=>{
billsList.value.push(r)
})
// billsList.value = res.rows;
if(res.total < (queryparam.value.pageSize*queryparam.value.pageNum)){
isLoadMore.value = true
loadStatus.value='nomore'
} else {
isLoadMore.value = true
loadStatus.value='more'
}
});
}
function goBooking(b) {
let path = `/pages/index/booking?id=${b.id}`;
uni.navigateTo({
url: path
});
}
function showDetail(b) {
let path = `/pages/usercenter/billsDetail?id=${b.id}`;
uni.navigateTo({
url: path
});
}
function pay() {
alertDialog.value.open();
}
function dialogConfirm() {
// 微信支付
}
function dialogClose() {
alertDialog.value.close();
}
</script>
<style lang="scss" scoped>
.pads{padding:0 25rpx 70rpx;}
.billItem {
width: auto; padding-bottom: 1px;
.uni-input {
padding: 15rpx 0;
color: #000;
}
.billFoot{ margin-bottom: 20rpx;}
}
.rrcard .box {
padding: 0 0 1px;
margin: 20rpx 0 0;
}
.graybg {
background: #f7f8fa;
height: 100vh;
width: 100vw;
overflow: auto;
}
.whitebg {
background: #fff;
margin-top: 15rpx;
border-radius: 20rpx;
margin-bottom: 180rpx;
}
.payBtn {
width: 750rpx;
line-height: 90rpx;
height: 120rpx;
text-align: center;
background: #ff8124;
color: #ffffff;
font-size: 36rpx;
border-radius: 20rpx 20rpx 0px 0px;
position: fixed;
bottom: 0;
}
.uni-list-cell::after {
display: none;
}
.littleimgBox {
display: flex;
align-items: center;
}
.littleimg {
width: 50rpx;
height: 50rpx;
margin-right: 15rpx;
}
.padh20 {
padding: 0 25rpx;
}
.billFoot .tip {
font-size: 24rpx;
font-size: 24rpx;
color: #999;
font-weight: 500;
margin: 0 20rpx;
}
.billFoot text{white-space: nowrap;}
.billFoot text.danger{color: #da2a2a;}
</style>
......
<template>
<view class="fixedbody">
<uni-group mode="card" title="我的参赛队" top="20">
<view class="wBox">
<button class="poKxBtn" type="primary" plain="true" @click="newGroup">+新建参赛队</button>
<view class="matchItem" v-for="(g,index) in dataList" :key="index">
<view class="leftImg">
<image :src="g.imgUrl" mode="aspectFill"></image>
</view>
<view class="rightWen">
<view class="name">{{g.name}}</view>
<view class="pp">地区:
{{g.regionStr}}
</view>
<view class="pp">类型:{{g.typeStr}}</view>
</view>
<view class="bottomFunc">
<view class="textButtom" @click="view(g)">查看</view>
<text class="greenline">|</text>
<view class="textButtom" @click="del(g)">删除</view>
</view>
</view>
<view class="nodata" v-if="dataList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text>还没有参赛队,点击新建参赛队立即创建吧~</text>
</view>
</view>
</uni-group>
</view>
</template>
<script setup>
import { ref } from 'vue';
import * as match from '@/common/match.js'
import { onShow } from '@dcloudio/uni-app'
const baseFormData = ref({});
const dataList = ref([]);
const memberList = ref([{id:1},{id:2}]);
const avatarUrl = ref('');
const kindList = ref(['全部','运动员','教练','领队','其他']);
const tagList = ref([{text: '运动员',value: 0},{text: '教练',value: 1},{text: '领队',value: 2},{text: '其他',value: 3},]);
const typeList = ref([{text: '学校',value: 0}, {text: '场馆',value: 1}, {text: '俱乐部',value: 2}, {text: '机构',value: 3}]);
const regionsList = ref([]);
const current = ref(0);
const editIng = ref(false);
const showEditForm = ref(false);
const query = ref({
type: 0
})
onShow(()=>{
getRegionsList()
getList()
})
function getList(){
match.getMyGroupList(query).then(res => {
dataList.value = res.data
})
}
function newGroup() {
uni.navigateTo({
url: `/pages/usercenter/teamInfo`
});
}
function getRegionsList(){
match.regionsList().then(res => {
regionsList.value = res.data
})
}
function onchange(){
}
function onnodeclick(){
}
function onClickItem(e){
console.log(current.value)
if (current.value != e.currentIndex) {
current.value = e.currentIndex;
}
}
function goNext() {
baseFormData.value.src = avatarUrl.value
}
function onChooseavatar(e) {
if(editIng.value){
match.uploadFile(e).then(data => {
avatarUrl.value = data.data
})
} else {
return
}
}
function editTeamInfo(){
editIng.value = true
}
function goChooseCoach(n){
uni.navigateTo({
url: `/pages_match/match/choose_coach?id=${n||0}`
});
}
function goEditCoach(n){
uni.navigateTo({
url: `/pages_match/match/add_coach?id=${n||0}`
});
}
function view(g){
uni.navigateTo({
url: `/pages/usercenter/teamInfo?groupId=${g.id}`
});
}
function del(g){
// 删除团
uni.showModal({
title: '提示',
content: '确定删除吗',
success: function (res) {
if (res.confirm) {
match.deleteMyGroup(g.id).then(res=>{
uni.showToast({
icon:'none',
title: res.msg
})
getList()
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
function saveMyteam() {
match.saveMyGroup(baseFormData.value).then(res=>{
uni.showToast({
title: '保存成功',
duration: 2000
});
editIng.value = false
})
}
</script>
<style scope lang="scss">
.wBox {position: relative;background: #ffffff;border-radius: 15px;box-sizing: border-box;}
.avatarUrl{width: 200rpx;height:200rpx;}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!