Commit 40f3d0b3 by 张立顺

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

2 parents 0dc42bb2 34691f37
...@@ -6,5 +6,6 @@ ...@@ -6,5 +6,6 @@
"type-list": "./components/TypeList/TypeList", "type-list": "./components/TypeList/TypeList",
"agree": "./components/Agree/Agree" "agree": "./components/Agree/Agree"
}, },
"navigationStyle": "custom" "navigationStyle": "custom",
"disableScroll": true
} }
\ No newline at end of file \ No newline at end of file
...@@ -115,6 +115,8 @@ ...@@ -115,6 +115,8 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
.btn {
width: 100%;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
...@@ -122,4 +124,5 @@ ...@@ -122,4 +124,5 @@
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
} }
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,5 +32,7 @@ ...@@ -32,5 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn-blue" bindtap="handleJump">点击开通</view> <view class="isFullSucreen btn-blue">
<view wx:if="{{activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn" bindtap="handleJump">点击开通</view>
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// pages/checkProduct/checkProduct.js // pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;"; // const navStyle = "background-color: transparent;";
const navStyle = "background-color: #fff"; const navStyle = "background-color: #fff";
import { senceData } from "~/pages/tab/index/constant/data"; import {
import { IMG_URL } from "~/utils/constantData.js"; senceData
} from "~/pages/tab/index/constant/data";
import {
IMG_URL
} from "~/utils/constantData.js";
import Draw from "~/utils/Draw.js"; import Draw from "~/utils/Draw.js";
import { createQrCodeApi,sceneByIdApi } from "~/api/checkProduct.js"; import {
import utils from '~/utils/util.js' createQrCodeApi,
sceneByIdApi
} from "~/api/checkProduct.js";
import utils from "~/utils/util.js";
Page({ Page({
/** /**
...@@ -19,8 +26,7 @@ Page({ ...@@ -19,8 +26,7 @@ Page({
// 模态框 // 模态框
isShow: true, isShow: true,
// IMG_URL: `${IMG_URL}index`, // IMG_URL: `${IMG_URL}index`,
btnList: [ btnList: [{
{
src: `${IMG_URL}index/wechat.png`, src: `${IMG_URL}index/wechat.png`,
name: "微信转发", name: "微信转发",
}, },
...@@ -44,6 +50,10 @@ Page({ ...@@ -44,6 +50,10 @@ Page({
noVideoimgList: [], noVideoimgList: [],
//分享相关 //分享相关
isShare: false, isShare: false,
// 是否授权昵称
hasUserInfo: false,
phone: '', //授权手机号
userInfo: ''
}, },
observers: { observers: {
actNum: function (actNum) { actNum: function (actNum) {
...@@ -67,7 +77,10 @@ Page({ ...@@ -67,7 +77,10 @@ Page({
}, },
// navbar高度设置 // navbar高度设置
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail; let {
height,
statusBarHeight
} = e.detail;
this.setData({ this.setData({
headerHeight: height / 2 + statusBarHeight, headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight, // headerHeight: height / 2 + statusBarHeight,
...@@ -91,27 +104,36 @@ Page({ ...@@ -91,27 +104,36 @@ 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;
//选中场景的index,和产品的index //选中场景的index,和产品的index
let { actNum, activeNavIdx, apiData} = options; let {
actNum,
activeNavIdx,
apiData,
outshowVideo
// origin //跳转来源 home
} = options;
// if(actNum&&activeNavIdx)return // if(actNum&&activeNavIdx)return
this.setData({ this.setData({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
outshowVideo
// origin
// isShare // isShare
}); });
let apiDataJson = JSON.stringify(apiData) let apiDataJson = JSON.stringify(apiData);
let item = apiData[actNum]?.productList[activeNavIdx]; let item = apiData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${apiData[actNum].sceneCode}&productCode=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&apiData=${apiDataJson}`; this.shareQuery = `sceneCode=${apiData[actNum].sceneCode}&productCode=${item?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&apiData=${apiDataJson}`;
this.shareTrackData = { this.shareTrackData = {
sceneCode: apiData[actNum]?.sceneCode, sceneCode: apiData[actNum]?.sceneCode,
productCode: item?.productCode, productCode: item?.productCode,
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
productDesc:item?.productName productDesc: item?.productName,
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
// apiData, // apiData,
...@@ -119,7 +141,9 @@ Page({ ...@@ -119,7 +141,9 @@ Page({
}, },
// 分享按钮 // 分享按钮
handleClick(e) { handleClick(e) {
let { index } = e.currentTarget.dataset; let {
index
} = e.currentTarget.dataset;
switch (index) { switch (index) {
case 0: case 0:
this.wechatFn(); this.wechatFn();
...@@ -136,20 +160,24 @@ Page({ ...@@ -136,20 +160,24 @@ Page({
}, },
// 下载海报 // 下载海报
async download() { async download() {
let { actNum, activeNavIdx, imgHeightArr } = this.data; let {
let wx_user_info = wx.$storage.get('wx_user_info') actNum,
activeNavIdx,
imgHeightArr
} = this.data;
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);
let params = { let params = {
actNum, actNum,
activeNavIdx, activeNavIdx,
isShare: true, isShare: true,
} };
let res = await createQrCodeApi({ let res = await createQrCodeApi({
appId: wx_user_info.appId,
appId:wx_user_info.appId, // appId:'wx2c28337db96364d2',
path:'pages/checkProduct/checkProduct', path: "pages/checkProduct/checkProduct",
scene:JSON.stringify(params) scene: JSON.stringify(params),
}); });
// console.log('res: ', res); // console.log('res: ', res);
...@@ -167,8 +195,7 @@ Page({ ...@@ -167,8 +195,7 @@ Page({
let _this = this; let _this = this;
wx.getImageInfo({ wx.getImageInfo({
src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${ src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1
actNum + 1
}.png`, }.png`,
success: async () => { success: async () => {
// // console.log("imgAllHeight: ", imgAllHeight); // // console.log("imgAllHeight: ", imgAllHeight);
...@@ -200,14 +227,12 @@ Page({ ...@@ -200,14 +227,12 @@ Page({
// ]; // ];
let arr = [456, 222, 0, 496]; let arr = [456, 222, 0, 496];
let imgList = [ let imgList = [{
{
x: 0, x: 0,
y: 0, y: 0,
width: _this.data.imgWidth, width: _this.data.imgWidth,
height: _this.data.imgHeight, height: _this.data.imgHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${ url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1
actNum + 1
}.png`, }.png`,
}, },
{ {
...@@ -262,39 +287,38 @@ Page({ ...@@ -262,39 +287,38 @@ Page({
// 分享获取懂得用户数 // 分享获取懂得用户数
authorizedFn(e) { authorizedFn(e) {
let res = e.detail; let res = e.detail;
this.onLoad(null) this.onLoad(null);
wx.nextTick(()=>{ wx.nextTick(() => {
this.setData({ this.setData({
isShare: res.isShare, // isShare: res.isShare,
phone: res.phone, phone: res.phone,
}); });
}) });
}, },
/** /**
* 生命周期函数--监听页面加载 (扫码,分享链接) * 生命周期函数--监听页面加载 (扫码,分享链接)
*/ */
async onLoad(options) { async onLoad(options) {
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;
// 解析二维码参数 // 解析二维码参数
if(options.scene){ if (options.scene) {
this.setData({ this.setData({
isShare:true isShare: true,
}) });
let ercodeParams = await this.analysisQRcode(options.scene) let ercodeParams = await this.analysisQRcode(options.scene);
// console.log('ercodeParams: ', ercodeParams.scene); options = utils.parseString(ercodeParams.scene);
options = utils.parseString(ercodeParams.scene)
// console.log('ercodeParams: ', options);
} }
// 扫码进来 // 扫码进来
let { actNum, activeNavIdx, isShare } = options; let {
if (isShare == 'true') { actNum,
activeNavIdx,
isShare
} = options;
if (isShare == "true") {
this.setData({ this.setData({
isShow: false, isShow: false,
}); });
...@@ -307,69 +331,100 @@ Page({ ...@@ -307,69 +331,100 @@ Page({
this.setData({ this.setData({
actNum, actNum,
activeNavIdx, activeNavIdx,
isShare:true isShare: true,
}) outshowVideo:false, //显示视频列表
});
// 发请求 // 发请求
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=${item?.productCode}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`; this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${item?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${item?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`;
this.shareTrackData = { this.shareTrackData = {
sceneCode: senceItem?.sceneCode, sceneCode: senceItem?.sceneCode,
productCode: item?.productCode, productCode: item?.productCode,
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
productDesc:item?.productName, productDesc: item?.productName,
// actNum, // actNum,
// activeNavIdx, // activeNavIdx,
}; };
}, },
// 解析扫码进来参数 // 解析扫码进来参数
async analysisQRcode(str){ async analysisQRcode(str) {
let id = str.split('%3D')[1] let id = str.split("%3D")[1];
let res = await sceneByIdApi({id}) let res = await sceneByIdApi({
id
});
// console.log('res: ', res); // console.log('res: ', res);
return res return res;
},
// 获取用户昵称
getUserProfile(e) {
this.setData({
hasUserInfo: true,
});
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
// console.log('res: ', res.userInfo.nickName);
// userInfo.nickName
this.setData({
userInfo: res.userInfo
})
let wx_user_info = wx.$storage.get('wx_user_info')
// console.log('wx_user_info: ', wx_user_info);
let obj ={
...wx_user_info,
nickName:res.userInfo.nickName,
avatarUrl:res.userInfo.avatarUrl,
}
// console.log('obj',obj)
wx.$storage.set('wx_user_info', obj)
// this.onLoad(null);
},
});
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() { },
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow(options) {}, onShow(options) { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, onShareAppMessage() { },
/** /**
* 浏览埋点 * 浏览埋点
*/ */
onShareTimeline() {}, onShareTimeline() { },
onViewTrack: true, onViewTrack: true,
}); });
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,5 @@ ...@@ -4,6 +4,5 @@
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
...@@ -68,3 +68,14 @@ ...@@ -68,3 +68,14 @@
} }
} }
} }
/* 用户授权 */
.user-profile {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
background-color: transparent;
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</view> </view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{isShare}}" bindauthorized="authorizedFn" /> <product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" outshowVideo="{{outshowVideo}}" 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}}">
...@@ -34,3 +34,6 @@ ...@@ -34,3 +34,6 @@
<view class="btom" bindtap="modelcloseFn">取消</view> <view class="btom" bindtap="modelcloseFn">取消</view>
</view> </view>
</view> </view>
<!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow -->
<view wx:if="{{!hasUserInfo && isShare}}" class="user-profile" bindtap="getUserProfile"></view>
...@@ -13,12 +13,18 @@ Component({ ...@@ -13,12 +13,18 @@ Component({
properties: { properties: {
stickyTop: Number, stickyTop: Number,
actNum: Number, actNum: Number,
wrapactiveNavIdx:Number,
senceData: Object, //本地数据 senceData: Object, //本地数据
apiData:Object, //后端接口数据 apiData:Object, //后端接口数据
isShare: { isShare: {
type: Boolean, type: Boolean,
value: false, value: false,
}, },
origin:String, //来源
outshowVideo: {
type: Boolean,
value: true,
}, //显示视频列表
}, },
/** /**
...@@ -41,11 +47,24 @@ Component({ ...@@ -41,11 +47,24 @@ Component({
intoViewId: "to-0", intoViewId: "to-0",
IMGURL: `${IMG_URL}index/`, IMGURL: `${IMG_URL}index/`,
videoBaseUrl, videoBaseUrl,
getMoreBtn:false,
showVideo:true //显示视频列表
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {
if(this.data.wrapactiveNavIdx){
this.setData({
activeNavIdx:this.data.wrapactiveNavIdx
})
}
if(!this.data.outshowVideo){
console.log('outshowVideo', this.data.outshowVideo)
this.setData({
showVideo:false
})
}
this.init(); this.init();
// console.log('stickyTop',this.data.stickyTop)
this.getImgHeight(); this.getImgHeight();
//如果不是分享,初始化的时候调用函数 //如果不是分享,初始化的时候调用函数
if (!this.data.isShare) { if (!this.data.isShare) {
...@@ -166,22 +185,29 @@ Component({ ...@@ -166,22 +185,29 @@ Component({
}, },
// 获取用户信息 // 获取用户信息
getUserInfo({ detail }) { getUserInfo({ detail }) {
console.log(detail); // console.log(detail);
if (!detail.code) return; if (!detail.code) return;
// this.setBtnLoading() // this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail) USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => { .then((result) => {
// console.log(result) // console.log(result)
let userInfo = wx.$storage.get('wx_user_info')
// console.log('userInfo: ', userInfo);
let { phone } = result; let { phone } = result;
// let { // console.log('phone: ', phone);
wx.$storage.set('wx_user_info', result); wx.$storage.set('wx_user_info', {...userInfo,phone});
// } // }
this.triggerEvent("authorized", { this.triggerEvent("authorized", {
phone, phone,
isShare: false, // isShare: false,
}); });
// this. //隐藏更多按钮,显示视频列表
this.setData({
getMoreBtn:true,
isShare: false,
outshowVideo:true
})
this.getMoreFn() this.getMoreFn()
}) })
.catch(({ errMsg }) => { .catch(({ errMsg }) => {
...@@ -228,6 +254,8 @@ Component({ ...@@ -228,6 +254,8 @@ Component({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
outshowVideo:true
// origin:'home' //跟首页类似情况
// isShare: true // isShare: true
}); });
}, },
......
<!-- pages/tab/discovery/components/product/product.wxml --> <!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap"> <view class="prod-wrap">
<text class="big-title">特色产品</text> <text class="big-title">特色产品</text>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare}}"> <scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<block wx:for="{{navList}}" wx:key="index"> <block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text> <text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block> </block>
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text> <text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text> </text>
<text class="earnings" decode="{{true}}">{{stickyTop}}预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text> </text>
</view> </view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn"> <view class="share-btn" wx:if="{{!isShare && origin =='home'}}" bindtap="onShareFn">
<image class="icon" src="{{IMGURL}}share.png" /> <image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text> <text>分享</text>
</view> </view>
...@@ -46,9 +46,10 @@ ...@@ -46,9 +46,10 @@
scroll-y="{{true}}" scroll-y="{{true}}"
> >
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" > <!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
<!-- {{item}} --> <view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index != 5}}">
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" wx:if="{{index!=5}}" /> <!-- wx:if="{{index!=5}}" -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}"> <view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list"> <view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i"> <block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
...@@ -62,8 +63,9 @@ ...@@ -62,8 +63,9 @@
</view> </view>
<!-- wx:if="{{ actNum != 2 && index == 4}}" --> <!-- wx:if="{{ actNum != 2 && index == 4}}" -->
<!-- wx:if="{{isShare && actNum != 2 && index == 4}}" --> <!-- wx:if="{{isShare && actNum != 2 && index == 4}}" -->
<!-- wx:if="{{ isShare && actNum != 2 && index == 4}}" -->
<button <button
wx:if="{{ isShare && actNum != 2 && index == 4}}" wx:if="{{ isShare && !getMoreBtn && actNum != 2 && index == 4}}"
class="more-btn" class="more-btn"
data-index="{{index}}" data-index="{{index}}"
bindgetphonenumber="getUserInfo" bindgetphonenumber="getUserInfo"
...@@ -72,6 +74,22 @@ ...@@ -72,6 +74,22 @@
点击查看更多详情 点击查看更多详情
</button> </button>
</view> </view>
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index == 5 && outshowVideo}}">
<!-- wx:if="{{index!=5}}" -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<view class="video-text">{{item.name}}</view>
</view>
</block>
</view>
</view>
</view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
......
// 1.视频默认进来是true,显示,
// 2.扫码,分享链接进来,不显示
// 3.点击更多详情,隐藏更多按钮,显示视频
// 4.视频的位置最后一个 下标5
// var showVideo = function(index){
// if(index == 5){
// a
// }
// };
// module.exports = {
// showVideo:showVideo
// }
...@@ -14,9 +14,9 @@ var senceData = [ ...@@ -14,9 +14,9 @@ var senceData = [
{ {
img: 'product-img1', img: 'product-img1',
proName: '数字无忧权益卡', proName: '数字无忧权益卡',
price: '1500', price: '100',
// profit: '92.4万', // profit: '92.4万',
profit: '120万', profit: '1200000',
type: 'service', type: 'service',
productType: 'benefitCard', productType: 'benefitCard',
path: 'equity', path: 'equity',
...@@ -63,8 +63,8 @@ var senceData = [ ...@@ -63,8 +63,8 @@ var senceData = [
{ {
img: 'product-img2', img: 'product-img2',
proName: '汽车太阳膜', proName: '汽车太阳膜',
price: '1500', price: '100',
profit: '1008万', profit: '10080000',
type: 'membrane', type: 'membrane',
productType: 'sunMembrane', productType: 'sunMembrane',
path: 'solarFilm', path: 'solarFilm',
...@@ -96,8 +96,8 @@ var senceData = [ ...@@ -96,8 +96,8 @@ var senceData = [
{ {
img: 'product-img3', img: 'product-img3',
proName: '漆面保护膜', proName: '漆面保护膜',
price: '12000', price: '100',
profit: '216万', profit: '2160000',
type: 'membrane', type: 'membrane',
productType: 'protectMembrane', productType: 'protectMembrane',
path: 'paintProtect', path: 'paintProtect',
...@@ -110,8 +110,8 @@ var senceData = [ ...@@ -110,8 +110,8 @@ var senceData = [
{ {
img: 'product-img4', img: 'product-img4',
proName: '改色膜', proName: '改色膜',
price: '5000', price: '100',
profit: '30万', profit: '300000',
type: 'membrane', type: 'membrane',
productType: 'colorMembrane', productType: 'colorMembrane',
path: 'changingFilm', path: 'changingFilm',
...@@ -136,8 +136,8 @@ var senceData = [ ...@@ -136,8 +136,8 @@ var senceData = [
{ {
img: 'product-img5', img: 'product-img5',
proName: '数字化美容', proName: '数字化美容',
price: '300', price: '100',
profit: '36万', profit: '72000',
type: 'beauty', type: 'beauty',
productType: 'digitBeauty', productType: 'digitBeauty',
path: 'carBeauty', path: 'carBeauty',
...@@ -150,8 +150,8 @@ var senceData = [ ...@@ -150,8 +150,8 @@ var senceData = [
{ {
img: 'product-img6', img: 'product-img6',
proName: '座椅通风', proName: '座椅通风',
price: '1500', price: '10000',
profit: '1008万', profit: '232200',
type: 'light', type: 'light',
productType: 'chair', productType: 'chair',
path: 'seatVentilate', path: 'seatVentilate',
...@@ -164,8 +164,8 @@ var senceData = [ ...@@ -164,8 +164,8 @@ var senceData = [
{ {
img: 'product-img7', img: 'product-img7',
proName: 'AR导航', proName: 'AR导航',
price: '1680', price: '10000',
profit: '22.68万', profit: '226800',
type: 'light', type: 'light',
productType: 'ar', productType: 'ar',
path: 'arNavigation', path: 'arNavigation',
...@@ -178,8 +178,8 @@ var senceData = [ ...@@ -178,8 +178,8 @@ var senceData = [
{ {
img: 'product-img8', img: 'product-img8',
proName: '氛围灯', proName: '氛围灯',
price: '2680', price: '10000',
profit: '36.18万', profit: '361800',
type: 'light', type: 'light',
productType: 'lamp', productType: 'lamp',
path: 'ambientLighting', path: 'ambientLighting',
...@@ -192,8 +192,8 @@ var senceData = [ ...@@ -192,8 +192,8 @@ var senceData = [
{ {
img: 'product-img9', img: 'product-img9',
proName: '360全景导航', proName: '360全景导航',
price: '2880', price: '10000',
profit: '38.88万', profit: '388800',
type: 'service', type: 'service',
productType: 'navigation', productType: 'navigation',
path: 'navigationArround', path: 'navigationArround',
......
...@@ -48,7 +48,7 @@ Page({ ...@@ -48,7 +48,7 @@ Page({
}, },
], ],
apiData: [], apiData: [],
actNum: 0, //car 场景选择 actNum: 3, //car 场景选择
tabIndx: 1, tabIndx: 1,
navList: ["看线索", "看产品"], navList: ["看线索", "看产品"],
typeList: ["联系电话", "意向客户", "线索来源", "重置"], typeList: ["联系电话", "意向客户", "线索来源", "重置"],
...@@ -350,7 +350,7 @@ Page({ ...@@ -350,7 +350,7 @@ Page({
} }
console.log(profit.length); console.log(profit.length);
console.log(productType, sales, flow, profit); console.log(productType, sales, flow, profit);
if (profit.length > 8) { if (profit.length > 9) {
return (profit / 10000).toFixed(0) + "万"; return (profit / 10000).toFixed(0) + "万";
} else { } else {
return profit; return profit;
...@@ -391,7 +391,7 @@ Page({ ...@@ -391,7 +391,7 @@ Page({
apiData: data, apiData: data,
}); });
this.compositionData(senceData, this.data.apiData); this.compositionData(senceData, this.data.apiData);
this.getFirstSenceIndex(); // this.getFirstSenceIndex();
} }
}); });
// 看线索 // 看线索
......
...@@ -237,9 +237,9 @@ page { ...@@ -237,9 +237,9 @@ page {
.scene { .scene {
margin: 0 10px 16px; margin: 0 10px 16px;
display: flex; display: flex;
// justify-content: space-between; justify-content: space-between;
.item-wrap { .item-wrap {
margin-right: 4px; // margin-right: 4px;
position: relative; position: relative;
width: 86px; width: 86px;
height: 90px; height: 90px;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</view> </view>
</view> </view>
</view> </view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" apiData="{{apiData}}" bindsharehandle="sharehandle" /> <product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" origin="home" apiData="{{apiData}}" 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">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
color: #323436; color: #323436;
padding: 16rpx 0 60rpx; padding-top: 16rpx;
background-color: #F2F3F7; background-color: #F2F3F7;
} }
...@@ -123,4 +123,5 @@ ...@@ -123,4 +123,5 @@
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
color: #CCCED1; color: #CCCED1;
padding-bottom: 60rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -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: {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!