Commit 61742545 authored by qipeng's avatar qipeng

下单接口

parent 924a9d2a
......@@ -161,7 +161,7 @@ export default {
this.openid = uni.getStorageSync('openid') //获取openid
this.faceIds = JSON.parse(option.faceIds)
this.location = JSON.parse(uni.getStorageSync('location'))
this.merchantId = 'z0015605022691a5945bbe463141668c'//uni.getStorageSync('merchantId')
this.merchantId = uni.getStorageSync('merchantId')// 'z0015605022691a5945bbe463141668c'
this.obtainProvince()//获取省市区
this.inquireMerchant()//查询所有商户
this.getPhotos()//照片列表
......@@ -357,7 +357,40 @@ export default {
}
},
upLoad(){//下单
var data = {
orderMoney:this.sellingPrices,//订单总价
orderProductVo:{},//下单信息
}
var orderProductVo = {
buyNum:this.priceNum,//购买数量
orderImgList:[],//订单图片
orderType:1,//订单类型(0其他,1景区,2酒店,3餐饮,4特产,5运营车,10组合订单)
postage:0,//邮费
couponList:[],//产品券信息 游客使用券信息后传
unitPrice:this.sellingPrice,//产品单价
}
this.previewData.forEach((item,index)=>{
if(item.checkType==true){
var imgList = {
imgUrl:item.faceSourceUrl||item.faceAiUrl
}
orderProductVo.orderImgList.push(imgList)
}
})
data.orderProductVo = orderProductVo
this.$request('orderc/photo/photoCreateOrder',data).then((res)=>{
if(res.code=='00'){
this.$refs.uToast.show({
title: '下单成功',
type: 'success',
})
}else{
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
},
}
}
......
......@@ -52,12 +52,13 @@ export default {
openid:'',
orderShow: false, //头部城市选择
option: [],//城市
cityName: '重庆',
areaId:'100500000',//城市ID
cityName: '全部',
areaId:'',//城市ID
merchantId:'',//商户ID
location: {},//位置信息
projectCheck: 0, //当前选择的产品
merchantList:[],//头部列表
merchantList:[],//商户列表
merchantName:'全部',//商户名称
projectMoreType: false, //是否显示更多产品
checkProjectAll: false, //所有产品全选
maskDetail: false,
......@@ -91,8 +92,7 @@ export default {
},
onLoad(option) {
this.openid = uni.getStorageSync('openid') //获取openid
this.location = JSON.parse(uni.getStorageSync('location'))
this.merchantId = 'z0015605022691a5945bbe463141668c'//uni.getStorageSync('merchantId')
//this.merchantId = 'z0015605022691a5945bbe463141668c'//uni.getStorageSync('merchantId')
this.obtainProvince()//获取省市区
this.inquireMerchant()//查询所有商户
this.getPhotos()//照片列表
......@@ -118,8 +118,6 @@ export default {
id:this.merchantId,//商户ID
province:this.areaId,//省市ID
areaCode:this.areaId,//省市ID
userlatitude:this.location.latitude,//纬度
userlongitude:this.location.longitude,//经度
merchantType:1,//
}
this.$request('scenic/newMerchant/findAllMerchant',data).then((res)=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment