Compare commits

...

3 Commits

Author SHA1 Message Date
茶溢 e5aca777db 1 3 years ago
茶溢 06daed1b3f 1 3 years ago
茶溢 39d611185b 1 3 years ago
  1. 5297
      package-lock.json
  2. 7
      pages/account/message.vue
  3. 14
      pages/index/index.vue
  4. 40
      pages/order/confirmation.vue

5297
package-lock.json

File diff suppressed because it is too large

7
pages/account/message.vue

@ -246,11 +246,12 @@
} }
</script> </script>
<style>
<style lang="scss" scoped>
page { page {
background-color: #f7f4f8 !important;; background: rgb(246, 244, 247) !important;;
} }
</style>
<style lang="scss" scoped>
.font { .font {
display: flex; display: flex;
position: fixed; position: fixed;

14
pages/index/index.vue

@ -282,6 +282,7 @@
this.checkNetwork() this.checkNetwork()
this.getList() this.getList()
this.getMes() this.getMes()
this.Register()
this.sum = 0 this.sum = 0
}, },
computed: { computed: {
@ -1675,19 +1676,18 @@
<view class="container" v-if="bestlist.length>0"> <view class="container" v-if="bestlist.length>0">
<view class="left"> <view class="left">
<view v-for="(item,index) in leftList" :key="index"> <view v-for="(item,index) in leftList" :key="index">
<block v-if="item.goods_video"> <!-- <block v-if="item.goods_video">
<view style="position: relative; height: 225px;" > <view style="position: relative; height: 225px;" >
<video x-webkit-airplay="allow" x5-video-player-type="h5" :autoplay="true" :enable-progress-gesture="true" muted="" style="width: 100%;" <video x-webkit-airplay="allow" x5-video-player-type="h5" :autoplay="true" :enable-progress-gesture="true" muted="" style="width: 100%;"
:mobilenet-hint-type="1" class="video_play" :http-cache="true" loop :mobilenet-hint-type="1" class="video_play" :http-cache="true" loop
object-fit="contain" :direction="0" :src="item.goods_video" :show-mute-btn="true" object-fit="contain" :direction="0" :src="item.goods_video" :show-mute-btn="true"
@touchstart="touchStart" @touchend="touchEnd" @pause="VideoPuse()"> @touchstart="touchStart" @touchend="touchEnd" @pause="VideoPuse()">
</video> </video>
<!-- <video-context ref="videoContext" :src="item.goods_video" @play="onPlay" @pause="onPause" @timeupdate="onTimeUpdate"></video-context> -->
</view> </view>
<view class="play_icon" v-show="!video" @click="isVideo"></view> <view class="play_icon" v-show="!video" @click="isVideo"></view>
</block> </block> -->
<image v-else :src="item.block_pic" alt="" mode="widthFix" @click="imgTo(item)" <image :src="item.block_pic" alt="" mode="widthFix" @click="imgTo(item)"
:class="item.block_title==0&&!item.block_title2&&!item.block_name&&!item.block_title3?'img_border':''"> :class="item.block_title==0&&!item.block_title2&&!item.block_name&&!item.block_title3?'img_border':''">
</image> </image>
<view class="item" v-if="item.block_title!=0"> <view class="item" v-if="item.block_title!=0">
@ -1706,7 +1706,7 @@
</view> </view>
<view class="right"> <view class="right">
<view v-for="(item1,index1) in rightList" :key="index1"> <view v-for="(item1,index1) in rightList" :key="index1">
<block v-if="item1.goods_video"> <!-- <block v-if="item1.goods_video">
<view style="position: relative; height: 225px;"> <view style="position: relative; height: 225px;">
<video x-webkit-airplay="allow" x5-video-player-type="h5" :autoplay="true" :enable-progress-gesture="true" muted="" style="width: 100%;" <video x-webkit-airplay="allow" x5-video-player-type="h5" :autoplay="true" :enable-progress-gesture="true" muted="" style="width: 100%;"
:mobilenet-hint-type="1" class="video_play" :http-cache="true" @pause="VideoPuse()" loop :mobilenet-hint-type="1" class="video_play" :http-cache="true" @pause="VideoPuse()" loop
@ -1715,8 +1715,8 @@
</video> </video>
</view> </view>
<view class="play_icon" v-show="!video" @click="isVideo"></view> <view class="play_icon" v-show="!video" @click="isVideo"></view>
</block> </block> -->
<image v-else :src="item1.block_pic" alt="" mode="widthFix" @click="imgTo(item1)" <image :src="item1.block_pic" alt="" mode="widthFix" @click="imgTo(item1)"
:class="item1.block_title==0&&!item1.block_title2&&!item1.block_name&&!item1.block_title3?'img_border':''"> :class="item1.block_title==0&&!item1.block_title2&&!item1.block_name&&!item1.block_title3?'img_border':''">
</image> </image>
<view class="item" v-if="item1.block_title!=0"> <view class="item" v-if="item1.block_title!=0">

40
pages/order/confirmation.vue

@ -209,12 +209,18 @@
</view> </view>
<view> <view>
<!-- totalnum 商品价格 -->
<!-- 最低多少钱才能使用的优惠券 item.min_goods_amount -->
<view class="select_cop" <view class="select_cop"
v-show="current!=index &&item.use==true&& (parseFloat(item.min_goods_amount) < totalnum ||parseFloat(item.min_goods_amount) ==totalnum) && bonus != item.type_money "> v-show="current!=index &&item.use==true&& (parseFloat(item.min_goods_amount) < totalnum ||parseFloat(item.min_goods_amount) ==totalnum) && bonus != item.type_money ">
<image src="../../static/icon/flase.png" @click="current=index,useCoupons(index,item)"> <image src="../../static/icon/flase.png" @click="current=index,useCoupons(index,item)">
</image> </image>
</view> </view>
<view class="select_cop" v-show="current== index|| bonus == item.type_money"> <!-- 优惠价的价格 bonus -->
<!-- 优惠价的价格 item.type_money -->
<!-- 选中的 current -->
<!-- 序列 index -->
<view class="select_cop" v-show="current == index || bonus == item.type_money">
<image src="../../static/icon/true.png" <image src="../../static/icon/true.png"
@click="current=-1,bonus=0,total.bonus = 0,useCoupons(index,item)"></image> @click="current=-1,bonus=0,total.bonus = 0,useCoupons(index,item)"></image>
</view> </view>
@ -303,7 +309,7 @@
goods_list: [], goods_list: [],
shipping_list: [], shipping_list: [],
bonus_list: [], bonus_list: [],
bonus: 0, bonus: 0, //
total: {}, total: {},
order: { order: {
shipping_id: 11 shipping_id: 11
@ -319,7 +325,7 @@
use: true, use: true,
nouse: false, nouse: false,
bouns_id: '', bouns_id: '',
totalnum: 0, totalnum: 0, //
} }
}, },
@ -369,14 +375,11 @@
console.log(this.current + '=====================') console.log(this.current + '=====================')
// this.bouns_id = item.bonus_id // this.bouns_id = item.bonus_id
console.log(total) console.log(total)
console.log(item)
if (this.current == index) { if (this.current == index) {
this.bonus = item.type_money this.bonus = item.type_money
console.log(this.bonus)
console.log(item.type_money)
console.log(this.total.bonus)
this.total.bonus = item.type_money this.total.bonus = item.type_money
console.log(this.total.bonus)
let id = item.bonus_id let id = item.bonus_id
this.bouns_id = item.bonus_id this.bouns_id = item.bonus_id
let data = { let data = {
@ -594,7 +597,7 @@
this.total = res.data.total this.total = res.data.total
//console.log(this.total) //console.log(this.total)
this.totalnum = this.total.amount this.totalnum = this.total.amount
// console.log(typeof(this.totalnum)) console.log(typeof(this.totalnum))
uni.setStorageSync('total', (res.data.total)) uni.setStorageSync('total', (res.data.total))
this.order = res.data.order this.order = res.data.order
// console.log(res.data) // console.log(res.data)
@ -643,7 +646,7 @@
////////console.info(res) ////////console.info(res)
if (res.error == 0) { if (res.error == 0) {
this.list = res.data this.list = res.data
console.log(this.list + '===========sasass'); console.log(this.list);
////console.log(this.list[0].type_money) ////console.log(this.list[0].type_money)
// this.bonus = this.list[0].type_money // this.bonus = this.list[0].type_money
// console.log(this.total.amount) // console.log(this.total.amount)
@ -653,23 +656,30 @@
let hb_time = new Date(Date.parse(item.use_end_date)) let hb_time = new Date(Date.parse(item.use_end_date))
// console.log(new Date(Date.parse(item.use_end_date))) // console.log(new Date(Date.parse(item.use_end_date)))
item.use = hb_time > new Date(Date.parse(today)) item.use = hb_time > new Date(Date.parse(today))
// console.log(item.use);
// console.log('item-use');
// this.list = [] // this.list = []
console.log(item.use);
console.log(item);
console.log(111111111111111);
list.push(item) list.push(item)
this.list = list this.list = list
if (parseFloat(item.min_goods_amount) < this.totalnum) { if (parseFloat(item.min_goods_amount) < this.totalnum) {
list2.push(item) list2.push(item)
} }
// console.log(hb_time > new Date(Date.parse(today))) // c onsole.log(hb_time > new Date(Date.parse(today)))
}) })
if (list2.length > 0) { if (list2.length > 0) {
let max = 0 let max = 0;
for (let i = 0; i < list2.length; i++) { for (let i = 0; i < list2.length; i++) {
if (max < list2[i].type_money) { let num = parseInt(list2[i].type_money);
max = list2[i].type_money if (num > max) {
max = num;
} }
} }
this.bonus = max this.bonus = max.toFixed(2)
this.isusebonus = 1 this.isusebonus = 1
} else if (list2.length == 0) { } else if (list2.length == 0) {
this.isusebonus = 0 this.isusebonus = 0
@ -814,7 +824,7 @@
////console.log(e.orderId) ////console.log(e.orderId)
// this.getList(query2) // this.getList(query2)
// this.useCoupons()
}, },
onShow(e) { onShow(e) {
// this.query=JSON.parse(e.query) // this.query=JSON.parse(e.query)

Loading…
Cancel
Save