Commit d21722cf by wuwx

Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop

2 parents 9c0e711a 277bbcf1
// pages/tab/output/components/sceneBox/sceneBox.js // pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -26,7 +27,7 @@ Component({ ...@@ -26,7 +27,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: IMG_URL,
custSceneList: [{ custSceneList: [{
title: '新车洽谈场景', title: '新车洽谈场景',
subTitle: '1.0新车权益销售' subTitle: '1.0新车权益销售'
......
<!--pages/tab/output/components/sceneBox/sceneBox.wxml--> <!--pages/tab/output/components/sceneBox/sceneBox.wxml-->
<view class="flex scene"> <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 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 wx:if="{{hasOpenIcon && formData['scene' + (index + 1)] && sceneActive != (index + 1)}}" class="open-icon">已开通</view> <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: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}}" /> <image wx:else class="scene-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
......
<wxs src="./Tab.wxs" module="filterUtils" /> <wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view <scroll-view
class="tab-box {{align}} {{outClassName}}" class="tab-box {{align}} {{outClassName}}"
scroll-x scroll-x
enable-flex enable-flex
scroll-with-animation scroll-with-animation
scroll-into-view="{{to}}" scroll-into-view="{{to}}"
enhanced="{{true}}" enhanced="{{true}}"
show-scrollbar="{{false}}" show-scrollbar="{{false}}">
>
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
......
// packageOutput/pages/openBusiness/openBusiness.js // packageOutput/pages/openBusiness/openBusiness.js
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: IMG_URL,
merchantInfo: {}, merchantInfo: {},
sceneCodeList: [], sceneCodeList: [],
// 场景业务 // 场景业务
......
...@@ -90,16 +90,23 @@ page { ...@@ -90,16 +90,23 @@ page {
} }
} }
.btn-blue { .btn {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center;
background: #3666FE;
font-size: 34rpx; font-size: 34rpx;
color: #FFFFFF; color: #FFFFFF;
text-align: center;
}
.btn-blue {
background: #3666FE;
}
.btn-disabled {
background: #CCCED1;
} }
} }
\ No newline at end of file \ No newline at end of file
<!--packageOutput/pages/openBusiness/openBusiness.wxml--> <!--packageOutput/pages/openBusiness/openBusiness.wxml-->
<view class="openBusiness"> <view class="openBusiness">
<image class="bg-img" src="{{IMGURL}}output/bg-open-business.png?v={{img_version}}"/> <image class="bg-img" src="{{IMGURL}}output/open0{{sceneActive}}.png?v={{img_version}}"/>
<view class="layout"> <view class="layout">
<view class="form m-b-32"> <view class="form m-b-32">
<text class="label">开通门店:</text> <text class="label">开通门店:</text>
...@@ -20,5 +20,6 @@ ...@@ -20,5 +20,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn-blue" bindtap="handleConfirm">申请开通</view> <view wx:if="{{sceneActive != 1}}" class="isFullSucreen btn btn-blue" bindtap="handleConfirm">申请开通</view>
<view wx:else class="btn btn-disabled">申请开通</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js // packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import wxqrcode from '~/utils/lib/wxqrcode' import wxqrcode from '~/utils/lib/wxqrcode'
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -15,6 +16,7 @@ Component({ ...@@ -15,6 +16,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: IMG_URL,
orderFormList: [{ orderFormList: [{
label: '总场次', label: '总场次',
name: 'totalNum' name: 'totalNum'
...@@ -45,7 +47,7 @@ Component({ ...@@ -45,7 +47,7 @@ Component({
tableHeadList: [{ tableHeadList: [{
label: '', label: '',
width: '', width: '',
width: '24rpx' width: '28rpx'
}, { }, {
label: '业务员', label: '业务员',
name: 'shareName', name: 'shareName',
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
.rank-table { .rank-table {
color: #5A6066; color: #5A6066;
font-size: 20rpx; font-size: 20rpx;
padding-left: 20rpx;
.tr { .tr {
display: flex; display: flex;
...@@ -127,6 +128,12 @@ ...@@ -127,6 +128,12 @@
.th, .th,
.td { .td {
width: calc((100% - 116rpx) / 4); width: calc((100% - 116rpx) / 4);
.icon-rank {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
padding-right: 4rpx;
}
} }
} }
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<block wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <block wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="tr"> <view class="tr">
<view class="td" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j"> <view class="td" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j">
<view wx:if="{{j == 0}}">
<image class="icon-rank" src="{{IMGURL}}output/rank0{{idx + 1}}.png?v={{img_version}}"></image>
</view>
<text wx:if="{{i.prefix}}">{{i.prefix}}</text> <text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}} {{subItem[i.name]}}
</view> </view>
......
// packageOutput/pages/summary/components/outputTransform/outputTransform.js // packageOutput/pages/summary/components/outputTransform/outputTransform.js
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -14,6 +15,7 @@ Component({ ...@@ -14,6 +15,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: IMG_URL,
formDataList: [{ formDataList: [{
label: '到店贴膜量', label: '到店贴膜量',
name: 'toShopCount' name: 'toShopCount'
...@@ -31,7 +33,7 @@ Component({ ...@@ -31,7 +33,7 @@ Component({
name: 'calCustomerUnitPrice', name: 'calCustomerUnitPrice',
prefix: '¥' prefix: '¥'
}, { }, {
label: '引流体验量', label: '引流体验率',
name: 'calExperience', name: 'calExperience',
suffix: '%' suffix: '%'
}, { }, {
......
...@@ -18,4 +18,18 @@ ...@@ -18,4 +18,18 @@
margin-top: 8rpx; margin-top: 8rpx;
} }
} }
}
.link {
display: inline-block;
height: 36rpx;
font-size: 24rpx;
color: #5C7097;
margin: 180rpx 0 0 28rpx;
.icon-link {
width: 20rpx;
height: 20rpx;
margin: -6rpx 8rpx 0 0;
vertical-align: middle;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
</view> </view>
</view> </view>
<navigator target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release">查看订单详情
</navigator>
\ No newline at end of file \ No newline at end of file
<navigator class="link" target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release">
<image class="icon-link" src="{{IMGURL}}output/icon-link.png?v={{img_version}}"></image>
查看订单详情</navigator>
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/summary/summary.js // packageOutput/pages/summary/summary.js
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: IMG_URL,
sceneCodeList: ['SC001', 'SC002', 'SC003', 'SC004'], sceneCodeList: ['SC001', 'SC002', 'SC003', 'SC004'],
merchantInfo: {}, merchantInfo: {},
sceneObj: { sceneObj: {
...@@ -117,7 +118,7 @@ Page({ ...@@ -117,7 +118,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)
// 删---- // 删---
// proList.productList[1].productStatus = 2 // proList.productList[1].productStatus = 2
this.setData({ this.setData({
['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList ['sceneActivityObj.scene' + this.data.sceneActive]: proList.productList
...@@ -230,6 +231,11 @@ Page({ ...@@ -230,6 +231,11 @@ Page({
console.log(curItem) console.log(curItem)
curItem.totalNum = curItem.activityList.length curItem.totalNum = curItem.activityList.length
curItem.activityList.forEach(k => { curItem.activityList.forEach(k => {
// 删---
// var list = k.staffList
// for (var i = 0; i < 10; i++) {
// k.staffList = k.staffList.concat(list)
// }
// 时间 // 时间
k.time = k.startTime.slice(5).replace(/-/g, '/') + '~' + k.endTime.slice(5).replace(/-/g, '/') k.time = k.startTime.slice(5).replace(/-/g, '/') + '~' + k.endTime.slice(5).replace(/-/g, '/')
// 0-未开始;1-活动中;2-已结束 // 0-未开始;1-活动中;2-已结束
...@@ -281,7 +287,7 @@ Page({ ...@@ -281,7 +287,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
// 删---- // 删---
// this.setData({ // this.setData({
// merchantInfo: { // merchantInfo: {
// pMerchantId: 44209845, // pMerchantId: 44209845,
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
padding: 0 20rpx; padding: 0 20rpx;
} }
.m-rl-20 {
margin: 0 20rpx;
}
.bg-white { .bg-white {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
...@@ -24,7 +28,6 @@ ...@@ -24,7 +28,6 @@
.layout { .layout {
color: #323436; color: #323436;
height: 100vh; height: 100vh;
// padding: 12rpx 20rpx 0;
// padding-top: 12rpx; // padding-top: 12rpx;
margin-bottom: 90rpx; margin-bottom: 90rpx;
...@@ -36,7 +39,7 @@ ...@@ -36,7 +39,7 @@
} }
.scene-box { .scene-box {
padding: 27rpx 20rpx 24rpx; padding: 27rpx 0 24rpx;
} }
.activity-box { .activity-box {
...@@ -110,19 +113,23 @@ ...@@ -110,19 +113,23 @@
} }
} }
.btn-blue { .btn {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
.btn { height: 88rpx;
width: 100%; line-height: 88rpx;
height: 88rpx; text-align: center;
line-height: 88rpx; font-size: 28rpx;
text-align: center; color: #FFFFFF;
.btn-blue {
background: #3666FE; background: #3666FE;
font-size: 28rpx; }
color: #FFFFFF;
.btn-disabled {
background: #CCCED1;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
<!--packageOutput/pages/summary/summary.wxml--> <!--packageOutput/pages/summary/summary.wxml-->
<view class="summary"> <view class="summary">
<view class="layout {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}"> <view class="layout {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}">
<view class="title bg-white">选产品/活动</view> <view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-white' : 'p-rl-20'}}">
<view class="scene-box bg-white"> <view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'm-rl-20' : ''}}">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange"></scene-box> <view class="title bg-white">选产品/活动</view>
<view class="scene-box bg-white">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange"></scene-box>
</view>
</view>
</view> </view>
<!-- 活动 --> <!-- 活动 -->
<view class="p-rl-20 bg-white"> <view class="p-rl-20 bg-white">
...@@ -14,7 +18,7 @@ ...@@ -14,7 +18,7 @@
</scroll-view> </scroll-view>
</view> </view>
<!-- 活动内容 --> <!-- 活动内容 -->
<view class="activity-content"> <view class="activity-content {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? '' : 'p-rl-20'}}">
<view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}"> <view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}">
<view class="activity-title title bg-white {{ sceneActive == 4 ? 'no-border' : ''}}"> <view class="activity-title title bg-white {{ sceneActive == 4 ? 'no-border' : ''}}">
<view>看产值</view> <view>看产值</view>
...@@ -32,7 +36,10 @@ ...@@ -32,7 +36,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="isFullSucreen btn-blue"> <view class="isFullSucreen btn" wx:if="{{sceneActive != 1}}">
<view wx:if="{{activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn" bindtap="handleJump">点击开通</view> <view wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
<view class="isFullSucreen btn" wx:else>
<view class="btn-disabled">点击开通</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -66,7 +66,9 @@ Page({ ...@@ -66,7 +66,9 @@ Page({
if (result) { if (result) {
wx.$api.showToast('申请成功') wx.$api.showToast('申请成功')
setTimeout(() => { setTimeout(() => {
wx.$router.back() wx.$router.back(page => {
page.getClueInit && page.getClueInit()
})
}, 1000) }, 1000)
} }
}) })
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</navigation-bar> </navigation-bar>
<view class="apply"> <view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" /> <image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" /> <image class="introduce" src="{{IMG_URL}}index/apply-bg.png" />
<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" />
......
...@@ -137,12 +137,14 @@ Page({ ...@@ -137,12 +137,14 @@ Page({
onRoute(options) { onRoute(options) {
console.log("分享options: ", options); console.log("分享options: ", options);
if (!options || utils.isEmptyObj(options)) return; if (!options || utils.isEmptyObj(options)) return;
// if(!Object.keys(options).includes('actNum'))return
let {senceData} = this.data
//选中场景的index,和产品的index //选中场景的index,和产品的index
let { let {
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, // apiData,
outshowVideo, outshowVideo,
// origin //跳转来源 home // origin //跳转来源 home
} = options; } = options;
...@@ -155,20 +157,20 @@ Page({ ...@@ -155,20 +157,20 @@ Page({
this.setData({ this.setData({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, // apiData,
outshowVideo, outshowVideo,
// origin // origin
// isShare // isShare
}); });
let apiDataJson = JSON.stringify(apiData); // let apiDataJson = JSON.stringify(apiData);
let item = apiData[actNum]?.productList[activeNavIdx]; let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${apiData[actNum].sceneCode}&productCode=${ this.shareQuery = `sceneCode=${senceData[actNum].sceneCode}&productCode=${
item?.productCode item?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${ }&isShare=${true}&productDesc=${item?.productName}&category=${
item?.category item?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&apiData=${apiDataJson}`; }&actNum=${actNum}&activeNavIdx=${activeNavIdx}`;
this.shareTrackData = { this.shareTrackData = {
sceneCode: apiData[actNum]?.sceneCode, sceneCode: senceData[actNum]?.sceneCode,
productCode: item?.productCode, productCode: item?.productCode,
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
...@@ -198,17 +200,21 @@ Page({ ...@@ -198,17 +200,21 @@ Page({
// 下载海报 // 下载海报
async download() { async download() {
let { actNum, activeNavIdx, imgHeightArr ,imgPath} = this.data; let { actNum, activeNavIdx, imgHeightArr ,imgPath} = this.data;
let wx_user_info = wx.$storage.get("wx_user_info"); const { appId } = wx.getAccountInfoSync().miniProgram
// let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info.appId); // console.log('wx_user_info: ', wx_user_info.appId);
wx.showLoading({
title: "下载中",
});
let params = { let params = {
actNum, actNum,
activeNavIdx, activeNavIdx,
isShare: true, isShare: true,
}; };
console.log(' wx_user_info.appId', wx_user_info) // console.log(' wx_user_info.appId', wx_user_info)
let res = await createQrCodeApi({ let res = await createQrCodeApi({
appId: wx_user_info.appId, appId: appId,
// appId:'wx2c28337db96364d2', // appId:'wx2c28337db96364d2',
path: "pages/checkProduct/checkProduct", path: "pages/checkProduct/checkProduct",
scene: JSON.stringify(params), scene: JSON.stringify(params),
...@@ -264,6 +270,7 @@ Page({ ...@@ -264,6 +270,7 @@ Page({
}); });
} }
_this.modelcloseFn(); _this.modelcloseFn();
wx.hideLoading()
}, },
}); });
}, },
...@@ -320,7 +327,7 @@ Page({ ...@@ -320,7 +327,7 @@ Page({
* 生命周期函数--监听页面加载 (扫码,分享链接) * 生命周期函数--监听页面加载 (扫码,分享链接)
*/ */
async onLoad(options) { async onLoad(options) {
this.getData() await this.getData()
console.log("分享options12255565: ", options); console.log("分享options12255565: ", options);
// actNum,activeNavIdx isShare // actNum,activeNavIdx isShare
if (!options || utils.isEmptyObj(options)) return; if (!options || utils.isEmptyObj(options)) return;
...@@ -332,12 +339,14 @@ Page({ ...@@ -332,12 +339,14 @@ Page({
isShare: true, isShare: true,
}); });
let ercodeParams = await this.analysisQRcode(options.scene); let ercodeParams = await this.analysisQRcode(options.scene);
options = utils.parseString(ercodeParams.scene); options = JSON.parse(ercodeParams.scene)
} }
let {senceData} = this.data
// 扫码进来 // 扫码进来
let { actNum, activeNavIdx, isShare } = options; let { actNum, activeNavIdx, isShare } = options;
if (isShare == "true") { console.log('actNum, activeNavIdx, isShare: ', actNum, activeNavIdx, isShare);
if (isShare) {
this.setData({ this.setData({
isShow: false, isShow: false,
}); });
...@@ -354,6 +363,7 @@ Page({ ...@@ -354,6 +363,7 @@ Page({
outshowVideo: false, //显示视频列表 outshowVideo: false, //显示视频列表
}); });
// 发请求 // 发请求
console.log()
let senceItem = senceData[actNum]; let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx]; let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${ this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${
...@@ -383,7 +393,7 @@ Page({ ...@@ -383,7 +393,7 @@ Page({
} }
}, },
// 解析二维码回调 // 解析二维码回调
async analysisOption() {}, // async analysisOption() {},
// 解析扫码进来参数 // 解析扫码进来参数
async analysisQRcode(str) { async analysisQRcode(str) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</view> --> </view> -->
<product stickyTop="{{headerHeight}}" class="productCon" style="padding-top:{{headerHeight}}px" isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" /> <product stickyTop="{{headerHeight}}" class="productCon" style="padding-top:{{headerHeight}}px" isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 --> <!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> --> <!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<view class="share-wrap" wx:if="{{isShow}}"> <view class="share-wrap" wx:if="{{isShow}}">
......
...@@ -53,11 +53,8 @@ Component({ ...@@ -53,11 +53,8 @@ Component({
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {
if(this.data.wrapactiveNavIdx){ console.log('this.data.wrapactiveNavIdx: ', this.data.wrapactiveNavIdx);
this.setData({
activeNavIdx:this.data.wrapactiveNavIdx
})
}
if(!this.data.outshowVideo){ if(!this.data.outshowVideo){
this.setData({ this.setData({
...@@ -116,6 +113,12 @@ Component({ ...@@ -116,6 +113,12 @@ Component({
// 每次切换场景,重新获取流程图高度 // 每次切换场景,重新获取流程图高度
this.getImgHeight(); this.getImgHeight();
this.getMoreFn(); this.getMoreFn();
// this
if(this.data.wrapactiveNavIdx){
this.setData({
activeNavIdx:this.data.wrapactiveNavIdx
})
}
}, },
}, },
...@@ -145,6 +148,17 @@ Component({ ...@@ -145,6 +148,17 @@ Component({
if (confirm) this.init(); if (confirm) this.init();
}); });
}, },
// 视频下载
downVideo(e){
let {src} = e.currentTarget.dataset
console.log('src: ', src);
wx.saveVideoToPhotosAlbum({
filePath: src,
success (res) {
console.log('视频下载',res)
}
})
},
saleTextChange(e) {}, saleTextChange(e) {},
changeTab(e) { changeTab(e) {
let idx = e.detail; let idx = e.detail;
......
...@@ -331,8 +331,8 @@ ...@@ -331,8 +331,8 @@
} }
.video-item video { .video-item video {
width: 100%; width: 100%;
height: 588rpx; height: 590rpx;
border: 1rpx dashed #AFB0B2; // border: 1rpx dashed #AFB0B2;
} }
.video-item:nth-child(even) { .video-item:nth-child(even) {
margin-left: 22rpx; margin-left: 22rpx;
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
<image class="icon" src="{{IMGURL}}share.png" /> <image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text> <text>分享</text>
</view> </view>
<!-- <view class="" bindtap="downVideo" data-src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/360_AR.mp4?v=" hover-class="none" hover-stop-propagation="false">
视频下载
</view> -->
</view> </view>
</view> </view>
</view> </view>
......
...@@ -99,12 +99,12 @@ var senceData = [ ...@@ -99,12 +99,12 @@ var senceData = [
img: 'product-img3', img: 'product-img3',
proName: '漆面保护膜', proName: '漆面保护膜',
price: '100', price: '100',
profit: '2160000', profit: '180000',
type: 'membrane', type: 'membrane',
productType: 'protectMembrane', productType: 'protectMembrane',
path: 'paintProtect', path: 'paintProtect',
sale:100, //销量 sale:100, //销量
varType: 1, varType: 0,
flow:10000, flow:10000,
"productCode":"PC003", "productCode":"PC003",
"productName":"漆面保护膜(车衣)", "productName":"漆面保护膜(车衣)",
...@@ -119,7 +119,7 @@ var senceData = [ ...@@ -119,7 +119,7 @@ var senceData = [
productType: 'colorMembrane', productType: 'colorMembrane',
path: 'changingFilm', path: 'changingFilm',
sale:100, //销量 sale:100, //销量
varType: 1, varType: 0,
flow:10000, flow:10000,
"productCode":"PC004", "productCode":"PC004",
"productName":"改色膜", "productName":"改色膜",
......
...@@ -169,8 +169,8 @@ Page({ ...@@ -169,8 +169,8 @@ Page({
wx.$router.go('packageOutput.openBusiness', params) wx.$router.go('packageOutput.openBusiness', params)
} else { } else {
//申请门店 //申请门店
let { type, item } = e.currentTarget.dataset // let { type, item } = e.currentTarget.dataset
wx.$router.go('apply', item.clueId) wx.$router.go('apply', item?.clueId || '')
} }
// wx.$router.go('apply',1235) // wx.$router.go('apply',1235)
}, },
...@@ -216,6 +216,7 @@ Page({ ...@@ -216,6 +216,7 @@ Page({
console.log(e) console.log(e)
let sales = e ? +e.detail.value.sales : this.data.formData.sales let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow let flow = e ? +e.detail.value.flow : this.data.formData.flow
console.log('flow', sales, flow)
const reg = /^[1-9]\d*$/ const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---') console.log(reg.test(sales), flow, '---')
if (!reg.test(sales)) { if (!reg.test(sales)) {
...@@ -316,7 +317,7 @@ Page({ ...@@ -316,7 +317,7 @@ Page({
break break
case 'protectMembrane': case 'protectMembrane':
// 漆面保护膜 // 漆面保护膜
profit = (flow * 0.15 * 12000 * 12).toFixed(0) profit = (flow * 0.05 * 3000 * 12).toFixed(0)
break break
case 'colorMembrane': case 'colorMembrane':
// 改色膜 // 改色膜
...@@ -549,6 +550,7 @@ Page({ ...@@ -549,6 +550,7 @@ Page({
wx.$api.setCopyData(phone) wx.$api.setCopyData(phone)
}, },
getClueInit(param) { getClueInit(param) {
// console.log(22222)
this.getUnreadApi(param) this.getUnreadApi(param)
this.getPageApi(param) this.getPageApi(param)
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</view> </view>
</view> </view>
</view> </view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" origin="home" apiData="{{apiData}}" bindsharehandle="sharehandle" /> <product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" origin="home" bindsharehandle="sharehandle" />
</view> </view>
<!-- 看线索内容 --> <!-- 看线索内容 -->
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false"> <view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
......
// pages/tab/output/components/sceneBox/sceneBox.js // pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -26,7 +27,7 @@ Component({ ...@@ -26,7 +27,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: IMG_URL,
custSceneList: [{ custSceneList: [{
title: '新车洽谈场景', title: '新车洽谈场景',
subTitle: '1.0新车权益销售' subTitle: '1.0新车权益销售'
......
// pages/tab/output/components/client/client.js // pages/tab/output/components/client/client.js
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -16,7 +17,7 @@ Component({ ...@@ -16,7 +17,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMGURL: IMG_URL,
pMerchantId: '', pMerchantId: '',
totalProfit: 0, totalProfit: 0,
pageObj: { pageObj: {
...@@ -76,6 +77,7 @@ Component({ ...@@ -76,6 +77,7 @@ Component({
item.sceneList.forEach((k, idx) => { item.sceneList.forEach((k, idx) => {
item['scene' + (idx + 1)] = item.sceneList[idx].flag item['scene' + (idx + 1)] = item.sceneList[idx].flag
}) })
item.isOpenScene = item.sceneList.map(item => item.flag).some(item => item == true)
}) })
this.setData({ this.setData({
list: list, list: list,
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:else class="flex"> <view wx:if="{{!item.msgList.length && !item.isOpenScene}}" class="flex">
<view class="tip-blue">通知</view> <view class="tip-blue">通知</view>
<view class="bottom-content"> <view class="bottom-content">
<view class="tip-row"> <view class="tip-row">
......
...@@ -149,7 +149,7 @@ Component({ ...@@ -149,7 +149,7 @@ Component({
this.setData({ this.setData({
list: [] list: []
}) })
return wx.$api.showTips(result.message) return wx.$api.showToast(result.message)
} }
let { dataList, yqMerchantIds } = data let { dataList, yqMerchantIds } = data
const list = yqMerchantIds.reduce((list, item, index) => { const list = yqMerchantIds.reduce((list, item, index) => {
......
...@@ -116,7 +116,9 @@ Page({ ...@@ -116,7 +116,9 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px'))
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
......
...@@ -16,7 +16,10 @@ class Router { ...@@ -16,7 +16,10 @@ class Router {
let thisPage = this.getPageInstance() let thisPage = this.getPageInstance()
if (thisPage) { if (thisPage) {
thisPage.setData({ IMG_URL }) thisPage.setData({ IMG_URL })
if(Object.keys(this[_query]).length) thisPage.options = this[_query] if(Object.keys(this[_query]).length) thisPage.options = {
...thisPage.options,
...this[_query]
}
this.setNavigationBarTitleText(thisPage) this.setNavigationBarTitleText(thisPage)
let onRoute = thisPage.onRoute let onRoute = thisPage.onRoute
typeof onRoute === 'function' && onRoute(this[_query]) typeof onRoute === 'function' && onRoute(this[_query])
......
...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod'] ...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试 2测试
3生产 3生产
*/ */
const index = 2 const index = 1
const secretKey = { const secretKey = {
ip: {}, ip: {},
......
...@@ -134,11 +134,13 @@ const isEmptyObj = (obj) => { ...@@ -134,11 +134,13 @@ const isEmptyObj = (obj) => {
}; };
// 解析参数成对象 "actNum=1&activeNavIdx=0&isShare=true" // 解析参数成对象 "actNum=1&activeNavIdx=0&isShare=true"
const parseString = (str) => { const parseString = (str) => {
// console.log('str: ', str);
if (!str) return; if (!str) return;
let obj = {}; let obj = {};
let strArr = str.split("&"); let strArr = str.split("&");
// console.log('strArr: ', strArr);
strArr.forEach((item) => { strArr.forEach((item) => {
console.log("item: ", item); // console.log("item: ", item);
let keyArr = item.split("="); let keyArr = item.split("=");
obj[keyArr[0]] = keyArr[1]; obj[keyArr[0]] = keyArr[1];
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!