Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
commit
71ab63e047
|
@ -478,3 +478,15 @@ export function delMemberMsg (id) {
|
||||||
needToken: true
|
needToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定分销
|
||||||
|
* @param distributionId 商品分销ID
|
||||||
|
*/
|
||||||
|
export function getGoodsDistribution (distributionId) {
|
||||||
|
return request({
|
||||||
|
url: `/buyer/distribution/bindingDistribution/${distributionId}`,
|
||||||
|
method: Method.GET,
|
||||||
|
needToken: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -8,12 +8,19 @@
|
||||||
<div class="shop-nav-container">
|
<div class="shop-nav-container">
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
<BreadcrumbItem to="/">首页</BreadcrumbItem>
|
<BreadcrumbItem to="/">首页</BreadcrumbItem>
|
||||||
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
|
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">
|
||||||
|
{{ item.name }}
|
||||||
|
</BreadcrumbItem>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
<div class="store-collect">
|
<div class="store-collect">
|
||||||
<span class="mr_10" v-if="goodsMsg.data"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
|
<span class="mr_10" v-if="goodsMsg.data"><router-link
|
||||||
<span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
|
:to="'Merchant?id=' + goodsMsg.data.storeId">{{ goodsMsg.data.storeName }}</router-link></span>
|
||||||
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
|
<span @click="collect"><Icon type="ios-heart"
|
||||||
|
:color="storeCollected ? '#ed3f14' : '#666'"/>{{
|
||||||
|
storeCollected ? '已收藏店铺' : '收藏店铺'
|
||||||
|
}}</span>
|
||||||
|
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon
|
||||||
|
custom="icomoon icon-customer-service"/>联系客服</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,8 +40,9 @@ import ShopHeader from '@/components/header/ShopHeader';
|
||||||
import ShowGoods from '@/components/goodsDetail/ShowGoods';
|
import ShowGoods from '@/components/goodsDetail/ShowGoods';
|
||||||
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
|
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
|
||||||
import {goodsSkuDetail} from '@/api/goods';
|
import {goodsSkuDetail} from '@/api/goods';
|
||||||
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
|
import {cancelCollect, collectGoods, isCollection, getGoodsDistribution} from '@/api/member';
|
||||||
import {getDetailById} from '@/api/shopentry'
|
import {getDetailById} from '@/api/shopentry'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GoodsDetail',
|
name: 'GoodsDetail',
|
||||||
beforeRouteEnter (to, from, next) {
|
beforeRouteEnter (to, from, next) {
|
||||||
|
@ -57,7 +65,24 @@ export default {
|
||||||
// 获取商品详情
|
// 获取商品详情
|
||||||
getGoodsDetail () {
|
getGoodsDetail () {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
const params = this.$route.query
|
const params = this.$route.query;
|
||||||
|
// 分销员id
|
||||||
|
let distributionId = (params && params.distributionId) ? params.distributionId : this.Cookies.getItem('distributionId');
|
||||||
|
// 如果有分销信息
|
||||||
|
if (distributionId) {
|
||||||
|
console.log(distributionId)
|
||||||
|
// 先存储
|
||||||
|
this.Cookies.setItem('distributionId', params.distributionId)
|
||||||
|
let _this = this;
|
||||||
|
// 绑定关系
|
||||||
|
getGoodsDistribution(params.distributionId).then(res => {
|
||||||
|
// 绑定成功,则清除关系
|
||||||
|
if (res.success) {
|
||||||
|
_this.Cookies.removeItem('distributionId');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
goodsSkuDetail(params).then((res) => {
|
goodsSkuDetail(params).then((res) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -125,8 +150,7 @@ export default {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {},
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
Search,
|
Search,
|
||||||
ShopHeader,
|
ShopHeader,
|
||||||
|
@ -147,11 +171,13 @@ export default {
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.store-collect {
|
.store-collect {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
top: 0;
|
top: 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -142,7 +142,6 @@
|
||||||
title: "申请退款金额",
|
title: "申请退款金额",
|
||||||
key: "applyRefundPrice",
|
key: "applyRefundPrice",
|
||||||
width: 130,
|
width: 130,
|
||||||
sortType: "desc",
|
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
"div",
|
"div",
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="mt_10">
|
<Row type="flex" justify="end" class="mt_10">
|
||||||
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||||
size="small" show-total show-elevator show-sizer></Page>
|
size="small" show-total show-elevator show-sizer></Page>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -71,7 +71,7 @@ export default {
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 0, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
sort: "startTime",
|
sort: "startTime",
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 分页 改变页码
|
// 分页 改变页码
|
||||||
changePage(v) {
|
changePage(v) {
|
||||||
this.searchForm.pageNumber = v - 1;
|
this.searchForm.pageNumber = v;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
// 分页 改变页数
|
// 分页 改变页数
|
||||||
|
@ -155,7 +155,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchForm.pageNumber = 0;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
@ -163,7 +163,7 @@ export default {
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchForm = {};
|
this.searchForm = {};
|
||||||
this.selectDate = "";
|
this.selectDate = "";
|
||||||
this.searchForm.pageNumber = 0;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue