提交
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name" : "心灵空间",
|
||||
"appid" : "__UNI__BBBDFD2",
|
||||
"description" : "心灵空间",
|
||||
"versionName" : "1.0.24",
|
||||
"versionCode" : 1024,
|
||||
"versionName" : "1.0.21",
|
||||
"versionCode" : 1021,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<view class="learning_item" @click="goCourseDescription(item)"
|
||||
v-if="studyList.length>0"
|
||||
v-for="(item, index) in studyList">
|
||||
<image class="book_image" :src="item.image" mode="aspectFit"></image>
|
||||
<image class="book_image" :src="item.image"></image>
|
||||
<view class="book_name">{{ item.title }}</view>
|
||||
</view>
|
||||
<text class="null_text" v-if="studyList.length==0">暂无数据</text>
|
||||
|
||||
@@ -41,11 +41,6 @@
|
||||
<text style="font-weight: blod" class="catalogue_title">{{ slotProps.data.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<u-icon class="editIcon" name="shopping-cart-fill"
|
||||
color="#FF2B57" size="30"
|
||||
style="display: inline-block; margin-left: 10rpx"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -217,6 +212,20 @@
|
||||
});
|
||||
return list;
|
||||
},
|
||||
toLogin(){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '为了方便您后期用不同的设备查阅订购的记录,请先完成登录或注册。',
|
||||
confirmText: '确认',
|
||||
success(res){
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="commonPageBox commonDetailPage">
|
||||
<z-nav-bar title="商品详情"></z-nav-bar>
|
||||
<z-nav-bar title="详情"></z-nav-bar>
|
||||
<view class="contentBox commonPageContentBox" style="padding-bottom: 30rpx;" v-if="!this.$store.state.loadingShow">
|
||||
<swiper :autoplay="true" :interval="3000" :duration="1000"
|
||||
style="width: 100%; height: 750rpx; background-color: #f5f5f5">
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="goods_box">
|
||||
<view class="curriulum_title_box">
|
||||
<view class="miaosha_box">
|
||||
<view class="price_box">
|
||||
<!-- <view class="price_box">
|
||||
<view class="price_left">
|
||||
<template>
|
||||
<text class="aui-text-danger price">
|
||||
@@ -24,7 +24,7 @@
|
||||
<view class="price original_price sales_number">已售 {{ curriculumData.sumSales }}件
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="curriulum_title">{{ curriculumData.productName }}
|
||||
</view>
|
||||
@@ -92,7 +92,7 @@
|
||||
</common-list>
|
||||
</view>
|
||||
|
||||
<u-divider text="商品详情" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||
<u-divider text="详情" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||
<view class="small_class_teaching_box">
|
||||
<view class="common_divider divider_box"> </view>
|
||||
|
||||
@@ -103,10 +103,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
|
||||
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||
@buttonClick="toLogin()" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="list_item_title">{{item.title}}</view>
|
||||
<view class="list_item_content" v-html="item.content"></view>
|
||||
<view class="list_item_bt">
|
||||
<text class="list_item_study">了解课程</text>
|
||||
<text class="list_item_study" @click="goToDetail(item)">了解课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -74,6 +74,11 @@ export default {
|
||||
this.statusNull = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
goToDetail(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/detail?navTitle=${item.title}&title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
iosPaylist: [{
|
||||
title: "IAP 支付",
|
||||
id: 3,
|
||||
imgUrl: require("@/static/icon/pay_2.png"),
|
||||
imgUrl: require("@/static/icon/icon_IAP.png"),
|
||||
}, ],
|
||||
transaction: {
|
||||
// 成功回调
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
});
|
||||
const that = this;
|
||||
let IAPOrders = [];
|
||||
IAPOrders.push('s' + that.stepsCj.priceTypeId);
|
||||
IAPOrders.push('x' + that.stepsCj.priceTypeId);
|
||||
// 新建订单
|
||||
uni.showLoading({
|
||||
title: "正在创建订单",
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
orderId: result.payment.username, // 系统订单号
|
||||
receiptData: result.transactionReceipt, // 苹果返回收据
|
||||
// sandBox: true, //测试数据
|
||||
// body: that.stepsCj.priceTypeId // 充值类型id
|
||||
// body: that.stepsCj.priceTypeId //充值类型id
|
||||
};
|
||||
$http
|
||||
.request({
|
||||
@@ -345,11 +345,17 @@ export default {
|
||||
icon: 'success'
|
||||
})
|
||||
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
|
||||
//that.finishTransaction(result);
|
||||
that.finishTransaction(result);
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/my/index'
|
||||
})
|
||||
}, 2000);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.hideLoading()
|
||||
that.finishTransaction(result);
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
showCancel: false,
|
||||
@@ -360,7 +366,6 @@ export default {
|
||||
}
|
||||
},
|
||||
});
|
||||
//that.finishTransaction(result);
|
||||
}, )
|
||||
},
|
||||
getDevName() {
|
||||
@@ -428,14 +433,6 @@ export default {
|
||||
let that = this;
|
||||
that.payType = e;
|
||||
},
|
||||
//ios充值
|
||||
iosPay() {
|
||||
// 苹果内购实现思路:
|
||||
// 1.先确认支付通道是否包含苹果内购
|
||||
// 2.检查一下是否存在上次未处理完的订单(主要是支付成功没有走回调的订单),异常订单直接关闭掉,成功没有走回调的提交给后台进行验证
|
||||
// 3.请求并创建新的订单
|
||||
this.iphonepay();
|
||||
},
|
||||
// 充值
|
||||
goToPay() {
|
||||
this.kaiChar();
|
||||
@@ -540,8 +537,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else if (that.payType == 3) {
|
||||
console.log("苹果支付");
|
||||
that.iosPay();
|
||||
that.iphonepay();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
BIN
static/icon/icon_IAP.png
Normal file
BIN
static/icon/icon_IAP.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 859 B |
Reference in New Issue
Block a user