Commit 6cc9f739 by luyt

feat;分享功能添加

1 parent f6366f58
/** /**
* 申请门店开通 * 申请门店开通
*/ */
import api from '~/utils/request/request' // import api from '~/utils/request/request'
const common = 'scrm.api.carlife.common.' // const serverApi = {
// productByscene:'scrm.api.busassistant.activity.productByscene'
// }
// export
\ No newline at end of file \ No newline at end of file
// export const productBysceneApi = (data) =>{
// return api.post(
// {
// method: serverApi.productByscene,
// ...data
// },
// true
// )
// }
...@@ -2,9 +2,24 @@ ...@@ -2,9 +2,24 @@
* 拓客户,看线索接口 * 拓客户,看线索接口
*/ */
import api from '~/utils/request/request' import api from '~/utils/request/request'
const common = 'scrm.api.carlife.common.' // const common = 'scrm.api.carlife.common.'
const serverApi = {
// 拓客户
productByscene:'scrm.api.busassistant.activity.productByscene'
}
// 拓客户 // 拓客户
const productBysceneApi = (data) =>{
return api.post(
{
method: serverApi.productByscene,
...data
},
true
)
}
// 看线索 // 看线索
module.exports = { module.exports = {
...@@ -19,5 +34,6 @@ module.exports = { ...@@ -19,5 +34,6 @@ module.exports = {
operationDate: new Date().format('yyyy-MM-dd hh:mm:ss'), operationDate: new Date().format('yyyy-MM-dd hh:mm:ss'),
}) })
} },
productBysceneApi
} }
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
enable-flex enable-flex
scroll-with-animation scroll-with-animation
scroll-into-view="{{to}}" scroll-into-view="{{to}}"
enhanced="{{true}}"
show-scrollbar="{{false}}"
> >
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
......
// pages/checkProduct/checkProduct.js // pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;"; // const navStyle = "background-color: transparent;";
import { IMG_URL } from "~/utils/constantData.js";
const navStyle = "background-color: #fff"; const navStyle = "background-color: #fff";
import { senceData } from "~/pages/tab/index/constant/data";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navStyle, navStyle,
headerHeight:0, headerHeight: 0,
senceData,
// 模态框
isShow: true,
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail;
this.setData({
headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
// 分项弹框关闭
modelcloseFn(e) {
this.setData({
isShow: e.detail,
});
},
// 分享按钮
sharehandle() {
this.setData({
isShow: true,
});
},
onRouter(options) {
console.log("options: ", options);
}, },
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail;
this.setData({
headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// actNum,activeNavIdx
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow(options) {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {},
});
{ {
"usingComponents": { "usingComponents": {
"product": "../tab/index/components/product/product" "product": "../tab/index/components/product/product",
"shareModel":"../tab/index/components/shareModel/shareModel"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
......
<!--pages/checkProduct/checkProduct.wxml--> <!--pages/checkProduct/checkProduct.wxml-->
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar> <navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar>
<view style="height:{{headerHeight}}px"> <view style="height:{{headerHeight}}px">
</view> </view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" /> <product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{true}}"/>
<!-- 分享弹框 -->
<shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" />
// pages/tab/index/components/chat/chat.js
import { IMG_URL } from "~/utils/constantData.js";
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
kfUrl: "",
widgetStatus: false,
IMG_URL,
img_version: Date.now(),
},
/**
* 组件的方法列表
*/
methods: {
openKF(e) {
let { kfUrl, widgetStatus } = this.data;
if (kfUrl)
wx.pro.openCustomerServiceChat({
extInfo: {
url: kfUrl,
},
corpId: "ww6fe4fbe0d050a2b5",
success(res) {
console.log(res);
},
fail({ errMsg }) {
console.log(errMsg);
wx.$util.showToast(errMsg);
},
});
else
this.setData({
widgetStatus: !widgetStatus,
});
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/chat/chat.wxss */
.widget-box {
position: fixed;
right: 40rpx;
bottom: 232rpx;
font-size: 20rpx;
color: #fff;
display: flex;
align-items: flex-end;
}
.widget {
height: 140rpx;
width: 112rpx;
box-sizing: border-box;
}
.widget-box .open {
position: relative;
z-index: 2;
}
.online-text {
position: absolute;
top: 74rpx;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 28rpx;
font-size: 20rpx;
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/index/components/chat/chat.wxml-->
<!-- wx:if="{{widgetStatus}}" -->
<view class="model" catchtouchmove="noScroll">
<view class="close-icon" bindtap="showFlex">
<image webp src="{{IMG_URL}}index/kf-close.png?v={{img_version}}"></image>
</view>
<view class="bgkf">
<image webp src="{{IMG_URL}}index/kfbg.png?v={{img_version}}"></image>
<view class="qr-box">
<view class="qr-icon">
<image webp src="{{IMG_URL}}index/qr-bg.png?v={{img_version}}"></image>
</view>
<view class="userinfo-wrap">
<view class="icon">
<image webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/user.png"></image>
</view>
<view class="name">hello</view>
<view class="qr-code">
<image webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/qr.png" show-menu-by-longpress="{{customerlist[0].qrCode}}"></image>
</view>
</view>
<view class="kf-text">
<image webp src="{{IMG_URL}}index/kf-text.png?v={{img_version}}"></image>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/tab/discovery/components/product/product.js // pages/tab/discovery/components/product/product.js
// import {imgUrlMixin} from '~/mixins/index' // import {imgUrlMixin} from '~/mixins/index'
import { IMG_URL } from "~/utils/constantData.js"; import { IMG_URL } from "~/utils/constantData.js";
const videoBaseUrl =
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/";
Component({ Component({
// behaviors: [imgUrlMixin], // behaviors: [imgUrlMixin],
...@@ -10,7 +12,11 @@ Component({ ...@@ -10,7 +12,11 @@ Component({
properties: { properties: {
stickyTop: Number, stickyTop: Number,
actNum: Number, actNum: Number,
senceData:Object, senceData: Object,
isShare:{
type: Boolean,
value: false
}
}, },
/** /**
...@@ -32,10 +38,11 @@ Component({ ...@@ -32,10 +38,11 @@ Component({
curTabIdx: 0, curTabIdx: 0,
intoViewId: "to-0", intoViewId: "to-0",
IMGURL: `${IMG_URL}index/`, IMGURL: `${IMG_URL}index/`,
videoBaseUrl,
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {
// console.log(11111) // console.log('stickyTop',this.data.stickyTop)
this.getImgHeight(); this.getImgHeight();
}, },
}, },
...@@ -87,9 +94,7 @@ Component({ ...@@ -87,9 +94,7 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
saleTextChange(e){ saleTextChange(e) {},
},
changeTab(e) { changeTab(e) {
let idx = e.detail; let idx = e.detail;
this.setData({ this.setData({
...@@ -131,9 +136,8 @@ Component({ ...@@ -131,9 +136,8 @@ Component({
// 图片流程5 点击往下获取更多 // 图片流程5 点击往下获取更多
// 没登陆用户(登陆后解锁全部) // 没登陆用户(登陆后解锁全部)
getMoreFn(e) { getMoreFn(e) {
let { actNum } = this.data; let { actNum } = this.data;
console.log('inactNumdex: ', actNum); console.log("inactNumdex: ", actNum);
let tab = [ let tab = [
"场景说明", "场景说明",
"营销链路", "营销链路",
...@@ -159,8 +163,12 @@ Component({ ...@@ -159,8 +163,12 @@ Component({
tab, tab,
}); });
}, },
onShareFn(){ onShareFn() {
this.triggerEvent('sharehandle') // this.triggerEvent('sharehandle')
} // wx.$router.go('apply',1235)
let { actNum, activeNavIdx ,senceData} = this.data;
// console.log(' actNum, activeNavIdx : ', actNum, activeNavIdx ,senceData);
wx.$router.go("checkProduct", { actNum, activeNavIdx ,senceData});
},
}, },
}); });
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
} }
.project-img { .project-img {
height: 1200rpx; height: 1600rpx;
white-space: nowrap; white-space: nowrap;
.img-item { .img-item {
position: relative; position: relative;
...@@ -232,8 +232,14 @@ ...@@ -232,8 +232,14 @@
height: 490rpx; height: 490rpx;
} }
.img-item26 { .img-item26 {
width: 100%;
height: 752rpx; height: 752rpx;
.video-item{
width: 100%;
video{
border-radius: 16rpx;
height: 348rpx;
}
}
} }
// 流程图三 // 流程图三
...@@ -286,3 +292,64 @@ ...@@ -286,3 +292,64 @@
width: 100%; width: 100%;
height: 1666rpx; height: 1666rpx;
} }
/* 案例视频 */
.video-bg {
width: 100%;
position: absolute;
top: 280rpx;
}
.video-title {
position: relative;
padding: 96rpx 0 24rpx;
text-align: center;
font-size: 48rpx;
font-weight: 900;
color: #FFFFFF;
letter-spacing: 0;
line-height: 64rpx;
}
.video-title::after {
content: '';
display: block;
width: 48rpx;
height: 4rpx;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: #ffffff;
}
.video-list {
display: flex;
flex-wrap: wrap;
padding: 0 32rpx;
font-size: 0;
}
.video-item {
width: calc(50% - 12rpx);
margin-bottom: 32rpx;
}
.video-item video {
width: 100%;
height: 588rpx;
border: 1rpx dashed #AFB0B2;
}
.video-item:nth-child(even) {
margin-left: 22rpx;
}
.video-text {
margin-top: 16rpx;
font-size: 24rpx;
font-weight: 500;
font-size: 24rpx;
color: #343456;
}
.video-tips {
width: 100%;
text-align: center;
font-size: 28rpx;
color: rgba(255,255,255,.6);
padding: 16rpx 0 92rpx;
}
\ No newline at end of file \ No newline at end of file
<!--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}}"> <scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare}}">
<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>
...@@ -9,19 +9,18 @@ ...@@ -9,19 +9,18 @@
<view class="prod-item"> <view class="prod-item">
<view class="prod-card"> <view class="prod-card">
<view class="card-img"> <view class="card-img">
<text class="img-desc">轻改类</text> <!-- <text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png" /> <image src="{{IMGURL}}discovery_prod1.png" /> -->
<image src="{{IMGURL}}prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">360全景导航</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale">新车销量 <text class="sale-num">{{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">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings" decode="{{true}}">{{stickyTop}}预估收益&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" bindtap="onShareFn">
<image class="icon" src="{{IMGURL}}share.png" /> <image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text> <text>分享</text>
</view> </view>
...@@ -29,8 +28,8 @@ ...@@ -29,8 +28,8 @@
</view> </view>
</view> </view>
<view class="project-wrap"> <view class="project-wrap">
<!-- --> <!-- -->
<view class="stickyTab" style="top:{{stickyTop}}rpx"> <view class="stickyTab" style="top:{{isShare ? stickyTop+88 : stickyTop}}rpx">
<tab <tab
outClassName="project-tab" outClassName="project-tab"
openScroll="{{true}}" openScroll="{{true}}"
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
bindclick="changeTab" bindclick="changeTab"
/> />
</view> </view>
<!-- style="{height:{{allHeight}}px}" --> <!-- style="{height:{{allHeight}}px}" -->
<scroll-view <scroll-view
class="project-img" class="project-img"
scroll-into-view="{{intoViewId}}" scroll-into-view="{{intoViewId}}"
...@@ -50,7 +49,25 @@ ...@@ -50,7 +49,25 @@
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}"> <view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}">
<!-- {{item}} --> <!-- {{item}} -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" /> <image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<button wx:if="{{ actNum != 2 && index == 4}}" class="more-btn" data-index="{{index}}" bindtap="getMoreFn">点击查看更多详情</button> <view class="video-bg" wx:if="{{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 class="video-tips">- 如需开通请咨询客服 -</view> -->
</view>
</view>
<button
wx:if="{{ actNum != 2 && index == 4}}"
class="more-btn"
data-index="{{index}}"
bindtap="getMoreFn"
>
点击查看更多详情
</button>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
......
// pages/tab/index/components/shareModel/shareModel.js // pages/tab/index/components/shareModel/shareModel.js
import { IMG_URL } from "~/utils/constantData.js"; import { IMG_URL } from "~/utils/constantData.js";
import Draw from "~/utils/Draw.js";
Component({ Component({
/** /**
...@@ -23,15 +24,23 @@ Component({ ...@@ -23,15 +24,23 @@ Component({
src: `${IMG_URL}index/wechat.png`, src: `${IMG_URL}index/wechat.png`,
name: "微信转发", name: "微信转发",
}, },
{ // {
src: `${IMG_URL}index/moments.png`, // src: `${IMG_URL}index/moments.png`,
name: "朋友圈分享", // name: "朋友圈分享",
}, // },
{ {
src: `${IMG_URL}index/down.png`, src: `${IMG_URL}index/down.png`,
name: "下载为海报", name: "下载为海报",
}, },
], ],
// 4种场景下图片所有的高 (单位 rpx)
imgHeightArr: [
[1110, 1290, 596, 744, 490, 1532],
[2168, 1290, 596, 830, 490, 752],
[1110, 1290, 596, 984, 490],
[678, 1266, 1398, 830, 490, 1666],
],
posterUrl: "", //海报url
// imgList // imgList
// imgList:[ // imgList:[
// { // {
...@@ -39,23 +48,23 @@ Component({ ...@@ -39,23 +48,23 @@ Component({
// }, // },
// ] // ]
}, },
// observers:{ observers: {
// // actNum:function(actNum) { actNum: function (actNum) {
// // let imgList = [ let imgList = [
// // `${IMG_URL}index/scene${actNum +1}1.png`, `${IMG_URL}index/scene${actNum + 1}1.png`,
// // `${IMG_URL}index/scene${actNum +1}2.png`, `${IMG_URL}index/scene${actNum + 1}2.png`,
// // `${IMG_URL}index/scene${actNum +1}3.png`, `${IMG_URL}index/scene${actNum + 1}3.png`,
// // `${IMG_URL}index/scene${actNum +1}4.png`, `${IMG_URL}index/scene${actNum + 1}4.png`,
// // `${IMG_URL}index/scene${actNum +1}5.png`, `${IMG_URL}index/scene${actNum + 1}5.png`,
// // ] ];
// // if(actNum != 2){ if (actNum != 2) {
// // imgList.push(`${IMG_URL}index/scene${actNum +1}6.png`) imgList.push(`${IMG_URL}index/scene${actNum + 1}6.png`);
// // } }
// // this.setData({ this.setData({
// // imgList imgList,
// // }) });
// // } },
// }, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
...@@ -68,9 +77,6 @@ Component({ ...@@ -68,9 +77,6 @@ Component({
this.wechatFn(); this.wechatFn();
break; break;
case 1: case 1:
this.wechatFn();
break;
case 2:
this.download(); this.download();
break; break;
} }
...@@ -80,13 +86,59 @@ Component({ ...@@ -80,13 +86,59 @@ Component({
// this.data.onShareAppMessage() // this.data.onShareAppMessage()
this.modelClose(); this.modelClose();
}, },
// 朋友圈转发
momentsFn() {
// this.data.onShareTimeline()
this.modelClose();
},
// 下载海报 // 下载海报
download() { async download() {
let { actNum, imgHeightArr } = this.data;
//所有的长度
let imgAllHeight = imgHeightArr[actNum].reduce((total, current) => {
return total + current;
});
// 缺少视频的长度(前4张)+二维码的长度 (单位rpx)
let erCodeHeight =
imgHeightArr[actNum].slice(0, 4).reduce((total, current) => {
return total + current;
}) +
98 * 2;
// console.log("imgAllHeight: ", imgAllHeight);
let drawFun = new Draw({
width: 750,
height: imgAllHeight,
});
let imgList = [
{
x: 0,
y: 0,
width: 750,
height: imgAllHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
},
{
x: 245*2,
y: erCodeHeight-11,
width: 120*2,
height: 120*2,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.png`, //二维码
},
];
let posterUrl = await drawFun.begin({
imageList: imgList,
});
this.setData({
posterUrl: posterUrl.path,
});
console.log('posterUrl.path',posterUrl.path)
if(this.data.posterUrl){
wx.pro.downloadFile({
url: this.data.posterUrl, //仅为示例,并非真实的资源
success (res) {
console.log('res: ', res);
}
})
}
this.modelClose(); this.modelClose();
}, },
//模态框关闭 //模态框关闭
...@@ -94,11 +146,11 @@ Component({ ...@@ -94,11 +146,11 @@ Component({
this.triggerEvent("modelclose", false); this.triggerEvent("modelclose", false);
}, },
// 图片加载事件 // 图片加载事件
onloadFn(event){ onloadFn(event) {
// console.log('event.detail',event.detail) // console.log('event.detail',event.detail)
this.setData({ this.setData({
imgHeight: ((event.detail.height)*0.2).toFixed(0) imgHeight: (event.detail.height * 0.2).toFixed(0),
}) });
} },
}, },
}); });
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
overflow: auto; overflow: auto;
.img { .img {
width: 100%; width: 100%;
height: auto; // height: auto;
height: 60%;
background-color: #fff;
} }
} }
.btns { .btns {
...@@ -47,6 +49,12 @@ ...@@ -47,6 +49,12 @@
color: #323436; color: #323436;
text-align: center; text-align: center;
} }
.btn-wechat{
width: auto;
margin: 0;
padding: 0;
background-color: #fff;
}
} }
.btom { .btom {
margin: 18px auto 0; margin: 18px auto 0;
......
<!-- pages/tab/index/components/shareModel/shareModel.wxml --> <!-- pages/tab/index/components/shareModel/shareModel.wxml -->
<view class="share-wrap" wx:if="{{isShow}}"> <view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap"> <view class="img-wrap">
<image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}/longpic{{actNum+1}}.png" bindload="onloadFn" /> <image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}/longpic{{actNum+1}}.png" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image class="img" src="{{item}}"/>
</block> -->
</view> </view>
<button></button>
<view class="btns"> <view class="btns">
<view class="top"> <view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}"> <view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<image class="img" src="{{item.src}}" /> <block wx:if="{{index == 0}}">
<view class="name">{{item.name}}</view> <button open-type="share" class="btn-wechat">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</button>
</block>
<block wx:else>
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</block>
</view> </view>
</view> </view>
<view class="btom" bindtap="modelClose">取消</view> <view class="btom" bindtap="modelClose">取消</view>
......
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 pageData from "./constant/data"; import {senceData} from "./constant/data";
// `${IMG_URL}index/car2.png`, // `${IMG_URL}index/car2.png`,
//本地图片路径 //本地图片路径
let IMG_URLLocal = "../../../images/"; let IMG_URLLocal = "../../../images/";
import {productBysceneApi} from '~/api/index.js';
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
...@@ -160,7 +161,7 @@ Page({ ...@@ -160,7 +161,7 @@ Page({
isFirst: true, isFirst: true,
// tabList: pageData.tabList, // tabList: pageData.tabList,
// 定义数据 // 定义数据
senceData: pageData.senceData, senceData,
isShow:false, isShow:false,
}, },
...@@ -406,7 +407,18 @@ Page({ ...@@ -406,7 +407,18 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) {}, onLoad: function (options) {
// console.log('options: ', options);
let {sessionId} = wx.$storage.get()
console.log('sessionId: ', sessionId);
let param = {
sessionId
}
// productBysceneApi(param).then((res) => {
// console.log('res: ', res);
// })
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -490,18 +502,7 @@ Page({ ...@@ -490,18 +502,7 @@ Page({
let { phone } = e.currentTarget.dataset; let { phone } = e.currentTarget.dataset;
wx.$api.setCopyData(phone); wx.$api.setCopyData(phone);
}, },
// 分项弹框关闭
modelcloseFn(e){
this.setData({
isShow: e.detail
})
},
// 分享按钮
sharehandle(){
this.setData(({
isShow: true
}))
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"usingComponents": { "usingComponents": {
"product": "./components/product/product", "product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"chat": "./components/chat/chat",
"shareModel": "./components/shareModel/shareModel" "shareModel": "./components/shareModel/shareModel"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!