Commit 6e73d50c by 张立顺

订阅模块 搬运

1 parent 27be333c
{
"pages": [
"login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/mine/mine",
"pages/webView/webView",
"login/index/index",
"login/accountItems/accountItems",
"pages/viewVideo/index",
"pages/viewProd/index",
"pages/viewProdBanner/index",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"packagesList/activityDetail/activityDetail"
],
"requiredPrivateInfos": [
"getLocation"
],
"pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "pages/webView/webView", "login/index/index", "login/accountItems/accountItems", "pages/viewVideo/index", "pages/viewProd/index", "pages/viewProdBanner/index", "pages/measure/measure/measure", "pages/measure/measureResult/measureResult", "packagesList/activityDetail/activityDetail"],
"requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
......@@ -51,50 +35,39 @@
},
"subpackages": [
{
"root": "packagesList/pages",
"name": "packagesList",
"pages": ["videoDetal/videoDetal", "productDetail/productDetail", "scenarioDetail/scenarioDetail"]
},
{
"root": "packagesList/packageOutput",
"name": "packageOutput",
"pages": [
"pages/openBusiness",
"pages/summary"
]
"pages": ["pages/openBusiness", "pages/summary"]
},
{
"root": "packagesList/mineDetail",
"name": "mineDetail",
"pages": [
"pages/messageBox",
"pages/customerManagement",
"pages/clue"
]
"pages": ["pages/messageBox", "pages/customerManagement", "pages/clue"]
},
{
"root": "packagesList/apply",
"name": "apply",
"pages": [
"pages/apply"
]
"pages": ["pages/apply"]
},
{
"root": "packagesList/applyProd",
"name": "applyProd",
"pages": [
"pages/apply"
]
"pages": ["pages/apply"]
}
],
"preloadRule": {
"pages/tab/mine/mine": {
"network": "all",
"packages": [
"mineDetail"
]
"packages": ["mineDetail"]
},
"pages/tab/index/index": {
"network": "all",
"packages": [
"apply",
"packageOutput"
]
"packages": ["apply", "packageOutput"]
}
},
"usingComponents": {
......@@ -114,4 +87,4 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
}
}
\ No newline at end of file
}
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-09 13:58:15
* @LastEditors: huyue
* @LastEditTime: 2022-12-13 10:36:15
*/
// components/Login/Login.js
import { ssoApi } from "../../api/api";
import { componentsMixin } from "../../mixins/index";
Component({
externalClasses: ['custom-class'],
behaviors: [componentsMixin],
// options: {
// styleIsolation: 'isolated'
// },
/**
* 组件的属性列表
*/
properties: {
phoneText: {
type: String,
value: '了解更多案例'
},
/**
* type: 场景类型: home.首页,整行;product.详情中的查看更多和申请合作切换;scenario场景详情:转发+合作申请;video 视频详情
*/
type: {
type: String
},
hasPhoneNumber: {
type: Boolean,
observer(n) {
this.setData({
hasPhone: n
})
}
}
},
/**
* 组件的初始数据
*/
data: {
hasPhone: false
},
/**
* 组件的方法列表
*/
methods: {
// 获取手机号
getPhoneNumber({detail}) {
if ( detail.errMsg && detail.errMsg.indexOf('user deny') !== -1 ) {
wx.hideLoading()
return;
}
wx.$util.showLoading('正在授权...')
delete detail.errMsg;
if (detail.iv && detail.encryptedData) {
ssoApi.authUserPhone(detail).then(({ data, code, message }) => {
wx.hideLoading()
if (code==0) {
wx.$util.setUserInfo(data);
// 其他操作
this.triggerEvent("updatePhoneNumber", data.phone);
this.setData({
hasPhone: true
})
} else {
wx.showToast({
title: message,
icon: 'none',
duration: 2000
})
}
});
}
},
jump() {
// this.triggerEvent('toApplication')
console.log(333);
wx.$router.go("/packagesList/pages/activityApply/activityApply");
},
forward() {
this.triggerEvent('toForward')
},
downVideo() {
let that = this
wx.showModal({
content: '是否下载视频',
success (res) {
if (res.confirm) {
that.triggerEvent('videodown')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.fixBottom {
position: fixed;
display: flex;
bottom: 0;
width: 100%;
box-sizing: border-box;
background-color: #fff;
box-shadow: inset 0 2rpx 0 0 #F2F3F7;
padding: 16rpx 48rpx;
filter: blur(0);
.home-btn {
width: 100%;
}
.video-btn {
display: flex;
flex: 1;
}
.phoneNumber {
width: 100%;
color: #fff;
background-color: #5850FF;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0;
height: 72rpx;
line-height: 72rpx;
}
.forward-box {
width: 136rpx;
padding: 4rpx 44rpx;
height: 88rpx;
text-align: center;
margin-right: 40rpx;
margin-top: -16rpx;
box-shadow: 8rpx 0 16rpx 0 rgba(202,211,230,0.30);
.forward-text {
line-height: 32rpx;
}
.icon-forward {
width: 48rpx;
height: 48rpx;
}
}
button{
margin: 0;
line-height: 88rpx;
}
// 了解更多的样式
.phone-number {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
// margin: 16rpx 48rpx;
color: #fff;
font-size: 28rpx;
letter-spacing: 0.8rpx;
background: #5850FF;
background-image: linear-gradient(180deg, #4791FF 0%, #5850FF 100%, #643DFF 100%);
border-radius: 8rpx;
line-height: 72rpx;
.icon-arrow {
width: 32rpx;
height: 32rpx;
}
.icon-arrow:first-child {
margin-right: 48rpx;
}
.icon-arrow:last-child {
margin-left: 48rpx;
}
}
.video-box {
display: inline-flex;
margin-right: 20rpx;
.btn-item {
width: 100rpx;
text-align: center;
.btn-text {
font-weight: 500;
font-size: 20rpx;
color: #5A6066;
}
}
.icon-forward {
width: 40rpx;
height: 40rpx;
}
.phoneNumber {
}
}
}
// .isFullSucreen {
// width: 100%;
// }
.product_full{
flex:1;
display: flex;
align-items: center;
}
<view class="fixBottom custom-class">
<view wx:if="{{type == 'home'}}" class="isFullSucreen home-btn">
<!-- <view class="isFullSucreen"> -->
<button wx:if="{{hasPhone}}" class="phoneNumber" bindtap="jump">合作申请1</button>
<button wx:else class="phoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">合作申请</button>
<!-- </view> -->
</view>
<view wx:if="{{type == 'product'}}" class="isFullSucreen product_full">
<block wx:if="{{hasPhone}}">
<view class="forward-box">
<image class="icon-forward" webp src="{{IMGURL}}home/icon-forward.png"></image>
<view class="forward-text" bindtap="forward">转发</view>
</view>
<button class="phoneNumber" bindtap="jump">申请合作</button>
</block>
<block wx:else>
<button class="phone-number" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
<image class="icon-arrow" webp src="{{IMGURL}}home/icon-arrow.png"></image>
{{phoneText}}
<image class="icon-arrow" webp src="{{IMGURL}}home/icon-arrow.png"></image>
</button>
</block>
</view>
<view wx:if="{{type == 'scenario'}}" class="isFullSucreen video-btn">
<view class="forward-box">
<image class="icon-forward" webp src="{{IMGURL}}home/icon-forward.png"></image>
<view class="forward-text" bindtap="forward">转发</view>
</view>
<button wx:if="{{hasPhone}}" class="phoneNumber" bindtap="jump">合作申请1</button>
<button wx:else class="phoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">合作申请</button>
</view>
<view wx:if="{{type == 'video'}}" class="isFullSucreen video-btn">
<view class="video-box">
<view class="btn-item">
<image class="icon-forward" webp src="{{IMGURL}}home/icon-download.png"></image>
<view class="btn-text" bindtap="downVideo">下载</view>
</view>
<view class="btn-item">
<image class="icon-forward" webp src="{{IMGURL}}home/icon-forward.png"></image>
<view class="btn-text" bindtap="forward">转发</view>
</view>
</view>
<button wx:if="{{hasPhone}}" class="phoneNumber" bindtap="jump">合作申请1</button>
<button wx:else class="phoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">合作申请</button>
</view>
</view>
// components/UserInfo/UserInfo.js
import { componentsMixin } from "../../mixins/index";
import util from "../../utils/util";
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
cardInfo: {
type: Object,
observer(n) {
this.setData({
cardInfo: n,
});
},
},
shareDisabled: {
type: Boolean,
defalut: true,
observer(n) {
this.setData({
shareDisabled: n
})
}
}
},
/**
* 组件的初始数据
*/
data: {
showWechant: false,
// shareDisabled: true
},
/**
* 组件的方法列表
*/
methods: {
// 添加微信
addWechat() {
this.setData({
showWechant: !this.data.showWechant,
});
},
// 保存名片
addPhone() {
let _this = this,
{ clickCount } = this.data;
const { staffName, staffPhone, operation, address, agentName } =
this.data.cardInfo;
wx.addPhoneContact({
firstName: staffName,
mobilePhoneNumber: staffPhone,
title: operation,
organization: '广联数科',
workAddressCountry: "中国",
workAddressState: "广东省",
workAddressCity: "深圳市",
workAddressStreet: "留仙大道3370号南山智园崇文园区1号楼14层",
fail({ errMsg }) {
if (clickCount)
_this.setData({
showAuth: errMsg == "addPhoneContact:fail auth deny",
});
else
_this.setData({
clickCount: 1,
});
},
});
},
/**授权通讯录成功 */
authSuccess() {
this.setData({
flag: true,
unauthorized: false,
});
this.addPhone();
},
/**授权失败 */
authFail() {
this.setData({
unauthorized: true,
flag: true,
});
},
/** 拨打电话 */
callPhone() {
const { staffPhone } = this.data.cardInfo;
if (!staffPhone) {
util.showToast("手机号不存在");
return;
}
wx.makePhoneCall({
phoneNumber: staffPhone,
});
},
shareClick() {
if (this.data.shareDisabled) {
wx.showToast({
title: '正在生成名片缩略图,请稍后分享',
icon: 'none',
duration: 2000
})
}
}
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="user-wrapper">
<view class="user-box">
<view class="user-info" data-item="{{cardInfo}}">
<block wx:if="{{!showWechant}}">
<view class="user-company">
<image class="company-logo" webp src="{{IMGURL}}home/logo.png?v={{img_version}}"></image>
</view>
<view class="user-name">
<view class="name">{{cardInfo.staffName || ''}}</view>
<view class="position">{{cardInfo.operation || ''}}</view>
</view>
<view class="user-phone">
<image class="user-icon" webp src="{{IMGURL}}share/icon-phone.png?v={{img_version}}"></image>
<view>{{cardInfo.staffPhone || ''}}</view>
</view>
<view class="user-address">
<image class="user-icon" webp src="{{IMGURL}}share/icon-address.png?v={{img_version}}"></image>
<view class="address">深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层</view>
</view>
<image class="user-avatar" src="{{cardInfo.image}}" lazy-load></image>
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/add-wechat.png?v={{img_version}}"></image>
</block>
<view class="scrm" wx:else>
<image class="srcm-img" show-menu-by-longpress src="{{cardInfo.qrCode}}" lazy-load></image>
<view class="scrm-text">长按识别二维码,免费体验嘀加SCRM</view>
<image bindtap="addWechat" class="add-wechat" webp src="{{IMGURL}}home/back-user.png?v={{img_version}}"></image>
</view>
</view>
<image class="user-bg" webp src="{{IMGURL}}home/user-bg.png?v={{img_version}}" />
</view>
<view class="btn-group">
<view class="phone-btn" bindtap="callPhone">
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png?v={{img_version}}"></image>
<view class="phone-text">拨打电话</view>
</view>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button wx:if="{{shareDisabled}}" class="btn-primary btn" bindtap="shareClick">分享名片</button>
<button wx:else class="btn-primary btn" open-type="share">分享名片</button>
</view>
</view>
<authorize buttonType="openSetting" show="{{showAuth}}" isShowCheck="{{false}}"></authorize>
\ No newline at end of file
.user-wrapper {
padding: 24rpx 32rpx;
background-color: #fff;
z-index: -1;
margin-bottom: 20rpx;
}
.user-info {
height: 416rpx;
padding: 40rpx 52rpx;
border-radius: 16rpx;
box-sizing: border-box;
}
.user-box {
position: relative;
z-index: 1;
border-radius: 16rpx;
box-shadow: 0 12rpx 32rpx 0 rgba(147, 160, 194, .35);
}
.user-bg {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 416rpx;
z-index: -1;
border-radius: 16rpx;
}
.user-company {
display: flex;
align-items: center;
}
.company-logo{
width: 296rpx;
height: 60rpx;
}
.user-company text {
font-size: 18rpx;
line-height: 24rpx;
color: #2d2d33;
margin-left: 16rpx;
}
.user-name {
display: flex;
align-items: baseline;
margin-top: 24rpx;
}
.user-name .name {
font-size: 44rpx;
font-weight: 700;
color: #111111;
line-height: 72rpx;
}
.user-name .position {
font-weight: 400;
font-size: 26rpx;
color: #6E6E7A;
margin-left: 20rpx;
}
.user-phone {
display: flex;
align-items: center;
font-size: 24rpx;
color: #2D2D33;
line-height: 32rpx;
margin-top: 76rpx;
}
.user-icon {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.user-address {
display: flex;
align-items: baseline;
font-size: 24rpx;
color: #2D2D33;
line-height: 32rpx;
margin-top: 16rpx;
}
.user-address .address {
width: 438rpx;
}
.user-avatar {
position: absolute;
width: 128rpx;
height: 128rpx;
border-radius: 8rpx;
top: 48rpx;
right: 36rpx;
}
.add-wechat {
position: absolute;
bottom: 0;
right: 0;
width: 112rpx;
height: 120rpx;
}
.scrm {
text-align: center;
z-index: 1;
}
.srcm-img {
margin-top: 44rpx;
width: 192rpx;
height: 192rpx;
}
.scrm-text {
margin-top: 32rpx;
font-size: 28rpx;
color: #2d2d33;
}
.btn-group {
margin-top: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.phone-btn {
width: 136rpx;
/* height: 88rpx; */
box-sizing: border-box;
text-align: center;
padding: 4rpx 32rpx 4rpx 24rpx;
background: #FFFFFF;
box-shadow: 8rpx 0 16rpx 0 rgba(202,211,230,0.30);
}
.icon-dial {
width: 48rpx;
height: 48rpx;
}
.phone-text {
font-size: 20rpx;
color: #6E6E7A;
}
button::after {
display: none;
}
.btn {
display: inline-flex;
align-items: center;
padding: 12rpx 56rpx;
font-size: 32rpx;
line-height: 48rpx;
border-radius: 8rpx;
float: right;
margin: 0;
height: 48rpx;
box-sizing: content-box;
}
.btn-plain {
color: #5850ff;
border: 2rpx solid #9B96FF;
background-color: #fff;
/* margin-left: 46rpx; */
}
.btn-primary {
color: #FFFFFF;
background: #5850FF;
/* margin-left: 24rpx; */
}
\ No newline at end of file
// packagesList/pages/productDetail/components/proDetail/proDetail.js
import { senceData, productData } from '~/pages/tab/index/constant/senceData'
const norTabList = ['项目亮点', '合作案例', '合作方式', '适配产品']
Component({
externalClasses: ['custom-class'],
/**
* 组件的属性列表
*/
properties: {
// 场景值下标
actNum: {
type: Number,
value: -1,
observer(n) {
this.getInfo()
this.getImgHeight()
}
},
// 选中的产品
activeNavIdx: {
type: Number,
value: 0
},
// tab
tabList: {
type: Array,
value: [{ title: '项目亮点' }, { title: '合作案例' }, { title: '合作方式' }, { title: '适配产品' }]
},
cardInfo: {
type: Object,
value: {}
},
// 配置url
activeUrl: {
type: String,
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
productData,
proInfo: {},
prodItemVideo: '', //选中的场景下的video的第一个
tabAct: 0,
scrollTop: 0,
showCard: false,
tabList: []
},
/**
* 组件的方法列表
*/
methods: {
getInfo() {
let { activeNavIdx, actNum } = this.data
//console.log(actNum)
//console.log(activeNavIdx)
const spcList = [99] // 订阅模块需要特殊处理
console.log(productData, 'productData')
const senceList = productData[actNum].filter(item => item.name != '全部')
console.log(senceList)
for (let i = 0; i < senceList.length; i++) {
let item = senceList[i]
let proIdList = item?.productList.map(k => k.id)
if (proIdList.includes(activeNavIdx)) {
//console.log(item, 'item----')
//console.log(item.productList.find(k => k.id == activeNavIdx))
let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({
proInfo,
productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : item.productImgs,
tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList,
prodItemVideo: item.videoList.length ? item.videoList[activeNavIdx] : item.noVideoPicture[0]
})
// console.log(this.data.prodItemVideo, 'prodItemVideo--------')
break
}
}
},
getImgHeight() {
let query = wx.createSelectorQuery().in(this)
let heightArr = []
let imgTopArr = []
let s = 0
let top
let { scrollTop } = this.data
let _this = this
query
.selectAll('.img-item')
.boundingClientRect(react => {
react.forEach((item, index) => {
//44 tab的高度
// console.log('item',item)
s = item.top - 44 + scrollTop
imgTopArr.push(s)
})
_this.setData({
imgTopArr
})
})
.exec()
// setTimeout(() => {
// console.log('imgTopArr',this.data.imgTopArr)
// },500)
},
onClickTab(event) {
// console.log('event: ', event);
let { index } = event.detail
// console.log('index: ', index);
this.setData({
tabAct: index
})
let { imgTopArr } = this.data
wx.pageScrollTo({
scrollTop: imgTopArr[index] + 5
})
},
pageSroll(e) {
let { imgTopArr } = this.data
wx.nextTick(() => {
let idx
if (imgTopArr[0] > e.scrollTop) {
idx = 0
} else if (imgTopArr[imgTopArr.length - 1] > e.scrollTop && imgTopArr[0] < e.scrollTop) {
idx = imgTopArr.findIndex(item => item > e.scrollTop) - 1
} else {
idx = imgTopArr.length - 1
}
this.setData({
tabAct: idx,
scrollTop: e.scrollTop
})
})
},
selectCard() {
//console.log(this.data.showCard)
this.setData({
showCard: !this.data.showCard
})
}
}
})
{
"component": true,
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"user-info": "../UserInfo/UserInfo"
}
}
\ No newline at end of file
/* packagesList/pages/productDetail/components/proDetail/proDetail.wxss */
page {
background-color: #fff;
}
.view-prod {
.frame {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 422rpx;
border-radius: 16rpx;
box-sizing: border-box;
}
.title-wrap {
margin-bottom: 32rpx;
margin-left: 32rpx;
margin-right: 32rpx;
display: flex;
height: 104rpx;
align-items: center;
.title {
width: 564rpx;
height: 48rpx;
font-weight: 500;
font-size: 32rpx;
color: #323436;
// line-height: 48rpx;
}
.check {
margin-left: 30rpx;
margin-right: 6rpx;
width: 28rpx;
height: 28rpx;
}
.num {
font-size: 24rpx;
color: #5a6066;
}
}
.no-video {
margin: 16rpx auto 32rpx;
display: block;
width: 686rpx;
height: 386rpx;
border-radius: 16rpx;
}
.tab-wrap {
position: sticky;
top: 0;
margin-bottom: 20rpx;
z-index: 1;
.tabs-index--van-tabs {
top: -1px
}
.van-tab {
font-size: 28rpx;
color: #5a6066;
}
.van-tab--active {
font-weight: 600;
font-size: 28rpx;
color: #3666fe;
}
frame .van-tabs__line {
width: 112rpx !important;
height: 4rpx !important;
}
}
.prod-detail {
.occupancy {
height: 120rpx;
}
.img-item {
position: relative;
}
.phone {
position: absolute;
top: 60rpx;
right: 32rpx;
font-weight: 400;
font-size: 24rpx;
color: #6C6C6C;
display: flex;
align-items: center;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 6rpx;
}
}
.check-act {
position: absolute;
bottom: 94rpx;
right: 60rpx;
font-size: 24rpx;
color: #3666FE;
text-decoration: underline;
}
.more-btn {
position: absolute;
left: 50%;
bottom: 50px;
transform: translateX(-50%);
width: 622rpx;
height: 96rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/btn.png");
background-size: 100% 100%;
font-weight: 500;
font-size: 16px;
color: #ffffff;
text-align: center;
line-height: 96rpx;
}
// .img-item0 {
// width: 100%;
// height: 2564rpx;
// }
// .img-item1 {
// width: 100%;
// height: 1812rpx;
// }
// .img-item2 {
// width: 100%;
// height: 620rpx;
// }
// .img-item3 {
// width: 100%;
// height: 2156rpx;
// }
// 流程图一
.img-item00 {
width: 100%;
height: 3308rpx;
}
.img-item01 {
width: 100%;
height: 2598rpx;
}
.img-item02 {
width: 100%;
height: 490rpx;
}
.img-item03 {
width: 100%;
height: 688rpx;
}
// // 流程图二
.img-item10 {
width: 100%;
height: 1488rpx;
}
.img-item11 {
width: 100%;
height: 2192rpx;
}
.img-item12 {
width: 100%;
height: 490rpx;
}
.img-item13 {
width: 100%;
height: 688rpx;
}
// // 流程图三
.img-item20 {
width: 100%;
height: 1488rpx;
}
.img-item21 {
width: 100%;
height: 570rpx;
}
.img-item22 {
width: 100%;
height: 490rpx;
}
.img-item23 {
width: 100%;
height: 864rpx;
}
// // 流程图四
.img-item30 {
width: 100%;
height: 5758rpx;
}
.img-item31 {
width: 100%;
height: 1812rpx;
}
.img-item32 {
width: 100%;
height: 490rpx;
}
.img-item46 {
width: 100%;
height: 1684rpx;
}
.img-item47 {
width: 100%;
height: 3688rpx;
}
// .img-item48 {
// width: 100%;
// height: 4004rpx;
// }
.img-item48 {
width: 100%;
height: 472rpx;
}
.img-item49 {
width: 100%;
height: 4594rpx;
}
.img-item50 {
width: 100%;
height: 1650rpx;
}
.img-item51 {
width: 100%;
height: 552rpx;
}
.img-item52 {
width: 100%;
height: 3534rpx;
}
.img-item53 {
width: 100%;
height: 1130rpx;
}
.img-item54 {
width: 100%;
height: 428rpx;
}
}
}
/* 用户授权 */
.user-profile {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
background-color: transparent;
}
.pro-head {
position: relative;
.select-card {
position: absolute;
right: 0;
top: 26rpx;
width: 142rpx;
height: 68rpx;
background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 rgba(175, 175, 219, 0.65);
border-radius: 34rpx 0 0 34rpx;
z-index: 2;
display: flex;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
font-weight: 600;
font-size: 26rpx;
color: #57578A;
.icon-card {
width: 48rpx;
height: 48rpx;
margin-right: 8rpx;
}
}
}
\ No newline at end of file
<!-- packagesList/pages/productDetail/components/proDetail/proDetail.wxml -->
<view class="view-prod custom-class">
<view class="pro-head">
<!-- 有视频 -->
<video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" />
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?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>
</view>
<view class="tab-wrap">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab wx:for="{{tabList}}" title="{{item}}" 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">
<image webp wx:if="{{ index < 3}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}">
<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>
</block>
<!-- 查看活动那个详情 1.3才有 -->
<block wx:if="{{ index == 1 && actNum == 3 && activeUrl}}">
<view class="check-act" bindtap="checkActive">点击查看活动页面</view>
<!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> -->
</block>
<!-- 获取更多详情 -->
<block wx:if="{{ index == 2 && showLeftFlag}}">
<button class="more-btn" data-index="{{index}}" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情
</button>
</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}}" />
</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
......@@ -10,9 +10,9 @@
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
},
"glsx-applet-component": {
"version": "1.0.26",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.26.tgz",
"integrity": "sha512-piMTmDIUq4x7fpE3/GgZI1pIFV6SlmsJdtm/TxBqM5VG4i38+7bXZSkjqvu3xdb2TIXw6FuA4lq6I/QfVVX7LQ=="
"version": "1.0.30",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.0.30.tgz",
"integrity": "sha512-knFullgv2HGJtYZZl809dBIgehzaftLCovDj2SQ+VOsASMNPa22LMzOPLL2n8y4oy5bgS7zMgLEwgUailTAbhw=="
}
}
}
......@@ -5,7 +5,7 @@
"main": "app.js",
"dependencies": {
"@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.0.26"
"glsx-applet-component": "^1.0.30"
},
"devDependencies": {},
"scripts": {
......
......@@ -31,6 +31,7 @@ Page({
getActivityDetail(id) {
getActivityDetailApi({id}).then(res => {
res.beginTime = new Date(res.beginTime).format('yyyy年MM月dd日')
res.endTime = new Date(res.endTime).format('yyyy年MM月dd日')
this.setData({
......
// 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 USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util'
import { getActiveApi } from '~/api/viewprod'
Page({
/**
* 页面的初始数据
*/
noPageAuth: true,
behaviors: [computedBehavior],
data: {
IMG_URL,
senceData,
productData,
proInfo: {},
isShare: false, //是否是分享出去的
actNum: 0,
tabAct: 0,
showLeft: false, //更多按钮显示的内容
scrollTop: 0,
img_version: '0.1.0',
// 是否授权昵称
hasUserInfo: false,
prodItemVideo: '', //选中的场景下的video的第一个
activeUrl: '', // 1.3场景才有的活动配置
sharephone: '', //主要微信用户,服务商
cardInfo: {},
hasPhoneNumber: false // 是否有授权手机号码
},
// 计算属性
computed: {
showLeftFlag(data) {
// 1.分享出去
// 2.点击可以改变状态
return data.isShare && !data.showLeft
},
prodItemVideo(data) {
let { senceData, actNum, activeNavIdx } = data
// if(actNum == 2){
// return senceData[actNum]?.noVideoPicture[0]
// }
// return senceData[actNum]?.videoList[activeNavIdx]
},
// 授权昵称弹框显示
authNcknameShow(data) {
return data.isShare && !data.hasUserInfo
}
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
// console.log( options);
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0, phone, cardInfo } = options
console.log(options)
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
sharephone: phone, //联系电话 (登陆的用户)
cardInfo,
hasPhoneNumber: options.hasPhoneNumber
})
// console.log(this.data.senceData, 'senceData-----')
const senceList = productData[this.data.actNum].filter(item => item.name != '全部')
var proInfo = {}
for (let i = 0; i < senceList.length; i++) {
let proIdList = senceList[i]?.productList.map(k => k.id)
if (proIdList.includes(activeNavIdx)) {
proInfo = senceList[i].productList.find(k => k.id == activeNavIdx)
break
}
}
this.setData({
proInfo
})
// console.log(this.data.proInfo, '---------proInfo')
// 设置转发标题
let userInfoObj = wx.$storage.get('userInfo')
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName
this.shareTitle = `${name}给你分享一个活动${proInfo.productName},戳我参与~`
//分享数据
let item = proInfo
// console.log('title2',item.productName)
setTimeout(() => {
utils.setNavigationBarTitle(item.productName)
}, 100)
//分享人openId
let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
this.shareQuery = `sceneCode=${senceData[actNum].sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${phone}`
this.shareTrackData = {
sceneCode: senceData[actNum]?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId: shareOpenId
}
},
onPageScroll: (function () {
let timer = null
return function (e) {
// console.log(e)
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer)
timer = setTimeout(() => {
let proDetail = this.selectComponent('#pro-detail')
proDetail.pageSroll(e)
}, 100)
}
})(),
//获取配置url
async getActiveApiFn() {
let { code, data } = await getActiveApi()
if (code == 0) {
this.setData({
activeUrl: data
})
}
},
// 是否已经查看详情
isgetAuthphone() {
let authphone = wx.$storage.get('authphone')
if (authphone) {
// 显示后面的内容
setTimeout(() => {
this.getImgHeight()
}, 300)
this.setData({
showLeft: true
})
//触发浏览埋点
// this.onLoad(null)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getActiveApiFn()
// 是否已经查看详情
this.isgetAuthphone()
if (!options || utils.isEmptyObj(options)) return
let { actNum, activeNavIdx, isShare, sharephone } = options
if (isShare) {
wx.hideHomeButton()
}
this.setData({
actNum,
activeNavIdx,
isShare,
sharephone
})
//分享数据
let senceItem = senceData[actNum]
let item = senceData[actNum]?.productList[activeNavIdx]
console.log('title', item.productName)
setTimeout(() => {
// wx.setNavigationBarTitle({
// title: " "+item.productName,
// });
utils.setNavigationBarTitle(item.productName)
}, 100)
let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
// console.log('shareOpenId: ', shareOpenId);
// &shareOpenId=${shareOpenId}
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
this.shareTrackData = {
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId: shareOpenId
// actNum,
// activeNavIdx,
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
// 更新手机号码
updatePhoneNumber(e) {
console.log(e.detail)
this.setData({
hasPhoneNumber: e.detail ? true : false
})
}
})
{
"usingComponents": {
"pro-detail": "../../../components/proDetail/proDetail",
"pro-phone-number": "../../../components/PhoneNumber/PhoneNumber"
}
}
\ No newline at end of file
/* packagesList/pages/productDetail/productDetail.wxss */
.card-info {
position: fixed;
top: 0;
z-index: 0;
width: 100%;
}
.max_page_height {
height: 100vh;
overflow: hidden;
}
<!--packagesList/pages/productDetail/productDetail.wxml-->
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}"></pro-detail>
<pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number>
\ 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 USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util'
// import {getActiveApi} from "~/api/viewprod"
Page({
/**
* 页面的初始数据
*/
noPageAuth: true,
behaviors: [computedBehavior],
data: {
IMG_URL,
senceData,
productData,
proInfo: {},
isShare:false, //是否是分享出去的
actNum: 0,
tabAct: 0,
showLeft:false, //更多按钮显示的内容
scrollTop:0,
img_version: '0.1.0',
// 是否授权昵称
hasUserInfo: false,
prodItemVideo:'', //选中的场景下的video的第一个
activeUrl:'', // 1.3场景才有的活动配置
sharephone:'' //主要微信用户,服务商
},
// 计算属性
computed: {
showLeftFlag(data) {
// 1.分享出去
// 2.点击可以改变状态
return data.isShare && !data.showLeft
},
prodItemVideo(data) {
let {senceData, actNum, activeNavIdx} = data
// if(actNum == 2){
// return senceData[actNum]?.noVideoPicture[0]
// }
// return senceData[actNum]?.videoList[activeNavIdx]
},
// 授权昵称弹框显示
authNcknameShow(data){
return data.isShare && !data.hasUserInfo
}
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0, phone } = options
// wx.$Track.sendTrack()
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
sharephone: phone //联系电话 (登陆的用户)
})
// console.log(this.data.senceData, 'senceData-----')
const senceList = productData[this.data.actNum].filter(item => item.name != '全部')
var proInfo = {}
for(let i = 0; i< senceList.length; i++) {
let proIdList = senceList[i]?.productList.map(k => k.id)
if(proIdList.includes(activeNavIdx)) {
proInfo = senceList[i].productList.find(k => k.id == activeNavIdx)
break
}
}
this.setData({
proInfo
})
// console.log(this.data.proInfo, '---------proInfo')
// 设置转发标题
let userInfoObj = wx.$storage.get("userInfo")
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName
this.shareTitle = `${name}给你分享一个活动${proInfo.productName},戳我参与~`
//分享数据
let item = proInfo
// console.log('title2',item.productName)
setTimeout(() => {
utils.setNavigationBarTitle(item.productName)
},100)
//分享人openId
let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
this.shareQuery = `sceneCode=${senceData[actNum].sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${phone}`
this.shareTrackData = {
sceneCode: senceData[actNum]?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId:shareOpenId
}
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log(e)
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
let proDetail = this.selectComponent("#pro-detail")
proDetail.pageSroll(e)
}, 100);
};
})(),
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"pro-detail": "../../../components/proDetail/proDetail"
}
}
\ No newline at end of file
/* packagesList/pages/scenarioDetail/scenarioDetail.wxss */
\ No newline at end of file
<!--packagesList/pages/scenarioDetail/scenarioDetail.wxml-->
<pro-detail id="pro-detail" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}"></pro-detail>
// packagesList/pages/videoDetal/videoDetal.js
Page({
/**
* 页面的初始数据
*/
data: {
videoItem: {
index: 0,
videoList: [],
videoUrl: '',
hasPhoneNumber: false
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
wx.$router.getData(res => {
console.log(res)
this.setData({
videoItem: res
})
})
},
// 下载视频
downVideo() {
let {videoItem: {url}} = this.data
console.log(url)
},
// 申请合作
toApplication() {
},
// 转发
toForward() {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"gl-video-detail": "glsx-applet-component/video-detail/index"
}
}
\ No newline at end of file
/* packagesList/pages/videoDetal/videoDetal.wxss */
\ No newline at end of file
<!--packagesList/pages/videoDetal/videoDetal.wxml-->
<!-- aaa -->
<gl-video-detail list="{{videoItem.videoList}}" index="{{videoItem.index}}"></gl-video-detail>
<phone-number type="{{'video'}}" bindvideodown="downVideo" bindtoForward="toForward" bindtoApplication="toApplication" hasPhoneNumber="{{videoItem.hasPhoneNumber}}"></phone-number>
\ No newline at end of file
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
const subscriptionIMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/subscription/'
const IMG_URL2 = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/'
const subscriptionBannerUrl = IMG_URL2 + 'banner/banner4.webp'
const productImgs0 = [`${IMG_URL}index/productImgs/product00.webp`, `${IMG_URL}index/productImgs/product01.webp`, `${IMG_URL}index/productImgs/product02.webp`, `${IMG_URL}index/productImgs/product03.webp`]
// 车损升级
const tabList = ['项目亮点', '合作案例', '合作方式']
const sceneImgs5 = [`${IMG_URL}index/productImgs/scene00.png`, `${IMG_URL}index/productImgs/scene01.png`, `${IMG_URL}index/productImgs/scene02.png`, `${IMG_URL}index/productImgs/scene03.png`]
const videoList0 = [
{
videoUrl: `${IMG_URL2}video/digital_card_30s.mp4`,
posterUrl: `${IMG_URL}index/poster/subscribeVideoPoster-0.webp`,
name: 'SOP数字化管理提升门店效率',
manufacturer: '嘀加智慧',
view: 188
},
{
videoUrl: `${IMG_URL2}video/digital_card_money3.mp4`,
posterUrl: `${IMG_URL}index/poster/subscribeVideoPoster-1.webp`,
name: '1分钟告诉你数字化招揽的核心优势',
manufacturer: '嘀加智慧云',
view: 188
}
// {
// videoUrl: `${IMG_URL2}video/digital_card.mp4`,
// posterUrl: `${IMG_URL}index/poster/digital_card_bitmap.png`,
// name: '数字无忧卡服务',
// manufacturer: '嘀加智慧',
// view: 1320
// },
// {
// videoUrl: `${IMG_URL2}video/digital_card_reason6.mp4`,
// posterUrl: `${IMG_URL}index/poster/digital_card_reason6_bitmap.png`,
// name: '数字无忧卡6大理由',
// manufacturer: '嘀加智慧',
// view: 1485
// }
]
const subscriptionSystemData = [
{
name: '客户沉淀',
//场景详情图片
// sceneImgs: sceneImgs5,
// 产品详情图片
productImgs: productImgs0,
productList: [
{
id: 0,
img: 'product-img1',
proName: '私域用户活跃代运营',
price: '100',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale: 100, //销量
varType: 0,
flow: 10000,
productCode: 'PC011',
productName: '私域用户活跃代运营',
category: '代运营',
prodImg: `${IMG_URL2}/prod2/prod4-0.webp`,
sceneImgs: [
{
url: `${IMG_URL}index/productImgs/product46.webp`,
className: 'img-item46'
},
{
url: `${IMG_URL}index/productImgs/product47.webp`,
className: 'img-item47'
},
{
url: `${IMG_URL}index/productImgs/product48.webp`,
className: 'img-item48'
}
],
tabList
},
{
id: 1,
img: 'product-img1',
proName: '定保/续保数字化招揽',
price: '100',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale: 100, //销量
varType: 0,
flow: 10000,
productCode: 'PC012',
productName: '定保/续保数字化招揽',
category: '招揽',
prodImg: `${IMG_URL}index/prod2/prod4-1.webp`,
sceneImgs: [
{
url: `${IMG_URL}index/productImgs/product49.webp`,
className: 'img-item49'
},
{
url: `${IMG_URL}index/productImgs/product50.webp`,
className: 'img-item50'
},
{
url: `${IMG_URL}index/productImgs/product51.webp`,
className: 'img-item51'
}
],
tabList
}
],
videoList: videoList0
// posterList: posterList0
},
{
name: '客户活跃',
//场景详情图片
sceneImgs: sceneImgs5,
// 产品详情图片
productImgs: productImgs0,
productList: [
{
id: 2,
img: 'product-img1',
proName: '事故车救援服务',
price: '100',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale: 100, //销量
varType: 0,
flow: 10000,
productCode: 'PC001',
productName: '事故车救援服务',
category: '救援',
prodImg: `${IMG_URL}index/prod2/prod4-2.webp`,
sceneImgs: [
{
url: `${IMG_URL}index/productImgs/product52.webp`,
className: 'img-item52'
},
{
url: `${IMG_URL}index/productImgs/product53.webp`,
className: 'img-item53'
},
{
url: `${IMG_URL}index/productImgs/product54.webp`,
className: 'img-item54'
}
],
tabList
}
],
videoList: videoList0
// posterList: posterList0
}
]
module.exports = {
// systemData,
subscriptionBannerUrl,
subscriptionSystemData
}
......@@ -3,6 +3,7 @@ import { IMG_URL } from '~/utils/constantData.js'
// import Util from '~/utils/util.js'
import { deleteSecond } from '~/utils/format'
import { senceData } from './constant/data'
import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`,
actArrow: `${IMG_URL}/index/actArrow.png`
......@@ -54,6 +55,61 @@ Page({
headerHeight: 0,
unreadClueCount: 0,
img_version: '0.1.1',
subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
subscriptionSystemData: Object.freeze(subscriptionSystemData)
},
proClick(e) {
let { detail } = e
//登录的用户手机号
console.log(detail)
// let userInfo = wx.$storage.get("userInfo")
const { cardInfo } = this.data
let obj = {
// || 99
actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的
activeNavIdx: detail.id, //选中的产品,
cardInfo,
hasPhoneNumber: this.data.hasPhoneNumber
}
wx.$router.go('/packagesList/pages/productDetail/productDetail', obj)
},
// 跳转视频详情
videoClick(e) {
console.log(e.detail)
const {
index,
info: { videoUrl },
scenIndex,
list
} = e.detail
// if(scenIndex && scenIndex != 0){
// const videoList = productData[0].
// }
// console.log(productData[0])
//const videoList = productData[scenIndex][0].videoList
const videoList = list
wx.$router.go('/packagesList/pages/videoDetal/videoDetal', {
index,
videoList,
videoUrl: videoUrl,
hasPhoneNumber: this.data.hasPhoneNumber
})
},
// 跳转活动页
activityClick(e) {
const { hasPhoneNumber } = this.data
const id = e.detail
console.log(e)
wx.$router.go('/packagesList/pages/activityDetail/activityDetail', { hasPhoneNumber, id })
},
// 场景跳转
senceClick(e) {
const { hasPhoneNumber } = this.data
console.log(e)
const { scenIndex } = e.detail
wx.$router.go('/packagesList/pages/scenarioDetail/scenarioDetail', { hasPhoneNumber, actNum: scenIndex })
},
//引导图
guideFn() {
......
......@@ -2,7 +2,8 @@
"usingComponents": {
"vas-toast": "./components/likeToast/likeToast",
"indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue"
"indexClue": "./components/indexClue/indexClue",
"gl-subscription": "glsx-applet-component/subscription/index"
},
"navigationStyle": "custom",
"onReachBottomDistance": 50
......
......@@ -37,7 +37,10 @@
headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" /> -->
<view wx:if="{{tabIndx == 1}}">系统订阅</view>
<!-- <view wx:if="{{tabIndx == 1}}">系统订阅</view> -->
<block wx:if="{{tabIndx == 1}}">
<gl-subscription list="{{subscriptionSystemData}}" menuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bindactivityClick="activityClick" bind:proClick="proClick" bind:videoClick="videoClick" bind:senceClick="senceClick" bindcurrentScen="getCurrentScen" />
</block>
</view>
<!-- 收藏、取消提示框 -->
<vas-toast id='toast' />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!