Commit 5d38142b by 前端

Merge branch 'develop' into 'master'

saas+v4.16.0上线后,代码合并。

See merge request !25
2 parents 67d62d92 3eecc66b
Showing 80 changed files with 1761 additions and 848 deletions
import api from '~/utils/request/request' import api from '~/utils/request/request'
const common = 'scrm.api.carlife.common.' const common = 'scrm.api.carlife.common.'
import { mockUrl } from '~/utils/request/http'
/** mock */
function getMockApi() {
const url = mockUrl
return new Promise((resolve) => {
wx.request({
url,
data: {},
method: 'GET',
header: {},
dataType: 'json',
responseType: 'text',
success(response) {
resolve(response.data)
}
})
})
}
module.exports = { module.exports = {
commonApi: { commonApi: {
/**上传图片 /**上传图片
...@@ -20,5 +40,17 @@ module.exports = { ...@@ -20,5 +40,17 @@ module.exports = {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
}, },
/** mock */
getMock: getMockApi
},
/** 获取MOCK数据 */
getMockData: async function() {
let mock_data = wx.$storage.get('mock_data')
if (!mock_data) {
const data = await getMockApi()
wx.$storage.set('mock_data', data)
return data
} else return mock_data
} }
} }
...@@ -77,6 +77,14 @@ class outputApi { ...@@ -77,6 +77,14 @@ class outputApi {
}) })
} }
/** 查询门店权益订单数据统计-车险升级活动产值 */
getEquityRevenue(data) {
return api.post({
method: 'scrm.api.busassistant.merchant.equity.statistics',
...data
})
}
/** 店面汇总-下载海报 */ /** 店面汇总-下载海报 */
getPosterUrl(data) { getPosterUrl(data) {
return api.post({ return api.post({
......
...@@ -32,7 +32,7 @@ page { ...@@ -32,7 +32,7 @@ page {
image { image {
width: 100%; width: 100%;
height: 100%; /* height: 100%; */
vertical-align: top; vertical-align: top;
} }
......
// pages/tab/output/components/sceneBox/sceneBox.js // pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import { scenceList } from '~/pages/tab/index/constant/data'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -12,6 +13,10 @@ Component({ ...@@ -12,6 +13,10 @@ Component({
type: Number, type: Number,
value: -1 value: -1
}, },
sceneCodeActive: {
type: String,
value: ''
},
hasOpenIcon: { hasOpenIcon: {
type: Boolean, type: Boolean,
value: true value: true
...@@ -20,9 +25,14 @@ Component({ ...@@ -20,9 +25,14 @@ Component({
type: Boolean, type: Boolean,
value: true value: true
}, },
formData: { sceneInfo: {
type: Object, type: Object,
value: () => {} value: () => {},
observer(n) {
if(n.hasOwnProperty('sceneList')) {
this.findIsOpen()
}
}
}, },
scenePriceList: { scenePriceList: {
type: Array, type: Array,
...@@ -36,33 +46,51 @@ Component({ ...@@ -36,33 +46,51 @@ Component({
data: { data: {
IMGURL: IMG_URL, IMGURL: IMG_URL,
openedIcon: `${IMG_URL}/output/openedIcon.png`, openedIcon: `${IMG_URL}/output/openedIcon.png`,
custSceneList: [ scenceList
{ // custSceneList: [
title: '新车洽谈场景', // {
subTitle: '1.0新车权益升级' // title: '新车洽谈场景',
}, // subTitle: '1.0新车权益升级'
{ // },
title: '新车交付场景', // {
subTitle: '1.1新车精品升级' // title: '新车交付场景',
// subTitle: '1.1新车精品升级'
// },
// {
// title: '0-6个月',
// subTitle: '1.2次新车膨胀金活动'
// },
// {
// title: '6个月以上',
// subTitle: '1.3售后直播众筹活动'
// }
// ]
}, },
{
title: '0-6个月', lifetimes: {
subTitle: '1.2次新车膨胀金活动' attached() {
}, // console.log(this.data.sceneInfo, 'sceneInfo--')
{ // console.log(this.data.scenceList, 'scenceList--')
title: '6个月以上',
subTitle: '1.3售后直播众筹活动'
} }
]
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
findIsOpen() {
let list = JSON.parse(JSON.stringify(this.data.scenceList))
list.forEach(item => {
let obj = this.data.sceneInfo?.sceneList.find(k => k.sceneCode == item.sceneCode) || {}
item.isOpen = obj.flag || false
})
this.setData({
scenceList: list
})
},
handleClick(e) { handleClick(e) {
let { idx } = e.currentTarget.dataset let { idx, scenecode } = e.currentTarget.dataset
this.triggerEvent('handleSceneChange', { sceneIdx: idx }) this.triggerEvent('handleSceneChange', { sceneIdx: idx, sceneCode: scenecode })
} }
} }
}) })
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml --> <!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="/pages/tab/output/index.wxs" module="filter" /> <wxs src="/pages/tab/output/index.wxs" module="filter" />
<view class="flex scene"> <view class="flex scene">
<view class="scene-item {{ (formData['scene' + (index + 1)] && hasOpenIcon) ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}"> <view class="scene-item {{ (item.isOpen && hasOpenIcon) ? 'open' : ''}} {{sceneCodeActive && (sceneCodeActive == item.sceneCode) ? 'active' : ''}}" wx:for="{{scenceList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}" data-scenecode="{{item.sceneCode}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)]}}" class="open-icon"> <view wx:if="{{hasOpenIcon && item.isOpen}}" class="open-icon">
<image src="{{openedIcon}}" webp></image> <image src="{{openedIcon}}" webp></image>
</view> </view>
<image webp wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}"></image> <image webp wx:if="{{item.isOpen}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{item.sceneid + 1}}.png?v={{img_version}}"></image>
<view wx:else class="no-open-img"> <view wx:else class="no-open-img">
<image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}"></image> <image webp wx:if="{{hasLockIcon}}" class="lock-img" src="{{IMGURL}}output/carlock0{{item.sceneid + 1}}.png?v={{img_version}}"></image>
<image webp wx:else="" class="scene-img" src="{{IMGURL}}output/icon-car0{{index + 1}}.png?v={{img_version}}"></image> <image webp wx:else="" class="scene-img" src="{{IMGURL}}output/icon-car0{{item.sceneid + 1}}.png?v={{img_version}}"></image>
</view> </view>
<view class="scene-title {{formData['scene' + (index + 1)] ? '' : 'on-open'}}"> <view class="title-box">
{{item.title}} <view class="scene-title {{item.isOpen ? '' : 'on-open'}}">{{item.name}}</view>
</view> </view>
<view>{{item.subTitle}}</view> <!-- <view>{{item.subTitle}}</view> -->
<view class="total-price" wx:if="{{scenePriceList.length}}"> <view class="total-price" wx:if="{{scenePriceList.length}}">
¥ {{filter.money_three_for_two_thousands(scenePriceList[index].total || 0.00)}} ¥ {{filter.money_three_for_two_thousands(item.isOpen ? (scenePriceList[index].total || 0.00) : 0.00)}}
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -30,11 +30,15 @@ ...@@ -30,11 +30,15 @@
} }
.scene-title { .scene-title {
width: 100rpx;
font-size: 24rpx; font-size: 24rpx;
height: 44rpx;
line-height: 44rpx;
margin: 10rpx 0 4rpx;
font-weight: 600; font-weight: 600;
text-align: center;
color: #323436;
}
.scene-item:nth-child(2) .scene-title {
width: 120rpx;
} }
/* 已开通 - start */ /* 已开通 - start */
...@@ -62,6 +66,10 @@ ...@@ -62,6 +66,10 @@
padding: 4rpx; */ padding: 4rpx; */
} }
.open-icon image {
height: 100%;
}
/* 已开通 - end */ /* 已开通 - end */
/* 选中 - start */ /* 选中 - start */
...@@ -88,9 +96,12 @@ ...@@ -88,9 +96,12 @@
} }
/* 选中 - end */ /* 选中 - end */
.title-box {
.scene-title { height: 68rpx;
color: #323436; display: flex;
justify-content: center;
align-items: center;
margin: 10rpx 0 4rpx;
} }
.scene-title.on-open { .scene-title.on-open {
...@@ -115,7 +126,7 @@ ...@@ -115,7 +126,7 @@
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
margin-top: 22rpx; margin-top: 22rpx;
font-size: 24rpx; font-size: 20rpx;
color: #3666FE; color: #3666FE;
/* font-weight: 600; */ /* font-weight: 600; */
font-family: 'number'; font-family: 'number';
......
// components/Service/Service.js
import { IMG_URL } from '~/utils/constantData'
// const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
Component({
/**
* 组件的属性列表
*/
properties: {
isFixed: {
type: Boolean,
value: true
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
isShow: false
},
/**
* 组件的方法列表
*/
methods: {
handleShow() {
this.setData({
isShow: !this.data.isShow
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/Service/Service.wxss */
.service {
position: fixed;
right: 0rpx;
top: 73%;
z-index: 120;
}
.icon {
width: 64px;
height: 64px;
}
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 998;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(0, 0, 0, .8);
}
.poster {
width: 750rpx !important;
height: 720rpx !important;
border-radius: 0;
}
.close {
margin-top: 60rpx;
width: 64rpx;
height: 64rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--components/Service/Service.wxml-->
<div class="{{isFixed ? 'service' : '' }}">
<image src="{{IMG_URL}}index/service.png" class="icon" bindtap="handleShow"></image>
<view wx:if="{{isShow}}" class="layout">
<view class="bg" bindtap="handleShow" />
<image class="poster" src="{{IMG_URL}}index/service-detail.png" show-menu-by-longpress="{{true}}"></image>
<image src="{{IMG_URL}}index/close.png" class="close" bindtap="handleShow"></image>
</view>
</div>
\ No newline at end of file \ No newline at end of file
// packagesList/pages/productDetail/components/proDetail/proDetail.js // packagesList/pages/productDetail/components/proDetail/proDetail.js
import { senceData, productData } from '~/pages/tab/index/constant/senceData' import { senceData, productData } from '~/pages/tab/index/constant/senceData'
const norTabList = ['项目亮点', '合作案例', '合作方式', '适配产品'] const norTabList = ['海报案例', '测算营销', '产品介绍', '项目亮点']
Component({ Component({
externalClasses: ['custom-class'], externalClasses: ['custom-class'],
/** /**
...@@ -13,7 +13,9 @@ Component({ ...@@ -13,7 +13,9 @@ Component({
value: -1, value: -1,
observer(n) { observer(n) {
this.getInfo() this.getInfo()
this.getImgHeight() if (n == 3) {
this.setVideoCtx()
}
} }
}, },
// 选中的产品 // 选中的产品
...@@ -45,25 +47,45 @@ Component({ ...@@ -45,25 +47,45 @@ Component({
*/ */
data: { data: {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
videoBaseUrl: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/',
productData, productData,
proInfo: {}, proInfo: {},
prodItemVideo: '', //选中的场景下的video的第一个 prodItemVideo: '', //选中的场景下的video的第一个
tabAct: 0, tabAct: 0,
scrollTop: 0, scrollTop: 0,
showCard: false, showCard: false,
tabList: [] tabList: [],
imgTopArr: []
},
lifetimes: {
attached() {
wx.showLoading()
setTimeout(() => {
wx.hideLoading()
this.getImgHeight()
}, 800)
},
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
setVideoCtx() {
this.setData({
videoCtx: wx.createVideoContext('video', this),
crowdVideoCtx: wx.createVideoContext('crowd-video', this)
})
},
handleVideoPlay(e) {
let { attr } = e.currentTarget.dataset
this.data[attr] && this.data[attr].pause()
},
getInfo() { getInfo() {
let { activeNavIdx, actNum } = this.data let { activeNavIdx, actNum } = this.data
//console.log(actNum)
//console.log(activeNavIdx)
const spcList = [99] // 订阅模块需要特殊处理 const spcList = [99] // 订阅模块需要特殊处理
const senceList = productData[actNum].filter(item => item.name != '全部') const senceList = this.data.productData[actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) { for (let i = 0; i < senceList.length; i++) {
let item = senceList[i] let item = senceList[i]
let proIdList = item?.productList.map(k => k.id) let proIdList = item?.productList.map(k => k.id)
...@@ -71,9 +93,9 @@ Component({ ...@@ -71,9 +93,9 @@ Component({
let proInfo = item.productList.find(k => k.id == activeNavIdx) let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({ this.setData({
proInfo, proInfo,
productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : item.productImgs, productImgs: spcList.includes(actNum) ? proInfo.sceneImgs : (proInfo.productImgs ? proInfo.productImgs : item.productImgs),
tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList, tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList,
prodItemVideo: item.videoList.length ? spcList.includes(actNum) ?item.videoList[proInfo.currentIndex] : item.videoList[activeNavIdx] : item.noVideoPicture[0] prodItemVideo: item.videoList.length ? spcList.includes(actNum) ? item.videoList[proInfo.currentIndex] : item.videoList[activeNavIdx] : item.noVideoPicture[0]
}) })
break break
} }
...@@ -93,7 +115,6 @@ Component({ ...@@ -93,7 +115,6 @@ Component({
.boundingClientRect(react => { .boundingClientRect(react => {
react.forEach((item, index) => { react.forEach((item, index) => {
//44 tab的高度 //44 tab的高度
// console.log('item',item)
s = item.top - 44 + scrollTop s = item.top - 44 + scrollTop
imgTopArr.push(s) imgTopArr.push(s)
}) })
...@@ -106,6 +127,12 @@ Component({ ...@@ -106,6 +127,12 @@ Component({
// console.log('imgTopArr',this.data.imgTopArr) // console.log('imgTopArr',this.data.imgTopArr)
// },500) // },500)
}, },
// 1.3查看活动详情按钮
checkActive() {
let { activeUrl } = this.data
wx.$router.jumpH5(activeUrl);
},
onClickTab(event) { onClickTab(event) {
// console.log('event: ', event); // console.log('event: ', event);
let { index } = event.detail let { index } = event.detail
......
...@@ -105,14 +105,26 @@ page { ...@@ -105,14 +105,26 @@ page {
} }
.check-act { .check-act {
width: 100%;
text-align: center;
position: absolute; position: absolute;
bottom: 94rpx; bottom: 64rpx;
right: 60rpx; right: 0;
font-size: 24rpx; font-weight: 600;
font-size: 28rpx;
color: #3666FE; color: #3666FE;
text-decoration: underline; text-decoration: underline;
} }
.crowd-video {
width: calc(100% - 64rpx);
height: 386rpx;
position: absolute;
top: 264rpx;
margin: 0 32rpx;
border-radius: 16rpx;
}
.more-btn { .more-btn {
position: absolute; position: absolute;
left: 50%; left: 50%;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="view-prod custom-class"> <view class="view-prod custom-class">
<view class="pro-head"> <view class="pro-head">
<!-- 有视频 --> <!-- 有视频 -->
<video class="frame" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" /> <video class="frame" id="video" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx"/>
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" /> <image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<view class="title-wrap"> <view class="title-wrap">
<view class="title">{{prodItemVideo.name}}</view> <view class="title">{{prodItemVideo.name}}</view>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
<view class="prod-detail"> <view class="prod-detail">
<block wx:for="{{productImgs}}" wx:key="index"> <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}}"> <image webp wx:if="{{ index < 3}}" webp mode="widthFix" class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}">
<block wx:if="{{ index == 0}}"> <block wx:if="{{ index == 0}}">
<!-- && phone --> <!-- && phone -->
<view class="phone" bindtap="phoneCall" data-phone="{{sharephone}}"> <view class="phone" bindtap="phoneCall" data-phone="{{sharephone}}">
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
</view> </view>
</block> </block>
<!-- 查看活动那个详情 1.3才有 --> <!-- 查看活动那个详情 1.3才有 -->
<block wx:if="{{ index == 1 && actNum == 3 && activeUrl}}"> <block wx:if="{{ index == 0 && actNum == 3 && activeUrl}}">
<view class="check-act" bindtap="checkActive">点击查看活动页面</view> <view class="check-act" bindtap="checkActive">点击查看活动页面</view>
<!-- <button class="check-act" type="default" plain="true" bindtap="checkActive">查看活动详情</button> -->
</block> </block>
<!-- 获取更多详情 --> <!-- 获取更多详情 -->
<block wx:if="{{ index == 2 && showLeftFlag}}"> <block wx:if="{{ index == 2 && showLeftFlag}}">
...@@ -42,7 +41,12 @@ ...@@ -42,7 +41,12 @@
</button> </button>
</block> </block>
</image> </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}}" /> <image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}">
<!-- 众筹-视频 -->
<block wx:if="{{ index == 3 && actNum == 3 }}">
<video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{videoBaseUrl}}video/crowd-detail.mp4" />
</block>
</image>
</block> </block>
<view class="occupancy" wx:if="{{!isShare}}"> <view class="occupancy" wx:if="{{!isShare}}">
<!-- padding底部 占位元素 --> <!-- padding底部 占位元素 -->
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
image { image {
display: none; display: none;
height: 100%;
} }
} }
......
...@@ -7,10 +7,11 @@ const setRouteData = targetPath => { ...@@ -7,10 +7,11 @@ const setRouteData = targetPath => {
let [url, query] = targetPath.split('?'), let [url, query] = targetPath.split('?'),
obj = {} obj = {}
if (query) { if (query) {
const [key, val] = query.split('=') var list = query.split('&') || []
obj = { list.forEach(item => {
[key]: val const [key, val] = item.split('=')
} obj[key] = val
})
} }
return { return {
url, url,
......
...@@ -2,6 +2,8 @@ import { checkLoginUserInfo, setRouteData, setLoginInfo, loginModal } from '../l ...@@ -2,6 +2,8 @@ import { checkLoginUserInfo, setRouteData, setLoginInfo, loginModal } from '../l
import { getSessionId } from '~/utils/cache/storageApi' import { getSessionId } from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import md5 from '~/utils/lib/md5'
import { sceneByIdApi } from '~/api/checkProduct.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -13,12 +15,12 @@ Page({ ...@@ -13,12 +15,12 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) { },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -31,28 +33,63 @@ Page({ ...@@ -31,28 +33,63 @@ Page({
if (extraData && Object.keys(extraData).length) this.phoneSmsLogin(extraData) if (extraData && Object.keys(extraData).length) this.phoneSmsLogin(extraData)
else this.init() else this.init()
} else this.init() } else this.init()
} else if ([1047, 1048, 1049].includes(appEnter.scene)) {
if (!this.options.scene) {
this.init()
return
}
sceneByIdApi({
id: decodeURIComponent(appEnter.query.scene).split('=')[1]
}).then(res => {
const url = res.scene
const obj = this.arrToObj(url.split('&'))
if (obj.hasOwnProperty('userName') && obj.hasOwnProperty('password')) {
wx.$storage.rm("sessionId")
wx.$storage.rm("userInfo")
wx.$storage.rm("auto_login_object")
wx.$storage.rm("posterId")
wx.$storage.rm("mock_data")
wx.$storage.set("firstLogin", "firstLogin")
wx.$storage.set("disLikeRecordFlag", true)
this.accountLogin(obj)
} else this.init()
}).catch(() => {
this.init()
})
} else this.init() } else this.init()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
arrToObj(list) {
if (!Array.isArray(list)) {
return {}
}
var obj = {}
list.forEach(item => {
let temp = item.split('=')
obj[temp[0]] = temp[1]
})
return obj
},
init() { init() {
wx.nextTick(() => { wx.nextTick(() => {
const sessionId = getSessionId(), const sessionId = getSessionId(),
...@@ -102,7 +139,6 @@ Page({ ...@@ -102,7 +139,6 @@ Page({
} else wx.$router.reLaunch('login.index', obj) } else wx.$router.reLaunch('login.index', obj)
}, },
phoneSmsLogin(extraData) { phoneSmsLogin(extraData) {
console.log(extraData)
USERAPI.phoneSmsLogin({ USERAPI.phoneSmsLogin({
mobile: extraData.phone, mobile: extraData.phone,
code: extraData.smscode code: extraData.smscode
...@@ -122,5 +158,44 @@ Page({ ...@@ -122,5 +158,44 @@ Page({
wx.$router.reLaunch('login.index') wx.$router.reLaunch('login.index')
}, 1e3) }, 1e3)
}) })
},
accountLogin(obj) {
const params = {
userName: obj.userName,
password: md5(obj.password)
}
USERAPI.accountLogin(params).then(({ code, data, message }) => {
if (code == '0') {
const { sessionId, loginUserInfoList } = data
var routeParams = {}
var list = []
if (obj.url == '/packagesList/packageOutput/pages/summary') {
routeParams = {
merchantId: obj.merchantId,
merchantName: obj.merchantName,
pMerchantId: loginUserInfoList[0].subLoginUser.merchantId,
pMerchantName: loginUserInfoList[0].subLoginUser.merchantName,
isSuper: loginUserInfoList[0].isSuper,
fixScenceCode: obj.sceneCode
}
Object.keys(routeParams).forEach((item) => {
list.push(item + "=" + routeParams[item])
})
this.options.targetPath = obj.url + "?" + list.join("&")
}
setLoginInfo(loginUserInfoList[0], sessionId)
} else {
wx.$api.showToast(message || '系统异常')
setTimeout(() => {
wx.$router.reLaunch('login.index')
}, 1e3)
}
})
.catch(err => {
wx.$api.showToast('系统异常')
setTimeout(() => {
wx.$router.reLaunch('login.index')
}, 1e3)
})
} }
}) })
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A==" "integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
}, },
"glsx-applet-component": { "glsx-applet-component": {
"version": "1.0.37", "version": "1.0.47",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.37.tgz", "resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.47.tgz",
"integrity": "sha512-Imu/2+0R9Vru6o73rwzTPqB+hNh5dXeWHj78SV15C0QcK6RhLry5tcrjvv1+B2M16/ajeljEBSFY5WXppD9gCg==" "integrity": "sha512-KzdhJD35vbW1NPMhABsTTe+IosDUH1dlPO0pLUCug+JXLCU2/WbhNvIGAq5+y6Dj9xYy98HDAB9fGsQZ677YLw=="
} }
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"@vant/weapp": "^1.10.7", "@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.0.38" "glsx-applet-component": "^1.0.50"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
// packagesList/apply/components/ApplyBusiness/ApplyBusiness.js
import { scenceList } from '~/pages/tab/index/constant/data'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
scenceList,
carObj: {
name: '',
model: '',
selNum: '',
contact: '',
phone: ''
},
actNum:0, //选中的场景
selectProdArr:[] //选中的产品数组
},
/**
* 组件的方法列表
*/
methods: {
selectCar(e) {
// console.log('e: ', e);
let {num} = e.currentTarget.dataset
this.setData({
actNum:num
})
},
selectProd(e){
console.log('e: ', e);
let item = e.currentTarget.dataset.item
let productName = item.productName
let {selectProdArr} = this.data;
let searchIndex = selectProdArr.findIndex((item)=>item.productName == productName)
if(searchIndex != -1){
// 找到item、删除
selectProdArr.splice(searchIndex, 1)
}else{
selectProdArr.push(item)
}
this.setData({
selectProdArr
})
console.log(this.data.selectProdArr, 'selectProdArr--')
},
bindinputFn(e) {
// console.log("e: ", e);
let name = e.currentTarget.dataset.name
let content = e.detail.value
this.setData({
[`carObj.${name}`]: content
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxss */
.inp-wrap {
margin-left: 32rpx;
display: flex;
align-items: center;
height: 112rpx;
border-bottom: 1px solid #f3f3f3;
.title {
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 600;
font-size: 14px;
color: #323436;
.point {
color: #f35251;
}
}
.inp {
flex: 1;
height: 112rpx;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8a8c90;
}
}
.scene-title {
display: flex;
align-items: center;
margin-left: 32rpx;
margin-top: 48rpx;
margin-bottom: 36rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
.tip {
font-size: 22rpx;
color: #6E6E7A;
}
}
.content-product {
.scene {
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin: 32rpx 16rpx 0;
.scene-wrap {
display: flex;
}
.item-wrap {
margin-right: 8rpx;
margin-bottom: 40rpx;
position: relative;
width: 160rpx;
height: 180rpx;
border-radius: 8rpx;
border: 1px solid #f7f8fc;
box-sizing: border-box;
}
.item {
position: relative;
// padding-top: 10px;
width: 160rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.open-img {
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
box-sizing: border-box;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image: linear-gradient(145deg, #f0f7ff 0%, #ffffff 73%);
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32),
0 8rpx 20rpx 0 rgba(180, 186, 204, 0.4);
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
// .open-img{
// display: none;
// }
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
.name-box {
height: 68rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 8rpx;
}
.name {
width: 100rpx;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.item-wrap:nth-child(2) .name {
width: 120rpx;
}
.msg {
font-weight: 500;
font-size: 18rpx;
// color: #323436;
color: #8A8C90;
text-align: center;
}
}
}
.scene-select {
display: flex;
flex-wrap: wrap;
padding: 0 16rpx 32rpx;
.scene-item {
&:nth-child(3n+3) {
margin-right: 0;
}
position: relative;
margin-right: 10rpx;
margin-bottom: 20rpx;
width: 216rpx;
height: 64rpx;
background: #F5F5FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #323436;
text-align: center;
line-height: 64rpx;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
.act {
background: #F0F7FF;
border: 2rpx solid #3E71FE;
border-radius: 8rpx;
font-weight: 500;
color: #3666FE;
.act-img {
display: block;
}
}
.act-img {
display: none;
position: absolute;
top: 0;
right: 0;
width: 30rpx;
height: 22rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/apply/components/ApplyBusiness/ApplyBusiness.wxml-->
<wxs module="filter" src="./ApplyBusiness.wxs"></wxs>
<view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="营业执照上的公司名称" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="主营品牌/车型" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">新车销量/基盘客户</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入数字" type="number"/>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" maxlength="{{50}}" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" maxlength="{{11}}" placeholder="请输入手机号" type="number"/>
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">业务场景</view>
<view class="content-product">
<view class="scene">
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" data-scenestatus="{{item.sceneStatus}}" bindtap="selectCar" wx:for="{{scenceList}}" wx:key="name">
<view class="item">
<image webp class="img" src="{{item.src}}" />
<view class="name-box">
<view class="name">{{item.name}}</view>
</view>
<!-- <view class="msg">{{item.msg}}</view> -->
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">
业务场景
<view class="tip" hover-class="none" hover-stop-propagation="false">(可多选)</view>
</view>
<view class="scene-select">
<view class="scene-item {{filter.hasProdAct(item,selectProdArr)?'act':''}}" wx:for="{{scenceList[actNum]['productList']}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="selectProd">
<glsx-image webp class="act-img" src="index/act-img.png"></glsx-image>
{{item.productName}}
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packagesList/apply/components/ApplyProduct/ApplyProduct.js
import { getMerchantListApi } from '~/api/applyProd.js'
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
behaviors: [computedBehavior],
data: {
prodName: '',
storeShow: false,
selectStoreItem: {},
scene: 3 //场景值
},
computed: {
selectStoreValue(data) {
return data.selectStoreItem.name || '请选择合作门店'
}
},
lifetimes: {
attached() {
this.getMerchantListFn()
}
},
/**
* 组件的方法列表
*/
methods: {
//获取门店
async getMerchantListFn() {
let { scene } = this.data
let userInfo = wx.$storage.get('userInfo')
let params = {
// scene,
serviceMerchantId: userInfo.merchantId
}
let { code, data } = await getMerchantListApi(params)
if (code == 0 && data.length != 0) {
data = data.map(item => {
item.name = item.merchantName
return item
})
// console.log('data: ', data);
this.setData({
actions: data
})
}
},
// 选择门店
selectStore() {
this.setData({ storeShow: true });
},
onStoreClose() {
this.setData({ storeShow: false });
},
onStoreSelect(event) {
console.log(event.detail);
let selectStoreItem = event.detail
this.setData({ selectStoreItem })
this.onStoreClose()
},
}
})
{
"component": true,
"usingComponents": {
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-cell": "@vant/weapp/cell/index"
},
"styleIsolation": "shared"
}
\ No newline at end of file \ No newline at end of file
/* packagesList/apply/components/ApplyProduct/ApplyProduct.wxss */
.apply-product {
.inp-wrap {
margin-left: 32rpx;
display: flex;
align-items: center;
height: 112rpx;
border-bottom: 1px solid #f3f3f3;
.title {
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 600;
font-size: 14px;
color: #323436;
.point {
color: #f35251;
}
}
.inp {
flex: 1;
height: 112rpx;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8a8c90;
}
.out-van-cell {
flex: 1;
.inp-van-cell {
&.van-cell {
height: 112rpx;
line-height: 112rpx;
padding: 0;
flex: 1;
.point {
color: #f35251;
}
// line-height: 1;
}
&:after {
display: none;
}
.van-cell__title {
flex: none;
width: 184rpx;
}
.van-cell-text {
font-weight: 600;
}
.van-cell__value {
text-align: left;
font-family: UICTFontTextStyleBody;
min-height: 1.4rem;
overflow: hidden;
text-overflow: clip;
white-space: nowrap;
}
.van-cell__right-icon-wrap {
margin-right: 32rpx;
height: 112rpx;
line-height: 112rpx;
}
}
}
}
}
.list-sheet-wrap {
max-height: 60vh;
overflow-y: auto;
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/apply/components/ApplyProduct/ApplyProduct.wxml-->
<view class="apply-product">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<view class="inp-wrap">
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
</view>
</view>
</van-cell>
</view>
</view>
</view>
<view>
<van-action-sheet show="{{ storeShow }}" cancel-text="取消" actions="{{ actions }}" list-class="list-sheet-wrap" bind:cancel="onStoreClose" bind:close="onStoreClose" bind:select="onStoreSelect" />
</view>
\ No newline at end of file \ No newline at end of file
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
const navStyle = 'background-color: transparent;' const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js' import { IMG_URL } from '~/utils/constantData.js'
import applyApi from '~/api/applyApi/index' import applyApi from '~/api/applyApi/index'
import { addCoProductApi } from '~/api/applyProd.js'
// `${IMG_URL}index/car2.png`, // `${IMG_URL}index/car2.png`,
//本地图片路径 //本地图片路径
let IMG_URLLocal = '../../images/' let IMG_URLLocal = '../../images/'
import { senceData } from '~/pages/tab/index/constant/data' import utils from '~/utils/util.js'
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed' import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
Page({ Page({
...@@ -14,18 +15,17 @@ Page({ ...@@ -14,18 +15,17 @@ Page({
*/ */
behaviors: [computedBehavior], behaviors: [computedBehavior],
data: { data: {
senceData,
// navStyle, // navStyle,
IMG_URL, IMG_URL,
carObj: { tabActive: 1,
name: '', tabList: [{
model: '', title: '申请业务',
selNum: '', name: 1
contact: '', }, {
phone: '' title: '申请产品',
}, name: 2
actNum:0, //选中的场景 }],
selectProdArr:[] //选中的产品数组 isLoading: false
}, },
// computed: { // computed: {
// hasProdAct(data) { // hasProdAct(data) {
...@@ -40,34 +40,19 @@ Page({ ...@@ -40,34 +40,19 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2 // headerHeight: height / 2 + statusBarHeight + 88*2
}) })
}, },
selectCar(e) { onTabChange(e) {
// console.log('e: ', e); const { name } = e.detail
let {num} = e.currentTarget.dataset
this.setData({ this.setData({
actNum:num tabActive: name
}) })
}, },
selectProd(e){ // 申请业务
console.log('e: ', e); applyBusiness() {
let item = e.currentTarget.dataset.item if (this.data.isLoading) {
let productName = item.productName return
let {selectProdArr} = this.data;
let searchIndex = selectProdArr.findIndex((item)=>item.productName == productName)
if(searchIndex != -1){
// 找到item、删除
selectProdArr.splice(searchIndex, 1)
}else{
selectProdArr.push(item)
} }
this.setData({ const subCompData = this.selectComponent('#apply-business').data
selectProdArr let { name } = subCompData.carObj
})
},
// 提交信息
applyFn() {
let { name } = this.data.carObj
// console.log('name: ', name) // console.log('name: ', name)
if (!name) { if (!name) {
wx.pro.showToast({ wx.pro.showToast({
...@@ -76,13 +61,13 @@ Page({ ...@@ -76,13 +61,13 @@ Page({
}) })
return return
} }
this.submitForm() this.submitBusinessForm(subCompData)
// console.log(123)
}, },
submitForm() { submitBusinessForm(subCompData) {
let { carObj, clueId,selectProdArr } = this.data let { carObj, selectProdArr } = subCompData
let { clueId } = this.data
let selectProdArrStr = '' let selectProdArrStr = ''
selectProdArr.forEach((item,index)=>{selectProdArrStr+=`${item.productName}${selectProdArr.length-1 == index?'':';'}`}) selectProdArr.forEach((item, index) => { selectProdArrStr += `${item.productName}${selectProdArr.length - 1 == index ? '' : ';'}` })
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let MerchantInfo = userInfo.subLoginUser let MerchantInfo = userInfo.subLoginUser
...@@ -96,9 +81,11 @@ Page({ ...@@ -96,9 +81,11 @@ Page({
carType: carObj.model, carType: carObj.model,
baseCustomer: carObj.selNum, baseCustomer: carObj.selNum,
clueId, clueId,
intentProducts:selectProdArrStr intentProducts: selectProdArrStr
} }
this.setData({
isLoading: true
})
// return wx.$api.showToast('申请成功') // return wx.$api.showToast('申请成功')
applyApi applyApi
.merchantApply(params) .merchantApply(params)
...@@ -108,26 +95,70 @@ Page({ ...@@ -108,26 +95,70 @@ Page({
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back(page => { wx.$router.back(page => {
let node = page.selectComponent('#indexclue') page && page.getClueInit && page.getClueInit()
node && node.getClueInit()
}) })
}, 1000) }, 1000)
} }
}) })
.catch(err => {}) .catch(err => {
this.setData({
isLoading: false
})
})
},
// 申请产品
applyProduct() {
if (this.data.isLoading) {
return
}
const subCompData = this.selectComponent('#apply-product').data
let { prodName, selectStoreItem } = subCompData
if (!prodName) {
wx.pro.showToast({
title: '请输入产品名称',
icon: 'error'
})
return
}
if (utils.isEmptyObj(selectStoreItem)) {
wx.pro.showToast({
title: '请选择合作门店',
icon: 'error'
})
return
}
this.submitProductForm(subCompData)
}, },
bindinputFn(e) { async submitProductForm(subCompData) {
// console.log("e: ", e); let { prodName, selectStoreItem } = subCompData
let name = e.currentTarget.dataset.name let userInfo = wx.$storage.get('userInfo')
let content = e.detail.value let params = {
...selectStoreItem,
serviceMerchantId: userInfo.merchantId,
serviceMerchantName: userInfo.merchantName,
coProduct: prodName
}
this.setData({ this.setData({
[`carObj.${name}`]: content isLoading: true
}) })
let { code } = await addCoProductApi(params)
if (code == 0) {
wx.$api.showToast('申请成功')
setTimeout(() => {
wx.$router.back()
}, 1000)
} else {
this.setData({
isLoading: false
})
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) { },
onRoute(params) { onRoute(params) {
// 线索id // 线索id
this.setData({ this.setData({
...@@ -139,35 +170,35 @@ Page({ ...@@ -139,35 +170,35 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
{ {
"usingComponents": {}, "usingComponents": {
"apply-business": "../components/ApplyBusiness/ApplyBusiness",
"apply-product": "../components/ApplyProduct/ApplyProduct",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
},
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
"enablePullDownRefresh": true "enablePullDownRefresh": true
......
...@@ -29,12 +29,8 @@ page { ...@@ -29,12 +29,8 @@ page {
} }
.top { .top {
margin-bottom: 32rpx; margin-bottom: 32rpx;
display: flex;
align-items: center; align-items: center;
.line { .line {
// width: 3px;
// height: 14px;
// background:var(--btnColor);
width: 6rpx; width: 6rpx;
height: 36rpx; height: 36rpx;
background: #3666fe; background: #3666fe;
...@@ -48,193 +44,13 @@ page { ...@@ -48,193 +44,13 @@ page {
// line-height: 48rpx; // line-height: 48rpx;
} }
} }
.inp-wrap {
margin-left: 32rpx;
display: flex;
align-items: center;
height: 112rpx;
border-bottom: 1px solid #f3f3f3;
.title {
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 500;
font-size: 14px;
color: #323436;
.point {
color: #f35251;
}
}
.inp {
flex: 1;
height: 112rpx;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8a8c90;
}
}
.scene-title {
display: flex;
align-items: center;
margin-left: 32rpx;
margin-top: 48rpx;
margin-bottom: 36rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
.tip{
font-size: 22rpx;
color: #6E6E7A;
}
}
.content-product {
.scene {
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin: 32rpx 16rpx 0;
.scene-wrap {
display: flex;
}
.item-wrap {
margin-right: 8rpx;
margin-bottom: 40rpx;
position: relative;
width: 160rpx;
height: 180rpx;
border-radius: 8rpx;
border: 1px solid #f7f8fc;
box-sizing: border-box;
}
.item {
position: relative;
// padding-top: 10px;
width: 160rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.open-img {
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
box-sizing: border-box;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image: linear-gradient(145deg, #f0f7ff 0%, #ffffff 73%);
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32),
0 8rpx 20rpx 0 rgba(180, 186, 204, 0.4);
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
// .open-img{
// display: none;
// }
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
.name {
margin-bottom: 2px;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.msg {
font-weight: 500;
font-size: 18rpx;
// color: #323436;
color: #8A8C90;
text-align: center;
}
}
}
.scene-select{
display: flex;
flex-wrap: wrap;
padding: 0 16rpx 32rpx;
.scene-item{
&:nth-child(3n+3) {
margin-right: 0;
}
position: relative;
margin-right: 10rpx;
margin-bottom: 20rpx;
width: 216rpx;
height: 64rpx;
background: #F5F5FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #323436;
text-align: center;
line-height: 64rpx;
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
.act{
background: #F0F7FF;
border: 2rpx solid #3E71FE;
border-radius: 8rpx;
font-weight: 500;
color: #3666FE;
.act-img{
display: block;
}
}
.act-img{
display: none;
position:absolute;
top: 0;
right: 0;
width: 30rpx;
height: 22rpx;
}
} }
.btn-box {
position: fixed;
bottom: 64rpx;
left: 0;
width: 100%;
background-color: #FFFFFF;
} }
.btn { .btn {
margin: 64rpx auto 0; margin: 64rpx auto 0;
......
<!-- pages/apply/apply.wxml --> <!-- pages/apply/apply.wxml -->
<wxs module="filter" src="./apply.wxs"></wxs>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务 申请业务
</navigation-bar> </navigation-bar>
...@@ -9,61 +8,20 @@ ...@@ -9,61 +8,20 @@
<view class="content-wrap"> <view class="content-wrap">
<view class="content" hover-class="none" hover-stop-propagation> <view class="content" hover-class="none" hover-stop-propagation>
<view class="top"> <view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" /> <!-- <view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view> <view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view> -->
<van-tabs active="{{ tabActive }}" bind:change="onTabChange">
<van-tab wx:for="{{tabList}}" wx:key="index" title="{{item.title}}" name="{{item.name}}">
</van-tab>
</van-tabs>
</view> </view>
<view class="inp-wrap"> <apply-business id="apply-business" wx:if="{{tabActive == 1}}"></apply-business>
<view class="title" hover-class="none" hover-stop-propagation="false"> <apply-product id="apply-product" wx:if="{{tabActive == 2}}"></apply-product>
开店名称
<text class="point">*</text>
</view> </view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="营业执照上的公司名称" />
</view> </view>
<view class="inp-wrap"> <button wx:if="{{tabActive == 1}}" class="btn" bindtap="applyBusiness">提交开店信息</button>
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view> <view wx:if="{{tabActive == 2}}" class="isFullSucreen btn-box" bindtap="applyProduct">
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="主营品牌/车型" /> <button class="btn">申请合作</button>
</view> </view>
<view class="inp-wrap"> <!-- <button class="btn" bindtap="applyFn">申请合作产品</button> -->
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入数字" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">业务场景</view>
<view class="content-product">
<view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" data-scenestatus="{{item.sceneStatus}}" bindtap="selectCar" wx:for="{{senceData}}" wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">
业务场景
<view class="tip" hover-class="none" hover-stop-propagation="false">(可多选)</view>
</view>
<view class="scene-select">
<view class="scene-item {{filter.hasProdAct(item,selectProdArr)?'act':''}}" wx:for="{{senceData[actNum]['productList']}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="selectProd">
<glsx-image webp class="act-img" src="index/act-img.png"></glsx-image>
{{item.productName}}
</view>
</view>
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,6 @@ import { IMG_URL } from '~/utils/constantData.js' ...@@ -4,7 +4,6 @@ import { IMG_URL } from '~/utils/constantData.js'
import {getMerchantListApi,addCoProductApi} from '~/api/applyProd.js' import {getMerchantListApi,addCoProductApi} from '~/api/applyProd.js'
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed' import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
import utils from '~/utils/util.js' import utils from '~/utils/util.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -49,7 +48,6 @@ Page({ ...@@ -49,7 +48,6 @@ Page({
onStoreClose() { onStoreClose() {
this.setData({ storeShow: false }); this.setData({ storeShow: false });
}, },
onStoreSelect(event) { onStoreSelect(event) {
console.log(event.detail); console.log(event.detail);
let selectStoreItem = event.detail let selectStoreItem = event.detail
...@@ -74,7 +72,6 @@ Page({ ...@@ -74,7 +72,6 @@ Page({
}) })
return return
} }
this.submitForm() this.submitForm()
// console.log(123) // console.log(123)
}, },
...@@ -87,7 +84,6 @@ Page({ ...@@ -87,7 +84,6 @@ Page({
serviceMerchantName:userInfo.merchantName, serviceMerchantName:userInfo.merchantName,
coProduct:prodName coProduct:prodName
} }
let {code} = await addCoProductApi(params) let {code} = await addCoProductApi(params)
// console.log('res: ', res); // console.log('res: ', res);
if(code == 0){ if(code == 0){
...@@ -99,10 +95,6 @@ Page({ ...@@ -99,10 +95,6 @@ Page({
}) })
}, 1000) }, 1000)
} }
// // return wx.$api.showToast('申请成功') // // return wx.$api.showToast('申请成功')
// applyApi // applyApi
// .merchantApply(params) // .merchantApply(params)
...@@ -120,7 +112,6 @@ Page({ ...@@ -120,7 +112,6 @@ Page({
// }) // })
// .catch(err => {}) // .catch(err => {})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -159,32 +150,26 @@ Page({ ...@@ -159,32 +150,26 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() {},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() {},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
......
...@@ -42,6 +42,19 @@ Page({ ...@@ -42,6 +42,19 @@ Page({
selectIndex: 2 selectIndex: 2
} }
], ],
levelTagObj: {
1: {
label: '初步了解'
},
2: {
label: '深入了解',
class: 'tag-red'
},
3: {
label: '签约成交',
class: 'tag-blue'
}
},
clueList: [], clueList: [],
// 看线索部分 // 看线索部分
unreadClueCount: 0, unreadClueCount: 0,
...@@ -273,21 +286,21 @@ Page({ ...@@ -273,21 +286,21 @@ Page({
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let pMerchantName = userInfo.subLoginUser.merchantName let pMerchantName = userInfo.subLoginUser.merchantName
let pMerchantId = userInfo.subLoginUser.merchantId let pMerchantId = userInfo.subLoginUser.merchantId
let sceneActive // let sceneActive
switch (this.data.actNum) { // switch (this.data.actNum) {
case 0: // case 0:
sceneActive = 1 // sceneActive = 1
break // break
case 1: // case 1:
sceneActive = 2 // sceneActive = 2
break // break
case 2: // case 2:
sceneActive = 3 // sceneActive = 3
break // break
case 3: // case 3:
sceneActive = 4 // sceneActive = 4
break // break
} // }
// let pMerchantId = userInfo.subLoginUser.merchantId // let pMerchantId = userInfo.subLoginUser.merchantId
// console.log("type,item: ", type, item); // console.log("type,item: ", type, item);
...@@ -298,7 +311,7 @@ Page({ ...@@ -298,7 +311,7 @@ Page({
merchantId: item.visitList[0].merchantId, merchantId: item.visitList[0].merchantId,
merchantName: item.visitList[0].merchantName merchantName: item.visitList[0].merchantName
}, },
sceneActive, // sceneActive,
clueId: item.clueId clueId: item.clueId
// sceneCodeList: ['SC001', 'SC002','SC003','SC004'] // sceneCodeList: ['SC001', 'SC002','SC003','SC004']
} }
......
...@@ -105,6 +105,24 @@ ...@@ -105,6 +105,24 @@
width: 20px; width: 20px;
height: 20px; height: 20px;
} }
.level-tag {
width: 96rpx;
height: 32rpx;
line-height: 32rpx;
font-size: 20rpx;
color: #FFFFFF;
background: #48D241;
border-radius: 6rpx;
margin-left: 24rpx;
text-align: center;
}
.tag-red {
background: #FD6C59;
}
.tag-blue {
background: #557CF7;
}
} }
.line { .line {
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<view class="name" hover-class="none" hover-stop-propagation="false"> <view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}} {{item.nickName}}
<image webp class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" /> <image webp class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" />
<view wx:if="{{item.levelTag}}" class="level-tag {{levelTagObj[item.levelTag] ? levelTagObj[item.levelTag].class : ''}}">{{levelTagObj[item.levelTag] ? levelTagObj[item.levelTag].label : ''}}</view>
</view> </view>
<view class="line" hover-class="none" hover-stop-propagation="false" /> <view class="line" hover-class="none" hover-stop-propagation="false" />
<!-- {{item.getMoreFlag?'height':'auto'}} --> <!-- {{item.getMoreFlag?'height':'auto'}} -->
......
...@@ -13,10 +13,14 @@ Component({ ...@@ -13,10 +13,14 @@ Component({
properties: { properties: {
orderObj: { orderObj: {
type: Object, type: Object,
value: () => {}, value: () => { },
observer(n) { observer(n) {
n && this.dealStaffList() n && this.dealStaffList()
} }
},
hasReport: {
type: Boolean,
value: true
} }
}, },
...@@ -164,7 +168,7 @@ Component({ ...@@ -164,7 +168,7 @@ Component({
path: obj.path path: obj.path
}) })
}, },
fail() {} fail() { }
}) })
}) })
}, },
...@@ -174,6 +178,15 @@ Component({ ...@@ -174,6 +178,15 @@ Component({
}, },
async download(e) { async download(e) {
const { item } = e.currentTarget.dataset const { item } = e.currentTarget.dataset
if (item.mockPoster) {
item.posterUrl = item.mockPoster
this.setData({
crowdPosterItem: item,
isShowTip: false
})
return
}
// posterObj = this.selectComponent('#crowdPoster'), // posterObj = this.selectComponent('#crowdPoster'),
// { options } = wx.$router.getPageInstance() // { options } = wx.$router.getPageInstance()
// const { options } = wx.$router.getPageInstance() // const { options } = wx.$router.getPageInstance()
...@@ -213,7 +226,7 @@ Component({ ...@@ -213,7 +226,7 @@ Component({
this.triggerEvent('posterTrack') this.triggerEvent('posterTrack')
}, },
/**长按战报/喜报 */ /**长按战报/喜报 */
async handlePosterTouch(e) {}, async handlePosterTouch(e) { },
/**战报 */ /**战报 */
handleReport(e) { handleReport(e) {
const { item, idx } = e.currentTarget.dataset const { item, idx } = e.currentTarget.dataset
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index"> <view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt font-number"> <view class="order-txt font-number">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text> <text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)}} <text wx:if="{{item.name == 'totalAmount'}}">{{filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)}}</text>
<text wx:else>{{orderObj[item.name]}}</text>
</view> </view>
<view class="order-label">{{item.label}}</view> <view class="order-label">{{item.label}}</view>
</view> </view>
...@@ -79,7 +80,7 @@ ...@@ -79,7 +80,7 @@
</view> </view>
</view> </view>
<!-- 战报 --> <!-- 战报 -->
<view class="new-report" wx:if="{{item.activityStatus != 1}}"> <view class="new-report" wx:if="{{item.activityStatus != 1 && hasReport}}">
<view class="report-left" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view> <view class="report-left" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view>
<view class="report-left" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view> <view class="report-left" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view>
</view> </view>
......
const formList = [{
label: '到店贴膜量',
name: 'toShopCount'
}, {
label: '体验量',
name: 'experienceCount'
}, {
label: '成交订单',
name: 'upgradeCount'
}, {
label: '营业额',
name: 'totalSubOrderOrderMoney',
prefix: '¥'
}, {
label: '客单价',
name: 'calCustomerUnitPrice',
prefix: '¥'
}, {
label: '引流体验率',
name: 'calExperience',
suffix: '%'
}, {
label: '体验转化率',
name: 'calTransform',
suffix: '%'
}
]
const formObj = {
SC001: [{
label: '总单量',
name: 'totalCount'
}, {
label: '总产值',
name: 'totalAmount',
prefix: '¥'
}, {
label: '当月单量',
name: 'monthCount'
}, {
label: '当月产值',
name: 'monthAmount',
prefix: '¥'
}, {
label: '转化率',
name: 'conversionRate'
}, {
label: '单价',
name: 'price',
prefix: '¥'
}],
SC002: formList,
SC003: formList
}
module.exports = {
formObj
}
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/summary/components/outputTransform/outputTransform.js // packageOutput/pages/summary/components/outputTransform/outputTransform.js
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import { formObj } from './constant/data'
const defaultSceneCode = 'SC002'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -8,6 +10,19 @@ Component({ ...@@ -8,6 +10,19 @@ Component({
formData: { formData: {
type: Object, type: Object,
value: () => { } value: () => { }
},
sceneCode: {
type: String,
value: 'SC002',
observer(n) {
this.setData({
formDataList: formObj[n || 'defaultSceneCode']
})
}
},
hasNavigate: {
type: Boolean,
value: true
} }
}, },
...@@ -16,31 +31,7 @@ Component({ ...@@ -16,31 +31,7 @@ Component({
*/ */
data: { data: {
IMGURL: IMG_URL, IMGURL: IMG_URL,
formDataList: [{ formDataList: formObj[defaultSceneCode]
label: '到店贴膜量',
name: 'toShopCount'
}, {
label: '体验量',
name: 'experienceCount'
}, {
label: '成交订单',
name: 'upgradeCount'
}, {
label: '营业额',
name: 'totalSubOrderOrderMoney'
}, {
label: '客单价',
name: 'calCustomerUnitPrice',
prefix: '¥'
}, {
label: '引流体验率',
name: 'calExperience',
suffix: '%'
}, {
label: '体验转化率',
name: 'calTransform',
suffix: '%'
}]
}, },
/** /**
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
</view> </view>
</view> </view>
<navigator version="trial" class="link" target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release"> <navigator wx:if="{{hasNavigate}}" version="trial" class="link" target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release">
<view class="link-btn"> <view class="link-btn">
<image class="icon-link" src="{{IMGURL}}output/icon-link.png?v={{img_version}}" /> <image class="icon-link" src="{{IMGURL}}output/icon-link.png?v={{img_version}}" />
查看订单详情 查看订单详情
......
...@@ -10,23 +10,39 @@ Page({ ...@@ -10,23 +10,39 @@ Page({
merchantInfo: {}, merchantInfo: {},
sceneCodeList: [], sceneCodeList: [],
// 场景业务 // 场景业务
formData: { sceneInfo: {
scene1: true, sceneList: [{
scene2: true, sceneCode: 'SC001',
scene3: true, flag: true
scene4: true }, {
sceneCode: 'SC002',
flag: true
}, {
sceneCode: 'SC003',
flag: true
}, {
sceneCode: 'SC004',
flag: true
}]
}, },
sceneActive: 1, sceneActive: 1,
sceneCodeActive: 'SC002',
isLoading: false,
// 活动内容 // 活动内容
activityList: [], activityList: [],
sceneActivityObj: { sceneActivityObj: {
scene0: [],
scene1: [], scene1: [],
scene2: [], scene2: [],
scene3: [], scene3: []
scene4: []
} }
}, },
// 查找当前高亮场景的idx
findSceneIdx(sceneCode = this.data.sceneCodeActive) {
return this.data.sceneCodeList.findIndex(item => item == sceneCode)
},
getSceneProStatus(sceneCode) { getSceneProStatus(sceneCode) {
var params = { var params = {
serviceMerchantId: this.data.merchantInfo.pMerchantId, serviceMerchantId: this.data.merchantInfo.pMerchantId,
...@@ -36,7 +52,7 @@ Page({ ...@@ -36,7 +52,7 @@ Page({
outputApi.getSceneProStatus(params).then(res => { outputApi.getSceneProStatus(params).then(res => {
var proList = res.find(item => item.sceneCode == sceneCode) var proList = res.find(item => item.sceneCode == sceneCode)
this.setData({ this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList ['sceneActivityObj.scene' + this.findSceneIdx()]: proList.productList
}) })
this.setCurActivity() this.setCurActivity()
}) })
...@@ -44,12 +60,13 @@ Page({ ...@@ -44,12 +60,13 @@ Page({
// 场景切换 // 场景切换
handleSceneChange(e) { handleSceneChange(e) {
var idx = e.detail.sceneIdx // var idx = e.detail.sceneIdx
var sceneCode = e.detail.sceneCode
this.setData({ this.setData({
sceneActive: idx sceneCodeActive: sceneCode,
}) })
if (!this.data.sceneActivityObj['scene' + this.data.sceneActive].length) { if (!this.data.sceneActivityObj['scene' + this.findSceneIdx()].length) {
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.findSceneIdx()])
return true return true
} }
this.setCurActivity() this.setCurActivity()
...@@ -58,7 +75,7 @@ Page({ ...@@ -58,7 +75,7 @@ Page({
setCurActivity() { setCurActivity() {
this.setData({ this.setData({
activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + this.data.sceneActive])) activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + this.findSceneIdx()]))
}) })
}, },
...@@ -87,12 +104,15 @@ Page({ ...@@ -87,12 +104,15 @@ Page({
}, },
handleConfirm() { handleConfirm() {
if(this.data.isLoading) {
return
}
var params = { var params = {
serviceMerchantId: this.data.merchantInfo.pMerchantId, serviceMerchantId: this.data.merchantInfo.pMerchantId,
serviceMerchantName: this.data.merchantInfo.pMerchantName, serviceMerchantName: this.data.merchantInfo.pMerchantName,
merchantId: this.data.merchantInfo.merchantId, merchantId: this.data.merchantInfo.merchantId,
merchantName: this.data.merchantInfo.merchantName, merchantName: this.data.merchantInfo.merchantName,
sceneCode: this.data.sceneCodeList[this.data.sceneActive - 1], sceneCode: this.data.sceneCodeList[this.findSceneIdx()],
productCodes: this.data.activityList.filter(item => item.checked == true).map(item => item.productCode), productCodes: this.data.activityList.filter(item => item.checked == true).map(item => item.productCode),
clueId: this.data.clueId clueId: this.data.clueId
} }
...@@ -100,6 +120,9 @@ Page({ ...@@ -100,6 +120,9 @@ Page({
wx.$api.showToast('请选产品/活动') wx.$api.showToast('请选产品/活动')
return true return true
} }
this.setData({
isLoading: true
})
outputApi.applyActivity(params).then(res => { outputApi.applyActivity(params).then(res => {
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
...@@ -110,6 +133,10 @@ Page({ ...@@ -110,6 +133,10 @@ Page({
this.handleJump() this.handleJump()
} }
}) })
}).catch(() => {
this.setData({
isLoading: false
})
}) })
}, },
...@@ -120,11 +147,12 @@ Page({ ...@@ -120,11 +147,12 @@ Page({
wx.$router.getData(obj => { wx.$router.getData(obj => {
this.setData({ this.setData({
merchantInfo: obj.merchantInfo, merchantInfo: obj.merchantInfo,
sceneActive: obj.sceneActive, // sceneActive: obj.sceneActive,
sceneCodeList: obj.sceneCodeList || ['SC001', 'SC002', 'SC003', 'SC004'], sceneCodeList: obj.sceneCodeList || ['SC002', 'SC003', 'SC004', 'SC001'],
sceneCodeActive: obj.sceneCodeActive || 'SC002',
clueId: obj.clueId clueId: obj.clueId
}) })
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.findSceneIdx()])
}) })
}, },
......
...@@ -75,6 +75,7 @@ page { ...@@ -75,6 +75,7 @@ page {
font-size: 28rpx; font-size: 28rpx;
margin: 0 20rpx 16rpx 0; margin: 0 20rpx 16rpx 0;
border-radius: 4rpx; border-radius: 4rpx;
border: 2rpx solid #F2F3F7;
.icon-mark { .icon-mark {
position: absolute; position: absolute;
...@@ -92,9 +93,25 @@ page { ...@@ -92,9 +93,25 @@ page {
.activity-item .active { .activity-item .active {
background: #F0F7FF; background: #F0F7FF;
border: 2rpx solid #3E71FE; border: 2rpx solid #3E71FE;
border-radius: 8rpx;
color: #3666FE; color: #3666FE;
} }
.act {
.act-img {
display: block;
}
}
.act-img {
display: none;
position: absolute;
top: 0;
right: 0;
width: 30rpx;
height: 22rpx;
}
.item-disabled { .item-disabled {
color: #CCCED1; color: #CCCED1;
} }
......
...@@ -10,26 +10,29 @@ ...@@ -10,26 +10,29 @@
<!-- 场景活动 --> <!-- 场景活动 -->
<view class="box"> <view class="box">
<view class="box-title">业务场景</view> <view class="box-title">业务场景</view>
<scene-box formData="{{formData}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" hasOpenIcon="{{false}}" bindhandleSceneChange="handleSceneChange"></scene-box> <scene-box sceneInfo="{{sceneInfo}}" scenePriceList="{{scenePriceList}}" sceneCodeActive="{{sceneCodeActive}}" hasOpenIcon="{{false}}" bindhandleSceneChange="handleSceneChange"></scene-box>
</view> </view>
<!-- 活动 --> <!-- 活动 -->
<view class="box"> <view class="box">
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view> <view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box" wx:if="{{sceneActive != 1}}"> <view class="activity-box">
<view wx:for="{{activityList}}" wx:key="index" class="activity-item"> <view wx:for="{{activityList}}" wx:key="index" class="activity-item">
<!-- productStatus:0未申请;1申请中;2已开通;3:已结束 --> <!-- productStatus:0未申请;1申请中;2已开通;3:已结束 -->
<view wx:if="{{item.openFlag != 0 && item.productStatus == 2}}"> <view wx:if="{{item.openFlag != 0 && item.productStatus == 2}}">
<glsx-image wx:if="{{sceneActive == 4}}" src="output/mark-active.webp" class="icon-mark"></glsx-image> <glsx-image wx:if="{{sceneCodeActive == 'SC004'}}" src="output/mark-active.webp" class="icon-mark"></glsx-image>
<glsx-image wx:if="{{sceneActive == 2 || sceneActive == 3}}" src="output/mark-open.webp" class="icon-mark"></glsx-image> <glsx-image wx:if="{{sceneCodeActive == 'SC002' || sceneCodeActive == 'SC003'}}" src="output/mark-open.webp" class="icon-mark"></glsx-image>
</view>
<view wx:if="{{item.openFlag == 0 && sceneCodeActive != 'SC001'}}" class="act text-hide {{ item.checked ? 'active' : '' }}" bindtap="handleActClick" data-idx="{{index}}">
<glsx-image wx:if="{{item.checked}}" webp class="act-img" src="index/act-img.png"></glsx-image>
{{item.productName}}
</view> </view>
<view wx:if="{{item.openFlag == 0}}" class="text-hide {{ item.checked ? 'active' : '' }}" bindtap="handleActClick" data-idx="{{index}}">{{item.productName}}</view>
<view class="text-hide item-disabled" wx:else>{{item.productName}}</view> <view class="text-hide item-disabled" wx:else>{{item.productName}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="isFullSucreen btn"> <view class="isFullSucreen btn">
<view wx:if="{{sceneActive != 1}}" class="btn-blue" bindtap="handleConfirm">申请开通</view> <view wx:if="{{sceneCodeActive != 'SC001'}}" class="btn-blue" bindtap="handleConfirm">申请开通</view>
<view wx:else class="btn-disabled">申请开通</view> <view wx:else class="btn-disabled">申请开通</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"scene-box": "../../../components/SceneBox/SceneBox", "scene-box": "../../../components/SceneBox/SceneBox",
"output-transform": "../components//outputTransform/outputTransform", "output-transform": "../components//outputTransform/outputTransform",
"output-crowdfund": "../components/outputCrowdfund/outputCrowdfund" "output-crowdfund": "../components/outputCrowdfund/outputCrowdfund",
"service": "../../../components/Service/Service"
} }
} }
<!-- packageOutput/pages/summary/summary.wxml --> <!-- packageOutput/pages/summary/summary.wxml -->
<view class="summary"> <view class="summary">
<view class="layout {{ (sceneActive != 1 && isShowData) ? 'bg-grey' : 'bg-white'}}"> <view class="layout {{ (isShowData) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive != 1 && isShowData) ? 'bg-white' : 'p-rl-20'}}"> <view class="{{ (isShowData) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 && isShowData) ? 'm-rl-20' : ''}}"> <view class="{{ (isShowData) ? 'm-rl-20' : ''}}">
<view class="title bg-white"> <view class="title bg-white">
选产品/活动 选产品/活动
<view class="title-open" bindtap="handleJump"> <view class="title-open" bindtap="handleJump">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</view> </view>
</view> </view>
<view class="scene-box bg-white"> <view class="scene-box bg-white">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange" /> <scene-box sceneInfo="{{sceneInfo}}" scenePriceList="{{scenePriceList}}" sceneCodeActive="{{sceneCodeActive}}" bindhandleSceneChange="handleSceneChange" />
</view> </view>
</view> </view>
</view> </view>
...@@ -26,44 +26,47 @@ ...@@ -26,44 +26,47 @@
</scroll-view> </scroll-view>
</view> </view>
<!-- 活动内容 --> <!-- 活动内容 -->
<view class="activity-content {{ (sceneActive != 1 && isShowData) ? '' : 'p-rl-20'}}"> <view class="activity-content {{ (isShowData) ? '' : 'p-rl-20'}}">
<view wx:if="{{isShowData && sceneActive != 1}}"> <view wx:if="{{isShowData}}">
<view class="activity-title title bg-white p-l-20 no-border"> <view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view> <view>看产值</view>
<view class="select" bindtap="handleSearch"> <view wx:if="{{sceneCodeActive != 'SC001'}}" class="select" bindtap="handleSearch">
<view wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt"> <view wx:if="{{(sceneCodeActive == 'SC002' || sceneCodeActive == 'SC003') && !isMock.SC002}}" class="select-txt">
{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}} {{baseData.timeList[sceneCodeActive == 'SC002' ? searchForm.sceneSC002 : searchForm.sceneSC003]}}
</view> <image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
<view wx:if="{{sceneActive == 4}}" class="select-txt">
{{baseData.actStatusList[searchForm.scene4Idx]}}
</view> </view>
<view wx:if="{{sceneCodeActive == 'SC004' && !isMock.SC004}}" class="select-txt">
{{baseData.actStatusList[searchForm.sceneSC004]}}
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" /> <image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view> </view>
</view> </view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" /> </view>
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack"/> <output-transform wx:if="{{sceneCodeActive != 'SC004'}}" formData="{{activityList[activityActive].orderTotal}}" hasNavigate="{{sceneCodeActive != 'SC001' && !isMock.SC002}}" sceneCode="{{sceneCodeActive}}" />
<output-crowdfund wx:if="{{sceneCodeActive == 'SC004'}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack" hasReport="{{!isMock.SC004}}" />
</view> </view>
<view wx:else class="content-empty bg-white"> <view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" /> <image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{sceneActive != 1 && activityList.length}}"> <view wx:if="{{activityList.length}}">
<view class="isFullSucreen btn-box" wx:if="{{ !isShowData && !merchantInfo.isSuper}}"> <view class="isFullSucreen btn-box" wx:if="{{ !isShowData && !merchantInfo.isSuper}}">
<view class="btn"> <view class="btn">
<view class="btn-blue" bindtap="handleJump">点击开通</view> <view class="btn-blue" bindtap="handleJump">点击开通</view>
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{sceneActive == 1}}" class="isFullSucreen btn-box"> <view wx:if="{{sceneCodeActive == 'SC001' && !isShowData}}" class="isFullSucreen btn-box">
<view class="btn"> <view class="btn">
<view class="btn-disabled">点击开通</view> <view class="btn-disabled">点击开通</view>
</view> </view>
</view> </view>
<view wx:if="{{sceneActive == 4 && activityList.length && isShowData && activityList[activityActive].outputData.shareBtnIdx && activityList[activityActive].outputData.shareBtnIdx != -1}}" class="isFullSucreen btn-box shadow" bindtap="handleBtnShare"> <view wx:if="{{sceneCodeActive == 'SC004' && activityList.length && isShowData && activityList[activityActive].outputData.shareBtnIdx && activityList[activityActive].outputData.shareBtnIdx != -1}}" class="isFullSucreen btn-box shadow" bindtap="handleBtnShare">
<view class="btn"> <view class="btn">
<view class="btn-share">活动进行中,分享母链海报开展活动</view> <view class="btn-share">活动进行中,分享母链海报开展活动</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 加微 -->
<service wx:if="{{isShowService}}"></service>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{true}}" bindlongtouch="longtouch" /> <crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{true}}" bindlongtouch="longtouch" />
\ No newline at end of file \ No newline at end of file
// pages/viewProd/index.js // pages/viewProd/index.js
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed' import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
import { IMG_URL } from "~/utils/constantData.js"; import { IMG_URL } from "~/utils/constantData.js";
import { scenceList } from '~/pages/tab/index/constant/data'
import { senceData, productData } from '~/pages/tab/index/constant/senceData' import { senceData, productData } from '~/pages/tab/index/constant/senceData'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util.js' import utils from '~/utils/util.js'
...@@ -14,11 +15,10 @@ Page({ ...@@ -14,11 +15,10 @@ Page({
behaviors: [computedBehavior], behaviors: [computedBehavior],
data: { data: {
IMG_URL, IMG_URL,
senceData,
productData,
proInfo: {}, proInfo: {},
isShare:false, //是否是分享出去的 isShare:false, //是否是分享出去的
actNum: 0, actNum: -1,
activeNavIdx: 0,
tabAct: 0, tabAct: 0,
showLeft:false, //更多按钮显示的内容 showLeft:false, //更多按钮显示的内容
scrollTop:0, scrollTop:0,
...@@ -61,13 +61,21 @@ Page({ ...@@ -61,13 +61,21 @@ 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, sceneCode } = options
if(isShare){ if(isShare){
wx.hideHomeButton() wx.hideHomeButton()
} }
let sceneObj = {}
if(actNum != 99) {
sceneObj = scenceList.find(item => item.sceneid == actNum)
} else {
sceneObj = productData[99].find(item => item.sceneCode == sceneCode)
}
let proInfo = sceneObj?.productList.find(item => item.id == activeNavIdx)
this.setData({ this.setData({
actNum, //选中的场景下标 actNum, //选中的场景下标/sceneid
activeNavIdx, //选中的产品 activeNavIdx, //选中的产品
isShare, isShare,
sharephone sharephone
...@@ -76,44 +84,34 @@ Page({ ...@@ -76,44 +84,34 @@ Page({
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 || ''
//分享数据
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(() => { setTimeout(() => {
utils.setNavigationBarTitle(item?.productName) utils.setNavigationBarTitle(proInfo?.productName)
},100) },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.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
console.log(this.shareQuery, 'onload----')
this.shareTrackData = { this.shareTrackData = {
sceneCode: this.data.sceneCode, sceneCode: sceneObj.sceneCode,
productCode: item?.productCode, productCode: proInfo?.productCode,
productName: item?.productName, productName: proInfo?.productName,
category: item?.category, category: proInfo?.category,
productDesc: item?.productName, productDesc: proInfo?.productName,
shareOpenId:shareOpenId shareOpenId: shareOpenId
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
} }
console.log(this.shareTrackData, 'onload----shareTrackData')
}, },
//接受跳转的路由参数(小程序页面跳转) //接受跳转的路由参数(小程序页面跳转)
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, sceneid99=0 } = options;
let data = actNum != 99 ? scenceList : productData[actNum]
let value = actNum != 99 ? actNum : sceneid99
let sceneObj = data.find(item => item.sceneid == value)
let proInfo = sceneObj?.productList.find(item => item.id == activeNavIdx)
this.setData({ this.setData({
actNum, //选中的场景下标 actNum, //选中的场景下标
...@@ -121,30 +119,16 @@ Page({ ...@@ -121,30 +119,16 @@ Page({
sharephone:phone //联系电话 (登陆的用户) 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 userInfoObj = wx.$storage.get("userInfo");
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称 // #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName; let name = userInfoObj.merchantName;
this.shareTitle = `${name}给你分享一个活动${this.data.proInfo?.productName},戳我参与~`; this.shareTitle = `${name}给你分享一个活动${proInfo?.productName},戳我参与~`;
//分享数据 //分享数据
let item = this.data.proInfo || {} // let item = this.data.proInfo || {}
setTimeout(() => { setTimeout(() => {
utils.setNavigationBarTitle(item.productName) utils.setNavigationBarTitle(proInfo?.productName)
},100) },100)
//分享人openId //分享人openId
...@@ -152,18 +136,20 @@ Page({ ...@@ -152,18 +136,20 @@ Page({
shareOpenId = wx_user_info.openId || '' shareOpenId = wx_user_info.openId || ''
// &shareOpenId=${shareOpenId} // &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.shareQuery = `sceneCode=${sceneObj?.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${phone}`
console.log(this.shareQuery, 'onrouter----')
this.shareTrackData = { this.shareTrackData = {
sceneCode: this.data.sceneCode, sceneCode: sceneObj?.sceneCode,
productCode: item?.productCode, productCode: proInfo?.productCode,
productName: item?.productName, productName: proInfo?.productName,
category: item?.category, category: proInfo?.category,
productDesc: item?.productName, productDesc: proInfo?.productName,
shareOpenId:shareOpenId shareOpenId:shareOpenId
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
// apiData, // apiData,
} }
console.log(this.shareTrackData, 'onrouter----shareTrackData')
}, },
//获取配置url //获取配置url
......
// 场景详情 // 场景详情
import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed"; import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed";
import { IMG_URL } from "~/utils/constantData.js"; import { IMG_URL } from "~/utils/constantData.js";
import { senceData, productData } from '~/pages/tab/index/constant/senceData' // import { senceData, productData } from '~/pages/tab/index/constant/senceData'
import { scenceList } 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";
...@@ -14,8 +15,8 @@ Page({ ...@@ -14,8 +15,8 @@ Page({
behaviors: [computedBehavior], behaviors: [computedBehavior],
data: { data: {
IMG_URL, IMG_URL,
senceData, // senceData,
productData, // productData,
proInfo: {}, proInfo: {},
isShare: false, //是否是分享出去的 isShare: false, //是否是分享出去的
actNum: 0, actNum: 0,
...@@ -63,53 +64,55 @@ Page({ ...@@ -63,53 +64,55 @@ Page({
wx.hideHomeButton(); wx.hideHomeButton();
} }
let sceneObj = scenceList.find(item => item.sceneid == actNum)
let proInfo = sceneObj?.productList[activeNavIdx]
console.log(sceneObj, 'sceneObj---')
console.log(proInfo, 'proInfo---')
this.setData({ this.setData({
actNum, actNum, //选中的场景下标/sceneid
activeNavIdx, activeNavIdx, //选中的产品
isShare, isShare,
phone, phone //联系电话
}); });
//分享数据 //分享数据
const senceList = this.data.productData[this.data.actNum].filter(item => item.name != '全部') // const senceList = this.data.productData[this.data.actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) { // for (let i = 0; i < senceList.length; i++) {
let item = senceList[i] // let item = senceList[i]
let proIdList = senceList[i]?.productList.map(k => k.id) // let proIdList = senceList[i]?.productList.map(k => k.id)
if (proIdList.includes(activeNavIdx)) { // if (proIdList.includes(activeNavIdx)) {
let proInfo = item.productList.find(k => k.id == activeNavIdx) // let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({ // this.setData({
proInfo, // proInfo,
sceneCode: item.sceneCode || '' // sceneCode: item.sceneCode || ''
}) // })
break // break
} // }
} // }
// 分享描述 // 分享描述
this.shareTitle = `给你分享一个${senceData[actNum]?.tabname},戳我参与~`; this.shareTitle = `给你分享一个${sceneObj?.name},戳我参与~`;
//分享数据 //分享数据
let senceItem = senceData[actNum]; // let item = sceneObj?.productList[activeNavIdx];
let item = senceData[actNum]?.productList[activeNavIdx]; // console.log("title", item.productName);
console.log("title", item.productName);
setTimeout(() => { setTimeout(() => {
// wx.setNavigationBarTitle({ utils.setNavigationBarTitle(sceneObj.name);
// title: item.productName,
// });
utils.setNavigationBarTitle(senceData[actNum].tabname);
}, 100); }, 100);
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${ this.shareQuery = `sceneCode=${sceneObj?.sceneCode}&productCode=${
item?.productCode proInfo?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${ }&isShare=${true}&productDesc=${proInfo?.productName}&category=${
item?.category proInfo?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&phone=${phone}`; }&actNum=${actNum}&activeNavIdx=${activeNavIdx}&phone=${phone}`;
this.shareTrackData = { this.shareTrackData = {
sceneCode: senceItem?.sceneCode, sceneCode: sceneObj?.sceneCode,
productCode: item?.productCode, productCode: proInfo?.productCode,
productName: item?.productName, productName: proInfo?.productName,
category: item?.category, category: proInfo?.category,
productDesc: item?.productName, productDesc: proInfo?.productName,
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
}; };
...@@ -119,43 +122,61 @@ Page({ ...@@ -119,43 +122,61 @@ Page({
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;
let sceneObj = scenceList.find(item => item.sceneid == actNum)
let proInfo = sceneObj?.productList[activeNavIdx]
console.log(sceneObj, 'sceneObj---')
console.log(proInfo, 'proInfo---')
this.setData({ this.setData({
actNum, //选中的场景下标 actNum, //选中的场景下标/sceneid
activeNavIdx, //选中的产品 activeNavIdx, //选中的产品
phone, //联系电话 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]
// console.log(item)
// 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 userInfoObj = wx.$storage.get("userInfo");
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称 // #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name = userInfoObj.merchantName; let name = userInfoObj.merchantName;
this.shareTitle = `${name}给你分享一个${senceData[actNum]?.tabname},戳我参与~`; this.shareTitle = `${name}给你分享一个${sceneObj?.name},戳我参与~`;
//分享数据 //分享数据
let item = senceData[actNum]?.productList[activeNavIdx];
console.log("title2", item.productName);
setTimeout(() => { setTimeout(() => {
// wx.setNavigationBarTitle({ utils.setNavigationBarTitle(sceneObj?.name);
// title: item.productName,
// });
utils.setNavigationBarTitle(senceData[actNum].tabname);
}, 100); }, 100);
this.shareQuery = `sceneCode=${senceData[actNum].sceneCode}&productCode=${ this.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${
item?.productCode proInfo?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${ }&isShare=${true}&productDesc=${proInfo?.productName}&category=${
item?.category proInfo?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&phone=${phone}`; }&actNum=${actNum}&activeNavIdx=${activeNavIdx}&phone=${phone}`;
this.shareTrackData = { this.shareTrackData = {
sceneCode: senceData[actNum]?.sceneCode, sceneCode: sceneObj?.sceneCode,
productCode: item?.productCode, productCode: proInfo?.productCode,
productName: item?.productName, productName: proInfo?.productName,
category: item?.category, category: proInfo?.category,
productDesc: item?.productName, productDesc: proInfo?.productName,
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
// apiData, // apiData,
}; };
console.log(this.shareQuery, 'shareQuery')
console.log(this.shareTrackData, 'this.shareTrackData-----------')
}, },
onClickTab(event) { onClickTab(event) {
// console.log('event: ', event);s // console.log('event: ', event);s
...@@ -181,30 +202,11 @@ Page({ ...@@ -181,30 +202,11 @@ Page({
onPageScroll: (function () { onPageScroll: (function () {
let timer = null; let timer = null;
return function (e) { return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束 // 监听页面的滚动开始和结束
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(() => { timer = setTimeout(() => {
let { imgTopArr } = this.data; let proDetail = this.selectComponent("#pro-detail")
// console.log("滚动结束",imgTopArr,e.scrollTop); proDetail.pageSroll(e)
// wx.$eventbus.emit('evt_page_scroll', { scrollTop: e.scrollTop })
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,
});
});
}, 100); }, 100);
}; };
})(), })(),
...@@ -242,10 +244,10 @@ Page({ ...@@ -242,10 +244,10 @@ Page({
// // console.log('imgTopArr',this.data.imgTopArr) // // console.log('imgTopArr',this.data.imgTopArr)
// // },500) // // },500)
// }, // },
phoneCall(e) { // phoneCall(e) {
let { phone } = e.currentTarget.dataset; // let { phone } = e.currentTarget.dataset;
wx.$api.phoneCall(phone); // wx.$api.phoneCall(phone);
}, // },
async init() { async init() {
try { try {
const { data, code, message } = await USERAPI.wxCodeLogin(); const { data, code, message } = await USERAPI.wxCodeLogin();
......
{ {
"usingComponents": { "usingComponents": {
"pro-detail": "../../../components/proDetail/proDetail" "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/scenarioDetail/scenarioDetail.wxml--> <!--packagesList/pages/scenarioDetail/scenarioDetail.wxml-->
<pro-detail id="pro-detail" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}"></pro-detail> <pro-detail id="pro-detail" showLeftFlag="{{showLeftFlag}}" sharephone="{{phone}}" actNum="{{actNum}}" activeNavIdx="{{activeNavIdx}}" activeUrl="{{activeUrl}}" bind:getUserInfo="getUserInfo"></pro-detail>
<!-- 申请按钮 不是分享出去的显示按钮 -->
<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
var measureList = Object.freeze([ var measureList = Object.freeze([
{ {
name: '新车洽谈场景', // name: '新车交付场景',
tips: '车损升级', name: '精品升级',
iconName: 'icon1', // tips: '精品升级',
product: [
{
name: '车损升级',
parentName: '新车洽谈场景',
tips: '车损升级',
value: '0-0',
typeIndex: '1.0',
isCheck: false,
rate: '0.5',
averagePrice: 1200,
flowCost: '0.4',
flowCostText: '40%',
serviceDividendRatio: '0.23'
}
]
},
{
name: '新车交付场景',
tips: '精品升级',
iconName: 'icon2', iconName: 'icon2',
product: [ product: [
{ {
name: '太阳膜升级', name: '太阳膜升级',
parentName: '新车交付场景', parentName: '精品升级',
tips: '精品升级', // tips: '精品升级',
value: '1-0', // value: '1-0',
typeIndex: '1.1', typeIndex: '1.1',
isCheck: false, isCheck: false,
rate: '0.55', rate: '0.55',
...@@ -40,15 +21,15 @@ var measureList = Object.freeze([ ...@@ -40,15 +21,15 @@ var measureList = Object.freeze([
] ]
}, },
{ {
name: '0-6月', name: '次新车转化',
iconName: 'icon3', iconName: 'icon3',
tips: '膨胀金活动', // tips: '膨胀金活动',
product: [ product: [
{ {
name: '膨胀金活动-车衣', name: '膨胀金活动-车衣',
parentName: '0-6月', parentName: '次新车转化',
tips: '膨胀金活动', // tips: '膨胀金活动',
value: '2-0', // value: '2-0',
typeIndex: '1.2', typeIndex: '1.2',
isCheck: false, isCheck: false,
rate: '0.09', rate: '0.09',
...@@ -59,9 +40,9 @@ var measureList = Object.freeze([ ...@@ -59,9 +40,9 @@ var measureList = Object.freeze([
}, },
{ {
name: '膨胀金活动-改色膜', name: '膨胀金活动-改色膜',
parentName: '0-6月', parentName: '次新车转化',
tips: '膨胀金活动', // tips: '膨胀金活动',
value: '2-1', // value: '2-1',
typeIndex: '1.2', typeIndex: '1.2',
isCheck: false, isCheck: false,
rate: '0.06', rate: '0.06',
...@@ -73,16 +54,16 @@ var measureList = Object.freeze([ ...@@ -73,16 +54,16 @@ var measureList = Object.freeze([
] ]
}, },
{ {
name: '6个月以上', name: '售后众筹',
iconName: 'icon4', iconName: 'icon4',
tips: '众筹活动', // tips: '众筹活动',
product: [ product: [
{ {
name: '360全景导航', name: '360全景导航',
parentName: '6个月以上', parentName: '售后众筹',
tips: '众筹活动', // tips: '众筹活动',
typeIndex: '1.3', typeIndex: '1.3',
value: '3-0', // value: '3-0',
isCheck: false, isCheck: false,
rate: '0.015', rate: '0.015',
averagePrice: 2680, averagePrice: 2680,
...@@ -92,9 +73,9 @@ var measureList = Object.freeze([ ...@@ -92,9 +73,9 @@ var measureList = Object.freeze([
}, },
{ {
name: 'AR导航', name: 'AR导航',
parentName: '6个月以上', parentName: '售后众筹',
tips: '众筹活动', // tips: '众筹活动',
value: '3-1', // value: '3-1',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
rate: '0.015', rate: '0.015',
...@@ -105,9 +86,9 @@ var measureList = Object.freeze([ ...@@ -105,9 +86,9 @@ var measureList = Object.freeze([
}, },
{ {
name: '氛围灯', name: '氛围灯',
parentName: '6个月以上', parentName: '售后众筹',
tips: '众筹活动', // tips: '众筹活动',
value: '3-2', // value: '3-2',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
rate: '0.015', rate: '0.015',
...@@ -118,9 +99,9 @@ var measureList = Object.freeze([ ...@@ -118,9 +99,9 @@ var measureList = Object.freeze([
}, },
{ {
name: '座椅通风', name: '座椅通风',
parentName: '6个月以上', parentName: '售后众筹',
tips: '众筹活动', // tips: '众筹活动',
value: '3-3', // value: '3-3',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
rate: '0.01', rate: '0.01',
...@@ -131,9 +112,9 @@ var measureList = Object.freeze([ ...@@ -131,9 +112,9 @@ var measureList = Object.freeze([
}, },
{ {
name: '智能香薰', name: '智能香薰',
parentName: '6个月以上', parentName: '售后众筹',
tips: '众筹活动', // tips: '众筹活动',
value: '3-4', // value: '3-4',
typeIndex: '1.3', typeIndex: '1.3',
isCheck: false, isCheck: false,
rate: '0.015', rate: '0.015',
...@@ -143,7 +124,27 @@ var measureList = Object.freeze([ ...@@ -143,7 +124,27 @@ var measureList = Object.freeze([
serviceDividendRatio: '0.24' serviceDividendRatio: '0.24'
} }
] ]
},
{
name: '会员权益/升级',
// tips: '车损升级',
iconName: 'icon1',
product: [
{
name: '车损升级',
parentName: '会员权益/升级',
// tips: '车损升级',
// value: '0-0',
typeIndex: '1.0',
isCheck: false,
rate: '0.5',
averagePrice: 1200,
flowCost: '0.4',
flowCostText: '40%',
serviceDividendRatio: '0.23'
} }
]
},
]) ])
export default { export default {
......
...@@ -38,7 +38,7 @@ Page({ ...@@ -38,7 +38,7 @@ Page({
// } // }
// } // }
if (!this.data.isDisabled) { if (!this.data.isDisabled) {
console.log(this.data.checkArray) // console.log(this.data.checkArray)
let checkArray = [] let checkArray = []
this.data.measureList.forEach(item => { this.data.measureList.forEach(item => {
item.product.forEach(i => { item.product.forEach(i => {
...@@ -47,27 +47,26 @@ Page({ ...@@ -47,27 +47,26 @@ Page({
} }
}) })
}) })
console.log(checkArray) // console.log(checkArray)
const params = Object.assign({checkArray}, this.data.formData) const params = Object.assign({checkArray}, this.data.formData)
console.log(params) // console.log(params)
wx.$router.go("measureResult", params); wx.$router.go("measureResult", params);
} }
}, },
// 选择产品 // 选择产品
checkProduct(e) { checkProduct(e) {
const value = e.target.dataset.value const { pidx, idx } = e.currentTarget.dataset
const index = +value.split('-')[0] const value = pidx + '-' + idx
const productIndex = +value.split('-')[1] const name = `measureList[${pidx}].product[${idx}].isCheck`
const name = `measureList[${index}].product[${productIndex}].isCheck` const val = this.data.measureList[pidx].product[idx].isCheck
const val = this.data.measureList[index].product[productIndex].isCheck
!val ? checkMap.set(value, !val) : checkMap.delete(value) !val ? checkMap.set(value, !val) : checkMap.delete(value)
console.log(checkMap) // console.log(checkMap)
this.setData({ this.setData({
[name]: !val, [name]: !val,
checkArray: [...checkMap.keys()] checkArray: [...checkMap.keys()]
}) })
this.validForm() this.validForm()
console.log(this.data.checkArray) // console.log(this.data.checkArray)
}, },
// 必填校验 // 必填校验
...@@ -83,7 +82,7 @@ Page({ ...@@ -83,7 +82,7 @@ Page({
handleInput(e) { handleInput(e) {
let name = e.currentTarget.dataset.name let name = e.currentTarget.dataset.name
let val = this.validateNumber(e.detail.value) let val = this.validateNumber(e.detail.value)
console.log(val) // console.log(val)
const form = `formData.${name}` const form = `formData.${name}`
this.setData({ this.setData({
[form]: val [form]: val
...@@ -93,7 +92,7 @@ Page({ ...@@ -93,7 +92,7 @@ Page({
// 输入正整数校验 // 输入正整数校验
validateNumber(val) { validateNumber(val) {
console.log(val, val.replace(/\D/g, '')) // console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '') return val == 0 ? '' : val.replace(/\D/g, '')
}, },
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<view class="scenario"> <view class="scenario">
<image class="icon" webp src="{{IMGURL}}measure/{{i.iconName}}.png?v={{img_version}}"></image> <image class="icon" webp src="{{IMGURL}}measure/{{i.iconName}}.png?v={{img_version}}"></image>
{{i.name}} {{i.name}}
<view wx:if="{{i.tips}}" class="title-tip">{{i.tips}}</view> <!-- <view wx:if="{{i.tips}}" class="title-tip">{{i.tips}}</view> -->
</view> </view>
<view class="product-list"> <view class="product-list">
<view class="product-item {{j.isCheck ? 'active':''}}" wx:for="{{i.product}}" wx:for-item="j" wx:key="index" data-value="{{j.value}}" bindtap="checkProduct"> <view class="product-item {{j.isCheck ? 'active':''}}" wx:for="{{i.product}}" wx:for-item="j" wx:for-index="jIdx" wx:key="index" data-pidx="{{index}}" data-idx="{{jIdx}}" data-value="{{j.value}}" bindtap="checkProduct">
<image hidden="{{!j.isCheck}}" class="iconCheck" webp src="{{IMGURL}}measure/icon-check.png?v={{img_version}}"></image> <image hidden="{{!j.isCheck}}" class="iconCheck" webp src="{{IMGURL}}measure/icon-check.png?v={{img_version}}"></image>
{{j.name}}</view> {{j.name}}</view>
</view> </view>
......
...@@ -19,7 +19,7 @@ import { subscriptionSystemData } from './systemData' ...@@ -19,7 +19,7 @@ import { subscriptionSystemData } from './systemData'
*/ */
// 车损升级 // 车损升级
const sceneImgs0 = [`${IMG_URL}index/scene/scene00.png`, `${IMG_URL}index/scene/scene01.png`, `${IMG_URL}index/scene/scene02.png`, `${IMG_URL}index/scene/scene03.png`] const sceneImgs0 = [`${IMG_URL}index/scene/scene00.png`, `${IMG_URL}index/scene/scene01.png`, `${IMG_URL}index/scene/scene02.png`, `${IMG_URL}index/scene/scene03.png`]
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 productImgs0 = [`${IMG_URL}index/newProImgs/pro00.webp`, `${IMG_URL}index/newProImgs/pro01.webp`, `${IMG_URL}index/newProImgs/pro02.webp`, `${IMG_URL}index/newProImgs/pro03.webp`]
const videoList0 = [ const videoList0 = [
{ {
videoUrl: `${videoBaseUrl}video/digital_card_30s.mp4`, videoUrl: `${videoBaseUrl}video/digital_card_30s.mp4`,
...@@ -102,7 +102,7 @@ const scenario_0 = [ ...@@ -102,7 +102,7 @@ const scenario_0 = [
// 精品升级 // 精品升级
const sceneImgs1 = [`${IMG_URL}index/scene/scene10.png`, `${IMG_URL}index/scene/scene11.png`, `${IMG_URL}index/scene/scene12.png`, `${IMG_URL}index/scene/scene13.png`] const sceneImgs1 = [`${IMG_URL}index/scene/scene10.png`, `${IMG_URL}index/scene/scene11.png`, `${IMG_URL}index/scene/scene12.png`, `${IMG_URL}index/scene/scene13.png`]
const productImgs1 = [`${IMG_URL}index/productImgs/product10.webp`, `${IMG_URL}index/productImgs/product11.webp`, `${IMG_URL}index/productImgs/product12.webp`, `${IMG_URL}index/productImgs/product13.webp`] const productImgs1 = [`${IMG_URL}index/newProImgs/pro10.webp`, `${IMG_URL}index/newProImgs/pro11.webp`, `${IMG_URL}index/newProImgs/pro12.webp`, `${IMG_URL}index/newProImgs/pro13.webp`]
const videoList1 = [ const videoList1 = [
{ {
videoUrl: `${videoBaseUrl}video/solar.mp4`, videoUrl: `${videoBaseUrl}video/solar.mp4`,
...@@ -136,6 +136,7 @@ const scenario_1 = [ ...@@ -136,6 +136,7 @@ const scenario_1 = [
sceneImgs: sceneImgs1, sceneImgs: sceneImgs1,
productImgs: productImgs1, productImgs: productImgs1,
"sceneCode":"SC002", "sceneCode":"SC002",
sceneid: 1,
productList: [ productList: [
{ {
id: 0, id: 0,
...@@ -162,7 +163,7 @@ const scenario_1 = [ ...@@ -162,7 +163,7 @@ const scenario_1 = [
// 客户线上化 // 客户线上化
const sceneImgs2 = [`${IMG_URL}index/scene/scene20.png`, `${IMG_URL}index/scene/scene21.png`, `${IMG_URL}index/scene/scene22.png`, `${IMG_URL}index/scene/scene23.png`] const sceneImgs2 = [`${IMG_URL}index/scene/scene20.png`, `${IMG_URL}index/scene/scene21.png`, `${IMG_URL}index/scene/scene22.png`, `${IMG_URL}index/scene/scene23.png`]
const productImgs2 = [`${IMG_URL}index/productImgs/product20.webp`, `${IMG_URL}index/productImgs/product21.webp`, `${IMG_URL}index/productImgs/product22.webp`, `${IMG_URL}index/productImgs/product23.webp`] const productImgs2 = [`${IMG_URL}index/newProImgs/pro20.webp`, `${IMG_URL}index/newProImgs/pro21.webp`, `${IMG_URL}index/newProImgs/pro22.webp`, `${IMG_URL}index/newProImgs/pro23.webp`]
const posterList2 = [ const posterList2 = [
{ {
src: `${IMG_URL}index/poster/poster3-0.webp`, src: `${IMG_URL}index/poster/poster3-0.webp`,
...@@ -188,6 +189,7 @@ const scenario_2 = [ ...@@ -188,6 +189,7 @@ const scenario_2 = [
sceneImgs: sceneImgs2, sceneImgs: sceneImgs2,
productImgs: productImgs2, productImgs: productImgs2,
"sceneCode":"SC003", "sceneCode":"SC003",
sceneid: 2,
productList: [ productList: [
{ {
id: 0, id: 0,
...@@ -238,7 +240,7 @@ const scenario_2 = [ ...@@ -238,7 +240,7 @@ const scenario_2 = [
// 众筹活动 // 众筹活动
const sceneImgs3 = [`${IMG_URL}index/scene/scene30.png`, `${IMG_URL}index/scene/scene31.png`, `${IMG_URL}index/scene/scene32.png`, `${IMG_URL}index/scene/scene33.png`] const sceneImgs3 = [`${IMG_URL}index/scene/scene30.png`, `${IMG_URL}index/scene/scene31.png`, `${IMG_URL}index/scene/scene32.png`, `${IMG_URL}index/scene/scene33.png`]
const productImgs3 = [`${IMG_URL}index/productImgs/product30.webp`, `${IMG_URL}index/productImgs/product31.webp`, `${IMG_URL}index/productImgs/product32.webp`, `${IMG_URL}index/productImgs/product33.webp`] const productImgs3 = [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
const videoList3 = [ const videoList3 = [
{ {
videoUrl: `${videoBaseUrl}video/car_beauty.mp4`, videoUrl: `${videoBaseUrl}video/car_beauty.mp4`,
...@@ -305,6 +307,7 @@ const scenario_3 = [ ...@@ -305,6 +307,7 @@ const scenario_3 = [
{ {
name: '美容类', name: '美容类',
"sceneCode":"SC004", "sceneCode":"SC004",
sceneid: 3,
productList: [ productList: [
{ {
id: 0, id: 0,
...@@ -331,6 +334,8 @@ const scenario_3 = [ ...@@ -331,6 +334,8 @@ const scenario_3 = [
}, },
{ {
name: '轻改类', name: '轻改类',
"sceneCode":"SC004",
sceneid: 0,
productList: [ productList: [
{ {
id: 1, id: 1,
...@@ -347,7 +352,8 @@ const scenario_3 = [ ...@@ -347,7 +352,8 @@ const scenario_3 = [
productCode: 'PC006', productCode: 'PC006',
productName: '座椅通风', productName: '座椅通风',
category: '轻改类', category: '轻改类',
prodImg: `${IMG_URL}index/prod2/prod3-3.png` prodImg: `${IMG_URL}index/prod2/prod3-3.png`,
productImgs: [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32-car.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
}, },
{ {
id: 2, id: 2,
...@@ -364,7 +370,8 @@ const scenario_3 = [ ...@@ -364,7 +370,8 @@ const scenario_3 = [
productCode: 'PC007', productCode: 'PC007',
productName: 'AR导航', productName: 'AR导航',
category: '轻改类', category: '轻改类',
prodImg: `${IMG_URL}index/prod2/prod3-0.png` prodImg: `${IMG_URL}index/prod2/prod3-0.png`,
productImgs: [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32-AR.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
}, },
{ {
id: 3, id: 3,
...@@ -381,7 +388,8 @@ const scenario_3 = [ ...@@ -381,7 +388,8 @@ const scenario_3 = [
productCode: 'PC008', productCode: 'PC008',
productName: '氛围灯', productName: '氛围灯',
category: '轻改类', category: '轻改类',
prodImg: `${IMG_URL}index/prod2/prod3-2.png` prodImg: `${IMG_URL}index/prod2/prod3-2.png`,
productImgs: [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32-lamp.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
}, },
{ {
id: 4, id: 4,
...@@ -398,7 +406,8 @@ const scenario_3 = [ ...@@ -398,7 +406,8 @@ const scenario_3 = [
productCode: 'PC009', productCode: 'PC009',
productName: '360全景导航', productName: '360全景导航',
category: '轻改类', category: '轻改类',
prodImg: `${IMG_URL}index/prod2/prod3-1.png` prodImg: `${IMG_URL}index/prod2/prod3-1.png`,
productImgs: [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32-360.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
}, },
{ {
id: 5, id: 5,
...@@ -415,7 +424,8 @@ const scenario_3 = [ ...@@ -415,7 +424,8 @@ const scenario_3 = [
productCode: 'PC009', productCode: 'PC009',
productName: '智能香氛系统', productName: '智能香氛系统',
category: '轻改类', category: '轻改类',
prodImg: `${IMG_URL}index/prod2/prod3-5.png` prodImg: `${IMG_URL}index/prod2/prod3-5.png`,
productImgs: [`${IMG_URL}index/newProImgs/pro30.webp`, `${IMG_URL}index/newProImgs/pro31.webp`, `${IMG_URL}index/newProImgs/pro32-xt.webp`, `${IMG_URL}index/newProImgs/pro33.webp`]
} }
], ],
sceneImgs: sceneImgs3, sceneImgs: sceneImgs3,
...@@ -424,6 +434,39 @@ const scenario_3 = [ ...@@ -424,6 +434,39 @@ const scenario_3 = [
posterList: posterList3 posterList: posterList3
} }
] ]
// 膨胀金
const sceneImgs4 = [`${IMG_URL}index/productImgs/product70.webp`, `${IMG_URL}index/productImgs/product71.webp`, `${IMG_URL}index/productImgs/product72.webp`, `${IMG_URL}index/productImgs/product73.webp`, `${IMG_URL}index/productImgs/product74.webp`, `${IMG_URL}index/productImgs/product75.webp`]
const productImgs4 = [`${IMG_URL}index/productImgs/product70.webp`, `${IMG_URL}index/productImgs/product71.webp`, `${IMG_URL}index/productImgs/product72.webp`, `${IMG_URL}index/productImgs/product73.webp`, `${IMG_URL}index/productImgs/product74.webp`, `${IMG_URL}index/productImgs/product75.webp`]
const videoList4 = [
{
videoUrl: `${videoBaseUrl}video/expansive.mp4`,
posterUrl: `${IMG_URL}index/poster/expansive_activity.png`,
name: '数字化营销增值服务-膨胀金活动',
manufacturer: '嘀加智慧',
view: 3298
}
]
const scenario_4 = [
{
name: '服务类',
"sceneCode":"SC005",
productList: [
{
id: 0,
currentIndex: 0,
proName: '膨胀金',
prodImg: `${IMG_URL}index/prod2/prod4-0.png`,
tabList: ['项目介绍', '活动方案', '销售场景', '合作案例', '合作说明', 'FAQ'],
sceneImgs: sceneImgs4
}
],
productImgs: productImgs4,
videoList: videoList4,
sceneImgs: sceneImgs4
}
]
const senceData = [ const senceData = [
{ {
id: 0, id: 0,
...@@ -452,7 +495,8 @@ const senceData = [ ...@@ -452,7 +495,8 @@ const senceData = [
{ {
id: 4, id: 4,
tabname: '膨胀金活动', tabname: '膨胀金活动',
banner: `${IMG_URL}index/banner/banner4.png` banner: `${IMG_URL}index/banner/banner6.png`,
sceneImgs: sceneImgs4
} }
] ]
const productData = { const productData = {
...@@ -460,10 +504,20 @@ const productData = { ...@@ -460,10 +504,20 @@ const productData = {
1: scenario_1, 1: scenario_1,
2: scenario_2, 2: scenario_2,
3: scenario_3, 3: scenario_3,
4: scenario_4,
99: subscriptionSystemData
}
const productData1 = {
0: scenario_0,
1: scenario_1,
2: scenario_2,
3: scenario_3,
4: scenario_4,
99: subscriptionSystemData 99: subscriptionSystemData
} }
module.exports = { module.exports = {
senceData, senceData,
productData productData,
productData1
} }
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
const videoBaseUrl = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/'
const subscriptionIMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/subscription/' 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 IMG_URL2 = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/'
const subscriptionBannerUrl = IMG_URL2 + 'banner/banner4.webp' const subscriptionBannerUrl = IMG_URL2 + 'banner/banner4.webp'
...@@ -32,20 +33,35 @@ const videoList1 = [ ...@@ -32,20 +33,35 @@ const videoList1 = [
view: 1320 view: 1320
} }
] ]
// 膨胀金
const sceneImgs4 = [`${IMG_URL}index/productImgs/product70.webp`, `${IMG_URL}index/productImgs/product71.webp`, `${IMG_URL}index/productImgs/product72.webp`, `${IMG_URL}index/productImgs/product73.webp`, `${IMG_URL}index/productImgs/product74.webp`, `${IMG_URL}index/productImgs/product75.webp`]
const productImgs4 = [`${IMG_URL}index/productImgs/product70.webp`, `${IMG_URL}index/productImgs/product71.webp`, `${IMG_URL}index/productImgs/product72.webp`, `${IMG_URL}index/productImgs/product73.webp`, `${IMG_URL}index/productImgs/product74.webp`, `${IMG_URL}index/productImgs/product75.webp`]
const videoList4 = [
{
videoUrl: `${videoBaseUrl}video/expansive.mp4`,
posterUrl: `${IMG_URL}index/poster/expansive_activity.png`,
name: '数字化营销增值服务-续保膨胀金',
manufacturer: '嘀加智慧',
view: 3298
}
]
const subscriptionSystemData = [ const subscriptionSystemData = [
{ {
name: '客户沉淀', name: '客户线上化',
//场景详情图片 //场景详情图片
// sceneImgs: sceneImgs5, // sceneImgs: sceneImgs5,
// 产品详情图片 // 产品详情图片
productImgs: productImgs0, productImgs: productImgs0,
"sceneCode":"SC005", "sceneCode":"SC008",
sceneid: 0,
productList: [ productList: [
{ {
id: 0, id: 0,
sceneid: 0,
currentIndex: 0, currentIndex: 0,
img: 'product-img1', img: 'product-img1',
proName: '客户活跃代运营', proName: '私域用户代运营',
price: '100', price: '100',
profit: '1200000', profit: '1200000',
type: 'service', type: 'service',
...@@ -55,7 +71,7 @@ const subscriptionSystemData = [ ...@@ -55,7 +71,7 @@ const subscriptionSystemData = [
varType: 0, varType: 0,
flow: 10000, flow: 10000,
productCode: 'PC011', productCode: 'PC011',
productName: '客户活跃代运营', productName: '私域用户代运营',
category: '代运营', category: '代运营',
prodImg: `${IMG_URL2}/prod2/prod4-0.webp`, prodImg: `${IMG_URL2}/prod2/prod4-0.webp`,
sceneImgs: [ sceneImgs: [
...@@ -76,6 +92,7 @@ const subscriptionSystemData = [ ...@@ -76,6 +92,7 @@ const subscriptionSystemData = [
}, },
{ {
id: 1, id: 1,
sceneid: 0,
currentIndex: 1, currentIndex: 1,
img: 'product-img1', img: 'product-img1',
proName: '定保数字化招揽', proName: '定保数字化招揽',
...@@ -116,11 +133,13 @@ const subscriptionSystemData = [ ...@@ -116,11 +133,13 @@ const subscriptionSystemData = [
//场景详情图片 //场景详情图片
sceneImgs: sceneImgs5, sceneImgs: sceneImgs5,
"sceneCode":"SC006", "sceneCode":"SC006",
sceneid: 1,
// 产品详情图片 // 产品详情图片
productImgs: productImgs0, productImgs: productImgs0,
productList: [ productList: [
{ {
id: 2, id: 2,
sceneid: 1,
currentIndex: 0, currentIndex: 0,
img: 'product-img1', img: 'product-img1',
proName: '事故车救援服务', proName: '事故车救援服务',
...@@ -157,10 +176,44 @@ const subscriptionSystemData = [ ...@@ -157,10 +176,44 @@ const subscriptionSystemData = [
// posterList: posterList0 // posterList: posterList0
}, },
{ {
name: '续保膨胀金',
"sceneCode":"SC005",
sceneid: 2,
//场景详情图片
sceneImgs: sceneImgs4,
// 产品详情图片
productImgs: productImgs4,
productList: [
{
id: 3,
sceneid: 2,
currentIndex: 0,
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/prod4-0.png`,
tabList: ['项目介绍', '活动方案', '销售场景', '合作案例', '合作说明', 'FAQ'],
sceneImgs: sceneImgs4
}
],
videoList: videoList4
// posterList: posterList0
},
{
name: '数字化转型案例', name: '数字化转型案例',
"sceneCode":"SC007", "sceneCode":"SC007",
sceneid: 3,
productList: [], productList: [],
videoList: videoList0.concat(videoList1) videoList: videoList0.concat(videoList1).concat(videoList4)
} }
] ]
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
"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" "gl-subscription": "glsx-applet-component/subscription/index",
"gl-scenario": "glsx-applet-component/scenario/index",
"service": "../../../components/Service/Service"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 50 "onReachBottomDistance": 50
......
...@@ -112,33 +112,19 @@ page { ...@@ -112,33 +112,19 @@ page {
} }
} }
.chat { .fixed-btns {
position: fixed; position: fixed;
right: -4px; right: -4px;
top: 52%; top: 52%;
width: 64px; width: 64px;
height: 64px; z-index: 100;
border-radius: 50%;
z-index: 2;
} }
.bus-pro { .fixed-btns image {
position: fixed;
right: -4px;
top: 60%;
width: 128rpx;
height: 143rpx;
z-index: 2;
}
.output-value {
position: fixed;
right: -2px;
top: 70%;
width: 64px; width: 64px;
height: 64px; height: 64px;
// border-radius: 50%; border-radius: 50%;
z-index: 2; margin-top: -20rpx;
} }
/* 测算弹窗 */ /* 测算弹窗 */
......
<wxs src="./index.wxs" module="filterUtils" /> <wxs src="./index.wxs" module="filterUtils" />
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
<tab <tab tab="{{navList}}" itemWidth="{{'38%'}}" index="{{tabIndx}}" tabHeight unreadClueCount="{{unreadClueCount}}" bindclick="changeTabIndx" class="tabContainer" />
tab="{{navList}}"
itemWidth="{{'35%'}}"
index="{{tabIndx}}"
tabHeight
unreadClueCount="{{unreadClueCount}}"
bindclick="changeTabIndx"
class="tabContainer" />
</navigation-bar> </navigation-bar>
<view class="reclaim"> <view class="reclaim">
<!-- 头部 --> <!-- 头部 -->
...@@ -22,14 +15,17 @@ ...@@ -22,14 +15,17 @@
</view> </view>
<!-- 托客户内容 --> <!-- 托客户内容 -->
<indexProduct <!-- <indexProduct
wx:if="{{tabIndx == 0 }}" wx:if="{{tabIndx == 0 }}"
bindselectCar="selectCar" bindselectCar="selectCar"
senceData="{{senceData}}" senceData="{{senceData}}"
actNum="{{actNum}}" actNum="{{actNum}}"
img_version="{{img_version}}" img_version="{{img_version}}"
headerHeight="{{headerHeight}}" headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" /> bindrefresherrefresh="refresherrefresh" /> -->
<block wx:if="{{tabIndx == 0}}">
<gl-scenario currentScenIndex="{{3}}" discoverIndex="{{2}}" list="{{scenceList}}" activityList="{{activityList}}" bindactivityClick="activityClick" bindproClick="proClick" bind:videoClick="videoClick" bindsenceClick="senceClick" bindleftClick="leftClick"></gl-scenario>
</block>
<!-- 看线索内容 --> <!-- 看线索内容 -->
<!-- <indexClue <!-- <indexClue
id="indexclue" id="indexclue"
...@@ -37,42 +33,26 @@ ...@@ -37,42 +33,26 @@
headerHeight="{{headerHeight}}" headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}" disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" /> --> bindshowToggleToast="showToggleToast" /> -->
<!-- <view wx:if="{{tabIndx == 1}}">系统订阅</view> --> <!-- <view wx:if="{{tabIndx == 1}}">客户数字化</view> -->
<block wx:if="{{tabIndx == 1}}"> <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="系统订阅"/> <gl-subscription list="{{subscriptionSystemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bind:proClick="proClick" bind:videoClick="videoClick" bindcurrentScen="getCurrentScen" data-name="客户数字化" />
</block> </block>
</view> </view>
<!-- 收藏、取消提示框 --> <!-- 收藏、取消提示框 -->
<vas-toast id='toast' /> <vas-toast id='toast' />
<!-- 引导图 --> <!-- 引导图 -->
<view class="guide" wx:if="{{guideShow}}" style="overflow-y:hidden;"> <view class="guide" wx:if="{{guideShow}}" style="overflow-y:hidden;">
<image <image webp bindtap="guideFn" class="guide-img" src="{{IMG_URL}}index/newGuide/guide{{guideSrcIndex}}.png?v={{img_version}}" />
webp </view>
bindtap="guideFn" <view class="fixed-btns">
class="guide-img" <view wx:for="{{btnList}}" wx:key="index">
src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png?v={{img_version}}" /> <image webp wx:if="{{!item.isHide}}" src="{{IMG_URL}}index/{{item.imgSrc}}.png" bindtap="{{item.bindtap}}" />
</view>
<!-- 加微 -->
<service wx:if="{{isShowService}}" isFixed="{{false}}"></service>
</view> </view>
<!-- 在线客服 -->
<image
webp
class="chat"
src="{{IMG_URL}}index/contact.png"
bindtap="goConsult" />
<!-- 申请业务 -->
<image
webp
class="bus-pro"
src="{{IMG_URL}}index/bus-pro.png"
bindtap="openBus" />
<!-- 预估产值 -->
<image
webp
class="output-value"
bindtap="showCalculate"
src="{{IMG_URL}}index/valuation.png"
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">
<form bindsubmit="submit"> <form bindsubmit="submit">
<view class="dialog-header"> <view class="dialog-header">
...@@ -93,7 +73,6 @@ ...@@ -93,7 +73,6 @@
cursor-spacing="10" cursor-spacing="10"
value="{{formData.sales}}" value="{{formData.sales}}"
type="number" /> type="number" />
<!-- <view class="form-unit">台</view> -->
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-label">3年内售后存量用户</view> <view class="form-label">3年内售后存量用户</view>
...@@ -105,17 +84,14 @@ ...@@ -105,17 +84,14 @@
type="number" type="number"
cursor-spacing="10" cursor-spacing="10"
value="{{formData.flow}}" /> value="{{formData.flow}}" />
<!-- <view class="form-unit">人</view> -->
</view> </view>
<button class="dialog-btn" form-type="submit">提交测算</button> <button class="dialog-btn" form-type="submit">提交测算</button>
</view> </view>
</view> </view>
</form> </form>
</view> </view>
</view> </view> -->
<!-- --> <!-- -->
<crowdfund-poster wx:if="{{!guideShow}}" item="{{posterItem}}" /> <crowdfund-poster wx:if="{{!guideShow}}" item="{{posterItem}}" />
<!-- 全屏视频组件 --> <!-- 全屏视频组件 -->
<!-- <FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" /> --> <!-- <FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" /> -->
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,7 @@ const IMAGES = Object.freeze({ ...@@ -9,6 +9,7 @@ const IMAGES = Object.freeze({
userAvatarUrl: `/personal/userAvatarUrl.png` userAvatarUrl: `/personal/userAvatarUrl.png`
}) })
import { unreadApi, readApi } from '~/api/index.js' import { unreadApi, readApi } from '~/api/index.js'
import { getMockData } from '~/api/api'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -31,12 +32,13 @@ Page({ ...@@ -31,12 +32,13 @@ Page({
path: 'packagesList.clue', path: 'packagesList.clue',
hasRedPot: true, hasRedPot: true,
isRead: false isRead: false
}] }],
isShowService: false,
}, },
navGO(e) { navGO(e) {
let { path, item } = e.currentTarget.dataset let { path, item } = e.currentTarget.dataset
console.log(item) console.log(item)
if(item.name == "看线索") { if (item.name == "看线索") {
this.clueRead() this.clueRead()
} }
wx.$router.go(path) wx.$router.go(path)
...@@ -69,6 +71,7 @@ Page({ ...@@ -69,6 +71,7 @@ Page({
wx.$storage.rm('userInfo') wx.$storage.rm('userInfo')
wx.$storage.rm('auto_login_object') wx.$storage.rm('auto_login_object')
wx.$storage.rm('posterId') wx.$storage.rm('posterId')
wx.$storage.rm("mock_data")
wx.$router.reLaunch('login.index') wx.$router.reLaunch('login.index')
}) })
} }
...@@ -84,6 +87,7 @@ Page({ ...@@ -84,6 +87,7 @@ Page({
}, },
messageBoxPageIsRead() { messageBoxPageIsRead() {
let { serviceMerchantId } = this.data let { serviceMerchantId } = this.data
console.log(serviceMerchantId,'serviceMerchantId');
const idx = this.data.boxItemList.findIndex(item => item.name == '消息盒子') const idx = this.data.boxItemList.findIndex(item => item.name == '消息盒子')
mineApi mineApi
.messageBoxPageIsRead({ .messageBoxPageIsRead({
...@@ -120,7 +124,7 @@ Page({ ...@@ -120,7 +124,7 @@ Page({
sessionId sessionId
} }
readApi(param).then(res => { readApi(param).then(res => {
let { code } = res let { code, data } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
['boxItemList[' + idx + ']isRead']: !data.unreadClueCount ['boxItemList[' + idx + ']isRead']: !data.unreadClueCount
...@@ -132,13 +136,20 @@ Page({ ...@@ -132,13 +136,20 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: async function (options) {
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let serviceMerchantId = userInfo.subLoginUser.merchantId let serviceMerchantId = userInfo.subLoginUser.merchantId
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({ this.setData({
serviceMerchantId, serviceMerchantId,
userInfo: userInfo.subLoginUser userInfo: userInfo.subLoginUser
}) })
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
})
console.log(serviceMerchantId) console.log(serviceMerchantId)
}, },
/** /**
......
{ {
"navigationStyle": "custom" "navigationStyle": "custom",
"usingComponents": {
"service": "../../../components/Service/Service"
}
} }
...@@ -39,3 +39,5 @@ ...@@ -39,3 +39,5 @@
退出登录 退出登录
</button> </button>
</view> </view>
<!-- 加微 -->
<service wx:if="{{isShowService}}"></service>
\ No newline at end of file \ No newline at end of file
...@@ -34,20 +34,20 @@ Component({ ...@@ -34,20 +34,20 @@ Component({
openedIcon: `${IMG_URL}/output/openedIcon.png`, openedIcon: `${IMG_URL}/output/openedIcon.png`,
custSceneList: [ custSceneList: [
{ {
title: '新车洽谈场景', title: '精品升级',
subTitle: '1.0新车权益升级' // subTitle: '1.0新车权益升级'
}, },
{ {
title: '新车交付场景', title: '次新车转化',
subTitle: '1.1新车精品升级' // subTitle: '1.1新车精品升级'
}, },
{ {
title: '0-6个月', title: '售后众筹',
subTitle: '1.2次新车膨胀金活动' // subTitle: '1.2次新车膨胀金活动'
}, },
{ {
title: '6个月以上', title: '会员权益/升级',
subTitle: '1.3售后直播众筹活动' // subTitle: '1.3售后直播众筹活动'
} }
] ]
}, },
......
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml --> <!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<view class="flex scene"> <view class="flex scene">
<view <view class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}"
wx:for="{{custSceneList}}"
wx:key="index"
bindtap="handleClick"
data-idx="{{index + 1}}">
<view wx:if="{{formData['showList'][index]}}" class="open-icon"> <view wx:if="{{formData['showList'][index]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image> <image src="{{openedIcon}}" webp></image>
</view> </view>
<image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}" /> <image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="lock-img " src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" /> <image wx:else class="lock-img " src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" />
<view class="title-box">
<view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view> <view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view>
</view>
<view class="scene-label">{{item.subTitle}}</view> <view class="scene-label">{{item.subTitle}}</view>
<!-- wx:if="{{scenePriceList.length}}" --> <!-- wx:if="{{scenePriceList.length}}" -->
<view class="total-price">¥ {{filter.money_three_for_two_thousands(formData['showList'][index].totalMoney||0)}}</view> <view class="total-price">¥ {{filter.money_three_for_two_thousands(formData['showList'][index].totalMoney||0)}}</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
.scene-item { .scene-item {
box-sizing: border-box; box-sizing: border-box;
height: 248rpx; height: 248rpx;
...@@ -30,11 +29,24 @@ ...@@ -30,11 +29,24 @@
margin-right: 0; margin-right: 0;
} }
.title-box {
height: 68rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 10rpx 0 4rpx;
}
.scene-title { .scene-title {
width: 100rpx;
font-weight: 600;
font-size: 24rpx; font-size: 24rpx;
height: 44rpx; text-align: center;
line-height: 44rpx; color: #323436;
margin: 10rpx 0 4rpx; }
.scene-item:nth-child(2) .scene-title {
width: 120rpx;
} }
/* 已开通 - start */ /* 已开通 - start */
...@@ -52,6 +64,10 @@ ...@@ -52,6 +64,10 @@
height: 78rpx; height: 78rpx;
} }
.open-icon image {
height: 100%;
}
/* 已开通 - end */ /* 已开通 - end */
/* 选中 - start */ /* 选中 - start */
...@@ -80,15 +96,9 @@ ...@@ -80,15 +96,9 @@
/* 选中 - end */ /* 选中 - end */
.scene-title {
color: #323436;
/* font-weight: 600; */
}
.scene-img { .scene-img {
width: 92rpx; width: 92rpx;
height: 64rpx; height: 64rpx;
} }
/* .notOpened { /* .notOpened {
...@@ -102,8 +112,8 @@ ...@@ -102,8 +112,8 @@
.total-price { .total-price {
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
margin-top: 22rpx; margin-top: 36rpx;
font-size: 24rpx; font-size: 22rpx;
color: #3666FE; color: #3666FE;
/* font-weight: 600; */ /* font-weight: 600; */
font-family: "number"; font-family: "number";
......
...@@ -149,11 +149,12 @@ Component({ ...@@ -149,11 +149,12 @@ Component({
var params = { var params = {
merchantId: currentItem.merchantId, merchantId: currentItem.merchantId,
merchantName: currentItem.merchantName, merchantName: currentItem.merchantName,
scene1: currentItem.scene1, // scene1: currentItem.scene1,
scene2: currentItem.scene2, // scene2: currentItem.scene2,
scene3: currentItem.scene3, // scene3: currentItem.scene3,
scene4: currentItem.scene4, // scene4: currentItem.scene4,
sceneCodeList: currentItem.sceneList.map(item => item.sceneCode), // sceneList: currentItem.sceneList,
// sceneCodeList: currentItem.sceneList.map(item => item.sceneCode),
pMerchantId: this.data.pMerchantId, pMerchantId: this.data.pMerchantId,
pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName, pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName,
isSuper: this.data.pMerchantInfo.isSuper isSuper: this.data.pMerchantInfo.isSuper
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
<!-- 场景内容 --> <!-- 场景内容 -->
<view class="box-content"> <view class="box-content">
<scene-box formData="{{item}}" hasLockIcon="{{false}}" /> <scene-box sceneInfo="{{item}}" hasLockIcon="{{false}}" />
<!-- 通知 --> <!-- 通知 -->
<view class="box-bottom"> <view class="box-bottom">
<view wx:if="{{item.msgList.length}}" class="flex"> <view wx:if="{{item.msgList.length}}" class="flex">
......
...@@ -221,10 +221,13 @@ Component({ ...@@ -221,10 +221,13 @@ Component({
obj.totalOrder = dataList[index]?.totalOrder || 0 obj.totalOrder = dataList[index]?.totalOrder || 0
obj.merchantName = dataList[index]?.merchantName obj.merchantName = dataList[index]?.merchantName
obj.merchantId = item obj.merchantId = item
obj.startInd = let topObj = dataList[index]?.sceneList.shift()
dataList[index]?.sceneList.push(topObj)
const startInd =
dataList[index]?.sceneList.findIndex(item => { dataList[index]?.sceneList.findIndex(item => {
return item != null return item != null
}) || -1 })
obj.startInd = typeof startInd === 'number'?startInd:-1
obj.showNothingSceneCon = item.startInd == -1 obj.showNothingSceneCon = item.startInd == -1
obj.showList = dataList[index]?.sceneList || [] obj.showList = dataList[index]?.sceneList || []
// obj.norList = type?obj. // obj.norList = type?obj.
...@@ -242,10 +245,9 @@ Component({ ...@@ -242,10 +245,9 @@ Component({
let index = list[current].startInd let index = list[current].startInd
// console.log(index) // console.log(index)
// 动态计算swiper 高度 // 动态计算swiper 高度
if ([0, -1].includes(index)) { if ([3, -1].includes(index)) {
swiperHeight = 483 swiperHeight = 483
} else if ([1, 2].includes(index)) { } else if ([0, 1].includes(index)) {
console.log(list[current])
if (list[current]['showList'][index]['diagnoseList']) { if (list[current]['showList'][index]['diagnoseList']) {
swiperHeight = 600 swiperHeight = 600
} else { } else {
...@@ -275,18 +277,14 @@ Component({ ...@@ -275,18 +277,14 @@ Component({
console.log(e) console.log(e)
let { list } = this.data let { list } = this.data
let { index, item } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset
console.log(item)
let { sceneIdx } = e.detail let { sceneIdx } = e.detail
sceneIdx = sceneIdx - 1 sceneIdx = sceneIdx - 1
console.log(sceneIdx)
console.log(index)
let swiperHeight let swiperHeight
// 动态计算swiper 高度 // 动态计算swiper 高度
console.log(item.startInd)
// 最后要判断 sceneIdx 为空也能切换的兼容问题 // 最后要判断 sceneIdx 为空也能切换的兼容问题
if (sceneIdx == 0 || item.startInd == -1 || item['showList'][sceneIdx] == null) { if (sceneIdx == 0 || item.startInd == -1 || item['showList'][sceneIdx] == null) {
swiperHeight = 483 swiperHeight = 483
} else if ([1, 2].includes(sceneIdx)) { } else if ([0, 1].includes(sceneIdx)) {
// console.log(item['diagnoseList']) // console.log(item['diagnoseList'])
// item['showList'][index]['diagnoseList'] // item['showList'][index]['diagnoseList']
if (item['showList'][sceneIdx]?.diagnoseList) { if (item['showList'][sceneIdx]?.diagnoseList) {
...@@ -325,20 +323,20 @@ Component({ ...@@ -325,20 +323,20 @@ Component({
}) })
}, },
setMerchantObj(index, item, selectName, oldItem) { setMerchantObj(index, item, selectName, oldItem) {
console.log(item)
item = item[0] item = item[0]
let obj = {} let obj = {}
obj.selectName = selectName || oldItem.selectName obj.selectName = selectName || oldItem?.selectName
obj.totalMoney = setPrice(item?.totalMoney || 0) obj.totalMoney = setPrice(item?.totalMoney || 0)
obj.totalOrder = item?.totalOrder || 0 obj.totalOrder = item?.totalOrder || 0
obj.merchantName = item?.merchantName obj.merchantName = item?.merchantName
// obj.merchantId = item // obj.merchantId = item
obj.startInd = let topObj = item?.sceneList.shift()
oldItem?.startInd || item?.sceneList.push(topObj)
item?.sceneList.findIndex(item => { const startInd =
dataList[index]?.sceneList.findIndex(item => {
return item != null return item != null
}) || })
-1 obj.startInd = typeof startInd === 'number' ?startInd:-1
obj.showNothingSceneCon = obj.startInd == -1 obj.showNothingSceneCon = obj.startInd == -1
obj.showList = item?.sceneList || [] obj.showList = item?.sceneList || []
// obj.norList = type?obj. // obj.norList = type?obj.
...@@ -347,9 +345,7 @@ Component({ ...@@ -347,9 +345,7 @@ Component({
let { list } = this.data let { list } = this.data
// item.list[index] = list[index] // item.list[index] = list[index]
// console.log('listObj', listObj) // console.log('listObj', listObj)
console.log(obj.selectName)
let listObj = `list[${index}]` let listObj = `list[${index}]`
console.log('sceneIndx', obj.startInd)
this.setData({ this.setData({
[listObj]: Object.assign(list[index], obj) [listObj]: Object.assign(list[index], obj)
}) })
...@@ -358,12 +354,11 @@ Component({ ...@@ -358,12 +354,11 @@ Component({
console.log(e) console.log(e)
let { list, userInfo } = this.data let { list, userInfo } = this.data
let { current } = e.detail let { current } = e.detail
console.log(list[current].startInd)
let swiperHeight let swiperHeight
// 动态计算swiper 高度 // 动态计算swiper 高度
if (list[current].startInd == 0 || list[current].startInd == -1) { if (list[current].startInd == 3 || list[current].startInd == -1) {
swiperHeight = 483 swiperHeight = 483
} else if ([1, 2].includes(list[current].startInd)) { } else if ([0, 1].includes(list[current].startInd)) {
let subscript = list[current]['startInd'] let subscript = list[current]['startInd']
let item = list[current]['showList'] let item = list[current]['showList']
if (item[subscript]?.diagnoseList) { if (item[subscript]?.diagnoseList) {
...@@ -374,7 +369,6 @@ Component({ ...@@ -374,7 +369,6 @@ Component({
} else { } else {
swiperHeight = 485 swiperHeight = 485
} }
// console.log(swiperHeight)
this.setData({ this.setData({
totalMoney: list[current].totalMoney || 0, totalMoney: list[current].totalMoney || 0,
totalOrder: list[current].totalOrder || 0, totalOrder: list[current].totalOrder || 0,
...@@ -385,7 +379,6 @@ Component({ ...@@ -385,7 +379,6 @@ Component({
// list[current].startInd == 0? '' // list[current].startInd == 0? ''
// 692 // 692
console.log('swiper', list[current].startInd)
// list // list
if (current >= 1 && list[current + 1] && list[current + 1].startInd == -1) { if (current >= 1 && list[current + 1] && list[current + 1].startInd == -1) {
// 请求 // 请求
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
.bg-image { .bg-image {
// width: 100%; // width: 100%;
width: 440rpx; width: 440rpx;
// height: 100%; height: 100%;
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
<view class="title">产值图</view> <view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}"> <view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item "> <view class="swiper-item ">
<view class="fluuelCon {{item.startInd!=3?'longHeight':'shortHeight'}}"> <view class="fluuelCon {{item.startInd!=2?'longHeight':'shortHeight'}}">
<image class="bg-image " src="{{item.startInd!=3?IMAGES.funnelNew :IMAGES.funnelNewSm}}" /> <image class="bg-image " src="{{item.startInd!=2?IMAGES.funnelNew :IMAGES.funnelNewSm}}" />
<block wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}" wx:key="*this" wx:for-index="ind" wx:for-item="funneItem"> <block wx:for="{{item.startInd!=2? funnelList['start']: funnelList['end']}}" wx:key="*this" wx:for-index="ind" wx:for-item="funneItem">
<view class="funneItem"> <view class="funneItem">
<view class="label">{{funneItem['label']}}</view> <view class="label">{{funneItem['label']}}</view>
<view class="num font-number"> <view class="num font-number">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</block> </block>
</view> </view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" --> <!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view class="statisticsCon" hidden="{{item.startInd ==3}}"> <view class="statisticsCon" hidden="{{item.startInd ==2}}">
<!-- 统计 --> <!-- 统计 -->
<view class="merchantCount"> <view class="merchantCount">
<view class="turnover"> <view class="turnover">
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
查看订单详情 查看订单详情
</navigator> </navigator>
</view> </view>
<view class="statisticsCon" hidden="{{item.startInd !=3}}"> <view class="statisticsCon" hidden="{{item.startInd !=2}}">
<!-- 统计 --> <!-- 统计 -->
<view class="merchantCount crowdFundingTotal"> <view class="merchantCount crowdFundingTotal">
<view class="turnover"> <view class="turnover">
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { getSessionId, setSessionId } from '~/utils/cache/storageApi' import { getSessionId, setSessionId } from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import { getMockData } from '~/api/api'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -12,7 +13,8 @@ Page({ ...@@ -12,7 +13,8 @@ Page({
loginType: 0, loginType: 0,
agree: true, agree: true,
tabIndx: 0, tabIndx: 0,
tabList: ['我的客户', '我的门店', '我的员工'], // tabList: ['我的客户', '我的门店', '我的员工'],
tabList: ['我的客户', '我的员工'],
popupShow: false, popupShow: false,
subIndex: -1, subIndex: -1,
merchantList: [ merchantList: [
...@@ -26,7 +28,8 @@ Page({ ...@@ -26,7 +28,8 @@ Page({
merchantName: 'test', merchantName: 'test',
show: true show: true
} }
] ],
isShowService: false,
}, },
// 切换园区 // 切换园区
tapPicker() { tapPicker() {
...@@ -52,6 +55,7 @@ Page({ ...@@ -52,6 +55,7 @@ Page({
init() { init() {
this.setUserInfo() this.setUserInfo()
this.getMerchantRange() this.getMerchantRange()
this.getMockInfo()
}, },
setUserInfo() { setUserInfo() {
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
...@@ -61,6 +65,12 @@ Page({ ...@@ -61,6 +65,12 @@ Page({
isSuper: userInfo.isSuper isSuper: userInfo.isSuper
}) })
}, },
async getMockInfo() {
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(this.data.userInfo.merchantId + '')
})
},
getMerchantRange(e) { getMerchantRange(e) {
// 重新刷新 // 重新刷新
// let { detail } = e || null // let { detail } = e || null
...@@ -98,7 +108,7 @@ Page({ ...@@ -98,7 +108,7 @@ Page({
subIndex subIndex
}) })
}) })
.catch(err => {}) .catch(err => { })
} else { } else {
let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }] let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }]
console.log('merchantRange', merchantRange) console.log('merchantRange', merchantRange)
...@@ -134,30 +144,30 @@ Page({ ...@@ -134,30 +144,30 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"merchant": "./components/merchant/mrechant", "merchant": "./components/merchant/mrechant",
"staff": "./components/staff/staff", "staff": "./components/staff/staff",
"search-input": "../../../components/SearchInput/SearchInput", "search-input": "../../../components/SearchInput/SearchInput",
"accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop" "accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop",
"service": "../../../components/Service/Service"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -19,30 +19,22 @@ ...@@ -19,30 +19,22 @@
<!-- </picker> height:calc(100vh - {{tabBarStyle}}px) --> <!-- </picker> height:calc(100vh - {{tabBarStyle}}px) -->
</navigation-bar> </navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;"> <view class="layout" style="padding-top:{{tabBarStyle}}px;">
<tab <tab tab="{{tabList}}" itemWidth="{{'27%'}}" index="{{tabIndx}}" bindclick="changeTabIndx" class="tabContainer" />
tab="{{tabList}}"
itemWidth="{{'27%'}}"
index="{{tabIndx}}"
bindclick="changeTabIndx"
class="tabContainer" />
<!-- <view class="">{{IMG_URL}}</view> --> <!-- <view class="">{{IMG_URL}}</view> -->
<!-- 我的客户 --> <!-- 我的客户 -->
<view class="comCom" hidden="{{tabIndx != 0}}"> <view class="comCom" hidden="{{tabIndx != 0}}">
<client id="client" /> <client id="client" />
</view> </view>
<!-- 我的门店 --> <!-- 我的门店 -->
<view class="comCom" hidden="{{tabIndx != 1}}"> <!-- <view class="comCom" hidden="{{tabIndx != 1}}">
<merchant id="merchant" /> <merchant id="merchant" />
</view> </view> -->
<!-- 我的员工 --> <!-- 我的员工 -->
<view class="comCom" hidden="{{tabIndx != 2}}"> <view class="comCom" hidden="{{tabIndx != 1}}">
<staff id="staff" /> <staff id="staff" />
</view> </view>
</view> </view>
<accountSwitchingPop <accountSwitchingPop wx:if="{{popupShow}}" bind:hidePopup="tapPicker" bind:changeAccount="getMerchantRange" popShow="{{popupShow}}" merchantRange="{{merchantRange}}" />
wx:if="{{popupShow}}"
bind:hidePopup="tapPicker"
bind:changeAccount="getMerchantRange"
popShow="{{popupShow}}"
merchantRange="{{merchantRange}}" />
<!-- 加微 -->
<service wx:if="{{isShowService}}"></service>
\ No newline at end of file \ No newline at end of file
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
<view class="name">转发</view> <view class="name">转发</view>
</button> </button>
</view> </view>
<view class="apply" bindtap="apply">合作申请</view> <view class="apply" bindtap="apply">申请合作</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -73,6 +73,20 @@ ...@@ -73,6 +73,20 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "申请业务+产品",
"pathName": "packagesList/apply/pages/apply",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "login/loading/loading",
"query": "scene=sceneId%3D22402",
"launchMode": "default",
"scene": 1047
} }
] ]
} }
......
...@@ -17,7 +17,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -17,7 +17,8 @@ export const STORAGE_OBJECTkEY = {
authphone: 'authphone', authphone: 'authphone',
disLikeRecordFlag: 'disLikeRecordFlag', disLikeRecordFlag: 'disLikeRecordFlag',
fileList: 'fileList', fileList: 'fileList',
posterId: 'posterId' posterId: 'posterId',
mock_data: 'mock_data'
} }
export const IMG_VERSION = () => { export const IMG_VERSION = () => {
......
import { preReleaseAppId } from '~/config' import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
const mockObj = {
test: 'https://oss-config.dev.glsx.com.cn/mock/63fd6c2034c4d918e2f4df4d/config',
product: 'https://oss-config.test.glsx.com.cn/mock/63ff0b507dc47c4edc786e82/config'
}
/** /**
* *
...@@ -112,10 +116,19 @@ const defaultMerchantId = { ...@@ -112,10 +116,19 @@ const defaultMerchantId = {
preRelease: '44184606', preRelease: '44184606',
prod: '44189923' prod: '44189923'
}[target[index]] }[target[index]]
let mockUrl = {
ip: mockObj.test,
dev: mockObj.test,
uat: mockObj.test,
preRelease: mockObj.product,
prod: mockObj.product
}[target[index]]
module.exports = { module.exports = {
index, index,
domain, domain,
pathEnum, pathEnum,
secretKey, secretKey,
defaultMerchantId defaultMerchantId,
mockUrl
} }
...@@ -256,6 +256,38 @@ const setNavigationBarTitle = (title) =>{ ...@@ -256,6 +256,38 @@ const setNavigationBarTitle = (title) =>{
}); });
} }
/** 钱转化千分 */
const moneyThreeForTwoThousands = num => {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
const Util = { const Util = {
getImgVersion, getImgVersion,
...@@ -267,6 +299,7 @@ const Util = { ...@@ -267,6 +299,7 @@ const Util = {
parseString, parseString,
getCurrentPageUrl, getCurrentPageUrl,
deepClone, deepClone,
setNavigationBarTitle setNavigationBarTitle,
moneyThreeForTwoThousands
}; };
export default Util; export default Util;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!