Commit cb1cbcb5 by 陈婉清

Merge branch 'v3.3.0_1228' into 'develop'

V3.3.0 1228上线后,合并代码。

See merge request !20
2 parents 72b1477b ee882989
Showing 55 changed files with 3028 additions and 205 deletions
...@@ -70,6 +70,24 @@ const battleMessageApi = data => { ...@@ -70,6 +70,24 @@ const battleMessageApi = data => {
}) })
} }
// 获取活动记录全集
const getActivityRecordApi = data => {
return api.post({
method: `entmicro.api.business.activityRecord.list`,
apiProjectName: 'drac',
...data
}, true)
}
// 根据id查询
const getActivityDetailApi = data => {
return api.post({
method: `entmicro.api.business.activityRecord.detail`,
apiProjectName: 'drac',
...data
})
}
module.exports = { module.exports = {
/** 线索埋点数据上报 /** 线索埋点数据上报
* operationType 操作类型(0:分享 1:浏览 2:申请活动) * operationType 操作类型(0:分享 1:浏览 2:申请活动)
...@@ -87,5 +105,7 @@ module.exports = { ...@@ -87,5 +105,7 @@ module.exports = {
pageApi, pageApi,
readApi, readApi,
tagApi, tagApi,
battleMessageApi battleMessageApi,
getActivityRecordApi,
getActivityDetailApi
} }
{ {
"pages": [ "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"],
"login/loading/loading", "requiredPrivateInfos": ["getLocation"],
"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"
],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -50,49 +35,39 @@ ...@@ -50,49 +35,39 @@
}, },
"subpackages": [ "subpackages": [
{ {
"root": "packagesList/pages",
"name": "packagesList",
"pages": ["videoDetal/videoDetal", "productDetail/productDetail", "scenarioDetail/scenarioDetail"]
},
{
"root": "packagesList/packageOutput", "root": "packagesList/packageOutput",
"name": "packageOutput", "name": "packageOutput",
"pages": [ "pages": ["pages/openBusiness", "pages/summary"]
"pages/openBusiness",
"pages/summary"
]
}, },
{ {
"root": "packagesList/mineDetail", "root": "packagesList/mineDetail",
"name": "mineDetail", "name": "mineDetail",
"pages": [ "pages": ["pages/messageBox", "pages/customerManagement", "pages/clue"]
"pages/messageBox",
"pages/customerManagement"
]
}, },
{ {
"root": "packagesList/apply", "root": "packagesList/apply",
"name": "apply", "name": "apply",
"pages": [ "pages": ["pages/apply"]
"pages/apply"
]
}, },
{ {
"root": "packagesList/applyProd", "root": "packagesList/applyProd",
"name": "applyProd", "name": "applyProd",
"pages": [ "pages": ["pages/apply"]
"pages/apply"
]
} }
], ],
"preloadRule": { "preloadRule": {
"pages/tab/mine/mine": { "pages/tab/mine/mine": {
"network": "all", "network": "all",
"packages": [ "packages": ["mineDetail"]
"mineDetail"
]
}, },
"pages/tab/index/index": { "pages/tab/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["apply", "packageOutput"]
"apply",
"packageOutput"
]
} }
}, },
"usingComponents": { "usingComponents": {
......
/*
* @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 \ 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>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">{{item}}</view> <view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" /> <view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- --> <!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" /> <!-- <view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" /> -->
</view> </view>
</block> </block>
</view> </view>
......
// 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
},
cardInfo: {
type: Object,
value: {}
},
// 配置url
activeUrl: {
type: String,
value: ''
},
sharephone: {
type: String,
value: ''
},
showLeftFlag: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
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] // 订阅模块需要特殊处理
const senceList = productData[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,
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 = []
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
})
},
phoneCall(e) {
let { phone } = e.currentTarget.dataset;
wx.$api.phoneCall(phone);
},
getUserInfo(e) {
this.triggerEvent('getUserInfo', { detail: e.detail })
},
}
})
{
"component": true,
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
}
}
\ No newline at end of file \ 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: 4360rpx;
}
.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 \ 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="{{sharephone}}">
<!-- <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 \ No newline at end of file
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
"version": "1.10.7", "version": "1.10.7",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz", "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz",
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A==" "integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
},
"glsx-applet-component": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.37.tgz",
"integrity": "sha512-Imu/2+0R9Vru6o73rwzTPqB+hNh5dXeWHj78SV15C0QcK6RhLry5tcrjvv1+B2M16/ajeljEBSFY5WXppD9gCg=="
} }
} }
} }
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"description": "", "description": "",
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"@vant/weapp": "^1.10.7" "@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.0.38"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
// packagesList/pages/activityDetail/activityDetail.js
import { getActivityDetailApi } from '~/api/index.js'
import { IMG_URL } from '~/utils/constantData'
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL: IMG_URL,
activityInfo: {},
autoplay: true
},
toActivity() {
const activityInfo = this.data.activityInfo
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
envVersion: 'trial',
success(res) {
// 打开成功
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
wx.$router.getData(res => {
console.log(res)
this.getActivityDetail(res.id)
// this.setData({
// hasPhoneNumber: res.hasPhoneNumber
// })
})
},
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({
activityInfo: res
})
})
},
handlePlay() {
this.setData({
autoplay: !this.data.autoplay
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/pages/activityDetail/activityDetail.wxss */
.activity-detail {
background-color: #F5F5F7;
.swiper {
height: 422rpx;
}
.swiper-img {
width: 100%;
height: 422rpx;
}
}
.activity-name {
font-size: 32rpx;
font-weight: 600;
background-color: #fff;
padding: 16rpx 32rpx 32rpx;
}
.activity-introduction {
margin-top: 20rpx;
background-color: #fff;
padding: 24rpx 32rpx;
.activity-title {
font-weight: 500;
font-size: 36rpx;
color: #2D2D33;
}
.activity-content {
margin: 16rpx 0 48rpx;
font-weight: 400;
font-size: 28rpx;
color: #444444;
line-height: 52rpx;
}
.activity-info {
margin-top: 16rpx;
.activity-item {
display: flex;
align-items: center;
margin-bottom: 8rpx;
.activity-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.text {
font-weight: 400;
font-size: 28rpx;
color: #444444;
}
}
}
.activity-btn {
margin-top: 48rpx;
margin-bottom: 136rpx;
font-weight: 500;
font-size: 32rpx;
color: #5850FF;
text-align: center;
line-height: 48rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/pages/activityDetail/activityDetail.wxml-->
<view class="activity-detail">
<swiper class="swiper" autoplay="{{autoplay}}" circular="true" current="{{current}}" interval="5000">
<swiper-item class="swiper-item" wx:if="{{activityInfo.videoUrl}}">
<video class="swiper-img" src="{{activityInfo.videoUrl}}" bindplay="handlePlay" bindpause="handlePlay"></video>
</swiper-item>
<swiper-item class="swiper-item" wx:for="{{activityInfo.imageUrlArr}}" wx:key="index">
<image class="swiper-img" webp src="{{item}}"></image>
</swiper-item>
</swiper>
<view class="activity-name">{{activityInfo.activityName}}</view>
<view class="activity-introduction">
<view class="activity-title">活动介绍</view>
<view class="activity-content">
{{activityInfo.activityEvent}}
</view>
<view class="activity-title">活动举办方</view>
<view class="activity-info">
<view class="activity-item" wx:if="{{activityInfo.sponsorName}}">
<image class="activity-icon" webp src="{{IMGURL}}image/activity/icon-company.png"></image>
<view class="text">{{activityInfo.sponsorName}}</view>
</view>
<view class="activity-item" wx:if="{{activityInfo.address}}">
<image class="activity-icon" webp src="{{IMGURL}}image/activity/icon-address.png"></image>
<view class="text">{{activityInfo.address}}</view>
</view>
<view class="activity-item">
<image class="activity-icon" webp src="{{IMGURL}}image/activity/icon-time.png"></image>
<view class="text">{{activityInfo.beginTime + ' - ' + activityInfo.endTime}}</view>
</view>
</view>
<view class="activity-btn" bindtap="toActivity">查看活动详情页面</view>
</view>
</view>
<!-- <phone-number type="{{'scenario'}}" bindtoApplication="toApplication" bindupdatePhoneNumber="updatePhoneNumber" hasPhoneNumber="{{hasPhoneNumber}}"></phone-number> -->
\ No newline at end of file \ No newline at end of file
// packagesList/mineDetail/pages/clue.js
import { IMG_URL } from '~/utils/constantData.js'
import { unreadApi, pageApi, tagApi } from '~/api/index.js'
const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`,
actArrow: `${IMG_URL}/index/actArrow.png`
})
Page({
/**
* 页面的初始数据
*/
data: {
IMAGES,
IMG_URL,
disLikeRecordFlag: true,
typeList: [
{
0: '无电话',
1: '有电话',
2: '联系电话',
selectIndex: 2,
key: 'hasPhone'
},
{
0: '非意向客户',
1: '是意向客户',
2: '意向客户',
selectIndex: 2,
key: 'starTag'
},
{
0: '来自访客',
1: '来自门店',
2: '线索来源',
selectIndex: 2,
key: 'clueSource'
},
{
2: '重置',
selectIndex: 2
}
],
clueList: [],
// 看线索部分
unreadClueCount: 0,
cluePageSize: 1000,
clueCurrentPage: 1,
disLikeFlag: true,
clueParams: {} //看线索参数
},
//点击收藏
showToast: function (e) {
wx.$storage.set('disLikeRecordFlag', false)
let disLikeRecordFlag = wx.$storage.get('disLikeRecordFlag')
this.setData({
disLikeFlag: false,
disLikeRecordFlag
})
let { type, item } = e.currentTarget.dataset
// console.log('type,item: ', type, item)
let tipObj = {}
if (item.starTag == 1) {
tipObj = {
type: 'fail',
title: '取消标记为意向客户'
}
} else {
tipObj = {
type: 'success',
title: '成功标记为意向客户'
}
}
this.data.prompt.showToast({
type: tipObj.type,
title: tipObj.title,
duration: 1000,
compelete: function () {
// console.log("toast框隐藏之后,会调用该函数");
//例如:跳转页面wx.navigateTo({ url: 'xxx' });
}
})
//切换收藏标记
let index = e.currentTarget.dataset.outidx
let completeStatus = `clueList[${index}].like`
this.setData({
[completeStatus]: !this.data.clueList[index].like
})
//发请求
let { sessionId } = wx.$storage.get()
let params = {
clueId: item.clueId,
sessionId
}
this.getTagApi(params)
},
//看线索重置
resetCluelist() {
let { typeList } = this.data
typeList.forEach(item => {
item.selectIndex = 2
})
this.setData({
typeList,
clueParams: {}
})
//重置数据
this.clearclueData()
this.getPageApi()
},
filterTypeFn(e) {
let { typeList } = this.data
let index = e.currentTarget.dataset.index
// 重置筛选
if (index == 3) {
return this.resetCluelist()
}
let itemList = Object.values(typeList[index]).slice(0, 2)
itemList.push('全部')
let _this = this
wx.pro.showActionSheet({
itemList,
success(res) {
//重置数据
_this.clearclueData()
// 选中全部
let selectIndex = res.tapIndex
// console.log('selectIndex: ', selectIndex);
typeList[index].selectIndex = selectIndex
let params = typeList.reduce((obj, item, index) => {
// console.log(' item: ', item)
if (item['key']) {
let itemIndx = item.selectIndex
// key: 'clueSource'
if (item['key'] == 'clueSource') {
// itemIndx += 1
obj[item['key']] = itemIndx == 2 ? '' : itemIndx + 1
} else {
obj[item['key']] = itemIndx == 2 ? '' : itemIndx
}
}
return obj
}, {})
// console.log(params)
// 清空数据
_this.setData({ typeList, clueParams: params })
_this.getPageApi(params)
},
fail(res) {
// console.log(res.errMsg)
}
})
},
//重置数据
clearclueData() {
this.setData({
clueList: [],
clueCurrentPage: 1
// hasPhone: '',
// starTag: '',
// clueSource: '',
})
},
// 打电话
phoneCallFn(e) {
let { phone } = e.currentTarget.dataset
wx.$api.phoneCall(phone)
},
// 复制号码
setCopyDataFn(e) {
let { phone } = e.currentTarget.dataset
wx.$api.setCopyData(phone)
},
getClueInit(param) {
this.getUnreadApi(param)
this.getPageApi(param)
},
//未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param)
if (code == 0) {
this.setData({
unreadClueCount: data.unreadClueCount
})
}
},
//获取浏览线索数据列表
async getPageApi(param) {
let { cluePageSize, clueCurrentPage, clueList } = this.data
let params = {
pageSize: cluePageSize,
currentPage: clueCurrentPage,
...param
}
let { code, data } = await pageApi(params)
if (code == 0) {
let arr = data.list.map(item => {
if (item.visitList && item.visitList.length > 5) {
item.getMoreFlag = true
}
return item
})
//添加分页数据
// let concatArr = []
// if(arr.length > 0) {
// concatArr = clueList.concat(arr)
// }
this.setData({
clueList: arr
})
let arrinx = arr.findIndex(e => e.clueType == 1 && e.starTag == 0)
this.setData({
disLikeFlagIdx: arrinx,
triggered: false
})
}
},
//喜欢收藏功能
async getTagApi(param) {
let { clueParams } = this.data
let res = await tagApi(param)
if (res.code == 0) {
let clueListPamas = {
...param,
...clueParams
}
this.getPageApi(clueListPamas)
}
},
// 上拉刷新
scrolltolowerFn() {
let { clueCurrentPage, clueParams } = this.data
let params = {
...clueParams,
clueCurrentPage: clueCurrentPage++
}
this.setData({
clueCurrentPage
})
this.getPageApi(params)
},
// 下拉刷新
refreshList() {
// console.log('onPullDownRefresh: ');
let { clueParams } = this.data
this.getClueInit(clueParams)
// this.resetCluelist()
// this.onLoad()
wx.pro.showToast({
title: '刷新成功',
icon: 'success',
duration: 1500
})
},
gotoApply(e) {
let { type, item } = e.currentTarget.dataset
// let { } = e.currentTarget.dataset
// console.log(item)
// return
if (type == 'active') {
let { userInfo } = wx.$storage.get()
let pMerchantName = userInfo.subLoginUser.merchantName
let pMerchantId = userInfo.subLoginUser.merchantId
let sceneActive
switch (this.data.actNum) {
case 0:
sceneActive = 1
break
case 1:
sceneActive = 2
break
case 2:
sceneActive = 3
break
case 3:
sceneActive = 4
break
}
// let pMerchantId = userInfo.subLoginUser.merchantId
// console.log("type,item: ", type, item);
const params = {
merchantInfo: {
pMerchantId,
pMerchantName,
merchantId: item.visitList[0].merchantId,
merchantName: item.visitList[0].merchantName
},
sceneActive,
clueId: item.clueId
// sceneCodeList: ['SC001', 'SC002','SC003','SC004']
}
//申请活动
// wx.$router.go("packageOutput.openBusiness", params);
wx.$router.go('packagesList.openBusiness', params)
} else {
//申请门店
// let { type, item } = e.currentTarget.dataset
wx.$router.go('packagesList.apply', item?.clueId || '')
}
// wx.$router.go('apply',1235)
},
getMore(e) {
// console.log("显示更多数据");
let index = e.currentTarget.dataset.outidx
// console.log("index: ", index);
let completeStatus = `clueList[${index}].getMoreFlag`
this.setData({
[completeStatus]: !this.data.clueList[index].getMoreFlag
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 看线索
this.getClueInit()
this.data.prompt = this.selectComponent('#toast')
let disLikeRecordFlag = wx.$storage.get('disLikeRecordFlag')
this.setData({
disLikeRecordFlag
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"vas-toast": "/pages/tab/index/components/likeToast/likeToast"
}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/mineDetail/pages/clue.wxss */
.clue-wrap {
padding: 0px 10px 0;
background-color: #f2f3f7;
height: 100vh;
// margin-top: -16rpx;
// overflow: scroll;
.types {
// margin-bottom: 8px;
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
// position: sticky;
// top: 280rpx;
z-index: 2;
background-color: #f2f3f7;
// margin-top: -32rpx;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
.active {
color: #3964fe;
}
}
.list-wrap {
height: calc(100% - 80rpx);
}
.list {
// overflow: scroll;
box-sizing: border-box;
// padding-bottom: 8rpx;
.msg {
padding: 10px 16px 16px;
margin-bottom: 8px;
position: relative;
background-color: #fff;
border-radius: 4px;
}
.like {
position: absolute;
right: 12px;
top: 0;
width: 23px;
height: 23px;
}
.disLike-tit {
width: 172rpx;
background: rgba(0, 0, 0, 0.60);
padding: 8rpx 0rpx;
font-family: PingFangSC-Regular;
font-size: 20rpx;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
border-radius: 8rpx;
position: absolute;
right: 0rpx;
top: 61rpx;
}
.disLike-titsan {
width: 0;
height: 0;
border: 18rpx solid;
border-color: transparent transparent #686868;
position: absolute;
right: 27rpx;
top: 30rpx;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 28rpx;
color: #323436;
.avatar {
margin-left: 2px;
width: 20px;
height: 20px;
}
}
.line {
margin-top: 10px;
margin-bottom: 10px;
height: 0;
border-bottom: #eeeeee 1px dashed;
}
.want-more {
box-sizing: border-box;
// overflow: hidden;
transition: all 3s ease;
}
// .height {
// height: 200rpx;
// }
// .auto {
// height: auto;
// }
.hiddenMore {
display: none !important;
}
.showMore {
display: flex !important;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
// margin-top: 4px;
// margin-bottom: 4px;
box-sizing: border-box;
// height: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 24rpx;
color: #393b3e;
}
// .action{
// }
// .detail{
// }
.time {
font-size: 12px;
color: #8a8c90;
}
}
.info {
margin-top: 10px;
display: flex;
justify-content: space-between;
.phone-wrap {
display: flex;
align-items: center;
}
.phone {
font-size: 24rpx;
color: #3666fe;
}
.phone-img {
margin-left: 12px;
margin-right: 8px;
width: 20px;
height: 20px;
border-radius: 50%;
}
.copy {
width: 20px;
height: 20px;
border-radius: 50%;
}
.btn {
width: 85px;
height: 24px;
background: var(--btnColor);
border-radius: 12px;
font-size: 12px;
color: #ffffff;
text-align: center;
line-height: 24px;
}
}
.noDataImg {
width: 512rpx;
height: 512rpx;
margin-left: 100rpx;
position: relative;
.noDataTxt {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCED1;
position: absolute;
bottom: 32rpx;
left: 50%;
transform: translateX(-50%);
}
}
.shop {
.name-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.source {
font-size: 10px;
color: #8a8c90;
}
.btn {
border: 1px solid var(--btnColor);
border-radius: 12px;
background-color: #fff;
font-size: 12px;
color: var(--btnColor);
}
.shop-action-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.shop-record {
width: 100%;
}
.shop-source {
margin-top: 4px;
width: 100%;
font-size: 24rpx;
color: #393b3e;
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/mineDetail/pages/clue.wxml-->
<view class="clue-wrap" hover-class="none" hover-stop-propagation="false">
<view class="types">
<view class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}" wx:for="{{typeList}}" wx:key="index" data-index="{{index}}" style="{{index == 0 ? 'margin-left: 0px;' : ''}}" bindtap="filterTypeFn">
{{item[item['selectIndex']] }}
<image webp class="point" wx:if="{{index != 3}}" src="{{item['selectIndex']!=2&&index != 3? IMAGES.actArrow : IMAGES.arrow}}" />
</view>
</view>
<!-- bindscrolltolower="scrolltolowerFn" -->
<scroll-view scroll-y="true" class="list-wrap" enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="refreshList" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="list" hover-class="none" hover-stop-propagation="false">
<view class="msg" wx:for="{{clueList}}" wx:key="index">
<!-- 门店助手 -->
<view class="shop" wx:if="{{item.clueType == 2}}">
<view class="name-wrap">
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image webp class="avatar" src="{{IMG_URL}}index/man.png" wx:if="{{item.clueType != 3}}" />
</view>
<view class="source" hover-class="none" hover-stop-propagation="false">通过门店助手申请</view>
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="record" wx:for="{{item.visitList}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="shop-record">
<view class="shop-action-wrap">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">
访问页面:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.productDesc}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.clueDate}}
</view>
</view>
<view class="shop-source" hover-class="none" hover-stop-propagation="false">
所属门店:{{itemName.merchantName}}
</view>
</view>
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view>
<view class="phone-wrap" wx:if="{{item.phone}}">
<view class="phone">{{item.phone}}</view>
<image webp class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" />
<image webp class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" data-type="active" data-item="{{item}}" wx:if="{{item.applyStatus == 0}}" bindtap="gotoApply">
开通活动
</view>
</view>
</view>
<!-- 生意助手 -->
<view wx:else>
<image webp class="like" wx:if="{{item.clueType == 1 && item.starTag == 1}}" src="{{IMG_URL}}index/like.png" data-type="like" data-outidx="{{index}}" data-item="{{item}}" bindtap="showToast" />
<image webp class="like" wx:if="{{item.clueType == 1 && item.starTag == 0}}" src="{{IMG_URL}}index/dislike.png" data-type="dislike" data-outidx="{{index}}" data-item="{{item}}" bindtap="showToast" />
<view class="disLike-tit" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}">
标记为意向客户
</view>
<view class="disLike-titsan" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}" />
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image webp class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" />
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<!-- {{item.getMoreFlag?'height':'auto'}} -->
<view class="want-more ">
<view class="record {{idx>4&&item.getMoreFlag?'hiddenMore':''}} {{idx>4&&!item.getMoreFlag?'showMore':''}}" wx:for="{{item.visitList}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">访问页面:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.productDesc}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.clueDate}}
</view>
</view>
</view>
<view class="want-btn" wx:if="{{item.visitList.length > 5}}" hover-class="none" hover-stop-propagation="false" data-outidx="{{index}}" bindtap="getMore">
{{ item.getMoreFlag ?'更多数据':'收起数据'}}
</view>
<view class="info" hover-class="none" hover-stop-propagation="false" wx:if="{{item.phone}}">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image webp class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" />
<image webp class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" data-type="shop" bindtap="gotoApply" data-item="{{item}}" wx:if="{{item.applyStatus == 0}}">
+开店面
</view>
</view>
</view>
</view>
<view class="bottomTips" wx:if="{{clueList.length>10}}">到底啦!</view>
<view class="noDataImg" wx:if="{{!clueList.length}}">
<image webp src="{{IMG_URL}}index/trEmpty.png " />
<text class="noDataTxt">没有符合条件的线索~</text>
</view>
</view>
</scroll-view>
</view>
<!-- 收藏、取消提示框 -->
<vas-toast id='toast' />
\ No newline at end of file \ No newline at end of file
// pages/viewProd/index.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.js'
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,
// phone: '', //授权手机号
prodItemVideo:'', //选中的场景下的video的第一个
activeUrl:'', // 1.3场景才有的活动配置
sharephone:'' //主要微信用户,服务商
},
// 计算属性
computed: {
showLeftFlag(data) {
// 1.分享出去
// 2.点击可以改变状态
return data.isShare && !data.showLeft
},
prodItemVideo(data){
let {senceData,actNum,activeNavIdx} = data
// return senceData[actNum]?.productList[activeNavIdx]
// if(actNum == 2){
// return senceData[actNum]?.noVideoPicture[0]
// }
// return senceData[actNum]?.videoList[activeNavIdx]
},
// 授权昵称弹框显示
authNcknameShow(data){
return data.isShare && !data.hasUserInfo
}
},
/**
* 生命周期函数--监听页面加载
* 分享出去,或扫码进来
*/
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 wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
//分享数据
const senceList = this.data.productData[this.data.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,
sceneCode: item.sceneCode || ''
})
break
}
}
// let senceItem = senceData[actNum]
// let item = senceData[actNum]?.productList[activeNavIdx]
let item = this.data.proInfo || {}
setTimeout(() => {
utils.setNavigationBarTitle(item?.productName)
},100)
this.shareQuery = `sceneCode=${this.data.sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
this.shareTrackData = {
sceneCode: this.data.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId:shareOpenId
// actNum,
// activeNavIdx,
}
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0,phone=123 } = options;
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
sharephone:phone //联系电话 (登陆的用户)
});
const senceList = this.data.productData[this.data.actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) {
let item = senceList[i]
let proIdList = senceList[i]?.productList.map(k => k.id)
if (proIdList.includes(+activeNavIdx)) {
let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({
proInfo,
sceneCode: item.sceneCode || ''
})
break
}
}
// 设置转发标题
let userInfoObj = wx.$storage.get("userInfo");
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName;
this.shareTitle = `${name}给你分享一个活动${this.data.proInfo?.productName},戳我参与~`;
//分享数据
let item = this.data.proInfo || {}
setTimeout(() => {
utils.setNavigationBarTitle(item.productName)
},100)
//分享人openId
let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || ''
// &shareOpenId=${shareOpenId}
this.shareQuery = `sceneCode=${this.data.sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${phone}`
this.shareTrackData = {
sceneCode: this.data.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
shareOpenId:shareOpenId
// actNum,
// activeNavIdx,
// apiData,
}
},
//获取配置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)
}
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
let proDetail = this.selectComponent("#pro-detail")
proDetail.pageSroll(e)
}, 100);
};
})(),
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
this.init()
},
phoneCall(e) {
let { phone } = e.currentTarget.dataset;
wx.$api.phoneCall(phone);
},
async init() {
try {
const { data, code, message } = await USERAPI.wxCodeLogin()
if (code == '0') {
this.loginToken = data
} else this.reLogin(message)
wx.hideLoading()
} catch ({ errMsg }) {
console.error(errMsg)
this.reLogin()
}
},
/**获取loginToken */
reLogin(message) {
wx.showModal({
content: message || '获取loginToken失败',
confirmText: '重试',
confirmColor: '#3666FE'
}).then(({ confirm }) => {
if (confirm) this.init()
})
},
// 获取用户信息(手机号)
getUserInfo(e) {
let { detail } = e?.detail
if (!detail.code) return;
// this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => {
let userInfo = wx.$storage.get("wx_user_info");
let { phone } = result;
wx.$storage.set('authphone', phone)
wx.$storage.set("wx_user_info", {
...userInfo,
phone,
});
// 显示后面的内容
setTimeout(() => {
// this.getImgHeight()
},300)
this.setData({
showLeft: true
})
//触发浏览埋点
this.onLoad(null)
})
.catch(({ errMsg }) => {
wx.$api.showToast(errMsg || "系统异常");
// this.setBtnLoading(false)
});
},
// 获取用户昵称(昵称头像)
getUserProfile(e) {
//关闭授权框
this.setData({
hasUserInfo: true
})
let _this = this
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '用于完善资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: res => {
this.setData({
userInfo: res.userInfo
})
let wx_user_info = wx.$storage.get('wx_user_info')
let obj = {
...wx_user_info,
nickName: res.userInfo.nickName,
avatarUrl: res.userInfo.avatarUrl
}
wx.$storage.set('wx_user_info', obj)
_this.onLoad(null)
}
})
},
// 1.3查看活动详情按钮
// checkActive(){
// // 跳转
// // console.log('跳转')
// let {activeUrl} = this.data
// wx.$router.jumpH5(activeUrl);
// },
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
/**
* 浏览埋点
*/
onShareTimeline() {},
onViewTrack: true
});
{
"usingComponents": {
"pro-detail": "../../../components/proDetail/proDetail",
"apply-button": "../../../pages/viewVideo/components/apply-button/index"
}
}
\ No newline at end of file \ 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;
}
.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;
}
<!--packagesList/pages/productDetail/productDetail.wxml-->
<pro-detail id="pro-detail" showLeftFlag="{{showLeftFlag}}" sharephone="{{sharephone}}" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}" activeUrl="{{activeUrl}}" bind:getUserInfo="getUserInfo"></pro-detail>
<!-- <block wx:if="{{showLeftFlag}}">
<button class="more-btn" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情
</button>
</block> -->
<!-- 申请按钮 不是分享出去的显示按钮 -->
<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 \ No newline at end of file
{
"usingComponents": {
"pro-detail": "../../../components/proDetail/proDetail"
}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/pages/scenarioDetail/scenarioDetail.wxss */
\ No newline at end of file \ 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
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 utils from '~/utils/util.js'
Page({
noPageAuth: true,
/**
* 页面的初始数据
*/
data: {
senceData,
productData,
videoItem: {
index: 0,
videoList: [],
videoUrl: '',
isShare: false,//是否是被分享出去
},
videoObj: {},
showAuth: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(res => {
this.setData({
videoItem: res
})
})
if (!utils.isEmptyObj(options)) {
let { isShare, videoIndex, tabActive, sceneCode, leftMenuIndex } = options;
let item = this.data.productData[tabActive].find(item => item.sceneCode == sceneCode)
let videoItem = {
index: videoIndex,
videoList: item?.videoList,
videoUrl: item?.videoList[videoIndex]?.videoUrl
}
this.setData({
videoItem: videoItem,
isShare: isShare,
videoObj: item?.videoList[videoIndex],
leftMenuIndex: leftMenuIndex
})
this.setpagesTitle()
this.shareDataFn(options)
}
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let { scenIndex, videoList, index, leftMenuIndex } = options
options.videoIndex = index
options.tabActive = scenIndex
this.setData({
videoObj: videoList[index],
leftMenuIndex: leftMenuIndex
})
this.setpagesTitle()
this.shareDataFn(options)
},// 分享数据函数
shareDataFn(options) {
if (!options || utils.isEmptyObj(options)) return
let { tabActive, videoIndex } = options
this.setData({
tabActive: tabActive,
videoIndex: videoIndex,
});
//分享的数据
this.changeShareData()
},
changeShareData() {
let { senceData, tabActive, videoIndex, videoObj, leftMenuIndex } = this.data
// // 设置转发标题
// let userInfoObj = wx.$storage.get("userInfo");
// // #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
// let name = userInfoObj.merchantName;
this.shareTitle = `给您分享一个${videoObj.name} 视频`;
//分享的数据
let senceItem = productData[tabActive][leftMenuIndex]
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&isShare=${true}&tabActive=${tabActive}&videoIndex=${videoIndex}&leftMenuIndex=${leftMenuIndex}`
},
// 切换视频
chooseVideo(e) {
let { detail } = e
this.setData({
videoIndex: detail.index,
['videoItem.index']: detail.index,
['videoItem.videoUrl']: detail?.info?.videoUrl,
videoObj: detail?.info
})
this.setpagesTitle()
this.changeShareData()
},
// 下载视频
downVideo() {
const _this = this
let { videoObj } = this.data
let url = videoObj.videoUrl
wx.getSetting({
success: (res)=> {
if(res.authSetting['scope.writePhotosAlbum']===false){
_this.setData({
showAuth: true
})
}else{
wx.$api.showToast('正在下载视频...')
wx.downloadFile({
url: url,
success(res) {
if (res.statusCode === 200) {
wx.saveVideoToPhotosAlbum({
filePath: res.tempFilePath,
success(res) {
setTimeout(() => {
wx.$api.showToast('下载成功!')
}, 2000)
},
fail({ errMsg }) {
_this.setData({
showAuth: errMsg == "saveVideoToPhotosAlbum:fail auth deny",
})
}
})
}
}
})
}
}
})
},
// 申请合作
toApplication() {
},
// 转发
toForward() {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
//设置标题
setpagesTitle() {
//设置标题
let { videoObj } = this.data
setTimeout(() => {
utils.setNavigationBarTitle(videoObj.name)
}, 100)
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"gl-video-detail": "glsx-applet-component/video-detail/index",
"apply-button": "../../../pages/viewVideo/components/apply-button/index",
"authorize": "../../../components/Authorize/Authorize"
}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/pages/videoDetal/videoDetal.wxss */
\ No newline at end of file \ No newline at end of file
<!--packagesList/pages/videoDetal/videoDetal.wxml-->
<gl-video-detail list="{{videoItem.videoList}}" index="{{videoItem.index}}" bindchooseVideo="chooseVideo"></gl-video-detail>
<!-- 申请按钮 -->
<apply-button wx:if="{{!isShare}}" bindvideodown="downVideo"></apply-button>
<block wx:if="{{showAuth}}">
<authorize title="下载前需要获取您的‘添加到相册’权限,是否打开授权设置?" scopeType="writePhotosAlbum" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
</block>
\ No newline at end of file \ No newline at end of file
var measureList = Object.freeze([ var measureList = Object.freeze([
{ {
name: '1.0 新车权益升级', name: '新车洽谈场景',
tips: '新车洽谈场景', tips: '车损升级',
iconName: 'icon1', iconName: 'icon1',
product: [ product: [
{ {
name: '车损升级', name: '车损升级',
parentName: '1.0 新车权益升级', parentName: '新车洽谈场景',
tips: '新车洽谈场景', tips: '车损升级',
value: '0-0', value: '0-0',
typeIndex: '1.0', typeIndex: '1.0',
isCheck: false, isCheck: false,
...@@ -20,14 +20,14 @@ var measureList = Object.freeze([ ...@@ -20,14 +20,14 @@ var measureList = Object.freeze([
] ]
}, },
{ {
name: '1.1 新车精品升级', name: '新车交付场景',
tips: '新车交付场景', tips: '精品升级',
iconName: 'icon2', iconName: 'icon2',
product: [ product: [
{ {
name: '太阳膜升级', name: '太阳膜升级',
parentName: '1.1 新车精品升级', parentName: '新车交付场景',
tips: '新车交付场景', tips: '精品升级',
value: '1-0', value: '1-0',
typeIndex: '1.1', typeIndex: '1.1',
isCheck: false, isCheck: false,
...@@ -40,14 +40,14 @@ var measureList = Object.freeze([ ...@@ -40,14 +40,14 @@ var measureList = Object.freeze([
] ]
}, },
{ {
name: '1.2 次新车膨胀金活动', name: '0-6月',
iconName: 'icon3', iconName: 'icon3',
tips: '0-6个月', tips: '膨胀金活动',
product: [ product: [
{ {
name: '膨胀金活动-车衣', name: '膨胀金活动-车衣',
parentName: '1.2 次新车膨胀金活动', parentName: '0-6月',
tips: '0-6个月', tips: '膨胀金活动',
value: '2-0', value: '2-0',
typeIndex: '1.2', typeIndex: '1.2',
isCheck: false, isCheck: false,
...@@ -59,8 +59,8 @@ var measureList = Object.freeze([ ...@@ -59,8 +59,8 @@ var measureList = Object.freeze([
}, },
{ {
name: '膨胀金活动-改色膜', name: '膨胀金活动-改色膜',
parentName: '1.2 次新车膨胀金活动', parentName: '0-6月',
tips: '0-6个月', tips: '膨胀金活动',
value: '2-1', value: '2-1',
typeIndex: '1.2', typeIndex: '1.2',
isCheck: false, isCheck: false,
...@@ -73,14 +73,14 @@ var measureList = Object.freeze([ ...@@ -73,14 +73,14 @@ var measureList = Object.freeze([
] ]
}, },
{ {
name: '1.3 售后直播众筹活动', name: '6个月以上',
iconName: 'icon4', iconName: 'icon4',
tips: '6个月以上', tips: '众筹活动',
product: [ product: [
{ {
name: '360全景导航', name: '360全景导航',
parentName: '1.3 售后直播众筹活动', parentName: '6个月以上',
tips: '6个月以上', tips: '众筹活动',
typeIndex: '1.3', typeIndex: '1.3',
value: '3-0', value: '3-0',
isCheck: false, isCheck: false,
...@@ -92,8 +92,8 @@ var measureList = Object.freeze([ ...@@ -92,8 +92,8 @@ var measureList = Object.freeze([
}, },
{ {
name: 'AR导航', name: 'AR导航',
parentName: '1.3 售后直播众筹活动', parentName: '6个月以上',
tips: '6个月以上', tips: '众筹活动',
value: '3-1', value: '3-1',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
...@@ -105,8 +105,8 @@ var measureList = Object.freeze([ ...@@ -105,8 +105,8 @@ var measureList = Object.freeze([
}, },
{ {
name: '氛围灯', name: '氛围灯',
parentName: '1.3 售后直播众筹活动', parentName: '6个月以上',
tips: '6个月以上', tips: '众筹活动',
value: '3-2', value: '3-2',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
...@@ -118,8 +118,8 @@ var measureList = Object.freeze([ ...@@ -118,8 +118,8 @@ var measureList = Object.freeze([
}, },
{ {
name: '座椅通风', name: '座椅通风',
parentName: '1.3 售后直播众筹活动', parentName: '6个月以上',
tips: '6个月以上', tips: '众筹活动',
value: '3-3', value: '3-3',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
...@@ -130,9 +130,9 @@ var measureList = Object.freeze([ ...@@ -130,9 +130,9 @@ var measureList = Object.freeze([
serviceDividendRatio: '0.21' serviceDividendRatio: '0.21'
}, },
{ {
name: '智能香氛', name: '智能香薰',
parentName: '1.3 售后直播众筹活动', parentName: '6个月以上',
tips: '6个月以上', tips: '众筹活动',
value: '3-4', value: '3-4',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
......
...@@ -3,6 +3,8 @@ import { IMG_URL } from "~/utils/constantData.js"; ...@@ -3,6 +3,8 @@ import { IMG_URL } from "~/utils/constantData.js";
// 导入方法 // 导入方法
import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed"; import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed";
import { getActivityRecordApi } from '~/api/index.js'
const videoBaseUrl = const videoBaseUrl =
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/"; "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/";
...@@ -72,6 +74,8 @@ Component({ ...@@ -72,6 +74,8 @@ Component({
], ],
mainActiveIndex: 0, mainActiveIndex: 0,
contentHeight: 0, contentHeight: 0,
// 滚动条
activityList: [],
// 视频海报 // 视频海报
videoActive: 0, videoActive: 0,
overlayShow: false, overlayShow: false,
...@@ -83,6 +87,7 @@ Component({ ...@@ -83,6 +87,7 @@ Component({
lifetimes: { lifetimes: {
attached() { attached() {
this.setProType(); this.setProType();
this.getActivityRecord()
}, },
ready() { ready() {
// console.log('lifetimes',this) // console.log('lifetimes',this)
...@@ -152,6 +157,30 @@ Component({ ...@@ -152,6 +157,30 @@ Component({
return res; return res;
}, },
// 获取全部活动列表
getActivityRecord() {
getActivityRecordApi({}).then(({data, code, message}) => {
if (code == -1) {
wx.showToast({
title: message,
icon: "none",
duration: 2000,
});
}
this.setData({
activityList: data
})
})
},
// 跳转活动页
activityClick(e) {
// const {hasPhoneNumber} = this.data
const id = e.detail
console.log(e)
wx.$router.go('/packagesList/activityDetail/activityDetail', {id})
},
// 开通 // 开通
openPro() { openPro() {
let obj = { let obj = {
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
"van-tree-select": "@vant/weapp/tree-select/index", "van-tree-select": "@vant/weapp/tree-select/index",
"video-item":"../video-item/index", "video-item":"../video-item/index",
"poster-item":"../poster-item/index", "poster-item":"../poster-item/index",
"van-overlay": "@vant/weapp/overlay/index" "van-overlay": "@vant/weapp/overlay/index",
"activity-swiper": "glsx-applet-component/activity-swiper/index"
}, },
"styleIsolation": "shared" "styleIsolation": "shared"
} }
\ No newline at end of file \ No newline at end of file
...@@ -114,13 +114,14 @@ ...@@ -114,13 +114,14 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
.van-ellipsis { .van-ellipsis {
flex-basis: auto !important;
overflow: visible; overflow: visible;
text-overflow: auto; text-overflow: auto;
} }
.van-tab--active { .van-tab--active {
.van-ellipsis { .van-ellipsis {
font-weight: 600; font-weight: 600;
font-size: 40rpx; font-size: 36rpx;
color: #323436; color: #323436;
overflow: visible; overflow: visible;
text-overflow: auto; text-overflow: auto;
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
</van-tabs> </van-tabs>
</view> </view>
<view> <view>
<van-notice-bar custom-class="dy-notice" left-icon="{{IMG_URL}}index/ad.png" speed="{{20}}" text="{{scrollText}}" /> <!-- <van-notice-bar custom-class="dy-notice" left-icon="{{IMG_URL}}index/ad.png" speed="{{20}}" text="{{scrollText}}" /> -->
<!-- 滚动条 -->
<activity-swiper activityList="{{activityList}}" bindactivityClick="activityClick"></activity-swiper>
</view> </view>
<view class="pro-cont" id="pro-cont"> <view class="pro-cont" id="pro-cont">
<van-tree-select items="{{ items }}" height="{{contentHeight}}" main-active-index="{{ mainActiveIndex }}" bind:click-nav="onClickNav"> <van-tree-select items="{{ items }}" height="{{contentHeight}}" main-active-index="{{ mainActiveIndex }}" bind:click-nav="onClickNav">
......
...@@ -188,7 +188,7 @@ var senceData = [ ...@@ -188,7 +188,7 @@ var senceData = [
// name: "0-12个月", // name: "0-12个月",
msg: "1.2次新车膨胀金活动", msg: "1.2次新车膨胀金活动",
"sceneCode":"SC003", "sceneCode":"SC003",
tabname:'膨胀金活动', tabname:'客户线上化',
banner:`${IMG_URL}index/banner/banner3.png`, banner:`${IMG_URL}index/banner/banner3.png`,
scrollText:'已发布种草软文100+篇,促进门店二次转化客户到店,欢迎各经销商咨询', scrollText:'已发布种草软文100+篇,促进门店二次转化客户到店,欢迎各经销商咨询',
sceneImgs:[ sceneImgs:[
...@@ -459,6 +459,64 @@ var senceData = [ ...@@ -459,6 +459,64 @@ var senceData = [
] ]
}, },
{
name: '',
img: 'scene_within_12mth.png',
active: 'icon-car21',
playImg: 'img2',
src: `${IMG_URL}index/car3.png`,
msg: "1.2次新车膨胀金活动",
"sceneCode":"SC005",
tabname:'膨胀金活动',
banner:`${IMG_URL}index/banner/banner5.png`,
scrollText:'已发布种草软文100+篇,促进门店二次转化客户到店,欢迎各经销商咨询',
tabList: ['项目介绍', '活动方案', '销售场景', '合作案例', '合作方式', 'FAQ'],
sceneImgs:[
`${IMG_URL}index/scene/scene20.png`,
`${IMG_URL}index/scene/scene21.png`,
`${IMG_URL}index/scene/scene22.png`,
`${IMG_URL}index/scene/scene23.png`,
],
productImgs:[
`${IMG_URL}index/productImgs/product60.webp`,
`${IMG_URL}index/productImgs/product61.webp`,
`${IMG_URL}index/productImgs/product62.webp`,
`${IMG_URL}index/productImgs/product63.webp`,
`${IMG_URL}index/productImgs/product64.webp`,
`${IMG_URL}index/productImgs/product65.webp`,
],
productList: [
{
img: 'product-img3',
proName: '膨胀金',
price: '100',
profit: '180000',
type: 'service',
productType: 'protectMembrane',
path: 'paintProtect',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC010",
"productName":"膨胀金",
"category":"服务类",
prodImg: `${IMG_URL}index/prod2/prod5-0.png`,
tabList: ['项目介绍', '活动方案', '销售场景', '合作案例', '合作方式', 'FAQ']
}
],
//无视频时显示的图片
noVideoPicture: [],
videoList:[
{
videoUrl: `${videoBaseUrl}video/expansive_activity.mp4`,
posterUrl: `${IMG_URL}index/poster/expansive_activity.png`,
name: '如何利用膨胀金服务帮助门店锁客返厂',
manufacturer: '嘀加智慧',
view: 3298
}
],
posterList:[]
},
// { // {
// name: '3年以上', // name: '3年以上',
// img: 'scene_talk.png', // img: 'scene_talk.png',
......
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/customer_auto.mp4`,
posterUrl: `${IMG_URL}index/poster/customer_auto.png`,
name: '门店企微福利官实现客户活跃自动化',
manufacturer: '嘀加智慧',
view: 188
},
{
videoUrl: `${IMG_URL2}video/fix_insurance.mp4`,
posterUrl: `${IMG_URL}index/poster/fix_insurance.png`,
name: '定保数字化招揽,助力定保招揽返厂率提升10%',
manufacturer: '嘀加智慧云',
view: 188
}
]
const videoList1 = [
{
videoUrl: `${IMG_URL2}video/car_rescue.mp4`,
posterUrl: `${IMG_URL}index/poster/car_rescue.png`,
name: '车主返厂维修利器--事故车救援订阅',
manufacturer: '嘀加智慧',
view: 1320
}
]
const subscriptionSystemData = [
{
name: '客户沉淀',
//场景详情图片
// sceneImgs: sceneImgs5,
// 产品详情图片
productImgs: productImgs0,
"sceneCode":"SC005",
productList: [
{
id: 0,
currentIndex: 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,
currentIndex: 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,
"sceneCode":"SC006",
// 产品详情图片
productImgs: productImgs0,
productList: [
{
id: 2,
currentIndex: 0,
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: videoList1
// posterList: posterList0
},
{
name: '数字化转型案例',
"sceneCode":"SC007",
productList: [],
videoList: videoList0.concat(videoList1)
}
]
module.exports = {
// systemData,
subscriptionBannerUrl,
subscriptionSystemData
}
...@@ -3,6 +3,7 @@ import { IMG_URL } from '~/utils/constantData.js' ...@@ -3,6 +3,7 @@ import { IMG_URL } from '~/utils/constantData.js'
// import Util from '~/utils/util.js' // import Util from '~/utils/util.js'
import { deleteSecond } from '~/utils/format' import { deleteSecond } from '~/utils/format'
import { senceData } from './constant/data' import { senceData } from './constant/data'
import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`, arrow: `${IMG_URL}/index/point.png`,
actArrow: `${IMG_URL}/index/actArrow.png` actArrow: `${IMG_URL}/index/actArrow.png`
...@@ -10,8 +11,8 @@ const IMAGES = Object.freeze({ ...@@ -10,8 +11,8 @@ const IMAGES = Object.freeze({
// `${IMG_URL}index/car2.png`, // `${IMG_URL}index/car2.png`,
//本地图片路径 //本地图片路径
let IMG_URLLocal = '../../../images/' let IMG_URLLocal = '../../../images/'
import { productBysceneApi, unreadApi, pageApi, readApi, tagApi, battleMessageApi } from '~/api/index.js' import { productBysceneApi, pageApi, tagApi, battleMessageApi } from '~/api/index.js'
let leftMenuIndex = 0
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
/** /**
...@@ -28,8 +29,9 @@ Page({ ...@@ -28,8 +29,9 @@ Page({
dataArr: [], dataArr: [],
apiData: [], apiData: [],
actNum: 3, //car 场景选择 actNum: 3, //car 场景选择
tabIndx: 1, tabIndx: 0,
navList: ['看线索', '看产品'], // navList: ['看线索', '看产品'],
navList: ['看产品', '系统订阅'],
// 预估弹框 // 预估弹框
visible: false, visible: false,
...@@ -53,10 +55,66 @@ Page({ ...@@ -53,10 +55,66 @@ Page({
headerHeight: 0, headerHeight: 0,
unreadClueCount: 0, unreadClueCount: 0,
img_version: '0.1.1', img_version: '0.1.1',
subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
subscriptionSystemData: Object.freeze(subscriptionSystemData)
},
proClick(e) {
let { detail } = e
//登录的用户手机号
let userInfo = wx.$storage.get("userInfo");
let obj = {
// || 99
actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的
activeNavIdx: detail.id, //选中的产品,
phone: userInfo.phone
}
wx.$router.go('/packagesList/pages/productDetail/productDetail', obj)
},
// 跳转视频详情
videoClick(e) {
const { name } = e.target.dataset
const {
index,
info: { videoUrl },
scenIndex,
list
} = e.detail
const videoList = list
let userInfo = wx.$storage.get("userInfo")
const obj = {
index,
videoList,
scenIndex: isNaN(scenIndex) ? 99 : scenIndex,
videoUrl: videoUrl,
phone: userInfo.phone
}
if (name == '系统订阅') {
obj.leftMenuIndex = leftMenuIndex
}
wx.$router.go('/packagesList/pages/videoDetal/videoDetal', obj)
},
// 跳转活动页
activityClick(e) {
const id = e.detail
let userInfo = wx.$storage.get("userInfo");
wx.$router.go('/packagesList/pages/activityDetail/activityDetail', {
phone: userInfo.phone, id
})
},
// 场景跳转
senceClick(e) {
const { scenIndex } = e.detail
let userInfo = wx.$storage.get("userInfo");
wx.$router.go('/packagesList/pages/scenarioDetail/scenarioDetail', {
actNum: scenIndex,
phone: userInfo.phone
})
}, },
//引导图 //引导图
guideFn() { guideFn() {
if (this.data.guideSrcIndex === 5) { if (this.data.guideSrcIndex === 4) {
this.setData({ this.setData({
guideShow: false guideShow: false
}) })
...@@ -72,13 +130,10 @@ Page({ ...@@ -72,13 +130,10 @@ Page({
// navbar高度设置 // navbar高度设置
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail
// console.log('height, statusBarHeight: ', height, statusBarHeight);
this.setData({ this.setData({
headerHeight: height / 2 + statusBarHeight, headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88 * 2 // headerHeight: height / 2 + statusBarHeight + 88 * 2
}) })
// console.log(e)
// console.log(this.data.headerHeight)
}, },
selectCar(e) { selectCar(e) {
let actNum = e.detail let actNum = e.detail
...@@ -88,7 +143,7 @@ Page({ ...@@ -88,7 +143,7 @@ Page({
}, },
// 头部看线索,产品切换 // 头部看线索,产品切换
changeTabIndx(e) { changeTabIndx(e) {
console.log('e.detail: ', e.detail) // console.log('e.detail: ', e.detail)
let { sessionId } = wx.$storage.get() let { sessionId } = wx.$storage.get()
// console.log("sessionId: ", sessionId); // console.log("sessionId: ", sessionId);
let param = { let param = {
...@@ -99,21 +154,15 @@ Page({ ...@@ -99,21 +154,15 @@ Page({
this.setData({ this.setData({
tabIndx: e.detail tabIndx: e.detail
}) })
//标记线索已读
if (e.detail == 0 && first) {
first = false
readApi(param)
}
}, },
//看产品下拉刷新 //看产品下拉刷新
refresherrefresh() { refresherrefresh() {
let { tabIndx } = this.data let { tabIndx } = this.data
if (tabIndx == 1) { if (tabIndx == 0) {
// 看产品 // 看产品
this.getProductByscene() this.getProductByscene()
// // 看线索 // // 看线索
// this.getClueInit() // this.getClueInit()
this.getUnreadApi()
wx.pro.showToast({ wx.pro.showToast({
title: '刷新成功', title: '刷新成功',
icon: 'loading', icon: 'loading',
...@@ -123,12 +172,12 @@ Page({ ...@@ -123,12 +172,12 @@ Page({
}, },
// 跳转咨询页面 // 跳转咨询页面
goConsult() { goConsult() {
console.log('跳转到咨询页面') // console.log('跳转到咨询页面')
wx.pro.openCustomerServiceChat({ wx.pro.openCustomerServiceChat({
extInfo: { url: 'https://work.weixin.qq.com/kfid/kfcf7b721472201345e' }, extInfo: { url: 'https://work.weixin.qq.com/kfid/kfcf7b721472201345e' },
corpId: 'ww047bdc0f1e76cc13', corpId: 'ww047bdc0f1e76cc13',
complete: r => { complete: r => {
console.log(r) // console.log(r)
} }
}) })
}, },
...@@ -145,7 +194,7 @@ Page({ ...@@ -145,7 +194,7 @@ Page({
// }) // })
}, },
clickDialog(e) { clickDialog(e) {
console.log(e.changedTouches[0].clientY) // console.log(e.changedTouches[0].clientY)
if (e.changedTouches[0].clientY < 352) { if (e.changedTouches[0].clientY < 352) {
this.setData({ this.setData({
visible: false, visible: false,
...@@ -156,12 +205,11 @@ Page({ ...@@ -156,12 +205,11 @@ Page({
}, },
// 提交测算 // 提交测算
submit(e) { submit(e) {
console.log(e)
let sales = e ? +e.detail.value.sales : this.data.formData.sales let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow let flow = e ? +e.detail.value.flow : this.data.formData.flow
console.log('flow', sales, flow) // console.log('flow', sales, flow)
const reg = /^[1-9]\d*$/ const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---') // console.log(reg.test(sales), flow, '---')
if (!reg.test(sales)) { if (!reg.test(sales)) {
wx.showToast({ wx.showToast({
title: '门店月平均新车销量应为正整数', title: '门店月平均新车销量应为正整数',
...@@ -190,7 +238,7 @@ Page({ ...@@ -190,7 +238,7 @@ Page({
let name = `senceData[${index}].productList[${lastIndex}].profit` let name = `senceData[${index}].productList[${lastIndex}].profit`
let flowKey = `senceData[${index}].productList[${lastIndex}].flow` let flowKey = `senceData[${index}].productList[${lastIndex}].flow`
let profit = _this.formula(i.productType, sales, flow) let profit = _this.formula(i.productType, sales, flow)
console.log(name, profit) // console.log(name, profit)
this.setData({ this.setData({
[name]: profit, [name]: profit,
[sale]: sales, [sale]: sales,
...@@ -274,8 +322,8 @@ Page({ ...@@ -274,8 +322,8 @@ Page({
profit = (flow * 2880 * 0.9 * 0.015).toFixed(0) profit = (flow * 2880 * 0.9 * 0.015).toFixed(0)
break break
} }
console.log(profit.length) // console.log(profit.length)
console.log(productType, sales, flow, profit) // console.log(productType, sales, flow, profit)
if (profit.length > 9) { if (profit.length > 9) {
return (profit / 10000).toFixed(0) + '万' return (profit / 10000).toFixed(0) + '万'
} else { } else {
...@@ -313,7 +361,6 @@ Page({ ...@@ -313,7 +361,6 @@ Page({
this.getProductByscene() this.getProductByscene()
// // 看线索 // // 看线索
// this.getClueInit() // this.getClueInit()
this.getUnreadApi()
// //第一次进来储缓存,以后不再用引导图 // //第一次进来储缓存,以后不再用引导图
let firstLogin = wx.$storage.get('firstLogin') let firstLogin = wx.$storage.get('firstLogin')
...@@ -414,16 +461,6 @@ Page({ ...@@ -414,16 +461,6 @@ Page({
} }
}) })
}, },
//未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param)
if (code == 0) {
this.setData({
unreadClueCount: data.unreadClueCount
})
}
},
onReachBottom() { onReachBottom() {
console.log('滑到底部了') console.log('滑到底部了')
}, },
...@@ -453,7 +490,7 @@ Page({ ...@@ -453,7 +490,7 @@ Page({
// } // }
// debugger // debugger
}) })
.catch(err => {}) .catch(err => { })
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -497,24 +534,31 @@ Page({ ...@@ -497,24 +534,31 @@ Page({
gotoApply() { gotoApply() {
wx.$router.go('/packagesList/apply/pages/apply') wx.$router.go('/packagesList/apply/pages/apply')
}, },
/** 系统订阅 */
sysMenuClick(e) {
console.log(e)
const { id } = e.detail
leftMenuIndex = id
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
onShareTimeline: function () {} onShareTimeline: function () { }
}) })
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"usingComponents": { "usingComponents": {
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"indexProduct": "./components/indexProduct/indexProduct", "indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue" "indexClue": "./components/indexClue/indexClue",
"gl-subscription": "glsx-applet-component/subscription/index"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 50 "onReachBottomDistance": 50
......
...@@ -11,6 +11,7 @@ page { ...@@ -11,6 +11,7 @@ page {
} }
.reclaim { .reclaim {
background: #fff;
.header-wrap { .header-wrap {
position: sticky; position: sticky;
...@@ -120,7 +121,8 @@ page { ...@@ -120,7 +121,8 @@ page {
border-radius: 50%; border-radius: 50%;
z-index: 2; z-index: 2;
} }
.bus-pro{
.bus-pro {
position: fixed; position: fixed;
right: -4px; right: -4px;
top: 60%; top: 60%;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
bindclick="changeTabIndx" bindclick="changeTabIndx"
class="tabContainer" /> class="tabContainer" />
</navigation-bar> </navigation-bar>
<view class="reclaim" style="{{tabIndx == 1 ? 'background: #fff;' : ''}}"> <view class="reclaim">
<!-- 头部 --> <!-- 头部 -->
<view class="header-wrap" style="height:{{headerHeight}}px; background-image: url('{{IMG_URL}}index/head.png')"> <view class="header-wrap" style="height:{{headerHeight}}px; background-image: url('{{IMG_URL}}index/head.png')">
<!-- <view class="header"> --> <!-- <view class="header"> -->
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</view> </view>
<!-- 托客户内容 --> <!-- 托客户内容 -->
<indexProduct <indexProduct
wx:if="{{tabIndx == 1 }}" wx:if="{{tabIndx == 0 }}"
bindselectCar="selectCar" bindselectCar="selectCar"
senceData="{{senceData}}" senceData="{{senceData}}"
actNum="{{actNum}}" actNum="{{actNum}}"
...@@ -31,12 +31,16 @@ ...@@ -31,12 +31,16 @@
headerHeight="{{headerHeight}}" headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" /> bindrefresherrefresh="refresherrefresh" />
<!-- 看线索内容 --> <!-- 看线索内容 -->
<indexClue <!-- <indexClue
id="indexclue" id="indexclue"
wx:if="{{tabIndx == 0 }}" wx:if="{{tabIndx == 1 }}"
headerHeight="{{headerHeight}}" headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}" disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" /> bindshowToggleToast="showToggleToast" /> -->
<!-- <view wx:if="{{tabIndx == 1}}">系统订阅</view> -->
<block wx:if="{{tabIndx == 1}}">
<gl-subscription list="{{subscriptionSystemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bindactivityClick="activityClick" bind:proClick="proClick" bind:videoClick="videoClick" bind:senceClick="senceClick" bindcurrentScen="getCurrentScen" data-name="系统订阅"/>
</block>
</view> </view>
<!-- 收藏、取消提示框 --> <!-- 收藏、取消提示框 -->
<vas-toast id='toast' /> <vas-toast id='toast' />
...@@ -46,7 +50,7 @@ ...@@ -46,7 +50,7 @@
webp webp
bindtap="guideFn" bindtap="guideFn"
class="guide-img" class="guide-img"
src="{{IMG_URL}}index/guide{{guideSrcIndex}}.webp?v={{img_version}}" /> src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png?v={{img_version}}" />
</view> </view>
<!-- 在线客服 --> <!-- 在线客服 -->
<image <image
...@@ -66,7 +70,7 @@ ...@@ -66,7 +70,7 @@
class="output-value" class="output-value"
bindtap="showCalculate" bindtap="showCalculate"
src="{{IMG_URL}}index/valuation.png" src="{{IMG_URL}}index/valuation.png"
wx:if="{{tabIndx == 1}}" /> wx:if="{{tabIndx == 0}}" />
<!-- 预估产值弹框 --> <!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}"> <view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box"> <view class="dialog-box">
......
...@@ -5,8 +5,10 @@ import mineApi from '~/api/mineApi/index' ...@@ -5,8 +5,10 @@ import mineApi from '~/api/mineApi/index'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
icon0: `/personal/icon1.png`, icon0: `/personal/icon1.png`,
icon1: `/personal/icon2.png`, icon1: `/personal/icon2.png`,
icon2: `/personal/icon3.png`,
userAvatarUrl: `/personal/userAvatarUrl.png` userAvatarUrl: `/personal/userAvatarUrl.png`
}) })
import { unreadApi, readApi } from '~/api/index.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -14,12 +16,29 @@ Page({ ...@@ -14,12 +16,29 @@ Page({
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
IMAGES, IMAGES,
isRead: false, // isRead: false,
test: `/personal/icon2.png` test: `/personal/icon2.png`,
boxItemList: [{
name: '客户管理',
path: 'packagesList.customerManagement'
}, {
name: '消息盒子',
path: 'packagesList.messageBox',
hasRedPot: true,
isRead: false
}, {
name: '看线索',
path: 'packagesList.clue',
hasRedPot: true,
isRead: false
}]
}, },
navGO(e) { navGO(e) {
let { path } = e.currentTarget.dataset let { path, item } = e.currentTarget.dataset
// console.log(path) console.log(item)
if(item.name == "看线索") {
this.clueRead()
}
wx.$router.go(path) wx.$router.go(path)
}, },
logout() { logout() {
...@@ -65,21 +84,51 @@ Page({ ...@@ -65,21 +84,51 @@ Page({
}, },
messageBoxPageIsRead() { messageBoxPageIsRead() {
let { serviceMerchantId } = this.data let { serviceMerchantId } = this.data
const idx = this.data.boxItemList.findIndex(item => item.name == '消息盒子')
mineApi mineApi
.messageBoxPageIsRead({ .messageBoxPageIsRead({
serviceMerchantId serviceMerchantId
}) })
.then(result => { .then(result => {
console.log(result) console.log(result, 'result')
this.setData({ this.setData({
isRead: result, ['boxItemList[' + idx + ']isRead']: result
test: `/personal/icon2.png`
}) })
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
}) })
}, },
//看线索-未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param)
const idx = this.data.boxItemList.findIndex(item => item.name == '看线索')
if (code == 0) {
this.setData({
['boxItemList[' + idx + ']isRead']: !!data.unreadClueCount
})
}
},
// 看线索-标记已读
clueRead() {
let { sessionId } = wx.$storage.get()
const idx = this.data.boxItemList.findIndex(item => item.name == '看线索')
// console.log("sessionId: ", sessionId);
let param = {
sessionId
}
readApi(param).then(res => {
let { code } = res
if (code == 0) {
this.setData({
['boxItemList[' + idx + ']isRead']: !data.unreadClueCount
})
}
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -95,37 +144,38 @@ Page({ ...@@ -95,37 +144,38 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.messageBoxPageIsRead() this.messageBoxPageIsRead()
this.getUnreadApi()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {} onShareAppMessage: function () { }
}) })
...@@ -14,7 +14,14 @@ ...@@ -14,7 +14,14 @@
</view> </view>
<view class="utilBoxTitle">常用工具</view> <view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon"> <view class="boxItemCon">
<view class="item" data-path="packagesList.customerManagement" bind:tap="navGO"> <view wx:for="{{boxItemList}}" wx:key="index" class="item" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" />
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view>
<view class="name">{{item.name}}</view>
</view>
<!-- <view class="item" data-path="packagesList.customerManagement" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<glsx-image class="img" src="{{IMAGES.icon0}}" /> <glsx-image class="img" src="{{IMAGES.icon0}}" />
</view> </view>
...@@ -23,22 +30,12 @@ ...@@ -23,22 +30,12 @@
<view class="item" data-path="packagesList.messageBox" bind:tap="navGO"> <view class="item" data-path="packagesList.messageBox" bind:tap="navGO">
<view class="imgcon"> <view class="imgcon">
<view class="redPot" hidden="{{!isRead}}" /> <view class="redPot" hidden="{{!isRead}}" />
<!-- <image class="img" src="{{IMAGES.icon1}}" /> -->
<glsx-image class="img" src="{{test}}" /> <glsx-image class="img" src="{{test}}" />
<!-- <image class="img" src="{{IMAGES.icon1}}" /> -->
</view> </view>
<view class="name">消息盒子</view> <view class="name">消息盒子</view>
</view> -->
</view> </view>
</view> <button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
<button
class="logoutBtn"
size="default"
type="default"
isabled="{{false}}"
loading="{{false}}"
bindtap="logout"
hover-class="button-hover">
退出登录 退出登录
</button> </button>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,8 @@ import { IMG_URL } from "~/utils/constantData.js"; ...@@ -4,7 +4,8 @@ import { IMG_URL } from "~/utils/constantData.js";
import { senceData } from "~/pages/tab/index/constant/data"; import { senceData } from "~/pages/tab/index/constant/data";
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util.js' import utils from '~/utils/util.js'
import {getActiveApi} from "~/api/viewprod" import { getActiveApi } from "~/api/viewprod"
const norTabList = ['项目亮点', '合作案例', '合作方式', '适配产品']
Page({ Page({
/** /**
...@@ -15,18 +16,19 @@ Page({ ...@@ -15,18 +16,19 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
senceData, senceData,
isShare:false, //是否是分享出去的 isShare: false, //是否是分享出去的
actNum: 0, actNum: 0,
tabAct: 0, tabAct: 0,
showLeft:false, //更多按钮显示的内容 showLeft: false, //更多按钮显示的内容
scrollTop:0, scrollTop: 0,
img_version: '0.1.0', img_version: '0.1.0',
// 是否授权昵称 // 是否授权昵称
hasUserInfo: false, hasUserInfo: false,
// phone: '', //授权手机号 // phone: '', //授权手机号
prodItemVideo:'', //选中的场景下的video的第一个 prodItemVideo: '', //选中的场景下的video的第一个
activeUrl:'', // 1.3场景才有的活动配置 activeUrl: '', // 1.3场景才有的活动配置
sharephone:'' //主要微信用户,服务商 sharephone: '', //主要微信用户,服务商,
tabList: []
}, },
// 计算属性 // 计算属性
computed: { computed: {
...@@ -35,16 +37,16 @@ Page({ ...@@ -35,16 +37,16 @@ Page({
// 2.点击可以改变状态 // 2.点击可以改变状态
return data.isShare && !data.showLeft return data.isShare && !data.showLeft
}, },
prodItemVideo(data){ prodItemVideo(data) {
let {senceData,actNum,activeNavIdx} = data let { senceData, actNum, activeNavIdx } = data
// return senceData[actNum]?.productList[activeNavIdx] // return senceData[actNum]?.productList[activeNavIdx]
if(actNum == 2){ if (actNum == 2) {
return senceData[actNum]?.noVideoPicture[0] return senceData[actNum]?.noVideoPicture[0]
} }
return senceData[actNum]?.videoList[activeNavIdx] return senceData[actNum]?.videoList[activeNavIdx]
}, },
// 授权昵称弹框显示 // 授权昵称弹框显示
authNcknameShow(data){ authNcknameShow(data) {
return data.isShare && !data.hasUserInfo return data.isShare && !data.hasUserInfo
} }
...@@ -59,8 +61,8 @@ Page({ ...@@ -59,8 +61,8 @@ Page({
this.isgetAuthphone() this.isgetAuthphone()
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
let { actNum, activeNavIdx, isShare,sharephone } = options let { actNum, activeNavIdx, isShare, sharephone } = options
if(isShare){ if (isShare) {
wx.hideHomeButton() wx.hideHomeButton()
} }
...@@ -68,20 +70,21 @@ Page({ ...@@ -68,20 +70,21 @@ Page({
actNum, actNum,
activeNavIdx, activeNavIdx,
isShare, isShare,
sharephone sharephone,
tabList: senceData[actNum]?.productList[activeNavIdx].tabList || norTabList
}); });
//分享数据 //分享数据
let senceItem = senceData[actNum] let senceItem = senceData[actNum]
let item = senceData[actNum]?.productList[activeNavIdx] let item = senceData[actNum]?.productList[activeNavIdx]
console.log('title',item.productName) console.log('title', item.productName)
setTimeout(() => { setTimeout(() => {
// wx.setNavigationBarTitle({ // wx.setNavigationBarTitle({
// title: " "+item.productName, // title: " "+item.productName,
// }); // });
utils.setNavigationBarTitle(item.productName) utils.setNavigationBarTitle(item.productName)
},100) }, 100)
let wx_user_info = wx.$storage.get('wx_user_info'), let wx_user_info = wx.$storage.get('wx_user_info'),
shareOpenId = wx_user_info.openId || '' shareOpenId = wx_user_info.openId || ''
...@@ -95,7 +98,7 @@ Page({ ...@@ -95,7 +98,7 @@ Page({
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
productDesc: item?.productName, productDesc: item?.productName,
shareOpenId:shareOpenId shareOpenId: shareOpenId
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
} }
...@@ -104,12 +107,13 @@ Page({ ...@@ -104,12 +107,13 @@ Page({
//接受跳转的路由参数(小程序页面跳转) //接受跳转的路由参数(小程序页面跳转)
onRoute(options) { onRoute(options) {
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0,phone=123 } = options; let { actNum = 0, activeNavIdx = 0, phone = 123 } = options;
this.setData({ this.setData({
actNum, //选中的场景下标 actNum, //选中的场景下标
activeNavIdx, //选中的产品 activeNavIdx, //选中的产品
sharephone:phone //联系电话 (登陆的用户) sharephone: phone, //联系电话 (登陆的用户)
tabList: senceData[actNum]?.productList[activeNavIdx].tabList || norTabList
}); });
// 设置转发标题 // 设置转发标题
...@@ -122,14 +126,14 @@ Page({ ...@@ -122,14 +126,14 @@ Page({
//分享数据 //分享数据
let item = senceData[actNum]?.productList[activeNavIdx] let item = senceData[actNum]?.productList[activeNavIdx]
console.log('title2',item.productName) console.log('title2', item.productName)
setTimeout(() => { setTimeout(() => {
// wx.setNavigationBarTitle({ // wx.setNavigationBarTitle({
// title: " "+item.productName, // title: " "+item.productName,
// }); // });
utils.setNavigationBarTitle(item.productName) utils.setNavigationBarTitle(item.productName)
},100) }, 100)
//分享人openId //分享人openId
let wx_user_info = wx.$storage.get('wx_user_info'), let wx_user_info = wx.$storage.get('wx_user_info'),
...@@ -143,7 +147,7 @@ Page({ ...@@ -143,7 +147,7 @@ Page({
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
productDesc: item?.productName, productDesc: item?.productName,
shareOpenId:shareOpenId shareOpenId: shareOpenId
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
// apiData, // apiData,
...@@ -151,22 +155,22 @@ Page({ ...@@ -151,22 +155,22 @@ Page({
}, },
//获取配置url //获取配置url
async getActiveApiFn(){ async getActiveApiFn() {
let {code,data} = await getActiveApi() let { code, data } = await getActiveApi()
if(code == 0){ if (code == 0) {
this.setData({ this.setData({
activeUrl: data activeUrl: data
}) })
} }
}, },
// 是否已经查看详情 // 是否已经查看详情
isgetAuthphone(){ isgetAuthphone() {
let authphone = wx.$storage.get("authphone"); let authphone = wx.$storage.get("authphone");
if(authphone){ if (authphone) {
// 显示后面的内容 // 显示后面的内容
setTimeout(() => { setTimeout(() => {
this.getImgHeight() this.getImgHeight()
},300) }, 300)
this.setData({ this.setData({
showLeft: true showLeft: true
...@@ -201,16 +205,16 @@ Page({ ...@@ -201,16 +205,16 @@ Page({
// wx.$eventbus.emit('evt_page_scroll', { scrollTop: e.scrollTop }) // wx.$eventbus.emit('evt_page_scroll', { scrollTop: e.scrollTop })
wx.nextTick(() => { wx.nextTick(() => {
let idx let idx
if(imgTopArr[0]>e.scrollTop){ if (imgTopArr[0] > e.scrollTop) {
idx = 0 idx = 0
}else if(imgTopArr[imgTopArr.length-1]>e.scrollTop && imgTopArr[0]<e.scrollTop){ } else if (imgTopArr[imgTopArr.length - 1] > e.scrollTop && imgTopArr[0] < e.scrollTop) {
idx = imgTopArr.findIndex((item) => item >e.scrollTop) - 1; idx = imgTopArr.findIndex((item) => item > e.scrollTop) - 1;
} else{ } else {
idx = imgTopArr.length-1 idx = imgTopArr.length - 1
} }
this.setData({ this.setData({
tabAct: idx, tabAct: idx,
scrollTop:e.scrollTop scrollTop: e.scrollTop
}); });
}); });
}, 100); }, 100);
...@@ -229,7 +233,7 @@ Page({ ...@@ -229,7 +233,7 @@ Page({
let imgTopArr = []; let imgTopArr = [];
let s = 0; let s = 0;
let top; let top;
let {scrollTop} = this.data let { scrollTop } = this.data
let _this = this; let _this = this;
query query
...@@ -299,7 +303,7 @@ Page({ ...@@ -299,7 +303,7 @@ Page({
// 显示后面的内容 // 显示后面的内容
setTimeout(() => { setTimeout(() => {
this.getImgHeight() this.getImgHeight()
},300) }, 300)
this.setData({ this.setData({
showLeft: true showLeft: true
...@@ -346,45 +350,54 @@ Page({ ...@@ -346,45 +350,54 @@ Page({
}) })
}, },
// 1.3查看活动详情按钮 // 1.3查看活动详情按钮
checkActive(){ checkActive() {
// 跳转 // 跳转
// console.log('跳转') // console.log('跳转')
let {activeUrl} = this.data let { activeUrl } = this.data
wx.$router.jumpH5(activeUrl); wx.$router.jumpH5(activeUrl);
}, },
// 长按图片
handleLongPress(e) {
let { actnum, index } = e.target.dataset
// 膨胀金活动,合作方式
if (actnum == 4 && index == 4) {
wx.$router.jumpH5('https://scrm.glsx.com.cn/frontpdf/expand_agreement.pdf');
}
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, onShareAppMessage() { },
/** /**
* 浏览埋点 * 浏览埋点
*/ */
onShareTimeline() {}, onShareTimeline() { },
onViewTrack: true onViewTrack: true
}); });
...@@ -212,6 +212,36 @@ page { ...@@ -212,6 +212,36 @@ page {
width: 100%; width: 100%;
height: 2002rpx; height: 2002rpx;
} }
// // 流程图五
.img-item40 {
width: 100%;
height: 1564rpx;
}
.img-item41 {
width: 100%;
height: 1224rpx;
}
.img-item42 {
width: 100%;
height: 1148rpx;
}
.img-item43 {
width: 100%;
height: 3504rpx;
}
.img-item44 {
width: 100%;
height: 2220rpx;
}
.img-item45 {
width: 100%;
height: 1092rpx;
}
} }
} }
/* 用户授权 */ /* 用户授权 */
......
<view class="view-prod"> <view class="view-prod">
<!-- 有视频 --> <!-- 有视频 -->
<block > <block>
<video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}"></video> <video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}"></video>
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" /> <image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<view class="title-wrap"> <view class="title-wrap">
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
<!-- <image class="no-video" wx:if="{{actNum == 2}}" src="{{IMG_URL}}index/poster/no-video.png?v={{img_version}}" /> --> <!-- <image class="no-video" wx:if="{{actNum == 2}}" src="{{IMG_URL}}index/poster/no-video.png?v={{img_version}}" /> -->
<view class="tab-wrap"> <view class="tab-wrap">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}"> <van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab title="项目亮点"></van-tab> <van-tab wx:for="{{tabList}}" title="{{item}}" wx:key="idnex" />
<!-- <van-tab title="项目亮点"></van-tab>
<van-tab title="合作案例"></van-tab> <van-tab title="合作案例"></van-tab>
<van-tab title="合作方式"></van-tab> <van-tab title="合作方式"></van-tab>
<van-tab title="适配产品"></van-tab> <van-tab title="适配产品"></van-tab> -->
</van-tabs> </van-tabs>
</view> </view>
<view class="prod-detail"> <view class="prod-detail">
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
<image wx:if="{{ index < 3}}" webp class="img-item img-item{{index}} img-item{{actNum}}{{index}}" src="{{item}}?v={{img_version}}"> <image wx:if="{{ index < 3}}" webp class="img-item img-item{{index}} img-item{{actNum}}{{index}}" src="{{item}}?v={{img_version}}">
<block wx:if="{{ index == 0}}"> <block wx:if="{{ index == 0}}">
<!-- && phone --> <!-- && phone -->
<view class="phone" bindtap="phoneCall" data-phone="{{phone}}"> <view class="phone" bindtap="phoneCall" data-phone="{{sharephone}}">
<!-- <image src="{{IMGURL}}share-phone.png?v={{img_version}}" class="icon"></image> --> <!-- <image src="{{IMGURL}}share-phone.png?v={{img_version}}" class="icon"></image> -->
<glsx-image webp src="index/phone.png" class="icon"></glsx-image> <glsx-image webp src="index/phone.png" class="icon"></glsx-image>
请联系我 请联系我
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
</button> </button>
</block> </block>
</image> </image>
<image wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item img-item{{index}} img-item{{actNum}}{{index}}" src="{{item}}?v={{img_version}}"> <image wx:if="{{ index >= 3 && !showLeftFlag}}" webp class="img-item img-item{{index}} img-item{{actNum}}{{index}}" src="{{item}}?v={{img_version}}" bindlongpress="handleLongPress" data-actnum="{{actNum}}" data-index="{{index}}">
</image> </image>
</block> </block>
<view class="occupancy" wx:if="{{!isShare}}"> <view class="occupancy" wx:if="{{!isShare}}">
......
...@@ -5,6 +5,7 @@ import { senceData } from "~/pages/tab/index/constant/data"; ...@@ -5,6 +5,7 @@ import { senceData } from "~/pages/tab/index/constant/data";
import USERAPI from "~/api/usersApi/index"; import USERAPI from "~/api/usersApi/index";
import utils from "~/utils/util.js"; import utils from "~/utils/util.js";
import { getActiveApi } from "~/api/viewprod"; import { getActiveApi } from "~/api/viewprod";
const norTabList = ['项目亮点', '合作案例', '合作方式', '适配产品']
Page({ Page({
/** /**
...@@ -25,6 +26,7 @@ Page({ ...@@ -25,6 +26,7 @@ Page({
hasUserInfo: false, hasUserInfo: false,
phone: "", //授权手机号 phone: "", //授权手机号
prodItemVideo: "", //选中的场景下的video的第一个 prodItemVideo: "", //选中的场景下的video的第一个
tabList: []
}, },
// 计算属性 // 计算属性
computed: { computed: {
...@@ -66,6 +68,7 @@ Page({ ...@@ -66,6 +68,7 @@ Page({
activeNavIdx, activeNavIdx,
isShare, isShare,
phone, phone,
tabList: senceData[actNum]?.tabList || norTabList
}); });
// 分享描述 // 分享描述
this.shareTitle = `给你分享一个${senceData[actNum]?.tabname},戳我参与~`; this.shareTitle = `给你分享一个${senceData[actNum]?.tabname},戳我参与~`;
...@@ -105,6 +108,7 @@ Page({ ...@@ -105,6 +108,7 @@ Page({
actNum, //选中的场景下标 actNum, //选中的场景下标
activeNavIdx, //选中的产品 activeNavIdx, //选中的产品
phone, //联系电话 phone, //联系电话
tabList: senceData[actNum]?.tabList || norTabList
}); });
// 设置转发标题 // 设置转发标题
......
...@@ -192,6 +192,35 @@ page { ...@@ -192,6 +192,35 @@ page {
.img-item33 { .img-item33 {
width: 100%; width: 100%;
height: 2002rpx; height: 2002rpx;
}// // 流程图五
.img-item40 {
width: 100%;
height: 1564rpx;
}
.img-item41 {
width: 100%;
height: 1224rpx;
}
.img-item42 {
width: 100%;
height: 1148rpx;
}
.img-item43 {
width: 100%;
height: 3504rpx;
}
.img-item44 {
width: 100%;
height: 2220rpx;
}
.img-item45 {
width: 100%;
height: 1092rpx;
} }
} }
} }
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
<!-- <image class="no-video" wx:if="{{actNum == 2}}" src="{{IMG_URL}}index/poster/no-video.png?v={{img_version}}" /> --> <!-- <image class="no-video" wx:if="{{actNum == 2}}" src="{{IMG_URL}}index/poster/no-video.png?v={{img_version}}" /> -->
<view class="tab-wrap"> <view class="tab-wrap">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}"> <van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab title="项目亮点"></van-tab> <van-tab wx:for="{{tabList}}" title="{{item}}" wx:key="idnex" />
<!-- <van-tab title="项目亮点"></van-tab>
<van-tab title="合作案例"></van-tab> <van-tab title="合作案例"></van-tab>
<van-tab title="合作方式"></van-tab> <van-tab title="合作方式"></van-tab>
<van-tab title="适配产品"></van-tab> <van-tab title="适配产品"></van-tab> -->
</van-tabs> </van-tabs>
</view> </view>
<view class="prod-detail"> <view class="prod-detail">
......
{ {
"appid": "wx24ebae5768e74138", "appid": "wx2c28337db96364d2",
"projectname": "business-assistant", "projectname": "business-assistant",
"compileType": "miniprogram", "compileType": "miniprogram",
"packOptions": { "packOptions": {
......
...@@ -20,7 +20,7 @@ class Request { ...@@ -20,7 +20,7 @@ class Request {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
} }
: {} : {}
let projectName = this.getRopProject(params.method) let projectName = params.apiProjectName || this.getRopProject(params.method)
if (!projectName) projectName = this.getRopProject(params.method) if (!projectName) projectName = this.getRopProject(params.method)
let path = pathEnum[projectName] let path = pathEnum[projectName]
if (!path) path = `/rop-scrm-${projectName}/` if (!path) path = `/rop-scrm-${projectName}/`
...@@ -60,7 +60,7 @@ class Request { ...@@ -60,7 +60,7 @@ class Request {
} else { } else {
// console.trace(data) // console.trace(data)
wx.showToast({ wx.showToast({
title: message || '系统异常', title: message || '网络请求失败',
icon: 'none' icon: 'none'
}) })
} }
...@@ -70,7 +70,7 @@ class Request { ...@@ -70,7 +70,7 @@ class Request {
wx.hideLoading() wx.hideLoading()
console.log(`接口异常:`, error) console.log(`接口异常:`, error)
wx.showToast({ wx.showToast({
title: '系统异常', title: '网络请求失败',
icon: 'error' icon: 'error'
}) })
reject(error) reject(error)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!