Ver a proveniência

商详页自由图文

product
HolyKnightIX há 1 ano
ascendente
cometimento
5ba2103c4d
11 ficheiros alterados com 212 adições e 63 eliminações
  1. +14
    -4
      pages/coupon/detail/index.js
  2. +6
    -3
      pages/coupon/detail/index.ttml
  3. +9
    -2
      pages/coupon/detail/index.ttss
  4. +36
    -2
      pages/coupon/instructions/instructions.js
  5. +6
    -3
      pages/coupon/instructions/instructions.ttml
  6. +89
    -46
      pages/coupon/instructions/instructions.ttss
  7. +1
    -0
      pages/freeBannerDetail/freeBannerDetail.js
  8. +1
    -1
      pages/freeBannerDetail/ttParse/wxParse.ttss
  9. +36
    -1
      pages/order/detail/index.js
  10. +7
    -1
      pages/order/detail/index.ttml
  11. +7
    -0
      pages/order/detail/index.ttss

+ 14
- 4
pages/coupon/detail/index.js Ver ficheiro

@@ -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,


+ 6
- 3
pages/coupon/detail/index.ttml Ver ficheiro

@@ -181,9 +181,12 @@
<view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view>

<view class="notesH">使用规则</view>
<text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text>
<view tt:if="{{curHtml!=''}}">
<rich-text nodes="{{curHtml}}"></rich-text>
<text tt:if="{{ data.remark }}" class="notesText">{{ data.remark }}</text>
<view tt:if="{{ contentType==1 }}">
<import src="../../freeBannerDetail/ttParse/wxParse.ttml" />
<view class="content" style="width: 710rpx;padding: 0 20rpx;">
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
</view>
</view>

<view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}">


+ 9
- 2
pages/coupon/detail/index.ttss Ver ficheiro

@@ -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%;


+ 36
- 2
pages/coupon/instructions/instructions.js Ver ficheiro

@@ -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);
}
})
},
})

+ 6
- 3
pages/coupon/instructions/instructions.ttml Ver ficheiro

@@ -36,9 +36,12 @@
<view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view>

<view class="notesH">使用规则</view>
<text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text>
<view tt:if="{{curHtml!=''}}">
<rich-text nodes="{{curHtml}}"></rich-text>
<text tt:if="{{ data.remark }}" class="notesText">{{ data.remark }}</text>
<view tt:if="{{ contentType==1 }}">
<import src="../../freeBannerDetail/ttParse/wxParse.ttml" />
<view class="content" style="width: 710rpx;padding: 0 20rpx;">
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
</view>
</view>

<view tt:if="{{data.curLsit}}" tt:for="{{data.curLsit}}" tt:key="{{index}}">


+ 89
- 46
pages/coupon/instructions/instructions.ttss Ver ficheiro

@@ -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;

+ 1
- 0
pages/freeBannerDetail/freeBannerDetail.js Ver ficheiro

@@ -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);
}
}


+ 1
- 1
pages/freeBannerDetail/ttParse/wxParse.ttss Ver ficheiro

@@ -6,7 +6,7 @@
line-height: 1.8;
}

view {
.content view {
word-break: break-all;
overflow: auto;
background: #FFF;


+ 36
- 1
pages/order/detail/index.js Ver ficheiro

@@ -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)


+ 7
- 1
pages/order/detail/index.ttml Ver ficheiro

@@ -272,6 +272,13 @@

<view class="notesH" tt:if="{{order.curLsit}}">使用规则</view>

<text tt:if="{{ data.remark }}" class="notesText">{{ data.remark }}</text>
<view tt:if="{{ contentType == 1 }}">
<import src="../../freeBannerDetail/ttParse/wxParse.ttml" />
<view class="content" style="width: 710rpx;padding: 0 20rpx;">
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
</view>
</view>

<view tt:if="{{order.curLsit}}" tt:for="{{order.curLsit}}" tt:key="{{index}}">
<view class="timeText" tt:if="{{item.title!=''}}">{{item.title}}</view>
@@ -304,7 +311,6 @@
<image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
</view>


<view class='notes'>
<view class="notesH">购买须知</view>
<view class="timeText">有效期</view>


+ 7
- 0
pages/order/detail/index.ttss Ver ficheiro

@@ -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%;


Carregando…
Cancelar
Guardar