|
@@ -44,7 +44,7 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- <!-- 底部弹框 -->
|
|
|
+ <!-- 底部第一层弹框 -->
|
|
|
<view>
|
|
|
<up-popup :show="show" @close="close" @open="open">
|
|
|
|
|
@@ -63,7 +63,6 @@
|
|
|
<up-avatar :src="src"></up-avatar>
|
|
|
<text style="margin-top: 15rpx;">¥{{listData.businessPrice}}</text>
|
|
|
</view>
|
|
|
- <!-- -->
|
|
|
<view class="Wrap-info">
|
|
|
<text style="margin-left: 10rpx;">服务类别:</text>
|
|
|
<up-text type="info" text="家庭教育"></up-text>
|
|
@@ -90,10 +89,27 @@
|
|
|
<up-button type="error" shape="circle" :customStyle="wrapqx" @click="handleBuy">
|
|
|
购买¥{{ computeMoney }}
|
|
|
</up-button>
|
|
|
-
|
|
|
</view>
|
|
|
</up-popup>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 第二个弹框-->
|
|
|
+ <up-popup v-model:show="showSecond">
|
|
|
+ <view @click="jumpToAddressSelect">
|
|
|
+ <up-cell-group>
|
|
|
+ <up-cell icon="setting-fill" title="请选择服务地址"></up-cell>
|
|
|
+
|
|
|
+ </up-cell-group>
|
|
|
+ </view>
|
|
|
+ <view class="Wrap-detils-btn">
|
|
|
+ <up-button type="primary" shape="circle" @click="closeSecond">取消</up-button>
|
|
|
+ <up-button type="error" shape="circle" @click="handleSecond">立即预约¥{{ computeMoney }}</up-button>
|
|
|
+ </view>
|
|
|
+ </up-popup>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<up-popup v-model:show="showSum">
|
|
|
<view class="Wrap-Payment">
|
|
|
<!-- 支付金额 -->
|
|
@@ -110,7 +126,7 @@
|
|
|
<image src="/static/my/钱包.png" class="payment-icon"></image>
|
|
|
<text class="option-text">钱包</text>
|
|
|
</view>
|
|
|
- <up-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
|
|
|
+ <up-radio-group v-model="radiovalue1" placement="column">
|
|
|
<up-radio :customStyle="{marginLeft: 'auto'}" v-for="(item, index) in radiolist1" :key="index"
|
|
|
:label="item.name" :name="item.name"></up-radio>
|
|
|
</up-radio-group>
|
|
@@ -147,13 +163,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</up-popup>
|
|
|
- <up-notify message="支付成功" :show="showNotify"></up-notify>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- // 点击当前时间,后面时间禁用
|
|
|
- // workDate获取点击的精确时间
|
|
|
import {
|
|
|
onLoad
|
|
|
} from '@dcloudio/uni-app'
|
|
@@ -162,7 +176,7 @@
|
|
|
ref,
|
|
|
nextTick,
|
|
|
reactive,
|
|
|
- computed
|
|
|
+ computed,
|
|
|
} from "vue";
|
|
|
import {
|
|
|
getDetailsvolunteerId,
|
|
@@ -174,7 +188,6 @@
|
|
|
import itsCalendar from '@/components/its-calendar/its-calendar.vue';
|
|
|
import uniDatetimePickerMy from "@/uni_modules/lic-uni-datetime-picker/components/lic-uni-datetime-picker/lic-uni-datetime-picker.vue"
|
|
|
|
|
|
-
|
|
|
const src = ref('http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg')
|
|
|
const businessPrice = ref() //价格
|
|
|
const volunteerId = ref(''); // 存储志愿者ID
|
|
@@ -191,53 +204,77 @@
|
|
|
const endDisabled = ref('')
|
|
|
const time = ref('')
|
|
|
const listData = ref({})
|
|
|
- const show = ref(false); //立即购买
|
|
|
+ const show = ref(false); //第一层弹框
|
|
|
+ const showSecond = ref(false) //第二层弹框
|
|
|
+ const showThird = ref(false) //第二层弹框
|
|
|
const showSum = ref(false);
|
|
|
const showNotify = ref(false) //支付成功提示
|
|
|
const remark = ref('') //备注
|
|
|
+ const radiovalue1 = ref('苹果');
|
|
|
+ // Radio 单选框数据
|
|
|
+ const radiolist1 = reactive([{
|
|
|
+ name: '',
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
|
|
|
- const computeMoney = computed(() => {
|
|
|
- return totalTimes.value * businessPrice.value
|
|
|
- })
|
|
|
-
|
|
|
- const certificationPictures = computed(() => {
|
|
|
- if (listData.value.certificationPicture) {
|
|
|
- return listData.value.certificationPicture.split(',')
|
|
|
- }
|
|
|
- return []
|
|
|
- })
|
|
|
+ ]);
|
|
|
+
|
|
|
+ // 详情底部立即购买弹框
|
|
|
+ const buttonClick = (e) => {
|
|
|
+ show.value = true; // 打开弹框
|
|
|
+ };
|
|
|
|
|
|
- // 定义方法
|
|
|
+ // 第一层弹框
|
|
|
function open() {
|
|
|
- // 打开逻辑,比如设置 show 为 true
|
|
|
show.value = true;
|
|
|
}
|
|
|
-
|
|
|
+ // 第一层弹框取消
|
|
|
function close() {
|
|
|
// 关闭逻辑,设置 show 为 false
|
|
|
show.value = false;
|
|
|
}
|
|
|
+ // 第一个弹框逻辑
|
|
|
+ const handleBuy = () => {
|
|
|
+ show.value = false; // 关闭第一个弹框
|
|
|
+ showSecond.value = true; // 打开第二个弹框
|
|
|
+ };
|
|
|
+
|
|
|
+ // 第二层弹框
|
|
|
+ function openSecond() {
|
|
|
+ showSecond.value = true;
|
|
|
+ }
|
|
|
+ // 第二层弹框取消
|
|
|
+ function closeSecond() {
|
|
|
+ // 关闭逻辑,设置 show 为 false
|
|
|
+ showSecond.value = false;
|
|
|
+ show.value = true; // 打开第一个弹框
|
|
|
+ }
|
|
|
|
|
|
- // 定义方法
|
|
|
+ // 第三层弹框
|
|
|
function openSum() {
|
|
|
// 打开逻辑,比如设置 show 为 true
|
|
|
showSum.value = true;
|
|
|
}
|
|
|
|
|
|
function closeSum() {
|
|
|
- // 关闭逻辑,设置 show 为 false
|
|
|
showSum.value = false;
|
|
|
}
|
|
|
- const handleBuy = () => {
|
|
|
- show.value = false; // 关闭第一个弹框
|
|
|
- showSum.value = true; // 打开第二个弹框
|
|
|
- };
|
|
|
+
|
|
|
+
|
|
|
const handlCancel = () => {
|
|
|
show.value = false; // 关闭第一个弹框
|
|
|
selectedTimes.value = []; // 清空已选时间
|
|
|
- totalTimes.value = 0; // 重置点击次数
|
|
|
+ totalTimes.value = 0; // 重置点击次数
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ const jumpToAddressSelect = () =>{
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages_mine/pages/selectAddress/index'
|
|
|
+ })
|
|
|
}
|
|
|
- // 底部数据
|
|
|
+
|
|
|
+ // 详情底部底部数据
|
|
|
const options = ref([{
|
|
|
icon: 'headphones',
|
|
|
text: '客服'
|
|
@@ -248,48 +285,19 @@
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
-
|
|
|
+ // 详情底部立即购买样式
|
|
|
const buttonGroup = ref([{
|
|
|
text: '立即购买',
|
|
|
backgroundColor: 'red',
|
|
|
color: '#fff'
|
|
|
}]);
|
|
|
-
|
|
|
- // 方法
|
|
|
+ // 底部帮助客服方法
|
|
|
const onClick = (e) => {
|
|
|
uni.showToast({
|
|
|
title: `点击${e.content.text}`,
|
|
|
icon: 'none'
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
- const buttonClick = (e) => {
|
|
|
- // console.log(e);
|
|
|
- // options.value[2].info++;
|
|
|
- show.value = true; // 打开弹框
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
- // Radio 单选框数据
|
|
|
- const radiolist1 = reactive([{
|
|
|
- name: '',
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
-
|
|
|
- ]);
|
|
|
-
|
|
|
- // up-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
|
|
|
- const radiovalue1 = ref('苹果');
|
|
|
-
|
|
|
- const groupChange = (n) => {
|
|
|
- console.log('groupChange', n);
|
|
|
- };
|
|
|
-
|
|
|
- const radioChange = (n) => {
|
|
|
- console.log('radioChange', n);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
// 修改详情页底部样式
|
|
|
const customStyle = {
|
|
|
height: '70rpx',
|
|
@@ -323,7 +331,6 @@
|
|
|
businessPrice.value = listData.value.businessPrice || 0;
|
|
|
});
|
|
|
|
|
|
-
|
|
|
// 选择日期
|
|
|
const getListTime = async () => {
|
|
|
const params = {
|
|
@@ -347,7 +354,6 @@
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-
|
|
|
// 获取志愿者排班时间
|
|
|
const getByDate = async (date = doorToDoorTimeArr.value[0]) => {
|
|
|
// 检查日期是否为空
|
|
@@ -408,12 +414,23 @@
|
|
|
|
|
|
// 立即购买显示时执行
|
|
|
const upPopupOpen = () => { //显示时初始化预存储信息数据
|
|
|
- selectedTimes.value = [];
|
|
|
- totalTimes.value = 0;
|
|
|
- currentTime.value = '';
|
|
|
- currentDate.value = [];
|
|
|
+ selectedTimes.value = [];
|
|
|
+ totalTimes.value = 0;
|
|
|
+ currentTime.value = '';
|
|
|
+ currentDate.value = [];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ const computeMoney = computed(() => {
|
|
|
+ return totalTimes.value * businessPrice.value
|
|
|
+ })
|
|
|
+
|
|
|
+ const certificationPictures = computed(() => {
|
|
|
+ if (listData.value.certificationPicture) {
|
|
|
+ return listData.value.certificationPicture.split(',')
|
|
|
+ }
|
|
|
+ return []
|
|
|
+ })
|
|
|
// 确认购买
|
|
|
const handlConfiRmpurchase = async () => {
|
|
|
// 定义要发送的数据
|
|
@@ -473,7 +490,6 @@
|
|
|
|
|
|
onMounted(async () => {
|
|
|
await getListTime()
|
|
|
- // getByDate()
|
|
|
})
|
|
|
</script>
|
|
|
|