Merge branch 'master' of git.zdool.com:xs/yyx/h5

This commit is contained in:
姚宇浩 2024-01-25 16:06:59 +08:00
commit 64a26689e3
5 changed files with 61 additions and 20 deletions

View File

@ -34,7 +34,13 @@
</view>
</view>
<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>
@ -56,9 +62,10 @@
return {
load: true,
data:[],
total: '',
total: 0,
point: '',
value1: ''
value1: '',
addressList: [],
};
},
onLoad(option) {
@ -66,11 +73,24 @@
console.log(this.data)
},
onShow() {
this.total =''
this.total = 0
this.getTotal()
this.getUserInfo()
this.getAddress()
},
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(){
let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => {
@ -88,6 +108,7 @@
getTotal(){
let _this = this
this.data.forEach(function(item){
let num = item.count * item.money
_this.total += num
})
@ -102,7 +123,10 @@
this.data.forEach(function(item){
data.push({
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 => {

View File

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

View File

@ -483,7 +483,7 @@
onReady() {
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) => {
return this.xiehuiObj[v.name] = v.id
})

View File

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

View File

@ -123,6 +123,7 @@
this.allMoney = 0
this.allPoint = 0
this.pages = 1
this.orderDet = []
this.getData()
this.getUserInfo()
},
@ -276,7 +277,15 @@
_this.orderDet.push({
count: item.count,
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'
})
}else{
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",
});
uni.navigateTo({
url: '/pagesB/ConfirmOrder/fictitiousOrder?data=' + JSON.stringify(this.orderDet)
})
// 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",
// });
// })
}
}
},