This commit is contained in:
lnn19986213 2024-01-25 16:01:24 +08:00
parent 60f404fd49
commit 3a7a5d30f1
5 changed files with 61 additions and 20 deletions

View File

@ -34,7 +34,13 @@
</view> </view>
</view> </view>
<view class="" v-if="item.sendWay == '2'"> <view class="" v-if="item.sendWay == '2'">
<u--textarea v-model="value1" placeholder="请留下您的收货邮箱或其他联系方式"></u--textarea> <u--textarea v-model="item.remark" placeholder="请留下您的收货邮箱或其他联系方式"></u--textarea>
</view>
<view class="" v-if="item.sendWay == '3'">
<view>
默认地址
</view>
<view>4564864afdvsdag645sdf</view>
</view> </view>
</view> </view>
</view> </view>
@ -56,9 +62,10 @@
return { return {
load: true, load: true,
data:[], data:[],
total: '', total: 0,
point: '', point: '',
value1: '' value1: '',
addressList: [],
}; };
}, },
onLoad(option) { onLoad(option) {
@ -66,11 +73,24 @@
console.log(this.data) console.log(this.data)
}, },
onShow() { onShow() {
this.total ='' this.total = 0
this.getTotal() this.getTotal()
this.getUserInfo() this.getUserInfo()
this.getAddress()
}, },
methods:{ methods:{
getAddress() {
this.http.request('/address/list', {}, "GET").then(res => {
if (res.code == 200) {
this.addressList = res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
getUserInfo(){ getUserInfo(){
let _this = this let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => { this.http.request('/user/userInfo', {}, "GET").then(res => {
@ -88,6 +108,7 @@
getTotal(){ getTotal(){
let _this = this let _this = this
this.data.forEach(function(item){ this.data.forEach(function(item){
let num = item.count * item.money let num = item.count * item.money
_this.total += num _this.total += num
}) })
@ -102,7 +123,10 @@
this.data.forEach(function(item){ this.data.forEach(function(item){
data.push({ data.push({
goodsId: item.goodsId, goodsId: item.goodsId,
count: item.count count: item.count,
addressId: item.addressId,
remark: item.remark,
shopCarId: item.shopCarId,
}) })
}) })
this.http.request('/order/newOrder', data, "POST").then(res => { this.http.request('/order/newOrder', data, "POST").then(res => {

View File

@ -30,12 +30,14 @@
<view class="date m16" @click="DatePicker" <view class="date m16" @click="DatePicker"
v-if="Edkey=='出生年月'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'"> v-if="Edkey=='出生年月'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'">
<u--input class='p32 gray' readonly v-model="Edvalue" > <u--input class='p32 gray' readonly v-model="Edvalue" >
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input> </u--input>
</view> </view>
<!-- 政治面貌 民族 籍贯 选择 input--> <!-- 政治面貌 民族 籍贯 选择 input-->
<view class="select m16" @click="zhengzhiShow=true" <view class="select m16" @click="zhengzhiShow=true"
v-if="Edkey=='政治面貌'||Edkey=='会员级别'||Edkey=='所属协会'||Edkey=='学历'"> v-if="Edkey=='政治面貌'||Edkey=='会员级别'||Edkey=='所属协会'||Edkey=='学历'">
<u--input class="p32 gray" readonly v-model="Edvalue" > <u--input class="p32 gray" readonly v-model="Edvalue" >
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input> </u--input>
</view> </view>
<!-- 政治面貌 民族 籍贯 选择 input ed--> <!-- 政治面貌 民族 籍贯 选择 input ed-->
@ -241,7 +243,7 @@
} }
// //
if (this.Edkey == '所属协会') { if (this.Edkey == '所属协会') {
this.http.request('/association/list', {}, "GET").then((res) => { this.http.request('/association/list', {isShow:true}, "GET").then((res) => {
res.data.map((v, i) => { res.data.map((v, i) => {
return this.xiehuiObj[v.name] = v.id return this.xiehuiObj[v.name] = v.id
@ -672,7 +674,7 @@
<style lang="scss"> <style lang="scss">
page { page {
background-color: #f5f5f5; background-color: #fff;
} }
// //

View File

@ -483,7 +483,7 @@
onReady() { onReady() {
this.$refs.form1.setRules(this.rules); this.$refs.form1.setRules(this.rules);
this.http.request('/association/list', {}, "GET").then((res) => { this.http.request('/association/list', {isShow:true}, "GET").then((res) => {
res.data.map((v, i) => { res.data.map((v, i) => {
return this.xiehuiObj[v.name] = v.id return this.xiehuiObj[v.name] = v.id
}) })

View File

@ -232,6 +232,9 @@
userImg: '', userImg: '',
id: '', id: '',
sendWay: '', sendWay: '',
shopCarId: '',
remark: '',
shopCarId: '',
}], }],
buyType: '', buyType: '',
} }

View File

@ -123,6 +123,7 @@
this.allMoney = 0 this.allMoney = 0
this.allPoint = 0 this.allPoint = 0
this.pages = 1 this.pages = 1
this.orderDet = []
this.getData() this.getData()
this.getUserInfo() this.getUserInfo()
}, },
@ -276,7 +277,15 @@
_this.orderDet.push({ _this.orderDet.push({
count: item.count, count: item.count,
goodsId: item.goodsId, goodsId: item.goodsId,
shopCarId: item.id shopCarId: item.id,
goodsName: item.goods.domainInfo.name,
img: item.goods.domainInfo.file,
userName: item.goods.shopInfo.userName,
sendWay: item.goods.sendWay,
userImg: item.goods.shopInfo.images,
mType: '1',
money: item.goods.pointPrice,
count: item.count
}) })
} }
}) })
@ -291,18 +300,21 @@
url:'/pagesB/ConfirmOrder/purchaseDetail?success=1&id=0&num=0' url:'/pagesB/ConfirmOrder/purchaseDetail?success=1&id=0&num=0'
}) })
}else{ }else{
this.http.request('/order/newOrder', this.orderDet, "POST").then(res => { uni.navigateTo({
if (res.code == 200) { url: '/pagesB/ConfirmOrder/fictitiousOrder?data=' + JSON.stringify(this.orderDet)
uni.navigateTo({
url:'/pagesB/ConfirmOrder/purchaseDetail?success=0&id=0&num=0'
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
}) })
// this.http.request('/order/newOrder', this.orderDet, "POST").then(res => {
// if (res.code == 200) {
// uni.navigateTo({
// url:'/pagesB/ConfirmOrder/purchaseDetail?success=0&id=0&num=0'
// })
// }
// }).catch(e => {
// uni.showToast({
// title: e.data.message,
// icon: "none",
// });
// })
} }
} }
}, },