Commit e72a06f9 by zhangquan

提交细节提测

1 parent c86ac337
...@@ -12,7 +12,8 @@ Page({ ...@@ -12,7 +12,8 @@ Page({
navStyle, navStyle,
headerHeight: 0, headerHeight: 0,
senceData, senceData,
actNum: 3, actNum: 0,
activeNavIdx: 0,
// 模态框 // 模态框
isShow: true, isShow: true,
...@@ -34,23 +35,23 @@ Page({ ...@@ -34,23 +35,23 @@ Page({
], ],
posterUrl: "", //海报url posterUrl: "", //海报url
}, },
observers: { // observers: {
actNum: function (actNum) { // actNum: function (actNum) {
let imgList = [ // let imgList = [
`${IMGURL}index/scene${actNum + 1}1.png`, // `${IMGURL}index/scene${actNum + 1}1.png`,
`${IMGURL}index/scene${actNum + 1}2.png`, // `${IMGURL}index/scene${actNum + 1}2.png`,
`${IMGURL}index/scene${actNum + 1}3.png`, // `${IMGURL}index/scene${actNum + 1}3.png`,
`${IMGURL}index/scene${actNum + 1}4.png`, // `${IMGURL}index/scene${actNum + 1}4.png`,
`${IMGURL}index/scene${actNum + 1}5.png`, // `${IMGURL}index/scene${actNum + 1}5.png`,
]; // ];
if (actNum != 2) { // if (actNum != 2) {
imgList.push(`${IMGURL}index/scene${actNum + 1}6.png`); // imgList.push(`${IMGURL}index/scene${actNum + 1}6.png`);
} // }
this.setData({ // this.setData({
imgList, // imgList,
}); // });
}, // },
}, // },
navbarReady(e) { navbarReady(e) {
let { let {
height height
...@@ -98,7 +99,7 @@ Page({ ...@@ -98,7 +99,7 @@ Page({
filePath: this.data.posterUrl, //仅为示例,并非真实的资源 filePath: this.data.posterUrl, //仅为示例,并非真实的资源
success (res) { success (res) {
console.log('res: ', res); console.log('res: ', res);
wx.$api.showToast('图片下载成功!') wx.$api.showToast('下载成功!')
} }
}) })
} }
...@@ -116,8 +117,13 @@ Page({ ...@@ -116,8 +117,13 @@ Page({
imgHeight: (event.detail.height * 0.2).toFixed(0), imgHeight: (event.detail.height * 0.2).toFixed(0),
}); });
}, },
onRouter(options) { onRoute(options) {
console.log("options: ", options); console.log("options: ", options);
let { actNum,activeNavIdx } = options
this.setData({
actNum,
activeNavIdx
})
}, },
...@@ -145,6 +151,7 @@ Page({ ...@@ -145,6 +151,7 @@ Page({
width: imgW, width: imgW,
height: imgH height: imgH
}); });
let arr = [456,222,0,496]
let imgList = [ let imgList = [
{ {
x: 0, x: 0,
...@@ -155,7 +162,7 @@ Page({ ...@@ -155,7 +162,7 @@ Page({
}, },
{ {
x:imgW-64, x:imgW-64,
y: imgH-496-64, y: imgH-arr[actNum]-64,
width: 64, width: 64,
height: 64, height: 64,
url: response, //二维码 url: response, //二维码
......
...@@ -2,8 +2,5 @@ ...@@ -2,8 +2,5 @@
"usingComponents": { "usingComponents": {
"product": "../tab/discovery/components/product/product" "product": "../tab/discovery/components/product/product"
}, },
"navigationBarTitleText": "特色产品", "navigationBarTitleText": "特色产品"
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</view> --> </view> -->
<product actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{true}}"/> <product actNum="{{actNum}}" navIdx="{{activeNavIdx}}" senceData="{{senceData}}" isShare="{{true}}"/>
<!-- 分享弹框 --> <!-- 分享弹框 -->
<view class="share-wrap" wx:if="{{isShow}}"> <view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap" wx:if="{{posterUrl}}"> <view class="img-wrap" wx:if="{{posterUrl}}">
......
...@@ -7,6 +7,7 @@ Component({ ...@@ -7,6 +7,7 @@ Component({
headerHeight: Number, headerHeight: Number,
senceData:Object, senceData:Object,
actNum: Number, actNum: Number,
navIdx: Number,
isShare:{ isShare:{
type: Boolean, type: Boolean,
value: false value: false
...@@ -60,7 +61,7 @@ Component({ ...@@ -60,7 +61,7 @@ Component({
this.setData({ this.setData({
navList, navList,
intoViewId: `to-0`, intoViewId: `to-0`,
activeNavIdx: 0, activeNavIdx:this.data.isShare ? this.data.navIdx : 0,
tab tab
}) })
this.getImgHeight(); this.getImgHeight();
...@@ -114,7 +115,7 @@ Component({ ...@@ -114,7 +115,7 @@ Component({
}) })
.exec(); .exec();
}, },
onShareFn() { toSharePage() {
let { actNum, activeNavIdx ,senceData} = this.data; let { actNum, activeNavIdx ,senceData} = this.data;
wx.$router.go("checkProduct", { actNum, activeNavIdx ,senceData}); wx.$router.go("checkProduct", { actNum, activeNavIdx ,senceData});
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<text class="big-title">特色产品</text> <text class="big-title">特色产品</text>
<scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="nav-wrap" scroll-x="{{true}}"> <scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="nav-wrap" scroll-x="{{true}}">
<block wx:for="{{senceData[actNum].productList}}" wx:key="index"> <block wx:for="{{senceData[actNum].productList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item.proName}}</text> <text wx:if="{{!isShare || activeNavIdx==index}}" class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item.proName}}</text>
</block> </block>
</scroll-view> </scroll-view>
<view class="prod-item"> <view class="prod-item">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</text> </text>
</view> </view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn"> <view class="share-btn" wx:if="{{!isShare}}" bindtap="toSharePage">
<image class="icon" src="{{IMGURL}}share.png"></image> <image class="icon" src="{{IMGURL}}share.png"></image>
<text>分享</text> <text>分享</text>
</view> </view>
......
...@@ -9,8 +9,7 @@ var senceData = [ ...@@ -9,8 +9,7 @@ var senceData = [
img: 'product-img1', img: 'product-img1',
proName: '数字无忧权益卡', proName: '数字无忧权益卡',
price: '1500', price: '1500',
// profit: '92.4万', profit: '1200000',
profit: '120万',
type: 'service', type: 'service',
productType: 'benefitCard', productType: 'benefitCard',
path: 'equity', path: 'equity',
...@@ -51,7 +50,7 @@ var senceData = [ ...@@ -51,7 +50,7 @@ var senceData = [
img: 'product-img2', img: 'product-img2',
proName: '汽车太阳膜', proName: '汽车太阳膜',
price: '1500', price: '1500',
profit: '1008万', profit: '10080000',
type: 'membrane', type: 'membrane',
productType: 'sunMembrane', productType: 'sunMembrane',
path: 'solarFilm', path: 'solarFilm',
...@@ -77,7 +76,7 @@ var senceData = [ ...@@ -77,7 +76,7 @@ var senceData = [
img: 'product-img3', img: 'product-img3',
proName: '漆面保护膜', proName: '漆面保护膜',
price: '12000', price: '12000',
profit: '216万', profit: '2160000',
type: 'membrane', type: 'membrane',
productType: 'protectMembrane', productType: 'protectMembrane',
path: 'paintProtect', path: 'paintProtect',
...@@ -88,7 +87,7 @@ var senceData = [ ...@@ -88,7 +87,7 @@ var senceData = [
img: 'product-img4', img: 'product-img4',
proName: '改色膜', proName: '改色膜',
price: '5000', price: '5000',
profit: '30万', profit: '30000000',
type: 'membrane', type: 'membrane',
productType: 'colorMembrane', productType: 'colorMembrane',
path: 'changingFilm', path: 'changingFilm',
...@@ -107,7 +106,7 @@ var senceData = [ ...@@ -107,7 +106,7 @@ var senceData = [
img: 'product-img5', img: 'product-img5',
proName: '数字化美容', proName: '数字化美容',
price: '300', price: '300',
profit: '36万', profit: '360000',
type: 'beauty', type: 'beauty',
productType: 'digitBeauty', productType: 'digitBeauty',
path: 'carBeauty', path: 'carBeauty',
...@@ -118,7 +117,7 @@ var senceData = [ ...@@ -118,7 +117,7 @@ var senceData = [
img: 'product-img6', img: 'product-img6',
proName: '座椅通风', proName: '座椅通风',
price: '1500', price: '1500',
profit: '1008万', profit: '10080000',
type: 'light', type: 'light',
productType: 'chair', productType: 'chair',
path: 'seatVentilate', path: 'seatVentilate',
...@@ -129,7 +128,7 @@ var senceData = [ ...@@ -129,7 +128,7 @@ var senceData = [
img: 'product-img7', img: 'product-img7',
proName: 'AR导航', proName: 'AR导航',
price: '1680', price: '1680',
profit: '22.68万', profit: '226800',
type: 'light', type: 'light',
productType: 'ar', productType: 'ar',
path: 'arNavigation', path: 'arNavigation',
...@@ -140,7 +139,7 @@ var senceData = [ ...@@ -140,7 +139,7 @@ var senceData = [
img: 'product-img8', img: 'product-img8',
proName: '氛围灯', proName: '氛围灯',
price: '2680', price: '2680',
profit: '36.18万', profit: '361800',
type: 'light', type: 'light',
productType: 'lamp', productType: 'lamp',
path: 'ambientLighting', path: 'ambientLighting',
...@@ -151,7 +150,7 @@ var senceData = [ ...@@ -151,7 +150,7 @@ var senceData = [
img: 'product-img9', img: 'product-img9',
proName: '360全景导航', proName: '360全景导航',
price: '2880', price: '2880',
profit: '38.88万', profit: '388800',
type: 'service', type: 'service',
productType: 'navigation', productType: 'navigation',
path: 'navigationArround', path: 'navigationArround',
......
...@@ -234,7 +234,7 @@ Page({ ...@@ -234,7 +234,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 > 6) { if (profit.length > 9) {
return (profit / 10000).toFixed(0) + "万"; return (profit / 10000).toFixed(0) + "万";
} else { } else {
return profit; return profit;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!