发货+兼容苹果
This commit is contained in:
19
App.vue
19
App.vue
@@ -17,8 +17,13 @@
|
|||||||
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
||||||
// #endif
|
// #endif
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
platform:null, // 系统
|
||||||
|
}
|
||||||
|
},
|
||||||
onLaunch: function(e) {
|
onLaunch: function(e) {
|
||||||
// 检测自动更新
|
// 检测自动更新
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -138,12 +143,11 @@
|
|||||||
socket.init();
|
socket.init();
|
||||||
}
|
}
|
||||||
// APPUpdate();
|
// APPUpdate();
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function(e) {
|
onShow: function(e) {
|
||||||
|
|
||||||
// console.log(store.state,'playVisible')
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
//获取二维码携带的参数
|
//获取二维码携带的参数
|
||||||
let scene = decodeURIComponent(e.query.scene);
|
let scene = decodeURIComponent(e.query.scene);
|
||||||
@@ -196,8 +200,7 @@
|
|||||||
})
|
})
|
||||||
console.log('页面销毁')
|
console.log('页面销毁')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ const courtConfig = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
//手机号验证正则表达式
|
//手机号验证正则表达式
|
||||||
const phoneRegular = /^1\d{10}$/;
|
// const phoneRegular = /^1\d{10}$/;
|
||||||
|
// 手机号码验证 支持港澳台 大陆
|
||||||
|
const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$/;
|
||||||
//邮箱验证正则表达式
|
//邮箱验证正则表达式
|
||||||
const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
|
const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
|
||||||
//密码验证正则表达式
|
//密码验证正则表达式
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
"src" : "图片路径"
|
"src" : "图片路径"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versionName" : "1.2.9",
|
"versionName" : "1.2.10",
|
||||||
"versionCode" : 129,
|
"versionCode" : 1210,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
"ignoreVersion" : true
|
"ignoreVersion" : true
|
||||||
|
|||||||
@@ -4,14 +4,16 @@
|
|||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<z-nav-bar title="物流详情"></z-nav-bar>
|
<z-nav-bar title="物流详情"></z-nav-bar>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="" style="margin-bottom: 20rpx; font-size: 28rpx;">
|
||||||
|
<view class="kuaidiItem">运单号: {{expressOrderSn}}
|
||||||
|
<u-tag @click="copyData(expressOrderSn)" class="copyCode" text="复制" plain type="success" /></view>
|
||||||
|
</view>
|
||||||
<view v-if="deliverDetails.length > 0">
|
<view v-if="deliverDetails.length > 0">
|
||||||
<!-- <u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40"
|
<!-- <u-tabs active-color="#2979ff" inactive-color="#606266" bar-height="6" bar-width="40"
|
||||||
name="name" :list="deliverList" :is-scroll="false" :current="current" @change="tabchange"></u-tabs> -->
|
name="name" :list="deliverList" :is-scroll="false" :current="current" @change="tabchange"></u-tabs> -->
|
||||||
<view class="deliverCntent">
|
<view class="deliverCntent">
|
||||||
<view class="">
|
<view class="">
|
||||||
|
|
||||||
<view class="kuaidiItem">{{expressCompanyName}} {{expressOrderSn}}
|
|
||||||
<u-tag @click="copyData(expressOrderSn)" class="copyCode" text="复制" plain type="success" /></view>
|
|
||||||
<view v-for="(item, index) in deliverDetails" :class="['item',index == 0 ? 'first':'' ]">
|
<view v-for="(item, index) in deliverDetails" :class="['item',index == 0 ? 'first':'' ]">
|
||||||
<view class="flexbox">
|
<view class="flexbox">
|
||||||
<view class="img_icon "></view>
|
<view class="img_icon "></view>
|
||||||
@@ -25,9 +27,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="quesheng" v-else>
|
<view class="quesheng" v-else>
|
||||||
<image src="../../static/icon/kongbai.png" ></image>
|
<u-divider text="- 暂无物流信息 -"></u-divider>
|
||||||
<text>- 暂无物流信息 -</text>
|
|
||||||
</view>
|
</view>
|
||||||
<music-play :playData="playData"></music-play>
|
<music-play :playData="playData"></music-play>
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
@@ -49,26 +50,23 @@
|
|||||||
playData:{},
|
playData:{},
|
||||||
loading: false,
|
loading: false,
|
||||||
orderId: null,
|
orderId: null,
|
||||||
deliverDetails: [{
|
deliverDetails: [],
|
||||||
Traces: []
|
|
||||||
}],
|
|
||||||
express:{}, // 面单
|
express:{}, // 面单
|
||||||
consignee:{}, // 收件人信息
|
consignee:{}, // 收件人信息
|
||||||
expressOrderSn:'', // 运单号
|
expressOrderSn:'', // 运单号
|
||||||
expressCompanyCode:'', //快递编码
|
// expressCompanyCode:'', //快递编码
|
||||||
expressCompanyName:'' ,// 快递公司
|
// expressCompanyName:'' ,// 快递公司
|
||||||
orderSn : '',
|
orderSn : '',
|
||||||
current: 0,
|
current: 0,
|
||||||
deliverList: [],
|
deliverList: [],
|
||||||
deliverDetailsLength: null,
|
deliverDetailsLength: null,
|
||||||
orderContet:{},
|
orderContet:{},
|
||||||
sheetList:[]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.expressOrderSn = e.expressOrderSn
|
this.expressOrderSn = e.expressOrderSn
|
||||||
this.expressCompanyCode = e.expressCompanyCode
|
// this.expressCompanyCode = e.expressCompanyCode
|
||||||
this.expressCompanyName = e.expressCompanyName
|
// this.expressCompanyName = e.expressCompanyName
|
||||||
//this.express = e.express
|
//this.express = e.express
|
||||||
//this.consignee = e.consignee
|
//this.consignee = e.consignee
|
||||||
console.log(e,'传入的参数')
|
console.log(e,'传入的参数')
|
||||||
@@ -122,21 +120,7 @@
|
|||||||
console.log(this.orderContet,'订单详情')
|
console.log(this.orderContet,'订单详情')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// getSheetInfo(){
|
|
||||||
// console.log('查询快递信息')
|
|
||||||
// this.$http
|
|
||||||
// .get(`express/getPrintTemplateList?expressOrderSn=${this.orderSn}`)
|
|
||||||
// .then(res => {
|
|
||||||
// if(res.code == 0){
|
|
||||||
// this.sheetList = res.result.data
|
|
||||||
// console.log(res,'面单信息')
|
|
||||||
// this.getdeliverDetails()
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// console.log('e',e)
|
|
||||||
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// 复制到剪切板
|
// 复制到剪切板
|
||||||
copyData(data){
|
copyData(data){
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
@@ -153,29 +137,30 @@
|
|||||||
// 获取物流
|
// 获取物流
|
||||||
getdeliverDetails() {
|
getdeliverDetails() {
|
||||||
this.deliverList = []
|
this.deliverList = []
|
||||||
var strLength = this.orderContet.consignee.consigneeMobile.length
|
// var strLength = this.orderContet.consignee.consigneeMobile.length
|
||||||
var subMobile = this.orderContet.consignee.consigneeMobile.substring(strLength-4,strLength)
|
// var subMobile = this.orderContet.consignee.consigneeMobile.substring(strLength-4,strLength)
|
||||||
// this.expressOrderSn = 'SF1504651506851'
|
// this.expressOrderSn = 'SF1504651506851'
|
||||||
// this.expressCompanyCode = 'SF'
|
// this.expressCompanyCode = 'SF'
|
||||||
// subMobile = '9277'
|
// subMobile = '9277'
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.$http
|
this.$http
|
||||||
//.post(`/book/buyOrder/queryFMS?orderId=${this.orderId}`)
|
//.post(`/book/buyOrder/queryFMS?orderId=${this.orderId}`)
|
||||||
.get(`/book/buyOrder/queryExpress?expressOrderSn=${this.expressOrderSn}&expressCompanyCode=${this.expressCompanyCode}&customerName=${subMobile}`)
|
.get(`/book/buyOrder/searchExpress?expressOrderSn=${this.expressOrderSn}`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res, '物流信息')
|
console.log(res, '物流信息')
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
// this.deliverDetails = res.result.traces
|
// this.deliverDetails = res.result.traces
|
||||||
console.log(res.result.traces,'物流信息')
|
console.log(res.express.traces,'物流信息')
|
||||||
// res.rntStr.forEach((item, index) => {
|
if(res.express.traces.length > 0){
|
||||||
this.deliverDetails = res.result.traces.reverse()
|
this.deliverDetails = res.express.traces.reverse()
|
||||||
// item.Traces = item.Traces.reverse()
|
}else{
|
||||||
// //console.log(item)
|
this.deliverDetails = []
|
||||||
// this.deliverList.push({'name':item.ShipperName})
|
}
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
uni.hideLoading()
|
||||||
console.log(e,'e')
|
console.log(e,'e')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="订单详情"></z-nav-bar>
|
<z-nav-bar title="订单详情"></z-nav-bar>
|
||||||
<view class="adDefault" v-if="consigneeShow">
|
<view class="adDefault" v-if="consigneeShow && orderContet.orderType == 'order'">
|
||||||
<view class="defalTop">
|
<view class="defalTop">
|
||||||
<text class="userName">
|
<text class="userName">
|
||||||
{{orderContet.consignee.consigneeName}}
|
{{orderContet.consignee.consigneeName}}
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="orderList" v-if="consigneeShow">
|
<view class="orderList" v-if="consigneeShow">
|
||||||
<view class="" v-if="sheetList.length > 1" style="background-color: rgb(113, 213, 161); margin-bottom: 20rpx; border-radius: 20rpx; color: #fff; font-size: 28rpx; padding: 10rpx;">
|
<view class="" v-if="sheetList.length > 1 && orderContet.orderStatus==2" style="background-color: rgb(113, 213, 161); margin-bottom: 20rpx; border-radius: 20rpx; color: #fff; font-size: 28rpx; padding: 10rpx;">
|
||||||
订单已被拆分成 {{sheetList.length}} 个包裹
|
订单已被拆分成 {{sheetList.length}} 个包裹
|
||||||
</view>
|
</view>
|
||||||
<view class="orderItem">
|
<view class="orderItem">
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<span style="color: #666;margin-right: 10rpx;float: left;">商品总价 : </span>
|
<span style="color: #666;margin-right: 10rpx;float: left;">商品总价 : </span>
|
||||||
<span>¥</span>{{orderContet.orderPrice}}
|
<span>¥</span>{{orderContet.orderPrice}}
|
||||||
</view>
|
</view>
|
||||||
<view class="orderReal">
|
<view class="orderReal" v-if="orderContet.orderType == 'order'"">
|
||||||
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
|
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
|
||||||
<span>¥</span>{{orderContet.shippingPrice}}
|
<span>¥</span>{{orderContet.shippingPrice}}
|
||||||
</view>
|
</view>
|
||||||
@@ -99,17 +99,17 @@
|
|||||||
<span style="color: #666;margin-right: 10rpx;float: left;">付款时间 : </span>
|
<span style="color: #666;margin-right: 10rpx;float: left;">付款时间 : </span>
|
||||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.paymentDate}}</text>
|
<text style="font-size: 24rpx;color: #666;">{{orderContet.paymentDate}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="orderReal" v-if="orderContet.orderStatus >= 2 && orderContet.orderStatus != 5">
|
<!-- <view class="orderReal" v-if="orderContet.orderStatus >= 2 && orderContet.orderStatus != 5">
|
||||||
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
||||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="orderOper">
|
<view class="orderOper">
|
||||||
<view style="width: 100%; text-align: right;">
|
<view style="width: 100%; text-align: right;">
|
||||||
<!-- <u-button text="" type="success" plain ></u-button>
|
<!-- <u-button text="" type="success" plain ></u-button>
|
||||||
<u-button text="" type="primary" plain >
|
<u-button text="" type="primary" plain >
|
||||||
|
|
||||||
</u-button> -->
|
</u-button> -->
|
||||||
<view v-if="orderContet.orderStatus>=2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
<view v-if="orderContet.orderStatus==2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
||||||
<view v-if="orderContet.orderStatus==2" class="opCan" @click="OverOrder" >确认收货</view>
|
<view v-if="orderContet.orderStatus==2" class="opCan" @click="OverOrder" >确认收货</view>
|
||||||
|
|
||||||
<view v-if="orderContet.orderStatus==0" class="opFix" @click="canceOrder">取消订单</view>
|
<view v-if="orderContet.orderStatus==0" class="opFix" @click="canceOrder">取消订单</view>
|
||||||
@@ -175,9 +175,12 @@
|
|||||||
<view class="title">
|
<view class="title">
|
||||||
请选择要查看包裹
|
请选择要查看包裹
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" v-for="(item,index) in sheetList" @click="seeExpressDetails(item)">
|
<view class="item" v-for="(item,index) in sheetList" @click="seeExpressDetails(item)">
|
||||||
包裹 {{index+1}}
|
<h4 style="margin-bottom: 10rpx;">包裹 {{index+1}}</h4>
|
||||||
|
<view class="">运单号:{{item.expressOrderSn}}
|
||||||
|
<u-tag @click="copyData(item.expressOrderSn)" size="mini" class="copyCode" text="复制单号" plain type="success" /></view>
|
||||||
|
<view class="">发货时间:{{item.createTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -269,6 +272,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// 复制到剪切板
|
||||||
|
copyData(data){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data,
|
||||||
|
success: function () {
|
||||||
|
console.log('success');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
seeExpressDetails(item){
|
seeExpressDetails(item){
|
||||||
console.log(item,'item')
|
console.log(item,'item')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -516,7 +528,7 @@
|
|||||||
}else if(this.sheetList.length == 1){
|
}else if(this.sheetList.length == 1){
|
||||||
// 直接展示详情
|
// 直接展示详情
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./deliverDetail?orderSn=" + item.orderSn + "&expressOrderSn=" + this.sheetList[0].expressOrderSn + "&expressCompanyCode="+this.sheetList[0].expressCompanyCode + "&expressCompanyName="+this.sheetList[0].expressCompanyName
|
url: "./deliverDetail?orderSn=" + item.orderSn + "&expressOrderSn=" + this.sheetList[0].expressOrderSn
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -570,9 +582,9 @@
|
|||||||
.get(`/book/buyOrder/orderDetail?orderSn=${this.orderSn}`)
|
.get(`/book/buyOrder/orderDetail?orderSn=${this.orderSn}`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log('订单详情',res)
|
console.log('订单详情',res)
|
||||||
var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
|
// var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
|
||||||
var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
// var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
||||||
res.result.overTime = seconds - nowSeconds
|
// res.result.overTime = seconds - nowSeconds
|
||||||
|
|
||||||
this.orderContet = res.result
|
this.orderContet = res.result
|
||||||
this.consigneeShow = true
|
this.consigneeShow = true
|
||||||
@@ -590,63 +602,15 @@
|
|||||||
} else if (this.orderContet.orderStatus == 3) {
|
} else if (this.orderContet.orderStatus == 3) {
|
||||||
this.titleStat = '已完成'
|
this.titleStat = '已完成'
|
||||||
}
|
}
|
||||||
|
if(this.orderContet.orderStatus >= 2 && this.orderContet.orderType == 'order'){
|
||||||
|
this.sheetList = this.orderContet.expressOrders
|
||||||
if(parseInt(this.orderContet.orderStatus) >= 2){
|
}else{
|
||||||
// 查询快递信息
|
this.sheetList = []
|
||||||
// this.getSheetInfo()
|
}
|
||||||
if(this.orderContet.goodsList.length > 0){
|
|
||||||
this.sheetList = []
|
|
||||||
// console.log('存在商品数据', this.orderContet.goodsList.length)
|
|
||||||
// var ids = []
|
|
||||||
// ids.push(this.orderContet.goodsList[0].expressInfo.expressOrderSn)
|
|
||||||
// this.sheetList.push(this.orderContet.goodsList[0].expressInfo)
|
|
||||||
// for (let index = 1; index < this.orderContet.goodsList.length; index++) {
|
|
||||||
// // if (!ids.includes(this.orderContet.goodsList[index].expressInfo.expressOrder)) {
|
|
||||||
// ids.push(this.orderContet.goodsList[index].expressInfo.expressOrderSn)
|
|
||||||
// this.sheetList.push(this.orderContet.goodsList[index].expressInfo)}
|
|
||||||
// console.log(this.orderContet.goodsList[index].expressInfo.expressOrderSn,'expressOrderSn')
|
|
||||||
// // }
|
|
||||||
// console.log(ids,this.sheetList,'this.sheetList')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(this.orderContet,'订单详情')
|
console.log(this.orderContet,'订单详情')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// getSheetInfo(){
|
|
||||||
// console.log('查询快递信息')
|
|
||||||
// this.$http
|
|
||||||
// .get(`express/getPrintTemplateList?expressOrderSn=${this.orderSn}`)
|
|
||||||
// .then(res => {
|
|
||||||
// if(res.code == 0){
|
|
||||||
// this.sheetList = res.result.data
|
|
||||||
// console.log(res,'面单信息')
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// console.log('e',e)
|
|
||||||
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// 获取物流
|
|
||||||
// getdeliverDetails() {
|
|
||||||
// this.$http
|
|
||||||
// .post(`/book/buyOrder/queryFMS?orderId=${this.orderID}`)
|
|
||||||
// .then(res => {
|
|
||||||
// if (res && res.code === 0) {
|
|
||||||
// console.log(res, '物流信息')
|
|
||||||
// // if(res.msg.indexOf('暂未查到物流信息') == -1){
|
|
||||||
// // this.
|
|
||||||
// // }
|
|
||||||
// res.rntStr.forEach(item => {
|
|
||||||
// item.Traces = item.Traces.reverse()
|
|
||||||
// })
|
|
||||||
// this.deliverDetails = res.rntStr
|
|
||||||
// this.deliverDetailsLength = this.deliverDetails[0].Traces.length
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// 取消订单
|
// 取消订单
|
||||||
canceOrder() {
|
canceOrder() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -1038,7 +1002,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.copyCode{display: inline-block; margin-left: 20rpx; }
|
||||||
.deliverCntent {
|
.deliverCntent {
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -77,8 +77,10 @@
|
|||||||
style="font-weight: bold; color: #f56c6c;">{{ifex.realMoney}}</text>
|
style="font-weight: bold; color: #f56c6c;">{{ifex.realMoney}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="orderOper" v-if="ifex.orderStatus==0">
|
<view class="orderOper" v-if="ifex.orderStatus==0">
|
||||||
<view class="opFix" @click.stop="canceOrder(ifex)">取消订单</view>
|
<view class="opFix" @click.stop = "canceOrder(ifex)">取消订单</view>
|
||||||
<view class="opCan" @click="goPay(ifex)">去支付</view>
|
<view class="opCan" @click.stop = "getNewIap" v-if="ifex.orderType == 'point' && ifex.paymentMethod == '3'">重新下单</view>
|
||||||
|
<view class="opCan" v-else @click.stop = "goPay(ifex)">去支付</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="status==0" style="text-align: center;">
|
<view v-if="status==0" style="text-align: center;">
|
||||||
@@ -151,7 +153,7 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
this.checkIapOrders() //检查未完成的苹果支付订单
|
// this.checkIapOrders() //检查未完成的苹果支付订单
|
||||||
this.getOS()
|
this.getOS()
|
||||||
// this.countDown()
|
// this.countDown()
|
||||||
|
|
||||||
@@ -185,6 +187,12 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
|
// 苹果用户重新下单
|
||||||
|
getNewIap(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/peanut/reCharge'
|
||||||
|
})
|
||||||
|
},
|
||||||
// 倒计时回调
|
// 倒计时回调
|
||||||
countDown() {
|
countDown() {
|
||||||
console.log('重新刷新订单')
|
console.log('重新刷新订单')
|
||||||
@@ -459,7 +467,7 @@
|
|||||||
}, function(e) {
|
}, function(e) {
|
||||||
if (e.errCode == 2) {
|
if (e.errCode == 2) {
|
||||||
// 用户未绑定支付方式,app内支付流程结束,系统弹出框引导用户绑定支付方式,此过程将跳转到系统应用 AppStore 进行绑定支付方式,绑定成功同步支付成功,用户成功付款
|
// 用户未绑定支付方式,app内支付流程结束,系统弹出框引导用户绑定支付方式,此过程将跳转到系统应用 AppStore 进行绑定支付方式,绑定成功同步支付成功,用户成功付款
|
||||||
plus.runtime.openURL("https://apps.apple.com/account/billing");
|
// plus.runtime.openURL("https://apps.apple.com/account/billing");
|
||||||
} else {
|
} else {
|
||||||
// restoreFlag = false; // 支付失败清楚标记
|
// restoreFlag = false; // 支付失败清楚标记
|
||||||
that.finishTransaction(result);
|
that.finishTransaction(result);
|
||||||
|
|||||||
@@ -321,7 +321,7 @@
|
|||||||
},
|
},
|
||||||
// 页面加载完毕
|
// 页面加载完毕
|
||||||
onReady() {
|
onReady() {
|
||||||
this.requestIapOrder()
|
// this.requestIapOrder()
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -329,8 +329,9 @@
|
|||||||
this.tjProList = []
|
this.tjProList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
this.getTags()
|
this.getTags()
|
||||||
|
// this.requestIapOrder()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
this.requestIapOrder()
|
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.loadingNow = true
|
this.loadingNow = true
|
||||||
@@ -476,17 +477,7 @@
|
|||||||
that.ComplateRequestArr = results
|
that.ComplateRequestArr = results
|
||||||
console.log(that.ComplateRequestArr,'未完成订单数组')
|
console.log(that.ComplateRequestArr,'未完成订单数组')
|
||||||
if(results && results.length>0){
|
if(results && results.length>0){
|
||||||
// for(var j = 0; j<results.length; j++){
|
|
||||||
// if(results[j].transactionState == '1'){
|
|
||||||
// // 已经支付,但是没有走逻辑的内购订单
|
|
||||||
// that.iapCheck(results[j])
|
|
||||||
// // that.iapCheck(repciptData)
|
|
||||||
// }else{
|
|
||||||
// // 其他状态的内购订单 直接关闭
|
|
||||||
// that.finishTransaction(results[j])
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
results.map((item,index)=>{
|
results.map((item,index)=>{
|
||||||
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
||||||
if(item.transactionState == '1'){
|
if(item.transactionState == '1'){
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
优惠券
|
优惠券
|
||||||
</view>
|
</view>
|
||||||
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')">充 值</b> -->
|
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')">充 值</b> -->
|
||||||
<b class="chong_btn" @click="onPageJump('./reCharge')">充 值</b>
|
<b class="chong_btn" v-if="platform != 'ios'" @click="onPageJump('./reCharge')">充 值</b>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -132,14 +132,19 @@
|
|||||||
signShow: false,
|
signShow: false,
|
||||||
signContent: '是否要退出登录?',
|
signContent: '是否要退出登录?',
|
||||||
playData:{},
|
playData:{},
|
||||||
isAndorid:true,
|
isAndorid:true,
|
||||||
|
platform : null, // 设备系统
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
this.getOS()
|
// #ifdef APP-PLUS
|
||||||
|
this.getOS()
|
||||||
|
this.platform = uni.getSystemInfoSync().platform
|
||||||
|
// console.log('操纵系统',this.platform)
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo'])
|
...mapState(['userInfo'])
|
||||||
@@ -157,7 +162,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 获得操作系统
|
// 获得操作系统
|
||||||
getOS(){
|
getOS(){
|
||||||
let oprateOs = ''
|
let oprateOs = ''
|
||||||
oprateOs = uni.getSystemInfoSync().platform
|
oprateOs = uni.getSystemInfoSync().platform
|
||||||
// console.log(oprateOs)
|
// console.log(oprateOs)
|
||||||
if(oprateOs == 'android'){
|
if(oprateOs == 'android'){
|
||||||
|
|||||||
@@ -266,6 +266,7 @@
|
|||||||
// 支付成功,result 为 IAP商品交易信息对象 IAPTransaction 需将返回的支付凭证传给后端进行二次认证
|
// 支付成功,result 为 IAP商品交易信息对象 IAPTransaction 需将返回的支付凭证传给后端进行二次认证
|
||||||
that.iapCheck(result)
|
that.iapCheck(result)
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
|
console.log('错误回调', e)
|
||||||
if(e.errCode == 2){
|
if(e.errCode == 2){
|
||||||
// 用户未绑定支付方式,app内支付流程结束,系统弹出框引导用户绑定支付方式,此过程将跳转到系统应用 AppStore 进行绑定支付方式,绑定成功同步支付成功,用户成功付款
|
// 用户未绑定支付方式,app内支付流程结束,系统弹出框引导用户绑定支付方式,此过程将跳转到系统应用 AppStore 进行绑定支付方式,绑定成功同步支付成功,用户成功付款
|
||||||
plus.runtime.openURL("https://apps.apple.com/account/billing");
|
plus.runtime.openURL("https://apps.apple.com/account/billing");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="mainContent">
|
<view class="mainContent">
|
||||||
<view class="title">{{talkBookDetail.title}}</view>
|
<view class="title">{{talkBookDetail.title}}</view>
|
||||||
<view class="voices" v-if="talkBookDetail.voices != '' && audioShow">
|
<view class="voices" v-if="talkBookDetail.voices != '' && audioShow">
|
||||||
<audio style="text-align: left; overflow: hidden;" :src="talkBookDetail.voices"
|
<audio style="text-align: left; overflow: hidden;" :src="talkBookDetail.voices" @play="audioPlay"
|
||||||
poster="../../static/icon/home_icon_0.png" :name="talkBookDetail.title"
|
poster="../../static/icon/home_icon_0.png" :name="talkBookDetail.title"
|
||||||
:author="bookInfo.author.authorName" :action="audioAction" controls></audio>
|
:author="bookInfo.author.authorName" :action="audioAction" controls></audio>
|
||||||
</view>
|
</view>
|
||||||
@@ -85,6 +85,11 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
|
audioPlay(){
|
||||||
|
console.log('播放讲书',this.$music)
|
||||||
|
this.$music.setCloseBgm() // 关闭听书音频
|
||||||
|
this.setUserInfo({'playFlag': false})
|
||||||
|
},
|
||||||
// 购买
|
// 购买
|
||||||
gotoBuy() {
|
gotoBuy() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
<view class="AC_mes">
|
<view class="AC_mes">
|
||||||
<view style="font-size: 50rpx;font-weight: bold;">{{userMes.peanutCoin}}</view>
|
<view style="font-size: 50rpx;font-weight: bold;">{{userMes.peanutCoin}}</view>
|
||||||
<view style="color: #888;font-size: 30rpx;margin-top: 10rpx;">天医币</view>
|
<view style="color: #888;font-size: 30rpx;margin-top: 10rpx;">天医币</view>
|
||||||
<text class="AC_chong" @click="buPoint()">充值</text>
|
|
||||||
|
<text v-if="platform != 'ios'" class="AC_chong" @click="buPoint()">充值</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="AC_con">
|
<view class="AC_con">
|
||||||
@@ -112,6 +114,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
playData:{},
|
playData:{},
|
||||||
|
platform:null,
|
||||||
tab_list: [{
|
tab_list: [{
|
||||||
name: '天医币',
|
name: '天医币',
|
||||||
}, {
|
}, {
|
||||||
@@ -147,8 +150,7 @@
|
|||||||
color: '#54a966',
|
color: '#54a966',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// 返回顶部
|
// 返回顶部
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
@@ -181,6 +183,10 @@
|
|||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
this.platform = uni.getSystemInfoSync().platform
|
||||||
|
console.log('操纵系统',this.platform)
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo'])
|
...mapState(['userInfo'])
|
||||||
|
|||||||
Binary file not shown.
@@ -27,8 +27,7 @@ var music = {
|
|||||||
if (!bgm) return;
|
if (!bgm) return;
|
||||||
if(mute){
|
if(mute){
|
||||||
bgm.pause()
|
bgm.pause()
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
// bgm.src = bgm.musicList[bgm.playIndex].url
|
// bgm.src = bgm.musicList[bgm.playIndex].url
|
||||||
// 判断播放列表是否空
|
// 判断播放列表是否空
|
||||||
if(bgm.musicList.length == 0){
|
if(bgm.musicList.length == 0){
|
||||||
@@ -50,11 +49,21 @@ var music = {
|
|||||||
// 没有就添加添加url到播放器,播放新的
|
// 没有就添加添加url到播放器,播放新的
|
||||||
if(bgm.src == ''){
|
if(bgm.src == ''){
|
||||||
console.log(bgm.playIndex,'播放的索引',store.state.userInfo.playIndex,'播放的时长',store.state.userInfo.playTimes)
|
console.log(bgm.playIndex,'播放的索引',store.state.userInfo.playIndex,'播放的时长',store.state.userInfo.playTimes)
|
||||||
store.commit('setUserInfo',{'playTitle': bgm.musicList[bgm.playIndex].chapterName})
|
store.commit('setUserInfo',{'playTitle': bgm.musicList[bgm.playIndex].chapter})
|
||||||
store.commit('setUserInfo',{'fengImg': bgm.musicList[bgm.playIndex].bookImage})
|
store.commit('setUserInfo',{'fengImg': bgm.musicList[bgm.playIndex].bookImage})
|
||||||
store.commit('setUserInfo',{'playingInfo': bgm.musicList[bgm.playIndex]})
|
store.commit('setUserInfo',{'playingInfo': bgm.musicList[bgm.playIndex]})
|
||||||
console.log(store.state.userInfo,'chapterName',bgm.playIndex)
|
console.log(store.state.userInfo,'chapterName',bgm.playIndex)
|
||||||
store.state.userInfo.playTimes ? bgm.htimes = store.state.userInfo.playTimes : ''
|
store.state.userInfo.playTimes ? bgm.htimes = store.state.userInfo.playTimes : ''
|
||||||
|
|
||||||
|
// 设置默认原生播放组件的显示标题和图片
|
||||||
|
// bgm.title = bgm.musicList[bgm.playIndex].chapter
|
||||||
|
bgm.title = '正在播放'
|
||||||
|
console.log('应该显示的title',bgm.musicList[bgm.playIndex].chapter)
|
||||||
|
// bgm.artist = '暂无'
|
||||||
|
//bgm.singer = '暂无'
|
||||||
|
bgm.coverImgUrl = 'https://www.nuttyreading.com/images/logo.png'
|
||||||
|
bgm.image = 'https://www.nuttyreading.com/images/logo.png'
|
||||||
|
|
||||||
this.getChartUrl()
|
this.getChartUrl()
|
||||||
// 获取历史秒数
|
// 获取历史秒数
|
||||||
|
|
||||||
@@ -64,6 +73,7 @@ var music = {
|
|||||||
}
|
}
|
||||||
bgm.onPause(()=>{
|
bgm.onPause(()=>{
|
||||||
console.log('暂停背景音乐');
|
console.log('暂停背景音乐');
|
||||||
|
bgm.title = '未在播放'
|
||||||
this.saveTimes()
|
this.saveTimes()
|
||||||
clearInterval(bgm.interval)
|
clearInterval(bgm.interval)
|
||||||
bgm.interval = null
|
bgm.interval = null
|
||||||
@@ -123,7 +133,13 @@ var music = {
|
|||||||
this.saveIndex()
|
this.saveIndex()
|
||||||
this.saveRate(bgm.musicList[bgm.playIndex])
|
this.saveRate(bgm.musicList[bgm.playIndex])
|
||||||
// console.log('历史播放进度,秒数', bgm.htimes)
|
// console.log('历史播放进度,秒数', bgm.htimes)
|
||||||
bgm.seek(bgm.htimes)
|
bgm.seek(bgm.htimes)
|
||||||
|
bgm.title = '正在播放'
|
||||||
|
console.log('应该显示的title', bgm.musicList[bgm.playIndex].chapter)
|
||||||
|
bgm.artist = '暂无'
|
||||||
|
//bgm.singer = '暂无'
|
||||||
|
bgm.coverImgUrl = 'https://www.nuttyreading.com/images/logo.png'
|
||||||
|
bgm.image = 'https://www.nuttyreading.com/images/logo.png'
|
||||||
// console.log(bgm,'bgm')
|
// console.log(bgm,'bgm')
|
||||||
})
|
})
|
||||||
bgm.onEnded(() => {
|
bgm.onEnded(() => {
|
||||||
@@ -133,6 +149,22 @@ var music = {
|
|||||||
store.commit('setUserInfo',{'playFlag': false})
|
store.commit('setUserInfo',{'playFlag': false})
|
||||||
this.setPlayIndex('next') // 下一首
|
this.setPlayIndex('next') // 下一首
|
||||||
})
|
})
|
||||||
|
bgm.onPrev(() => {
|
||||||
|
console.log('点了上一曲')
|
||||||
|
if(bgm.playIndex - 1 >= 0){
|
||||||
|
this.setPlayIndex('prve') // 上一首
|
||||||
|
}else{
|
||||||
|
console.log('没有上一首了')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
bgm.onNext(() => {
|
||||||
|
console.log('点了下一曲')
|
||||||
|
if(bgm.playIndex + 1 <= bgm.musicList.length){
|
||||||
|
this.setPlayIndex('next') // 下一首
|
||||||
|
}else{
|
||||||
|
console.log('没有下一首了,到头了')
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 添加播放列表
|
// 添加播放列表
|
||||||
setList(list,op,playindex,time){
|
setList(list,op,playindex,time){
|
||||||
@@ -151,6 +183,7 @@ var music = {
|
|||||||
if(playindex){
|
if(playindex){
|
||||||
bgm.playIndex = playindex
|
bgm.playIndex = playindex
|
||||||
console.log(playindex,'传值了')
|
console.log(playindex,'传值了')
|
||||||
|
|
||||||
if(time){ // 如果传了历史播放秒数
|
if(time){ // 如果传了历史播放秒数
|
||||||
bgm.htimes = time
|
bgm.htimes = time
|
||||||
}else{
|
}else{
|
||||||
@@ -162,6 +195,8 @@ var music = {
|
|||||||
bgm.htimes = 0
|
bgm.htimes = 0
|
||||||
bgm.playIndex = 0
|
bgm.playIndex = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(op == 'autoPlay'){
|
if(op == 'autoPlay'){
|
||||||
store.commit('setUserInfo',{'playTimes': 0})
|
store.commit('setUserInfo',{'playTimes': 0})
|
||||||
if(bgm._options.src == ''){
|
if(bgm._options.src == ''){
|
||||||
@@ -232,7 +267,7 @@ var music = {
|
|||||||
$http.post('book/bookchaptercontent/getBooksCatalogue', data)
|
$http.post('book/bookchaptercontent/getBooksCatalogue', data)
|
||||||
// $http.post('book/bookchaptercontent/getCatal', data)
|
// $http.post('book/bookchaptercontent/getCatal', data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res,'鉴权结果')
|
console.log(res,'鉴权结果')
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
if(res.jq==false ){
|
if(res.jq==false ){
|
||||||
store.commit('setUserInfo',{'playFlag': false})
|
store.commit('setUserInfo',{'playFlag': false})
|
||||||
@@ -277,7 +312,7 @@ var music = {
|
|||||||
// 先清除定时器
|
// 先清除定时器
|
||||||
clearInterval(bgm.interval)
|
clearInterval(bgm.interval)
|
||||||
bgm.interval = null
|
bgm.interval = null
|
||||||
bgm.src = res.chapter.voices
|
bgm.src = res.chapter.voices
|
||||||
store.commit('setUserInfo',{'playIndex': bgm.playIndex})
|
store.commit('setUserInfo',{'playIndex': bgm.playIndex})
|
||||||
store.commit('setUserInfo',{'playingInfo':bgm.musicList[bgm.playIndex] })
|
store.commit('setUserInfo',{'playingInfo':bgm.musicList[bgm.playIndex] })
|
||||||
}else{
|
}else{
|
||||||
@@ -363,6 +398,7 @@ var music = {
|
|||||||
bgm.playIndex += 1
|
bgm.playIndex += 1
|
||||||
console.log('下一首',bgm.playIndex,bgm.oldIndex, store.state.userInfo.playIndex)
|
console.log('下一首',bgm.playIndex,bgm.oldIndex, store.state.userInfo.playIndex)
|
||||||
// bgm.stop()
|
// bgm.stop()
|
||||||
|
bgm.htimes = 0
|
||||||
this.getChartUrl() // 获取章节url
|
this.getChartUrl() // 获取章节url
|
||||||
//this.playBgm({'mute':false})
|
//this.playBgm({'mute':false})
|
||||||
// store.commit('setUserInfo',{'playFlag': false})
|
// store.commit('setUserInfo',{'playFlag': false})
|
||||||
@@ -378,6 +414,7 @@ var music = {
|
|||||||
bgm.oldIndex = bgm.playIndex
|
bgm.oldIndex = bgm.playIndex
|
||||||
bgm.playIndex -= 1
|
bgm.playIndex -= 1
|
||||||
console.log('上一首',bgm.playIndex)
|
console.log('上一首',bgm.playIndex)
|
||||||
|
bgm.htimes = 0
|
||||||
this.getChartUrl() // 获取章节url
|
this.getChartUrl() // 获取章节url
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user