Commit 730bd6d7 by 匡雅琴

修改产品详情页面

1 parent e61ab099
......@@ -22,6 +22,9 @@ module.exports = {
},
getBaseDataConfig() {
return api.getBaseDataByMock()
},
getProductDetail() {
return api.getProductDetail()
}
}
}
\ No newline at end of file
......@@ -155,5 +155,21 @@ class Request {
})
})
}
getProductDetail() {
let url = 'https://oss-config.dev.glsx.com.cn/mock/6264ff4760f415276f6dfe62/test-detail'
return new Promise((resolve) => {
wx.request({
url,
data: {},
method: 'GET',
header: {},
dataType: 'json',
responseType: 'text',
success(response) {
resolve(response.data)
}
})
})
}
}
export default new Request()
\ No newline at end of file
// packagesList/pages/productDetail/components/proDetail/proDetail.js
import { senceData, productData1 } from '~/pages/tab/index/constant/senceData'
// import { senceData, productData1 } from '~/pages/tab/index/constant/senceData'
const norTabList = ['海报案例', '测算营销', '产品介绍', '项目亮点']
import { componentsMixin } from "../../mixins/index";
Component({
......@@ -10,34 +10,38 @@ Component({
*/
properties: {
// 场景值下标
actNum: {
type: Number,
value: -1,
observer(n) {
this.getInfo()
if (n == 3) {
this.setVideoCtx()
}
this.getImgHeight()
}
},
// 选中的产品
activeNavIdx: {
type: Number,
value: 0
},
cardInfo: {
type: Object,
value: {}
},
// 配置url
activeUrl: {
type: String,
value: ''
},
// actNum: {
// type: Number,
// value: -1,
// observer(n) {
// this.getInfo()
// if (n == 3) {
// this.setVideoCtx()
// }
// this.getImgHeight()
// }
// },
// // 选中的产品
// activeNavIdx: {
// type: Number,
// value: 0
// },
// cardInfo: {
// type: Object,
// value: {}
// },
// // 配置url
// activeUrl: {
// type: String,
// value: ''
// },
detailType: {
type: String,
value: 'pro'
},
proDetail: {
type: Object,
value: {}
}
},
......@@ -47,7 +51,7 @@ Component({
data: {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
videoBaseUrl: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/',
productData: productData1,
// productData: productData1,
proInfo: {},
prodItemVideo: '', //选中的场景下的video的第一个
tabAct: 0,
......@@ -79,26 +83,26 @@ Component({
let { attr } = e.currentTarget.dataset
this.data[attr] && this.data[attr].pause()
},
getInfo() {
let { activeNavIdx, actNum } = this.data
const spcList = [99] // 订阅模块需要特殊处理
const senceList = productData1[actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) {
let item = senceList[i]
let proIdList = item?.productList.map(k => k.id)
if (proIdList.includes(activeNavIdx)) {
let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({
proInfo,
// productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : item.productImgs,
productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : (proInfo.productImgs ? proInfo.productImgs : item.productImgs),
tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList,
prodItemVideo: item.videoList.length ? spcList.includes(actNum) ?item.videoList[proInfo.currentIndex] : item.videoList[activeNavIdx] : item.noVideoPicture[0]
})
break
}
}
},
// getInfo() {
// let { activeNavIdx, actNum } = this.data
// const spcList = [99] // 订阅模块需要特殊处理
// const senceList = productData1[actNum].filter(item => item.name != '全部')
// for (let i = 0; i < senceList.length; i++) {
// let item = senceList[i]
// let proIdList = item?.productList.map(k => k.id)
// if (proIdList.includes(activeNavIdx)) {
// let proInfo = item.productList.find(k => k.id == activeNavIdx)
// this.setData({
// proInfo,
// // productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : item.productImgs,
// productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : (proInfo.productImgs ? proInfo.productImgs : item.productImgs),
// tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList,
// prodItemVideo: item.videoList.length ? spcList.includes(actNum) ?item.videoList[proInfo.currentIndex] : item.videoList[activeNavIdx] : item.noVideoPicture[0]
// })
// break
// }
// }
// },
getImgHeight() {
let query = wx.createSelectorQuery().in(this)
let heightArr = []
......@@ -122,8 +126,8 @@ Component({
.exec()
},
// 1.3查看活动详情按钮
checkActive() {
let { activeUrl } = this.data
checkActive(e) {
let { activeUrl } = e.url
wx.$router.jumpH5(activeUrl);
},
......@@ -162,11 +166,12 @@ Component({
},
// 长按图片
handleLongPress(e) {
let { actnum, index } = e.target.dataset
// 膨胀金活动,合作方式
if (actnum == 99 && index == 4) {
console.log(e);
let {item} = e.currentTarget.dataset
// 如果图片有长按事件
if (item.clickEvent == 1) {
wx.downloadFile({
url: 'https://scrm.glsx.com.cn/frontpdf/expand_agreement.pdf',
url: item.linkUrl,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
......@@ -177,6 +182,29 @@ Component({
}
})
}
}
// 膨胀金活动,合作方式
// if (actnum == 99 && index == 4) {
// wx.downloadFile({
// url: 'https://scrm.glsx.com.cn/frontpdf/expand_agreement.pdf',
// success: function (res) {
// const filePath = res.tempFilePath
// wx.openDocument({
// filePath: filePath,
// success: function (res) {
// }
// })
// }
// })
// }
},
// 点击拨打电话
phoneCall(e) {
console.log(e);
let { phone } = e.currentTarget.dataset;
// wx.$api.phoneCall(phone);
wx.makePhoneCall({
phoneNumber: phone,
});
},
}
})
<!-- packagesList/pages/productDetail/components/proDetail/proDetail.wxml -->
<view class="view-prod custom-class">
<view class="pro-head">
<view class="select-card" wx:if="{{detailType == 'pro'}}" bindtap="selectCard">
<glsx-image custom-class="icon-card" src="home/icon-card.png"></glsx-image>
<view>{{showCard ? '视频' : '名片'}}</view>
</view>
<!-- 有视频 -->
<view class="select-card" wx:if="{{detailType == 'pro'}}" bindtap="selectCard">
<glsx-image custom-class="icon-card" src="home/icon-card.png"></glsx-image>
<view>{{showCard ? '视频' : '名片'}}</view>
</view>
<block wx:if="{{!showCard}}">
<!-- <video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" /> -->
<video class="frame" id="video" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx"/>
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<!-- <video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" /> -->
<!-- 产品详情是视频 -->
<video class="frame" id="video" wx:if="{{proDetail.mainType == 'video'}}" src="{{proDetail.mainImg}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx" />
<!-- 产品详情是图片 -->
<image class="no-video" wx:if="{{proDetail.mainType == 'image'}}" src="{{proDetail.mainImg}}?v={{img_version}}" />
<!-- 标题+视频时展示观看人数 -->
<view class="title-wrap">
<view class="title">{{prodItemVideo.name}}</view>
<image class="check" wx:if="{{actNum != 2}}" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num" wx:if="{{actNum != 2}}">{{prodItemVideo.view}}</view>
<view class="title">{{proDetail.contentTitle}}</view>
<image class="check" wx:if="{{proDetail.mainType != 'image'}}" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num" wx:if="{{proDetail.mainType != 'image'}}">{{proDetail.view}}</view>
</view>
</block>
<user-info wx:if="{{detailType == 'pro' && showCard}}" class="card-info" cardInfo="{{cardInfo}}"></user-info>
</view>
<!-- tab菜单 -->
<view class="tab-wrap">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab wx:for="{{tabList}}" title="{{item}}" wx:key="idnex" />
<van-tab wx:for="{{proDetail.contentDetail}}" title="{{item.detailTypeName}}" wx:key="idnex" />
<!-- <van-tab title="合作案例" />
<van-tab title="合作方式" />
<van-tab title="适配产品" /> -->
</van-tabs>
</view>
<!-- 详情介绍 -->
<view class="prod-detail">
<block wx:for="{{productImgs}}" wx:key="index">
<block wx:for="{{proDetail.contentDetail}}" wx:key="index">
<!-- <image webp wx:if="{{ index < 3}}" mode="widthFix" class="img-items" webp src="{{item.url?item.url:item}}?v={{img_version}}"> -->
<image webp wx:if="{{ index < 3}}" mode="widthFix" class="img-items" src="{{item.url?item.url:item}}?v={{img_version}}">
<image webp mode="widthFix" class="img-items" src="{{item.detailImg?item.detailImg:item}}?v={{img_version}}" bindlongpress="handleLongPress" data-item="{{item}}">
<!-- 第一张图的点击拨打电话事件 -->
<block wx:if="{{ index == 0}}">
<!-- && phone -->
<view class="phone" bindtap="phoneCall" data-phone="{{phone}}">
<!-- <image src="{{IMGURL}}share-phone.png?v={{img_version}}" class="icon"></image> -->
<!-- <glsx-image webp src="index/phone.png" class="icon" />
请联系我 -->
<view style="color:#3666fe">{{sharephone}}</view>
<view class="phone" bindtap="phoneCall" data-phone="{{proDetail.telphoneNumber}}">
<image src="{{IMGURL}}share-phone.png?v={{img_version}}" class="icon"></image>
<glsx-image webp src="index/phone.png" class="icon" />
请联系我
<view style="color:#3666fe">{{proDetail.telphoneNumber}}</view>
</view>
</block>
<!-- 查看活动那个详情 1.3才有 -->
<!-- <block wx:if="{{ index == 1 && actNum == 3 && activeUrl}}"> -->
<block wx:if="{{ index == 0 && actNum == 3 && activeUrl}}">
<view class="check-act" bindtap="checkActive">点击查看活动页面</view>
<!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> -->
<!-- 如果有活动跳转 -->
<!-- 按钮点击事件 buttonClickEvent:0-无,1-有 -->
<block wx:if="{{ item.buttonClickEvent == 1 }}">
<view class="check-act" bindtap="checkActive" data-url="{{item.buttonLinkUrl}}">{{item.buttonName}}</view>
</block>
<!-- 获取更多详情 -->
<block wx:if="{{ index == 2 && showLeftFlag}}">
<!-- <block wx:if="{{ index == 2 && showLeftFlag}}">
<button class="more-btn" data-index="{{index}}" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情
</button>
</block> -->
<!-- 如果有视频 -->
<block wx:if="{{ item.detailVideo }}">
<video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{item.detailVideo}}" />
</block>
</image>
<!-- <image webp wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}" bindlongpress="handleLongPress" data-actnum="{{actNum}}" data-index="{{index}}" /> -->
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-items {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}" bindlongpress="handleLongPress" data-actnum="{{actNum}}" data-index="{{index}}">
<!-- 众筹-视频 -->
<!-- <image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-items {{item.className?item.className:''}}" src="{{item.detailImg?item.detailImg:item}}?v={{img_version}}" bindlongpress="handleLongPress" data-actnum="{{actNum}}" data-index="{{index}}">
<block wx:if="{{ index == 3 && actNum == 3 }}">
<!-- <video class="crowd-video" src="{{videoBaseUrl}}video/crowd-detail.mp4" /> -->
<video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{videoBaseUrl}}video/crowd-detail.mp4" />
<video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{detailVideo}}" />
</block>
</image>
</image> -->
</block>
<view class="occupancy" wx:if="{{!isShare}}">
<!-- padding底部 占位元素 -->
</view>
</view>
</view>
<!-- 申请按钮 不是分享出去的显示按钮 -->
<!-- <apply-button wx:if="{{!isShare}}" downShow="{{false}}"></apply-button> -->
<!-- 授权昵称 -->
<!-- <view wx:if="{{authNcknameShow}}" class="user-profile" bindtap="getUserProfile"></view> -->
\ No newline at end of file
</view>
\ No newline at end of file
// packagesList/pages/productDetail/productDetail.js
import {
behavior as computedBehavior
} from '~/utils/lib/miniprogram-computed'
import {
IMG_URL
} from "~/utils/constantData.js";
import {
senceData,
productData
} from "~/pages/tab/index/constant/senceData"
import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed";
import { IMG_URL } from "~/utils/constantData.js";
// import {
// senceData,
// productData
// } from "~/pages/tab/index/constant/senceData"
// import USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util'
import {entmicroApi} from "~/api/api"
import {trackData} from '../../../utils/data'
import utils from "~/utils/util";
import { entmicroApi, commonApi } from "~/api/api";
import { trackData } from "../../../utils/data";
Page({
/**
* 页面的初始数据
*/
......@@ -22,8 +17,8 @@ Page({
behaviors: [computedBehavior],
data: {
IMG_URL,
senceData,
productData,
// senceData,
productData: {},
proInfo: {},
isShare: false, //是否是分享出去的
actNum: -1,
......@@ -31,39 +26,47 @@ Page({
tabAct: 0,
showLeft: false, //更多按钮显示的内容
scrollTop: 0,
img_version: '0.1.0',
img_version: "0.1.0",
// 是否授权昵称
hasUserInfo: false,
prodItemVideo: '', //选中的场景下的video的第一个
activeUrl: '', // 1.3场景才有的活动配置
sharephone: '', //主要微信用户,服务商
prodItemVideo: "", //选中的场景下的video的第一个
activeUrl: "", // 1.3场景才有的活动配置
sharephone: "", //主要微信用户,服务商
cardInfo: {},
hasPhoneNumber: false, // 是否有授权手机号码
pageName: '',
proName: '',
pageName: "",
proName: "",
trackList: [
[trackData.EQUITYCARD],
[trackData.SOLARFILM],
[trackData.PAINTPROTECT, trackData.CHANGEFILM],
[trackData.CARBEAUTY, trackData.SEATVENTILATE, trackData.ARNAVIGATION, trackData.LIGHT, trackData.NAVIGATIONARROUND, trackData.LOSSPGASE],
[trackData.EXPANGOLD]
[
trackData.CARBEAUTY,
trackData.SEATVENTILATE,
trackData.ARNAVIGATION,
trackData.LIGHT,
trackData.NAVIGATIONARROUND,
trackData.LOSSPGASE,
],
[trackData.EXPANGOLD],
],
systemTrackList: [
trackData.SYSUSER,
trackData.SYSNUMBER,
trackData.SYSCAR,
trackData.EXPANGOLD,
],
systemTrackList: [trackData.SYSUSER, trackData.SYSNUMBER, trackData.SYSCAR,trackData.EXPANGOLD],
isLoadding: true
isLoadding: true,
},
// 计算属性
computed: {
showLeftFlag(data) {
// 1.分享出去
// 2.点击可以改变状态
return data.isShare && !data.showLeft
return data.isShare && !data.showLeft;
},
prodItemVideo(data) {
let {
senceData,
actNum,
activeNavIdx
} = data
let { senceData, actNum, activeNavIdx } = data;
// if(actNum == 2){
// return senceData[actNum]?.noVideoPicture[0]
// }
......@@ -71,203 +74,215 @@ Page({
},
// 授权昵称弹框显示
authNcknameShow(data) {
return data.isShare && !data.hasUserInfo
}
return data.isShare && !data.hasUserInfo;
},
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let {
actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName
} = options
async onRoute(options) {
// if (!options || utils.isEmptyObj(options)) return
// let {
// actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName
// } = options
// this.setData({
// actNum, //选中的场景下标
// activeNavIdx, //选中的产品
// sharephone: phone, //联系电话 (登陆的用户)
// hasPhoneNumber:hasPhoneNumber,
// pageName: name,
// proName
// })
// if (name == '营销增值服务') {
// wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx])
// } else if (name == '客户数字化') {
// wx.$Track.sendTrack(this.data.systemTrackList[activeNavIdx])
// }
// setTimeout(() => {
// utils.setNavigationBarTitle(proName)
// this.setData({
// isLoadding: false
// })
// },100)
if (!options || utils.isEmptyObj(options)) return;
let proData = await this.getProductDetail();
console.log(proData, "proData");
let { hasPhoneNumber } = options;
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
sharephone: phone, //联系电话 (登陆的用户)
hasPhoneNumber:hasPhoneNumber,
pageName: name,
proName
})
if (name == '营销增值服务') {
wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx])
} else if (name == '客户数字化') {
wx.$Track.sendTrack(this.data.systemTrackList[activeNavIdx])
}
hasPhoneNumber,
productData: proData,
});
setTimeout(() => {
utils.setNavigationBarTitle(proName)
utils.setNavigationBarTitle(proData.proTitle);
this.setData({
isLoadding: false
})
},100)
isLoadding: false,
});
}, 100);
},
// 获取产品详情
getProductDetail() {
return new Promise((resolve) => {
let _data;
commonApi.getProductDetail().then((res) => {
console.log(res);
_data = res.data;
resolve(_data);
});
});
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
let proDetail = this.selectComponent("#pro-detail")
proDetail.pageSroll(e)
let proDetail = this.selectComponent("#pro-detail");
proDetail.pageSroll(e);
}, 100);
};
})(),
//获取配置url
async getActiveApiFn(){
let {code,data} = await entmicroApi.getActiveApi()
if(code == 0){
this.setData({
activeUrl: data
})
}
},
//获取配置url
// async getActiveApiFn(){
// let {code,data} = await entmicroApi.getActiveApi()
// if(code == 0){
// this.setData({
// activeUrl: data
// })
// }
// },
// 是否已经查看详情
isgetAuthphone(){
isgetAuthphone() {
let authphone = wx.$storage.get("authphone");
// if(authphone){
// // 显示后面的内容
// setTimeout(() => {
// this.getImgHeight()
// },300)
// this.setData({
// showLeft: true
// })
// //触发浏览埋点
// // this.onLoad(null)
// }
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getActiveApiFn()
async onLoad(options) {
console.log(options, 'options');
// this.getActiveApiFn()
if (options && options.cardId) {
wx.$trackData = options
wx.$trackData = options;
// wx.$trackData.cardId = options.cardId
wx.$storage.set('scene', options)
const {name, actNum, activeNavIdx, proName} = options
wx.$storage.set("scene", options);
const { proId } = options;
let proData = await this.getProductDetail();
this.setData({
actNum: options.actNum,
activeNavIdx: options.activeNavIdx,
pageName: name,
proName
})
productData: proData,
});
getApp()
.login()
.then(({ data }) => {
this.setData({
isLoadding: false
})
if (data && data.phone) {
.login()
.then(({ data }) => {
this.setData({
hasPhoneNumber: true
})
}
})
this.getCardDetail()
if (name == '营销增值服务') {
wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx])
} else if (name == '客户数字化') {
wx.$Track.sendTrack(this.data.systemTrackList[activeNavIdx])
}
isLoadding: false,
});
if (data && data.phone) {
this.setData({
hasPhoneNumber: true,
});
}
});
this.getCardDetail();
// if (name == "营销增值服务") {
// wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx]);
// } else if (name == "客户数字化") {
// wx.$Track.sendTrack(this.data.systemTrackList[activeNavIdx]);
// }
setTimeout(() => {
utils.setNavigationBarTitle(proName)
},100)
utils.setNavigationBarTitle(proData.proTitle);
}, 100);
} else {
this.getCardDetail()
this.getCardDetail();
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
const cardId = wx.$storage.get('scene').cardId
const cardId = wx.$storage.get("scene").cardId;
// merchantId 兼容旧链接
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_PRO'
const {actNum, activeNavIdx, pageName, proName} = this.data
const merchant =
wx.$storage.get("scene").merchant || wx.$storage.get("scene").merchantId;
const shareType = "SHARE_PRO";
// const {actNum, activeNavIdx, pageName, proName} = this.data
const { proId } = this.data.productData;
return {
title: `给你分享一个活动,戳我参与~`,
path: `packagesList/pages/productDetail/productDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&name=${pageName}&proName=${proName}`
}
// path: `packagesList/pages/productDetail/productDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&name=${pageName}&proName=${proName}`
path: `packagesList/pages/productDetail/productDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&proId=${proId}`,
};
},
// 更新手机号码
updatePhoneNumber(e) {
this.setData({
hasPhoneNumber: e.detail ? true : false
})
hasPhoneNumber: e.detail ? true : false,
});
},
// 获取员工名片信息
getCardDetail() {
const scene = wx.$storage.get('scene')
const scene = wx.$storage.get("scene");
let params = {
cardId: scene.cardId
}
cardId: scene.cardId,
};
entmicroApi.getCardDetail(params).then(({ data, code, message }) => {
if (code == -1) {
wx.showToast({
title: message,
icon: 'none',
duration: 2000
})
icon: "none",
duration: 2000,
});
}
const cardInfo = data || this.data.defaultInfo
this.setData(
{
cardInfo
}
)
})
}
})
\ No newline at end of file
const cardInfo = data || this.data.defaultInfo;
this.setData({
cardInfo,
});
});
},
});
<!--packagesList/pages/productDetail/productDetail.wxml-->
<loadding wx:if="{{isLoadding}}"></loadding>
<view wx:if="{{!isLoadding}}">
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}" currentIndex="{{currentIndex}}"></pro-detail>
<!-- <pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}" currentIndex="{{currentIndex}}"></pro-detail> -->
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" cardInfo="{{cardInfo}}" proDetail="{{productData}}"></pro-detail>
<pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number>
</view>
\ No newline at end of file
// packagesList/pages/videoDetal/videoDetal.js
import {trackData} from '../../../utils/data'
import {productData} from '../../../pages/tab/index/constant/senceData'
import {subscriptionSystemData} from '../../../pages/tab/index/constant/systemData'
// import {productData} from '../../../pages/tab/index/constant/senceData'
// import {subscriptionSystemData} from '../../../pages/tab/index/constant/systemData'
import utils from '~/utils/util'
Page({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!