parent
edabd0c29f
commit
3746fe27bb
|
|
@ -8,23 +8,23 @@
|
||||||
<view class='recommendList acea-row row-between-wrapper'>
|
<view class='recommendList acea-row row-between-wrapper'>
|
||||||
<view class='item' v-for="(item,index) in hostProduct" :key="index" hover-class='none' @tap="goDetail(item)">
|
<view class='item' v-for="(item,index) in hostProduct" :key="index" hover-class='none' @tap="goDetail(item)">
|
||||||
<view class='pictrue'>
|
<view class='pictrue'>
|
||||||
<image :src='item.image'></image>
|
<image :src='item.picUrl'></image>
|
||||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityList && item.activityList[0] && item.activityList[0].type === 1">秒杀</span>
|
||||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityList && item.activityList[0] && item.activityList[0].type === 2">砍价</span>
|
||||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityList && item.activityList[0] && item.activityList[0].type === 3">拼团</span>
|
||||||
</view>
|
</view>
|
||||||
<view class='name line1'>{{item.storeName}}</view>
|
<view class='name line1'>{{ item.name }}</view>
|
||||||
<view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
|
<view class='money font-color'>¥<text class='num'>{{ item.price }}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import { goShopDetail } from '@/libs/order.js'
|
import { goShopDetail } from '@/libs/order.js'
|
||||||
export default {
|
export default {
|
||||||
computed: mapGetters(['uid']),
|
computed: mapGetters(['uid']),
|
||||||
props: {
|
props: {
|
||||||
hostProduct: {
|
hostProduct: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|
@ -33,15 +33,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
goDetail(item){
|
goDetail(item){
|
||||||
goShopDetail(item,this.uid).then(res=>{
|
goShopDetail(item,this.uid).then(() => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/goods_details/index?id=${item.id}`
|
url:`/pages/goods_details/index?id=${item.id}`
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,24 @@ import {
|
||||||
} from '@/api/order.js';
|
} from '@/api/order.js';
|
||||||
import util from 'utils/util'
|
import util from 'utils/util'
|
||||||
|
|
||||||
|
// TODO 芋艿:需要调整位置
|
||||||
/**
|
/**
|
||||||
* 去商品详情
|
* 去商品详情
|
||||||
*/
|
*/
|
||||||
export function goShopDetail(item, uid) {
|
export function goShopDetail(item, uid) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (item.activityH5 && item.activityH5.type === "1") {
|
const activityH5 = item.activityList && item.activityList[0] ? item.activityList[0] : null;
|
||||||
|
if (activityH5 && activityH5.type === 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
|
url: `/pages/activity/goods_seckill_details/index?id=${activityH5.id}`
|
||||||
})
|
})
|
||||||
} else if (item.activityH5 && item.activityH5.type === "2") {
|
} else if (activityH5 && activityH5.type === 2) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&startBargainUid=${uid}`
|
url: `/pages/activity/goods_bargain_details/index?id=${activityH5.id}&startBargainUid=${uid}`
|
||||||
})
|
})
|
||||||
} else if (item.activityH5 && item.activityH5.type === "3") {
|
} else if (activityH5 && activityH5.type === 3) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
|
url: `/pages/activity/goods_combination_details/index?id=${activityH5.id}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(item);
|
resolve(item);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue