|
@@ -4,21 +4,20 @@
|
|
<view class="one">
|
|
<view class="one">
|
|
<view class="one_1" v-if="barActive=='0'">
|
|
<view class="one_1" v-if="barActive=='0'">
|
|
<view class="first">
|
|
<view class="first">
|
|
- <image class="image" :src="oneUrl" mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="info.logo&&info.logo.length>0?info.logo[0].url:''" mode=""></image>
|
|
</view>
|
|
</view>
|
|
<view class="second">
|
|
<view class="second">
|
|
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
- <view class="list" v-for="(item,index) in shoplist" :key="index"
|
|
|
|
- @tap="toCommon('pagesHome/order/detail')">
|
|
|
|
- <image class="image" :src="item.url" mode=""></image>
|
|
|
|
|
|
+ <view class="list" v-for="(item,index) in shoplist" :key="index" @tap="toBuy(item)">
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
<view class="name">
|
|
<view class="name">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
<view class="other">
|
|
<view class="other">
|
|
<view class="money">
|
|
<view class="money">
|
|
<text>¥</text>
|
|
<text>¥</text>
|
|
- <text>{{item.money}}</text>
|
|
|
|
|
|
+ <text>{{item.sell_money}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="btn">
|
|
<view class="btn">
|
|
<button type="default" size="mini">购买</button>
|
|
<button type="default" size="mini">购买</button>
|
|
@@ -29,38 +28,7 @@
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="one_2" v-else-if="barActive=='1'">
|
|
|
|
- <view class="first_1">
|
|
|
|
- <scroll-view scroll-y="true" class="scroll-view">
|
|
|
|
- <view class="list-scroll-view">
|
|
|
|
- <view class="list" :class="[active==index?'listActive':'']"
|
|
|
|
- v-for="(item,index) in typeList" :key="index" @tap="toChange(index,item)">
|
|
|
|
- <text>{{item.label}}</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </scroll-view>
|
|
|
|
- </view>
|
|
|
|
- <view class="first_2">
|
|
|
|
- <scroll-view scroll-y="true" class="scroll-view">
|
|
|
|
- <view class="list-scroll-view">
|
|
|
|
- <view class="list" v-for="(item,index) in list" :key="index">
|
|
|
|
- <view class="title">
|
|
|
|
- {{item.label}}
|
|
|
|
- </view>
|
|
|
|
- <view class="market">
|
|
|
|
- <view class="marketList" v-for="(tag,indexs) in item.children" :key="indexs">
|
|
|
|
- <image class="image" :src="tag.url" mode=""></image>
|
|
|
|
- <view class="name">
|
|
|
|
- {{tag.label}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </scroll-view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="one_3" v-else-if="barActive=='2'">
|
|
|
|
|
|
+ <view class="one_3" v-else-if="barActive=='1'">
|
|
<view class="first">
|
|
<view class="first">
|
|
<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品">
|
|
<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品">
|
|
</view>
|
|
</view>
|
|
@@ -68,20 +36,17 @@
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="second_1">
|
|
<view class="second_1">
|
|
- <view :class="['list',condActive==index?'activeList':'']"
|
|
|
|
- v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
|
|
|
|
+ <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
<view class="name">
|
|
<view class="name">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
<view class="icon">
|
|
<view class="icon">
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
|
- v-if="condActive==index&&shang==true"></text>
|
|
|
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang==true"></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
</view>
|
|
</view>
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont', item.xiaActive]"
|
|
|
|
- v-if="condActive==index&&xia==true"></text>
|
|
|
|
|
|
+ <text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia==true"></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -89,8 +54,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="second_2">
|
|
<view class="second_2">
|
|
<view class="list" v-for="(item,index) in allList" :key="index">
|
|
<view class="list" v-for="(item,index) in allList" :key="index">
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
|
|
|
|
- mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
<view class="sale" v-if="item.is_sale==true">
|
|
<view class="sale" v-if="item.is_sale==true">
|
|
<text>已售尽</text>
|
|
<text>已售尽</text>
|
|
</view>
|
|
</view>
|
|
@@ -113,29 +77,29 @@
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="one_4" v-else-if="barActive=='3'">
|
|
|
|
|
|
+ <view class="one_4" v-else-if="barActive=='2'">
|
|
<view class="first">
|
|
<view class="first">
|
|
- <image class="image" :src="info.url" mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="info.logo&&info.logo.length>0?info.logo[0].url:''" mode=""></image>
|
|
<view class="name">{{info.name}}</view>
|
|
<view class="name">{{info.name}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="second">
|
|
<view class="second">
|
|
<view class="second_1">
|
|
<view class="second_1">
|
|
<view class="grade">
|
|
<view class="grade">
|
|
- <view>{{info.grade||'5'}}</view>
|
|
|
|
|
|
+ <view>{{info.goods_score||0}}</view>
|
|
商品
|
|
商品
|
|
</view>
|
|
</view>
|
|
<view class="grade">
|
|
<view class="grade">
|
|
- <view>{{info.grade||'5'}}</view>
|
|
|
|
|
|
+ <view>{{info.send_score||0}}</view>
|
|
发货
|
|
发货
|
|
</view>
|
|
</view>
|
|
<view class="grade">
|
|
<view class="grade">
|
|
- <view>{{info.grade||'5'}}</view>
|
|
|
|
|
|
+ <view>{{info.service_score||0}}</view>
|
|
服务
|
|
服务
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="second_2">
|
|
<view class="second_2">
|
|
<view class="second_2_bor">
|
|
<view class="second_2_bor">
|
|
- <image class="image" :src="info.url" mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="info.logo&&info.logo.length>0?info.logo[0].url:''" mode=""></image>
|
|
</view>
|
|
</view>
|
|
<view class="txt">
|
|
<view class="txt">
|
|
店铺二维码
|
|
店铺二维码
|
|
@@ -166,179 +130,58 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ id: '',
|
|
barActive: '0',
|
|
barActive: '0',
|
|
barList: [ //底部菜单
|
|
barList: [ //底部菜单
|
|
{
|
|
{
|
|
icon: 'icon-shangdian',
|
|
icon: 'icon-shangdian',
|
|
acticon: "icon-shangdian-copy",
|
|
acticon: "icon-shangdian-copy",
|
|
name: '微店首页'
|
|
name: '微店首页'
|
|
- }, {
|
|
|
|
- icon: 'icon-fenlei',
|
|
|
|
- acticon: "icon-fenlei-copy",
|
|
|
|
- name: '商品分类'
|
|
|
|
- }, {
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
icon: 'icon-shangpinfenlei',
|
|
icon: 'icon-shangpinfenlei',
|
|
acticon: "icon-shangpinfenlei-copy",
|
|
acticon: "icon-shangpinfenlei-copy",
|
|
name: '全部商品'
|
|
name: '全部商品'
|
|
- }, {
|
|
|
|
|
|
+ },
|
|
|
|
+ {
|
|
icon: 'icon-qiyejianjie',
|
|
icon: 'icon-qiyejianjie',
|
|
acticon: "icon-qiyejianjie-copy",
|
|
acticon: "icon-qiyejianjie-copy",
|
|
name: '店铺简介'
|
|
name: '店铺简介'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- oneUrl: require('@/static/test.png'),
|
|
|
|
- info: {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '首农食品旗舰店',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- shoplist: [ //
|
|
|
|
- {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '商品名称',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '商品名称',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '商品名称',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '商品名称',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- url: require('@/static/test.png'),
|
|
|
|
- name: '商品名称',
|
|
|
|
- money: 100,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ // 店铺信息
|
|
|
|
+ info: {},
|
|
|
|
+ // 店铺部分商品
|
|
|
|
+ shoplist: [],
|
|
active: '0',
|
|
active: '0',
|
|
- typeList: [{
|
|
|
|
- label: '进口食品'
|
|
|
|
- },
|
|
|
|
|
|
+ typeList: [ //
|
|
{
|
|
{
|
|
- label: '品质生鲜'
|
|
|
|
- }, {
|
|
|
|
- label: '饮料冲调'
|
|
|
|
- }, {
|
|
|
|
- label: '居家用品'
|
|
|
|
|
|
+ label: '进口食品'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- list: [{
|
|
|
|
- label: '进口食品'
|
|
|
|
- },
|
|
|
|
|
|
+ list: [ //
|
|
{
|
|
{
|
|
- label: '品质生鲜'
|
|
|
|
- }, {
|
|
|
|
- label: '饮料冲调'
|
|
|
|
- }, {
|
|
|
|
- label: '居家用品'
|
|
|
|
|
|
+ label: '进口食品'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
// 收藏
|
|
// 收藏
|
|
collection: false,
|
|
collection: false,
|
|
searchInfo: {},
|
|
searchInfo: {},
|
|
- allList: [{
|
|
|
|
- "_id": "63353758101f3c01048c4f61",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929141236",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929141236.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929141236.png",
|
|
|
|
- "uid": 1664431956868,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "test",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }, {
|
|
|
|
- "_id": "63355854a4e39d34f499904a",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929163309",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163309.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163309.png",
|
|
|
|
- "uid": 1664440389135,
|
|
|
|
- "status": "success"
|
|
|
|
- }, {
|
|
|
|
- "id": "20220929163312",
|
|
|
|
- "name": "1469_ev_etc05a.jpg",
|
|
|
|
- "uri": "/files/point/goods/20220929163312.jpg",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163312.jpg",
|
|
|
|
- "uid": 1664440392548,
|
|
|
|
- "status": "success"
|
|
|
|
- }, {
|
|
|
|
- "id": "20220929163316",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163316.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163316.png",
|
|
|
|
- "uid": 1664440396001,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "商品2",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }, {
|
|
|
|
- "_id": "633558c1a4e39d34f4999073",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929163502",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163502.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163502.png",
|
|
|
|
- "uid": 1664440501843,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "商品3",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }, {
|
|
|
|
- "_id": "63355975a4e39d34f49990a1",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929163805",
|
|
|
|
- "name": "1469_ev_etc05a.jpg",
|
|
|
|
- "uri": "/files/point/goods/20220929163805.jpg",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163805.jpg",
|
|
|
|
- "uid": 1664440685351,
|
|
|
|
- "status": "success"
|
|
|
|
- }, {
|
|
|
|
- "id": "20220929163812",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163812.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163812.png",
|
|
|
|
- "uid": 1664440692196,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "商品4",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }, {
|
|
|
|
- "_id": "633559a7a4e39d34f49990a8",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929163900",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163900.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163900.png",
|
|
|
|
- "uid": 1664440739910,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "商品5",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }, {
|
|
|
|
- "_id": "633559dfa4e39d34f49990af",
|
|
|
|
- "file": [{
|
|
|
|
- "id": "20220929163955",
|
|
|
|
- "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
- "uri": "/files/point/goods/20220929163955.png",
|
|
|
|
- "url": "https://broadcast.waityou24.cn/files/point/goods/20220929163955.png",
|
|
|
|
- "uid": 1664440795110,
|
|
|
|
- "status": "success"
|
|
|
|
- }],
|
|
|
|
- "name": "商品6",
|
|
|
|
- "sell_money": 0.1
|
|
|
|
- }],
|
|
|
|
|
|
+ allList: [ //
|
|
|
|
+ {
|
|
|
|
+ "_id": "63353758101f3c01048c4f61",
|
|
|
|
+ "file": [{
|
|
|
|
+ "id": "20220929141236",
|
|
|
|
+ "name": "f0e22552dddcf494f9720c655a8420a.png",
|
|
|
|
+ "uri": "/files/point/goods/20220929141236.png",
|
|
|
|
+ "url": "https://broadcast.waityou24.cn/files/point/goods/20220929141236.png",
|
|
|
|
+ "uid": 1664431956868,
|
|
|
|
+ "status": "success"
|
|
|
|
+ }],
|
|
|
|
+ "name": "test",
|
|
|
|
+ "sell_money": 0.1
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
condActive: 0,
|
|
condActive: 0,
|
|
shang: false,
|
|
shang: false,
|
|
xia: false,
|
|
xia: false,
|
|
@@ -370,8 +213,42 @@
|
|
]
|
|
]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ onLoad: function(e) {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.$set(that, `id`, e.id || '6333d71d32c5f69745f9bd32');
|
|
|
|
+ that.search()
|
|
|
|
+ },
|
|
onShow: function() {},
|
|
onShow: function() {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 查询信息
|
|
|
|
+ async search() {
|
|
|
|
+ const that = this;
|
|
|
|
+ if (that.id) {
|
|
|
|
+ // 查询店铺信息
|
|
|
|
+ const res = await that.$api(`/shop/${that.id}`, 'GET');
|
|
|
|
+ if (res.errcode == '0') that.$set(that, `info`, res.data);
|
|
|
|
+ // 查询店铺商品
|
|
|
|
+ that.searchShopMarket();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 查询店铺商品
|
|
|
|
+ async searchShopMarket() {
|
|
|
|
+ const that = this;
|
|
|
|
+ const res = await that.$api(`/viewGoods/indexGoodsList`, 'GET', {
|
|
|
|
+ shop: that.id,
|
|
|
|
+ skip: 0,
|
|
|
|
+ limit: 20
|
|
|
|
+ })
|
|
|
|
+ if (res.errcode == '0') that.$set(that, `shoplist`, res.data);
|
|
|
|
+ },
|
|
|
|
+ // 购买
|
|
|
|
+ toBuy(item) {
|
|
|
|
+ if (item && item._id) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pagesHome/order/detail?id=${item._id}`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 选择底部菜单
|
|
// 选择底部菜单
|
|
barChange(index, item) {
|
|
barChange(index, item) {
|
|
const that = this;
|
|
const that = this;
|