diff --git a/App.vue b/App.vue index 9965722..06359fb 100644 --- a/App.vue +++ b/App.vue @@ -1,385 +1,424 @@ \ No newline at end of file diff --git a/components/shoppinglist/shoppinglist.vue b/components/shoppinglist/shoppinglist.vue index a15c8a6..5357014 100644 --- a/components/shoppinglist/shoppinglist.vue +++ b/components/shoppinglist/shoppinglist.vue @@ -38,7 +38,7 @@ :range="item.attrValue" :range-key="'sku'"> {{item.attrValue[index].sku}} - + 库存:{{item.attrValue[index].stock}} @@ -272,12 +272,11 @@ /*点击选中与否*/ goodsCheck(item) { this.$set(item, 'check', !item.check); - console.log( item.num) if (item.check) { - if (this.peicenumber > 0) { - item.num = this.peicenumber - } - + if (this.peicenumber == 0) { + item.num = 1 + } + if (!item.product_attr_unique) { item.product_attr_unique = item.attrValue[0].unique } @@ -405,17 +404,22 @@ position: relative; align-items: center; justify-content: space-between; - + border-top: 2rpx solid #E7E6E4; - + + .picTxt_one { + white-space: nowrap; + overflow: hidden; + } + .picTxt_one { display: flex; margin-top: 20rpx; - + .slecte { margin-right: 30rpx; - width: 280rpx; + width: 280rpx; height: 60rpx; line-height: 60rpx; text-align: center; @@ -427,7 +431,7 @@ border-radius: 10rpx 10rpx 10rpx 10rpx; white-space: nowrap; overflow: hidden; - + } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 99809c9..fe30cb6 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -217,22 +217,27 @@ }) }, getGoods: function(item) { - // console.log(item); + graphicLstApi(this.where).then(res => { this.cateGoods.push(...res.data.list) if (res.data.list.length < this.where.limit) this.status = 'nomore' if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true - if (item.index == 1) { - uni.navigateTo({ - // #ifdef MP || H5 - url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0] - .community_id - // #endif - // #ifdef APP - url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}` - // #endif - }) + + if(item){ + + if (item.index == 1 ) { + uni.navigateTo({ + // #ifdef MP || H5 + url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0] + .community_id + // #endif + // #ifdef APP + url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}` + // #endif + }) + } } + }) }, /*获取分类列表*/ diff --git a/pages/order_pay_status/index.vue b/pages/order_pay_status/index.vue index 52a7b35..0667e2b 100644 --- a/pages/order_pay_status/index.vue +++ b/pages/order_pay_status/index.vue @@ -2,7 +2,7 @@ - + {{order_pay_info.paid == 1 ?'支付成功':'订单未支付'}} @@ -14,20 +14,24 @@ 支付方式 - 微信 - 支付宝 + 微信 + 支付宝 + 余额 支付金额 {{order_pay_info.pay_price}} - + 赠送积分 {{order_pay_info.give_integral}}个 - + 失败原因 {{order_pay_info.pay_type==0 ? '余额不足':msg}} @@ -42,8 +46,10 @@ - - + + @@ -53,12 +59,16 @@ - {{item.coupon_price}} + + {{item.coupon_price}} + {{item.title}} 满{{item.use_min_price}}元可用 - 有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}} + + 有效期:{{ item.use_start_time |timeYMD }}-{{ item.use_end_time |timeYMD}} 领取后{{ item.coupon_time}}天内可用 @@ -88,22 +98,30 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- - import {getPayOrder} from '@/api/order.js'; - import {openOrderSubscribe} from '@/utils/SubscribeMessage.js'; - import {mapGetters} from "vuex"; + import { + getPayOrder + } from '@/api/order.js'; + import { + openOrderSubscribe + } from '@/utils/SubscribeMessage.js'; + import { + mapGetters + } from "vuex"; import authorize from '@/components/Authorize'; - import { HTTP_REQUEST_URL } from '@/config/app'; + import { + HTTP_REQUEST_URL + } from '@/config/app'; export default { components: { authorize, }, filters: { - timeYMD: function (value) { - if(value){ - var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(value) + timeYMD: function(value) { + if (value) { + var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(value) return newDate[0] } - } + } }, data() { return { @@ -115,15 +133,16 @@ isShowAuth: false, //是否隐藏授权 status: 0, msg: '', - couponList:[], //优惠券列表 - isOpen:false ,//展开 + couponList: [], //优惠券列表 + isOpen: false, //展开 moneyBg: '/static/images/couponBg', text: '展开更多', timer: null, - product_type:'', + product_type: '', + }; }, - computed: mapGetters(['isLogin','viewColor','keyColor']), + computed: mapGetters(['isLogin', 'viewColor', 'keyColor']), onLoad: function(options) { if (!options.order_id) return this.$util.Tips({ title: '缺少参数无法查看订单支付状态' @@ -135,23 +154,22 @@ this.order_type = options.order_type; this.status = options.status || 0; this.msg = options.msg || ''; - this.product_type=options.product_type + this.product_type = options.product_type if (this.isLogin) { this.refreshData(); } else { this.isAuto = true; this.isShowAuth = true - } - console.log(options); + } + console.log(options); }, methods: { - refreshData(){ - this.timer = setInterval(()=>{ - this.getOrderPayInfo(); - },1000) + refreshData() { + + this.getOrderPayInfo(); }, // 优惠券展开 - bindMore(){ + bindMore() { this.isOpen = !this.isOpen this.text = this.text == '展开更多' ? '收起' : '展开更多'; }, @@ -161,7 +179,7 @@ }, // 授权关闭 authColse: function(e) { - this.isShowAuth = e; + this.isShowAuth = e; }, /** * @@ -176,7 +194,7 @@ uni.setNavigationBarTitle({ title: res.data.paid == 1 ? '支付成功' : '支付失败' }); - if(res.data.paid == 1){ + if (res.data.paid == 1) { clearInterval(this.timer); this.timer = null; } @@ -203,11 +221,10 @@ * 去订单详情页面 */ goOrderDetails: function(e) { - console.log(this.product_type); let that = this; if (this.product_type == 98) { uni.navigateTo({ - url: `/pages/users/order_list/index?status=1&product_type=${this.product_type}` + url: `/pages/users/order_list/indexCopy?status=1&product_type=${this.product_type}` }) } else { uni.navigateTo({ @@ -235,6 +252,7 @@ border-radius: 10rpx; padding: 1rpx 0 28rpx 0; } + .payment-status .icon { font-size: 70rpx; width: 140rpx; @@ -246,19 +264,23 @@ border: 6rpx solid #f5f5f5; margin: -76rpx auto 0 auto; background-color: #999; - &.icon-duihao2{ + + &.icon-duihao2 { background-color: var(--view-theme); } } + .payment-status .icon.fail { text-shadow: 0px 4px 0px #7a7a7a; } + .payment-status .status { font-size: 32rpx; font-weight: bold; text-align: center; margin: 25rpx 0 37rpx 0; } + .payment-status .wrapper { border: 1px solid #eee; margin: 0 30rpx 47rpx 30rpx; @@ -266,16 +288,20 @@ border-left: 0; border-right: 0; } + .payment-status .wrapper .item { font-size: 28rpx; color: #282828; } + .payment-status .wrapper .item~.item { margin-top: 20rpx; } + .payment-status .wrapper .item .itemCom { color: #666; } + .payment-status .returnBnt { width: 630rpx; height: 86rpx; @@ -285,46 +311,56 @@ text-align: center; line-height: 86rpx; margin: 0 auto 20rpx auto; - &.gColor{ + + &.gColor { background-color: var(--view-theme); } - &.s-Color{ + + &.s-Color { color: var(--view-theme); - border: 1px solid var(--view-theme); + border: 1px solid var(--view-theme); } } + .t-color { - color: var(--view-theme)!important; + color: var(--view-theme) !important; } - .coupon-wrapper{ - .hd{ + + .coupon-wrapper { + .hd { display: flex; align-items: center; justify-content: center; margin: 30rpx 0; color: #999999; font-size: 24rpx; - .line{ + + .line { width: 70rpx; height: 1px; background: #DCDCDC; } - .txt{ + + .txt { margin: 0 20rpx; } } - .coupon-box{ + + .coupon-box { height: 356rpx; padding: 0 20rpx; overflow: hidden; - &.on{ + + &.on { height: auto; } - .coupon-item{ + + .coupon-item { width: 100%; margin-bottom: 20rpx; - box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.06); - .left-bg{ + box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.06); + + .left-bg { display: flex; align-items: center; justify-content: center; @@ -332,40 +368,46 @@ height: 160rpx; color: #fff; font-size: 64rpx; - text{ + + text { margin-top: 26rpx; font-size: 36rpx; } } - .info{ + + .info { display: flex; flex-direction: column; justify-content: space-between; margin-left: 20rpx; padding: 20rpx 0; - .title{ + + .title { color: #282828; font-size: 30rpx; } - .des{ + + .des { font-size: 24rpx; color: #999999; } } } } - .more{ + + .more { display: flex; align-items: center; justify-content: center; padding-top: 24rpx; font-size: 24rpx; color: #999999; - .iconfont{ + + .iconfont { margin-top: 6rpx; margin-left: 10rpx; font-size: 20rpx; } } } - + \ No newline at end of file diff --git a/pages/trading_hall/product_details/index.vue b/pages/trading_hall/product_details/index.vue index dc7811e..0d27caa 100644 --- a/pages/trading_hall/product_details/index.vue +++ b/pages/trading_hall/product_details/index.vue @@ -72,7 +72,7 @@ 类型 - + 调货 @@ -83,7 +83,7 @@ - + 查看TA提到的宝贝({{listobj.resale.length}}) diff --git a/pages/trading_hall/transfer_goods/index.vue b/pages/trading_hall/transfer_goods/index.vue index ba786bc..9b6a619 100644 --- a/pages/trading_hall/transfer_goods/index.vue +++ b/pages/trading_hall/transfer_goods/index.vue @@ -582,8 +582,9 @@ /*获取选中的宝贝*/ getProduct(data) { this.productList=[] - this.price = 0 + this.price = 0; if (data.length > 0) { + this.productList = data; for (let i in data) { console.log(Number(data[i].num) , Number(data[i].price),(Number(data[i].num) * Number(data[i].price))) diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index b4cf658..1636c32 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -1027,7 +1027,7 @@ use_integral: that.use_integral }).then(res => { // 默认选中 - console.log(res); + that.product_type=res.data.order_type that.is_take = false res.data.order.forEach(el => { if (el.order.isTake == 1) that.is_take = true diff --git a/plugin/voice/voice.js b/plugin/voice/voice.js deleted file mode 100644 index e0999fa..0000000 --- a/plugin/voice/voice.js +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Notes: APP语音播报 - * @author WJD - * @version 1.0.0 - * @Date 2022-01-26 - */ - -// 是否播放中 -let isPlaying = false; -// 播放列表 -let currentAudio = ['/static/audio/order.mp3']; -// 播放顺序 -let playIndex = 0 -// 播放器 -let audioPlayer = null; -// 平台 -let platform = 'iOS'; -// 定时器 -let timer = null; - - -const voice = { - // 创建播放器 - init: () => { - platform = plus.os.name; - if (platform == 'Android') { - let MediaPlayer = plus.android.importClass("android.media.MediaPlayer"); - audioPlayer = new MediaPlayer() - } - if (platform == "iOS") { - let AVAudioPlayer = plus.ios.importClass("AVAudioPlayer"); - audioPlayer = new AVAudioPlayer(); - } - console.log('创建播放器成功'); - voice.playAudio(); - }, - - // 重置播放列表 - resetPlayList: () => { - playIndex = 0; - currentAudio = ['/static/audio/order.mp3']; - }, - clearTimer: () => { - if (timer) { - clearInterval(timer); - timer = null; - } - - }, - // 播放音频 - playAudio: () => { - - if (isPlaying) { - console.log('播放中,请等待...') - return false; - } - if (audioPlayer == null) { - console.log('未启动音频播放器'); - return false; - } - - let audioList = currentAudio; - // voice.resetPlayList(); - // if (currentAudio.length == 0) { - // const keys = Object.keys(audioList) - // console.log(audioList) - // if (keys.length) { - // currentAudio = Object.values(audioList)[0] - // delete audioList[keys[0]] - // playIndex = 0 - // } else { - // voice.resetPlayList(); - // } - // } - console.log('正在播报:', currentAudio[playIndex]); - let path = plus.io.convertLocalFileSystemURL(currentAudio[playIndex]); - let currentTime = 0; // 当前流媒体的播放的位置,单位是秒 - let currentDuration = 0; // 当前文件时长 - if (platform == 'iOS') { - let NSData = plus.ios.importClass("NSData"); - let AVAudioPlayer = plus.ios.importClass("AVAudioPlayer"); - let pathFileData = NSData.dataWithContentsOfFile(path); - audioPlayer.initWithDataerror(pathFileData, null); - // audioPlayer.setNumberOfLoops(-1); //-1:无限循环 - audioPlayer.prepareToPlay(); //初始化播放器 - audioPlayer.play(); - isPlaying = audioPlayer.isPlaying(); - // 当前播放进度 currentTime 秒 - } else { - let MediaPlayer = plus.android.importClass("android.media.MediaPlayer"); - audioPlayer.setDataSource(path); //指定音频文件路径 - // audioPlayer.setLooping(true); //设置为循环播放 - audioPlayer.prepare(); //初始化播放器MediaPlayer - audioPlayer.start(); - isPlaying = audioPlayer.isPlaying(); - // 获取音乐的总时长 - console.log(isPlaying, audioPlayer.getDuration()); - // 当前播放进度 getCurrentPosition 毫秒 - } - - timer = setInterval(function() { - currentTime = platform == 'iOS' ? audioPlayer.currentTime() : audioPlayer - .getCurrentPosition() / 1000; - currentDuration = platform == 'iOS' ? audioPlayer.duration() : audioPlayer - .getDuration() / 1000; - // console.log(currentTime, currentDuration) - if (currentTime == currentDuration || currentTime == 0) { - isPlaying = false; - voice.clearTimer(); - if (playIndex < currentAudio.length - 1) { - playIndex++ - } else { - currentAudio = []; - playIndex = 0; - } - if (Object.keys(audioList).length == 0 && currentAudio.length == 0) { - voice.resetPlayList(); - } - // voice.playAudio(); - } - }, 200); - } -} - -export default voice \ No newline at end of file diff --git a/static/audio/order.mp3 b/static/audio/order.mp3 index 3bec7be..3cc3499 100644 Binary files a/static/audio/order.mp3 and b/static/audio/order.mp3 differ