Commit 758958b8 authored by ziyu's avatar ziyu

feat: 商品列表

parent fcaabcd5
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
previous-margin="140rpx" previous-margin="140rpx"
next-margin="120rpx" next-margin="120rpx"
catch:touchmove catch:touchmove
bindanimationfinish="swipermoveDone"
> >
<!--bindtouchstart="touchStart" <!--bindtouchstart="touchStart"
bindtouchend="touchEnd"--> bindtouchend="touchEnd"-->
...@@ -19,8 +20,6 @@ ...@@ -19,8 +20,6 @@
bindtap="toViewPage" bindtap="toViewPage"
data-item="{{item}}" data-item="{{item}}"
class="list-item {{item.select?'delete':''}} {{tools.computClass(currentIndex,index,list.length,circular)}}" class="list-item {{item.select?'delete':''}} {{tools.computClass(currentIndex,index,list.length,circular)}}"
bindtouchstart="touchStart"
bindtouchend="touchEnd"
> >
<image src="{{item.imgsrc}}" class="img"></image> <image src="{{item.imgsrc}}" class="img"></image>
<view class="text">{{item.text}}</view> <view class="text">{{item.text}}</view>
...@@ -59,12 +58,12 @@ ...@@ -59,12 +58,12 @@
}, },
created() { created() {
// 获取推荐的商品列表 // 获取推荐的商品列表
this.list = [{value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: '100004549235'}, this.list = [{value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: 'https://u.jd.com/EToRju'},
{value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: '100004549235'}, {value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: 'https://u.jd.com/EToRju'},
{value: 13, text: '白色条纹马克杯,马克吐温同款13', imgsrc: '/static/images/peo1.jpg', price: '¥39.08', people: 2200, sku: '100004549235'}, {value: 13, text: '白色条纹马克杯,马克吐温同款13', imgsrc: '/static/images/peo1.jpg', price: '¥39.08', people: 2200, sku: 'https://u.jd.com/EToRju'},
{value: 14, text: '白色条纹马克杯,马克吐温同款14', imgsrc: '/static/images/peo2.jpg', price: '¥599.20', people: 2200, sku: '100004549235'}, {value: 14, text: '白色条纹马克杯,马克吐温同款14', imgsrc: '/static/images/peo2.jpg', price: '¥599.20', people: 2200, sku: 'https://u.jd.com/EToRju'},
{value: 15, text: '白色条纹马克杯,马克吐温同款15', imgsrc: '/static/images/peo3.jpg', price: '¥2399.01', people: 2200, sku: '100004549235'}, {value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: '100004549235'}, {value: 15, text: '白色条纹马克杯,马克吐温同款15', imgsrc: '/static/images/peo3.jpg', price: '¥2399.01', people: 2200, sku: 'https://union-click.jd.com/jdc?e=&p=AyIGZRtdFQMRB1IcWREyFw9cHlgcBRUOUBJrUV1KWQorAlBHU0VeBUVOWk1RAk8ECllHGAdFBwtaV1MJBAJQXk8JF0EfGQcaDlAYUhIFGwJcDBsZdXtdBm8oQF5lBT1IL2YCRXAKeCh1ZnlFIkM%2FRXtxVVNsOXVSZnM1HCxNYnFzMW9dYkp2YiJCDlRhYG8NbBJAXWV%2BMX8vXFdFYB18JHV2YkUCTTBecRNvU20iQHRyYyZFLWd2cmQ2bAd1e0t1NUIJHWIQZzB4Am0FZU8xfi9mV1Z%2FLEk5YnFHRSFECXZ7cGdBGS4lfWpAVBsnVAFxfgV%2FOxRyQQ4ReC1IRB4LZRprFQMTBFwZXhcAFjdlG1wlQ3wHVBtaFwEbBmUaaxUGGgRWElIUAxIAVx5rEgIbNw5ONRMFGwZcS14UUkEFAhxrJTIRN2UrWxYyETcXdVoXChMBUxILRwsVAVBMWRJSE1BSSw5GUkcOURxbQFBFN1caWhEL'}, {value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: 'https://union-click.jd.com/jdc?e=&p=AyIGZRtdFQMRB1IcWREyFw9cHlgcBRUOUBJrUV1KWQorAlBHU0VeBUVOWk1RAk8ECllHGAdFBwtaV1MJBAJQXk8JF0EfGQcaDlAYUhIFGwJcDBsZdXtdBm8oQF5lBT1IL2YCRXAKeCh1ZnlFIkM%2FRXtxVVNsOXVSZnM1HCxNYnFzMW9dYkp2YiJCDlRhYG8NbBJAXWV%2BMX8vXFdFYB18JHV2YkUCTTBecRNvU20iQHRyYyZFLWd2cmQ2bAd1e0t1NUIJHWIQZzB4Am0FZU8xfi9mV1Z%2FLEk5YnFHRSFECXZ7cGdBGS4lfWpAVBsnVAFxfgV%2FOxRyQQ4ReC1IRB4LZRprFQMTBFwZXhcAFjdlG1wlQ3wHVBtaFwEbBmUaaxUGGgRWElIUAxIAVx5rEgIbNw5ONRMFGwZcS14UUkEFAhxrJTIRN2UrWxYyETcXdVoXChMBUxILRwsVAVBMWRJSE1BSSw5GUkcOURxbQFBFN1caWhEL'},
{value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: '100004549235'} {value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: 'https://union-click.jd.com/jdc?e=&p=AyIGZRtdFQMRB1IcWREyFw9cHlgcBRUOUBJrUV1KWQorAlBHU0VeBUVOWk1RAk8ECllHGAdFBwtaV1MJBAJQXk8JF0EfGQcaDlAYUhIFGwJcDBsZdXtdBm8oQF5lBT1IL2YCRXAKeCh1ZnlFIkM%2FRXtxVVNsOXVSZnM1HCxNYnFzMW9dYkp2YiJCDlRhYG8NbBJAXWV%2BMX8vXFdFYB18JHV2YkUCTTBecRNvU20iQHRyYyZFLWd2cmQ2bAd1e0t1NUIJHWIQZzB4Am0FZU8xfi9mV1Z%2FLEk5YnFHRSFECXZ7cGdBGS4lfWpAVBsnVAFxfgV%2FOxRyQQ4ReC1IRB4LZRprFQMTBFwZXhcAFjdlG1wlQ3wHVBtaFwEbBmUaaxUGGgRWElIUAxIAVx5rEgIbNw5ONRMFGwZcS14UUkEFAhxrJTIRN2UrWxYyETcXdVoXChMBUxILRwsVAVBMWRJSE1BSSw5GUkcOURxbQFBFN1caWhEL'}
]; ];
}, },
methods: { methods: {
...@@ -126,7 +125,8 @@ ...@@ -126,7 +125,8 @@
let item = e.$wx.currentTarget.dataset.item; let item = e.$wx.currentTarget.dataset.item;
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', appId: 'wx91d27dbf599dff74',
path: 'pages/item/detail/detail?sku=' + item.sku, // 跳转小程序的路径 path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(item.sku), // 跳转小程序的路径
// path:'pages/order/list/list',
// 有效值 develop(开发版),trial(体验版),release(正式版) // 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release', envVersion: 'release',
success(res) { success(res) {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
z-index: 9; z-index: 10;
// animation: menuEnter .3s linear forwards; // animation: menuEnter .3s linear forwards;
.popup-wrapper { .popup-wrapper {
display: flex; display: flex;
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<shared-popup v-if="showModal === 1" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"/> <shared-popup v-if="showModal === 1" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"/>
<popup @showMenu="showMenu" :showMenus="showModal === 3"/> <popup @showMenu="showMenu" :showMenus="showModal === 3"/>
<!--商品推荐列表--> <!--商品推荐列表-->
<!--<goods-list></goods-list>--> <goods-list></goods-list>
<van-dialog id="van-dialog"/> <van-dialog id="van-dialog"/>
<van-notify id="van-notify"/> <van-notify id="van-notify"/>
<van-popup show="{{ cornModal }}" bind:close="cornModalClose" custom-style="background-color:transparent"> <van-popup show="{{ cornModal }}" bind:close="cornModalClose" custom-style="background-color:transparent">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment