revert: 所有代码与custom/common分支同
This commit is contained in:
@@ -1,39 +0,0 @@
|
|||||||
// 本地调试配置示例文件
|
|
||||||
// 复制此文件并重命名为 local.config.js 以使用自定义本地配置
|
|
||||||
|
|
||||||
const localDevConfig = ({
|
|
||||||
'460': { // 制氧设备平台
|
|
||||||
uniacid: 460,
|
|
||||||
domain: 'https://xcx30.5g-quickapp.com/',
|
|
||||||
},
|
|
||||||
'2285': { // 数码喷墨墨水
|
|
||||||
uniacid: 2285,
|
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
|
||||||
},
|
|
||||||
'2811': { // POCT检测分析平台
|
|
||||||
uniacid: 2811,
|
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
|
||||||
},
|
|
||||||
'2724': { // 生物菌肥
|
|
||||||
uniacid: 2724,
|
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
|
||||||
},
|
|
||||||
'2505': { // 煤矿钻机
|
|
||||||
uniacid: 2505,
|
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
|
||||||
},
|
|
||||||
'2777': { // 养老服务
|
|
||||||
uniacid: 2777,
|
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
|
||||||
},
|
|
||||||
'1': { // 开发平台
|
|
||||||
uniacid: 1,
|
|
||||||
domain: 'https://dev.aigc-quickapp.com',
|
|
||||||
},
|
|
||||||
'1-test': { // 测试平台
|
|
||||||
uniacid: 1,
|
|
||||||
domain: 'https://test.aigc-quickapp.com',
|
|
||||||
},
|
|
||||||
})['2285']; // 选择要使用的环境配置
|
|
||||||
|
|
||||||
export default localDevConfig;
|
|
||||||
@@ -10,6 +10,14 @@ const localDevConfig = ({
|
|||||||
uniacid: 2285,
|
uniacid: 2285,
|
||||||
domain: 'https://xcx.aigc-quickapp.com/',
|
domain: 'https://xcx.aigc-quickapp.com/',
|
||||||
},
|
},
|
||||||
|
'2724': { // 德龙生物肥料
|
||||||
|
uniacid: 2724,
|
||||||
|
domain: 'https://xcx.aigc-quickapp.com/',
|
||||||
|
},
|
||||||
|
'2777': { // 养老服务
|
||||||
|
uniacid: 2777,
|
||||||
|
domain: 'https://xcx.aigc-quickapp.com/',
|
||||||
|
},
|
||||||
'1': { // 开发平台
|
'1': { // 开发平台
|
||||||
uniacid: 1,
|
uniacid: 1,
|
||||||
domain: 'https://dev.aigc-quickapp.com',
|
domain: 'https://dev.aigc-quickapp.com',
|
||||||
@@ -18,6 +26,6 @@ const localDevConfig = ({
|
|||||||
uniacid: 1,
|
uniacid: 1,
|
||||||
domain: 'https://test.aigc-quickapp.com',
|
domain: 'https://test.aigc-quickapp.com',
|
||||||
},
|
},
|
||||||
})['2285']; // 选择要使用的环境配置
|
})['2724']; // 选择要使用的环境配置
|
||||||
|
|
||||||
export default localDevConfig;
|
export default localDevConfig;
|
||||||
@@ -110,7 +110,8 @@ class ConfigExternal {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 动态加载主题配置
|
// 动态加载主题配置
|
||||||
const themeData = require(`@/common/js/style_color.js`)[theme];
|
const themeData = require(`@/common/js/style_color.js`)['default'][theme];
|
||||||
|
console.log('sync themeData => ', themeData);
|
||||||
this.loadedConfigs[`theme_${theme}`] = themeData;
|
this.loadedConfigs[`theme_${theme}`] = themeData;
|
||||||
return themeData;
|
return themeData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -136,7 +137,8 @@ class ConfigExternal {
|
|||||||
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
|
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
// 动态加载主题配置
|
// 动态加载主题配置
|
||||||
const themeData = require(`@/common/js/style_color.js`)[theme];
|
const themeData = require(`@/common/js/style_color.js`)['default'][theme];
|
||||||
|
console.log('async themeData => ', themeData);
|
||||||
this.loadedConfigs[`theme_${theme}`] = themeData;
|
this.loadedConfigs[`theme_${theme}`] = themeData;
|
||||||
resolve(themeData);
|
resolve(themeData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -111,8 +111,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async onShow() {
|
onShow() {
|
||||||
await this.init();
|
|
||||||
|
this.init();
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
if (this.storeTimeOut) {
|
if (this.storeTimeOut) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 商品详情业务
|
// 商品详情业务
|
||||||
import htmlParser from '@/common/js/html-parser.js';
|
import htmlParser from '@/common/js/html-parser';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const adaptSubpackageUrl = (url) => {
|
|||||||
'/pages/goods/': '/pages_goods/',
|
'/pages/goods/': '/pages_goods/',
|
||||||
'/pages/contact/': '/pages_tool/contact/',
|
'/pages/contact/': '/pages_tool/contact/',
|
||||||
'/pages/member/': '/pages_tool/member/',
|
'/pages/member/': '/pages_tool/member/',
|
||||||
'/pages/vr': '/pages_tool/vr/',
|
'/pages/vr': '/pages_tool/vr/'
|
||||||
};
|
};
|
||||||
|
|
||||||
// 构建正则表达式
|
// 构建正则表达式
|
||||||
@@ -58,106 +58,7 @@ export const adaptSubpackageUrl = (url) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentUrl = replacePrefix(url);
|
return replacePrefix(url);
|
||||||
|
|
||||||
// 分包子包导致的路径变化,需要根据前后关系修复
|
|
||||||
const subPackagesMap = {
|
|
||||||
// pages_order 基础功能子包
|
|
||||||
'/pages_order/list': '/pages_order/base/list',
|
|
||||||
'/pages_order/payment': '/pages_order/base/payment',
|
|
||||||
|
|
||||||
// pages_order 详情功能子包
|
|
||||||
'/pages_order/detail': '/pages_order/detail/detail',
|
|
||||||
'/pages_order/detail_local_delivery': '/pages_order/detail/detail_local_delivery',
|
|
||||||
'/pages_order/detail_pickup': '/pages_order/detail/detail_pickup',
|
|
||||||
'/pages_order/detail_point': '/pages_order/detail/detail_point',
|
|
||||||
|
|
||||||
// pages_promotion/fenxiao/core 基础功能子包
|
|
||||||
'/pages_promotion/fenxiao/core/index': '/pages_promotion/fenxiao/core/base/index',
|
|
||||||
'/pages_promotion/fenxiao/core/apply': '/pages_promotion/fenxiao/core/base/apply',
|
|
||||||
'/pages_promotion/fenxiao/core/level': '/pages_promotion/fenxiao/core/base/level',
|
|
||||||
|
|
||||||
// pages_promotion/fenxiao/core 推广功能子包
|
|
||||||
'/pages_promotion/fenxiao/core/promote': '/pages_promotion/fenxiao/core/promote/promote',
|
|
||||||
'/pages_promotion/fenxiao/core/promote_code': '/pages_promotion/fenxiao/core/promote/promote_code',
|
|
||||||
'/pages_promotion/fenxiao/core/goods_list': '/pages_promotion/fenxiao/core/promote/goods_list',
|
|
||||||
|
|
||||||
// pages_promotion/point 基础功能子包
|
|
||||||
'/pages_promotion/point/list': '/pages_promotion/point/base/list',
|
|
||||||
'/pages_promotion/point/goods_list': '/pages_promotion/point/base/goods_list',
|
|
||||||
|
|
||||||
// pages_promotion/point 详情功能子包
|
|
||||||
'/pages_promotion/point/detail': '/pages_promotion/point/detail/detail',
|
|
||||||
'/pages_promotion/point/order_list': '/pages_promotion/point/detail/order_list',
|
|
||||||
'/pages_promotion/point/payment': '/pages_promotion/point/detail/payment',
|
|
||||||
'/pages_promotion/point/result': '/pages_promotion/point/detail/result',
|
|
||||||
|
|
||||||
// basic子包
|
|
||||||
'/pages_tool/member/index': '/pages_tool/member/basic/index',
|
|
||||||
'/pages_tool/member/info': '/pages_tool/member/basic/info',
|
|
||||||
'/pages_tool/member/info_edit': '/pages_tool/member/basic/info_edit',
|
|
||||||
'/pages_tool/member/account': '/pages_tool/member/basic/account',
|
|
||||||
'/pages_tool/member/account_edit': '/pages_tool/member/basic/account_edit',
|
|
||||||
'/pages_tool/member/modify_face': '/pages_tool/member/basic/modify_face',
|
|
||||||
|
|
||||||
// address子包
|
|
||||||
'/pages_tool/member/address': '/pages_tool/member/address/address',
|
|
||||||
'/pages_tool/member/address_edit': '/pages_tool/member/address/address_edit',
|
|
||||||
|
|
||||||
// finance子包 - 基础账户和积分相关
|
|
||||||
'/pages_tool/member/balance': '/pages_tool/member/finance/account/balance',
|
|
||||||
'/pages_tool/member/balance_detail': '/pages_tool/member/finance/account/balance_detail',
|
|
||||||
'/pages_tool/member/point': '/pages_tool/member/finance/account/point',
|
|
||||||
'/pages_tool/member/point_detail': '/pages_tool/member/finance/account/point_detail',
|
|
||||||
'/pages_tool/member/pay_password': '/pages_tool/member/finance/account/pay_password',
|
|
||||||
|
|
||||||
// finance子包 - 提现和储值卡相关
|
|
||||||
'/pages_tool/member/card': '/pages_tool/member/finance/transaction/card',
|
|
||||||
'/pages_tool/member/card_buy': '/pages_tool/member/finance/transaction/card_buy',
|
|
||||||
'/pages_tool/member/card_agreement': '/pages_tool/member/finance/transaction/card_agreement',
|
|
||||||
'/pages_tool/member/apply_withdrawal': '/pages_tool/member/finance/transaction/apply_withdrawal',
|
|
||||||
'/pages_tool/member/withdrawal': '/pages_tool/member/finance/transaction/withdrawal',
|
|
||||||
'/pages_tool/member/withdrawal_detail': '/pages_tool/member/finance/transaction/withdrawal_detail',
|
|
||||||
|
|
||||||
// finance子包路径映射(从旧的finance子包路径到新的account和transaction子子包路径)
|
|
||||||
'/pages_tool/member/finance/balance': '/pages_tool/member/finance/account/balance',
|
|
||||||
'/pages_tool/member/finance/balance_detail': '/pages_tool/member/finance/account/balance_detail',
|
|
||||||
'/pages_tool/member/finance/point': '/pages_tool/member/finance/account/point',
|
|
||||||
'/pages_tool/member/finance/point_detail': '/pages_tool/member/finance/account/point_detail',
|
|
||||||
'/pages_tool/member/finance/pay_password': '/pages_tool/member/finance/account/pay_password',
|
|
||||||
|
|
||||||
'/pages_tool/member/finance/card': '/pages_tool/member/finance/transaction/card',
|
|
||||||
'/pages_tool/member/finance/card_buy': '/pages_tool/member/finance/transaction/card_buy',
|
|
||||||
'/pages_tool/member/finance/card_agreement': '/pages_tool/member/finance/transaction/card_agreement',
|
|
||||||
'/pages_tool/member/finance/apply_withdrawal': '/pages_tool/member/finance/transaction/apply_withdrawal',
|
|
||||||
'/pages_tool/member/finance/withdrawal': '/pages_tool/member/finance/transaction/withdrawal',
|
|
||||||
'/pages_tool/member/finance/withdrawal_detail': '/pages_tool/member/finance/transaction/withdrawal_detail',
|
|
||||||
|
|
||||||
// rights子包
|
|
||||||
'/pages_tool/member/coupon': '/pages_tool/member/rights/coupon',
|
|
||||||
'/pages_tool/member/level': '/pages_tool/member/rights/level',
|
|
||||||
'/pages_tool/member/level_growth_rules': '/pages_tool/member/rights/level_growth_rules',
|
|
||||||
'/pages_tool/member/invite_friends': '/pages_tool/member/rights/invite_friends',
|
|
||||||
|
|
||||||
// other子包
|
|
||||||
'/pages_tool/member/signin': '/pages_tool/member/other/signin',
|
|
||||||
'/pages_tool/member/collection': '/pages_tool/member/other/collection',
|
|
||||||
'/pages_tool/member/footprint': '/pages_tool/member/other/footprint',
|
|
||||||
'/pages_tool/member/assets': '/pages_tool/member/other/assets',
|
|
||||||
'/pages_tool/member/cancellation': '/pages_tool/member/other/cancellation',
|
|
||||||
'/pages_tool/member/cancelstatus': '/pages_tool/member/other/cancelstatus',
|
|
||||||
'/pages_tool/member/cancelsuccess': '/pages_tool/member/other/cancelsuccess',
|
|
||||||
'/pages_tool/member/cancelrefuse': '/pages_tool/member/other/cancelrefuse',
|
|
||||||
'/pages_tool/member/contact': '/pages_tool/member/other/contact'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 修复url
|
|
||||||
if (subPackagesMap[currentUrl]) {
|
|
||||||
return subPackagesMap[currentUrl];
|
|
||||||
}
|
|
||||||
|
|
||||||
return currentUrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -293,9 +293,6 @@ export default {
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -161,13 +161,14 @@ let menuButtonInfo = {};
|
|||||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
import nsGoodsSkuCategory from '@/components/ns-goods-sku/ns-goods-sku-category.vue';
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
var contentWrapHeight, query, cartPosition;
|
var contentWrapHeight, query, cartPosition;
|
||||||
|
|
||||||
// 商品分类
|
// 商品分类
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsGoodsSkuCategory: () => import('@/components/ns-goods-sku/ns-goods-sku-category.vue'),
|
nsGoodsSkuCategory
|
||||||
},
|
},
|
||||||
name: 'diy-category',
|
name: 'diy-category',
|
||||||
props: {
|
props: {
|
||||||
@@ -462,7 +463,7 @@ export default {
|
|||||||
cart_ids: this.cartIds.toString()
|
cart_ids: this.cartIds.toString()
|
||||||
},
|
},
|
||||||
success: () => {
|
success: () => {
|
||||||
this.$util.redirectTo('/pages_order/base/payment');
|
this.$util.redirectTo('/pages_order/payment');
|
||||||
this.isSub = false;
|
this.isSub = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -303,9 +303,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -38,13 +38,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uvCountTo from '@/components/uv-count-to/uv-count-to.vue'
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue'
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
// 自定义数字展示
|
// 自定义数字展示
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-digit',
|
name: 'diy-digit',
|
||||||
components: {
|
components: {
|
||||||
uvCountTo: () => import('@/components/uv-count-to/uv-count-to.vue'),
|
uvCountTo,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 商品品牌
|
// 商品品牌
|
||||||
|
import uniGrid from '@/components/uni-grid/uni-grid.vue';
|
||||||
|
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
|
||||||
|
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
// 自定义商品品牌展示
|
// 自定义商品品牌展示
|
||||||
export default {
|
export default {
|
||||||
@@ -29,8 +32,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
uniGrid: () => import('@/components/uni-grid/uni-grid.vue'),
|
uniGrid,
|
||||||
uniGridItem: () => import('@/components/uni-grid-item/uni-grid-item.vue'),
|
uniGridItem
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -253,13 +253,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
|
|
||||||
// 自定义商品列表展示
|
// 自定义商品列表展示
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-goods-list',
|
name: 'diy-goods-list',
|
||||||
components: {
|
components: {
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
nsGoodsSkuIndex
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|||||||
@@ -103,9 +103,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -251,11 +251,6 @@
|
|||||||
<diy-icon :value="item"></diy-icon>
|
<diy-icon :value="item"></diy-icon>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="item.componentName == 'Group'">
|
|
||||||
<!-- 组件组 -->
|
|
||||||
<diy-group :diyData="item"></diy-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 自定义扩展组件 -->
|
<!-- 自定义扩展组件 -->
|
||||||
<diy-comp-extend :value="item"></diy-comp-extend>
|
<diy-comp-extend :value="item"></diy-comp-extend>
|
||||||
</view>
|
</view>
|
||||||
@@ -266,24 +261,20 @@
|
|||||||
// 组件组展示
|
// 组件组展示
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'DiyGroup',
|
components: {},
|
||||||
mixins: [DiyMinx],
|
|
||||||
props: {
|
props: {
|
||||||
diyData: {
|
diyData: {
|
||||||
type: Object,
|
type: Object
|
||||||
default: () => ({})
|
|
||||||
},
|
},
|
||||||
scrollTop: {
|
scrollTop: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '0'
|
default: '0'
|
||||||
},
|
},
|
||||||
haveTopCategory: {
|
haveTopCategory: {
|
||||||
type: Boolean,
|
type: Boolean
|
||||||
default: false
|
|
||||||
},
|
},
|
||||||
followOfficialAccount: {
|
followOfficialAccount: {
|
||||||
type: Object,
|
type: Object
|
||||||
default: () => ({})
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
@@ -293,28 +284,25 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData || {}));
|
this.diyGlobalData = JSON.parse(JSON.stringify(this.diyData));
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
topNavColor() {
|
topNavColor() {
|
||||||
var color = '';
|
var color = '';
|
||||||
if (this.diyData.global && this.diyData.global.topNavBg) {
|
if (this.diyData.global.topNavBg) {
|
||||||
color = 'transparent';
|
color = 'transparent';
|
||||||
if (this.scrollTop > 20 && this.diyData.global.topNavColor) {
|
if (this.scrollTop > 20) {
|
||||||
color = this.diyData.global.topNavColor;
|
color = this.diyData.global.topNavColor;
|
||||||
} else {
|
} else {
|
||||||
color = 'transparent';
|
color = 'transparent';
|
||||||
}
|
}
|
||||||
} else if (this.diyData.global && this.diyData.global.topNavColor) {
|
} else {
|
||||||
color = this.diyData.global.topNavColor;
|
color = this.diyData.global.topNavColor;
|
||||||
}
|
}
|
||||||
return color;
|
return color;
|
||||||
},
|
},
|
||||||
// 修改属性样式
|
// 修改属性样式
|
||||||
setPagestyle() {
|
setPagestyle() {
|
||||||
if (!this.diyGlobalData || !this.diyGlobalData.value || !Array.isArray(this.diyGlobalData.value)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
this.diyGlobalData.value.forEach((item, index) => {
|
this.diyGlobalData.value.forEach((item, index) => {
|
||||||
item.pageStyle = '';
|
item.pageStyle = '';
|
||||||
// 给每个组件增加位置属性,用于定位,搜索、分类导航等定位
|
// 给每个组件增加位置属性,用于定位,搜索、分类导航等定位
|
||||||
@@ -326,12 +314,12 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.pageStyle += 'background-color:' + (item.pageBgColor || '') + ';';
|
item.pageStyle += 'background-color:' + item.pageBgColor + ';';
|
||||||
if (item.margin) {
|
if (item.margin) {
|
||||||
item.pageStyle += 'padding-top:' + (item.margin.top || 0) * 2 + 'rpx' + ';';
|
item.pageStyle += 'padding-top:' + item.margin.top * 2 + 'rpx' + ';';
|
||||||
item.pageStyle += 'padding-bottom:' + (item.margin.bottom || 0) * 2 + 'rpx' + ';';
|
item.pageStyle += 'padding-bottom:' + item.margin.bottom * 2 + 'rpx' + ';';
|
||||||
item.pageStyle += 'padding-right:' + (item.margin.both || 0) * 2 + 'rpx' + ';';
|
item.pageStyle += 'padding-right:' + item.margin.both * 2 + 'rpx' + ';';
|
||||||
item.pageStyle += 'padding-left:' + (item.margin.both || 0) * 2 + 'rpx' + ';';
|
item.pageStyle += 'padding-left:' + item.margin.both * 2 + 'rpx' + ';';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -339,35 +327,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 过滤组件的渲染
|
// 过滤组件的渲染
|
||||||
diyDataArray() {
|
diyDataArray() {
|
||||||
let data = [];
|
let data = [],
|
||||||
let showModuleData = [];
|
showModuleData = this.$store.state.diyGroupShowModule ? JSON.parse(this.$store.state
|
||||||
|
.diyGroupShowModule) : '';
|
||||||
// 安全获取store中的模块显示数据
|
|
||||||
try {
|
|
||||||
if (this.$store && this.$store.state && this.$store.state.diyGroupShowModule) {
|
|
||||||
showModuleData = JSON.parse(this.$store.state.diyGroupShowModule);
|
|
||||||
// 确保showModuleData是数组
|
|
||||||
if (!Array.isArray(showModuleData)) {
|
|
||||||
showModuleData = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
showModuleData = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const diyDataArr = this.setPagestyle;
|
|
||||||
|
|
||||||
if (showModuleData.length) {
|
if (showModuleData.length) {
|
||||||
if (showModuleData.includes('null')) return [];
|
if (showModuleData.includes('null')) return [];
|
||||||
|
|
||||||
|
let diyDataArr = this.setPagestyle;
|
||||||
diyDataArr.forEach((item, index) => {
|
diyDataArr.forEach((item, index) => {
|
||||||
if (item && item.componentName && showModuleData.includes(item.componentName)) {
|
if (showModuleData.includes(item.componentName)) {
|
||||||
data.push(item);
|
data.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else data = this.setPagestyle;
|
||||||
data = diyDataArr;
|
|
||||||
}
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -38,12 +38,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue'
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-image-nav',
|
name: 'diy-image-nav',
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|||||||
@@ -169,6 +169,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsLoading from '@/components/ns-loading/ns-loading.vue';
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-index-page',
|
name: 'diy-index-page',
|
||||||
@@ -189,9 +191,8 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
nsLoading,
|
||||||
nsLoading: () => import('@/components/ns-loading/ns-loading.vue'),
|
MescrollUni
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
watch: {
|
watch: {
|
||||||
// 组件刷新监听
|
// 组件刷新监听
|
||||||
|
|||||||
@@ -242,7 +242,8 @@ let menuButtonInfo = {};
|
|||||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
// #endif
|
// #endif
|
||||||
|
// 自定义会员中心——会员信息展示
|
||||||
|
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-member-info',
|
name: 'diy-member-info',
|
||||||
@@ -259,9 +260,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
nsContact
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view data-component-name="diy-member-my-order" class="common-wrap" :style="warpCss">
|
<view data-component-name="diy-member-my-order" class="common-wrap" :style="warpCss">
|
||||||
<view class="order-wrap">
|
<view class="order-wrap">
|
||||||
<view class="status-wrap">
|
<view class="status-wrap">
|
||||||
<view class="item-wrap" @click="redirect('/pages_order/base/list?status=waitpay')"
|
<view class="item-wrap" @click="redirect('/pages_order/list?status=waitpay')"
|
||||||
style="margin-right: 10rpx;">
|
style="margin-right: 10rpx;">
|
||||||
<view class="icon-block">
|
<view class="icon-block">
|
||||||
<template v-if="value.style == 3">
|
<template v-if="value.style == 3">
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="title">{{ $lang('waitpay') }}</view>
|
<view class="title">{{ $lang('waitpay') }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-wrap" @click="redirect('/pages_order/base/list?status=waitsend')"
|
<view class="item-wrap" @click="redirect('/pages_order/list?status=waitsend')"
|
||||||
style="margin-right: 10rpx;">
|
style="margin-right: 10rpx;">
|
||||||
<view class="icon-block">
|
<view class="icon-block">
|
||||||
<template v-if="value.style == 3">
|
<template v-if="value.style == 3">
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="title">{{ $lang('waitsend') }}</view>
|
<view class="title">{{ $lang('waitsend') }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-wrap" @click="redirect('/pages_order/base/list?status=waitconfirm')"
|
<view class="item-wrap" @click="redirect('/pages_order/list?status=waitconfirm')"
|
||||||
style="margin-right: 10rpx;">
|
style="margin-right: 10rpx;">
|
||||||
<view class="icon-block">
|
<view class="icon-block">
|
||||||
<template v-if="value.style == 3">
|
<template v-if="value.style == 3">
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="title">{{ $lang('waitconfirm') }}</view>
|
<view class="title">{{ $lang('waitconfirm') }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-wrap" @click="redirect('/pages_order/base/list?status=waitrate')"
|
<view class="item-wrap" @click="redirect('/pages_order/list?status=waitrate')"
|
||||||
style="margin-right: 10rpx;">
|
style="margin-right: 10rpx;">
|
||||||
<view class="icon-block">
|
<view class="icon-block">
|
||||||
<template v-if="value.style == 3">
|
<template v-if="value.style == 3">
|
||||||
@@ -110,10 +110,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -51,16 +51,12 @@
|
|||||||
// 文章
|
// 文章
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-merch-list',
|
name: 'diy-article',
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [
|
list: [
|
||||||
|
|||||||
@@ -63,10 +63,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -48,10 +48,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -175,10 +175,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -211,10 +211,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -119,10 +119,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 富文本
|
// 富文本
|
||||||
import htmlParser from '@/common/js/html-parser.js';
|
import htmlParser from '@/common/js/html-parser';
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-rich-text',
|
name: 'diy-rich-text',
|
||||||
@@ -15,10 +15,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
html: ''
|
html: ''
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 魔方、橱窗
|
// 魔方、橱窗
|
||||||
import htmlParser from '@/common/js/html-parser.js';
|
import htmlParser from '@/common/js/html-parser';
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-rubik-cube',
|
name: 'diy-rubik-cube',
|
||||||
|
|||||||
@@ -85,10 +85,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchText: '',
|
searchText: '',
|
||||||
|
|||||||
@@ -242,10 +242,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -38,10 +38,6 @@ export default {
|
|||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
mixins: [DiyMinx],
|
mixins: [DiyMinx],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -62,11 +62,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
||||||
import DiyMinx from './minx.js'
|
import DiyMinx from './minx.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'diy-video-list',
|
name: 'diy-video-list',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|||||||
@@ -357,12 +357,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import nsLoading from '@/components/ns-loading/ns-loading.vue'
|
||||||
import aiService from '@/common/js/ai-service.js'
|
import aiService from '@/common/js/ai-service.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ai-chat-message',
|
name: 'ai-chat-message',
|
||||||
components: {
|
components: {
|
||||||
nsLoading: () => import('@/components/ns-loading/ns-loading.vue'),
|
nsLoading
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
// 初始消息列表
|
// 初始消息列表
|
||||||
|
|||||||
@@ -636,19 +636,28 @@
|
|||||||
<script>
|
<script>
|
||||||
import payment from './payment.js';
|
import payment from './payment.js';
|
||||||
|
|
||||||
|
import nsSelectTime from '@/components/ns-select-time/ns-select-time.vue';
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'common-payment',
|
name: 'common-payment',
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
nsSelectTime: () => import('@/components/ns-select-time/ns-select-time.vue'),
|
nsSelectTime,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import htmlParser from '@/common/js/html-parser.js';
|
import htmlParser from '@/common/js/html-parser';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
options: {
|
options: {
|
||||||
@@ -922,7 +922,7 @@ export default {
|
|||||||
payClose() {
|
payClose() {
|
||||||
// 更新购物车数量
|
// 更新购物车数量
|
||||||
this.$store.dispatch('getCartNumber');
|
this.$store.dispatch('getCartNumber');
|
||||||
this.$util.redirectTo('/pages_order/detail/detail', {
|
this.$util.redirectTo('/pages_order/detail', {
|
||||||
order_id: this.$refs.choosePaymentPopup.payInfo.order_id
|
order_id: this.$refs.choosePaymentPopup.payInfo.order_id
|
||||||
}, 'redirectTo');
|
}, 'redirectTo');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -420,7 +420,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 商品详情视图
|
// 商品详情视图
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
|
import pengpaiFadeinOut from '@/components/pengpai-fadein-out/pengpai-fadein-out.vue';
|
||||||
|
import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
import detail from './detail.js';
|
import detail from './detail.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -434,11 +439,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
nsGoodsRecommend,
|
||||||
pengpaiFadeinOut: () => import('@/components/pengpai-fadein-out/pengpai-fadein-out.vue'),
|
pengpaiFadeinOut,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
toTop,
|
||||||
xiaoStarComponent: () => import('@/components/xiao-star-component/xiao-star-component.vue'),
|
xiaoStarComponent
|
||||||
},
|
},
|
||||||
mixins: [scroll, detail]
|
mixins: [scroll, detail]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,11 +46,15 @@
|
|||||||
import MeScroll from './mescroll-uni.js';
|
import MeScroll from './mescroll-uni.js';
|
||||||
// 引入全局配置
|
// 引入全局配置
|
||||||
import GlobalOption from './mescroll-uni-option.js';
|
import GlobalOption from './mescroll-uni-option.js';
|
||||||
|
// 引入空布局组件
|
||||||
|
import MescrollEmpty from './components/mescroll-empty.vue';
|
||||||
|
// 引入回到顶部组件
|
||||||
|
import MescrollTop from './components/mescroll-top.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
MescrollEmpty: () => import('./components/mescroll-empty.vue'),
|
MescrollEmpty,
|
||||||
MescrollTop: () => import('./components/mescroll-top.vue'),
|
MescrollTop
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -57,13 +57,18 @@
|
|||||||
import MeScroll from './mescroll-uni.js';
|
import MeScroll from './mescroll-uni.js';
|
||||||
// 引入全局配置
|
// 引入全局配置
|
||||||
import GlobalOption from './mescroll-uni-option.js';
|
import GlobalOption from './mescroll-uni-option.js';
|
||||||
|
// 引入空布局组件
|
||||||
|
import MescrollEmpty from './components/mescroll-empty.vue';
|
||||||
|
// 引入回到顶部组件
|
||||||
|
import MescrollTop from './components/mescroll-top.vue';
|
||||||
|
|
||||||
|
import nsLoading from '@/components/ns-loading/ns-loading.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'mescroll-uni',
|
name: 'mescroll-uni',
|
||||||
components: {
|
components: {
|
||||||
MescrollEmpty: () => import('./components/mescroll-empty.vue'),
|
MescrollEmpty,
|
||||||
MescrollTop: () => import('./components/mescroll-top.vue'),
|
MescrollTop
|
||||||
nsLoading: () => import('@/components/ns-loading/ns-loading.vue'),
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
down: Object, // 下拉刷新的参数配置
|
down: Object, // 下拉刷新的参数配置
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Mescroll from './mescroll-uni.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Mescroll: () => import('./mescroll-uni.vue'),
|
Mescroll
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -80,12 +80,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '../uni-popup/uni-popup.vue';
|
||||||
|
|
||||||
// 注册奖励弹出层
|
// 注册奖励弹出层
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-birthday-gift',
|
name: 'ns-birthday-gift',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup
|
||||||
nsLoading: () => import('@/components/ns-loading/ns-loading.vue'),
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -163,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
.register-box /deep/ .uni-scroll-view {
|
.register-box /deep/ .uni-scroll-view {
|
||||||
background: unset !important;
|
background: unset !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,9 +54,6 @@
|
|||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config: null,
|
config: null,
|
||||||
|
|||||||
@@ -200,10 +200,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import pickRegions from '@/components/pick-regions/pick-regions.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-form',
|
name: 'ns-form',
|
||||||
components: {
|
components: {
|
||||||
pickRegions: () => import('@/components/pick-regions/pick-regions.vue'),
|
pickRegions
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
|
||||||
<view class="action-buttom-wrap disabled" v-if="disabled" @click="clickEvent">{{ disabledText }}</view>
|
<view class="action-buttom-wrap disabled" v-if="disabled" @click="clickEvent">{{ disabledText }}</view>
|
||||||
<view class="action-buttom-wrap"
|
<view class="action-buttom-wrap"
|
||||||
:class="[backgroundClass, textPrice ? 'has-second' : '', background ? 'color-join-cart' : 'color-base-bg']"
|
:class="[backgroundClass, textPrice ? 'has-second' : '', background ? 'color-join-cart' : 'color-base-bg']"
|
||||||
@@ -8,7 +7,6 @@
|
|||||||
<text class="price-font">{{ textPrice }}</text>
|
<text class="price-font">{{ textPrice }}</text>
|
||||||
<text>{{ text }}</text>
|
<text>{{ text }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-goods-action-icon',
|
name: 'ns-goods-action-icon',
|
||||||
props: {
|
props: {
|
||||||
@@ -72,7 +73,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
nsContact
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
|
|||||||
@@ -3,12 +3,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsLoading from '@/components/ns-loading/ns-loading.vue';
|
||||||
|
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
|
||||||
|
|
||||||
// 商品推荐
|
// 商品推荐
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-goods-recommend',
|
name: 'ns-goods-recommend',
|
||||||
components: {
|
components: {
|
||||||
nsLoading: () => import('@/components/ns-loading/ns-loading.vue'),
|
nsLoading,
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
nsGoodsSkuIndex
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -82,12 +82,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup-sku-new.vue';
|
||||||
// 商品SKU
|
// 商品SKU
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-goods-sku-category',
|
name: 'ns-goods-sku-category',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup-sku-new.vue'),
|
uniPopup
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
disabled: {
|
disabled: {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsGoodsSku from '@/components/ns-goods-sku/ns-goods-sku.vue';
|
||||||
// 商品SKU
|
// 商品SKU
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-goods-sku-index',
|
name: 'ns-goods-sku-index',
|
||||||
components: {
|
components: {
|
||||||
nsGoodsSku: () => import('@/components/ns-goods-sku/ns-goods-sku.vue'),
|
nsGoodsSku
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -214,12 +214,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup-sku.vue';
|
||||||
// 商品SKU
|
// 商品SKU
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-goods-sku',
|
name: 'ns-goods-sku',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup-sku.vue'),
|
uniPopup
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
goodsId: {
|
goodsId: {
|
||||||
@@ -1109,7 +1109,7 @@
|
|||||||
key: 'orderCreateData',
|
key: 'orderCreateData',
|
||||||
data: data,
|
data: data,
|
||||||
success: () => {
|
success: () => {
|
||||||
this.$util.redirectTo('/pages_order/base/payment');
|
this.$util.redirectTo('/pages_order/payment');
|
||||||
this.btnSwitch = false;
|
this.btnSwitch = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -97,6 +97,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import registerReward from '@/components/register-reward/register-reward.vue';
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
import auth from '@/common/js/auth.js';
|
import auth from '@/common/js/auth.js';
|
||||||
import validate from '@/common/js/validate.js';
|
import validate from '@/common/js/validate.js';
|
||||||
|
|
||||||
@@ -104,10 +111,10 @@
|
|||||||
mixins: [auth],
|
mixins: [auth],
|
||||||
name: 'ns-login',
|
name: 'ns-login',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
registerReward: () => import('@/components/register-reward/register-reward.vue'),
|
registerReward,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -774,7 +781,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
/deep/ .reward-popup .uni-popup__wrapper-box {
|
/deep/ .reward-popup .uni-popup__wrapper-box {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
max-width: unset !important;
|
max-width: unset !important;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.mp-html{
|
.mp-html{
|
||||||
/deep/ img{
|
/deep/ img{
|
||||||
width:100% !important;
|
width:100% !important;
|
||||||
|
|||||||
@@ -75,9 +75,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '../uni-popup/uni-popup.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('../uni-popup/uni-popup.vue'),
|
uniPopup
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -169,7 +171,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
/deep/ .newgift-content uni-image {
|
/deep/ .newgift-content uni-image {
|
||||||
width: 113rpx !important;
|
width: 113rpx !important;
|
||||||
height: 24rpx !important;
|
height: 24rpx !important;
|
||||||
@@ -191,7 +193,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.reward-wrap {
|
.reward-wrap {
|
||||||
width: 85vw;
|
width: 85vw;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
@@ -278,10 +278,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import pickRegions from '@/components/pick-regions/pick-regions.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-form',
|
name: 'ns-form',
|
||||||
components: {
|
components: {
|
||||||
pickRegions: () => import('@/components/pick-regions/pick-regions.vue'),
|
pickRegions
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -43,6 +43,9 @@
|
|||||||
|
|
||||||
<!-- 旧版支付组件 订单表不为order表 的订单支付时使用该组件 -->
|
<!-- 旧版支付组件 订单表不为order表 的订单支付时使用该组件 -->
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsSwitch from '@/components/ns-switch/ns-switch.vue';
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
import { Weixin } from 'common/js/wx-jssdk.js';
|
import { Weixin } from 'common/js/wx-jssdk.js';
|
||||||
// #endif
|
// #endif
|
||||||
@@ -50,8 +53,8 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'ns-payment',
|
name: 'ns-payment',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
nsSwitch: () => import('@/components/ns-switch/ns-switch.vue'),
|
nsSwitch
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
balanceDeduct: {
|
balanceDeduct: {
|
||||||
@@ -109,12 +112,11 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created(e) {
|
created(e) {
|
||||||
let url = '';
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
url = window.location.href
|
let url = window.location.href
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
url = getCurrentPages()[getCurrentPages().length - 1].route
|
let url = getCurrentPages()[getCurrentPages().length - 1].route
|
||||||
// #endif
|
// #endif
|
||||||
let list = url.match('presale/order_list/order_list')
|
let list = url.match('presale/order_list/order_list')
|
||||||
let detail = url.match('presale/order_detail/order_detail')
|
let detail = url.match('presale/order_detail/order_detail')
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
<view class="body">
|
<view class="body">
|
||||||
<!-- 左侧日期选择 -->
|
<!-- 左侧日期选择 -->
|
||||||
<scroll-view :scroll-y="true" class="left">
|
<scroll-view :scroll-y="true" class="left">
|
||||||
<view class="item" :class="index == keyJudge ? 'itemDay' : ''" v-for="(item, index) in dayData"
|
<view class="item" :class="index == keyJudge ? 'itemDay' : ''" v-for="(item, index) in dayData" :key="index" @click="selectTime('days', index, 'yes')">
|
||||||
:key="index" @click="selectTime('days', index, 'yes')">
|
|
||||||
<block v-if="item.title">{{ item.title }}</block>
|
<block v-if="item.title">{{ item.title }}</block>
|
||||||
<block v-else>{{ item.month }}</block>
|
<block v-else>{{ item.month }}</block>
|
||||||
<text class="itemtext">{{ item.Day }}</text>
|
<text class="itemtext">{{ item.Day }}</text>
|
||||||
@@ -19,11 +18,9 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- 右侧时间选择 -->
|
<!-- 右侧时间选择 -->
|
||||||
<scroll-view :scroll-y="true" class="right">
|
<scroll-view :scroll-y="true" class="right">
|
||||||
<view class="item" :class="key == keyJudge && index == keys ? 'itemTime' : ''"
|
<view class="item" :class="key == keyJudge && index == keys ? 'itemTime' : ''" v-for="(item, index) in timeData" :key="index" @click="selectTime('time', index, 'yes')">
|
||||||
v-for="(item, index) in timeData" :key="index" @click="selectTime('time', index, 'yes')">
|
|
||||||
{{ item }}
|
{{ item }}
|
||||||
<text v-if="key == keyJudge && index == keys"
|
<text v-if="key == keyJudge && index == keys" class="iconfont icon-yuan_checked color-base-text"></text>
|
||||||
class="iconfont icon-yuan_checked color-base-text"></text>
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -33,10 +30,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "nsSelectTime",
|
name: "nsSelectTime",
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -59,7 +57,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh() {
|
refresh(){
|
||||||
this.key = 0;
|
this.key = 0;
|
||||||
this.keys = 0;
|
this.keys = 0;
|
||||||
this.keyJudge = 0;
|
this.keyJudge = 0;
|
||||||
@@ -92,7 +90,7 @@ export default {
|
|||||||
this.key = this.keyJudge;
|
this.key = this.keyJudge;
|
||||||
let obj = this.dayData[this.key];
|
let obj = this.dayData[this.key];
|
||||||
obj.time = this.timeData[this.keys];
|
obj.time = this.timeData[this.keys];
|
||||||
let time = obj.time.replace('立即配送(', '').replace(')', '');
|
let time = obj.time.replace('立即配送(','').replace(')','');
|
||||||
|
|
||||||
var dateTime = new Date();
|
var dateTime = new Date();
|
||||||
var format = time.split('-');
|
var format = time.split('-');
|
||||||
@@ -104,13 +102,13 @@ export default {
|
|||||||
let date = timeData[1].split('日')[0];
|
let date = timeData[1].split('日')[0];
|
||||||
|
|
||||||
// 开始时间戳
|
// 开始时间戳
|
||||||
dateTime.setHours(startHours[0], startHours[1], 0, 0);
|
dateTime.setHours(startHours[0],startHours[1],0,0);
|
||||||
obj.start_time = dateTime.getTime() / 1000;
|
obj.start_time = dateTime.getTime()/1000;
|
||||||
obj.start_date = dateTime.getFullYear() + '-' + month + '-' + date + ' ' + format[0];
|
obj.start_date = dateTime.getFullYear() + '-' + month + '-' + date + ' ' + format[0];
|
||||||
|
|
||||||
// 结束时间戳
|
// 结束时间戳
|
||||||
dateTime.setHours(endHours[0], endHours[1], 0, 0);
|
dateTime.setHours(endHours[0],endHours[1],0,0);
|
||||||
obj.end_time = dateTime.getTime() / 1000;
|
obj.end_time = dateTime.getTime()/1000;
|
||||||
obj.end_date = dateTime.getFullYear() + '-' + month + '-' + date + ' ' + format[1];
|
obj.end_date = dateTime.getFullYear() + '-' + month + '-' + date + ' ' + format[1];
|
||||||
|
|
||||||
this.$emit('selectTime', { data: obj, type: judge });
|
this.$emit('selectTime', { data: obj, type: judge });
|
||||||
@@ -159,15 +157,15 @@ export default {
|
|||||||
|
|
||||||
for (let i = 0; i < mostDay; i++) {
|
for (let i = 0; i < mostDay; i++) {
|
||||||
let objects = {};
|
let objects = {};
|
||||||
let dayStr = week[nowDay];
|
let dayStr = week[ nowDay ];
|
||||||
// 判断最大可预约时间
|
// 判断最大可预约时间
|
||||||
if (this.obj.dataTime.most_day > 0 && ((startTime + num * 86400) > (startTime + this.obj.dataTime.most_day * 86400))) {
|
if (this.obj.dataTime.most_day > 0 && ((startTime + num * 86400) > (startTime + this.obj.dataTime.most_day * 86400) ) ) {
|
||||||
this.judge = true;
|
this.judge = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//判断当天是否能够配送、自提
|
//判断当天是否能够配送、自提
|
||||||
if (type == 0 || judge || obj.indexOf(nowDay.toString()) != -1) {
|
if (type == 0 || judge || obj.indexOf(nowDay.toString()) != -1) {
|
||||||
let endTime = this.obj.dataTime.delivery_time[(this.obj.dataTime.delivery_time.length - 1)].end_time;
|
let endTime = this.obj.dataTime.delivery_time[ (this.obj.dataTime.delivery_time.length - 1) ].end_time;
|
||||||
endTime -= this.obj.dataTime.time_interval * 60;
|
endTime -= this.obj.dataTime.time_interval * 60;
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -246,7 +244,7 @@ export default {
|
|||||||
let timeData = [];
|
let timeData = [];
|
||||||
|
|
||||||
if (!this.obj.dataTime.delivery_time) {
|
if (!this.obj.dataTime.delivery_time) {
|
||||||
this.obj.dataTime.delivery_time = [{ start_time: this.obj.dataTime.start_time, end_time: this.obj.dataTime.end_time }]
|
this.obj.dataTime.delivery_time = [ {start_time: this.obj.dataTime.start_time, end_time: this.obj.dataTime.end_time} ]
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断选中是否为当天
|
//判断选中是否为当天
|
||||||
@@ -273,7 +271,7 @@ export default {
|
|||||||
if (time <= item.end_time) {
|
if (time <= item.end_time) {
|
||||||
let text = '';
|
let text = '';
|
||||||
if (this.obj.delivery.delivery_type == 'local' && i == 0) {
|
if (this.obj.delivery.delivery_type == 'local' && i == 0) {
|
||||||
text = '立即配送(' + this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval) + ')';
|
text = '立即配送('+ this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval) + ')';
|
||||||
} else {
|
} else {
|
||||||
text = this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval);
|
text = this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval);
|
||||||
}
|
}
|
||||||
@@ -303,7 +301,6 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
height: 728rpx;
|
height: 728rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -314,7 +311,6 @@ export default {
|
|||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
border-bottom: 1rpx solid #f7f4f4;
|
border-bottom: 1rpx solid #f7f4f4;
|
||||||
|
|
||||||
.icon-close {
|
.icon-close {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
@@ -324,18 +320,15 @@ export default {
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 90rpx);
|
height: calc(100% - 90rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 230rpx;
|
width: 230rpx;
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16rpx 30rpx;
|
padding: 16rpx 30rpx;
|
||||||
@@ -345,18 +338,15 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemDay {
|
.itemDay {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: calc(100% - 230rpx);
|
width: calc(100% - 230rpx);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -365,13 +355,11 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
|
|
||||||
.icon-yuan_checked {
|
.icon-yuan_checked {
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemTime {
|
.itemTime {
|
||||||
color: var(--main-color);
|
color: var(--main-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,9 @@
|
|||||||
|
|
||||||
<!-- 新版支付组件 订单表为order表 的订单支付时使用该组件 -->
|
<!-- 新版支付组件 订单表为order表 的订单支付时使用该组件 -->
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsSwitch from '@/components/ns-switch/ns-switch.vue';
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
import {
|
import {
|
||||||
Weixin
|
Weixin
|
||||||
@@ -52,8 +55,8 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'payment',
|
name: 'payment',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
nsSwitch: () => import('@/components/ns-switch/ns-switch.vue'),
|
nsSwitch
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
// 是否可用余额支付
|
// 是否可用余额支付
|
||||||
|
|||||||
@@ -44,9 +44,6 @@
|
|||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickerValueArray: [],
|
pickerValueArray: [],
|
||||||
|
|||||||
@@ -78,11 +78,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
|
||||||
// 注册奖励弹出层
|
// 注册奖励弹出层
|
||||||
export default {
|
export default {
|
||||||
name: 'register-reward',
|
name: 'register-reward',
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -19,10 +19,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniBadge from '@/components/uni-badge/uni-badge.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'UniGridItem',
|
name: 'UniGridItem',
|
||||||
components: {
|
components: {
|
||||||
uniBadge: () => import('@/components/uni-badge/uni-badge.vue'),
|
uniBadge
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
// 类型:可选值,dot:圆点;badge:角标;image:图片
|
// 类型:可选值,dot:圆点;badge:角标;image:图片
|
||||||
|
|||||||
@@ -79,9 +79,6 @@
|
|||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wxWorkSDK: null
|
wxWorkSDK: null
|
||||||
|
|||||||
@@ -100,9 +100,9 @@
|
|||||||
},
|
},
|
||||||
"router" : {
|
"router" : {
|
||||||
"mode" : "history",
|
"mode" : "history",
|
||||||
"base" : "/hwapp/"
|
"base" : "/hwappx/common/"
|
||||||
},
|
},
|
||||||
"title" : " ",
|
"title" : "",
|
||||||
"devServer" : {
|
"devServer" : {
|
||||||
"https" : false
|
"https" : false
|
||||||
},
|
},
|
||||||
|
|||||||
951
pages.json
951
pages.json
File diff suppressed because it is too large
Load Diff
@@ -148,25 +148,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import diyJs from '@/common/js/diy.js';
|
import diyJs from '@/common/js/diy.js';
|
||||||
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
|
||||||
import indexJs from './public/js/index.js';
|
import indexJs from './public/js/index.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
hoverNav: () => import('@/components/hover-nav/hover-nav.vue'),
|
uniPopup,
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
nsNavbar,
|
||||||
nsNavbar: () => import('@/components/ns-navbar/ns-navbar.vue'),
|
toTop,
|
||||||
nsCopyright: () => import('@/components/ns-copyright/ns-copyright.vue'),
|
nsLogin,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
mixins: [diyJs, scroll, indexJs],
|
mixins: [diyJs, scroll, indexJs]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -213,8 +217,12 @@ export default {
|
|||||||
font-size: 60rpx;
|
font-size: 60rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.swiper /deep/ .uni-swiper-dots-horizontal {
|
||||||
|
left: 40%;
|
||||||
|
bottom: 40px
|
||||||
|
}
|
||||||
|
|
||||||
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
@@ -222,15 +230,8 @@ export default {
|
|||||||
.choose-store>>>.goodslist-uni-popup-box {
|
.choose-store>>>.goodslist-uni-popup-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||||
.swiper /deep/ .uni-swiper-dots-horizontal {
|
|
||||||
left: 40%;
|
|
||||||
bottom: 40px
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ .diy-index-page .uni-popup .uni-popup__wrapper-box {
|
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true"
|
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
|
||||||
:refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
|
|
||||||
<block v-if="hasData">
|
<block v-if="hasData">
|
||||||
<view class="cart-header" v-if="cartData.length">
|
<view class="cart-header" v-if="cartData.length">
|
||||||
<view class="num-wrap">共{{ cartData[0].cartList.length }}种商品</view>
|
<view class="num-wrap">共{{ cartData[0].cartList.length }}种商品</view>
|
||||||
@@ -21,67 +20,51 @@
|
|||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="store-wrap"
|
<view class="store-wrap" v-if="globalStoreConfig && globalStoreConfig.store_business == 'store' && globalStoreInfo">
|
||||||
v-if="globalStoreConfig && globalStoreConfig.store_business == 'store' && globalStoreInfo">
|
|
||||||
<text class="iconfont icon-dianpu"></text>
|
<text class="iconfont icon-dianpu"></text>
|
||||||
<text class="name">{{ globalStoreInfo.store_name }}</text>
|
<text class="name">{{globalStoreInfo.store_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<block v-for="(item, cartIndex) in siteItem.cartList" :key="cartIndex">
|
<block v-for="(item, cartIndex) in siteItem.cartList" :key="cartIndex">
|
||||||
<view class="cart-goods" @touchstart="touchS($event)" @touchend="touchE($event, item)">
|
<view class="cart-goods" @touchstart="touchS($event)" @touchend="touchE($event, item)">
|
||||||
<view class="goods-wrap" :class="{ edit: item.edit }">
|
<view class="goods-wrap" :class="{ edit: item.edit }">
|
||||||
<view class="iconfont"
|
<view class="iconfont" :class="item.checked ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'" @click="singleElection(siteIndex, cartIndex)"></view>
|
||||||
:class="item.checked ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"
|
|
||||||
@click="singleElection(siteIndex, cartIndex)"></view>
|
|
||||||
<view @click="toGoodsDetail(item)" class="goods-img">
|
<view @click="toGoodsDetail(item)" class="goods-img">
|
||||||
<image :src="$util.img(item.sku_image, { size: 'mid' })"
|
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(siteIndex, cartIndex)" mode="aspectFill"/>
|
||||||
@error="imageError(siteIndex, cartIndex)" mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view>
|
<view>
|
||||||
<view @click="toGoodsDetail(item)" class="goods-name">{{ isEnEnv ?
|
<view @click="toGoodsDetail(item)" class="goods-name">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
|
||||||
item.en_goods_name : item.goods_name }}</view>
|
|
||||||
<view class="sku-wrap">
|
<view class="sku-wrap">
|
||||||
<view class="sku">
|
<view class="sku">
|
||||||
<view class="goods-spec" v-if="item.sku_spec_format.length"
|
<view class="goods-spec" v-if="item.sku_spec_format.length" @click="selectSku(item)">
|
||||||
@click="selectSku(item)">
|
|
||||||
<block v-for="(x, i) in item.sku_spec_format" :key="i">
|
<block v-for="(x, i) in item.sku_spec_format" :key="i">
|
||||||
{{ x.spec_name }}:{{ x.spec_value_name }}
|
{{ x.spec_name }}:{{ x.spec_value_name }}
|
||||||
{{ i < item.sku_spec_format.length - 1 ? ';' : '' }}
|
{{ i < item.sku_spec_format.length - 1 ? ';' : '' }}
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<text class="iconfont icon-unfold"
|
<text class="iconfont icon-unfold" v-if="item.sku_spec_format.length"></text>
|
||||||
v-if="item.sku_spec_format.length"></text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-sub-section">
|
<view class="goods-sub-section">
|
||||||
<block v-if="item.promotion_type == 1">
|
<block v-if="item.promotion_type == 1">
|
||||||
<block
|
<block v-if="Number(item.member_price) > 0 && Number(item.member_price) < Number(item.discount_price)">
|
||||||
v-if="Number(item.member_price) > 0 && Number(item.member_price) < Number(item.discount_price)">
|
|
||||||
<view class="goods-price ">
|
<view class="goods-price ">
|
||||||
<view class="bottom-price price-style large">
|
<view class="bottom-price price-style large">
|
||||||
<text class="unit price-style small">{{
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
|
||||||
{{ parseFloat(item.member_price).toFixed(2).split('.')[0] }}
|
{{ parseFloat(item.member_price).toFixed(2).split('.')[0] }}
|
||||||
<text class="unit price-style small">.{{
|
<text class="unit price-style small">.{{ parseFloat(item.member_price).toFixed(2).split('.')[1] }}</text>
|
||||||
parseFloat(item.member_price).toFixed(2).split('.')[1]
|
<image :src="$util.img('public/uniapp/index/VIP.png')"/>
|
||||||
}}</text>
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="goods-price ">
|
<view class="goods-price ">
|
||||||
<view class="bottom-price price-style large">
|
<view class="bottom-price price-style large">
|
||||||
<text class="unit price-style small">{{
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
{{ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}
|
||||||
{{ parseFloat(item.discount_price).toFixed(2).split('.')[0]
|
<text class="unit price-style small">.{{ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||||
}}
|
<image :src="$util.img('public/uniapp/index/discount.png')"/>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(item.discount_price).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
<image
|
|
||||||
:src="$util.img('public/uniapp/index/discount.png')" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -90,25 +73,19 @@
|
|||||||
<block v-if="Number(item.member_price) > 0">
|
<block v-if="Number(item.member_price) > 0">
|
||||||
<view class="goods-price">
|
<view class="goods-price">
|
||||||
<view class="bottom-price price-style large">
|
<view class="bottom-price price-style large">
|
||||||
<text class="unit price-style small">{{
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
|
||||||
{{ parseFloat(item.member_price).toFixed(2).split('.')[0] }}
|
{{ parseFloat(item.member_price).toFixed(2).split('.')[0] }}
|
||||||
<text class="unit price-style small">.{{
|
<text class="unit price-style small">.{{ parseFloat(item.member_price).toFixed(2).split('.')[1] }}</text>
|
||||||
parseFloat(item.member_price).toFixed(2).split('.')[1]
|
<image :src="$util.img('public/uniapp/index/VIP.png')"/>
|
||||||
}}</text>
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="goods-price">
|
<view class="goods-price">
|
||||||
<view class="bottom-price price-style large">
|
<view class="bottom-price price-style large">
|
||||||
<text class="unit price-style small">{{
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
|
||||||
{{ parseFloat(item.price).toFixed(2).split('.')[0] }}
|
{{ parseFloat(item.price).toFixed(2).split('.')[0] }}
|
||||||
<text class="unit price-style small">.{{
|
<text class="unit price-style small">.{{ parseFloat(item.price).toFixed(2).split('.')[1] }}</text>
|
||||||
parseFloat(item.price).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -123,16 +100,14 @@
|
|||||||
<text class="discount-tag">满减</text>
|
<text class="discount-tag">满减</text>
|
||||||
<scroll-view scroll-x="true" class="scroll-view">
|
<scroll-view scroll-x="true" class="scroll-view">
|
||||||
<block v-for="(mitem, key) in manjian['sku_' + item.sku_id]" :key="key">
|
<block v-for="(mitem, key) in manjian['sku_' + item.sku_id]" :key="key">
|
||||||
<text v-if="mitem.discount_money">{{ Number(mitem.limit) }}减{{
|
<text v-if="mitem.discount_money">{{ Number(mitem.limit) }}减{{ mitem.discount_money }}</text>
|
||||||
mitem.discount_money }}</text>
|
|
||||||
<text class="interval" v-if="mitem.discount_money"></text>
|
<text class="interval" v-if="mitem.discount_money"></text>
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-del color-base-bg" :class="{ show: item.edit }"
|
<view class="item-del color-base-bg" :class="{ show: item.edit }" @click="deleteCart('single', siteIndex, cartIndex)">{{ $lang('del') }}</view>
|
||||||
@click="deleteCart('single', siteIndex, cartIndex)">{{ $lang('del') }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@@ -149,8 +124,7 @@
|
|||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<view class="iconfont icon-yuan_checked color-tip"></view>
|
<view class="iconfont icon-yuan_checked color-tip"></view>
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
|
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" mode="aspectFill"/>
|
||||||
mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="goods-name">{{ goodsItem.sku_name }}</view>
|
<view class="goods-name">{{ goodsItem.sku_name }}</view>
|
||||||
@@ -167,25 +141,16 @@
|
|||||||
<view class="goods-sub-section">
|
<view class="goods-sub-section">
|
||||||
<view class="goods-price">
|
<view class="goods-price">
|
||||||
<text class="bottom-price price-style large">
|
<text class="bottom-price price-style large">
|
||||||
<template
|
<template v-if="goodsItem.member_price > 0 && goodsItem.member_price < goodsItem.discount_price">
|
||||||
v-if="goodsItem.member_price > 0 && goodsItem.member_price < goodsItem.discount_price">
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="unit price-style small">{{
|
{{ parseFloat(goodsItem.member_price).toFixed(2).split('.')[0] }}
|
||||||
$lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">.{{ parseFloat(goodsItem.member_price).toFixed(2).split('.')[1] }}</text>
|
||||||
{{ parseFloat(goodsItem.member_price).toFixed(2).split('.')[0]
|
<image :src="$util.img('public/uniapp/index/VIP.png')"/>
|
||||||
}}
|
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(goodsItem.member_price).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" />
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<text class="unit price-style small">{{
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
{{ parseFloat(goodsItem.discount_price).toFixed(2).split('.')[0] }}
|
||||||
{{ parseFloat(goodsItem.discount_price).toFixed(2).split('.')[0]
|
<text class="unit price-style small">.{{ parseFloat(goodsItem.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||||
}}
|
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(goodsItem.discount_price).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
</template>
|
</template>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -200,8 +165,7 @@
|
|||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="cart-empty">
|
<view class="cart-empty">
|
||||||
<ns-empty text="购物车为空" subText="赶紧去逛逛, 购买心仪的商品吧" :isIndex="Boolean(storeToken)"></ns-empty>
|
<ns-empty text="购物车为空" subText="赶紧去逛逛, 购买心仪的商品吧" :isIndex="Boolean(storeToken)"></ns-empty>
|
||||||
<button type="primary" size="mini" class="button mini" v-if="!storeToken"
|
<button type="primary" size="mini" class="button mini" v-if="!storeToken" @click="toLogin">去登录</button>
|
||||||
@click="toLogin">去登录</button>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<ns-goods-recommend ref="goodrecommend" route="cart"></ns-goods-recommend>
|
<ns-goods-recommend ref="goodrecommend" route="cart"></ns-goods-recommend>
|
||||||
@@ -237,7 +201,7 @@
|
|||||||
<view class="money price-font ">¥{{ discount.order_money | moneyFormat }}</view>
|
<view class="money price-font ">¥{{ discount.order_money | moneyFormat }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ height: tabBarHeight }"></view>
|
<view :style="{height: tabBarHeight}"></view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
@@ -249,11 +213,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="$refs.couponPopup.close()">
|
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="$refs.couponPopup.close()">
|
||||||
<view class="coupon-item">
|
<view class="coupon-item">
|
||||||
<view class="coupon-info"
|
<view class="coupon-info" :style="{ backgroundColor: discount.coupon_info.receive_type != 'wait' ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
||||||
:style="{ backgroundColor: discount.coupon_info.receive_type != 'wait' ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<image class="coupon-line" mode="heightFix"
|
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"/>
|
||||||
:src="$util.img('public/uniapp/coupon/coupon_line.png')" />
|
|
||||||
<view class="coupon-money">
|
<view class="coupon-money">
|
||||||
<template v-if="discount.coupon_info.type == 'reward'">
|
<template v-if="discount.coupon_info.type == 'reward'">
|
||||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||||
@@ -275,30 +237,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="desc-wrap">
|
<view class="desc-wrap">
|
||||||
<view class="coupon-name">{{ discount.coupon_info.coupon_name }}</view>
|
<view class="coupon-name">{{ discount.coupon_info.coupon_name }}</view>
|
||||||
<view
|
<view v-if="discount.coupon_info.type == 'discount' && discount.coupon_info.discount_limit > 0" class="limit">
|
||||||
v-if="discount.coupon_info.type == 'discount' && discount.coupon_info.discount_limit > 0"
|
|
||||||
class="limit">
|
|
||||||
最多可抵¥{{ discount.coupon_info.discount_limit }}
|
最多可抵¥{{ discount.coupon_info.discount_limit }}
|
||||||
</view>
|
</view>
|
||||||
<view class="time font-size-goods-tag"
|
<view class="time font-size-goods-tag" v-if="discount.coupon_info.validity_type == 0">
|
||||||
v-if="discount.coupon_info.validity_type == 0">
|
|
||||||
有效期:{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
有效期:{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
||||||
</view>
|
</view>
|
||||||
<view class="time font-size-goods-tag"
|
<view class="time font-size-goods-tag" v-else-if="discount.coupon_info.validity_type == 1">
|
||||||
v-else-if="discount.coupon_info.validity_type == 1">
|
|
||||||
有效期:领取之日起{{ discount.coupon_info.fixed_term }}天内有效
|
有效期:领取之日起{{ discount.coupon_info.fixed_term }}天内有效
|
||||||
</view>
|
</view>
|
||||||
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<button type="primary" v-if="discount.coupon_info.receive_type != 'wait'"
|
<button type="primary" v-if="discount.coupon_info.receive_type != 'wait'" disabled>已领取</button>
|
||||||
disabled>已领取</button>
|
<button type="primary" v-else @click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">领取</button>
|
||||||
<button type="primary" v-else
|
|
||||||
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">领取</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ height: tabBarHeight }"></view>
|
<view :style="{height: tabBarHeight}"></view>
|
||||||
<view class="cart-bottom-block"></view>
|
<view class="cart-bottom-block"></view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
@@ -306,8 +262,7 @@
|
|||||||
|
|
||||||
<view class="cart-bottom" :style="{ bottom: tabBarHeight }" :class="{ active: isIphoneX }" v-if="hasData">
|
<view class="cart-bottom" :style="{ bottom: tabBarHeight }" :class="{ active: isIphoneX }" v-if="hasData">
|
||||||
<view class="all-election" @click="allElection">
|
<view class="all-election" @click="allElection">
|
||||||
<view class="iconfont" :class="checkAll ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
|
<view class="iconfont" :class="checkAll ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||||
</view>
|
|
||||||
<text>{{ $lang('allElection') }}</text>
|
<text>{{ $lang('allElection') }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="settlement-info" :style="{ visibility: isAction ? 'hidden' : 'visible' }">
|
<view class="settlement-info" :style="{ visibility: isAction ? 'hidden' : 'visible' }">
|
||||||
@@ -315,10 +270,8 @@
|
|||||||
{{ $lang('total') }}:
|
{{ $lang('total') }}:
|
||||||
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<block v-if="Object.keys(discount).length">
|
<block v-if="Object.keys(discount).length">
|
||||||
<text class="value price-font">{{ parseFloat(discount.order_money).toFixed(2).split('.')[0]
|
<text class="value price-font">{{ parseFloat(discount.order_money).toFixed(2).split('.')[0] }}</text>
|
||||||
}}</text>
|
<text class="unit price-font">.{{ parseFloat(discount.order_money).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-font">.{{ parseFloat(discount.order_money).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<text class="value price-font">{{ parseFloat(totalPrice).toFixed(2).split('.')[0] }}</text>
|
<text class="value price-font">{{ parseFloat(totalPrice).toFixed(2).split('.')[0] }}</text>
|
||||||
@@ -335,20 +288,16 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="action-btn" v-else>
|
<view class="action-btn" v-else>
|
||||||
<button type="primary" size="mini" class="mini" @click="settlement" v-if="totalCount != 0">
|
<button type="primary" size="mini" class="mini" @click="settlement" v-if="totalCount != 0">
|
||||||
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? '领券' : '立即' }}结算({{
|
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? '领券' : '立即' }}结算({{ totalCount }})
|
||||||
totalCount }})
|
|
||||||
</button>
|
</button>
|
||||||
<button type="primary" size="mini" class="mini" @click="settlement" disabled v-else>{{
|
<button type="primary" size="mini" class="mini" @click="settlement" disabled
|
||||||
$lang('settlement') }}({{
|
v-else>{{ $lang('settlement') }}({{ totalCount }})</button>
|
||||||
totalCount }})</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<diy-bottom-nav></diy-bottom-nav>
|
<diy-bottom-nav></diy-bottom-nav>
|
||||||
|
|
||||||
<ns-goods-sku ref="selectSku" v-if="goodsSkuDetail" :goods-detail="goodsSkuDetail"
|
<ns-goods-sku ref="selectSku" v-if="goodsSkuDetail" :goods-detail="goodsSkuDetail" :goods-id="goodsSkuDetail.goods_id" :max-buy="goodsSkuDetail.max_buy" :min-buy="goodsSkuDetail.min_buy" @refresh="refreshSkuDetail"></ns-goods-sku>
|
||||||
:goods-id="goodsSkuDetail.goods_id" :max-buy="goodsSkuDetail.max_buy" :min-buy="goodsSkuDetail.min_buy"
|
|
||||||
@refresh="refreshSkuDetail"></ns-goods-sku>
|
|
||||||
|
|
||||||
<!-- 加载动画 -->
|
<!-- 加载动画 -->
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
@@ -366,36 +315,44 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
|
||||||
import cart from './public/js/cart.js';
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
export default {
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
components: {
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
uniNumberBox: () => import('@/components/uni-number-box/uni-number-box.vue'),
|
import cart from './public/js/cart.js';
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
nsGoodsRecommend,
|
||||||
|
uniNumberBox,
|
||||||
|
toTop,
|
||||||
|
nsEmpty,
|
||||||
|
nsLogin,
|
||||||
|
loadingCover,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
mixins: [scroll, cart]
|
mixins: [scroll, cart]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
background: none;
|
background: none;
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
overflow-y: hidden !important;
|
overflow-y: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-popup__wrapper {
|
/deep/ .uni-popup__wrapper {
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import './public/css/cart.scss';
|
@import './public/css/cart.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -25,13 +25,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -420,7 +420,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 商品详情视图
|
// 商品详情视图
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
|
import pengpaiFadeinOut from '@/components/pengpai-fadein-out/pengpai-fadein-out.vue';
|
||||||
|
import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
import detail from './detail.js';
|
import detail from './detail.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -434,11 +439,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
nsGoodsRecommend,
|
||||||
pengpaiFadeinOut: () => import('@/components/pengpai-fadein-out/pengpai-fadein-out.vue'),
|
pengpaiFadeinOut,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
toTop,
|
||||||
xiaoStarComponent: () => import('@/components/xiao-star-component/xiao-star-component.vue')
|
xiaoStarComponent
|
||||||
},
|
},
|
||||||
mixins: [scroll, detail]
|
mixins: [scroll, detail]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,51 +2,44 @@
|
|||||||
<!-- 当前商品参与的营销活动入口 -->
|
<!-- 当前商品参与的营销活动入口 -->
|
||||||
<view class="ns-goods-promotion" v-if="goodsPromotion.length">
|
<view class="ns-goods-promotion" v-if="goodsPromotion.length">
|
||||||
<view v-for="(item, index) in goodsPromotion" v-if="promotion != item.promotion_type" :key="index">
|
<view v-for="(item, index) in goodsPromotion" v-if="promotion != item.promotion_type" :key="index">
|
||||||
<view v-if="item.promotion_type == 'discount'" class="item"
|
<view v-if="item.promotion_type == 'discount'" class="item" @click="redirectTo('/pages_goods/detail', { goods_id: item.goods_id })">
|
||||||
@click="redirectTo('/pages_goods/detail', { goods_id: item.goods_id })">
|
|
||||||
<text class="promotion-mark ">限时折扣</text>
|
<text class="promotion-mark ">限时折扣</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'groupbuy'" class="item"
|
<view v-else-if="item.promotion_type == 'groupbuy'" class="item" @click="redirectTo('/pages_promotion/groupbuy/detail', { groupbuy_id: item.groupbuy_id })">
|
||||||
@click="redirectTo('/pages_promotion/groupbuy/detail', { groupbuy_id: item.groupbuy_id })">
|
|
||||||
<!-- <view v-else-if="item.promotion_type == 'groupbuy'" class="item" @click="redirectTo('/pages_promotion/groupbuy/detail', { id: item.groupbuy_id })"> -->
|
<!-- <view v-else-if="item.promotion_type == 'groupbuy'" class="item" @click="redirectTo('/pages_promotion/groupbuy/detail', { id: item.groupbuy_id })"> -->
|
||||||
<text class="promotion-mark ">团购</text>
|
<text class="promotion-mark ">团购</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'pintuan'" class="item"
|
<view v-else-if="item.promotion_type == 'pintuan'" class="item" @click="redirectTo('/pages_promotion/pintuan/detail', { pintuan_id: item.pintuan_id })">
|
||||||
@click="redirectTo('/pages_promotion/pintuan/detail', { pintuan_id: item.pintuan_id })">
|
|
||||||
<text class="promotion-mark ">拼团</text>
|
<text class="promotion-mark ">拼团</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'seckill'" class="item"
|
<view v-else-if="item.promotion_type == 'seckill'" class="item" @click="redirectTo('/pages_promotion/seckill/detail', { seckill_id: item.id })">
|
||||||
@click="redirectTo('/pages_promotion/seckill/detail', { seckill_id: item.id })">
|
|
||||||
<text class="promotion-mark ">秒杀</text>
|
<text class="promotion-mark ">秒杀</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'topic'" class="item"
|
<view v-else-if="item.promotion_type == 'topic'" class="item" @click="redirectTo('/pages_promotion/topics/goods_detail', { id: item.id })">
|
||||||
@click="redirectTo('/pages_promotion/topics/goods_detail', { id: item.id })">
|
|
||||||
<text class="promotion-mark ">专题活动</text>
|
<text class="promotion-mark ">专题活动</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'bargain'" class="item"
|
<view v-else-if="item.promotion_type == 'bargain'" class="item" @click="redirectTo('/pages_promotion/bargain/detail', { b_id: item.bargain_id })">
|
||||||
@click="redirectTo('/pages_promotion/bargain/detail', { b_id: item.bargain_id })">
|
|
||||||
<text class="promotion-mark ">砍价</text>
|
<text class="promotion-mark ">砍价</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" /></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.promotion_type == 'pinfan'" class="item"
|
<view v-else-if="item.promotion_type == 'pinfan'" class="item" @click="redirectTo('/pages_promotion/pinfan/detail', { pinfan_id: item.pintuan_id })">
|
||||||
@click="redirectTo('/pages_promotion/pinfan/detail', { pinfan_id: item.pintuan_id })">
|
|
||||||
<text class="promotion-mark ">拼团返利</text>
|
<text class="promotion-mark ">拼团返利</text>
|
||||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||||
<text class="iconfont icon-right"></text>
|
<text class="iconfont icon-right"></text>
|
||||||
@@ -71,7 +64,7 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() { },
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
refresh(goodsPromotion) {
|
refresh(goodsPromotion) {
|
||||||
this.goodsPromotion = goodsPromotion;
|
this.goodsPromotion = goodsPromotion;
|
||||||
@@ -86,16 +79,14 @@ export default {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ns-goods-promotion {
|
.ns-goods-promotion {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
& > view {
|
||||||
&>view {}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
border-bottom: 2rpx solid $color-line;
|
border-bottom: 2rpx solid $color-line;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
@@ -124,7 +115,6 @@ export default {
|
|||||||
.img-wrap {
|
.img-wrap {
|
||||||
width: 38rpx;
|
width: 38rpx;
|
||||||
height: 38rpx;
|
height: 38rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -15,19 +15,21 @@
|
|||||||
<view class="icon-box"><text class="iconfont icon-tutechan"></text></view>
|
<view class="icon-box"><text class="iconfont icon-tutechan"></text></view>
|
||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
<view class="promotion-text">限时折扣</view>
|
<view class="promotion-text">限时折扣</view>
|
||||||
<view class="sale-num" v-if="goodsSkuDetail.sale_show">已售{{ goodsSkuDetail.sale_num }}{{
|
<view class="sale-num" v-if="goodsSkuDetail.sale_show">已售{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
|
||||||
goodsSkuDetail.unit }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="countdown">
|
<view class="countdown">
|
||||||
<view class="txt">距结束仅剩</view>
|
<view class="txt">距结束仅剩</view>
|
||||||
<view class="clockrun">
|
<view class="clockrun">
|
||||||
<uni-count-down :day="goodsSkuDetail.discountTimeMachine.d"
|
<uni-count-down
|
||||||
|
:day="goodsSkuDetail.discountTimeMachine.d"
|
||||||
:hour="goodsSkuDetail.discountTimeMachine.h"
|
:hour="goodsSkuDetail.discountTimeMachine.h"
|
||||||
:minute="goodsSkuDetail.discountTimeMachine.i"
|
:minute="goodsSkuDetail.discountTimeMachine.i"
|
||||||
:second="goodsSkuDetail.discountTimeMachine.s" splitorColor="#ffffff"
|
:second="goodsSkuDetail.discountTimeMachine.s"
|
||||||
backgroundColor="#ffffff" />
|
splitorColor="#ffffff"
|
||||||
|
backgroundColor="#ffffff"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -38,21 +40,16 @@
|
|||||||
<block v-if="goodsSkuDetail.isinformation == 0">
|
<block v-if="goodsSkuDetail.isinformation == 0">
|
||||||
<template v-if="showDiscount">
|
<template v-if="showDiscount">
|
||||||
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-font">{{
|
<text class="price price-font">{{ parseFloat(goodsSkuDetail.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsSkuDetail.discount_price).toFixed(2).split('.')[0] }}</text>
|
<text class="price-symbol price-font">.{{ parseFloat(goodsSkuDetail.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="price-symbol price-font">.{{
|
|
||||||
parseFloat(goodsSkuDetail.discount_price).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="goodsSkuDetail.member_price > 0">
|
<template v-if="goodsSkuDetail.member_price > 0">
|
||||||
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-font">{{
|
<text class="price price-font">{{ parseFloat(goodsSkuDetail.member_price).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsSkuDetail.member_price).toFixed(2).split('.')[0] }}</text>
|
<text class="price-symbol price-font">.{{ parseFloat(goodsSkuDetail.member_price).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="price-symbol price-font">.{{
|
|
||||||
parseFloat(goodsSkuDetail.member_price).toFixed(2).split('.')[1] }}</text>
|
|
||||||
<view class="member-vip-wrap">
|
<view class="member-vip-wrap">
|
||||||
<image :src="$util.img('public/uniapp/goods/member_vip.png')"
|
<image :src="$util.img('public/uniapp/goods/member_vip.png')" mode="aspectFit"/>
|
||||||
mode="aspectFit" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-wrap" v-if="!goodsSkuDetail.market_price_show">
|
<view class="member-price-wrap" v-if="!goodsSkuDetail.market_price_show">
|
||||||
<text class="unit price-font">原价</text>
|
<text class="unit price-font">原价</text>
|
||||||
@@ -62,51 +59,40 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
<text class="price-symbol price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-font">{{
|
<text class="price price-font">{{ parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[0] }}</text>
|
<text class="price-symbol price-font">.{{ parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="price-symbol price-font">.{{
|
|
||||||
parseFloat(goodsSkuDetail.price).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<view class="market-price-wrap" v-if="goodsSkuDetail.market_price_show">
|
<view class="market-price-wrap" v-if="goodsSkuDetail.market_price_show">
|
||||||
<text class="unit price-font"
|
<text class="unit price-font" v-if="(showDiscount && goodsSkuDetail.price > 0) || goodsSkuDetail.market_price > 0">
|
||||||
v-if="(showDiscount && goodsSkuDetail.price > 0) || goodsSkuDetail.market_price > 0">
|
|
||||||
{{ $lang('common.currencySymbol') }}
|
{{ $lang('common.currencySymbol') }}
|
||||||
</text>
|
</text>
|
||||||
<text class="money price-font" v-if="showDiscount && goodsSkuDetail.price > 0">{{
|
<text class="money price-font" v-if="showDiscount && goodsSkuDetail.price > 0">{{ goodsSkuDetail.price }}</text>
|
||||||
goodsSkuDetail.price }}</text>
|
<text class="money price-font" v-else-if="goodsSkuDetail.market_price > 0">{{ goodsSkuDetail.market_price }}</text>
|
||||||
<text class="money price-font" v-else-if="goodsSkuDetail.market_price > 0">{{
|
|
||||||
goodsSkuDetail.market_price }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="follow-and-share">
|
<view class="follow-and-share">
|
||||||
<text class="follow iconfont icon-share" @click="openSharePopup()"></text>
|
<text class="follow iconfont icon-share" @click="openSharePopup()"></text>
|
||||||
<text class="share iconfont" @click="editCollection()"
|
<text class="share iconfont" @click="editCollection()" :class="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"></text>
|
||||||
:class="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"></text>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<template>
|
<template>
|
||||||
<text class="price price-font" style="font-weight: 600;">{{ $lang('makebtn') }}</text>
|
<text class="price price-font" style="font-weight: 600;">{{$lang('makebtn')}}</text>
|
||||||
</template>
|
</template>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="goods-module-wrap info">
|
<view class="goods-module-wrap info">
|
||||||
<text class="sku-name-wrap">{{ isEnEnv ? goodsSkuDetail.en_goods_name :
|
<text class="sku-name-wrap">{{ isEnEnv ? goodsSkuDetail.en_goods_name : goodsSkuDetail.goods_name }}</text>
|
||||||
goodsSkuDetail.goods_name }}</text>
|
<text class="introduction" v-if="goodsSkuDetail.introduction" :style="{ color: goodsSkuDetail.config ? goodsSkuDetail.config.introduction_color : '' }">
|
||||||
<text class="introduction" v-if="goodsSkuDetail.introduction"
|
|
||||||
:style="{ color: goodsSkuDetail.config ? goodsSkuDetail.config.introduction_color : '' }">
|
|
||||||
{{ goodsSkuDetail.introduction }}
|
{{ goodsSkuDetail.introduction }}
|
||||||
</text>
|
</text>
|
||||||
<view class="goods-tag-list" v-if="goodsSkuDetail.label_name">
|
<view class="goods-tag-list" v-if="goodsSkuDetail.label_name">
|
||||||
<text class="tag-item">{{ goodsSkuDetail.label_name }}</text>
|
<text class="tag-item">{{ goodsSkuDetail.label_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="logistics-wrap">
|
<view class="logistics-wrap">
|
||||||
<text v-if="goodsSkuDetail.stock_show">{{ $lang('stock') }}: {{ goodsSkuDetail.stock
|
<text v-if="goodsSkuDetail.stock_show">{{$lang('stock')}}: {{ goodsSkuDetail.stock +goodsSkuDetail.unit}}</text>
|
||||||
+ goodsSkuDetail.unit }}</text>
|
<text v-if="goodsSkuDetail.sale_show">{{$lang('sales')}}: {{ goodsSkuDetail.sale_num+goodsSkuDetail.unit }}</text>
|
||||||
<text v-if="goodsSkuDetail.sale_show">{{ $lang('sales') }}: {{
|
|
||||||
goodsSkuDetail.sale_num + goodsSkuDetail.unit
|
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 会员卡 -->
|
<!-- 会员卡 -->
|
||||||
<!-- <view class="member-card-wrap" @click="$util.redirectTo('/pages_tool/member/card_buy')" v-if="membercard">
|
<!-- <view class="member-card-wrap" @click="$util.redirectTo('/pages_tool/member/card_buy')" v-if="membercard">
|
||||||
@@ -118,27 +104,23 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 当前商品参与的营销活动入口 -->
|
<!-- 当前商品参与的营销活动入口 -->
|
||||||
<view class="group-wrap"><ns-goods-promotion ref="goodsPromotion"
|
<view class="group-wrap"><ns-goods-promotion ref="goodsPromotion" promotion="discount"></ns-goods-promotion></view>
|
||||||
promotion="discount"></ns-goods-promotion></view>
|
|
||||||
|
|
||||||
<view class="group-wrap fenxiao-detail" v-if="
|
<view class="group-wrap fenxiao-detail"
|
||||||
|
v-if="
|
||||||
goodsSkuDetail.fenxiao_detail &&
|
goodsSkuDetail.fenxiao_detail &&
|
||||||
goodsSkuDetail.fenxiao_detail.words_account &&
|
goodsSkuDetail.fenxiao_detail.words_account &&
|
||||||
goodsSkuDetail.fenxiao_detail.commission_money > 0 &&
|
goodsSkuDetail.fenxiao_detail.commission_money > 0 &&
|
||||||
goodsSkuDetail.fenxiao_detail.is_commission_money == 1
|
goodsSkuDetail.fenxiao_detail.is_commission_money == 1
|
||||||
">
|
">
|
||||||
<view class="title color-base-text">{{ $lang('commission') }}</view>
|
<view class="title color-base-text">{{$lang('commission')}}</view>
|
||||||
<view class="commission-ratio">
|
<view class="commission-ratio">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view>One {{ $lang('commissiontext') }}</view>
|
<view>One {{$lang('commissiontext')}}</view>
|
||||||
<view class="price-color">
|
<view class="price-color">
|
||||||
<text class="unit">¥</text>
|
<text class="unit">¥</text>
|
||||||
<text class="money">{{
|
<text class="money">{{ parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[0]
|
<text class="unit">.{{ parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[1] }}</text>
|
||||||
}}</text>
|
|
||||||
<text class="unit">.{{
|
|
||||||
parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[1]
|
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -176,10 +158,9 @@
|
|||||||
<!--多规格-->
|
<!--多规格-->
|
||||||
<template v-slot:skuspec>
|
<template v-slot:skuspec>
|
||||||
<view class="item selected-sku-spec" @click="buyNow()">
|
<view class="item selected-sku-spec" @click="buyNow()">
|
||||||
<view class="label">{{ $lang('spec') }}</view>
|
<view class="label">{{$lang('spec')}}</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<text v-for="(item, index) in goodsSkuDetail.sku_spec_format" :key="index">{{ item.spec_name
|
<text v-for="(item, index) in goodsSkuDetail.sku_spec_format" :key="index">{{ item.spec_name }}/{{ item.spec_value_name }}</text>
|
||||||
}}/{{ item.spec_value_name }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<text class="iconfont iconright"></text>
|
<text class="iconfont iconright"></text>
|
||||||
</view>
|
</view>
|
||||||
@@ -221,9 +202,16 @@
|
|||||||
<!-- 业务区域 -->
|
<!-- 业务区域 -->
|
||||||
<template v-slot:business>
|
<template v-slot:business>
|
||||||
<!-- SKU选择 -->
|
<!-- SKU选择 -->
|
||||||
<ns-goods-sku v-if="goodsSkuDetail.goods_id" ref="goodsSku" @refresh="refreshGoodsSkuDetail"
|
<ns-goods-sku
|
||||||
:goods-id="goodsSkuDetail.goods_id" :goods-detail="goodsSkuDetail" :max-buy="goodsSkuDetail.max_buy"
|
v-if="goodsSkuDetail.goods_id"
|
||||||
:min-buy="goodsSkuDetail.min_buy" @getSkuId="setSkuId"></ns-goods-sku>
|
ref="goodsSku"
|
||||||
|
@refresh="refreshGoodsSkuDetail"
|
||||||
|
:goods-id="goodsSkuDetail.goods_id"
|
||||||
|
:goods-detail="goodsSkuDetail"
|
||||||
|
:max-buy="goodsSkuDetail.max_buy"
|
||||||
|
:min-buy="goodsSkuDetail.min_buy"
|
||||||
|
@getSkuId="setSkuId"
|
||||||
|
></ns-goods-sku>
|
||||||
|
|
||||||
<!-- 组合套餐 -->
|
<!-- 组合套餐 -->
|
||||||
<view v-if="bundling.length && bundling[0].bl_name && addonIsExist.bundling">
|
<view v-if="bundling.length && bundling[0].bl_name && addonIsExist.bundling">
|
||||||
@@ -240,25 +228,21 @@
|
|||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<view class="goods-item" @click="toGoodsDetail(skuId)" v-if="bundlingType == true">
|
<view class="goods-item" @click="toGoodsDetail(skuId)" v-if="bundlingType == true">
|
||||||
<view class="combo-img">
|
<view class="combo-img">
|
||||||
<image :src="$util.img(goodsSkuDetail.sku_image, { size: 'mid' })"
|
<image :src="$util.img(goodsSkuDetail.sku_image, { size: 'mid' })" @error="imageError()" />
|
||||||
@error="imageError()" />
|
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-font">{{ goodsSkuDetail.price }}</text>
|
<text class="price price-font">{{ goodsSkuDetail.price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="name">{{ isEnEnv ? goodsSkuDetail.en_goods_name :
|
<text class="name">{{ isEnEnv ? goodsSkuDetail.en_goods_name : goodsSkuDetail.goods_name }}</text>
|
||||||
goodsSkuDetail.goods_name }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<block v-for="(item, index) in bundling[0].bundling_goods" :key="index">
|
<block v-for="(item, index) in bundling[0].bundling_goods" :key="index">
|
||||||
<template v-if="index < 3">
|
<template v-if="index < 3">
|
||||||
<view class="goods-item" @click="toGoodsDetail(item.sku_id)">
|
<view class="goods-item" @click="toGoodsDetail(item.sku_id)">
|
||||||
<view class="combo-img">
|
<view class="combo-img">
|
||||||
<image :src="$util.img(item.sku_image, { size: 'mid' })"
|
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="bundlingImageError(0, index)" />
|
||||||
@error="bundlingImageError(0, index)" />
|
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<text class="unit price-font">{{ $lang('common.currencySymbol')
|
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
}}</text>
|
|
||||||
<text class="price price-font">{{ item.price }}</text>
|
<text class="price price-font">{{ item.price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -289,35 +273,22 @@
|
|||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<view class="goods-item" @click="toGoodsDetail(skuId)">
|
<view class="goods-item" @click="toGoodsDetail(skuId)">
|
||||||
<view class="combo-img">
|
<view class="combo-img">
|
||||||
<image
|
<image :src="$util.img(goodsSkuDetail.sku_image, { size: 'mid' })" @error="imageError()" />
|
||||||
:src="$util.img(goodsSkuDetail.sku_image, { size: 'mid' })"
|
|
||||||
@error="imageError()" />
|
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<text class="unit price-font">{{
|
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol')
|
<text class="price price-font">{{ goodsSkuDetail.price }}</text>
|
||||||
}}</text>
|
|
||||||
<text class="price price-font">{{
|
|
||||||
goodsSkuDetail.price }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="name">{{ isEnEnv ? goodsSkuDetail.en_goods_name
|
<text class="name">{{ isEnEnv ? goodsSkuDetail.en_goods_name : goodsSkuDetail.goods_name }}</text>
|
||||||
:
|
|
||||||
goodsSkuDetail.goods_name }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<block v-for="(goods, goods_index) in item.bundling_goods"
|
<block v-for="(goods, goods_index) in item.bundling_goods" :key="goods_index">
|
||||||
:key="goods_index">
|
|
||||||
<template v-if="goods_index < 3">
|
<template v-if="goods_index < 3">
|
||||||
<view class="goods-item"
|
<view class="goods-item" @click="toGoodsDetail(goods.sku_id)">
|
||||||
@click="toGoodsDetail(goods.sku_id)">
|
|
||||||
<view class="combo-img">
|
<view class="combo-img">
|
||||||
<image
|
<image :src="$util.img(goods.sku_image, { size: 'mid' })" @error="bundlingImageError(index, goods_index)" />
|
||||||
:src="$util.img(goods.sku_image, { size: 'mid' })"
|
|
||||||
@error="bundlingImageError(index, goods_index)" />
|
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<text class="unit price-font">{{
|
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
<text class="price price-font">{{ goods.price }}</text>
|
||||||
<text class="price price-font">{{
|
|
||||||
goods.price }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="name">{{ goods.sku_name }}</text>
|
<text class="name">{{ goods.sku_name }}</text>
|
||||||
@@ -328,11 +299,9 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="bundling-price-wrap">
|
<view class="bundling-price-wrap">
|
||||||
<text class="label">套餐价</text>
|
<text class="label">套餐价</text>
|
||||||
<text class="unit price-color">{{ $lang('common.currencySymbol')
|
<text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||||
}}</text>
|
|
||||||
<text class="price price-color">{{ item.bl_price }}</text>
|
<text class="price price-color">{{ item.bl_price }}</text>
|
||||||
<button type="primary" size="mini" class="mini"
|
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">立即购买</button>
|
||||||
@click="toComoDetail(item.bl_id)">立即购买</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@@ -352,13 +321,10 @@
|
|||||||
<text class="iconfont icon-close"></text>
|
<text class="iconfont icon-close"></text>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="coupon-body" scroll-y>
|
<scroll-view class="coupon-body" scroll-y>
|
||||||
<view class="coupon-item ns-gradient-diy-goods-list" v-for="(item, index) in couponList"
|
<view class="coupon-item ns-gradient-diy-goods-list" v-for="(item, index) in couponList" :key="index" v-if="hackReset">
|
||||||
:key="index" v-if="hackReset">
|
<view class="coupon-info" :style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
||||||
<view class="coupon-info"
|
|
||||||
:style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
|
||||||
<view class="info-wrap" :class="{ disabled: item.useState == 2 }">
|
<view class="info-wrap" :class="{ disabled: item.useState == 2 }">
|
||||||
<image class="coupon-line" mode="heightFix"
|
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
||||||
:src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
|
||||||
<view class="coupon-money">
|
<view class="coupon-money">
|
||||||
<template v-if="item.type == 'reward'">
|
<template v-if="item.type == 'reward'">
|
||||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||||
@@ -380,14 +346,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="desc-wrap">
|
<view class="desc-wrap">
|
||||||
<view class="coupon-name">{{ item.coupon_name }}</view>
|
<view class="coupon-name">{{ item.coupon_name }}</view>
|
||||||
<view v-if="item.type == 'discount' && item.discount_limit > 0"
|
<view v-if="item.type == 'discount' && item.discount_limit > 0" class="limit">最多可抵¥{{ item.discount_limit }}</view>
|
||||||
class="limit">最多可抵¥{{
|
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">有效期:{{ $util.timeStampTurnTime(item.end_time) }}</view>
|
||||||
item.discount_limit }}</view>
|
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">有效期:领取之日起{{ item.fixed_term }}天内有效</view>
|
||||||
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">有效期:{{
|
|
||||||
$util.timeStampTurnTime(item.end_time) }}</view>
|
|
||||||
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">
|
|
||||||
有效期:领取之日起{{
|
|
||||||
item.fixed_term }}天内有效</view>
|
|
||||||
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -397,8 +358,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="button-box"><button type="primary" @click="closeCouponPopup()">确定</button>
|
<view class="button-box"><button type="primary" @click="closeCouponPopup()">确定</button></view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
@@ -425,8 +385,7 @@
|
|||||||
<text class="font-size-base">{{ manjian.free_shipping }}</text>
|
<text class="font-size-base">{{ manjian.free_shipping }}</text>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="button-box"><button type="primary" @click="closeManjianPopup()">确定</button>
|
<view class="button-box"><button type="primary" @click="closeManjianPopup()">确定</button></view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
@@ -438,7 +397,7 @@
|
|||||||
<text>商品留言</text>
|
<text>商品留言</text>
|
||||||
<text class="iconfont icon-close"></text>
|
<text class="iconfont icon-close"></text>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="manjian-body">
|
<scroll-view scroll-y class="manjian-body" >
|
||||||
<!-- <view class="item" v-if="manjian.manjian != undefined" style="display: flex;">
|
<!-- <view class="item" v-if="manjian.manjian != undefined" style="display: flex;">
|
||||||
<view class="free-tip color-base-text color-base-border">满减</view>
|
<view class="free-tip color-base-text color-base-border">满减</view>
|
||||||
<text class="font-size-base">{{ manjian.manjian }}</text>
|
<text class="font-size-base">{{ manjian.manjian }}</text>
|
||||||
@@ -456,8 +415,7 @@
|
|||||||
<ns-form :data="informationform" ref="form"></ns-form>
|
<ns-form :data="informationform" ref="form"></ns-form>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="button-box"><button type="primary" @click="saveubfirnation()">确定</button>
|
<view class="button-box"><button type="primary" @click="saveubfirnation()">确定</button></view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
<!-- <uni-popup ref="informationPopup" type="bottom" class="sku-layer" @change="popclose">
|
<!-- <uni-popup ref="informationPopup" type="bottom" class="sku-layer" @change="popclose">
|
||||||
@@ -480,40 +438,38 @@
|
|||||||
|
|
||||||
<template v-if="goodsSkuDetail.goods_state == 1">
|
<template v-if="goodsSkuDetail.goods_state == 1">
|
||||||
|
|
||||||
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('status')"
|
<ns-goods-action-button
|
||||||
|
class="goods-action-button active3"
|
||||||
|
:disabled-text="$lang('status')"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
v-if="goodsSkuDetail.store_goods_status != undefined && goodsSkuDetail.store_goods_status != 1" />
|
v-if="goodsSkuDetail.store_goods_status != undefined && goodsSkuDetail.store_goods_status != 1"
|
||||||
|
/>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<ns-goods-action-icon :text="$lang('home')" icon="icon-shouye1" @click="goHome" />
|
<ns-goods-action-icon :text="$lang('home')" icon="icon-shouye1" @click="goHome" />
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<ns-goods-action-icon :text="$lang('cart')"
|
<ns-goods-action-icon
|
||||||
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner" icon="icon-gouwuche2"
|
:text="$lang('cart')"
|
||||||
:corner-mark="cartNumber > 0 ? cartNumber + '' : ''" @click="goCart" />
|
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner"
|
||||||
<ns-goods-action-icon :text="$lang('kefu')" icon="icox icox-kefu" :send-data="contactData"
|
icon="icon-gouwuche2"
|
||||||
:chatParam="chatRoomParams" />
|
:corner-mark="cartNumber > 0 ? cartNumber + '' : ''"
|
||||||
|
@click="goCart"
|
||||||
|
/>
|
||||||
|
<ns-goods-action-icon :text="$lang('kefu')" icon="icox icox-kefu" :send-data="contactData" :chatParam="chatRoomParams" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<ns-goods-action-icon :text="$lang('follow')"
|
<ns-goods-action-icon :text="$lang('follow')" :icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'" @click="editCollection" />
|
||||||
:icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"
|
|
||||||
@click="editCollection" />
|
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<block v-if="goodsSkuDetail.isinformation >= 1">
|
<block v-if="goodsSkuDetail.isinformation >= 1">
|
||||||
|
|
||||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1"
|
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="phoneClick(goodsSkuDetail.goods_mobile)" :text="$lang('make')" :disabled="false" />
|
||||||
class="goods-action-button active3" disabled-text="" backgroundColor="#54c952"
|
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="showinformation" :text="$lang('leave')" :disabled="false" />
|
||||||
@click="phoneClick(goodsSkuDetail.goods_mobile)" :text="$lang('make')"
|
|
||||||
:disabled="false" />
|
|
||||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2"
|
|
||||||
class="goods-action-button active3" disabled-text="" backgroundColor="#54c952"
|
|
||||||
@click="showinformation" :text="$lang('leave')" :disabled="false" />
|
|
||||||
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
|
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
||||||
<ns-goods-action-button class="goods-action-button active3"
|
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('sellout')" :disabled="true" />
|
||||||
:disabled-text="$lang('sellout')" :disabled="true" />
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else-if="
|
<block v-else-if="
|
||||||
goodsSkuDetail.is_limit == 1 &&
|
goodsSkuDetail.is_limit == 1 &&
|
||||||
@@ -521,17 +477,23 @@
|
|||||||
goodsSkuDetail.max_buy != 0 &&
|
goodsSkuDetail.max_buy != 0 &&
|
||||||
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
|
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
|
||||||
">
|
">
|
||||||
<ns-goods-action-button class="goods-action-button active3"
|
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('max')" :disabled="true" />
|
||||||
:disabled-text="$lang('max')" :disabled="true" />
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<ns-goods-action-button class="goods-action-button" :text="$lang('addcart')"
|
<ns-goods-action-button
|
||||||
|
class="goods-action-button"
|
||||||
|
:text="$lang('addcart')"
|
||||||
:backgroundColor="themeStyle.goods_detail.goods_btn_color_shallow"
|
:backgroundColor="themeStyle.goods_detail.goods_btn_color_shallow"
|
||||||
@click="joinCart" v-if="goodsSkuDetail.is_virtual == 0" />
|
@click="joinCart"
|
||||||
<ns-goods-action-button class="goods-action-button"
|
v-if="goodsSkuDetail.is_virtual == 0"
|
||||||
|
/>
|
||||||
|
<ns-goods-action-button
|
||||||
|
class="goods-action-button"
|
||||||
:backgroundColor="themeStyle.goods_detail.goods_btn_color"
|
:backgroundColor="themeStyle.goods_detail.goods_btn_color"
|
||||||
:textColor="themeStyle.btn_text_color" :text="$lang('buynow')"
|
:textColor="themeStyle.btn_text_color"
|
||||||
@click="buyNow" />
|
:text="$lang('buynow')"
|
||||||
|
@click="buyNow"
|
||||||
|
/>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
@@ -539,8 +501,7 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('status')"
|
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('status')" :disabled="true" />
|
||||||
:disabled="true" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -560,25 +521,40 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import nsGoodsAction from '@/pages_goods/components/ns-goods-action/ns-goods-action.vue';
|
||||||
|
import nsGoodsActionIcon from '@/pages_goods/components/ns-goods-action-icon/ns-goods-action-icon.vue';
|
||||||
|
import nsGoodsActionButton from '@/pages_goods/components/ns-goods-action-button/ns-goods-action-button.vue';
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
import nsGoodsSku from '@/components/ns-goods-sku/ns-goods-sku.vue';
|
||||||
|
import uniCountDown from '@/components/uni-count-down/uni-count-down.vue';
|
||||||
import detail from './public/js/detail.js';
|
import detail from './public/js/detail.js';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
|
import nsGoodsPromotion from '@/pages_goods/components/ns-goods-promotion/ns-goods-promotion.vue';
|
||||||
import goodsDetailBase from '@/common/js/goods_detail_base.js';
|
import goodsDetailBase from '@/common/js/goods_detail_base.js';
|
||||||
|
import goodsDetailView from '@/pages_goods/components/goods-detail-view/goods-detail-view.vue';
|
||||||
|
// 按需引入全局组件
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsGoodsAction: () => import('@/pages_goods/components/ns-goods-action/ns-goods-action.vue'),
|
nsGoodsAction,
|
||||||
nsGoodsActionIcon: () => import('@/pages_goods/components/ns-goods-action-icon/ns-goods-action-icon.vue'),
|
nsGoodsActionIcon,
|
||||||
nsGoodsActionButton: () => import('@/pages_goods/components/ns-goods-action-button/ns-goods-action-button.vue'),
|
nsGoodsActionButton,
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
uniPopup,
|
||||||
nsGoodsSku: () => import('@/components/ns-goods-sku/ns-goods-sku.vue'),
|
nsGoodsSku,
|
||||||
uniCountDown: () => import('@/components/uni-count-down/uni-count-down.vue'),
|
uniCountDown,
|
||||||
nsGoodsPromotion: () => import('@/pages_goods/components/ns-goods-promotion/ns-goods-promotion.vue'),
|
nsGoodsPromotion,
|
||||||
goodsDetailView: () => import('@/pages_goods/components/goods-detail-view/goods-detail-view.vue'),
|
goodsDetailView,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
toTop,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup,
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
mixins: [goodsDetailBase, detail, scroll]
|
mixins: [goodsDetailBase, detail, scroll]
|
||||||
@@ -594,12 +570,12 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/deep/ .action-icon-wrap .iconfont.icon-shouye1 {
|
/deep/ .action-icon-wrap .iconfont.icon-shouye1 {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-video-cover {
|
/deep/ .uni-video-cover {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
@@ -616,7 +592,7 @@ export default {
|
|||||||
background-size: 30%;
|
background-size: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-layer>>>.uni-popup__wrapper-box {
|
.poster-layer >>> .uni-popup__wrapper-box {
|
||||||
max-height: initial !important;
|
max-height: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +600,7 @@ export default {
|
|||||||
overflow-y: initial !important;
|
overflow-y: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-promotion .countdown .clockrun>>>.uni-countdown__number {
|
.goods-promotion .countdown .clockrun >>> .uni-countdown__number {
|
||||||
min-width: 32rpx;
|
min-width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -636,14 +612,14 @@ export default {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-promotion .countdown .clockrun>>>.uni-countdown__splitor {
|
.goods-promotion .countdown .clockrun >>> .uni-countdown__splitor {
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-promotion .countdown .clockrun>>>.uni-countdown__splitor.day {
|
.goods-promotion .countdown .clockrun >>> .uni-countdown__splitor.day {
|
||||||
width: initial;
|
width: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,7 +642,6 @@ export default {
|
|||||||
/deep/ .goods-action-button.active4 {
|
/deep/ .goods-action-button.active4 {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .uni-popup__wrapper.bottom {
|
/deep/ .uni-popup__wrapper.bottom {
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,40 +4,31 @@
|
|||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<view class="search-wrap uni-flex uni-row">
|
<view class="search-wrap uni-flex uni-row">
|
||||||
<view class="flex-item input-wrap">
|
<view class="flex-item input-wrap">
|
||||||
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()"
|
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" :placeholder="langstatus?$lang('Search'):'请输入您要搜索的商品'" />
|
||||||
:placeholder="langstatus ? $lang('Search') : '请输入您要搜索的商品'" />
|
|
||||||
<text class="iconfont icon-sousuo3" @click.stop="search()"></text>
|
<text class="iconfont icon-sousuo3" @click.stop="search()"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }"
|
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }" @click="changeListStyle()"></view>
|
||||||
@click="changeListStyle()"></view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<view class="sort-wrap">
|
<view class="sort-wrap">
|
||||||
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }"
|
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }" @click="sortTabClick('')">
|
||||||
@click="sortTabClick('')">
|
<text :class="{ 'color-base-text': orderType === '' }">{{langstatus?$lang('Random'):'综合'}}</text>
|
||||||
<text :class="{ 'color-base-text': orderType === '' }">{{ langstatus ? $lang('Random') : '综合' }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">
|
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">{{langstatus?$lang('Sales'):'销量'}}
|
||||||
{{ langstatus ? $lang('Sales') : '销量' }}
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
||||||
<text
|
<text :class="{ 'color-base-text': orderType === 'discount_price' }">{{langstatus?$lang('Price'):'价格'}}</text>
|
||||||
:class="{ 'color-base-text': orderType === 'discount_price' }">{{ langstatus ? $lang('Price') : '价格' }}</text>
|
|
||||||
<view class="iconfont-wrap">
|
<view class="iconfont-wrap">
|
||||||
<view class="iconfont icon-iconangledown-copy asc"
|
<view class="iconfont icon-iconangledown-copy asc" :class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }"></view>
|
||||||
:class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }">
|
<view class="iconfont icon-iconangledown desc" :class="{ 'color-base-text': priceOrder === 'desc' && orderType === 'discount_price' }"></view>
|
||||||
</view>
|
|
||||||
<view class="iconfont icon-iconangledown desc"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'desc' && orderType === 'discount_price' }">
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap">
|
<view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap">
|
||||||
<text @click="sortTabClick('screen')">{{ langstatus ? $lang('Filter') : '筛选' }}</text>
|
<text @click="sortTabClick('screen')">{{langstatus?$lang('Filter'):'筛选'}}</text>
|
||||||
<view @click="sortTabClick('screen')" class="iconfont-wrap">
|
<view @click="sortTabClick('screen')" class="iconfont-wrap">
|
||||||
<view class="iconfont icon-shaixuan color-tip"></view>
|
<view class="iconfont icon-shaixuan color-tip"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,20 +39,17 @@
|
|||||||
<mescroll-uni top="180" ref="mescroll" @getData="getGoodsList">
|
<mescroll-uni top="180" ref="mescroll" @getData="getGoodsList">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="goods-list single-column" :class="{ show: isList }">
|
<view class="goods-list single-column" :class="{ show: isList }">
|
||||||
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||||
@click="toDetail(item)">
|
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
||||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||||
</view>
|
|
||||||
<view class="sell-out" v-if="item.goods_stock <= 0">
|
<view class="sell-out" v-if="item.goods_stock <= 0">
|
||||||
<text class="iconfont icon-shuqing"></text>
|
<text class="iconfont icon-shuqing"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="name-wrap">
|
<view class="name-wrap">
|
||||||
<view class="goods-name"
|
<view class="goods-name" :class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
||||||
:class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
|
||||||
|
|
||||||
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
@@ -70,18 +58,15 @@
|
|||||||
<view class="lineheight-clear">
|
<view class="lineheight-clear">
|
||||||
<view class="discount-price" v-if="item.isinformation == 0">
|
<view class="discount-price" v-if="item.isinformation == 0">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-style large">{{
|
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ langstatus ? $lang('Make') : '询底价' }}</text>
|
<text class="price price-style large">{{langstatus?$lang('Make'):'询底价'}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="member-price-tag"
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||||
@@ -94,8 +79,7 @@
|
|||||||
<text>{{ showMarketPrice(item) }}</text>
|
<text>{{ showMarketPrice(item) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="block-wrap">
|
<view class="block-wrap">
|
||||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||||
? item.unit : '件' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
@@ -134,8 +118,7 @@
|
|||||||
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
<diy-icon :icon="config.iconDiy.icon"
|
<diy-icon :icon="config.iconDiy.icon" :value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
||||||
:value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -144,35 +127,29 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="goods-list double-column" :class="{ show: !isList }">
|
<view class="goods-list double-column" :class="{ show: !isList }">
|
||||||
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
||||||
@click="toDetail(item)"
|
@click="toDetail(item)" :style="{ left: listPosition[index] ? listPosition[index].left : '', top: listPosition[index] ? listPosition[index].top : '' }">
|
||||||
:style="{ left: listPosition[index] ? listPosition[index].left : '', top: listPosition[index] ? listPosition[index].top : '' }">
|
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
||||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||||
</view>
|
|
||||||
<view class="sell-out" v-if="item.stock <= 0">
|
<view class="sell-out" v-if="item.stock <= 0">
|
||||||
<text class="iconfont icon-shuqing"></text>
|
<text class="iconfont icon-shuqing"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="goods-name"
|
<view class="goods-name" :class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
||||||
:class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
|
||||||
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="lineheight-clear">
|
<view class="lineheight-clear">
|
||||||
<view class="discount-price" v-if="item.isinformation == 0">
|
<view class="discount-price" v-if="item.isinformation == 0">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-style large">{{
|
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ langstatus ? $lang('Make') : '询底价' }}</text>
|
<text class="price price-style large">{{langstatus?$lang('Make'):'询底价'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag"
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||||
@@ -184,9 +161,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pro-info" v-if="item.isinformation == 0">
|
<view class="pro-info" v-if="item.isinformation == 0">
|
||||||
<view class="block-wrap">
|
<view class="block-wrap" >
|
||||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||||
? item.unit : '件' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
@@ -225,8 +201,7 @@
|
|||||||
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
<diy-icon :icon="config.iconDiy.icon"
|
<diy-icon :icon="config.iconDiy.icon" :value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
||||||
:value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -278,11 +253,8 @@
|
|||||||
<view @click="selectedCategory('')" class="list-wrap">
|
<view @click="selectedCategory('')" class="list-wrap">
|
||||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
|
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
|
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList" :key="index" class="list-wrap">
|
||||||
:key="index" class="list-wrap">
|
<text :class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{ item.category_name }}</text>
|
||||||
<text
|
|
||||||
:class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{
|
|
||||||
item.category_name }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -307,37 +279,45 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
|
||||||
import list from './public/js/list.js';
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
||||||
|
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
|
||||||
export default {
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
components: {
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
uniDrawer: () => import('@/components/uni-drawer/uni-drawer.vue'),
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
uniTag: () => import('@/components/uni-tag/uni-tag.vue'),
|
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
import list from './public/js/list.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
uniDrawer,
|
||||||
|
uniTag,
|
||||||
|
nsGoodsSkuIndex,
|
||||||
|
nsEmpty,
|
||||||
|
MescrollUni,
|
||||||
|
loadingCover,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
mixins: [list]
|
mixins: [list]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import './public/css/list.scss';
|
@import './public/css/list.scss';
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
/deep/ .uni-tag--primary.uni-tag--inverted {
|
>>>.uni-tag--primary.uni-tag--inverted {
|
||||||
background-color: #f5f5f5 !important;
|
background-color: #f5f5f5 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -367,7 +367,7 @@ export default {
|
|||||||
cart_ids: cart_ids.toString()
|
cart_ids: cart_ids.toString()
|
||||||
},
|
},
|
||||||
success: () => {
|
success: () => {
|
||||||
this.$util.redirectTo('/pages_order/base/payment');
|
this.$util.redirectTo('/pages_order/payment');
|
||||||
this.isSub = false;
|
this.isSub = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<view class="status-wrap color-base-bg"
|
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
||||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
|
||||||
<view class="order-status-left">
|
<view class="order-status-left">
|
||||||
<image :src="$util.img(action.icon)"></image>
|
<image :src="$util.img(action.icon)"></image>
|
||||||
<view class="status-name">
|
<view class="status-name">
|
||||||
@@ -109,11 +108,8 @@
|
|||||||
<text class="copy" @click="$util.copy(orderData.delivery_code)">复制</text>
|
<text class="copy" @click="$util.copy(orderData.delivery_code)">复制</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="code">
|
<view class="code">
|
||||||
<image :src="$util.img(orderData.pickup_barcode)"
|
<image :src="$util.img(orderData.pickup_barcode)" @click="previewMedia($util.img(orderData.pickup_barcode))" class="barcode" mode="widthFix"/>
|
||||||
@click="previewMedia($util.img(orderData.pickup_barcode))" class="barcode"
|
<image :src="$util.img(orderData.pickup)" @click="previewMedia($util.img(orderData.pickup))" class="qrcode" mode="widthFix"/>
|
||||||
mode="widthFix" />
|
|
||||||
<image :src="$util.img(orderData.pickup)" @click="previewMedia($util.img(orderData.pickup))"
|
|
||||||
class="qrcode" mode="widthFix" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -125,8 +121,7 @@
|
|||||||
<view v-for="(goodsItem, goodsIndex) in orderData.order_goods" :key="goodsIndex" class="goods-item">
|
<view v-for="(goodsItem, goodsIndex) in orderData.order_goods" :key="goodsIndex" class="goods-item">
|
||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<view class="goods-img" @click="goDetail(goodsItem)">
|
<view class="goods-img" @click="goDetail(goodsItem)">
|
||||||
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
|
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(goodsIndex)" mode="aspectFill"/>
|
||||||
@error="imageError(goodsIndex)" mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info" @click="goDetail(goodsItem)">
|
<view class="goods-info" @click="goDetail(goodsItem)">
|
||||||
<view class="goods-name">{{ goodsItem.sku_name }}</view>
|
<view class="goods-name">{{ goodsItem.sku_name }}</view>
|
||||||
@@ -134,18 +129,16 @@
|
|||||||
<view class="goods-spec">
|
<view class="goods-spec">
|
||||||
<block v-for="(x, i) in goodsItem.sku_spec_format" :key="i">
|
<block v-for="(x, i) in goodsItem.sku_spec_format" :key="i">
|
||||||
{{ x.spec_value_name }}
|
{{ x.spec_value_name }}
|
||||||
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }} </block>
|
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-sub-section">
|
<view class="goods-sub-section">
|
||||||
<view>
|
<view>
|
||||||
<text class="goods-price ">
|
<text class="goods-price ">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price-style large">{{
|
<text class="price-style large">{{ parseFloat(goodsItem.price).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsItem.price).toFixed(2).split('.')[0]
|
<text class="unit price-style small">.{{ parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}</text>
|
||||||
}}</text>
|
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(goodsItem.price).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@@ -159,10 +152,8 @@
|
|||||||
次卡抵扣
|
次卡抵扣
|
||||||
<text class="goods-price ">
|
<text class="goods-price ">
|
||||||
<text class="unit price-style small">-{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">-{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price-style large">{{
|
<text class="price-style large">{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[0] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(goodsItem.card_promotion_money).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -173,8 +164,7 @@
|
|||||||
<text class="tit">{{ item.value.title }}:</text>
|
<text class="tit">{{ item.value.title }}:</text>
|
||||||
<view class="box img-box" v-if="item.controller == 'Img'">
|
<view class="box img-box" v-if="item.controller == 'Img'">
|
||||||
<view class="img" v-for="(img, imgIndex) in item.img_lists" :key="imgIndex">
|
<view class="img" v-for="(img, imgIndex) in item.img_lists" :key="imgIndex">
|
||||||
<image :src="$util.img(img)" mode="widthFix"
|
<image :src="$util.img(img)" mode="widthFix" @click="previewMedia($util.img(img))"/>
|
||||||
@click="previewMedia($util.img(img))" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-else>
|
<view class="box" v-else>
|
||||||
@@ -186,15 +176,13 @@
|
|||||||
|
|
||||||
<view class="goods-action">
|
<view class="goods-action">
|
||||||
<block v-if="orderData.is_enable_refund">
|
<block v-if="orderData.is_enable_refund">
|
||||||
<view @click="goRefund(goodsItem.order_goods_id)"
|
<view @click="goRefund(goodsItem.order_goods_id)" v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">
|
||||||
v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">
|
|
||||||
<view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">
|
<view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">
|
||||||
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
|
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view @click="goRefundDetail(goodsItem.order_goods_id)"
|
<view @click="goRefundDetail(goodsItem.order_goods_id)" v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">
|
||||||
v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">
|
|
||||||
<view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view>
|
<view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -327,8 +315,7 @@
|
|||||||
<block v-if="orderData.goods_class == 5">
|
<block v-if="orderData.goods_class == 5">
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">我的卡包:</text>
|
<text class="tit">我的卡包:</text>
|
||||||
<view class="box"><text class="color-base-text"
|
<view class="box"><text class="color-base-text" @click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">查看</text></view>
|
||||||
@click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">查看</text></view>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- 联系客服 -->
|
<!-- 联系客服 -->
|
||||||
@@ -362,17 +349,14 @@
|
|||||||
<text class="tit">核销次数</text>
|
<text class="tit">核销次数</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
<text class="color-title">
|
<text class="color-title">
|
||||||
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
|
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num }}次/共{{ orderData.virtual_goods.verify_total_count }}次
|
||||||
}}次/共{{
|
|
||||||
orderData.virtual_goods.verify_total_count }}次
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">有效期</text>
|
<text class="tit">有效期</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
|
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{ $util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
|
||||||
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
|
|
||||||
<text v-else>永久有效</text>
|
<text v-else>永久有效</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -381,8 +365,7 @@
|
|||||||
<view class="verify-info-wrap">
|
<view class="verify-info-wrap">
|
||||||
<view class="head">核销记录</view>
|
<view class="head">核销记录</view>
|
||||||
<view v-if="orderData.virtual_goods.verify_record.length">
|
<view v-if="orderData.virtual_goods.verify_record.length">
|
||||||
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
|
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index" class="record-item">
|
||||||
class="record-item">
|
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">核销人</text>
|
<text class="tit">核销人</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
@@ -443,17 +426,14 @@
|
|||||||
<text class="tit">核销次数</text>
|
<text class="tit">核销次数</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
<text class="color-title">
|
<text class="color-title">
|
||||||
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
|
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num }}次/共{{ orderData.virtual_goods.verify_total_count }}次
|
||||||
}}次/共{{
|
|
||||||
orderData.virtual_goods.verify_total_count }}次
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">有效期</text>
|
<text class="tit">有效期</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
|
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{ $util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
|
||||||
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
|
|
||||||
<text v-else>永久有效</text>
|
<text v-else>永久有效</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -462,8 +442,7 @@
|
|||||||
<view class="verify-info-wrap">
|
<view class="verify-info-wrap">
|
||||||
<view class="head">核销记录</view>
|
<view class="head">核销记录</view>
|
||||||
<view v-if="orderData.virtual_goods.verify_record.length">
|
<view v-if="orderData.virtual_goods.verify_record.length">
|
||||||
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
|
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index" class="record-item">
|
||||||
class="record-item">
|
|
||||||
<view class="order-cell">
|
<view class="order-cell">
|
||||||
<text class="tit">核销人</text>
|
<text class="tit">核销人</text>
|
||||||
<view class="box align-right">
|
<view class="box align-right">
|
||||||
@@ -595,9 +574,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-action fixed-bottom bottom-safe-area" v-if="orderData.action.length > 0">
|
<view class="order-action fixed-bottom bottom-safe-area" v-if="orderData.action.length > 0">
|
||||||
<view class="order-box-btn white"
|
<view class="order-box-btn white" v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1" @click="operation('memberOrderEvaluation')">
|
||||||
v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1"
|
|
||||||
@click="operation('memberOrderEvaluation')">
|
|
||||||
<text v-if="orderData.evaluate_status == 0">评价</text>
|
<text v-if="orderData.evaluate_status == 0">评价</text>
|
||||||
<text v-else-if="orderData.evaluate_status == 1">追评</text>
|
<text v-else-if="orderData.evaluate_status == 1">追评</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -611,8 +588,7 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-action fixed-bottom bottom-safe-area"
|
<view class="order-action fixed-bottom bottom-safe-area" v-else-if="orderData.action.length == 0 && orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
|
||||||
v-else-if="orderData.action.length == 0 && orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
|
|
||||||
<view class="order-box-btn white" @click="operation('memberOrderEvaluation')">
|
<view class="order-box-btn white" @click="operation('memberOrderEvaluation')">
|
||||||
<text v-if="orderData.evaluate_status == 0">评价</text>
|
<text v-if="orderData.evaluate_status == 0">评价</text>
|
||||||
<text v-else-if="orderData.evaluate_status == 1">追评</text>
|
<text v-else-if="orderData.evaluate_status == 1">追评</text>
|
||||||
@@ -621,8 +597,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 订单 -->
|
<!-- 订单 -->
|
||||||
<view class="fixed-bottom-box bottom-safe-area"
|
<view class="fixed-bottom-box bottom-safe-area" v-if="orderData.action.length > 0 || (orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1)">
|
||||||
v-if="orderData.action.length > 0 || (orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1)">
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<ns-goods-recommend ref="goodrecommend" route="order_detail"></ns-goods-recommend>
|
<ns-goods-recommend ref="goodrecommend" route="order_detail"></ns-goods-recommend>
|
||||||
@@ -633,17 +608,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import orderMethod from '../public/js/orderMethod.js';
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
|
import orderMethod from './public/js/orderMethod.js';
|
||||||
export default {
|
import nsPayment from '@/components/payment/payment.vue';
|
||||||
components: {
|
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
export default {
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isIphoneX: false,
|
isIphoneX: false,
|
||||||
@@ -667,6 +636,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mixins: [orderMethod],
|
mixins: [orderMethod],
|
||||||
|
components: {
|
||||||
|
nsGoodsRecommend,
|
||||||
|
nsPayment,
|
||||||
|
nsContact
|
||||||
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.order_id) this.orderId = option.order_id;
|
if (option.order_id) this.orderId = option.order_id;
|
||||||
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
|
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
|
||||||
@@ -679,7 +653,7 @@ export default {
|
|||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo('/pages_tool/login/login', {
|
||||||
back: '/pages_order/detail/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
|
back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -746,7 +720,7 @@ export default {
|
|||||||
title: '未获取到订单信息!'
|
title: '未获取到订单信息!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages_order/base/list');
|
this.$util.redirectTo('/pages_order/list');
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -833,18 +807,17 @@ export default {
|
|||||||
return Math.abs(parseFloat(value)).toFixed(2);
|
return Math.abs(parseFloat(value)).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../public/css/detail.scss';
|
@import './public/css/detail.scss';
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pickup-code-info .code img:nth-child(1) {
|
.pickup-code-info .code img:nth-child(1) {
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -6,15 +6,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.order_id) {
|
if (option.order_id) {
|
||||||
this.$util.redirectTo('/pages_order/detail/detail', {order_id: option.order_id}, 'redirectTo');
|
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -6,15 +6,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.order_id) {
|
if (option.order_id) {
|
||||||
this.$util.redirectTo('/pages_order/detail/detail', {order_id: option.order_id}, 'redirectTo');
|
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
<view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
|
||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<view class="status-wrap color-base-bg"
|
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
||||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
|
|
||||||
<view class="order-status-left">
|
<view class="order-status-left">
|
||||||
<image v-if="orderData.order_status == 0" :src="$util.img('public/uniapp/order/order-icon.png')" />
|
<image v-if="orderData.order_status == 0" :src="$util.img('public/uniapp/order/order-icon.png')"/>
|
||||||
<image v-if="orderData.order_status == 1"
|
<image v-if="orderData.order_status == 1" :src="$util.img('public/uniapp/order/order-icon-received.png')"/>
|
||||||
:src="$util.img('public/uniapp/order/order-icon-received.png')" />
|
<image v-if="orderData.order_status == -1" :src="$util.img('public/uniapp/order/order-icon-close.png')"/>
|
||||||
<image v-if="orderData.order_status == -1"
|
|
||||||
:src="$util.img('public/uniapp/order/order-icon-close.png')" />
|
|
||||||
<view class="status-name">
|
<view class="status-name">
|
||||||
<view class="status-name">
|
<view class="status-name">
|
||||||
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' :
|
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' : orderData.order_status == -1 ? '已关闭' : '' }}
|
||||||
orderData.order_status == -1 ? '已关闭' : '' }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -124,8 +120,7 @@
|
|||||||
|
|
||||||
<view class="order-action" v-if="orderData.order_status == 0 && orderData.type == 1">
|
<view class="order-action" v-if="orderData.order_status == 0 && orderData.type == 1">
|
||||||
<view class="order-box-btn" @click="orderClose()">关闭</view>
|
<view class="order-box-btn" @click="orderClose()">关闭</view>
|
||||||
<view class="order-box-btn color-base-bg color-base-border color-text-white"
|
<view class="order-box-btn color-base-bg color-base-border color-text-white" @click="openChoosePayment()">支付</view>
|
||||||
@click="openChoosePayment()">支付</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -138,14 +133,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
|
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
nsGoodsRecommend,
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
nsContact
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -170,7 +163,7 @@ export default {
|
|||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
} else {
|
} else {
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
this.$util.redirectTo('/pages_tool/login/login', {
|
||||||
back: '/pages_order/detail/detail_point?order_id=' + this.orderId
|
back: '/pages_order/detail_point?order_id=' + this.orderId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -211,7 +204,7 @@ export default {
|
|||||||
title: '未获取到订单信息!'
|
title: '未获取到订单信息!'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$util.redirectTo('/pages_order/base/list');
|
this.$util.redirectTo('/pages_order/list');
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -297,14 +290,14 @@ export default {
|
|||||||
return Math.abs(parseFloat(value)).toFixed(2);
|
return Math.abs(parseFloat(value)).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../public/css/detail.scss';
|
@import './public/css/detail.scss';
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -165,15 +165,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import orderMethod from '../public/js/orderMethod.js';
|
import orderMethod from './public/js/orderMethod.js';
|
||||||
|
import nsPayment from '@/components/payment/payment.vue';
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
nsPayment,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -214,7 +219,7 @@ export default {
|
|||||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||||
} else {
|
} else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.login.open('/pages_order/base/list?status=' + this.orderStatus);
|
this.$refs.login.open('/pages_order/list?status=' + this.orderStatus);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -367,13 +372,13 @@ export default {
|
|||||||
switch (parseInt(data.order_type)) {
|
switch (parseInt(data.order_type)) {
|
||||||
case 2:
|
case 2:
|
||||||
// 自提订单
|
// 自提订单
|
||||||
this.$util.redirectTo('/pages_order/detail/detail_pickup', {
|
this.$util.redirectTo('/pages_order/detail_pickup', {
|
||||||
order_id: data.order_id
|
order_id: data.order_id
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// 本地配送订单
|
// 本地配送订单
|
||||||
this.$util.redirectTo('/pages_order/detail/detail_local_delivery', {
|
this.$util.redirectTo('/pages_order/detail_local_delivery', {
|
||||||
order_id: data.order_id
|
order_id: data.order_id
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -384,7 +389,7 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.$util.redirectTo('/pages_order/detail/detail', {
|
this.$util.redirectTo('/pages_order/detail', {
|
||||||
order_id: data.order_id
|
order_id: data.order_id
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -462,7 +467,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../public/css/list.scss';
|
@import './public/css/list.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -6,9 +6,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
commonPayment: () => import('@/components/common-payment/common-payment.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
api: {
|
api: {
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
<scroll-view scroll-x>
|
<scroll-view scroll-x>
|
||||||
<block v-for="(item, index) in dateArr" :key="index">
|
<block v-for="(item, index) in dateArr" :key="index">
|
||||||
<div class="flex-box" @click="selectDateEvent(index, item)">
|
<div class="flex-box" @click="selectDateEvent(index, item)">
|
||||||
<view class="date-box"
|
<view class="date-box" :style="{ color: index == dateActive ? selectedTabColor : '#909399' }">
|
||||||
:style="{ color: index == dateActive ? selectedTabColor : '#909399' }">
|
|
||||||
<text>{{ item.week }} {{ item.date }}</text>
|
<text>{{ item.week }} {{ item.date }}</text>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,9 +30,7 @@
|
|||||||
<view class="time-box" v-if="!isSection">
|
<view class="time-box" v-if="!isSection">
|
||||||
<block v-for="(item, _index) in timeArr" :key="_index">
|
<block v-for="(item, _index) in timeArr" :key="_index">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="item-box diy"
|
<view class="item-box diy" :class="{ disable: item.disable, active: isMultiple ? item.isActive : _index == timeActive }" @click="selectTimeEvent(_index, item)">
|
||||||
:class="{ disable: item.disable, active: isMultiple ? item.isActive : _index == timeActive }"
|
|
||||||
@click="selectTimeEvent(_index, item)">
|
|
||||||
<!-- :style="{ color: isMultiple ? (item.isActive ? selectedItemColor : '#333') : _index == timeActive ? selectedItemColor : '#333' }" -->
|
<!-- :style="{ color: isMultiple ? (item.isActive ? selectedItemColor : '#333') : _index == timeActive ? selectedItemColor : '#333' }" -->
|
||||||
<text>{{ item.time }}</text>
|
<text>{{ item.time }}</text>
|
||||||
<!-- <text class="all">{{ item.disable ? disableText : undisableText }}</text> -->
|
<!-- <text class="all">{{ item.disable ? disableText : undisableText }}</text> -->
|
||||||
@@ -46,9 +43,7 @@
|
|||||||
<view class="time-box" v-else>
|
<view class="time-box" v-else>
|
||||||
<block v-for="(item, _index) in timeArr" :key="_index">
|
<block v-for="(item, _index) in timeArr" :key="_index">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="item-box"
|
<view class="item-box" :class="{ disable: item.disable || item.isInclude, active: item.time == timeQuanBegin || item.time == timeQuanEnd }" @click="handleSelectQuantum(_index, item)">
|
||||||
:class="{ disable: item.disable || item.isInclude, active: item.time == timeQuanBegin || item.time == timeQuanEnd }"
|
|
||||||
@click="handleSelectQuantum(_index, item)">
|
|
||||||
<!-- :style="{ color: item.time == timeQuanBegin || item.time == timeQuanEnd ? selectedItemColor : '#333' }" -->
|
<!-- :style="{ color: item.time == timeQuanBegin || item.time == timeQuanEnd ? selectedItemColor : '#333' }" -->
|
||||||
<text>{{ item.time }}</text>
|
<text>{{ item.time }}</text>
|
||||||
<text class="all">{{ item.disable ? disableText : undisableText }}</text>
|
<text class="all">{{ item.disable ? disableText : undisableText }}</text>
|
||||||
@@ -71,16 +66,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 插件地址:https://ext.dcloud.net.cn/plugin?id=3593
|
// 插件地址:https://ext.dcloud.net.cn/plugin?id=3593
|
||||||
import {
|
import {
|
||||||
initData,
|
initData,
|
||||||
initTime,
|
initTime,
|
||||||
timeStamp,
|
timeStamp,
|
||||||
currentTime,
|
currentTime,
|
||||||
strFormat,
|
strFormat,
|
||||||
weekDate
|
weekDate
|
||||||
} from './yuyue-date.js';
|
} from './yuyue-date.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'times',
|
name: 'times',
|
||||||
model: {
|
model: {
|
||||||
prop: 'showPop',
|
prop: 'showPop',
|
||||||
@@ -138,21 +133,21 @@ export default {
|
|||||||
appointTime: {
|
appointTime: {
|
||||||
// 预约的时间
|
// 预约的时间
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default () {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
disableTimeSlot: {
|
disableTimeSlot: {
|
||||||
// 预约开始和结束时间,来禁用时间段
|
// 预约开始和结束时间,来禁用时间段
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default () {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
disableWeek: {
|
disableWeek: {
|
||||||
// 限制周几不可以预约
|
// 限制周几不可以预约
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default () {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,11 +160,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beginTime: function (nVal, oVal) {
|
beginTime: function(nVal, oVal) {
|
||||||
this.initOnload();
|
this.initOnload();
|
||||||
this.handleSubmit();
|
this.handleSubmit();
|
||||||
},
|
},
|
||||||
endTime: function (nVal, oVal) {
|
endTime: function(nVal, oVal) {
|
||||||
this.initOnload();
|
this.initOnload();
|
||||||
this.handleSubmit();
|
this.handleSubmit();
|
||||||
},
|
},
|
||||||
@@ -412,8 +407,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './yuyue-date.scss';
|
@import './yuyue-date.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -152,14 +152,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import validate from '@/common/js/validate.js';
|
import validate from 'common/js/validate.js';
|
||||||
import fenxiaoWords from '@/common/js/fenxiao-words.js';
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
import htmlParser from '@/common/js/html-parser.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
import htmlParser from '@/common/js/html-parser';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isChecked: false,
|
isChecked: false,
|
||||||
@@ -190,6 +187,9 @@
|
|||||||
isOpen: false
|
isOpen: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
uniPopup
|
||||||
|
},
|
||||||
mixins: [fenxiaoWords],
|
mixins: [fenxiaoWords],
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
setTimeout( () => {
|
setTimeout( () => {
|
||||||
@@ -3,8 +3,7 @@
|
|||||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
||||||
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')"
|
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')" mode="widthFix"></image>
|
||||||
mode="widthFix"></image>
|
|
||||||
<image v-else :src="$util.img('public/uniapp/fenxiao/bill/withdraw.png')" mode="widthFix"></image>
|
<image v-else :src="$util.img('public/uniapp/fenxiao/bill/withdraw.png')" mode="widthFix"></image>
|
||||||
<view class="balances-info">
|
<view class="balances-info">
|
||||||
<text>{{ item.type_name }}</text>
|
<text>{{ item.type_name }}</text>
|
||||||
@@ -12,8 +11,7 @@
|
|||||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="balances-num">
|
<view class="balances-num">
|
||||||
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money :
|
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money : item.money }}</text>
|
||||||
item.money }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<ns-empty v-if="!accountList.length && showEmpty" text="暂无账单信息" :isIndex="false"></ns-empty>
|
<ns-empty v-if="!accountList.length && showEmpty" text="暂无账单信息" :isIndex="false"></ns-empty>
|
||||||
@@ -24,25 +22,32 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
accountList: {},
|
accountList: {},
|
||||||
showEmpty: true
|
showEmpty: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
nsLogin,
|
||||||
|
MescrollUni,
|
||||||
|
loadingCover,
|
||||||
|
nsEmpty,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout( () => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -53,7 +58,7 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
},1000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData(mescroll) {
|
getData(mescroll) {
|
||||||
@@ -40,24 +40,31 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
teamList: [],
|
teamList: [],
|
||||||
emptyShow: false,
|
emptyShow: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
nsLogin,
|
||||||
|
MescrollUni,
|
||||||
|
loadingCover,
|
||||||
|
nsEmpty,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
mixins: [fenxiaoWords],
|
mixins: [fenxiaoWords],
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -1,329 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container" :style="themeColor">
|
|
||||||
<view class="level-top">
|
|
||||||
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx"
|
|
||||||
@change="swiperChange" :current="curr">
|
|
||||||
<swiper-item v-for="(item, index) in levelList" :key="index">
|
|
||||||
<view class="level-item" :class="{ 'curr': index == curr }">
|
|
||||||
<view class="level-wrap">
|
|
||||||
<view class="member-info">
|
|
||||||
<view class="head-img">
|
|
||||||
<image
|
|
||||||
:src="fenxiaoInfo.headimg ? $util.img(fenxiaoInfo.headimg) : $util.getDefaultImage().head"
|
|
||||||
@error="fenxiaoInfo.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
|
||||||
</view>
|
|
||||||
<view class="nickname">{{ fenxiaoInfo.nickname }}</view>
|
|
||||||
<view class="level-name">{{ item.level_name }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="level-rate">
|
|
||||||
<view class="rate-item" v-if="config.level > 0">
|
|
||||||
<view class="title">一级分佣比率</view>
|
|
||||||
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view>
|
|
||||||
</view>
|
|
||||||
<view class="rate-item" v-if="config.level > 1">
|
|
||||||
<view class="title">二级分佣比率</view>
|
|
||||||
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view>
|
|
||||||
</view>
|
|
||||||
<view class="rate-item" v-if="config.level > 2">
|
|
||||||
<view class="title">三级分佣比率</view>
|
|
||||||
<view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="not-unlocked" v-if="item.level_num > fenxiaoInfo.level_num">
|
|
||||||
<text class="iconfont icon-suoding"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
|
|
||||||
<view class="level-condition" v-if="levelInfo">
|
|
||||||
<view class="condition-title">
|
|
||||||
<view class="title">快速升级技巧</view>
|
|
||||||
<view class="rate price-font">
|
|
||||||
<text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num :
|
|
||||||
levelInfo.complete }}</text>
|
|
||||||
<text class="num">/{{ levelInfo.task_num }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="task">
|
|
||||||
<view class="task-item" v-for="(item, index) in levelInfo.task" :key="index">
|
|
||||||
<view class="flex-box">
|
|
||||||
<view class="title">
|
|
||||||
{{ item.title }}
|
|
||||||
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text>
|
|
||||||
</view>
|
|
||||||
<view class="status" :class="{ 'complete': item.progress == 100 }">
|
|
||||||
{{ item.progress == 100 ? '已完成' : '未完成' }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="progress">
|
|
||||||
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
|
||||||
</view>
|
|
||||||
<view class="flex-box">
|
|
||||||
<view class="desc">{{ item.desc }}</view>
|
|
||||||
<view class="rate price-font">
|
|
||||||
<text class="complete">{{ item.value }}</text>
|
|
||||||
<text class="num">/{{ item.condition }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<uni-popup type="bottom" ref="tips">
|
|
||||||
<view class="popup">
|
|
||||||
<view class="popup-header">
|
|
||||||
<text class="tit">提示</text>
|
|
||||||
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
|
||||||
</view>
|
|
||||||
<view class="popup-body">
|
|
||||||
<view>{{ tips }}</view>
|
|
||||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
<ns-goods-recommend route="fenxiao_level"></ns-goods-recommend>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
fenxiaoInfo: {
|
|
||||||
condition: {
|
|
||||||
last_level: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
config: {},
|
|
||||||
levelList: [],
|
|
||||||
curr: 0,
|
|
||||||
tips: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mixins: [fenxiaoWords],
|
|
||||||
computed: {
|
|
||||||
levelInfo() {
|
|
||||||
if (this.levelList.length) {
|
|
||||||
let level = this.levelList[this.curr];
|
|
||||||
level.task = [];
|
|
||||||
level.complete = 0;
|
|
||||||
|
|
||||||
if (level.one_fenxiao_order_num > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '下级消费',
|
|
||||||
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
|
|
||||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到' + level.one_fenxiao_order_num + '单',
|
|
||||||
condition: level.one_fenxiao_order_num,
|
|
||||||
value: this.fenxiaoInfo.one_fenxiao_order_num,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.one_fenxiao_total_order > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '下级消费',
|
|
||||||
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
|
||||||
tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
|
||||||
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
|
||||||
value: this.fenxiaoInfo.one_fenxiao_total_order,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100)
|
|
||||||
.toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.one_fenxiao_order_money > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '下级消费',
|
|
||||||
desc: '下级消费产生佣金总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
|
||||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
|
||||||
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
|
||||||
value: this.fenxiaoInfo.one_fenxiao_order_money,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100)
|
|
||||||
.toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.order_num > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '自身消费',
|
|
||||||
desc: '自身消费单数满' + level.order_num + '单',
|
|
||||||
tips: '分销商自己购买的订单次数达到' + level.order_num + '单',
|
|
||||||
condition: level.order_num,
|
|
||||||
value: this.fenxiaoInfo.order_num,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.fenxiaoInfo.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.order_money > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '自身消费',
|
|
||||||
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
|
|
||||||
tips: '分销商自己购买的订单总额满足' + this.moneyFormat(level.order_money) + '元',
|
|
||||||
condition: this.moneyFormat(level.order_money),
|
|
||||||
value: this.fenxiaoInfo.order_money,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.fenxiaoInfo.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.one_child_num > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '邀请好友',
|
|
||||||
desc: '邀请好友人数达到' + level.one_child_num + '人',
|
|
||||||
tips: '分销商的直属下级会员人数达到' + level.one_child_num + '人(包含已经申请成为分销商的)',
|
|
||||||
condition: level.one_child_num,
|
|
||||||
value: this.fenxiaoInfo.one_child_num,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
if (level.one_child_fenxiao_num > 0) {
|
|
||||||
let task = {
|
|
||||||
title: '邀请好友',
|
|
||||||
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
|
|
||||||
tips: '分销商的直属下级分销商人数达到' + level.one_child_fenxiao_num + '人',
|
|
||||||
condition: level.one_child_fenxiao_num,
|
|
||||||
value: this.fenxiaoInfo.one_child_fenxiao_num,
|
|
||||||
progress: parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
|
|
||||||
}
|
|
||||||
if (task.progress == 100) level.complete += 1;
|
|
||||||
level.task.push(task);
|
|
||||||
}
|
|
||||||
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() { },
|
|
||||||
onShow() {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!this.addonIsExist.fenxiao) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '商家未开启分销',
|
|
||||||
mask: true,
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$util.redirectTo('/pages/index/index');
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
|
|
||||||
|
|
||||||
if (this.storeToken) {
|
|
||||||
this.getFenxiaoInfo();
|
|
||||||
this.getBasicsConfig();
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
|
||||||
back: '/pages_promotion/fenxiao/level'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/**
|
|
||||||
* 获取分销等级信息
|
|
||||||
*/
|
|
||||||
getFenxiaoLevel() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/Level/lists',
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
this.levelList = res.data;
|
|
||||||
this.levelList.forEach((item, index) => {
|
|
||||||
if (item.level_id == this.fenxiaoInfo.level_id) this.curr = index;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取分销商信息
|
|
||||||
*/
|
|
||||||
getFenxiaoInfo() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/fenxiao/detail',
|
|
||||||
success: res => {
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
if (res.code >= 0 && res.data) {
|
|
||||||
this.fenxiaoInfo = res.data;
|
|
||||||
this.curr = this.fenxiaoInfo.level_num;
|
|
||||||
this.getFenxiaoLevel();
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo('/pages_promotion/fenxiao/apply');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 获取分销基本配置
|
|
||||||
*/
|
|
||||||
getBasicsConfig() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/config/basics',
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
this.config = res.data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
swiperChange(e) {
|
|
||||||
this.curr = e.detail.current;
|
|
||||||
},
|
|
||||||
moneyFormat(money) {
|
|
||||||
if (isNaN(parseFloat(money))) return money;
|
|
||||||
return parseFloat(money).toFixed(2);
|
|
||||||
},
|
|
||||||
openTips(data) {
|
|
||||||
this.tips = data.tips;
|
|
||||||
this.$refs.tips.open();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
@import '@/pages_promotion/fenxiao/public/css/level.scss';
|
|
||||||
</style>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
|
||||||
background: none;
|
|
||||||
max-height: unset !important;
|
|
||||||
overflow-y: hidden !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ .uni-popup__wrapper {
|
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ .uni-popup {
|
|
||||||
z-index: 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
|
||||||
max-height: unset !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,314 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container" :style="themeColor">
|
|
||||||
<swiper class="swiper" @change="getIndex">
|
|
||||||
<swiper-item v-for="(item, index) in poster" :key="index">
|
|
||||||
<view class="swiper-item">
|
|
||||||
<view class="poster-wrap">
|
|
||||||
<image :src="$util.img(item)" mode="widthFix" :show-menu-by-longpress="true" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
|
|
||||||
<!-- #ifdef H5 -->
|
|
||||||
<view class="tips">长按识别图中二维码</view>
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- #ifdef MP -->
|
|
||||||
<view class="btn color-base-bg color-base-border" @click="save">保存海报</view>
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<uni-popup ref="popupDialog" :custom="true" :mask-click="false">
|
|
||||||
<view class="dialog-popup">
|
|
||||||
<view class="title">提示</view>
|
|
||||||
<view class="message">您拒绝了保存图片到相册的授权请求,无法保存图片到相册,如需正常使用,请授权之后再进行操作。</view>
|
|
||||||
<view class="action-wrap">
|
|
||||||
<view @click="closeDialog">取消</view>
|
|
||||||
<view>
|
|
||||||
<button type="default" open-type="openSetting" @opensetting="closeDialog"
|
|
||||||
hover-class="none">立即授权</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
<ns-login ref="login"></ns-login>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
Weixin
|
|
||||||
} from 'common/js/wx-jssdk.js';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
poster: [],
|
|
||||||
fenxiaoInfo: {},
|
|
||||||
posterIndex: 0,
|
|
||||||
//海报模板id
|
|
||||||
templateId: ['default'],
|
|
||||||
mpShareData: null //小程序分享数据
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
/**
|
|
||||||
* 获取分销海报
|
|
||||||
*/
|
|
||||||
getPoster(id) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/fenxiao/poster',
|
|
||||||
data: {
|
|
||||||
page: '/pages/index/index',
|
|
||||||
qrcode_param: JSON.stringify({}),
|
|
||||||
template_id: id
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
if (res.code >= 0) {
|
|
||||||
resolve(res.data.path);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
reject();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getIndex(e) {
|
|
||||||
this.posterIndex = e.detail.current;
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
// #ifdef MP
|
|
||||||
uni.downloadFile({
|
|
||||||
url: this.$util.img(this.poster[this.posterIndex]),
|
|
||||||
success: res => {
|
|
||||||
if (res.statusCode === 200) {
|
|
||||||
uni.saveImageToPhotosAlbum({
|
|
||||||
filePath: res.tempFilePath,
|
|
||||||
success: () => {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '保存成功'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
if (res.errMsg == 'saveImageToPhotosAlbum:fail auth deny' ||
|
|
||||||
res.errMsg == 'saveImageToPhotosAlbum:fail:auth denied') {
|
|
||||||
this.$refs.popupDialog.open();
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '保存失败,请稍后重试'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '下载失败'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '下载失败'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
getFenxiaoDetail() {
|
|
||||||
this.poster = [];
|
|
||||||
try {
|
|
||||||
this.templateId.forEach((item, index) => {
|
|
||||||
this.getPoster(item).then(resolve => {
|
|
||||||
this.poster.push(resolve);
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}).catch(reject => {
|
|
||||||
throw reject;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} catch {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '海报生成失败'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
closeDialog() {
|
|
||||||
this.$refs.popupDialog.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!this.addonIsExist.fenxiao) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '商家未开启分销',
|
|
||||||
mask: true,
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$util.redirectTo('/pages/index/index');
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
if (option.templateId) {
|
|
||||||
this.templateId = option.templateId.split(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.storeToken) {
|
|
||||||
if (option.poster) {
|
|
||||||
this.poster = decodeURIComponent(option.poster).split(',')
|
|
||||||
setTimeout(() => {
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}, 500)
|
|
||||||
} else {
|
|
||||||
this.getFenxiaoDetail();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
//小程序分享
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
this.$util.getMpShare().then(res => {
|
|
||||||
this.mpShareData = res;
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
//分享给好友
|
|
||||||
onShareAppMessage() {
|
|
||||||
return this.mpShareData.appMessage;
|
|
||||||
},
|
|
||||||
//分享到朋友圈
|
|
||||||
onShareTimeline() {
|
|
||||||
return this.mpShareData.timeLine;
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
storeToken: function (nVal, oVal) {
|
|
||||||
if (nVal) {
|
|
||||||
this.getFenxiaoDetail();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.container {
|
|
||||||
width: 100vw;
|
|
||||||
min-height: 100vh;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.poster-wrap {
|
|
||||||
padding: 40rpx 0;
|
|
||||||
width: calc(100vw - 80rpx);
|
|
||||||
margin: 0 40rpx;
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
image {
|
|
||||||
border-radius: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper {
|
|
||||||
height: 1240rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
margin: 0 80rpx;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tips {
|
|
||||||
text-align: center;
|
|
||||||
font-size: $font-size-base;
|
|
||||||
color: #999;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-popup {
|
|
||||||
width: 580rpx;
|
|
||||||
background: #fff;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
height: initial;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
padding: 30rpx 30rpx 0 30rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message {
|
|
||||||
padding: 0 30rpx;
|
|
||||||
color: #666;
|
|
||||||
text-align: center;
|
|
||||||
font-size: $font-size-base;
|
|
||||||
line-height: 1.3;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-wrap {
|
|
||||||
margin-top: 50rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
display: flex;
|
|
||||||
border-top: 2rpx solid #eee;
|
|
||||||
|
|
||||||
&>view {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 80rpx;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-right: 2rpx solid #eee;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border: none;
|
|
||||||
line-height: 80rpx;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -2,28 +2,28 @@
|
|||||||
<view class="content" :style="themeColor">
|
<view class="content" :style="themeColor">
|
||||||
<mescroll-uni ref="mescroll" @getData="getGoodsList">
|
<mescroll-uni ref="mescroll" @getData="getGoodsList">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="goods-list"
|
<view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
|
||||||
<scroll-view class="quick-nav" scroll-x="true">
|
<scroll-view class="quick-nav" scroll-x="true">
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<view class="uni-scroll-view-content">
|
<view class="uni-scroll-view-content">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="quick-nav-item" :class="{ selected: categoryId == 0 }"
|
<view class="quick-nav-item" :class="{ selected: categoryId == 0 }" @click="changeCategory(0)">全部</view>
|
||||||
@click="changeCategory(0)">全部</view>
|
<view
|
||||||
<view class="quick-nav-item" v-for="item in categoryList" :key="item.category_id"
|
class="quick-nav-item"
|
||||||
|
v-for="item in categoryList"
|
||||||
|
:key="item.category_id"
|
||||||
:class="{ selected: categoryId == item.category_id }"
|
:class="{ selected: categoryId == item.category_id }"
|
||||||
@click="changeCategory(item.category_id)">
|
@click="changeCategory(item.category_id)"
|
||||||
|
>
|
||||||
{{ item.category_name }}
|
{{ item.category_name }}
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view v-for="(item, index) in goodsList" :key="index" class="goods-item"
|
<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
|
||||||
@click="navToDetailPage(item)">
|
|
||||||
<view class="image-wrap">
|
<view class="image-wrap">
|
||||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)"
|
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="aspectFill" />
|
||||||
mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-content">
|
<view class="goods-content">
|
||||||
<view class="goods-name">
|
<view class="goods-name">
|
||||||
@@ -132,18 +132,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
import list from '@/pages_promotion/fenxiao/public/js/goods_list.js';
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
import fenxiaoWords from '@/common/js/fenxiao-words.js';
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
import list from './public/js/goods_list.js';
|
||||||
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
mixins: [list, fenxiaoWords]
|
mixins: [list, fenxiaoWords]
|
||||||
@@ -151,7 +157,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.quick-nav>>>.uni-scroll-view-content {
|
.quick-nav >>> .uni-scroll-view-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -159,10 +165,8 @@ export default {
|
|||||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-nav {
|
.quick-nav {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.quick-nav-item {
|
.quick-nav-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -186,7 +190,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0 30rpx 160rpx;
|
padding: 0 30rpx 160rpx;
|
||||||
@@ -199,14 +202,12 @@ export default {
|
|||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -220,7 +221,6 @@ export default {
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -241,7 +241,6 @@ export default {
|
|||||||
.goods-name {
|
.goods-name {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
@@ -251,12 +250,10 @@ export default {
|
|||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-list {
|
.label-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
|
|
||||||
.label-item {
|
.label-item {
|
||||||
padding: 4rpx 10rpx;
|
padding: 4rpx 10rpx;
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
@@ -288,7 +285,6 @@ export default {
|
|||||||
padding: 0 $padding;
|
padding: 0 $padding;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
border: 2rpx solid $base-color;
|
border: 2rpx solid $base-color;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
@@ -303,7 +299,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.active-btn {
|
.active-btn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 40rpx;
|
bottom: 40rpx;
|
||||||
@@ -317,12 +312,10 @@ export default {
|
|||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
background-color: $base-color;
|
background-color: $base-color;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-btn {
|
.share-btn {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -362,7 +355,6 @@ export default {
|
|||||||
border: none;
|
border: none;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
@@ -375,7 +367,6 @@ export default {
|
|||||||
font-size: 80rpx;
|
font-size: 80rpx;
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-fuzhilianjie,
|
.icon-fuzhilianjie,
|
||||||
.icon-pengyouquan,
|
.icon-pengyouquan,
|
||||||
.icon-haowuquan,
|
.icon-haowuquan,
|
||||||
@@ -392,48 +383,39 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-layer {
|
.poster-layer {
|
||||||
.generate-poster {
|
.generate-poster {
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size: 80rpx;
|
font-size: 80rpx;
|
||||||
color: #07c160;
|
color: #07c160;
|
||||||
line-height: initial;
|
line-height: initial;
|
||||||
}
|
}
|
||||||
|
> view {
|
||||||
>view {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-wrap {
|
.image-wrap {
|
||||||
width: 64%;
|
width: 64%;
|
||||||
height: 854rpx;
|
height: 854rpx;
|
||||||
margin: 60rpx auto 40rpx auto;
|
margin: 60rpx auto 40rpx auto;
|
||||||
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
|
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 480rpx;
|
width: 480rpx;
|
||||||
height: 854rpx;
|
height: 854rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg {
|
.msg {
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.save {
|
.save {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -261,25 +261,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import fenxiaoWords from '@/common/js/fenxiao-words.js';
|
import fenxiaoWords from '@/common/js/fenxiao-words.js';
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsSelectTime: () => import('@/components/ns-select-time/ns-select-time.vue'),
|
uniPopup
|
||||||
uniTag: () => import('@/components/uni-tag/uni-tag.vue'),
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
|
||||||
uniNumberBox: () => import('@/components/uni-number-box/uni-number-box.vue'),
|
|
||||||
nsGoodsSku: () => import('@/components/ns-goods-sku/ns-goods-sku.vue'),
|
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -597,9 +583,10 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import './public/css/index.scss';
|
||||||
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import '@/pages_promotion/fenxiao/public/css/index.scss';
|
|
||||||
|
|
||||||
/deep/ .uni-popup__wrapper {
|
/deep/ .uni-popup__wrapper {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
319
pages_promotion/fenxiao/level.vue
Normal file
319
pages_promotion/fenxiao/level.vue
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container" :style="themeColor">
|
||||||
|
<view class="level-top">
|
||||||
|
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx" @change="swiperChange" :current="curr">
|
||||||
|
<swiper-item v-for="(item, index) in levelList" :key="index">
|
||||||
|
<view class="level-item" :class="{'curr': index == curr}">
|
||||||
|
<view class="level-wrap">
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="head-img">
|
||||||
|
<image :src="fenxiaoInfo.headimg ? $util.img(fenxiaoInfo.headimg) : $util.getDefaultImage().head" @error="fenxiaoInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||||
|
</view>
|
||||||
|
<view class="nickname">{{ fenxiaoInfo.nickname }}</view>
|
||||||
|
<view class="level-name">{{ item.level_name }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="level-rate">
|
||||||
|
<view class="rate-item" v-if="config.level > 0">
|
||||||
|
<view class="title">一级分佣比率</view>
|
||||||
|
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="rate-item" v-if="config.level > 1">
|
||||||
|
<view class="title">二级分佣比率</view>
|
||||||
|
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="rate-item" v-if="config.level > 2">
|
||||||
|
<view class="title">三级分佣比率</view>
|
||||||
|
<view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="not-unlocked" v-if="item.level_num > fenxiaoInfo.level_num">
|
||||||
|
<text class="iconfont icon-suoding"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
<view class="level-condition" v-if="levelInfo">
|
||||||
|
<view class="condition-title">
|
||||||
|
<view class="title">快速升级技巧</view>
|
||||||
|
<view class="rate price-font">
|
||||||
|
<text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}</text>
|
||||||
|
<text class="num">/{{ levelInfo.task_num }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="task">
|
||||||
|
<view class="task-item" v-for="(item, index) in levelInfo.task" :key="index">
|
||||||
|
<view class="flex-box">
|
||||||
|
<view class="title">
|
||||||
|
{{item.title}}
|
||||||
|
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text>
|
||||||
|
</view>
|
||||||
|
<view class="status" :class="{'complete': item.progress == 100}">
|
||||||
|
{{ item.progress == 100 ? '已完成' : '未完成' }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="progress">
|
||||||
|
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
||||||
|
</view>
|
||||||
|
<view class="flex-box">
|
||||||
|
<view class="desc">{{item.desc}}</view>
|
||||||
|
<view class="rate price-font">
|
||||||
|
<text class="complete">{{ item.value }}</text>
|
||||||
|
<text class="num">/{{ item.condition }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<uni-popup type="bottom" ref="tips">
|
||||||
|
<view class="popup">
|
||||||
|
<view class="popup-header">
|
||||||
|
<text class="tit">提示</text>
|
||||||
|
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
||||||
|
</view>
|
||||||
|
<view class="popup-body">
|
||||||
|
<view>{{ tips }}</view>
|
||||||
|
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<ns-goods-recommend route="fenxiao_level"></ns-goods-recommend>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fenxiaoInfo: {
|
||||||
|
condition: {
|
||||||
|
last_level: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
config: {},
|
||||||
|
levelList: [],
|
||||||
|
curr: 0,
|
||||||
|
tips: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mixins: [fenxiaoWords],
|
||||||
|
computed: {
|
||||||
|
levelInfo() {
|
||||||
|
if (this.levelList.length) {
|
||||||
|
let level = this.levelList[this.curr];
|
||||||
|
level.task = [];
|
||||||
|
level.complete = 0;
|
||||||
|
|
||||||
|
if (level.one_fenxiao_order_num > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '下级消费',
|
||||||
|
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
|
||||||
|
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到'+ level.one_fenxiao_order_num + '单',
|
||||||
|
condition: level.one_fenxiao_order_num,
|
||||||
|
value: this.fenxiaoInfo.one_fenxiao_order_num,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.one_fenxiao_total_order > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '下级消费',
|
||||||
|
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||||
|
tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到'+ this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||||
|
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
||||||
|
value: this.fenxiaoInfo.one_fenxiao_total_order,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100)
|
||||||
|
.toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.one_fenxiao_order_money > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '下级消费',
|
||||||
|
desc: '下级消费产生佣金总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
||||||
|
tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到'+ this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
||||||
|
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
||||||
|
value: this.fenxiaoInfo.one_fenxiao_order_money,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100)
|
||||||
|
.toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.order_num > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '自身消费',
|
||||||
|
desc: '自身消费单数满' + level.order_num + '单',
|
||||||
|
tips: '分销商自己购买的订单次数达到'+ level.order_num + '单',
|
||||||
|
condition: level.order_num,
|
||||||
|
value: this.fenxiaoInfo.order_num,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.fenxiaoInfo.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.order_money > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '自身消费',
|
||||||
|
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
|
||||||
|
tips: '分销商自己购买的订单总额满足'+ this.moneyFormat(level.order_money) + '元',
|
||||||
|
condition: this.moneyFormat(level.order_money),
|
||||||
|
value: this.fenxiaoInfo.order_money,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.fenxiaoInfo.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.one_child_num > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '邀请好友',
|
||||||
|
desc: '邀请好友人数达到' + level.one_child_num + '人',
|
||||||
|
tips: '分销商的直属下级会员人数达到'+level.one_child_num+'人(包含已经申请成为分销商的)',
|
||||||
|
condition: level.one_child_num,
|
||||||
|
value: this.fenxiaoInfo.one_child_num,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
if (level.one_child_fenxiao_num > 0) {
|
||||||
|
let task = {
|
||||||
|
title: '邀请好友',
|
||||||
|
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
|
||||||
|
tips: '分销商的直属下级分销商人数达到'+ level.one_child_fenxiao_num + '人',
|
||||||
|
condition: level.one_child_fenxiao_num,
|
||||||
|
value: this.fenxiaoInfo.one_child_fenxiao_num,
|
||||||
|
progress: parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
|
||||||
|
}
|
||||||
|
if (task.progress == 100) level.complete += 1;
|
||||||
|
level.task.push(task);
|
||||||
|
}
|
||||||
|
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {},
|
||||||
|
onShow() {
|
||||||
|
setTimeout( () => {
|
||||||
|
if (!this.addonIsExist.fenxiao) {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '商家未开启分销',
|
||||||
|
mask: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$util.redirectTo('/pages/index/index');
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
},1000);
|
||||||
|
|
||||||
|
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
|
||||||
|
|
||||||
|
if (this.storeToken) {
|
||||||
|
this.getFenxiaoInfo();
|
||||||
|
this.getBasicsConfig();
|
||||||
|
} else {
|
||||||
|
this.$util.redirectTo('/pages_tool/login/login', {
|
||||||
|
back: '/pages_promotion/fenxiao/level'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取分销等级信息
|
||||||
|
*/
|
||||||
|
getFenxiaoLevel() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/Level/lists',
|
||||||
|
success: res => {
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
this.levelList = res.data;
|
||||||
|
this.levelList.forEach((item, index) => {
|
||||||
|
if (item.level_id == this.fenxiaoInfo.level_id) this.curr = index;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取分销商信息
|
||||||
|
*/
|
||||||
|
getFenxiaoInfo() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/fenxiao/detail',
|
||||||
|
success: res => {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
if (res.code >= 0 && res.data) {
|
||||||
|
this.fenxiaoInfo = res.data;
|
||||||
|
this.curr = this.fenxiaoInfo.level_num;
|
||||||
|
this.getFenxiaoLevel();
|
||||||
|
} else {
|
||||||
|
this.$util.redirectTo('/pages_promotion/fenxiao/apply');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取分销基本配置
|
||||||
|
*/
|
||||||
|
getBasicsConfig() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/config/basics',
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
this.config = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
swiperChange(e) {
|
||||||
|
this.curr = e.detail.current;
|
||||||
|
},
|
||||||
|
moneyFormat(money) {
|
||||||
|
if (isNaN(parseFloat(money))) return money;
|
||||||
|
return parseFloat(money).toFixed(2);
|
||||||
|
},
|
||||||
|
openTips(data) {
|
||||||
|
this.tips = data.tips;
|
||||||
|
this.$refs.tips.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import './public/css/level.scss';
|
||||||
|
</style>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
|
background: none;
|
||||||
|
max-height: unset !important;
|
||||||
|
overflow-y: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-popup__wrapper {
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-popup {
|
||||||
|
z-index: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
|
max-height: unset !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,51 +2,40 @@
|
|||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<view class="withdraw-cate">
|
<view class="withdraw-cate">
|
||||||
<block v-for="(item, index) in category" :key="index">
|
<block v-for="(item, index) in category" :key="index">
|
||||||
<view @click="selectCate(item.id)" class="cate-li"
|
<view @click="selectCate(item.id)" class="cate-li" :class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}</view>
|
||||||
:class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}
|
|
||||||
</view>
|
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" top="90" class="member-point" :size="8" v-if="storeToken">
|
<mescroll-uni ref="mescroll" @getData="getData" top="90" class="member-point" :size="8" v-if="storeToken">
|
||||||
<view class="goods_list" slot="list">
|
<view class="goods_list" slot="list">
|
||||||
<view class="order-list">
|
<view class="order-list">
|
||||||
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex"
|
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex" @click="toDetail(orderItem.fenxiao_order_id)">
|
||||||
@click="toDetail(orderItem.fenxiao_order_id)">
|
|
||||||
<view class="order-header">
|
<view class="order-header">
|
||||||
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
|
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
|
||||||
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">已退款</text>
|
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">已退款</text>
|
||||||
<text class="status-name color-text-green"
|
<text class="status-name color-text-green" v-else-if="orderItem.is_settlement == 1">已结算</text>
|
||||||
v-else-if="orderItem.is_settlement == 1">已结算</text>
|
|
||||||
<text class="status-name color-text-orange" v-else>待结算</text>
|
<text class="status-name color-text-orange" v-else>待结算</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-body">
|
<view class="order-body">
|
||||||
<view class="goods-wrap">
|
<view class="goods-wrap">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })"
|
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
|
||||||
@error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="top-wrap">
|
<view class="top-wrap">
|
||||||
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
|
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="color-tip">返{{ fenxiaoWords.account }}</text>
|
<text class="color-tip">返{{ fenxiaoWords.account }}</text>
|
||||||
<text class="price-color price-style small">{{
|
<text class="price-color price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
$lang('common.currencySymbol') }}</text>
|
<text class="price-color price-style large" >{{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text>
|
||||||
<text class="price-color price-style large">{{
|
<text class="price-color price-style small">.{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</text>
|
||||||
parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text>
|
|
||||||
<text class="price-color price-style small">.{{
|
|
||||||
parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-sub-section">
|
<view class="goods-sub-section">
|
||||||
<view class="goods-price">
|
<view class="goods-price">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol')
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
}}</text>
|
<text class="price-color price-style large" >{{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
|
||||||
<text class="price-color price-style large">{{
|
<text class="unit price-style small">.{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}</text>
|
||||||
parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
|
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(orderItem.price).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text>
|
<text>
|
||||||
@@ -68,24 +57,18 @@
|
|||||||
<view class="total">
|
<view class="total">
|
||||||
<text>合计:</text>
|
<text>合计:</text>
|
||||||
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
|
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price-color font-size-toolbar">{{
|
<text class="price-color font-size-toolbar" >{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
|
||||||
parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
|
<text class="price-color">.{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}</text>
|
||||||
<text class="price-color">.{{
|
|
||||||
parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-empty">
|
<view class="cart-empty">
|
||||||
<ns-empty text="暂无订单" :isIndex="false"
|
<ns-empty text="暂无订单" :isIndex="false" v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||||
v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
|
<ns-empty text="暂无待结算订单" :isIndex="false" v-if="selectId == 1 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||||
<ns-empty text="暂无待结算订单" :isIndex="false"
|
<ns-empty text="暂无已结算订单" :isIndex="false" v-if="selectId == 2 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||||
v-if="selectId == 1 && orderList.length == 0 && emptyShow"></ns-empty>
|
<ns-empty text="暂无已退款订单" :isIndex="false" v-if="selectId == 3 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||||
<ns-empty text="暂无已结算订单" :isIndex="false"
|
|
||||||
v-if="selectId == 2 && orderList.length == 0 && emptyShow"></ns-empty>
|
|
||||||
<ns-empty text="暂无已退款订单" :isIndex="false"
|
|
||||||
v-if="selectId == 3 && orderList.length == 0 && emptyShow"></ns-empty>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
@@ -96,16 +79,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -144,7 +133,7 @@ export default {
|
|||||||
if (option.type != undefined) this.selectId = option.type;
|
if (option.type != undefined) this.selectId = option.type;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout( () => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -155,9 +144,9 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
},1000);
|
||||||
|
|
||||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '订单');
|
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
|
||||||
|
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -215,7 +204,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
storeToken: function (nVal, oVal) {
|
storeToken: function(nVal, oVal) {
|
||||||
if (nVal) {
|
if (nVal) {
|
||||||
this.$refs.mescroll.refresh();
|
this.$refs.mescroll.refresh();
|
||||||
}
|
}
|
||||||
@@ -225,5 +214,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../public/css/order.scss';
|
@import './public/css/order.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -12,20 +12,15 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="detail-body">
|
<view class="detail-body">
|
||||||
<view class="detail-body-box">
|
<view class="detail-body-box">
|
||||||
<view class="goods-image">
|
<view class="goods-image"><image :src="$util.img(orderData.sku_image, { size: 'mid' })" @error="imageError()" mode="aspectFill"></image></view>
|
||||||
<image :src="$util.img(orderData.sku_image, { size: 'mid' })" @error="imageError()"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="goods-name">{{ orderData.sku_name }}</view>
|
<view class="goods-name">{{ orderData.sku_name }}</view>
|
||||||
<view class="goods-sub-section margin-top">
|
<view class="goods-sub-section margin-top">
|
||||||
<view>
|
<view>
|
||||||
<text class="goods-price">
|
<text class="goods-price">
|
||||||
<text class="unit price-color">¥</text>
|
<text class="unit price-color">¥</text>
|
||||||
<text class="price-color font-size-toolbar">{{
|
<text class="price-color font-size-toolbar" >{{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}</text>
|
||||||
parseFloat(orderData.price).toFixed(2).split(".")[0] }}</text>
|
<text class="unit price-color">.{{ parseFloat(orderData.price).toFixed(2).split(".")[1] }}</text>
|
||||||
<text class="unit price-color">.{{
|
|
||||||
parseFloat(orderData.price).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@@ -66,8 +61,7 @@
|
|||||||
<text class="price-color font-size-toolbar">
|
<text class="price-color font-size-toolbar">
|
||||||
<text class="font-size-goods-tag">¥</text>
|
<text class="font-size-goods-tag">¥</text>
|
||||||
{{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
|
{{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
|
||||||
<text class="font-size-goods-tag">.{{
|
<text class="font-size-goods-tag">.{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}</text>
|
||||||
parseFloat(orderData.commission).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -82,10 +76,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isIphoneX: false,
|
isIphoneX: false,
|
||||||
@@ -95,6 +85,7 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.id) {
|
if (option.id) {
|
||||||
this.orderId = option.id;
|
this.orderId = option.id;
|
||||||
@@ -106,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mixins: [fenxiaoWords],
|
mixins: [fenxiaoWords],
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout( () => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -117,7 +108,7 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
},1000);
|
||||||
|
|
||||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||||
|
|
||||||
@@ -160,7 +151,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
storeToken: function (nVal, oVal) {
|
storeToken: function(nVal, oVal) {
|
||||||
if (nVal) {
|
if (nVal) {
|
||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
}
|
}
|
||||||
@@ -175,14 +166,12 @@ export default {
|
|||||||
padding: 0 $padding;
|
padding: 0 $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: $margin-updown;
|
margin-top: $margin-updown;
|
||||||
|
|
||||||
.order-detail-box {
|
.order-detail-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
@@ -190,14 +179,12 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-body {
|
.detail-body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 30rpx 30rpx 30rpx;
|
padding: 0 30rpx 30rpx 30rpx;
|
||||||
@@ -207,12 +194,10 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.goods-image {
|
.goods-image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -220,7 +205,6 @@ export default {
|
|||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-info {
|
.order-info {
|
||||||
width: calc(100% - 200rpx);
|
width: calc(100% - 200rpx);
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
@@ -229,7 +213,6 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.goods-name {
|
.goods-name {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
@@ -257,7 +240,6 @@ export default {
|
|||||||
view {
|
view {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
|
|
||||||
&:last-of-type {
|
&:last-of-type {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
@@ -271,22 +253,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-content {
|
.detail-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 30rpx 30rpx 30rpx;
|
padding: 0 30rpx 30rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 1rpx solid $color-line;
|
border-bottom: 1rpx solid $color-line;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-info-item .tit {
|
.order-info-item .tit {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-footer {
|
.detail-footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@@ -302,21 +280,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commission {
|
.commission {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|
||||||
.detail-content {
|
.detail-content {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-money-detail {
|
.order-money-detail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 $padding;
|
padding: 0 $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: $margin-updown;
|
margin-top: $margin-updown;
|
||||||
|
|
||||||
.order-money-detail-box {
|
.order-money-detail-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -324,7 +298,6 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
@@ -333,7 +306,6 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -341,7 +313,6 @@ export default {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title::before {
|
.title::before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
@@ -353,12 +324,10 @@ export default {
|
|||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.money-detail-body {
|
.money-detail-body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.order-cell {
|
.order-cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 10rpx 0;
|
margin: 10rpx 0;
|
||||||
@@ -394,7 +363,6 @@ export default {
|
|||||||
margin-left: 6rpx;
|
margin-left: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: $color-tip;
|
color: $color-tip;
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
@@ -403,8 +371,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.price-color{
|
||||||
.price-color {
|
|
||||||
color: var(--price-color);
|
color: var(--price-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -57,18 +57,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import htmlParser from '@/common/js/html-parser.js';
|
import htmlParser from '@/common/js/html-parser';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
nsCopyright: () => import('@/components/ns-copyright/ns-copyright.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
306
pages_promotion/fenxiao/promote_code.vue
Normal file
306
pages_promotion/fenxiao/promote_code.vue
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container" :style="themeColor">
|
||||||
|
<swiper class="swiper" @change="getIndex">
|
||||||
|
<swiper-item v-for="(item, index) in poster" :key="index">
|
||||||
|
<view class="swiper-item">
|
||||||
|
<view class="poster-wrap">
|
||||||
|
<image :src="$util.img(item)" mode="widthFix" :show-menu-by-longpress="true"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view class="tips">长按识别图中二维码</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<!-- #ifdef MP -->
|
||||||
|
<view class="btn color-base-bg color-base-border" @click="save">保存海报</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<uni-popup ref="popupDialog" :custom="true" :mask-click="false">
|
||||||
|
<view class="dialog-popup">
|
||||||
|
<view class="title">提示</view>
|
||||||
|
<view class="message">您拒绝了保存图片到相册的授权请求,无法保存图片到相册,如需正常使用,请授权之后再进行操作。</view>
|
||||||
|
<view class="action-wrap">
|
||||||
|
<view @click="closeDialog">取消</view>
|
||||||
|
<view>
|
||||||
|
<button type="default" open-type="openSetting" @opensetting="closeDialog" hover-class="none">立即授权</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<ns-login ref="login"></ns-login>
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<!-- 小程序隐私协议 -->
|
||||||
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
Weixin
|
||||||
|
} from 'common/js/wx-jssdk.js';
|
||||||
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
poster: [],
|
||||||
|
fenxiaoInfo: {},
|
||||||
|
posterIndex: 0,
|
||||||
|
//海报模板id
|
||||||
|
templateId: ['default'],
|
||||||
|
mpShareData: null //小程序分享数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
uniPopup
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取分销海报
|
||||||
|
*/
|
||||||
|
getPoster(id) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/fenxiao/poster',
|
||||||
|
data: {
|
||||||
|
page: '/pages/index/index',
|
||||||
|
qrcode_param: JSON.stringify({}),
|
||||||
|
template_id: id
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
if (res.code >= 0) {
|
||||||
|
resolve(res.data.path);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getIndex(e) {
|
||||||
|
this.posterIndex = e.detail.current;
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
// #ifdef MP
|
||||||
|
uni.downloadFile({
|
||||||
|
url: this.$util.img(this.poster[this.posterIndex]),
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
success: () => {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '保存成功'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
if (res.errMsg == 'saveImageToPhotosAlbum:fail auth deny' ||
|
||||||
|
res.errMsg == 'saveImageToPhotosAlbum:fail:auth denied') {
|
||||||
|
this.$refs.popupDialog.open();
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '保存失败,请稍后重试'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '下载失败'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '下载失败'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
getFenxiaoDetail() {
|
||||||
|
this.poster = [];
|
||||||
|
try {
|
||||||
|
this.templateId.forEach((item, index) => {
|
||||||
|
this.getPoster(item).then(resolve => {
|
||||||
|
this.poster.push(resolve);
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}).catch(reject => {
|
||||||
|
throw reject;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '海报生成失败'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDialog() {
|
||||||
|
this.$refs.popupDialog.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
setTimeout( () => {
|
||||||
|
if (!this.addonIsExist.fenxiao) {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '商家未开启分销',
|
||||||
|
mask: true,
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$util.redirectTo('/pages/index/index');
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
},1000);
|
||||||
|
|
||||||
|
if (option.templateId) {
|
||||||
|
this.templateId = option.templateId.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.storeToken) {
|
||||||
|
if(option.poster){
|
||||||
|
this.poster = decodeURIComponent(option.poster).split(',')
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}, 500)
|
||||||
|
}else{
|
||||||
|
this.getFenxiaoDetail();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
//小程序分享
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.$util.getMpShare().then(res => {
|
||||||
|
this.mpShareData = res;
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
//分享给好友
|
||||||
|
onShareAppMessage() {
|
||||||
|
return this.mpShareData.appMessage;
|
||||||
|
},
|
||||||
|
//分享到朋友圈
|
||||||
|
onShareTimeline() {
|
||||||
|
return this.mpShareData.timeLine;
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
storeToken: function(nVal, oVal) {
|
||||||
|
if (nVal) {
|
||||||
|
this.getFenxiaoDetail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.container {
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.poster-wrap {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
width: calc(100vw - 80rpx);
|
||||||
|
margin: 0 40rpx;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
image {
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
height: 1240rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin: 0 80rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
text-align: center;
|
||||||
|
font-size: $font-size-base;
|
||||||
|
color: #999;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-popup {
|
||||||
|
width: 580rpx;
|
||||||
|
background: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
height: initial;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding: 30rpx 30rpx 0 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
font-size: $font-size-base;
|
||||||
|
line-height: 1.3;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-wrap {
|
||||||
|
margin-top: 50rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
border-top: 2rpx solid #eee;
|
||||||
|
|
||||||
|
&>view {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-right: 2rpx solid #eee;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
line-height: 80rpx;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
433
pages_promotion/fenxiao/ranking_list.vue
Normal file
433
pages_promotion/fenxiao/ranking_list.vue
Normal file
@@ -0,0 +1,433 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container" :style="themeColor">
|
||||||
|
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
|
||||||
|
<view slot="list">
|
||||||
|
<block v-if="list.length != 0">
|
||||||
|
<view class="banner" :style="{background: 'url('+ $util.img('public/uniapp/fenxiao/index/header_bg.png') +') no-repeat top left / 100% 100%'}">
|
||||||
|
<view class="info">
|
||||||
|
<view class="info-pic">
|
||||||
|
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" @error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||||
|
</view>
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="rank-info-box">
|
||||||
|
<text class="name">{{info.nickname}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')" v-if="type == 'profit'">点击提现</view>
|
||||||
|
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fenxiao-team" v-if="type == 'profit'">
|
||||||
|
<view class="fenxiao-index-other">
|
||||||
|
<view class="all-money-item">
|
||||||
|
<view class="img-wrap">
|
||||||
|
<text class="iconfont icon-fenxiao"></text>
|
||||||
|
</view>
|
||||||
|
<view class="all-money-tit-wrap">
|
||||||
|
<text class="all-money-tit">分销佣金</text>
|
||||||
|
<text class="all-money-num">{{ info.today_commission}}元</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="fenxiao-index-other">
|
||||||
|
<view class="all-money-item">
|
||||||
|
<view class="img-wrap">
|
||||||
|
<text class="iconfont icon-baixingbeng"></text>
|
||||||
|
</view>
|
||||||
|
<view class="all-money-tit-wrap">
|
||||||
|
<text class="all-money-tit">佣金排行</text>
|
||||||
|
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="fenxiao-team" v-if="type == 'invited_num'">
|
||||||
|
<view class="fenxiao-index-other">
|
||||||
|
<view class="all-money-item">
|
||||||
|
<view class="img-wrap">
|
||||||
|
<text class="iconfont icon-huodongtuiyan"></text>
|
||||||
|
</view>
|
||||||
|
<view class="all-money-tit-wrap">
|
||||||
|
<text class="all-money-tit">推广人数</text>
|
||||||
|
<text class="all-money-num">{{ info.one_child_num}}人</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="fenxiao-index-other">
|
||||||
|
<view class="all-money-item">
|
||||||
|
<view class="img-wrap">
|
||||||
|
<text class="iconfont icon-baixingbeng"></text>
|
||||||
|
</view>
|
||||||
|
<view class="all-money-tit-wrap">
|
||||||
|
<text class="all-money-tit" v-if="type == 'invited_num'">推广排行</text>
|
||||||
|
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view>
|
||||||
|
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
|
||||||
|
|
||||||
|
<view class="ranking-list">
|
||||||
|
<view class="ranking-item" v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="ranking price-font">{{ index + 1 }}</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="head-img">
|
||||||
|
<image :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head" @error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||||
|
</view>
|
||||||
|
<view class="nickname">{{ item.nickname }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="price-font price-style" v-if="type == 'profit'">
|
||||||
|
¥{{ item.total_commission|moneyFormat }}</view>
|
||||||
|
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}人
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-if="list.length == 0 && emptyShow">
|
||||||
|
<ns-empty text="暂无数据" :isIndex="false"></ns-empty>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</mescroll-uni>
|
||||||
|
|
||||||
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
nsLogin,
|
||||||
|
MescrollUni,
|
||||||
|
loadingCover,
|
||||||
|
nsEmpty,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
emptyShow: false,
|
||||||
|
type: '',
|
||||||
|
ranking: 0,
|
||||||
|
info: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(data) {
|
||||||
|
this.type = data.type;
|
||||||
|
this.getRanking();
|
||||||
|
this.getFenxiaoDetail();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData(mescroll) {
|
||||||
|
this.emptyShow = false;
|
||||||
|
if (mescroll.num == 1) {
|
||||||
|
this.list = [];
|
||||||
|
}
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/fenxiao/rankinglist',
|
||||||
|
data: {
|
||||||
|
page_size: mescroll.size,
|
||||||
|
page: mescroll.num,
|
||||||
|
type: this.type
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
this.emptyShow = true;
|
||||||
|
let newArr = [];
|
||||||
|
let msg = res.message;
|
||||||
|
if (res.code == 0 && res.data) {
|
||||||
|
newArr = res.data.list;
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
mescroll.endSuccess(newArr.length);
|
||||||
|
//设置列表数据
|
||||||
|
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||||
|
this.list = this.list.concat(newArr); //追加新数据
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
mescroll.endErr();
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getRanking() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/fenxiao/ranking',
|
||||||
|
data: {
|
||||||
|
type: this.type
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
this.ranking = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getFenxiaoDetail() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/fenxiao/api/fenxiao/detail',
|
||||||
|
success: res => {
|
||||||
|
if (res.data) {
|
||||||
|
this.info = res.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.container {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
// background: $base-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 50rpx 80rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.info-pic {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 4rpx solid #fff;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-info {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
view {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rank-info-box {
|
||||||
|
line-height: 1;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.withdrawal {
|
||||||
|
border-radius: 4px;
|
||||||
|
line-height: 23px;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.fenxiao-team {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
|
||||||
|
.fenxiao-index-other {
|
||||||
|
margin: 0 24rpx 20rpx 24rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-money-item {
|
||||||
|
margin: 0 30rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: $font-size-tag;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.img-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-money-tit-wrap {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 70rpx;
|
||||||
|
|
||||||
|
.all-money-tit {
|
||||||
|
line-height: 1;
|
||||||
|
color: $color-title;
|
||||||
|
font-size: $font-size-base;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-money-num {
|
||||||
|
color: $color-tip;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-wenxiao {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 50rpx;
|
||||||
|
color: var(--base-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-text {
|
||||||
|
font-size: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-title {
|
||||||
|
font-size: 50rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
color: #f5f5f5;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-rank {
|
||||||
|
color: #f5f5f5;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-rakn-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ranking-list {
|
||||||
|
transform: translateY(-120rpx);
|
||||||
|
margin: 200rpx 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
margin-top: 140rpx;
|
||||||
|
|
||||||
|
.ranking-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
border-bottom: 2rpx solid #f5f5f5;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ranking {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(1) .ranking {
|
||||||
|
background: rgb(249, 186, 1);
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 10rpx solid rgb(254, 220, 92);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) .ranking {
|
||||||
|
background: rgb(172, 185, 194);
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 10rpx solid rgb(215, 223, 229);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(3) .ranking {
|
||||||
|
background: rgb(211, 163, 136);
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 10rpx solid rgb(235, 201, 190);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.head-img {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nickname {
|
||||||
|
color: #333;
|
||||||
|
margin: 0 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -72,16 +72,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -154,7 +161,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../public/css/order.scss';
|
@import './public/css/order.scss';
|
||||||
|
|
||||||
.goods-wraps {
|
.goods-wraps {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1,431 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container" :style="themeColor">
|
|
||||||
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
|
|
||||||
<view slot="list">
|
|
||||||
<block v-if="list.length != 0">
|
|
||||||
<view class="banner"
|
|
||||||
:style="{ background: 'url(' + $util.img('public/uniapp/fenxiao/index/header_bg.png') + ') no-repeat top left / 100% 100%' }">
|
|
||||||
<view class="info">
|
|
||||||
<view class="info-pic">
|
|
||||||
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head"
|
|
||||||
@error="info.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
|
||||||
</view>
|
|
||||||
<view class="member-info">
|
|
||||||
<view class="rank-info-box">
|
|
||||||
<text class="name">{{ info.nickname }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="withdrawal"
|
|
||||||
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')"
|
|
||||||
v-if="type == 'profit'">点击提现</view>
|
|
||||||
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/team')"
|
|
||||||
v-if="type == 'invited_num'">我的团队</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="fenxiao-team" v-if="type == 'profit'">
|
|
||||||
<view class="fenxiao-index-other">
|
|
||||||
<view class="all-money-item">
|
|
||||||
<view class="img-wrap">
|
|
||||||
<text class="iconfont icon-fenxiao"></text>
|
|
||||||
</view>
|
|
||||||
<view class="all-money-tit-wrap">
|
|
||||||
<text class="all-money-tit">分销佣金</text>
|
|
||||||
<text class="all-money-num">{{ info.today_commission }}元</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fenxiao-index-other">
|
|
||||||
<view class="all-money-item">
|
|
||||||
<view class="img-wrap">
|
|
||||||
<text class="iconfont icon-baixingbeng"></text>
|
|
||||||
</view>
|
|
||||||
<view class="all-money-tit-wrap">
|
|
||||||
<text class="all-money-tit">佣金排行</text>
|
|
||||||
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fenxiao-team" v-if="type == 'invited_num'">
|
|
||||||
<view class="fenxiao-index-other">
|
|
||||||
<view class="all-money-item">
|
|
||||||
<view class="img-wrap">
|
|
||||||
<text class="iconfont icon-huodongtuiyan"></text>
|
|
||||||
</view>
|
|
||||||
<view class="all-money-tit-wrap">
|
|
||||||
<text class="all-money-tit">推广人数</text>
|
|
||||||
<text class="all-money-num">{{ info.one_child_num }}人</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fenxiao-index-other">
|
|
||||||
<view class="all-money-item">
|
|
||||||
<view class="img-wrap">
|
|
||||||
<text class="iconfont icon-baixingbeng"></text>
|
|
||||||
</view>
|
|
||||||
<view class="all-money-tit-wrap">
|
|
||||||
<text class="all-money-tit" v-if="type == 'invited_num'">推广排行</text>
|
|
||||||
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view>
|
|
||||||
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
|
|
||||||
|
|
||||||
<view class="ranking-list">
|
|
||||||
<view class="ranking-item" v-for="(item, index) in list" :key="index">
|
|
||||||
<view class="ranking price-font">{{ index + 1 }}</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="head-img">
|
|
||||||
<image :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head"
|
|
||||||
@error="item.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
|
||||||
</view>
|
|
||||||
<view class="nickname">{{ item.nickname }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="price-font price-style" v-if="type == 'profit'">
|
|
||||||
¥{{ item.total_commission | moneyFormat }}</view>
|
|
||||||
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}人
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<block v-if="list.length == 0 && emptyShow">
|
|
||||||
<ns-empty text="暂无数据" :isIndex="false"></ns-empty>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</mescroll-uni>
|
|
||||||
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
list: [],
|
|
||||||
emptyShow: false,
|
|
||||||
type: '',
|
|
||||||
ranking: 0,
|
|
||||||
info: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(data) {
|
|
||||||
this.type = data.type;
|
|
||||||
this.getRanking();
|
|
||||||
this.getFenxiaoDetail();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getData(mescroll) {
|
|
||||||
this.emptyShow = false;
|
|
||||||
if (mescroll.num == 1) {
|
|
||||||
this.list = [];
|
|
||||||
}
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/fenxiao/rankinglist',
|
|
||||||
data: {
|
|
||||||
page_size: mescroll.size,
|
|
||||||
page: mescroll.num,
|
|
||||||
type: this.type
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
this.emptyShow = true;
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
|
||||||
this.list = this.list.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getRanking() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/fenxiao/ranking',
|
|
||||||
data: {
|
|
||||||
type: this.type
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code >= 0) {
|
|
||||||
this.ranking = res.data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getFenxiaoDetail() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/fenxiao/api/fenxiao/detail',
|
|
||||||
success: res => {
|
|
||||||
if (res.data) {
|
|
||||||
this.info = res.data;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.container {
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner {
|
|
||||||
width: 100%;
|
|
||||||
height: 200rpx;
|
|
||||||
// background: $base-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 50rpx 80rpx 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.info-pic {
|
|
||||||
width: 100rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 4rpx solid #fff;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.member-info {
|
|
||||||
flex: 1;
|
|
||||||
width: 0;
|
|
||||||
margin-left: 32rpx;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
view {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-info-box {
|
|
||||||
line-height: 1;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.withdrawal {
|
|
||||||
border-radius: 4px;
|
|
||||||
line-height: 23px;
|
|
||||||
margin: auto;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.fenxiao-team {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 22rpx;
|
|
||||||
|
|
||||||
.fenxiao-index-other {
|
|
||||||
margin: 0 24rpx 20rpx 24rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 30rpx 0;
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.all-money-item {
|
|
||||||
margin: 0 30rpx;
|
|
||||||
display: flex;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.img-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 70rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.all-money-tit-wrap {
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 24rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 70rpx;
|
|
||||||
|
|
||||||
.all-money-tit {
|
|
||||||
line-height: 1;
|
|
||||||
color: $color-title;
|
|
||||||
font-size: $font-size-base;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.all-money-num {
|
|
||||||
color: $color-tip;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-wenxiao {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 50rpx;
|
|
||||||
color: var(--base-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.number {
|
|
||||||
font-weight: 600;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-text {
|
|
||||||
font-size: 20rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-title {
|
|
||||||
font-size: 50rpx;
|
|
||||||
font-weight: 900;
|
|
||||||
color: #f5f5f5;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-rank {
|
|
||||||
color: #f5f5f5;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-rakn-text {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: 900;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ranking-list {
|
|
||||||
transform: translateY(-120rpx);
|
|
||||||
margin: 200rpx 24rpx;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 10rpx 20rpx;
|
|
||||||
margin-top: 140rpx;
|
|
||||||
|
|
||||||
.ranking-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 20rpx 0;
|
|
||||||
border-bottom: 2rpx solid #f5f5f5;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ranking {
|
|
||||||
width: 60rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(1) .ranking {
|
|
||||||
background: rgb(249, 186, 1);
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 10rpx solid rgb(254, 220, 92);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(2) .ranking {
|
|
||||||
background: rgb(172, 185, 194);
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 10rpx solid rgb(215, 223, 229);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(3) .ranking {
|
|
||||||
background: rgb(211, 163, 136);
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 10rpx solid rgb(235, 201, 190);
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
flex: 1;
|
|
||||||
width: 0;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.head-img {
|
|
||||||
width: 90rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nickname {
|
|
||||||
color: #333;
|
|
||||||
margin: 0 20rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -83,15 +83,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -69,9 +69,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
withdrawInfo: {},
|
withdrawInfo: {},
|
||||||
@@ -5,20 +5,16 @@
|
|||||||
<block v-if="withdrawList.length">
|
<block v-if="withdrawList.length">
|
||||||
<view class="detailed-wrap">
|
<view class="detailed-wrap">
|
||||||
<view class="cont">
|
<view class="cont">
|
||||||
<view class="detailed-item" v-for="(item, index) in withdrawList" :key="index"
|
<view class="detailed-item" v-for="(item, index) in withdrawList" :key="index" @click="toDetail(item.id)">
|
||||||
@click="toDetail(item.id)">
|
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="event">{{ item.transfer_type == 'balance' && '余额' ||
|
<view class="event">{{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}</view>
|
||||||
item.transfer_type == 'alipay' && '支付宝' || item.transfer_type == 'bank' && '银行卡' ||
|
|
||||||
item.transfer_type =='wechatpay'&&'微信' }}</view>
|
|
||||||
<view>
|
<view>
|
||||||
<text class="time">{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
<text class="time">{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-wrap">
|
<view class="right-wrap">
|
||||||
<view class="num color-base-text">¥{{ item.money }}</view>
|
<view class="num color-base-text">¥{{ item.money }}</view>
|
||||||
<view class="status-name" :style="withdrawState[item.status].color">{{
|
<view class="status-name" :style="withdrawState[item.status].color">{{ item.status_name }}</view>
|
||||||
item.status_name }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -34,16 +30,23 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
nsLogin,
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
MescrollUni,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
loadingCover,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
nsEmpty,
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -71,7 +74,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout( () => {
|
||||||
if (!this.addonIsExist.fenxiao) {
|
if (!this.addonIsExist.fenxiao) {
|
||||||
this.$util.showToast({
|
this.$util.showToast({
|
||||||
title: '商家未开启分销',
|
title: '商家未开启分销',
|
||||||
@@ -82,9 +85,9 @@ export default {
|
|||||||
this.$util.redirectTo('/pages/index/index');
|
this.$util.redirectTo('/pages/index/index');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
}, 1000);
|
},1000);
|
||||||
|
|
||||||
if (this.fenxiaoWords && this.fenxiaoWords.withdraw) this.$langConfig.title(this.fenxiaoWords.withdraw + '明细');
|
if(this.fenxiaoWords && this.fenxiaoWords.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细');
|
||||||
|
|
||||||
if (!this.storeToken) {
|
if (!this.storeToken) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -170,7 +173,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
|
|
||||||
&>view {
|
& > view {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 0 $padding;
|
padding: 0 $padding;
|
||||||
@@ -54,9 +54,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: 0,
|
id: 0,
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<image :src="$util.img(merch.merch_image)" mode="widthFix" style="width: 100rpx;height: 100rpx;" />
|
<image :src="$util.img(merch.merch_image)" mode="widthFix" style="width: 100rpx;height: 100rpx;" />
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left: 20rpx;padding-top: 22rpx;">
|
<view style="margin-left: 20rpx;padding-top: 22rpx;">
|
||||||
<view style="line-height: 1;font-size: 32rpx;font-weight: 600;">{{ merch.merch_name }}</view>
|
<view style="line-height: 1;font-size: 32rpx;font-weight: 600;">{{merch.merch_name}}</view>
|
||||||
<view style="color:rgb(255 202 40)">
|
<view style="color:rgb(255 202 40)">
|
||||||
<text class="icox icox-xing"></text>
|
<text class="icox icox-xing"></text>
|
||||||
<text class="icox icox-xing"></text>
|
<text class="icox icox-xing"></text>
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<view class="sort-wrap">
|
<view class="sort-wrap">
|
||||||
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }"
|
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }" @click="sortTabClick('')">
|
||||||
@click="sortTabClick('')">
|
|
||||||
<text :class="{ 'color-base-text': orderType === '' }">综合</text>
|
<text :class="{ 'color-base-text': orderType === '' }">综合</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -40,12 +39,8 @@
|
|||||||
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
||||||
<text :class="{ 'color-base-text': orderType === 'discount_price' }">价格</text>
|
<text :class="{ 'color-base-text': orderType === 'discount_price' }">价格</text>
|
||||||
<view class="iconfont-wrap">
|
<view class="iconfont-wrap">
|
||||||
<view class="iconfont icon-iconangledown-copy asc"
|
<view class="iconfont icon-iconangledown-copy asc" :class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }"></view>
|
||||||
:class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }">
|
<view class="iconfont icon-iconangledown desc" :class="{ 'color-base-text': priceOrder === 'desc' && orderType === 'discount_price' }"></view>
|
||||||
</view>
|
|
||||||
<view class="iconfont icon-iconangledown desc"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'desc' && orderType === 'discount_price' }">
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -61,20 +56,17 @@
|
|||||||
<mescroll-uni top="240" ref="mescroll" @getData="getGoodsList">
|
<mescroll-uni top="240" ref="mescroll" @getData="getGoodsList">
|
||||||
<block slot="list">
|
<block slot="list">
|
||||||
<view class="goods-list single-column" :class="{ show: isList }">
|
<view class="goods-list single-column" :class="{ show: isList }">
|
||||||
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||||
@click="toDetail(item)">
|
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
||||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||||
</view>
|
|
||||||
<view class="sell-out" v-if="item.stock <= 0">
|
<view class="sell-out" v-if="item.stock <= 0">
|
||||||
<text class="iconfont icon-shuqing"></text>
|
<text class="iconfont icon-shuqing"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="name-wrap">
|
<view class="name-wrap">
|
||||||
<view class="goods-name"
|
<view class="goods-name" :class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
||||||
:class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
|
||||||
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -82,19 +74,15 @@
|
|||||||
<view class="lineheight-clear">
|
<view class="lineheight-clear">
|
||||||
<view class="discount-price" v-if="item.isinformation == 0">
|
<view class="discount-price" v-if="item.isinformation == 0">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-style large">{{
|
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价'
|
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="member-price-tag"
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||||
@@ -107,8 +95,7 @@
|
|||||||
<text>{{ showMarketPrice(item) }}</text>
|
<text>{{ showMarketPrice(item) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="block-wrap">
|
<view class="block-wrap">
|
||||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||||
? item.unit : '件' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
@@ -147,8 +134,7 @@
|
|||||||
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
<diy-icon :icon="config.iconDiy.icon"
|
<diy-icon :icon="config.iconDiy.icon" :value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
||||||
:value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -157,36 +143,29 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="goods-list double-column" :class="{ show: !isList }">
|
<view class="goods-list double-column" :class="{ show: !isList }">
|
||||||
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index"
|
||||||
@click="toDetail(item)"
|
@click="toDetail(item)" :style="{ left: listPosition[index] ? listPosition[index].left : '', top: listPosition[index] ? listPosition[index].top : '' }">
|
||||||
:style="{ left: listPosition[index] ? listPosition[index].left : '', top: listPosition[index] ? listPosition[index].top : '' }">
|
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
||||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||||
</view>
|
|
||||||
<view class="sell-out" v-if="item.stock <= 0">
|
<view class="sell-out" v-if="item.stock <= 0">
|
||||||
<text class="iconfont icon-shuqing"></text>
|
<text class="iconfont icon-shuqing"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="goods-name"
|
<view class="goods-name" :class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
||||||
:class="[{ 'using-hidden': config.nameLineMode == 'single' }, { 'multi-hidden': config.nameLineMode == 'multiple' }]">
|
|
||||||
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
{{ isEnEnv ? item.en_goods_name : item.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="lineheight-clear">
|
<view class="lineheight-clear">
|
||||||
<view class="discount-price" v-if="item.isinformation == 0">
|
<view class="discount-price" v-if="item.isinformation == 0">
|
||||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||||
<text class="price price-style large">{{
|
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||||
<text class="unit price-style small">.{{
|
|
||||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-price" v-else>
|
<view class="discount-price" v-else>
|
||||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价'
|
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
|
||||||
}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag"
|
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
|
||||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||||
@@ -198,9 +177,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pro-info" v-if="item.isinformation == 0">
|
<view class="pro-info" v-if="item.isinformation == 0">
|
||||||
<view class="block-wrap">
|
<view class="block-wrap" >
|
||||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||||
? item.unit : '件' }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
@@ -239,8 +217,7 @@
|
|||||||
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
}" class="icon-diy click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
<diy-icon :icon="config.iconDiy.icon"
|
<diy-icon :icon="config.iconDiy.icon" :value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
||||||
:value="config.iconDiy.style ? config.iconDiy.style : null"></diy-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -292,11 +269,8 @@
|
|||||||
<view @click="selectedCategory('')" class="list-wrap">
|
<view @click="selectedCategory('')" class="list-wrap">
|
||||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
|
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
|
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList" :key="index" class="list-wrap">
|
||||||
:key="index" class="list-wrap">
|
<text :class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{ item.category_name }}</text>
|
||||||
<text
|
|
||||||
:class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{
|
|
||||||
item.category_name }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -316,43 +290,47 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
|
||||||
import list from './public/js/list.js';
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
||||||
|
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
|
||||||
export default {
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
components: {
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
uniDrawer: () => import('@/components/uni-drawer/uni-drawer.vue'),
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
uniTag: () => import('@/components/uni-tag/uni-tag.vue'),
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
|
||||||
uniNumberBox: () => import('@/components/uni-number-box/uni-number-box.vue'),
|
|
||||||
nsGoodsSku: () => import('@/components/ns-goods-sku/ns-goods-sku.vue'),
|
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
import list from './public/js/list.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
uniDrawer,
|
||||||
|
uniTag,
|
||||||
|
nsGoodsSkuIndex,
|
||||||
|
MescrollUni,
|
||||||
|
nsLogin,
|
||||||
|
loadingCover,
|
||||||
|
nsEmpty,
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
privacyPopup
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
mixins: [list]
|
mixins: [list]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import './public/css/list.scss';
|
@import './public/css/list.scss';
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style scoped>
|
||||||
/deep/ .uni-tag--primary.uni-tag--inverted {
|
>>>.uni-tag--primary.uni-tag--inverted {
|
||||||
background-color: #f5f5f5 !important;
|
background-color: #f5f5f5 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -61,10 +61,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {},
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
|
|||||||
@@ -1,924 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="content" :style="themeColor">
|
|
||||||
<view class="head-wrap">
|
|
||||||
<!-- 搜索区域 -->
|
|
||||||
<view class="search-wrap uni-flex uni-row">
|
|
||||||
<view class="flex-item input-wrap" @click.stop="search()" @tap.stop="search()">
|
|
||||||
<input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()"
|
|
||||||
@click.stop="search()" @tap.stop="search()"
|
|
||||||
:placeholder="isEnEnv ? 'Please enter product keywords' : '请输入商品关键词'" />
|
|
||||||
<text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 排序 -->
|
|
||||||
<view class="sort-wrap">
|
|
||||||
<view class="comprehensive-wrap" :class="{ 'color-base-text': order === '' }" @click="sortTabClick('')">
|
|
||||||
<text :class="{ 'color-base-text': order === '' }">{{ isEnEnv ? 'Comprehensive' : '综合' }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="price-wrap" @click="sortTabClick('point')">
|
|
||||||
<text :class="{ 'color-base-text': order === 'point' }">{{ isEnEnv ? 'Points' : '积分' }}</text>
|
|
||||||
<view class="iconfont-wrap">
|
|
||||||
<view class="iconfont icon-shangsanjiao-copy"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'asc' && order === 'point' }"></view>
|
|
||||||
<view class="iconfont icon-sanjiao"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'desc' && order === 'point' }"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="price-wrap" @click="sortTabClick('create_time')">
|
|
||||||
<text :class="{ 'color-base-text': order === 'create_time' }">{{ isEnEnv ? 'New Arrival' : '上新时间'
|
|
||||||
}}</text>
|
|
||||||
<view class="iconfont-wrap">
|
|
||||||
<view class="iconfont icon-shangsanjiao-copy"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'asc' && order === 'create_time' }"></view>
|
|
||||||
<view class="iconfont icon-sanjiao"
|
|
||||||
:class="{ 'color-base-text': priceOrder === 'desc' && order === 'create_time' }"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view :class="{ 'color-base-text': order === 'screen' }" class="screen-wrap">
|
|
||||||
<text @click="sortTabClick('screen')">{{ isEnEnv ? 'Filter' : '筛选' }}</text>
|
|
||||||
<view @click="sortTabClick('screen')" class="iconfont-wrap">
|
|
||||||
<view class="iconfont icon-shaixuan color-tip"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<mescroll-uni top="180" @getData="getData" ref="mescroll" :size="10">
|
|
||||||
<block slot="list">
|
|
||||||
<view class="list-wrap">
|
|
||||||
<view class="goods-list double-column" v-if="goodsList.length">
|
|
||||||
<view class="goods-item margin-bottom" v-for="(item, index) in goodsList" :key="index">
|
|
||||||
<view class="goods-img" @click="toDetail(item)">
|
|
||||||
<image :src="goodsImg(item.image)" mode="widthFix" @error="imgError(index)"></image>
|
|
||||||
</view>
|
|
||||||
<view class="info-wrap">
|
|
||||||
<view class="name-wrap">
|
|
||||||
<view class="goods-name" @click="toDetail(item)">{{ isEnEnv ? item.en_goods_name :
|
|
||||||
item.goods_name }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="lineheight-clear">
|
|
||||||
<view class="discount-price">
|
|
||||||
<text class="unit ">{{ item.point }}</text>
|
|
||||||
<text class="unit font-size-tag">{{ isEnEnv ? 'Points' : '积分' }}</text>
|
|
||||||
<block v-if="item.price > 0 && item.pay_type > 0">
|
|
||||||
<text class="unit font-size-tag">+</text>
|
|
||||||
<text class="unit font-size-tag">{{ $lang('common.currencySymbol')
|
|
||||||
}}</text>
|
|
||||||
<text class="price font-size-toolbar">{{
|
|
||||||
parseFloat(item.price).toFixed(2).split(".")[0] }}</text>
|
|
||||||
<text class="unit font-size-tag">.{{
|
|
||||||
parseFloat(item.price).toFixed(2).split(".")[1] }}</text>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="pro-info" v-if="item.stock_show">
|
|
||||||
<view class="font-size-activity-tag color-tip">{{ isEnEnv ? 'Stock ' : '库存' }}{{
|
|
||||||
item.stock }}</view>
|
|
||||||
<view class="sale font-size-activity-tag color-tip" @click="toDetail(item)">
|
|
||||||
<!-- <button type="primary" size="mini">立即兑换</button> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="empty" v-if="goodsList.length == 0">
|
|
||||||
<ns-empty :isIndex="false"
|
|
||||||
:text="isEnEnv ? 'No point products available' : '暂无积分商品'"></ns-empty>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</mescroll-uni>
|
|
||||||
|
|
||||||
<!-- 筛选弹出框 -->
|
|
||||||
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
|
|
||||||
<view class="title color-tip">{{ isEnEnv ? 'Filter' : '筛选' }}</view>
|
|
||||||
<scroll-view scroll-y>
|
|
||||||
<!-- 价格筛选项 -->
|
|
||||||
<view class="item-wrap">
|
|
||||||
<view class="label"><text>{{ isEnEnv ? 'Point Range' : '积分区间' }}</text></view>
|
|
||||||
<view class="price-wrap">
|
|
||||||
<input class="uni-input" type="digit" v-model="minPoint"
|
|
||||||
:placeholder="isEnEnv ? 'Min' : '最低'" />
|
|
||||||
<view class="h-line"></view>
|
|
||||||
<input class="uni-input" type="digit" v-model="maxPoint"
|
|
||||||
:placeholder="isEnEnv ? 'Max' : '最高'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 分类筛选项 -->
|
|
||||||
<view class="category-list-wrap">
|
|
||||||
<text class="first">{{ isEnEnv ? 'All Categories' : '全部分类' }}</text>
|
|
||||||
<view class="class-box">
|
|
||||||
<view @click="selectedCategory('')" class="list-wrap"><text
|
|
||||||
:class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ isEnEnv ? 'All' :
|
|
||||||
'全部' }}</text></view>
|
|
||||||
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
|
|
||||||
:key="index" class="list-wrap">
|
|
||||||
<text
|
|
||||||
:class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{
|
|
||||||
item.category_name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<view class="footer" :class="{ 'safe-area': isIphoneX }">
|
|
||||||
<button type="default" class="footer-box" @click="resetData">{{ isEnEnv ? 'Reset' : '重置' }}</button>
|
|
||||||
<button type="primary" class="footer-box1" @click="screenData">{{ isEnEnv ? 'Confirm' : '确定' }}</button>
|
|
||||||
</view>
|
|
||||||
</uni-drawer>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
uniDrawer: () => import('@/components/uni-drawer/uni-drawer.vue'),
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsSelectTime: () => import('@/components/ns-select-time/ns-select-time.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listStyle: '',
|
|
||||||
priceOrder: 'desc',
|
|
||||||
categoryList: [], //排序类型
|
|
||||||
goodsList: [],
|
|
||||||
order: '',
|
|
||||||
sort: 'desc',
|
|
||||||
showScreen: false,
|
|
||||||
keyword: '',
|
|
||||||
categoryId: 0,
|
|
||||||
minPoint: '',
|
|
||||||
maxPoint: '',
|
|
||||||
isFreeShipping: false, //是否免邮
|
|
||||||
isIphoneX: false,
|
|
||||||
coupon: 0,
|
|
||||||
emptyShow: false,
|
|
||||||
isList: true, //列表样式
|
|
||||||
mescroll: null,
|
|
||||||
isLogin: false,
|
|
||||||
couponList: [],
|
|
||||||
hongbaoList: [],
|
|
||||||
point: 0,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
this.categoryId = options.category_id || 0;
|
|
||||||
this.keyword = options.keyword || '';
|
|
||||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
|
||||||
this.coupon = options.coupon || 0;
|
|
||||||
this.loadCategoryList(this.categoryId);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//获取积分商品详情
|
|
||||||
getData(mescroll) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/pointexchange/api/goods/page',
|
|
||||||
data: {
|
|
||||||
page_size: mescroll.size,
|
|
||||||
page: mescroll.num,
|
|
||||||
type: 1,
|
|
||||||
keyword: this.keyword,
|
|
||||||
category_id: this.categoryId,
|
|
||||||
min_point: this.minPoint,
|
|
||||||
max_point: this.maxPoint,
|
|
||||||
is_free_shipping: (this.isFreeShipping ? 1 : 0),
|
|
||||||
order: this.order,
|
|
||||||
sort: this.sort,
|
|
||||||
coupon: this.coupon
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
mescroll.endSuccess(newArr.length);
|
|
||||||
//设置列表数据
|
|
||||||
if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
|
|
||||||
this.goodsList = this.goodsList.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
//联网失败的回调
|
|
||||||
mescroll.endErr();
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//加载分类
|
|
||||||
loadCategoryList(fid, sid) {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/goodscategory/tree',
|
|
||||||
data: {},
|
|
||||||
success: res => {
|
|
||||||
if (res.data != null) this.categoryList = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goodsImg(imgStr) {
|
|
||||||
let imgs = imgStr.split(',');
|
|
||||||
return imgs[0] ? this.$util.img(imgs[0], {
|
|
||||||
size: 'mid'
|
|
||||||
}) : this.$util.getDefaultImage().goods;
|
|
||||||
},
|
|
||||||
imgError(index) {
|
|
||||||
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
|
|
||||||
},
|
|
||||||
//跳转至详情页面
|
|
||||||
toDetail(item) {
|
|
||||||
this.$util.redirectTo('/pages_promotion/point/detail', {
|
|
||||||
id: item.id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
search() {
|
|
||||||
this.emptyShow = false;
|
|
||||||
this.goodsList = [];
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
},
|
|
||||||
//筛选点击
|
|
||||||
sortTabClick(tag) {
|
|
||||||
if (tag == 'point') {
|
|
||||||
this.order = 'point';
|
|
||||||
this.sort = 'desc';
|
|
||||||
} else if (tag == 'create_time') {
|
|
||||||
this.order = 'create_time';
|
|
||||||
this.sort = 'desc';
|
|
||||||
} else if (tag == 'screen') {
|
|
||||||
//筛选
|
|
||||||
this.showScreen = true;
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.order = '';
|
|
||||||
this.sort = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.order = tag;
|
|
||||||
if (tag === 'create_time') {
|
|
||||||
this.priceOrder = this.priceOrder === 'asc' ? 'desc' : 'asc';
|
|
||||||
this.sort = this.priceOrder;
|
|
||||||
} else if (tag === 'point') {
|
|
||||||
this.priceOrder = this.priceOrder === 'asc' ? 'desc' : 'asc';
|
|
||||||
this.sort = this.priceOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.emptyShow = false;
|
|
||||||
this.goodsList = [];
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
},
|
|
||||||
selectedCategory(categoryId) {
|
|
||||||
this.categoryId = categoryId;
|
|
||||||
},
|
|
||||||
screenData() {
|
|
||||||
if (this.minPoint != '' || this.maxPoint != '') {
|
|
||||||
// if (!Number(this.minPoint) && this.minPoint) {
|
|
||||||
// this.$util.showToast({
|
|
||||||
// title: '请输入最低价'
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (!Number(this.maxPoint) && this.maxPoint) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.isEnEnv ? 'Please enter the maximum price' : '请输入最高价'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Number(this.minPoint) < 0 || Number(this.maxPoint) < 0) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.isEnEnv ? 'Filter price cannot be less than 0' : '筛选价格不能小于0'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.minPoint != '' && Number(this.minPoint) > Number(this.maxPoint) && this.maxPoint) {
|
|
||||||
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.isEnEnv ? 'Minimum price cannot be greater than maximum price' : '最低价不能大于最高价'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.maxPoint != '' && Number(this.maxPoint) < Number(this.minPoint)) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: this.isEnEnv ? 'Maximum price cannot be less than minimum price' : '最高价不能小于最低价'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.emptyShow = false;
|
|
||||||
this.goodsList = [];
|
|
||||||
this.$refs.mescroll.refresh();
|
|
||||||
this.showScreen = false;
|
|
||||||
},
|
|
||||||
//重置数据
|
|
||||||
resetData() {
|
|
||||||
this.showScreen = false;
|
|
||||||
this.categoryId = 0
|
|
||||||
this.minPoint = ''
|
|
||||||
this.maxPoint = ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.head-wrap {
|
|
||||||
background: #fff;
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
.search-wrap {
|
|
||||||
flex: 0.5;
|
|
||||||
padding: 30rpx 30rpx 0;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.input-wrap {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background: $color-bg;
|
|
||||||
height: 70rpx;
|
|
||||||
padding-left: 10rpx;
|
|
||||||
border-radius: 70rpx;
|
|
||||||
|
|
||||||
input {
|
|
||||||
width: 90%;
|
|
||||||
background: $color-bg;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
height: 50rpx;
|
|
||||||
padding: 10rpx 25rpx 10rpx 40rpx;
|
|
||||||
line-height: 50rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
text {
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
color: $color-tip;
|
|
||||||
width: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-wrap,
|
|
||||||
.list-style {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size: 50rpx;
|
|
||||||
color: $color-tip;
|
|
||||||
}
|
|
||||||
|
|
||||||
text {
|
|
||||||
display: block;
|
|
||||||
margin-top: 60rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sort-wrap {
|
|
||||||
display: flex;
|
|
||||||
padding: 10rpx 20rpx 10rpx 0;
|
|
||||||
|
|
||||||
>view {
|
|
||||||
flex: 1;
|
|
||||||
text-align: center;
|
|
||||||
font-size: $font-size-base;
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comprehensive-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.iconfont-wrap {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
line-height: 1;
|
|
||||||
margin-bottom: 5rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.price-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.iconfont-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 40rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
float: left;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
height: 20rpx;
|
|
||||||
color: #909399;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.iconfont-wrap {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
width: 40rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size: $font-size-toolbar;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-list-wrap {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.class-box {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0 $padding;
|
|
||||||
|
|
||||||
view {
|
|
||||||
width: calc((100% - 60rpx) / 3);
|
|
||||||
font-size: $font-size-goods-tag;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 12rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
background: rgba(245, 245, 245, 1);
|
|
||||||
border-radius: 5rpx;
|
|
||||||
|
|
||||||
&:nth-of-type(3n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.first {
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
display: block;
|
|
||||||
// background: $page-color-base;
|
|
||||||
padding: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.second {
|
|
||||||
border-bottom: 2rpx solid $color-line;
|
|
||||||
padding: 20rpx;
|
|
||||||
display: block;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
.third {
|
|
||||||
padding: 0 20rpx 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
|
|
||||||
>view {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-tag {
|
|
||||||
padding: 0 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-wrap {
|
|
||||||
.title {
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
padding: $padding;
|
|
||||||
background: #f6f4f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
scroll-view {
|
|
||||||
height: 85%;
|
|
||||||
|
|
||||||
.item-wrap {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: $font-size-tag;
|
|
||||||
padding: $padding;
|
|
||||||
|
|
||||||
view {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 60rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
line-height: 40rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
margin: $margin-updown $margin-both;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
>view {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 25rpx;
|
|
||||||
margin-bottom: 25rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-tag {
|
|
||||||
padding: 0 $padding;
|
|
||||||
font-size: $font-size-goods-tag;
|
|
||||||
background: #f5f5f5;
|
|
||||||
height: 52rpx;
|
|
||||||
line-height: 52rpx;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.price-wrap {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: $padding;
|
|
||||||
|
|
||||||
input {
|
|
||||||
flex: 1;
|
|
||||||
background: #f5f5f5;
|
|
||||||
height: 52rpx;
|
|
||||||
width: 182rpx;
|
|
||||||
line-height: 50rpx;
|
|
||||||
font-size: $font-size-goods-tag;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-right: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
height: 90rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: flex-start;
|
|
||||||
//position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.footer-box {
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
margin: 0;
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-box1 {
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
margin: 0;
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.safe-area {
|
|
||||||
bottom: 68rpx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty {
|
|
||||||
margin-top: 100rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.buy-num {
|
|
||||||
font-size: $font-size-activity-tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 34rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-style-new {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 4rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
background-color: rgba(227, 227, 227, 1);
|
|
||||||
margin-right: 60rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.h-line {
|
|
||||||
width: 37rpx;
|
|
||||||
height: 2rpx;
|
|
||||||
background-color: $color-tip;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lineheight-clear {
|
|
||||||
line-height: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 商品列表单列样式
|
|
||||||
.goods-list.single-column {
|
|
||||||
.goods-item {
|
|
||||||
padding: 26rpx;
|
|
||||||
background: #fff;
|
|
||||||
margin: $margin-updown $margin-both;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.goods-img {
|
|
||||||
width: 200rpx;
|
|
||||||
height: 200rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-tag {
|
|
||||||
color: #fff;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 8rpx 12rpx;
|
|
||||||
position: absolute;
|
|
||||||
border-top-left-radius: $border-radius;
|
|
||||||
border-bottom-right-radius: $border-radius;
|
|
||||||
top: 26rpx;
|
|
||||||
left: 26rpx;
|
|
||||||
font-size: $font-size-goods-tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-tag-img {
|
|
||||||
position: absolute;
|
|
||||||
border-top-left-radius: $border-radius;
|
|
||||||
width: 80rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
top: 26rpx;
|
|
||||||
left: 26rpx;
|
|
||||||
z-index: 5;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-wrap {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name-wrap {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-name {
|
|
||||||
font-size: $font-size-base;
|
|
||||||
line-height: 1.3;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
height: 68rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.introduction {
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.discount-price {
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
color: var(--price-color);
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
margin-right: 6rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pro-info {
|
|
||||||
display: flex;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
|
|
||||||
.delete-price {
|
|
||||||
text-decoration: line-through;
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
margin-right: 6rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&>view {
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.member-price-tag {
|
|
||||||
display: inline-block;
|
|
||||||
width: 60rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-left: 6rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 商品列表双列样式
|
|
||||||
.goods-list.double-column {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin: 0 $margin-both;
|
|
||||||
padding-top: $margin-updown;
|
|
||||||
|
|
||||||
.goods-item {
|
|
||||||
flex: 1;
|
|
||||||
position: relative;
|
|
||||||
background-color: #fff;
|
|
||||||
flex-basis: 48%;
|
|
||||||
max-width: calc((100% - 30rpx) / 2);
|
|
||||||
margin: 0 $margin-both $margin-updown 0;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
|
|
||||||
&:nth-child(2n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-img {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
padding-top: 100%;
|
|
||||||
border-top-left-radius: $border-radius;
|
|
||||||
border-top-right-radius: $border-radius;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-tag {
|
|
||||||
color: #fff;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 8rpx 16rpx;
|
|
||||||
position: absolute;
|
|
||||||
border-bottom-right-radius: $border-radius;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
font-size: $font-size-goods-tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-tag-img {
|
|
||||||
position: absolute;
|
|
||||||
border-top-left-radius: $border-radius;
|
|
||||||
width: 80rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 5;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-wrap {
|
|
||||||
padding: 0 26rpx 26rpx 26rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.goods-name {
|
|
||||||
font-size: $font-size-base;
|
|
||||||
line-height: 1.3;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
height: 68rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.discount-price {
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
color: var(--price-color);
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
margin-right: 6rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pro-info {
|
|
||||||
display: flex;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
|
|
||||||
.delete-price {
|
|
||||||
text-decoration: line-through;
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
margin-right: 6rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&>view {
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.member-price-tag {
|
|
||||||
display: inline-block;
|
|
||||||
width: 60rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-left: 6rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
/deep/ .uni-tag--primary.uni-tag--inverted {
|
|
||||||
background-color: #f5f5f5 !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,617 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="conteiner" :style="themeColor">
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<view class="point-navbar"
|
|
||||||
:style="{ 'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">
|
|
||||||
<view class="nav-wrap" :style="{ width: menuButtonBounding.left + 'px' }">
|
|
||||||
<view class="back" @click="back"
|
|
||||||
:style="{ width: menuButtonBounding.height + 'px', height: menuButtonBounding.height + 'px' }">
|
|
||||||
<text class="iconfont icon-back_light"></text>
|
|
||||||
</view>
|
|
||||||
<view class="search" @click="$util.redirectTo('/pages_tool/goods/search')">
|
|
||||||
<text class="iconfont icon-sousuo3"></text>
|
|
||||||
<text class="tips">搜索商品</text>
|
|
||||||
</view>
|
|
||||||
<view class="sign"
|
|
||||||
:style="{ width: menuButtonBounding.height + 'px', height: menuButtonBounding.height + 'px' }"
|
|
||||||
@click="redirect('/pages_tool/member/signin')">
|
|
||||||
<image :src="$util.img('public/uniapp/point/navbar-sing-icon.png')" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="point-navbar-block" :style="{ height: menuButtonBounding.bottom + 'px' }"></view>
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<scroll-view scroll-y="true" class="point-scroll-view" @scrolltolower="getData">
|
|
||||||
<view class="point-wrap" :style="{ 'background-position-y': -menuButtonBounding.bottom + 'px' }">
|
|
||||||
<view class="head-box">
|
|
||||||
<view class="account-content">
|
|
||||||
<view class="left">
|
|
||||||
<image :src="$util.img('public/uniapp/point/point-icon.png')" mode="widthFix"></image>
|
|
||||||
<view>我的积分</view>
|
|
||||||
</view>
|
|
||||||
<view class="right">
|
|
||||||
<text class="point price-font">{{ point }}</text>
|
|
||||||
<text class="text">积分</text>
|
|
||||||
<!-- <text class="iconfont icon-right"></text> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="remark">
|
|
||||||
<view class="label">提醒</view>
|
|
||||||
<view class="text">积分兑好礼,每日上新换不停!</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="menu-wrap">
|
|
||||||
<view class="menu-list">
|
|
||||||
<view class="menu-item" @click="openPointPopup()">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/point-rule.png')" class="menu-img"></image>
|
|
||||||
<image :src="$util.img('/public/uniapp/point/must-see.png')" class="menu-tag"></image>
|
|
||||||
<view class="title">活动规则</view>
|
|
||||||
</view>
|
|
||||||
<view class="menu-item" @click="redirect('/pages_tool/recharge/list')">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/recharge.png')" class="menu-img"></image>
|
|
||||||
<image :src="$util.img('/public/uniapp/point/high.png')" class="menu-tag"></image>
|
|
||||||
<view class="title">储值赚积分</view>
|
|
||||||
</view>
|
|
||||||
<view class="menu-item" @click="redirect('/pages_promotion/point/order_list')">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/exchange-record.png')" class="menu-img"></image>
|
|
||||||
<view class="title">兑换记录</view>
|
|
||||||
</view>
|
|
||||||
<view class="menu-item" @click="luckdraw">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/luck-draw.png')" class="menu-img"></image>
|
|
||||||
<view class="title">积分抽奖</view>
|
|
||||||
</view>
|
|
||||||
<view class="menu-item" @click="redirect('/pages_tool/member/point_detail')">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/point-detail.png')" class="menu-img"></image>
|
|
||||||
<view class="title">积分明细</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<!--
|
|
||||||
<view class="poster-wrap">
|
|
||||||
<view class="poster-item" @click="redirect('/pages_tool/recharge/list')">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/recharge-poster.png')" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
<view class="poster-item" @click="luckdraw">
|
|
||||||
<image :src="$util.img('/public/uniapp/point/luck-draw-poster.png')" mode="widthFix"></image>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<view class="recharge-list-wrap" @click="redirect('/pages_tool/recharge/list')"
|
|
||||||
v-if="rechargeList.length">
|
|
||||||
<view class="item-wrap" v-for="(item, index) in rechargeList.slice(0, 4)" :key="index">
|
|
||||||
<view class="recharge">储值{{ parseFloat(item.buy_price) }}元</view>
|
|
||||||
<view class="point">可得{{ item.point }}积分</view>
|
|
||||||
<view class="btn">去储值</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="body-wrap" :class="{ 'no-login': !storeToken }">
|
|
||||||
<view class="point-exchange-wrap exchange-coupon" v-if="couponList.length > 0">
|
|
||||||
<view class="card-category-title">
|
|
||||||
<text class="before-line"></text>
|
|
||||||
<text>积分换券</text>
|
|
||||||
<text class="after-line"></text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="list-wrap">
|
|
||||||
<view class="list-wrap-scroll" :class="{ 'single-row': couponList.length < 3 }">
|
|
||||||
<view class="list-wrap-item coupon-list-wrap-item"
|
|
||||||
v-for="(couponItem, couponIndex) in couponList" :key="couponIndex"
|
|
||||||
@click="toDetail(couponItem)">
|
|
||||||
<view class="img-box">
|
|
||||||
<image
|
|
||||||
:src="$util.img('public/uniapp/point/coupon_' + themeStyle.name + '_bg1.png')" />
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="coupon"
|
|
||||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/point/coupon_theme-blue_bg1.jpg') + ')' }">
|
|
||||||
<view class="coupon_left color-line-border">
|
|
||||||
<view class="price price-font">
|
|
||||||
<block v-if="couponItem.coupon_type == 'reward'">
|
|
||||||
<text>¥</text>
|
|
||||||
{{ parseFloat(couponItem.money) }}
|
|
||||||
</block>
|
|
||||||
<block v-if="couponItem.coupon_type == 'discount'">
|
|
||||||
<block v-if="couponItem.coupon_type == 'discount'">
|
|
||||||
{{ parseFloat(couponItem.discount) }}<text>折</text>
|
|
||||||
</block>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
<view class="coupon-info">
|
|
||||||
<view class="coupon_condition font-size-activity-tag">
|
|
||||||
{{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' +
|
|
||||||
parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
|
|
||||||
</view>
|
|
||||||
<view class="coupon_type font-size-activity-tag"
|
|
||||||
v-if="couponItem.goods_type == 1">全场券</view>
|
|
||||||
<view class="coupon_type font-size-activity-tag"
|
|
||||||
v-else-if="couponItem.goods_type == 2 || couponItem.goods_type == 3">
|
|
||||||
指定券</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="coupon_right">
|
|
||||||
<view class="coupon_num font-size-tag">{{ couponItem.point }}积分</view>
|
|
||||||
<view class="coupon_btn">兑换</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="point-exchange-wrap exchange-hongbao" v-if="hongbaoList.length > 0">
|
|
||||||
<view class="card-category-title">
|
|
||||||
<text class="before-line"></text>
|
|
||||||
<text>积分换红包</text>
|
|
||||||
<text class="after-line"></text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="list-wrap">
|
|
||||||
<view class="list-wrap-item hongbao-list-wrap-item"
|
|
||||||
v-for="(hongbaoItem, hongbaoIndex) in hongbaoList" :key="hongbaoIndex"
|
|
||||||
@click="toDetail(hongbaoItem)">
|
|
||||||
<view class="img-box">
|
|
||||||
<image :src="$util.img('public/uniapp/point/hongbao_bg.png')"></image>
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="coupon hongbao">
|
|
||||||
<view class="coupon_left">
|
|
||||||
<view class="price price-font">
|
|
||||||
<text>¥</text>
|
|
||||||
{{ parseFloat(hongbaoItem.balance).toFixed(0) }}
|
|
||||||
</view>
|
|
||||||
<!-- <view class="coupon_condition font-size-activity-tag">{{ hongbaoItem.name }}</view> -->
|
|
||||||
</view>
|
|
||||||
<view class="coupon_right">
|
|
||||||
<view class="coupon_num font-size-tag">{{ hongbaoItem.point }}积分</view>
|
|
||||||
<view class="coupon_btn">兑换</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="point-exchange-wrap" v-if="goodsList.length > 0">
|
|
||||||
<view class="card-category-title">
|
|
||||||
<text class="before-line"></text>
|
|
||||||
<text>积分换礼品</text>
|
|
||||||
<text class="after-line"></text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="list-wrap">
|
|
||||||
<view class="goods-list double-column" v-if="goodsList.length">
|
|
||||||
<view class="goods-item " v-for="(item, index) in goodsList" :key="index">
|
|
||||||
<view class="goods-img" @click="toDetail(item)">
|
|
||||||
<image :src="goodsImg(item)" mode="widthFix" @error="imgError(index)"></image>
|
|
||||||
</view>
|
|
||||||
<view class="info-wrap">
|
|
||||||
<view class="name-wrap">
|
|
||||||
<view class="goods-name" @click="toDetail(item)">{{ item.name }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="lineheight-clear">
|
|
||||||
<view class="discount-price">
|
|
||||||
<view>
|
|
||||||
<text class="unit price-font point">{{ item.point }}</text>
|
|
||||||
<text class="unit font-size-tag ">积分</text>
|
|
||||||
</view>
|
|
||||||
<block v-if="item.price > 0 && item.pay_type > 0">
|
|
||||||
<text class="unit font-size-tag">+</text>
|
|
||||||
<view>
|
|
||||||
<text class="font-size-tag">{{
|
|
||||||
parseFloat(item.price).toFixed(2).split(".")[0] }}</text>
|
|
||||||
<text class="unit font-size-tag">.{{
|
|
||||||
parseFloat(item.price).toFixed(2).split(".")[1] }}元</text>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
<view class="btn" @click="toDetail(item)">兑换</view>
|
|
||||||
</view>
|
|
||||||
<view class="pro-info" v-if="item.stock_show || item.sale_show">
|
|
||||||
<view class="font-size-activity-tag color-tip" v-if="item.stock_show">
|
|
||||||
库存:{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}</view>
|
|
||||||
<view class="font-size-activity-tag color-tip sale" v-if="item.sale_show">
|
|
||||||
已兑:{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
|
|
||||||
<!-- 弹出规则 -->
|
|
||||||
<view @touchmove.prevent.stop>
|
|
||||||
<uni-popup ref="pointPopup" type="bottom">
|
|
||||||
<view class="tips-layer">
|
|
||||||
<view class="head" @click="closePointPopup()">
|
|
||||||
<view class="title">{{ isEnEnv ? 'Integral Description' : '积分说明' }}</view>
|
|
||||||
<text class="iconfont icon-close"></text>
|
|
||||||
</view>
|
|
||||||
<view class="body">
|
|
||||||
<view class="detail margin-bottom">
|
|
||||||
<view class="tip">{{ isEnEnv ? 'Integral Acquisition' : '积分的获取' }}</view>
|
|
||||||
<view class="font-size-base">1、积分可在注册、签到、分享、消费、充值时获得。</view>
|
|
||||||
<view class="font-size-base">2、在购买部分商品时可获得积分。</view>
|
|
||||||
<view class="tip">{{ isEnEnv ? 'Integral Use' : '积分的使用' }}</view>
|
|
||||||
<view class="font-size-base">1、积分可用于兑换积分中心的商品。</view>
|
|
||||||
<view class="font-size-base">2、积分可在参与某些活动时使用。</view>
|
|
||||||
<view class="font-size-base">3、积分不得转让,出售,不设有效期。</view>
|
|
||||||
<view class="tip">{{ isEnEnv ? 'Integral Query' : '积分的查询' }}</view>
|
|
||||||
<view class="font-size-base">1、积分可在会员中心中查询具体数额以及明细。</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
</view>
|
|
||||||
<loading-cover ref="loadingCover"></loading-cover>
|
|
||||||
<ns-login ref="login"></ns-login>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
|
||||||
nsSelectTime: () => import('@/components/ns-select-time/ns-select-time.vue'),
|
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mescroll: {
|
|
||||||
num: 0,
|
|
||||||
total: 1,
|
|
||||||
loading: false
|
|
||||||
},
|
|
||||||
categoryList: [{
|
|
||||||
id: 1,
|
|
||||||
name: '积分换好物'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '积分换券'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: '积分换红包'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
isLogin: false,
|
|
||||||
goodsList: [],
|
|
||||||
couponList: [],
|
|
||||||
hongbaoList: [],
|
|
||||||
point: 0,
|
|
||||||
signState: 1, // 签到是否开启
|
|
||||||
mpShareData: null, //小程序分享数据
|
|
||||||
menuButtonBounding: {
|
|
||||||
bottom: 0
|
|
||||||
},
|
|
||||||
rechargeList: [], //充值套餐
|
|
||||||
newestGame: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!this.addonIsExist.pointexchange) {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '商家未开启积分商城',
|
|
||||||
mask: true,
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$util.redirectTo('/pages/index/index');
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
this.menuButtonBounding = uni.getMenuButtonBoundingClientRect();
|
|
||||||
// #endif
|
|
||||||
//小程序分享接收source_member
|
|
||||||
if (option.source_member) {
|
|
||||||
uni.setStorageSync('source_member', option.source_member);
|
|
||||||
}
|
|
||||||
// 小程序扫码进入,接收source_member
|
|
||||||
if (option.scene) {
|
|
||||||
var sceneParams = decodeURIComponent(option.scene);
|
|
||||||
sceneParams = sceneParams.split('&');
|
|
||||||
if (sceneParams.length) {
|
|
||||||
sceneParams.forEach(item => {
|
|
||||||
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
|
|
||||||
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
|
|
||||||
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.getData();
|
|
||||||
this.getRechargeList();
|
|
||||||
this.getNewestGame();
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
//记录分享关系
|
|
||||||
if (this.storeToken && uni.getStorageSync('source_member')) {
|
|
||||||
this.$util.onSourceMember(uni.getStorageSync('source_member'));
|
|
||||||
}
|
|
||||||
|
|
||||||
//小程序分享
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
this.$util.getMpShare().then(res => {
|
|
||||||
this.mpShareData = res;
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
if (this.storeToken) this.getAccountInfo();
|
|
||||||
this.getCouponList();
|
|
||||||
this.getHongbaoList();
|
|
||||||
// this.getSignState();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 签到是否开启
|
|
||||||
getSignState() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/membersignin/getSignStatus',
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.signState = res.data.is_use;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
jumpPage(url) {
|
|
||||||
this.$util.redirectTo(url);
|
|
||||||
},
|
|
||||||
// 打开积分说明弹出层
|
|
||||||
openPointPopup() {
|
|
||||||
this.$refs.pointPopup.open();
|
|
||||||
},
|
|
||||||
// 打开积分说明弹出层
|
|
||||||
closePointPopup() {
|
|
||||||
this.$refs.pointPopup.close();
|
|
||||||
},
|
|
||||||
// 优惠券
|
|
||||||
getCouponList() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/pointexchange/api/goods/page',
|
|
||||||
data: {
|
|
||||||
page_size: 0,
|
|
||||||
type: 2
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
this.couponList = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: res.message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
//联网失败的回调
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 红包
|
|
||||||
getHongbaoList() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/pointexchange/api/goods/page',
|
|
||||||
data: {
|
|
||||||
page_size: 0,
|
|
||||||
type: 3
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
this.hongbaoList = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: res.message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
//联网失败的回调
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取积分商品详情
|
|
||||||
getData() {
|
|
||||||
if (this.mescroll.loading || this.mescroll.num >= this.mescroll.total) return;
|
|
||||||
this.mescroll.loading = true;
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/pointexchange/api/goods/page',
|
|
||||||
data: {
|
|
||||||
page: this.mescroll.num + 1,
|
|
||||||
page_size: 10,
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
let newArr = [];
|
|
||||||
let msg = res.message;
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
newArr = res.data.list;
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//设置列表数据
|
|
||||||
this.mescroll.loading = false;
|
|
||||||
this.mescroll.total = res.data.page_count;
|
|
||||||
this.mescroll.num += 1;
|
|
||||||
if (this.mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
|
|
||||||
this.goodsList = this.goodsList.concat(newArr); //追加新数据
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
this.mescroll.loading = false;
|
|
||||||
//联网失败的回调
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//跳转至详情页面
|
|
||||||
toDetail(item) {
|
|
||||||
this.$util.redirectTo('/pages_promotion/point/detail', {
|
|
||||||
id: item.id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goGoodsList() {
|
|
||||||
this.$util.redirectTo('/pages_promotion/point/goods_list');
|
|
||||||
},
|
|
||||||
//获取个人
|
|
||||||
getAccountInfo() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/memberaccount/info',
|
|
||||||
data: {
|
|
||||||
account_type: 'point'
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
if (!isNaN(parseFloat(res.data.point))) {
|
|
||||||
this.point = parseFloat(res.data.point).toFixed(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: res.message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//跳转至登录页面
|
|
||||||
login() {
|
|
||||||
this.$refs.login.open('/pages_promotion/point/list');
|
|
||||||
},
|
|
||||||
imgError(index) {
|
|
||||||
this.goodsList[index].image = this.$util.getDefaultImage().goods;
|
|
||||||
this.$forceUpdate();
|
|
||||||
},
|
|
||||||
goodsImg(data) {
|
|
||||||
let img = '';
|
|
||||||
switch (data.type) {
|
|
||||||
case 1:
|
|
||||||
img = this.$util.img(data.image.split(',')[0], {
|
|
||||||
size: 'mid'
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
img = data.image ? this.$util.img(data.image) : this.$util.img(
|
|
||||||
'public/uniapp/point/coupon.png');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
img = data.image ? this.$util.img(data.image) : this.$util.img(
|
|
||||||
'public/uniapp/point/hongbao.png');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return img;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 跳转
|
|
||||||
* @param {Object} url
|
|
||||||
*/
|
|
||||||
redirect(url) {
|
|
||||||
if (!this.storeToken) {
|
|
||||||
this.$refs.login.open(url);
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo(url);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getRechargeList() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/memberrecharge/api/memberrecharge/page',
|
|
||||||
data: {
|
|
||||||
page_size: 100,
|
|
||||||
page: 1
|
|
||||||
},
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) {
|
|
||||||
let rechargeList = [];
|
|
||||||
res.data.list.forEach(item => {
|
|
||||||
if (item.point > 0) rechargeList.push(item)
|
|
||||||
});
|
|
||||||
this.rechargeList = rechargeList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
if (getCurrentPages().length > 1) uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
});
|
|
||||||
else this.$util.redirectTo('/pages/index/index');
|
|
||||||
},
|
|
||||||
getNewestGame() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/game/newestgame',
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0 && res.data) this.newestGame = res.data;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
luckdraw() {
|
|
||||||
if (this.newestGame) {
|
|
||||||
switch (this.newestGame.game_type) {
|
|
||||||
case 'cards':
|
|
||||||
this.$util.redirectTo('/pages_promotion/game/cards', {
|
|
||||||
id: this.newestGame.game_id
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'egg':
|
|
||||||
this.$util.redirectTo('/pages_promotion/game/smash_eggs', {
|
|
||||||
id: this.newestGame.game_id
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'turntable':
|
|
||||||
this.$util.redirectTo('/pages_promotion/game/turntable', {
|
|
||||||
id: this.newestGame.game_id
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '暂无相关活动'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//分享给好友
|
|
||||||
onShareAppMessage() {
|
|
||||||
return this.mpShareData.appMessage;
|
|
||||||
},
|
|
||||||
//分享到朋友圈
|
|
||||||
onShareTimeline() {
|
|
||||||
return this.mpShareData.timeLine;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
@import '@/pages_promotion/point/public/css/list.scss';
|
|
||||||
</style>
|
|
||||||
<style>
|
|
||||||
.ns-adv>>>image {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user