Commit 96b7f10c by wuwx

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

2 parents f7f72493 dc017aff
...@@ -66,12 +66,12 @@ Page({ ...@@ -66,12 +66,12 @@ Page({
}, },
init() { init() {
wx.nextTick(() => {
const sessionId = getSessionId(), const sessionId = getSessionId(),
{ {
url, url,
targetPath = url ? decodeURIComponent(url) : '' targetPath = url ? decodeURIComponent(url) : ''
} = this.options } = this.options
wx.nextTick(() => {
let path = 'pages.index', let path = 'pages.index',
obj = {} obj = {}
if (targetPath) obj.targetPath = targetPath if (targetPath) obj.targetPath = targetPath
...@@ -84,7 +84,7 @@ Page({ ...@@ -84,7 +84,7 @@ Page({
path = setRouteData(targetPath).url path = setRouteData(targetPath).url
obj = setRouteData(targetPath).obj obj = setRouteData(targetPath).obj
} }
wx.$router.reLaunch(path, obj) wx.$router.redirectTo(path, obj)
} else this.autoLogin(obj) } else this.autoLogin(obj)
}) })
} else this.autoLogin(obj) } else this.autoLogin(obj)
......
...@@ -8,7 +8,10 @@ Component({ ...@@ -8,7 +8,10 @@ Component({
properties: { properties: {
orderObj: { orderObj: {
type: Object, type: Object,
value: () => { } value: () => { },
observer(n) {
this.dealStaffList()
}
}, },
}, },
...@@ -68,12 +71,6 @@ Component({ ...@@ -68,12 +71,6 @@ Component({
}] }]
}, },
lifetimes: {
attached() {
this.dealStaffList()
},
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
...@@ -81,8 +78,10 @@ Component({ ...@@ -81,8 +78,10 @@ Component({
dealStaffList() { dealStaffList() {
var list = this.data.orderObj var list = this.data.orderObj
list && list.activityList.forEach(item => { list && list.activityList.forEach(item => {
item.showStaffList = item.staffList.length > 10 ? item.staffList.slice(0, 10) : item.staffList // 0-未开始;1-活动中;2-已结束
item.staffList = item.staffList.length > 10 ? item.staffList.slice(10) : [] let sliceNum = item.actStatus == 2 ? 3 : 10
item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
}) })
this.setData({ this.setData({
orderObj: list orderObj: list
......
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
.th, .th,
.td { .td {
width: calc((100% - 116rpx) / 4); width: calc((100% - 116rpx) / 4);
.icon-rank { .icon-rank {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
...@@ -137,6 +138,13 @@ ...@@ -137,6 +138,13 @@
} }
} }
.tr-no-data {
text-align: center;
height: 32rpx;
line-height: 32rpx;
padding-bottom: 16rpx;
}
.btn-more { .btn-more {
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
......
...@@ -48,9 +48,7 @@ ...@@ -48,9 +48,7 @@
</block> </block>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">查看更多</view> <view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">查看更多</view>
</view> </view>
<view class="tr" wx:else> <view class="tr-no-data" wx:else>暂无数据</view>
<view>暂无数据</view>
</view>
</view> </view>
</view> </view>
<!-- 诊断 --> <!-- 诊断 -->
...@@ -65,10 +63,6 @@ ...@@ -65,10 +63,6 @@
<view class="step-label">建议{{idx + 1}}</view> <view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view> <view class="step-txt">{{subItem}}</view>
</view> </view>
<!-- <view class="suggest-step">
<view class="step-label">建议2</view>
<view class="step-txt">触达车主人数太少,建议与4S店关键人沟通注册员工的转发执行情况。</view>
</view> -->
</view> </view>
</view> </view>
</view> </view>
......
<!--packageOutput/pages/summary/components/outputTransform/outputTransform.wxml--> <!-- packageOutput/pages/summary/components/outputTransform/outputTransform.wxml -->
<view class="layout"> <view class="layout">
<view class="block" wx:for="{{formDataList}}" wx:key="index"> <view class="block" wx:for="{{formDataList}}" wx:key="index">
<view> <view>
...@@ -9,6 +9,14 @@ ...@@ -9,6 +9,14 @@
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
</view> </view>
</view> </view>
<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
<navigator
version="trial"
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}}" />
查看订单详情
</navigator>
...@@ -228,7 +228,6 @@ Page({ ...@@ -228,7 +228,6 @@ Page({
actList.forEach((item, idx) => { actList.forEach((item, idx) => {
var curItem = res.find(k => k.goodsCategoryCode == item.productCode) var curItem = res.find(k => k.goodsCategoryCode == item.productCode)
if (curItem) { if (curItem) {
console.log(curItem)
curItem.totalNum = curItem.activityList.length curItem.totalNum = curItem.activityList.length
curItem.activityList.forEach(k => { curItem.activityList.forEach(k => {
// 删--- // 删---
...@@ -241,14 +240,14 @@ Page({ ...@@ -241,14 +240,14 @@ Page({
// 0-未开始;1-活动中;2-已结束 // 0-未开始;1-活动中;2-已结束
if (new Date(k.startTime) > new Date()) { if (new Date(k.startTime) > new Date()) {
k.actStatus = 0 k.actStatus = 0
k.interDays = parseInt((new Date().getTime(k.startTime) - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date(k.startTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} else if (new Date(k.startTime) < new Date() < new Date(k.endTime)) { } else if (new Date(k.startTime) < new Date() < new Date(k.endTime)) {
k.actStatus = 1 k.actStatus = 1
k.interDays = parseInt((new Date().getTime() - new Date(k.startTime).getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date().getTime() - new Date(k.startTime).getTime()) / (1000 * 60 * 60 * 24)) + 1
k.toEndDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.toEndDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} else if (new Date(k.endTime) < new Date()) { } else if (new Date(k.endTime) < new Date()) {
k.actStatus = 2 k.actStatus = 2
k.interDays = parseInt((new Date().getTime(k.endTime) - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1 k.interDays = parseInt((new Date(k.endTime).getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)) + 1
} }
k.suggestTxtList = [] k.suggestTxtList = []
k.suggestList = [] k.suggestList = []
...@@ -299,7 +298,6 @@ Page({ ...@@ -299,7 +298,6 @@ Page({
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
wx.$router.getData(obj => { wx.$router.getData(obj => {
console.log(obj)
var scene = {} var scene = {}
Object.keys(this.data.sceneObj).forEach(item => { Object.keys(this.data.sceneObj).forEach(item => {
scene[item] = obj[item] scene[item] = obj[item]
...@@ -311,8 +309,6 @@ Page({ ...@@ -311,8 +309,6 @@ Page({
}) })
this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1]) this.getSceneProStatus(this.data.sceneCodeList[this.data.sceneActive - 1])
// this.getCustomerDetail()
// this.setCurActivity()
}) })
}, },
...@@ -323,47 +319,5 @@ Page({ ...@@ -323,47 +319,5 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: this.data.merchantInfo.merchantName, title: this.data.merchantInfo.merchantName,
}) })
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -36,10 +36,12 @@ ...@@ -36,10 +36,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="isFullSucreen btn" wx:if="{{sceneActive != 1}}"> <view wx:if="{{sceneActive != 1}}">
<view wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn-blue" bindtap="handleJump">点击开通</view> <view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view> </view>
<view class="isFullSucreen btn" wx:else> </view>
<view class="isFullSucreen btn" wx:if="{{sceneActive == 1}}">
<view class="btn-disabled">点击开通</view> <view class="btn-disabled">点击开通</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -22,17 +22,18 @@ Page({ ...@@ -22,17 +22,18 @@ Page({
// IMG_URL: `${IMG_URL}index`, // IMG_URL: `${IMG_URL}index`,
btnList: [ btnList: [
{ {
src: `${IMG_URL}index/down.png`,
name: "下载海报",
},
{
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`,
name: "下载为海报",
},
], ],
// 4种场景下图片所有的高 (单位 rpx) // 4种场景下图片所有的高 (单位 rpx)
imgHeightArr: [ imgHeightArr: [
...@@ -151,7 +152,19 @@ Page({ ...@@ -151,7 +152,19 @@ Page({
// if(actNum&&activeNavIdx)return // if(actNum&&activeNavIdx)return
// 设置标题 // 设置标题
this.shareTitle = `给你分享一个${senceData[actNum]?.productList[activeNavIdx].proName}~`; let userInfoObj = wx.$storage.get('userInfo')
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name
if (userInfoObj.name) {
name = userInfoObj.name
}else if(userInfoObj.merchantName){
name = userInfoObj.merchantName
}else if(userInfoObj.merchantName){
//全称
name = userInfoObj.merchantName
}
this.shareTitle = `${name}给你分享一个活动${senceData[actNum]?.productList[activeNavIdx].proName},戳我参与~`;
this.getImgInfo(actNum) this.getImgInfo(actNum)
this.setData({ this.setData({
...@@ -185,10 +198,10 @@ Page({ ...@@ -185,10 +198,10 @@ Page({
let { index } = e.currentTarget.dataset; let { index } = e.currentTarget.dataset;
switch (index) { switch (index) {
case 0: case 0:
this.wechatFn(); this.download();
break; break;
case 1: case 1:
this.download(); this.wechatFn();
break; break;
} }
}, },
...@@ -204,7 +217,7 @@ Page({ ...@@ -204,7 +217,7 @@ Page({
// let wx_user_info = wx.$storage.get("wx_user_info"); // 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({ wx.showLoading({
title: "下载中", title: "海报生成中...",
}); });
let params = { let params = {
actNum, actNum,
...@@ -412,6 +425,7 @@ Page({ ...@@ -412,6 +425,7 @@ Page({
this.setData({ this.setData({
hasUserInfo: true, hasUserInfo: true,
}); });
let _this = this;
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认 // 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({ wx.getUserProfile({
...@@ -431,10 +445,23 @@ Page({ ...@@ -431,10 +445,23 @@ Page({
}; };
// console.log('obj',obj) // console.log('obj',obj)
wx.$storage.set("wx_user_info", obj); wx.$storage.set("wx_user_info", obj);
// this.onLoad(null);
_this.onLoad(null);
}, },
}); });
}, },
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
// console.log("滚动结束");
wx.$eventbus.emit('evt_page_scroll',{scrollTop:e.scrollTop})
}, 500);
};
})(),
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -15,14 +15,15 @@ ...@@ -15,14 +15,15 @@
z-index: 2; z-index: 2;
.img-wrap { .img-wrap {
position: absolute; position: absolute;
top: 20%; top: 15%;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
// width: 225px; // width: 225px;
width: 60%; width: 60%;
height: 311px; height: 54%;
// background-color: red; // background-color: red;
overflow: auto; overflow: auto;
border-radius: 16rpx;
.prod-item { .prod-item {
background-color: #f5f7fb; background-color: #f5f7fb;
.prod-item { .prod-item {
...@@ -105,14 +106,17 @@ ...@@ -105,14 +106,17 @@
background-color: #fff; background-color: #fff;
} }
} }
.btns { }
position: absolute; .btns-wrap {
padding-bottom: 84rpx;
position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 154px; height: 120rpx;
background: #ffffff; background: #ffffff;
border-radius: 8px 8px 0 0; z-index: 1;
// border-radius: 8px 8px 0 0;
.top { .top {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
...@@ -125,10 +129,29 @@ ...@@ -125,10 +129,29 @@
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.name { // .name {
font-size: 12px; // font-size: 12px;
color: #323436; // color: #323436;
// text-align: center;
// }
.name0{
width: 256rpx;
height: 88rpx;
border: 1px solid #EEEEEE;
border-radius: 8rpx;
font-size: 28rpx;
color: #8A8C90;
text-align: center; text-align: center;
line-height:88rpx;
}
.name1{
width: 414rpx;
height: 88rpx;
background: #3666FE;
border-radius: 8rpx;
font-size: 28rpx;
color: #FFFFFF;
line-height:88rpx;
} }
.btn-wechat { .btn-wechat {
width: auto; width: auto;
...@@ -146,7 +169,6 @@ ...@@ -146,7 +169,6 @@
border-radius: 4px; border-radius: 4px;
text-align: center; text-align: center;
} }
}
} }
/* 用户授权 */ /* 用户授权 */
...@@ -156,6 +178,6 @@ ...@@ -156,6 +178,6 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 2; z-index: 3;
background-color: transparent; background-color: transparent;
} }
<!--pages/checkProduct/checkProduct.wxml--> <!-- pages/checkProduct/checkProduct.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">{{senceData[actNum].productList[activeNavIdx].proName}}</navigation-bar> <navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
{{senceData[actNum].productList[activeNavIdx].proName}}
</navigation-bar>
<!-- <view style="height:{{headerHeight}}px"> <!-- <view style="height:{{headerHeight}}px">
</view> --> </view> -->
<!-- style="padding-top:{{headerHeight}}px" -->
<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" isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 --> <!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> --> <!-- <view class="share-wrap" wx:if="{{isShow}}">
<view class="share-wrap" wx:if="{{isShow}}">
{{IMG_URL}}
<view class="img-wrap"> <view class="img-wrap">
<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>
<image src="{{IMGURL}}discovery_prod1.png" /> -->
<image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" /> <image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<!-- senceData[actNum]['productList'][activeNavIdx].changeSale || --> <text class="sale" decode="{{true}}">
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text> {{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;
<text class="sale-num">
{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}
</text>
</text>
<text class="earnings" decode="{{true}}">
预估收益&nbsp;
<text class="earnings-num">
{{senceData[actNum]['productList'][activeNavIdx].profit}}
</text> </text>
<text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</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>
<image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image mode="widthFix" class="img" src="{{item}}"/>
</block> -->
</view> </view>
<button></button> <button></button>
<view class="btns"> </view> -->
<!-- 用于图片加载事件 -->
<image class="img" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" />
<view class="btns-wrap" wx:if="{{isShow}}">
<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}}">
<block wx:if="{{index == 0}}"> <block wx:if="{{index == 1}}">
<button open-type="share" class="btn-wechat"> <button open-type="share" class="btn-wechat">
<image class="img" src="{{item.src}}" /> <view class="name{{index}}">{{item.name}}</view>
<view class="name">{{item.name}}</view>
</button> </button>
</block> </block>
<block wx:else> <block wx:else>
<image class="img" src="{{item.src}}" /> <view class="name{{index}}">{{item.name}}</view>
<view class="name">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
<view class="btom" bindtap="modelcloseFn">取消</view> <!-- <view class="btom" bindtap="modelcloseFn">取消</view> -->
</view>
</view> </view>
<!-- 授权昵称 --> <!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow --> <!-- !hasUserInfo && !isShow -->
......
...@@ -49,9 +49,19 @@ Component({ ...@@ -49,9 +49,19 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
navWebView(e) { preView(e) {
let { valueUrl } = e.currentTarget.dataset let { valueurl } = e.currentTarget.dataset
wx.$router.jumpH5(valueUrl) // console.log(e)
// console.log(valueUrl)
// let urls = []
// urls.push(valueUrl)
// // wx.$router.jumpH5(valueUrl)
// console.log(urls)
// console.log([valueUrl])
wx.$api.previewImage({
urls: [valueurl],
current: valueurl
})
}, },
copyLink(e) { copyLink(e) {
console.log(e) console.log(e)
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<view class="warReportBox" wx:if="{{item.messageType == 2}}"> <view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item"> <view class="item">
<view class="label">当前产值</view> <view class="label">当前产值</view>
<view class="num">{{item.currentValue}}元</view> <view class="num">{{item.currentValue||'0.0'}}元</view>
</view> </view>
</view> </view>
<view class="warReportBox" wx:if="{{item.messageType == 3}}"> <view class="warReportBox" wx:if="{{item.messageType == 3}}">
...@@ -47,12 +47,18 @@ ...@@ -47,12 +47,18 @@
</view> </view>
<view class="item"> <view class="item">
<view class="label">完成目标</view> <view class="label">完成目标</view>
<view class="num">{{item.completeRate}}%</view> <view class="num">{{item.completeRate}}</view>
</view> </view>
</view> </view>
<view class="warReportLink"> <view class="warReportLink">
<view class="label">点击了解详情:</view> <view class="label">点击了解详情:</view>
<view class="link" data-valueUrl="{{item.valueUrl}}" bind:tap="navWebView">战报详情</view> <view
class="link"
wx:if="{{item.valueUrl}}"
data-valueurl="{{item.valueUrl}}"
bind:tap="preView">
战报详情
</view>
</view> </view>
</msg-box> </msg-box>
</scroll-view> </scroll-view>
...@@ -83,15 +89,21 @@ ...@@ -83,15 +89,21 @@
</view> </view>
<view class="cell" wx:if="{{item.messageType == 1}}"> <view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">开始时间:</view> <view class="label">开始时间:</view>
<view class="value">{{item.activityStartTime}}</view> <view class="value">{{item.activityStartTime||'-'}}</view>
</view> </view>
<view class="cell" wx:if="{{item.messageType == 1}}"> <view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">结算时间:</view> <view class="label">结算时间:</view>
<view class="value">{{item.activityEndTime}}</view> <view class="value">{{item.activityEndTime||'-'}}</view>
</view> </view>
<view class="cell" wx:if="{{item.messageType == 1}}"> <view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">活动链接:</view> <view class="label">活动链接:</view>
<view class="link" bind:tap="copyLink" data-url="{{item.activityUrl}}">点击复制活动链接</view> <view
class="link"
wx:if="{{item.activityUrl}}"
bind:tap="copyLink"
data-url="{{item.activityUrl}}">
点击下载活动二维码
</view>
</view> </view>
<view class="cell" wx:if="{{item.messageType == 4}}"> <view class="cell" wx:if="{{item.messageType == 4}}">
<view class="label">产品名称:</view> <view class="label">产品名称:</view>
......
...@@ -49,25 +49,64 @@ Component({ ...@@ -49,25 +49,64 @@ Component({
IMGURL: `${IMG_URL}index/`, IMGURL: `${IMG_URL}index/`,
videoBaseUrl, videoBaseUrl,
getMoreBtn:false, getMoreBtn:false,
showVideo:true //显示视频列表 showVideo:true, //显示视频列表
imgTopArr:[]
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {
if(!this.data.outshowVideo){ this.init();
this.getImgHeight();
console.log('ready')
//获取当前路径
let currentUrl = this.getCurrentPageUrl()
// console.log('currentUrl: ', currentUrl);
if(currentUrl == '/pages/tab/index/index'){
this.setData({
currentUrl:false
})
}
//监听页面滚动的距离
wx.$eventbus.on('evt_page_scroll',async (e)=>{
console.log(e)
// let heightTop = this.data.stickyTop// 90 场景高度,8 场景margin-bottom
// let prodArr = await this.getHeight('.prod-wrap')
// // console.log('prodArr: ', prodArr);
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// // console.log('imgArr: ', imgArr);
// let imgHeightArr = []
// imgArr.reduce((pre,cur,index)=>{
// imgHeightArr.push(pre+cur.height)
// return pre+cur.height
// },heightTop)
let imgTopArr = this.data.imgTopArr
console.log('imgTopArr: ', imgTopArr);
if(imgTopArr.length == 0)return
wx.nextTick(()=>{
let idx = imgTopArr.findIndex(item => item > e.scrollTop)
if(idx>-1){
this.setData({
curTabIdx: idx
})
}
})
})
if(!this.data.outshowVideo){
this.setData({ this.setData({
showVideo:false showVideo:false
}) })
} }
this.init();
this.getImgHeight();
//如果不是分享,初始化的时候调用函数 //如果不是分享,初始化的时候调用函数
if (!this.data.isShare) { if (!this.data.isShare) {
// console.log(131546) // console.log(131546)
this.getMoreFn(); this.getMoreFn();
} }
}, },
}, },
observers: { observers: {
actNum: function (newval, oldval) { actNum: function (newval, oldval) {
...@@ -112,7 +151,7 @@ Component({ ...@@ -112,7 +151,7 @@ Component({
activeNavIdx: 0, activeNavIdx: 0,
}); });
// 每次切换场景,重新获取流程图高度 // 每次切换场景,重新获取流程图高度
this.getImgHeight(); // this.getImgHeight();
this.getMoreFn(); this.getMoreFn();
// this // this
if(this.data.wrapactiveNavIdx){ if(this.data.wrapactiveNavIdx){
...@@ -122,11 +161,16 @@ Component({ ...@@ -122,11 +161,16 @@ Component({
} }
}, },
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getCurrentPageUrl() {
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const url = `/${currentPage.route}`
return url
},
async init() { async init() {
try { try {
const { data, code, message } = await USERAPI.wxCodeLogin(); const { data, code, message } = await USERAPI.wxCodeLogin();
...@@ -175,58 +219,98 @@ Component({ ...@@ -175,58 +219,98 @@ Component({
saleTextChange(e) {}, saleTextChange(e) {},
changeTab(e) { changeTab(e) {
let idx = e.detail; let idx = e.detail;
this.setData({ let {imgTopArr,stickyTop} = this.data
intoViewId: `to-${idx}`, console.log('idx: ', imgTopArr[idx],stickyTop);
}); // this.setData({
// intoViewId: `to-${idx}`,
// });
// wx.$eventbus.emit('evt_page_index',idx)
//判断当前路径
let currentUrl = this.getCurrentPageUrl()
if(currentUrl == '/pages/tab/index/index'){
wx.pageScrollTo({ scrollTop: imgTopArr[idx]-stickyTop+88+34})
}else{
wx.pageScrollTo({ scrollTop: (imgTopArr[idx]-stickyTop)})
}
},
// async changeTab(e){
// let idx = e.detail
// this.setData({
// intoViewId: `to-${idx}`
// })
// let heightTop = this.data.headerHeight + 90 - 16 - 46 // 90 场景高度,16 可能是误差 , 46 tab高度
// let prodArr = await this.getHeight('.prod-wrap')
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// for(let i=0;i<idx;i++){
// heightTop += imgArr[i].height
// }
// wx.pageScrollTo({
// scrollTop: heightTop,
// duration: 0
// })
// },
getHeight(cla){
return new Promise((resolve,reject)=>{
let query = wx.createSelectorQuery().in(this)
query.selectAll(cla).boundingClientRect((rect) => {
resolve(rect)
}).exec()
})
}, },
changeNav(event) { changeNav(event) {
this.setData({ this.setData({
activeNavIdx: event.target.dataset.index, activeNavIdx: event.target.dataset.index,
}); });
}, },
scrolltoupper(event) { // scrolltoupper(event) {
console.log(event.detail.scrollHeight,event.detail.scrollTop) // console.log(event.detail.scrollHeight,event.detail.scrollTop)
const idx = this.data.heightArr.findIndex( // const idx = this.data.heightArr.findIndex(
(item) => item > event.detail.scrollHeight // (item) => item > event.detail.scrollHeight
); // );
console.log('idx',idx) // console.log('idx',idx)
this.setData({ // this.setData({
curTabIdx: idx, // curTabIdx: idx,
}); // });
// console.log(this.data.curTabIdx1) // // console.log(this.data.curTabIdx1)
}, // },
getImgHeight() { getImgHeight() {
let query = wx.createSelectorQuery().in(this); let query = wx.createSelectorQuery().in(this);
let heightArr = []; let heightArr = [];
let imgTopArr = []
let s = 0; let s = 0;
let top
let _this = this
query query
.selectAll(".img-item") .selectAll(".img-item")
.boundingClientRect((react) => { .boundingClientRect((react) => {
react.forEach((item) => { react.forEach((item,index) => {
s += item.height; console.log('item: ', item);
heightArr.push(s);
// if(index == 0){
// console.log('item top: ', item);
// top = item.top
// }
// s = s +item.height;
s = item.top
// heightArr.push(s);
imgTopArr.push(s)
}); });
this.data.heightArr = heightArr;
// console.log(heightArr[heightArr.length-1]) // heightArr = heightArr.map((item)=>{
this.data.allHeight = heightArr[heightArr.length - 1]; // item += top
}) // return item
.exec(); // })
// let query = wx.createSelectorQuery().in(this);
// let heightArr = [];
// let s = 0;
// query
// .selectAll(".img-item")
// .boundingClientRect((react) => {
// react.forEach((item) => {
// // s += item.height;
// heightArr.push(item.top);
// });
// this.data.heightArr = heightArr; // this.data.heightArr = heightArr;
// // console.log(heightArr[heightArr.length-1]) // // console.log(heightArr[heightArr.length-1])
// this.data.allHeight = heightArr[heightArr.length - 1]; // this.data.allHeight = heightArr[heightArr.length - 1];
// }) // console.log('imgTopArr',imgTopArr)
// .exec(); _this.setData({
imgTopArr
})
})
.exec();
}, },
// 获取用户信息 // 获取用户信息
getUserInfo({ detail }) { getUserInfo({ detail }) {
......
...@@ -348,9 +348,12 @@ ...@@ -348,9 +348,12 @@
.video-list { .video-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 32rpx; padding: 0rpx 32rpx;
font-size: 0; font-size: 0;
} }
.check-prod .video-list{
padding-bottom: 140rpx;
}
.video-item { .video-item {
position: relative; position: relative;
width: calc(50% - 12rpx); width: calc(50% - 12rpx);
......
<!-- pages/tab/discovery/components/product/product.wxml --> <!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap"> <view class="prod-wrap" >
<view class="big-title">特色产品</view> <view class="big-title">特色产品</view>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}"> <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">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="project-wrap"> <view class="project-wrap {{currentUrl == ''? '':'check-prod'}}">
<!-- --> <!-- -->
<view class="stickyTab" style="top:{{isShare ? stickyTop+88 : stickyTop}}rpx"> <view class="stickyTab" style="top:{{isShare ? stickyTop+88 : stickyTop}}rpx">
<tab <tab
...@@ -40,12 +40,11 @@ ...@@ -40,12 +40,11 @@
productHeight productHeight
/> />
</view> </view>
<!-- style="{height:{{allHeight}}px}" -->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<scroll-view <scroll-view
class="project-img" class="project-img"
scroll-into-view="{{intoViewId}}" scroll-into-view="{{intoViewId}}"
bindscroll="scrolltoupper"
scroll-y="{{true}}"
> >
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" --> <!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
......
...@@ -247,7 +247,7 @@ var senceData = [ ...@@ -247,7 +247,7 @@ var senceData = [
"sceneCode":"SC001", "sceneCode":"SC001",
productList: [ productList: [
{ {
img: 'product-img1', img: 'product-img9',
proName: '新能源0元换购', proName: '新能源0元换购',
price: '100', price: '100',
// profit: '92.4万', // profit: '92.4万',
......
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 { senceData } from './constant/data' import { senceData } from './constant/data'
const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`,
actArrow: `${IMG_URL}/index/actArrow.png`
})
// `${IMG_URL}index/car2.png`, // `${IMG_URL}index/car2.png`,
//本地图片路径 //本地图片路径
let IMG_URLLocal = '../../../images/' let IMG_URLLocal = '../../../images/'
...@@ -13,6 +16,7 @@ Page({ ...@@ -13,6 +16,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMAGES,
navStyle, navStyle,
IMG_URL, IMG_URL,
IMG_URLLocal, IMG_URLLocal,
...@@ -307,17 +311,17 @@ Page({ ...@@ -307,17 +311,17 @@ Page({
visible: false visible: false
}) })
// this.showCase(); // this.showCase();
if (!this.data.isFirst) { // if (!this.data.isFirst) {
wx.showToast({ wx.showToast({
title: '测算结果已在页面内同步展示', title: '测算结果已在页面内同步展示',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
} else { // } else {
this.setData({ // this.setData({
isFirst: false // isFirst: false
}) // })
} // }
}, },
// // 获取场景下的产品类型 // // 获取场景下的产品类型
// getProductType(sceneIndex, tabIndex) { // getProductType(sceneIndex, tabIndex) {
...@@ -631,7 +635,18 @@ Page({ ...@@ -631,7 +635,18 @@ Page({
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight) // console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// }) // })
}, },
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
// console.log("滚动结束");
wx.$eventbus.emit('evt_page_scroll',{scrollTop:e.scrollTop})
}, 500);
};
})(),
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -386,18 +386,18 @@ page { ...@@ -386,18 +386,18 @@ page {
position: fixed; position: fixed;
right: -4px; right: -4px;
top: 60%; top: 60%;
width: 60px; width: 64px;
height: 60px; height: 64px;
border-radius: 50%; border-radius: 50%;
z-index: 2; z-index: 2;
} }
.output-value { .output-value {
position: fixed; position: fixed;
right: 5px; right: -2px;
top: 70%; top: 70%;
width: 40px; width: 64px;
height: 50px; height: 64px;
// border-radius: 50%; // border-radius: 50%;
z-index: 2; z-index: 2;
} }
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
tabHeight tabHeight
unreadClueCount="{{unreadClueCount}}" unreadClueCount="{{unreadClueCount}}"
bindclick="changeTabIndx" bindclick="changeTabIndx"
class="tabContainer" class="tabContainer" />
/>
<view class="right" data-type="shop" bindtap="gotoApply"> <view class="right" data-type="shop" bindtap="gotoApply">
<image class="img" src="{{IMG_URL}}index/apply.png" /> <image class="img" src="{{IMG_URL}}index/apply.png" />
<view class="apply">申请业务</view> <view class="apply">申请业务</view>
...@@ -24,8 +23,7 @@ ...@@ -24,8 +23,7 @@
class="content" class="content"
wx:if="{{tabIndx == 1 }}" wx:if="{{tabIndx == 1 }}"
hover-class="none" hover-class="none"
hover-stop-propagation="false" hover-stop-propagation="false">
>
<view class="scene"> <view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" --> <!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}"> <scroll-view scroll-x="{{true}}">
...@@ -36,8 +34,7 @@ ...@@ -36,8 +34,7 @@
data-scenestatus="{{item.sceneStatus}}" data-scenestatus="{{item.sceneStatus}}"
bindtap="selectCar" bindtap="selectCar"
wx:for="{{senceData}}" wx:for="{{senceData}}"
wx:key="name" wx:key="name">
>
<view class="item"> <view class="item">
<image class="img" src="{{item.src}}" /> <image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
...@@ -45,35 +42,30 @@ ...@@ -45,35 +42,30 @@
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<product <product
stickyTop="{{headerHeight}}" stickyTop="{{headerHeight}}"
actNum="{{actNum}}" actNum="{{actNum}}"
senceData="{{senceData}}" senceData="{{senceData}}"
origin="home" origin="home"
bindsharehandle="sharehandle" bindsharehandle="sharehandle" />
/>
</view> </view>
<!-- 看线索内容 --> <!-- 看线索内容 -->
<view <view
class="clue" class="clue"
wx:if="{{tabIndx == 0 }}" wx:if="{{tabIndx == 0 }}"
hover-class="none" hover-class="none"
hover-stop-propagation="false" hover-stop-propagation="false">
>
<view class="types"> <view class="types">
<view <view
class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}" class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}"
wx:for="{{typeList}}" wx:for="{{typeList}}"
wx:key="*this" wx:key="*this"
data-index="{{index}}" data-index="{{index}}"
bindtap="filterTypeFn" bindtap="filterTypeFn">
>
{{item[item['selectIndex']] }} {{item[item['selectIndex']] }}
<image class="point" wx:if="{{index != 3}}" src="{{IMG_URL}}index/point.png" /> <image class="point" wx:if="{{index != 3}}" src="{{item['selectIndex']!=2&&index != 3? IMAGES.actArrow : IMAGES.arrow}}" />
</view> </view>
</view> </view>
<view class="list" hover-class="none" hover-stop-propagation="false"> <view class="list" hover-class="none" hover-stop-propagation="false">
...@@ -93,8 +85,7 @@ ...@@ -93,8 +85,7 @@
wx:for="{{item.visitList}}" wx:for="{{item.visitList}}"
wx:key="id" wx:key="id"
wx:for-index="idx" wx:for-index="idx"
wx:for-item="itemName" wx:for-item="itemName">
>
<view class="shop-record"> <view class="shop-record">
<view class="shop-action-wrap"> <view class="shop-action-wrap">
<view class="action-wrap"> <view class="action-wrap">
...@@ -102,15 +93,13 @@ ...@@ -102,15 +93,13 @@
class="action" class="action"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">访问页面:
>访问页面:
</view> </view>
<view <view
class="detail" class="detail"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">
>
{{itemName.productDesc}} {{itemName.productDesc}}
</view> </view>
</view> </view>
...@@ -118,8 +107,7 @@ ...@@ -118,8 +107,7 @@
class="time" class="time"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">
>
{{itemName.clueDate}} {{itemName.clueDate}}
</view> </view>
</view> </view>
...@@ -136,14 +124,12 @@ ...@@ -136,14 +124,12 @@
class="phone-img" class="phone-img"
data-phone="{{item.phone}}" data-phone="{{item.phone}}"
bindtap="phoneCallFn" bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" src="{{IMG_URL}}index/phone.png" />
/>
<image <image
class="copy" class="copy"
data-phone="{{item.phone}}" data-phone="{{item.phone}}"
bindtap="setCopyDataFn" bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" src="{{IMG_URL}}index/copy.png" />
/>
</view> </view>
</view> </view>
<view <view
...@@ -152,8 +138,7 @@ ...@@ -152,8 +138,7 @@
hover-stop-propagation="false" hover-stop-propagation="false"
data-type="active" data-type="active"
data-item="{{item}}" data-item="{{item}}"
bindtap="gotoApply" bindtap="gotoApply">
>
开通活动 开通活动
</view> </view>
</view> </view>
...@@ -167,8 +152,7 @@ ...@@ -167,8 +152,7 @@
data-type="like" data-type="like"
data-outidx="{{index}}" data-outidx="{{index}}"
data-item="{{item}}" data-item="{{item}}"
bindtap="showToast" bindtap="showToast" />
/>
<image <image
class="like" class="like"
wx:if="{{item.clueType == 1 && item.starTag == 0}}" wx:if="{{item.clueType == 1 && item.starTag == 0}}"
...@@ -176,8 +160,7 @@ ...@@ -176,8 +160,7 @@
data-type="dislike" data-type="dislike"
data-outidx="{{index}}" data-outidx="{{index}}"
data-item="{{item}}" data-item="{{item}}"
bindtap="showToast" bindtap="showToast" />
/>
<view class="name" hover-class="none" hover-stop-propagation="false"> <view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}} {{item.nickName}}
<image class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" /> <image class="avatar" src="{{IMG_URL}}index/avatar.png" wx:if="{{item.clueType != 3}}" />
...@@ -189,22 +172,19 @@ ...@@ -189,22 +172,19 @@
wx:for="{{item.visitList}}" wx:for="{{item.visitList}}"
wx:key="id" wx:key="id"
wx:for-index="idx" wx:for-index="idx"
wx:for-item="itemName" wx:for-item="itemName">
>
<view class="action-wrap"> <view class="action-wrap">
<view <view
class="action" class="action"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">访问页面:
>访问页面:
</view> </view>
<view <view
class="detail" class="detail"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">
>
{{itemName.productDesc}} {{itemName.productDesc}}
</view> </view>
</view> </view>
...@@ -212,8 +192,7 @@ ...@@ -212,8 +192,7 @@
class="time" class="time"
selectable="false" selectable="false"
space="false" space="false"
decode="false" decode="false">
>
{{itemName.clueDate}} {{itemName.clueDate}}
</view> </view>
</view> </view>
...@@ -224,30 +203,26 @@ ...@@ -224,30 +203,26 @@
hover-class="none" hover-class="none"
hover-stop-propagation="false" hover-stop-propagation="false"
data-outidx="{{index}}" data-outidx="{{index}}"
bindtap="getMore" bindtap="getMore">
>
{{ item.getMoreFlag ?'更多数据':'收起数据'}} {{ item.getMoreFlag ?'更多数据':'收起数据'}}
</view> </view>
<view <view
class="info" class="info"
hover-class="none" hover-class="none"
hover-stop-propagation="false" hover-stop-propagation="false"
wx:if="{{item.phone}}" wx:if="{{item.phone}}">
>
<view class="phone-wrap"> <view class="phone-wrap">
<view class="phone">{{item.phone}}</view> <view class="phone">{{item.phone}}</view>
<image <image
class="phone-img" class="phone-img"
data-phone="{{item.phone}}" data-phone="{{item.phone}}"
bindtap="phoneCallFn" bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" src="{{IMG_URL}}index/phone.png" />
/>
<image <image
class="copy" class="copy"
data-phone="{{item.phone}}" data-phone="{{item.phone}}"
bindtap="setCopyDataFn" bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" src="{{IMG_URL}}index/copy.png" />
/>
</view> </view>
<view <view
class="btn" class="btn"
...@@ -256,8 +231,7 @@ ...@@ -256,8 +231,7 @@
data-type="shop" data-type="shop"
bindtap="gotoApply" bindtap="gotoApply"
data-item="{{item}}" data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}" wx:if="{{item.applyStatus == 0}}">
>
+开店面 +开店面
</view> </view>
</view> </view>
...@@ -278,8 +252,7 @@ ...@@ -278,8 +252,7 @@
webp webp
bindtap="guideFn" bindtap="guideFn"
class="guide-img" class="guide-img"
src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" />
/>
</view> </view>
<!-- 在线客服 --> <!-- 在线客服 -->
<image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" /> <image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" />
...@@ -288,8 +261,7 @@ ...@@ -288,8 +261,7 @@
class="output-value" class="output-value"
bindtap="showCalculate" bindtap="showCalculate"
src="{{IMG_URL}}index/valuation.png" src="{{IMG_URL}}index/valuation.png"
wx:if="{{tabIndx == 1}}" wx:if="{{tabIndx == 1}}" />
/>
<!-- 预估产值弹框 --> <!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}"> <view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box"> <view class="dialog-box">
...@@ -310,8 +282,7 @@ ...@@ -310,8 +282,7 @@
maxlength="8" maxlength="8"
name="sales" name="sales"
value="{{formData.sales}}" value="{{formData.sales}}"
type="number" type="number" />
/>
<!-- <view class="form-unit">台</view> --> <!-- <view class="form-unit">台</view> -->
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -322,8 +293,7 @@ ...@@ -322,8 +293,7 @@
maxlength="8" maxlength="8"
name="flow" name="flow"
type="number" type="number"
value="{{formData.flow}}" value="{{formData.flow}}" />
/>
<!-- <view class="form-unit">人</view> --> <!-- <view class="form-unit">人</view> -->
</view> </view>
<button class="dialog-btn" form-type="submit">提交测算</button> <button class="dialog-btn" form-type="submit">提交测算</button>
......
...@@ -21,9 +21,25 @@ class NetWork { ...@@ -21,9 +21,25 @@ class NetWork {
}) })
} else { } else {
if (this[ISCOMMECTED]) { if (this[ISCOMMECTED]) {
const thisPage = wx.$router.getPageInstance(),
options = Object.keys(thisPage.options)
this[ISCOMMECTED] = false this[ISCOMMECTED] = false
if (thisPage.noPageAuth) {
wx.showLoading() wx.showLoading()
this.refreshPage() this.refreshPage()
} else {
let url = `/${thisPage.route}`
if (options.length) {
let query = []
options.map(key => {
query.push(`${key}=${thisPage.options[key]}`)
})
url += `?${query.join('&')}`
}
wx.$router.redirectTo('login.loading', {
url
})
}
} }
} }
}) })
......
...@@ -115,7 +115,7 @@ class Share { ...@@ -115,7 +115,7 @@ class Share {
WXUSERINFO, WXUSERINFO,
USERINFO USERINFO
} = this.getCommonData(), } = this.getCommonData(),
thisPage = wx.$router.getPageInstance() thisPage = wx.$router.getPageInstance().options
query = `${query? `?${query}&`:'?'}merchantId=${thisPage.merchantId ||USERINFO.merchantId || ''}&shareOpenId=${thisPage.shareOpenId || WXUSERINFO.openId || ''}&sharePhone=${thisPage.sharePhone || USERINFO.phone || ''}` query = `${query? `?${query}&`:'?'}merchantId=${thisPage.merchantId ||USERINFO.merchantId || ''}&shareOpenId=${thisPage.shareOpenId || WXUSERINFO.openId || ''}&sharePhone=${thisPage.sharePhone || USERINFO.phone || ''}`
return query return query
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!