123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view class="page">
- <view class="uni-product-list">
- <view class="uni-product" v-for="(product,index) in productList" :key="index" @click="goshop(product)">
- <view class="image-view">
- <image class="uni-product-image" :src="pictureUrl+'/uploads/home/store/goods/' + product.goods_image.substr(0, product.goods_image.indexOf('\_')) + '/' + product.goods_image "></image>
- </view>
- <view class="uni-product-title textover">{{product.goods_name}}</view>
- <view class="uni-product-price">
- <text class="uni-product-price-original">¥{{product.goods_marketprice}}</text>
- <text class="uni-product-price-favour">¥{{product.goods_costprice}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- productList: {
- type: Array
- }
- },
- data() {
- return {
- title: 'product-list',
- renderImage: false,
- pictureUrl: this.pictureUrl
- };
- },
- methods: {
- goshop(e) {
- console.log(e)
- let id = e.goods_commonid;
- let store_id = e.store_id;
- uni.navigateTo({
- url:`/pages/index/shop?id=${id}&store_id=${store_id}`
- })
- }
- },
- onLoad() {
-
- },
- onPullDownRefresh() {
-
- },
- onReachBottom() {
-
- }
- };
- </script>
- <style>
- .textover {
- overflow: hidden;
- text-overflow:ellipsis;
- white-space: nowrap;
- }
- </style>
|