Commit 84f79a36 by chenwq

联调

1 parent 221e069d
import outputApi from './output.js'
export default new outputApi()
import api from '~/utils/request/request'
const { appId } = wx.getAccountInfoSync().miniProgram
const CODE = {
platformEntrance: 'BUSINESS_ASSISTANT',
productCode: 'PC00c3'
}
class outputApi {
/** 获取服务商(生意助手看产值)我的客户页总收益 */
getMerchantTotal(data) {
return api.post(
{
method: 'scrm.api.boutiquecoupon.partnermerchant.getMerchantTotal',
...data
}
)
}
/** 分页获取服务商(生意助手看产值)我的客户页数据 */
getCustomerPageList(data) {
return api.post(
{
method: 'scrm.api.boutiquecoupon.partnermerchant.customerPageList',
...data
}
)
}
/** 服务商(生意助手看产值)我的客户详情数据 */
getCustomerDetail(data) {
return api.post(
{
method: 'scrm.api.boutiquecoupon.partnermerchant.getCustomerDetail',
...data
}
)
}
}
export default outputApi
// pages/tab/output/components/senceBox/senceBox.js // pages/tab/output/components/sceneBox/sceneBox.js
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
senceActive: { sceneActive: {
type: Number, type: Number,
value: -1 value: -1
}, },
...@@ -16,7 +16,7 @@ Component({ ...@@ -16,7 +16,7 @@ Component({
type: Object, type: Object,
value: () => { } value: () => { }
}, },
sencePriceList: { scenePriceList: {
type: Array, type: Array,
value: () => [] value: () => []
} }
...@@ -27,7 +27,7 @@ Component({ ...@@ -27,7 +27,7 @@ Component({
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
custSenceList: [{ custSceneList: [{
title: '新车洽谈场景', title: '新车洽谈场景',
subTitle: '1.0新车权益销售' subTitle: '1.0新车权益销售'
}, { }, {
...@@ -48,7 +48,7 @@ Component({ ...@@ -48,7 +48,7 @@ Component({
methods: { methods: {
handleClick(e) { handleClick(e) {
let { idx } = e.currentTarget.dataset let { idx } = e.currentTarget.dataset
this.triggerEvent('handleSenceChange', { senceIdx: idx }) this.triggerEvent('handleSceneChange', { sceneIdx: idx })
} }
} }
}) })
<!--pages/tab/output/components/sceneBox/sceneBox.wxml-->
<view class="flex scene">
<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}}">
<view wx:if="{{hasOpenIcon && formData['scene' + (index + 1)] && sceneActive != (index + 1)}}" class="open-icon">已开通</view>
<image wx:if="{{formData['scene' + (index + 1)]}}" class="scene-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<view class="scene-title">{{item.title}}</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{scenePriceList.length}}">¥ {{scenePriceList[index].total}}</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* pages/tab/output/components/senceBox/senceBox.wxss */ /* pages/tab/output/components/sceneBox/sceneBox.wxss */
.flex { .flex {
display: flex; display: flex;
} }
.sence { .scene {
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
.sence-item { .scene-item {
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
width: 25%; width: 25%;
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.sence-item:last-child { .scene-item:last-child {
margin-right: 0; margin-right: 0;
} }
.sence-title { .scene-title {
font-size: 24rpx; font-size: 24rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
} }
/* 已开通 - start */ /* 已开通 - start */
.open.sence-item { .open.scene-item {
background: #F0F7FF; background: #F0F7FF;
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
/* 已开通 - end */ /* 已开通 - end */
/* 选中 - start */ /* 选中 - start */
.active.sence-item { .active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%); background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
border: 2rpx solid #3666FE; border: 2rpx solid #3666FE;
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40);
...@@ -65,12 +65,12 @@ ...@@ -65,12 +65,12 @@
/* 选中 - end */ /* 选中 - end */
.sence-title { .scene-title {
color: #323436; color: #323436;
font-weight: 600; font-weight: 600;
} }
.sence-img { .scene-img {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
......
<!--pages/tab/output/components/senceBox/senceBox.wxml-->
<view class="flex sence">
<view class="sence-item {{ formData['sence' + (index + 1)] ? 'open' : ''}} {{ (senceActive != -1 && senceActive == index + 1) ? 'active' : ''}}" wx:for="{{custSenceList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['sence' + (index + 1)] && senceActive != (index + 1)}}" class="open-icon">已开通</view>
<image wx:if="{{formData['sence' + (index + 1)]}}" class="sence-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="sence-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<view class="sence-title">{{item.title}}</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{sencePriceList.length}}">¥ {{sencePriceList[index].total}}</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -8,16 +8,16 @@ Page({ ...@@ -8,16 +8,16 @@ Page({
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
// 场景业务 // 场景业务
formData: { formData: {
sence1: true, scene1: true,
sence2: true, scene2: true,
sence3: true, scene3: true,
sence4: true scene4: true
}, },
senceActive: 1, sceneActive: 1,
// 活动内容 // 活动内容
activityList: [], activityList: [],
senceActivityObj: { sceneActivityObj: {
sence1: [{ scene1: [{
name: '360实景导航', name: '360实景导航',
price: 10 price: 10
}, { }, {
...@@ -54,21 +54,21 @@ Page({ ...@@ -54,21 +54,21 @@ Page({
name: 'AR实景导航', name: 'AR实景导航',
price: 20 price: 20
}], }],
sence2: [{ scene2: [{
name: '座椅通风', name: '座椅通风',
price: 30 price: 30
}, { }, {
name: '座椅通风', name: '座椅通风',
price: 40 price: 40
}], }],
sence3: [{ scene3: [{
name: '氛围灯', name: '氛围灯',
price: 50 price: 50
}, { }, {
name: '氛围灯', name: '氛围灯',
price: 60 price: 60
}], }],
sence4: [{ scene4: [{
name: '数字化', name: '数字化',
price: 70 price: 70
}, { }, {
...@@ -96,10 +96,10 @@ Page({ ...@@ -96,10 +96,10 @@ Page({
} }
}, },
handleSenceChange(e) { handleSceneChange(e) {
var idx = e.detail.senceIdx var idx = e.detail.sceneIdx
this.setData({ this.setData({
senceActive: idx sceneActive: idx
}) })
this.setCurActivity() this.setCurActivity()
// console.log('换内容---') // console.log('换内容---')
...@@ -107,7 +107,7 @@ Page({ ...@@ -107,7 +107,7 @@ Page({
setCurActivity() { setCurActivity() {
this.setData({ this.setData({
activityList: JSON.parse(JSON.stringify(this.data.senceActivityObj['sence' + (this.data.senceActive)])) activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + (this.data.sceneActive)]))
}) })
}, },
...@@ -120,7 +120,7 @@ Page({ ...@@ -120,7 +120,7 @@ Page({
handleConfirm() { handleConfirm() {
var params = { var params = {
senceActive: this.data.senceActive, sceneActive: this.data.sceneActive,
activityIdxList: this.data.activityList.filter(item => item.checked == true) activityIdxList: this.data.activityList.filter(item => item.checked == true)
} }
if(!params.activityIdxList.length) { if(!params.activityIdxList.length) {
......
{ {
"usingComponents": { "usingComponents": {
"sence-box": "../../../components/SenceBox/SenceBox" "scene-box": "../../../components/SceneBox/SceneBox"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!-- 场景活动 --> <!-- 场景活动 -->
<view class="box"> <view class="box">
<view class="box-title">业务场景</view> <view class="box-title">业务场景</view>
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" hasOpenIcon="{{false}}" bindhandleSenceChange="handleSenceChange"></sence-box> <scene-box formData="{{formData}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" hasOpenIcon="{{false}}" bindhandleSceneChange="handleSceneChange"></scene-box>
</view> </view>
<!-- 活动 --> <!-- 活动 -->
<view class="box"> <view class="box">
......
// packageOutput/pages/summary/summary.js // packageOutput/pages/summary/summary.js
import outputApi from '~/api/outputApi/index'
Page({ Page({
/** /**
...@@ -6,15 +7,16 @@ Page({ ...@@ -6,15 +7,16 @@ Page({
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
merchantName: '阿哈哈哈哈', merchantName: '',
formData: { merchantInfo: {},
sence1: false, sceneObj: {
sence2: true, scene1: null,
sence3: false, scene2: null,
sence4: true scene3: null,
scene4: null
}, },
senceActive: 4, sceneActive: 1,
sencePriceList: [{ scenePriceList: [{
total: 0 total: 0
}, { }, {
total: 1000.45 total: 1000.45
...@@ -27,8 +29,8 @@ Page({ ...@@ -27,8 +29,8 @@ Page({
scrollLeft: 0, scrollLeft: 0,
activityActive: 0, activityActive: 0,
activityList: [], activityList: [],
senceActivityObj: { sceneActivityObj: {
sence1: [{ scene1: [{
name: '360实景导航', name: '360实景导航',
price: 10 price: 10
}, { }, {
...@@ -52,7 +54,7 @@ Page({ ...@@ -52,7 +54,7 @@ Page({
price: 20, price: 20,
isOpen: true isOpen: true
}], }],
sence2: [{ scene2: [{
name: '座椅通风', name: '座椅通风',
price: 30, price: 30,
isOpen: true, isOpen: true,
...@@ -64,7 +66,7 @@ Page({ ...@@ -64,7 +66,7 @@ Page({
name: '座椅通风', name: '座椅通风',
price: 40 price: 40
}], }],
sence3: [{ scene3: [{
name: '氛围灯', name: '氛围灯',
price: 50 price: 50
}, { }, {
...@@ -72,7 +74,7 @@ Page({ ...@@ -72,7 +74,7 @@ Page({
price: 60, price: 60,
isOpen: true isOpen: true
}], }],
sence4: [{ scene4: [{
name: '数字化', name: '数字化',
price: 70, price: 70,
isOpen: true isOpen: true
...@@ -104,9 +106,9 @@ Page({ ...@@ -104,9 +106,9 @@ Page({
}, },
// 产值 // 产值
searchForm: { searchForm: {
sence2Idx: 0, scene2Idx: 0,
sence3Idx: 0, scene3Idx: 0,
sence4Idx: 0 scene4Idx: 0
}, },
baseData: { baseData: {
timeList: ['全部', '本月', '本日'], timeList: ['全部', '本月', '本日'],
...@@ -114,28 +116,31 @@ Page({ ...@@ -114,28 +116,31 @@ Page({
} }
}, },
handleSenceChange(e) { // 场景切换
var idx = e.detail.senceIdx handleSceneChange(e) {
var idx = e.detail.sceneIdx
this.setData({ this.setData({
senceActive: idx, sceneActive: idx,
activityActive: 0 activityActive: 0
}) })
this.setCurActivity() this.setCurActivity()
// console.log('换内容---') // console.log('换内容---')
}, },
// 活动切换
handleActChange(e) { handleActChange(e) {
var idx = e.currentTarget.dataset.idx var idx = e.currentTarget.dataset.idx
this.setData({ this.setData({
activityActive: idx activityActive: idx
}) })
// this.getCustomerDetail()
// console.log('换内容--') // console.log('换内容--')
}, },
setCurActivity() { setCurActivity() {
console.log(this.data.activityActive) console.log(this.data.activityActive)
this.setData({ this.setData({
activityList: JSON.parse(JSON.stringify(this.data.senceActivityObj['sence' + (this.data.senceActive)])) activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene' + (this.data.sceneActive)]))
}) })
// activityActive为0时,触发置顶(左) // activityActive为0时,触发置顶(左)
if (this.data.activityActive == 0) { if (this.data.activityActive == 0) {
...@@ -145,13 +150,15 @@ Page({ ...@@ -145,13 +150,15 @@ Page({
} }
}, },
handleSelect() { // 搜索条件切换
handleSearch() {
wx.showActionSheet({ wx.showActionSheet({
itemList: this.data.senceActive != 4 ? this.data.baseData.timeList : this.data.baseData.actStatusList, itemList: this.data.sceneActive != 4 ? this.data.baseData.timeList : this.data.baseData.actStatusList,
success: res => { success: res => {
this.setData({ this.setData({
['searchForm.sence' + this.data.senceActive + 'Idx']: res.tapIndex ['searchForm.scene' + this.data.sceneActive + 'Idx']: res.tapIndex
}) })
this.getCustomerDetail()
console.log('调接口---') console.log('调接口---')
} }
}) })
...@@ -162,15 +169,45 @@ Page({ ...@@ -162,15 +169,45 @@ Page({
wx.$router.go('packageOutput.openBusiness') wx.$router.go('packageOutput.openBusiness')
}, },
dealSearchTime() {
var params = {}
switch (this.data.searchForm['scene' + this.data.sceneActive + 'Idx']) {
// 本月
case 1:
params = {
startTime: new Date(new Date().setDate(1)).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00',
endTime: new Date().toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
break
// 本日
case 2:
params = {
startTime: new Date().toLocaleDateString().replace(/\//g, '-') + ' 00:00:00',
endTime: new Date().toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
break
}
return params
},
getCustomerDetail() {
var params = this.dealSearchTime()
outputApi.getCustomerDetail({ merchantId: 44209390, ...params }).then(res => {
console.log(res)
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.$router.getData(({ id, merchantName }) => { wx.$router.getData(obj => {
this.setData({ this.setData({
merchantName: merchantName merchantInfo: obj,
sceneObj: {}
}) })
}) })
this.getCustomerDetail()
this.setCurActivity() this.setCurActivity()
}, },
...@@ -179,7 +216,7 @@ Page({ ...@@ -179,7 +216,7 @@ Page({
*/ */
onReady() { onReady() {
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: this.data.merchantName, title: this.data.merchantInfo.merchantName,
}) })
}, },
......
{ {
"usingComponents": { "usingComponents": {
"sence-box": "../../../components/SenceBox/SenceBox", "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"
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
border-bottom: 1rpx dashed #CCCED1; border-bottom: 1rpx dashed #CCCED1;
} }
.sence-box { .scene-box {
padding: 27rpx 20rpx 24rpx; padding: 27rpx 20rpx 24rpx;
} }
......
<!--packageOutput/pages/summary/summary.wxml--> <!--packageOutput/pages/summary/summary.wxml-->
<view class="summary"> <view class="summary">
<view class="layout {{ (senceActive == 4 && activityList[activityActive].isOpen) ? 'bg-grey' : 'bg-white'}}"> <view class="layout {{ (sceneActive == 4 && activityList[activityActive].isOpen) ? 'bg-grey' : 'bg-white'}}">
<view class="title bg-white">选产品/活动</view> <view class="title bg-white">选产品/活动</view>
<view class="sence-box bg-white"> <view class="scene-box bg-white">
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" bindhandleSenceChange="handleSenceChange"></sence-box> <scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange"></scene-box>
</view> </view>
<!-- 活动 --> <!-- 活动 -->
<view class="p-rl-20 bg-white"> <view class="p-rl-20 bg-white">
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
</view> </view>
<!-- 活动内容 --> <!-- 活动内容 -->
<view class="activity-content"> <view class="activity-content">
<view wx:if="{{activityList[activityActive].isOpen && senceActive != 1}}"> <view wx:if="{{activityList[activityActive].isOpen && sceneActive != 1}}">
<view class="activity-title title bg-white {{ senceActive == 4 ? 'no-border' : ''}}"> <view class="activity-title title bg-white {{ sceneActive == 4 ? 'no-border' : ''}}">
<view>看产值</view> <view>看产值</view>
<view class="select" bindtap="handleSelect"> <view class="select" bindtap="handleSearch">
<text wx:if="{{senceActive == 2 || senceActive == 3}}" class="select-txt">{{baseData.timeList[senceActive == 2 ? searchForm.sence2Idx : searchForm.sence3Idx]}}</text> <text wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt">{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}}</text>
<text wx:if="{{senceActive == 4}}" class="select-txt">{{baseData.actStatusList[searchForm.sence4Idx]}}</text> <text wx:if="{{sceneActive == 4}}" class="select-txt">{{baseData.actStatusList[searchForm.scene4Idx]}}</text>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}"></image> <image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}"></image>
</view> </view>
</view> </view>
<output-transform wx:if="{{senceActive == 2 || senceActive == 3}}" formData="{{activityList[activityActive]}}"></output-transform> <output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive]}}"></output-transform>
<output-crowdfund wx:if="{{senceActive == 4}}"></output-crowdfund> <output-crowdfund wx:if="{{sceneActive == 4}}"></output-crowdfund>
</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}}" />
......
// pages/tab/output/components/client/client.js // pages/tab/output/components/client/client.js
import outputApi from '~/api/outputApi/index'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -16,71 +17,73 @@ Component({ ...@@ -16,71 +17,73 @@ Component({
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
list: [{ pMerchantId: 44209845,
id: 1, totalProfit: 0,
merchantName: '广西弘泽汽车销售服务有限公司', pageObj: {
totalMoney: '14580.00', currentPage: 1,
sence1: false, pageSize: 3
sence2: true, },
sence3: false, totalPages: -1,
sence4: true, list: []
newList: [{ },
time: '09-28 11:19', lifetimes: {
content: '今日升级2单,产值¥4480' attached() {
}, { this.getClientApi()
time: '09-28 11:19', }
content: '今日升级2单,产值¥4480'
}]
}, {
id: 2,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}, {
id: 3,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}, {
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}]
}, {
id: 4,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}]
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getClientApi() {
this.getProfit()
this.getList()
if (this.data.pageObj.currentPage == 1) {
this.setData({
scrollTop: 0
})
}
},
getProfit() {
outputApi.getMerchantTotal({ merchantId: this.data.pMerchantId }).then(res => {
this.setData({
totalProfit: res
})
})
},
getList() { getList() {
console.log('调接口------') outputApi.getCustomerPageList({ merchantId: this.data.pMerchantId, ...this.data.pageObj }).then(res => {
var list = this.data.list
list = list.concat(res.list)
this.setData({
list: list,
totalPages: res.pages
})
})
}, },
onReachBottom() { onReachBottom() {
console.log('client触底----') if (this.data.totalPages != -1 && this.data.pageObj.currentPage == this.data.totalPages) {
this.getList() return true
}
this.setData({
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
})
this.getClientApi()
}, },
handleJump(e) { handleJump(e) {
let { id, merchantname } = e.currentTarget.dataset let { idx } = e.currentTarget.dataset
wx.$router.go('packageOutput.summary', { id, merchantName: merchantname }) var currentItem = this.data.list[idx]
var params = {
merchantId: currentItem.merchantId,
merchantName: currentItem.merchantName,
scene1: currentItem.scene1,
scene2: currentItem.scene2,
scene3: currentItem.scene3,
scene4: currentItem.scene4,
pMerchantId: this.data.pMerchantId
}
wx.$router.go('packageOutput.summary', params)
} }
} }
}) })
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"sence-box": "../../../../../components/SenceBox/SenceBox" "scene-box": "../../../../../components/SceneBox/SceneBox"
} }
} }
\ No newline at end of file \ No newline at end of file
/* pages/tab/output/components/client/client.wxss */ /* pages/tab/output/components/client/client.wxss */
.client { .client {
box-sizing: border-box;
height: calc(100vh - 170rpx);
color: #323436; color: #323436;
padding: 16rpx 0 60rpx; padding: 16rpx 0 60rpx;
} }
...@@ -74,64 +76,6 @@ ...@@ -74,64 +76,6 @@
&-content { &-content {
padding: 22rpx 10rpx 0; padding: 22rpx 10rpx 0;
// .sence {
// // height: 198rpx;
// text-align: center;
// width: 100%;
// &-item {
// position: relative;
// width: 25%;
// background: #F7F8FC;
// margin-right: 4rpx;
// font-size: 18rpx;
// color: #8A8C90;
// padding: 32rpx 0 28rpx;
// border-radius: 12rpx;
// margin-bottom: 20rpx;
// &:last-child {
// margin-right: 0;
// }
// }
// &-title {
// font-size: 24rpx;
// height: 44rpx;
// line-height: 44rpx;
// margin: 10rpx 0 4rpx;
// }
// .active.sence-item {
// background: #F0F7FF;
// .active-icon {
// box-sizing: border-box;
// position: absolute;
// left: 0;
// top: 0;
// width: 56rpx;
// height: 32rpx;
// line-height: 24rpx;
// background: #FEEBD6;
// border-radius: 6rpx 0 8rpx 0;
// font-size: 16rpx;
// color: #EF971E;
// padding: 4rpx;
// }
// .sence-title {
// color: #323436;
// }
// }
// &-img {
// width: 56rpx;
// height: 56rpx;
// }
// }
} }
&-bottom { &-bottom {
...@@ -157,10 +101,18 @@ ...@@ -157,10 +101,18 @@
font-size: 20rpx; font-size: 20rpx;
color: #323436; color: #323436;
line-height: 32rpx; line-height: 32rpx;
.time { .time {
color: #8A8C90;; color: #8A8C90;
;
} }
} }
} }
} }
}
.end-txt {
font-size: 24rpx;
text-align: center;
color: #CCCED1;
} }
\ No newline at end of file \ No newline at end of file
<!--pages/tab/output/components/client/client.wxml--> <!--pages/tab/output/components/client/client.wxml-->
<view class="client"> <scroll-view class="client" scroll-y="{{true}}" bindscrolltolower="onReachBottom" lower-threshold='50' scroll-top="{{scrollTop}}">
<view class="profit-box flex-between"> <view class="profit-box flex-between">
<text>总收益</text> <text>总收益</text>
<text class="price-txt">¥680000.00</text> <text class="price-txt">¥{{totalProfit}}</text>
</view> </view>
<view class="box" wx:for="{{list}}" wx:key="index" bindtap="handleJump" data-id="{{item.id}}" data-merchantName="{{item.merchantName}}"> <view class="box" wx:for="{{list}}" wx:key="index" bindtap="handleJump" data-idx="{{index}}">
<view class="head flex-between"> <view class="head flex-between">
<view class="name text-hide">{{item.merchantName}}</view> <view class="name text-hide">{{item.merchantName}}</view>
<view class="price-txt">¥{{item.totalMoney}}</view> <view class="price-txt">¥{{item.totalMoney}}</view>
</view> </view>
<!-- 场景内容 --> <!-- 场景内容 -->
<view class="box-content"> <view class="box-content">
<sence-box formData="{{item}}"></sence-box> <scene-box formData="{{item}}"></scene-box>
<!-- 通知 --> <!-- 通知 -->
<view class="box-bottom"> <view class="box-bottom">
<view wx:if="{{item.newList.length}}" class="flex"> <view wx:if="{{item.msgList.length}}" class="flex">
<view class="tip-blue">最新</view> <view class="tip-blue">最新</view>
<view class="bottom-content"> <view class="bottom-content">
<view class="flex-between tip-row" wx:for="{{item.newList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <view class="flex-between tip-row" wx:for="{{item.msgList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view>{{subItem.content}}</view> <view>{{subItem.msg}}</view>
<view class="time">{{subItem.time}}</view> <view class="time">{{subItem.createTime}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -34,4 +34,5 @@ ...@@ -34,4 +34,5 @@
</view> </view>
</view> </view>
</view> </view>
</view>
\ No newline at end of file \ No newline at end of file
<view wx:if="{{totalPages != -1 && pageObj.currentPage == totalPages}}" class="end-txt">到底啦!</view>
</scroll-view>
\ No newline at end of file \ No newline at end of file
// pages/tab/output/components/senceSelect/senceSelect.js // pages/tab/output/components/sceneSelect/sceneSelect.js
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
scene0: `${IMG_URL}/output/car01.png`, scene0: `${IMG_URL}/output/car01.png`,
......
...@@ -85,4 +85,93 @@ ...@@ -85,4 +85,93 @@
color: #EF971E; color: #EF971E;
background: #FEEBD6; background: #FEEBD6;
border-radius: 6rpx 0 8rpx 0; border-radius: 6rpx 0 8rpx 0;
=======
/* pages/tab/output/components/sceneSelect/sceneSelect.wxss */
.sceneCon {
display: flex;
align-items: center;
justify-content: space-around;
padding: 27rpx 10rpx;
position: relative;
.itemCon {
position: relative;
box-sizing: border-box;
flex: 1;
height: 250rpx;
background-color: #F7F8FC;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 12rpx;
.itemImg {
position: relative;
.icon {
width: 56rpx;
height: 56rpx;
}
.lockIcon {
position: absolute;
top: -18rpx;
right: -18rpx;
// transform: translate(-50%, -50%);
width: 36rpx;
height: 36rpx;
}
}
.name {
font-size: 24rpx;
color: #8A8C90;
margin: 10rpx 0;
}
.name.activation {
font-weight: 600;
font-size: 24rpx;
color: #323436;
}
.label {
font-size: 18rpx;
color: #8A8C90;
}
.total {
font-weight: 500;
font-size: 24rpx;
color: #3666FE;
margin-top: 22rpx;
}
}
.itemCon+.itemCon {
margin-left: 4rpx;
}
.selectBgc {
border: 2px solid #3666FE;
/*按比例缩放*/
}
}
// .sceneCon
.itemCon.activation::before {
content: '已开通';
position: absolute;
top: 0rpx;
left: 0rpx;
width: 56rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
font-size: 16rpx;
color: #EF971E;
background: #FEEBD6;
border-radius: 6rpx 0 8rpx 0;
>>>>>>> 7b4444b (联调)
} }
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/components/senceSelect/senceSelect.wxml --> <!-- pages/tab/output/components/sceneSelect/sceneSelect.wxml -->
<view class="sceneCon"> <view class="sceneCon">
<view wx:for='{{sceneList}}' wx:key='index' class="itemCon {{index==selectInd?'selectBgc':'itembgc'}} {{item.activation?'activation':''}}"> <view wx:for='{{sceneList}}' wx:key='index' class="itemCon {{index==selectInd?'selectBgc':'itembgc'}} {{item.activation?'activation':''}}">
<!-- style="background-image:url({{IMAGES.carselect}})" --> <!-- style="background-image:url({{IMAGES.carselect}})" -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!