合完了
This commit is contained in:
parent
f3ff1c63d8
commit
735851a9e5
|
@ -4,4 +4,4 @@ export const suiUrl = 'http://154.8.193.216:9092/api' //隋宇霏的接口地
|
||||||
export const domain = 'https://www.carboner.cn/api'
|
export const domain = 'https://www.carboner.cn/api'
|
||||||
export const myIp = 'http://8.130.119.119:9092/api'
|
export const myIp = 'http://8.130.119.119:9092/api'
|
||||||
|
|
||||||
export const baseUrl = testUrl
|
export const baseUrl = Url
|
||||||
|
|
26
pages.json
26
pages.json
|
@ -1,5 +1,14 @@
|
||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
|
{
|
||||||
|
"path" : "pages/home/home",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "首页",
|
||||||
|
"enablePullDownRefresh":true, //开启下拉刷新
|
||||||
|
"navigationBarBackgroundColor": "#ede8e7"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/workshop/searchResult/searchResult",
|
"path" : "pages/workshop/searchResult/searchResult",
|
||||||
"style" :
|
"style" :
|
||||||
|
@ -15,15 +24,6 @@
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path" : "pages/home/home",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "首页",
|
|
||||||
"enablePullDownRefresh":true, //开启下拉刷新
|
|
||||||
"navigationBarBackgroundColor": "#ede8e7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path" : "pages/order/service-paystatus/service-paystatus",
|
"path" : "pages/order/service-paystatus/service-paystatus",
|
||||||
"style" :
|
"style" :
|
||||||
|
@ -269,11 +269,11 @@
|
||||||
"logisticsPlugin" : {
|
"logisticsPlugin" : {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"provider": "wx9ad912bf20548d92"
|
"provider": "wx9ad912bf20548d92"
|
||||||
},
|
|
||||||
"routePlan": {
|
|
||||||
"version": "1.0.19",
|
|
||||||
"provider": "wx50b5593e81dd937a"
|
|
||||||
}
|
}
|
||||||
|
// "routePlan": {
|
||||||
|
// "version": "1.0.19",
|
||||||
|
// "provider": "wx50b5593e81dd937a"
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|
|
@ -69,12 +69,25 @@
|
||||||
const asideStyle = ref([])
|
const asideStyle = ref([])
|
||||||
const categoryId = ref(0)
|
const categoryId = ref(0)
|
||||||
const categoryName = ref('')
|
const categoryName = ref('')
|
||||||
|
const ids = ref([])
|
||||||
|
const point = ref(0)
|
||||||
|
|
||||||
onMounted( async () => {
|
onMounted( async () => {
|
||||||
await getAllCategory()
|
await getAllCategory()
|
||||||
await getPhotoProductsByCategoryId(categoryName.value)
|
await getPhotoProductsByCategoryId(categoryName.value)
|
||||||
|
getSpecialIds()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const getSpecialIds = async () => {
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/photoProducts/special/get',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
cookie
|
||||||
|
}
|
||||||
|
})
|
||||||
|
ids.value = res.data.data
|
||||||
|
}
|
||||||
|
|
||||||
const isSelected = (item:any, index:any) => {
|
const isSelected = (item:any, index:any) => {
|
||||||
categoryId.value = item.id
|
categoryId.value = item.id
|
||||||
|
@ -132,9 +145,23 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const jumpNextToDetail = (type:any) => {
|
const jumpNextToDetail = async (type:any) => {
|
||||||
|
await getSpecialIds()
|
||||||
|
if (type === '摄影') {
|
||||||
|
point.value = ids.value[0]
|
||||||
|
} else {
|
||||||
|
point.value = ids.value[1]
|
||||||
|
}
|
||||||
|
if (point.value === 0) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '当前写真产品未上架',
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../photoProductDetail/photoProductDetail?id=' + 76 + "&type=" + type
|
url: '../photoProductDetail/photoProductDetail?id=' + point.value + "&type=" + type
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ import {nextTick, onMounted , ref } from 'vue'
|
||||||
import emitter from '../../../utils/emitter'
|
import emitter from '../../../utils/emitter'
|
||||||
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
const items = ref([null, null,null,null,null,null, null,null,null,null])
|
|
||||||
const addressList = ref([])
|
const addressList = ref([])
|
||||||
const userInfo = wx.getStorageSync('userInfo')
|
const userInfo = wx.getStorageSync('userInfo')
|
||||||
//页面跳转回来之后,刷新一次地址列表 onShow就是在页面显示后执行
|
//页面跳转回来之后,刷新一次地址列表 onShow就是在页面显示后执行
|
||||||
|
@ -73,7 +72,7 @@ const radioChange = ( event ) => {
|
||||||
const temp = addressList.value[index] //通过emitter传入暂时的地址信息
|
const temp = addressList.value[index] //通过emitter传入暂时的地址信息
|
||||||
// console.log('temp',temp);
|
// console.log('temp',temp);
|
||||||
emitter.emit('addressInfo', temp)
|
emitter.emit('addressInfo', temp)
|
||||||
emitter.emit('close')
|
emitter.emit('closeAddress')
|
||||||
}
|
}
|
||||||
//跳转到新建地址页面
|
//跳转到新建地址页面
|
||||||
const toNewAddress =()=>{
|
const toNewAddress =()=>{
|
||||||
|
@ -118,7 +117,7 @@ const deleteAddress = async( id ) =>{
|
||||||
}
|
}
|
||||||
//关闭按钮
|
//关闭按钮
|
||||||
const closeWindow =()=> {
|
const closeWindow =()=> {
|
||||||
emitter.emit('close')
|
emitter.emit('closeAddress')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -128,7 +127,6 @@ const closeWindow =()=> {
|
||||||
margin-left: 20.57rpx;
|
margin-left: 20.57rpx;
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
padding-bottom: 29.93rpx;
|
|
||||||
background-color: #f5f5dc;
|
background-color: #f5f5dc;
|
||||||
border-radius: 28.05rpx 28.05rpx 0rpx 0rpx;
|
border-radius: 28.05rpx 28.05rpx 0rpx 0rpx;
|
||||||
background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FQfLHXSAU-feiyigongfangbeijin.png');
|
background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FQfLHXSAU-feiyigongfangbeijin.png');
|
||||||
|
@ -138,6 +136,12 @@ const closeWindow =()=> {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.section_2 {
|
.section_2 {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -168,6 +172,12 @@ const closeWindow =()=> {
|
||||||
}
|
}
|
||||||
.list {
|
.list {
|
||||||
margin: 100.96rpx 14.96rpx 0 16.83rpx;
|
margin: 100.96rpx 14.96rpx 0 16.83rpx;
|
||||||
|
height: 580rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
.list-item {
|
.list-item {
|
||||||
padding: 26.18rpx 16.01rpx 30.41rpx 16.03rpx;
|
padding: 26.18rpx 16.01rpx 30.41rpx 16.03rpx;
|
||||||
|
@ -210,11 +220,12 @@ const closeWindow =()=> {
|
||||||
width: 572.32rpx;
|
width: 572.32rpx;
|
||||||
}
|
}
|
||||||
.text-wrapper {
|
.text-wrapper {
|
||||||
margin-top: 80.72rpx;
|
|
||||||
padding: 26.75rpx 0 29.61rpx;
|
padding: 26.75rpx 0 29.61rpx;
|
||||||
background-color: #ffb6b9;
|
background-color: #ffb6b9;
|
||||||
border-radius: 74.81rpx;
|
border-radius: 74.81rpx;
|
||||||
width: 637.78rpx;
|
width: 637.78rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 40rpx;
|
||||||
}
|
}
|
||||||
.text_3 {
|
.text_3 {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
<couponPopupVue></couponPopupVue>
|
<couponPopupVue></couponPopupVue>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
<!-- 遮罩层 -->
|
<!-- 遮罩层 -->
|
||||||
<view v-if="isShow" class="overlay"></view>
|
<view v-if="isShow" class="overlay"></view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -178,7 +178,9 @@ const sumprice = ref(0) //总价格
|
||||||
//11.4开发 不应该删掉的
|
//11.4开发 不应该删掉的
|
||||||
const popup = ref(null) //弹窗对象
|
const popup = ref(null) //弹窗对象
|
||||||
const addressRealInfo = ref({
|
const addressRealInfo = ref({
|
||||||
detailAddress: '请选择/添加地址'
|
phone: '',
|
||||||
|
region: '请选择',
|
||||||
|
detailAddress: '地址'
|
||||||
}) //地址页 选择地址传过来的值 进入页面首先是默认地址,若无默认地址,则为空
|
}) //地址页 选择地址传过来的值 进入页面首先是默认地址,若无默认地址,则为空
|
||||||
const productArr = ref([]) //商品对象
|
const productArr = ref([]) //商品对象
|
||||||
const labelList = ref([]) //老套路,商品标签
|
const labelList = ref([]) //老套路,商品标签
|
||||||
|
@ -440,6 +442,14 @@ const getFonts =()=>{
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
const wxPayFd = () => { //微信支付按钮防抖
|
const wxPayFd = () => { //微信支付按钮防抖
|
||||||
|
console.log(addressRealInfo.value)
|
||||||
|
if (addressRealInfo.value.name === null || addressRealInfo.value.name === '' || addressRealInfo.value.name === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择地址',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
clearTimeout(wxPayTimer)
|
clearTimeout(wxPayTimer)
|
||||||
showLoading()
|
showLoading()
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<text class="font text_22 pos_4">
|
<text class="font text_22 pos_4">
|
||||||
{{ orderObject.note }}
|
{{ orderObject.note }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-center group_15">
|
<view class="flex-row justify-between items-center group_15">
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
<text class="text_18">{{ sfAmount.toFixed(2) }}</text>
|
<text class="text_18">{{ sfAmount.toFixed(2) }}</text>
|
||||||
<!-- <text class="text_20">00</text> -->
|
<!-- <text class="text_20">00</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col justify-start items-center text-wrapper_3" @click="wxPayFd()"
|
<view class="flex-col justify-start items-center text-wrapper_3" @click="wxPayFd"
|
||||||
:style="{ pointerEvents: isLoading ? 'none' : 'auto' }"><text class="font_8 text_19">微信支付</text></view>
|
:style="{ pointerEvents: isLoading ? 'none' : 'auto' }"><text class="font_8 text_19">微信支付</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -425,6 +425,13 @@
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
const wxPayFd = () => { //微信支付按钮防抖
|
const wxPayFd = () => { //微信支付按钮防抖
|
||||||
|
if (contactRealInfo.value.phone === null || contactRealInfo.value.phone === '' || contactRealInfo.value.phone === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择联系人',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
clearTimeout(wxPayTimer)
|
clearTimeout(wxPayTimer)
|
||||||
showLoading()
|
showLoading()
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
|
|
|
@ -182,7 +182,9 @@ const sumprice = ref(0) //总价格
|
||||||
//11.4开发 不应该删掉的
|
//11.4开发 不应该删掉的
|
||||||
const popup = ref(null) //弹窗对象
|
const popup = ref(null) //弹窗对象
|
||||||
const addressRealInfo = ref({
|
const addressRealInfo = ref({
|
||||||
detailAddress: '请选择/添加地址'
|
phone: '',
|
||||||
|
region: '请选择',
|
||||||
|
detailAddress: '地址'
|
||||||
}) //地址页 选择地址传过来的值 进入页面首先是默认地址,若无默认地址,则为空
|
}) //地址页 选择地址传过来的值 进入页面首先是默认地址,若无默认地址,则为空
|
||||||
const productObject = ref({}) //商品对象
|
const productObject = ref({}) //商品对象
|
||||||
const labelList = ref([]) //老套路,商品标签
|
const labelList = ref([]) //老套路,商品标签
|
||||||
|
@ -234,6 +236,10 @@ const textColor = ref('')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
emitter.on('addressInfo', (val:any) => {
|
||||||
|
addressRealInfo.value = val
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
emitter.on('cancelCoupon', () => {
|
emitter.on('cancelCoupon', () => {
|
||||||
templateString.value = myCouponList.value.length + '张优惠券可用'
|
templateString.value = myCouponList.value.length + '张优惠券可用'
|
||||||
|
@ -321,6 +327,13 @@ const textColor = ref('')
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxPayFd = () => {
|
const wxPayFd = () => {
|
||||||
|
if (addressRealInfo.value.name === null || addressRealInfo.value.name === '' || addressRealInfo.value.name === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择地址',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
clearTimeout(wxPayTimer)
|
clearTimeout(wxPayTimer)
|
||||||
showLoading()
|
showLoading()
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
|
@ -405,6 +418,7 @@ const getDefaultAddress = async () =>{
|
||||||
addressRealInfo.value = res.data.data[key]
|
addressRealInfo.value = res.data.data[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('==================>', addressRealInfo.value)
|
||||||
}
|
}
|
||||||
const createOrder = async () => { //创建单个商品订单的方法
|
const createOrder = async () => { //创建单个商品订单的方法
|
||||||
console.log('地址信息-->',addressRealInfo.value);
|
console.log('地址信息-->',addressRealInfo.value);
|
||||||
|
@ -546,7 +560,7 @@ const textAssign = (e) => { //文本输入框赋值方法
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-content {
|
.popup-content {
|
||||||
height: 300px;
|
height: 400px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
// background-color: #fff;
|
// background-color: #fff;
|
||||||
|
|
|
@ -220,8 +220,8 @@
|
||||||
singleService.value = JSON.parse(options.obj)
|
singleService.value = JSON.parse(options.obj)
|
||||||
cnt.value = JSON.parse(options.cnt)
|
cnt.value = JSON.parse(options.cnt)
|
||||||
restNumber.value = JSON.parse(options.rest)
|
restNumber.value = JSON.parse(options.rest)
|
||||||
bookDate.value = singleService.value.appointmentDateVOList[0].specificDate
|
bookDate.value = options.appointmentDate
|
||||||
timeSlot.value = singleService.value.appointmentDateVOList[0].timePeriodVOList[0].timeSlot
|
timeSlot.value = options.timeSlot
|
||||||
sumprice.value = cnt.value * singleService.value.price
|
sumprice.value = cnt.value * singleService.value.price
|
||||||
sfAmount.value = cnt.value * singleService.value.price
|
sfAmount.value = cnt.value * singleService.value.price
|
||||||
console.log('单个服务类--->',singleService.value);
|
console.log('单个服务类--->',singleService.value);
|
||||||
|
@ -405,6 +405,13 @@
|
||||||
|
|
||||||
|
|
||||||
const wxPayFd = () => { //微信支付按钮防抖
|
const wxPayFd = () => { //微信支付按钮防抖
|
||||||
|
if (contactRealInfo.value.phone === null || contactRealInfo.value.phone === '' || contactRealInfo.value.phone === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择联系人',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
clearTimeout(wxPayTimer)
|
clearTimeout(wxPayTimer)
|
||||||
showLoading()
|
showLoading()
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
|
|
|
@ -293,7 +293,9 @@
|
||||||
console.log('数量--->',cnt.value);
|
console.log('数量--->',cnt.value);
|
||||||
uni.navigateTo({ //跳转到待支付页面
|
uni.navigateTo({ //跳转到待支付页面
|
||||||
//商品信息+数量
|
//商品信息+数量
|
||||||
url: '/pages/order/singleServiceWait/singleServiceWait?obj=' + JSON.stringify(productObject.value) + '&cnt=' + JSON.stringify(cnt.value) + '&rest=' + JSON.stringify(restNumber.value)
|
url: '/pages/order/singleServiceWait/singleServiceWait?obj='
|
||||||
|
+ JSON.stringify(productObject.value) + '&cnt=' + JSON.stringify(cnt.value) + '&rest=' + JSON.stringify(restNumber.value)
|
||||||
|
+ '&appointmentDate=' + appointmentDate + '&timeSlot=' + timeSlot
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user