From 5ba2103c4dff7f3ed09cab192f88735666abcb0e Mon Sep 17 00:00:00 2001
From: XiaoXinPro 14 IAH5R <568170040@qq.com>
Date: Wed, 28 Jun 2023 18:14:02 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E8=AF=A6=E9=A1=B5=E8=87=AA=E7=94=B1?=
=?UTF-8?q?=E5=9B=BE=E6=96=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/coupon/detail/index.js | 18 ++-
pages/coupon/detail/index.ttml | 9 +-
pages/coupon/detail/index.ttss | 11 +-
pages/coupon/instructions/instructions.js | 38 +++++-
pages/coupon/instructions/instructions.ttml | 9 +-
pages/coupon/instructions/instructions.ttss | 135 +++++++++++++-------
pages/freeBannerDetail/freeBannerDetail.js | 1 +
pages/freeBannerDetail/ttParse/wxParse.ttss | 2 +-
pages/order/detail/index.js | 37 +++++-
pages/order/detail/index.ttml | 8 +-
pages/order/detail/index.ttss | 7 +
11 files changed, 212 insertions(+), 63 deletions(-)
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 0d17cc0..79c8c58 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -4,6 +4,8 @@ var app = getApp();
const Http = require("../../../utils/HttpBasics");
const util = require("../../../utils/util");
const imgurl = require("../../../utils/imgurl");
+var ttParse = require('../../freeBannerDetail/ttParse/wxParse.js');
+
Page({
data: {
priceAndStockObj: {}, //存放价格和库存
@@ -602,23 +604,31 @@ Page({
}
},
+
getHtml(couponChannelId) {
+ const that = this
Http.get({
url: config.api.couponHtmlDetail,
data: {
- couponChannelId: couponChannelId
+ couponChannelId: couponChannelId,
+ mallTenantId: this.data.mallTenantId || ''
}
}).then(res => {
- console.log(res)
if (res.code == 200 && res.data.html) {
+ const curHtml = decodeURI(res.data.html)
this.setData({
- curHtml: decodeURI(res.data.html)
+ curHtml,
})
+
+ console.log(curHtml, 'curHtml')
+
+ var temp = ttParse.wxParse('article', 'html', curHtml, that, 5);
+
app.globalData.curHtml = this.data.curHtml;
- console.log(app.globalData.curHtml)
}
})
},
+
getSupId(id) {
Http.get({
url: config.api.getSpuid,
diff --git a/pages/coupon/detail/index.ttml b/pages/coupon/detail/index.ttml
index e1d5c50..f4b1360 100644
--- a/pages/coupon/detail/index.ttml
+++ b/pages/coupon/detail/index.ttml
@@ -181,9 +181,12 @@
• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间
使用规则
- {{data.remark}}
-
-
+ {{ data.remark }}
+
+
+
+
+
diff --git a/pages/coupon/detail/index.ttss b/pages/coupon/detail/index.ttss
index 0ba3111..e738fd5 100644
--- a/pages/coupon/detail/index.ttss
+++ b/pages/coupon/detail/index.ttss
@@ -1,4 +1,6 @@
@import "../../../app.ttss";
+@import "../../freeBannerDetail/ttParse/wxParse.ttss";
+
page {
background: #f4f5f9;
@@ -9,6 +11,11 @@ button::after {
}
+.content {
+ width: 710rpx;
+ padding: 0 20rpx;
+ background-color: #ffffff;
+}
.coupons {
width: 100%;
@@ -951,14 +958,14 @@ radio-group {
margin-bottom: 20rpx;
}
-.content {
+/* .content {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: #f3f3f3;
position: relative;
-}
+} */
.poster {
width: 100%;
diff --git a/pages/coupon/instructions/instructions.js b/pages/coupon/instructions/instructions.js
index 5a992bf..027f4ec 100644
--- a/pages/coupon/instructions/instructions.js
+++ b/pages/coupon/instructions/instructions.js
@@ -4,6 +4,8 @@ var app = getApp();
const Http = require("../../../utils/HttpBasics");
const util = require("../../../utils/util");
const imgurl = require("../../../utils/imgurl");
+var ttParse = require('../../freeBannerDetail/ttParse/wxParse.js');
+
Page({
data: {
couponIds: "",
@@ -14,12 +16,18 @@ Page({
priceAndStockObj: {},
validStartDate: "",
validEndDate: "",
-
+ contentType: "",
+ mallTenantId: ''
},
onLoad: function (options) {
console.log(options.couponChannelId);
this.getDetail(options.couponChannelId)
-
+ const mallTenantId = tt.getStorageSync('mallTenantId');
+ if (mallTenantId) {
+ this.setData({
+ mallTenantId
+ })
+ }
},
getDetail: function (couponChannelId, flag) {
let that = this;
@@ -40,6 +48,15 @@ Page({
that.setData({
couponId: res.data.couponId
})
+
+ if (res.data.contentType != undefined && res.data.contentType == 1) {
+ //获取图文展示详情html
+ that.setData({
+ contentType: res.data.contentType
+ })
+ that.getHtml(couponChannelId);
+ }
+
/**
* activityStatus==0 活动未开始
* activityStatus==1 活动已开始
@@ -196,4 +213,21 @@ Page({
});
})
},
+
+ getHtml(couponChannelId) {
+ const that = this
+ Http.get({
+ url: config.api.couponHtmlDetail,
+ data: {
+ couponChannelId: couponChannelId,
+ mallTenantId: that.data.mallTenantId || ''
+ }
+ }).then(res => {
+ console.log(res)
+ if (res.code == 200 && res.data.html) {
+ const curHtml = decodeURI(res.data.html)
+ var temp = ttParse.wxParse('article', 'html', curHtml, that, 5);
+ }
+ })
+ },
})
\ No newline at end of file
diff --git a/pages/coupon/instructions/instructions.ttml b/pages/coupon/instructions/instructions.ttml
index 4ba77a0..37bd4a5 100644
--- a/pages/coupon/instructions/instructions.ttml
+++ b/pages/coupon/instructions/instructions.ttml
@@ -36,9 +36,12 @@
• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间
使用规则
- {{data.remark}}
-
-
+ {{ data.remark }}
+
+
+
+
+
diff --git a/pages/coupon/instructions/instructions.ttss b/pages/coupon/instructions/instructions.ttss
index c0eca4e..8a6521c 100644
--- a/pages/coupon/instructions/instructions.ttss
+++ b/pages/coupon/instructions/instructions.ttss
@@ -1,4 +1,5 @@
@import "../../../app.ttss";
+@import "../../freeBannerDetail/ttParse/wxParse.ttss";
page {
background: #f4f5f9;
@@ -6,9 +7,14 @@ page {
button::after {
border: none;
-
+
}
+.content {
+ width: 710rpx;
+ padding: 0 20rpx;
+ background-color: #ffffff;
+}
.coupons {
width: 100%;
@@ -217,11 +223,13 @@ button::after {
text-overflow: ellipsis;
padding-top: 30rpx;
}
-.subTitleBox{
+
+.subTitleBox {
overflow: hidden;
width: 100%;
- margin: 10rpx 0;
+ margin: 10rpx 0;
}
+
.subTitle {
display: block;
width: 400rpx;
@@ -235,7 +243,8 @@ button::after {
padding: 6rpx 0;
float: left;
}
-.sellBox{
+
+.sellBox {
display: block;
font-size: 26rpx;
color: #a6a6a6;
@@ -333,7 +342,8 @@ button::after {
height: 32rpx;
line-height: 45rpx;
}
-.qsOriginal{
+
+.qsOriginal {
text-decoration: line-through;
color: #999 !important;
margin-top: 58rpx;
@@ -344,11 +354,12 @@ button::after {
float: left;
}
-.serviceImg{
+.serviceImg {
height: 100%;
width: 100%;
}
-.timeText{
+
+.timeText {
color: #333;
letter-spacing: 0;
font-size: 14px;
@@ -357,6 +368,7 @@ button::after {
width: 92%;
margin: 10rpx auto 0 auto;
}
+
.fl {
float: left;
}
@@ -364,20 +376,22 @@ button::after {
.fr {
float: right;
}
+
.notes {
width: 100%;
background: #fff;
padding-bottom: 30rpx;
}
-.nodesD{
+.nodesD {
height: 87rpx;
line-height: 87rpx;
background: #fff;
border-top: 1px solid #f9f9f9;
font-weight: bold;
}
-.notesText{
+
+.notesText {
width: 92%;
margin: 0 auto;
color: #333;
@@ -388,15 +402,16 @@ button::after {
display: block;
}
-.notesH{
+.notesH {
width: 92%;
font-weight: bold;
font-size: 32rpx;
color: #3c3c3c;
- margin: 10rpx auto;
+ margin: 10rpx auto;
padding-top: 10rpx;
}
-.Hchild{
+
+.Hchild {
width: 92%;
margin: 0 auto;
color: #333;
@@ -406,6 +421,7 @@ button::after {
line-height: 21px;
display: block;
}
+
/* .notes view:nth-child(1) text {
color: #333;
letter-spacing: 0;
@@ -441,11 +457,12 @@ button::after {
-.app-border-topX{
+.app-border-topX {
width: 100%;
background-color: #fff;
border-top: solid 1rpx rgb(204, 204, 204);
}
+
.buy-view {
/* background: #fff; */
height: 92rpx;
@@ -455,18 +472,22 @@ button::after {
padding-bottom: 22rpx;
padding-top: 22rpx;
}
-.sell{
+
+.sell {
font-size: 24rpx;
- color: #a6a6a6;;
+ color: #a6a6a6;
+ ;
letter-spacing: 1px;
text-align: right;
float: right;
margin-top: 60rpx;
}
-.sellP{
+
+.sellP {
color: #d5af67;
}
-.biaoz{
+
+.biaoz {
color: #d5af67;
font-family: "PingFangSC-Medium";
font-size: 28rpx;
@@ -476,7 +497,8 @@ button::after {
margin-top: 55rpx;
margin-left: 40rpx;
}
-.selling{
+
+.selling {
color: #d5af67;
font-family: "PingFangSC-Medium";
font-size: 36rpx;
@@ -485,7 +507,8 @@ button::after {
margin-top: 50rpx;
/* line-height: 22px; */
}
-.buyX{
+
+.buyX {
/* position: relative; */
float: right;
background: linear-gradient(270deg, #DDAB5A, #B8832D);
@@ -498,6 +521,7 @@ button::after {
border-radius: 61rpx;
margin: 30rpx 20rpx;
}
+
.buy {
position: relative;
background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%);
@@ -672,7 +696,7 @@ button::after {
border-bottom: 1rpx solid #eee;
}
-.quessss >view:last-child {
+.quessss>view:last-child {
border-bottom: 0;
}
@@ -741,7 +765,8 @@ button::after {
bottom: 15rpx;
}
-.btns .fr, .btns .fl {
+.btns .fr,
+.btns .fl {
width: 277rpx;
height: 95rpx;
border-radius: 48rpx;
@@ -909,7 +934,8 @@ button::after {
background: rgba(201, 201, 201, 0.1);
}
-checkbox-group, radio-group {
+checkbox-group,
+radio-group {
height: 400rpx;
overflow-y: scroll;
}
@@ -927,14 +953,14 @@ checkbox-group, radio-group {
margin-bottom: 20rpx;
}
-.content {
+/* .content {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: #f3f3f3;
position: relative;
-}
+} */
.poster {
width: 100%;
@@ -1103,10 +1129,11 @@ checkbox-group, radio-group {
-.groupTitleBox{
+.groupTitleBox {
background: #fff;
}
-.groupTitle{
+
+.groupTitle {
color: #333;
letter-spacing: 0;
font-size: 30rpx;
@@ -1116,7 +1143,8 @@ checkbox-group, radio-group {
margin: 0 auto;
font-weight: bold;
}
-.groupTitleS{
+
+.groupTitleS {
color: #333;
letter-spacing: 0;
font-size: 28rpx;
@@ -1126,7 +1154,8 @@ checkbox-group, radio-group {
margin: 0 auto;
/* font-weight: bold; */
}
-.yuandian{
+
+.yuandian {
background-color: #333333;
width: 4rpx;
@@ -1135,57 +1164,68 @@ checkbox-group, radio-group {
margin: 16rpx 8rpx 0 0;
float: left;
}
-.groupDetailsBox{
+
+.groupDetailsBox {
width: 90%;
margin: 0 auto;
}
-.groupTiemBox{
+
+.groupTiemBox {
color: #333333;
overflow: hidden;
}
-.groupTiemName{
+
+.groupTiemName {
float: left;
font-size: 26rpx;
/* color: #a6a6a6; */
}
-.groupTiemPay{
+
+.groupTiemPay {
float: right;
font-size: 26rpx;
/* color: #a6a6a6; */
}
-.videoCla{
+
+.videoCla {
margin-top: 10rpx;
width: 70rpx;
height: 60rpx;
}
-.issue{
+
+.issue {
font-size: 20rpx;
}
-.groupTextBox{
+
+.groupTextBox {
background: #fff;
overflow: hidden;
padding-bottom: 10rpx;
}
-.shootBox{
+
+.shootBox {
position: fixed;
top: 70%;
right: 0;
width: 120rpx;
height: 100rpx;
- background-color: rgba(221,171,90, 0.5) !important;
- border-radius: 12rpx 0 0 12rpx;
+ background-color: rgba(221, 171, 90, 0.5) !important;
+ border-radius: 12rpx 0 0 12rpx;
z-index: 1000000;
}
-.mount{
+
+.mount {
line-height: 20rpx !important;
height: 100%;
}
-button{
+
+button {
color: #fff;
- background-color: rgba(221,171,90, 0.5);
- padding:0;
+ background-color: rgba(221, 171, 90, 0.5);
+ padding: 0;
}
-.serviceBox{
+
+.serviceBox {
float: right;
margin-top: 58rpx;
margin-right: 14rpx;
@@ -1193,16 +1233,19 @@ button{
width: 40rpx;
background-color: #fff;
}
-.fuwuLogoBox{
+
+.fuwuLogoBox {
width: 40rpx;
height: 40rpx;
line-height: 0;
}
-.itemLogo{
+
+.itemLogo {
width: 100%;
height: 100%;
}
-.fuwuName{
+
+.fuwuName {
text-align: center;
color: #000;
font-size: 24rpx;
diff --git a/pages/freeBannerDetail/freeBannerDetail.js b/pages/freeBannerDetail/freeBannerDetail.js
index c06361c..e0b7f21 100644
--- a/pages/freeBannerDetail/freeBannerDetail.js
+++ b/pages/freeBannerDetail/freeBannerDetail.js
@@ -39,6 +39,7 @@ Page({
success: function (res) {
console.log(res, 'res');
if (res.data) {
+ console.log(res.data, 'html');
var temp = ttParse.wxParse('article', 'html', res.data, that, 5);
}
}
diff --git a/pages/freeBannerDetail/ttParse/wxParse.ttss b/pages/freeBannerDetail/ttParse/wxParse.ttss
index d0a4219..9b0235a 100644
--- a/pages/freeBannerDetail/ttParse/wxParse.ttss
+++ b/pages/freeBannerDetail/ttParse/wxParse.ttss
@@ -6,7 +6,7 @@
line-height: 1.8;
}
-view {
+.content view {
word-break: break-all;
overflow: auto;
background: #FFF;
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 1a2845a..fb6e6b0 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -5,6 +5,8 @@ let Http = require("../../../utils/HttpBasics");
let app = getApp();
const imgurl = require("../../../utils/imgurl");
const QR = require("../../../utils/memberqrcode.js");
+var ttParse = require('../../freeBannerDetail/ttParse/wxParse.js');
+
Page({
/**
* 页面的初始数据
@@ -575,9 +577,17 @@ Page({
showPage: true,
createDate: createDate,
composeOrderType: tempData.composeOrderType,
- contentType: tempData.contentType ? tempData.contentType : 0,
orderFlag: tempData.type == 11 ? true : false, //判断是不是线上配送
})
+
+ if (tempData.contentType != undefined && tempData.contentType == 1) {
+ //获取图文展示详情html
+ that.setData({
+ contentType: tempData.contentType ? tempData.contentType : 0,
+ })
+ that.getHtml(tempData.couponChannelId);
+ }
+
if (tempData.couponOrderId) { //0未付款 1已支付 2已取消 3退款中 4已退款
that.setRq()
// that.upStatus()
@@ -804,6 +814,30 @@ Page({
})
},
+ getHtml(couponChannelId) {
+ const that = this
+ Http.get({
+ url: config.api.couponHtmlDetail,
+ data: {
+ couponChannelId: couponChannelId,
+ mallTenantId: this.data.mallTenantId || ''
+ }
+ }).then(res => {
+ console.log(res)
+ if (res.code == 200 && res.data.html) {
+ const curHtml = decodeURI(res.data.html)
+ this.setData({
+ curHtml,
+ })
+
+ var temp = ttParse.wxParse('article', 'html', curHtml, that, 5);
+
+ app.globalData.curHtml = this.data.curHtml;
+ console.log(app.globalData.curHtml)
+ }
+ })
+ },
+
goPaySnapshoot(e) {
let id = e.currentTarget.dataset.id;
tt.navigateTo({
@@ -816,6 +850,7 @@ Page({
},
});
},
+
powerDrawer: function (e) {
let that = this;
console.log(e)
diff --git a/pages/order/detail/index.ttml b/pages/order/detail/index.ttml
index cf882cf..6479499 100644
--- a/pages/order/detail/index.ttml
+++ b/pages/order/detail/index.ttml
@@ -272,6 +272,13 @@
使用规则
+ {{ data.remark }}
+
+
+
+
+
+
{{item.title}}
@@ -304,7 +311,6 @@
-
购买须知
有效期
diff --git a/pages/order/detail/index.ttss b/pages/order/detail/index.ttss
index 2cf41eb..92fd919 100644
--- a/pages/order/detail/index.ttss
+++ b/pages/order/detail/index.ttss
@@ -1,4 +1,5 @@
@import "../../../app.ttss";
+@import "../../freeBannerDetail/ttParse/wxParse.ttss";
button::after {
border: none;
@@ -10,6 +11,12 @@ page {
}
+.content {
+ width: 710rpx;
+ padding: 0 20rpx;
+ background-color: #ffffff;
+}
+
.serviceBOX {
position: fixed;
top: 50%;