Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
c51286373df397d1faa90763dbe2a6934fb5181a
2 parents
7f9f7895
a5ad68e4
Merge branch 'refs/heads/develop'
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
27 deletions
apps/components/order-pay-type/pay-type.vue
apps/pages/list/filtrate.vue
apps/pages/product/components/size-image.vue
apps/store/product/actions.js
config/product-api-map.js
package.json
apps/components/order-pay-type/pay-type.vue
View file @
c512863
...
...
@@ -109,10 +109,12 @@ export default {
}).show();
await this.delay(1500);
// 9 wap
this.payAction({
orderCode: this.orderCode,
payment: this.$xianyu.isAliApp ? 2 : 9
// eslint-disable-next-line lines-around-comment
// payment: this.$xianyu.isAliApp ? 2 : 9
payment: 12
}).then((result) => {
toast.hide();
this.onSuccess(result);
...
...
apps/pages/list/filtrate.vue
View file @
c512863
...
...
@@ -62,11 +62,9 @@ export default {
activated() {
let params = {...this.$route.query};
// if (this.yoho.direction === 'forword') {
Object.assign(this.$data, this.$options.data());
!params.order && (params.order = 'sale_desc');
this.fetchData(params);
// }
Object.assign(this.$data, this.$options.data());
!params.order && (params.order = 'sale_desc');
this.fetchData(params);
},
computed: {
...
...
apps/pages/product/components/size-image.vue
View file @
c512863
<template>
<!--尺码图片展示-->
<div v-if="sizeImage.imageUrl" class="size-img-container" :data-bid="brandId" :data-pid="productId">
<img v-lazy="sizeImage.imageUrl" :style="{width: sizeImage.imageWidth, height: sizeImage.imageHeight}">
<div v-if="sizeImageList.length">
<div v-for="item in sizeImageList" :key="item.imageUrl" class="size-img-container" :data-bid="brandId" :data-pid="productId">
<img v-lazy="item.imageUrl" :style="{width: item.imageWidth, height: item.imageHeight}">
</div>
</div>
</template>
...
...
@@ -28,29 +30,28 @@ export default {
},
data() {
return {
sizeImage: {
imageUrl: '',
imageWidth: '100%',
imageHeight: 'auto'
}
sizeImageList: []
};
},
activated() {
this.getProductSizeImage({brand_id: this.brandId, product_id: this.productId}).then(result => {
if (result.code === 200 && result.data && result.data.imageUrl) {
let url = result.data.imageUrl.split('?')[0];
this.getProductSizeImages({brand_id: this.brandId, product_id: this.productId}).then(result => {
if (result.code === 200 && result.data) {
let listArr = [];
result.data.forEach(function(item) {
// let imageWidth = result.data.imageWidth || 750
;
let url = item.imageUrl.split('?')[0]
;
this.sizeImage.imageUrl = url + '?imageView2/2/w/750/q/60';
listArr.push({imageUrl: url + '?imageView2/2/w/750/q/60', imageWidth: '100%', imageHeight: 'auto'});
});
// this.sizeImage.imageWidth = imageWidth ? (imageWidth / 40) + 'rem' : '100%';
// this.sizeImage.imageHeight = imageHeight ? (imageHeight / 40) + 'rem' : 'auto';
this.sizeImageList = listArr;
}
});
},
methods: {
...mapActions(['getProductSizeImage'])
...mapActions(['getProductSizeImage
s
'])
}
};
</script>
...
...
apps/store/product/actions.js
View file @
c512863
...
...
@@ -264,8 +264,8 @@ export default {
},
// 获取详情页尺码图片
async
getProductSizeImage
({
state
},
{
product_id
,
brand_id
})
{
let
result
=
await
this
.
$api
.
get
(
'/api/ufo/product/sizeImage'
,
{
async
getProductSizeImages
({
state
},
{
product_id
,
brand_id
})
{
let
result
=
await
this
.
$api
.
get
(
'/api/ufo/product/sizeImages'
,
{
product_id
,
brand_id
});
...
...
config/product-api-map.js
View file @
c512863
...
...
@@ -184,10 +184,10 @@ module.exports = {
},
// 获取详情页的尺码图片
'/api/ufo/product/sizeImage'
:
{
'/api/ufo/product/sizeImage
s
'
:
{
ufo
:
true
,
auth
:
false
,
api
:
'ufo.product.sizeImage'
,
api
:
'ufo.product.sizeImage
s
'
,
params
:
{
product_id
:
{
type
:
Number
},
brand_id
:
{
type
:
Number
}
...
...
package.json
View file @
c512863
{
"name"
:
"xianyu-ufo-app-web"
,
"version"
:
"1.6.
6
"
,
"version"
:
"1.6.
8
"
,
"private"
:
true
,
"description"
:
"Xianyu Project With Express"
,
"repository"
:
{
...
...
Please
register
or
login
to post a comment