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;
|
|
||||||
@@ -9,7 +9,15 @@ const localDevConfig = ({
|
|||||||
'2285': { // 数码喷墨墨水
|
'2285': { // 数码喷墨墨水
|
||||||
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 {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="componentStyle" data-component-name="diy-digit">
|
<view :style="componentStyle" data-component-name="diy-digit">
|
||||||
<scroll-view :class="['graphic-nav', value.showStyle == 'fixed' ? 'fixed-layout' : value.showStyle]"
|
<scroll-view :class="['graphic-nav', value.showStyle == 'fixed' ? 'fixed-layout' : value.showStyle]"
|
||||||
:scroll-x="value.showStyle == 'singleSlide'">
|
:scroll-x="value.showStyle == 'singleSlide'">
|
||||||
@@ -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, // 下拉刷新的参数配置
|
||||||
|
|||||||
@@ -1,112 +1,113 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- top="xxx"下拉布局往下偏移,防止被悬浮菜单遮住 -->
|
<!-- top="xxx"下拉布局往下偏移,防止被悬浮菜单遮住 -->
|
||||||
<mescroll
|
<mescroll
|
||||||
v-if="isInit"
|
v-if="isInit"
|
||||||
:top="top"
|
:top="top"
|
||||||
:down="downOption"
|
:down="downOption"
|
||||||
:fixed="fixed"
|
:fixed="fixed"
|
||||||
:topbar="topbar"
|
:topbar="topbar"
|
||||||
:background="background"
|
:background="background"
|
||||||
:paddingBoth="paddingBoth"
|
:paddingBoth="paddingBoth"
|
||||||
@down="downCallback"
|
@down="downCallback"
|
||||||
:up="upOption"
|
:up="upOption"
|
||||||
@up="upCallback"
|
@up="upCallback"
|
||||||
@emptyclick="emptyClick"
|
@emptyclick="emptyClick"
|
||||||
@init="mescrollInit"
|
@init="mescrollInit"
|
||||||
>
|
>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<slot name="list"></slot>
|
<slot name="list"></slot>
|
||||||
</mescroll>
|
</mescroll>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import Mescroll from './mescroll-uni.vue';
|
||||||
components: {
|
export default {
|
||||||
Mescroll: () => import('./mescroll-uni.vue'),
|
components: {
|
||||||
},
|
Mescroll
|
||||||
data() {
|
},
|
||||||
return {
|
data() {
|
||||||
mescroll: null, //mescroll实例对象
|
return {
|
||||||
downOption: {
|
mescroll: null, //mescroll实例对象
|
||||||
auto: false // 不自动加载
|
downOption: {
|
||||||
},
|
auto: false // 不自动加载
|
||||||
upOption: {
|
},
|
||||||
auto: false, // 不自动加载
|
upOption: {
|
||||||
page: {
|
auto: false, // 不自动加载
|
||||||
num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
|
page: {
|
||||||
size: 10 // 每页数据的数量
|
num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
|
||||||
},
|
size: 10 // 每页数据的数量
|
||||||
noMoreSize: 2, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
},
|
||||||
empty: {
|
noMoreSize: 2, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||||
tip: '~ 空空如也 ~', // 提示
|
empty: {
|
||||||
btnText: '去看看'
|
tip: '~ 空空如也 ~', // 提示
|
||||||
},
|
btnText: '去看看'
|
||||||
onScroll: true
|
},
|
||||||
},
|
onScroll: true
|
||||||
scrollY: 0,
|
},
|
||||||
isInit: false
|
scrollY: 0,
|
||||||
};
|
isInit: false
|
||||||
},
|
};
|
||||||
props: {
|
},
|
||||||
top: [String, Number],
|
props: {
|
||||||
size: [String, Number],
|
top: [String, Number],
|
||||||
fixed: {
|
size: [String, Number],
|
||||||
// 是否通过fixed固定mescroll的高度, 默认true
|
fixed: {
|
||||||
type: Boolean,
|
// 是否通过fixed固定mescroll的高度, 默认true
|
||||||
default() {
|
type: Boolean,
|
||||||
return true;
|
default() {
|
||||||
}
|
return true;
|
||||||
},
|
}
|
||||||
background: String,
|
},
|
||||||
topbar: Boolean,
|
background: String,
|
||||||
paddingBoth: {
|
topbar: Boolean,
|
||||||
type: [String, Number],
|
paddingBoth: {
|
||||||
default() {
|
type: [String, Number],
|
||||||
return 0;
|
default() {
|
||||||
}
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
created() {
|
},
|
||||||
if (this.size) this.upOption.page.size = this.size;
|
created() {
|
||||||
this.isInit = true;
|
if (this.size) this.upOption.page.size = this.size;
|
||||||
},
|
this.isInit = true;
|
||||||
mounted() {
|
},
|
||||||
this.mescroll.resetUpScroll();
|
mounted() {
|
||||||
this.listenRefresh();
|
this.mescroll.resetUpScroll();
|
||||||
},
|
this.listenRefresh();
|
||||||
methods: {
|
},
|
||||||
// mescroll组件初始化的回调,可获取到mescroll对象
|
methods: {
|
||||||
mescrollInit(mescroll) {
|
// mescroll组件初始化的回调,可获取到mescroll对象
|
||||||
this.mescroll = mescroll;
|
mescrollInit(mescroll) {
|
||||||
},
|
this.mescroll = mescroll;
|
||||||
/*下拉刷新的回调 */
|
},
|
||||||
downCallback() {
|
/*下拉刷新的回调 */
|
||||||
// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
|
downCallback() {
|
||||||
// loadSwiper();
|
// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
|
||||||
// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 mescroll.num=1, 再触发upCallback方法 )
|
// loadSwiper();
|
||||||
this.mescroll.resetUpScroll();
|
// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 mescroll.num=1, 再触发upCallback方法 )
|
||||||
this.listenRefresh();
|
this.mescroll.resetUpScroll();
|
||||||
},
|
this.listenRefresh();
|
||||||
/*上拉加载的回调: mescroll携带page的参数, 其中num:当前页 从1开始, size:每页数据条数,默认10 */
|
},
|
||||||
upCallback() {
|
/*上拉加载的回调: mescroll携带page的参数, 其中num:当前页 从1开始, size:每页数据条数,默认10 */
|
||||||
//联网加载数据
|
upCallback() {
|
||||||
this.$emit('getData', this.mescroll);
|
//联网加载数据
|
||||||
},
|
this.$emit('getData', this.mescroll);
|
||||||
//点击空布局按钮的回调
|
},
|
||||||
emptyClick() {
|
//点击空布局按钮的回调
|
||||||
this.$emit('emptytap', this.mescroll);
|
emptyClick() {
|
||||||
},
|
this.$emit('emptytap', this.mescroll);
|
||||||
//刷新
|
},
|
||||||
refresh() {
|
//刷新
|
||||||
this.mescroll.resetUpScroll();
|
refresh() {
|
||||||
this.listenRefresh();
|
this.mescroll.resetUpScroll();
|
||||||
},
|
this.listenRefresh();
|
||||||
myScrollTo(y, t) {
|
},
|
||||||
this.mescroll.myScrollTo(y, t);
|
myScrollTo(y, t) {
|
||||||
},
|
this.mescroll.myScrollTo(y, t);
|
||||||
listenRefresh() {
|
},
|
||||||
this.$emit('listenRefresh', true);
|
listenRefresh() {
|
||||||
}
|
this.$emit('listenRefresh', true);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
};
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,120 +1,120 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="advList.length" :class="['container-box',className]">
|
<view v-if="advList.length" :class="['container-box',className]">
|
||||||
<swiper :indicator-dots="advList.length > 1" indicator-active-color="#ffffff" :autoplay="true" :interval="3000" :duration="1000" v-if="advList.length > 1" @change="changeSwiper" :current="currentIndex" :style="{ height: swiperHeight + 'px' }" class="item-wrap">
|
<swiper :indicator-dots="advList.length > 1" indicator-active-color="#ffffff" :autoplay="true" :interval="3000" :duration="1000" v-if="advList.length > 1" @change="changeSwiper" :current="currentIndex" :style="{ height: swiperHeight + 'px' }" class="item-wrap">
|
||||||
<swiper-item v-for="(item, index) in advList" :key="index" @click="jumppage(item.adv_url)">
|
<swiper-item v-for="(item, index) in advList" :key="index" @click="jumppage(item.adv_url)">
|
||||||
<view class="image-box">
|
<view class="image-box">
|
||||||
<image :src="$util.img(item.adv_image)" mode="widthFix" :id="'content-wrap' + index"/>
|
<image :src="$util.img(item.adv_image)" mode="widthFix" :id="'content-wrap' + index"/>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view v-else class="container-box item-wrap">
|
<view v-else class="container-box item-wrap">
|
||||||
<image :src="$util.img(advList[0]['adv_image'])" mode="widthFix" lazy-load="true" @load="imageLoad" @click="jumppage(advList[0].adv_url)"/>
|
<image :src="$util.img(advList[0]['adv_image'])" mode="widthFix" lazy-load="true" @load="imageLoad" @click="jumppage(advList[0].adv_url)"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ns-advert',
|
name: 'ns-advert',
|
||||||
props: {
|
props: {
|
||||||
keyword: {
|
keyword: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
className: {
|
className: {
|
||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
advList: [],
|
advList: [],
|
||||||
isImage: false,
|
isImage: false,
|
||||||
//滑块的高度(单位px)
|
//滑块的高度(单位px)
|
||||||
swiperHeight: 150,
|
swiperHeight: 150,
|
||||||
//当前索引
|
//当前索引
|
||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAdvList();
|
this.getAdvList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取广告位
|
//获取广告位
|
||||||
getAdvList() {
|
getAdvList() {
|
||||||
var item = {
|
var item = {
|
||||||
adv_image: '',
|
adv_image: '',
|
||||||
adv_url: ''
|
adv_url: ''
|
||||||
};
|
};
|
||||||
this.$api.sendRequest({
|
this.$api.sendRequest({
|
||||||
url: '/api/adv/detail',
|
url: '/api/adv/detail',
|
||||||
data: {
|
data: {
|
||||||
keyword: this.keyword
|
keyword: this.keyword
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
var data = res.data.adv_list;
|
var data = res.data.adv_list;
|
||||||
for (var index in data) {
|
for (var index in data) {
|
||||||
if (data[index].adv_url) data[index].adv_url = JSON.parse(data[index].adv_url);
|
if (data[index].adv_url) data[index].adv_url = JSON.parse(data[index].adv_url);
|
||||||
}
|
}
|
||||||
this.advList = res.data.adv_list;
|
this.advList = res.data.adv_list;
|
||||||
|
|
||||||
//动态设置swiper的高度
|
//动态设置swiper的高度
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.setSwiperHeight();
|
this.setSwiperHeight();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumppage(e) {
|
jumppage(e) {
|
||||||
this.$util.diyRedirectTo(e);
|
this.$util.diyRedirectTo(e);
|
||||||
},
|
},
|
||||||
imageLoad(data) {
|
imageLoad(data) {
|
||||||
this.isImage = true;
|
this.isImage = true;
|
||||||
},
|
},
|
||||||
//手动切换题目
|
//手动切换题目
|
||||||
changeSwiper(e) {
|
changeSwiper(e) {
|
||||||
this.currentIndex = e.detail.current;
|
this.currentIndex = e.detail.current;
|
||||||
//动态设置swiper的高度,使用nextTick延时设置
|
//动态设置swiper的高度,使用nextTick延时设置
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.setSwiperHeight();
|
this.setSwiperHeight();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//动态设置swiper的高度
|
//动态设置swiper的高度
|
||||||
setSwiperHeight() {
|
setSwiperHeight() {
|
||||||
if (this.advList.length > 1) {
|
if (this.advList.length > 1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let element = "#content-wrap" + this.currentIndex;
|
let element = "#content-wrap" + this.currentIndex;
|
||||||
let query = uni.createSelectorQuery().in(this);
|
let query = uni.createSelectorQuery().in(this);
|
||||||
query.select(element).boundingClientRect();
|
query.select(element).boundingClientRect();
|
||||||
query.exec((res) => {
|
query.exec((res) => {
|
||||||
if (res && res[0]) {
|
if (res && res[0]) {
|
||||||
this.swiperHeight = res[0].height;
|
this.swiperHeight = res[0].height;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.container-box {
|
.container-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.item-wrap {
|
.item-wrap {
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
.image-box {
|
.image-box {
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -1,142 +1,142 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="copyrigt-wrap" v-if="copyright && (showLogo || showBeian)">
|
<view class="copyrigt-wrap" v-if="copyright && (showLogo || showBeian)">
|
||||||
<!-- <view class="copyright-info" v-if="showLogo">
|
<!-- <view class="copyright-info" v-if="showLogo">
|
||||||
<view class="copyright-pic" v-if="copyright.logo" @click="link(copyright.copyright_link)">
|
<view class="copyright-pic" v-if="copyright.logo" @click="link(copyright.copyright_link)">
|
||||||
<image :src="$util.img(copyright.logo)" @error="error" mode="widthFix"></image>
|
<image :src="$util.img(copyright.logo)" @error="error" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-info" v-if="showBeian">
|
<view class="record-info" v-if="showBeian">
|
||||||
<view class="icp" v-if="copyright && copyright.icp" @click="toHref('https://beian.miit.gov.cn')">备案号:{{ copyright.icp }}
|
<view class="icp" v-if="copyright && copyright.icp" @click="toHref('https://beian.miit.gov.cn')">备案号:{{ copyright.icp }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="copyright && copyright.gov_record" class="gov-wrap" @click="toHref(copyright.gov_url)" target="_blank">
|
<view v-if="copyright && copyright.gov_record" class="gov-wrap" @click="toHref(copyright.gov_url)" target="_blank">
|
||||||
<image :src="$util.img('public/uniapp/common/gov_record.png')" alt="公安备案" />
|
<image :src="$util.img('public/uniapp/common/gov_record.png')" alt="公安备案" />
|
||||||
<text>{{ copyright.gov_record }}</text>
|
<text>{{ copyright.gov_record }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showLogo: true,
|
showLogo: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
computed: {
|
computed: {
|
||||||
showBeian() {
|
showBeian() {
|
||||||
// 如果都为空,则隐藏
|
// 如果都为空,则隐藏
|
||||||
if (this.copyright && (!this.copyright.icp && !this.copyright.gov_record)) {
|
if (this.copyright && (!this.copyright.icp && !this.copyright.gov_record)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
link(url) {
|
link(url) {
|
||||||
if (url) {
|
if (url) {
|
||||||
this.$util.redirectTo('/pages_tool/webview/webview', {
|
this.$util.redirectTo('/pages_tool/webview/webview', {
|
||||||
src: encodeURIComponent(url)
|
src: encodeURIComponent(url)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toHref(url) {
|
toHref(url) {
|
||||||
location.href = url;
|
location.href = url;
|
||||||
},
|
},
|
||||||
error() {
|
error() {
|
||||||
this.showLogo = false;
|
this.showLogo = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.copyrigt-wrap {
|
.copyrigt-wrap {
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright-info {
|
.copyright-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.copyright-pic {
|
.copyright-pic {
|
||||||
image {
|
image {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: $font-size-goods-tag;
|
font-size: $font-size-goods-tag;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
color: $color-tip !important;
|
color: $color-tip !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright-desc {
|
.copyright-desc {
|
||||||
color: lighten($color-tip, 30%);
|
color: lighten($color-tip, 30%);
|
||||||
font-size: $font-size-goods-tag;
|
font-size: $font-size-goods-tag;
|
||||||
text-shadow: 0 0 2rpx lighten($color-tip, 40%);
|
text-shadow: 0 0 2rpx lighten($color-tip, 40%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-info {
|
.record-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
font-size: $font-size-tag;
|
font-size: $font-size-tag;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.gov-wrap {
|
.gov-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -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,98 +1,96 @@
|
|||||||
<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']"
|
:style="{background:backgroundColor+'!important', 'color':textColor ? textColor : '#ffffff'}" v-else
|
||||||
:style="{background:backgroundColor+'!important', 'color':textColor ? textColor : '#ffffff'}" v-else
|
@click="clickEvent">
|
||||||
@click="clickEvent">
|
<text class="price-font">{{ textPrice }}</text>
|
||||||
<text class="price-font">{{ textPrice }}</text>
|
<text>{{ text }}</text>
|
||||||
<text>{{ text }}</text>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
</view>
|
|
||||||
</template>
|
<script>
|
||||||
|
export default {
|
||||||
<script>
|
name: 'ns-goods-action-button',
|
||||||
export default {
|
props: {
|
||||||
name: 'ns-goods-action-button',
|
// 商品底部按钮文字
|
||||||
props: {
|
text: {
|
||||||
// 商品底部按钮文字
|
type: String,
|
||||||
text: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 商品底部按钮价格文字
|
||||||
},
|
textPrice: {
|
||||||
// 商品底部按钮价格文字
|
type: String,
|
||||||
textPrice: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 背景色
|
||||||
},
|
background: {
|
||||||
// 背景色
|
type: String,
|
||||||
background: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 背景色样式
|
||||||
},
|
backgroundClass: {
|
||||||
// 背景色样式
|
type: String,
|
||||||
backgroundClass: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
//
|
||||||
},
|
backgroundColor: {
|
||||||
//
|
type: String,
|
||||||
backgroundColor: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 是否禁用
|
||||||
},
|
disabled: {
|
||||||
// 是否禁用
|
type: Boolean,
|
||||||
disabled: {
|
default: false
|
||||||
type: Boolean,
|
},
|
||||||
default: false
|
// 禁用文字提示
|
||||||
},
|
disabledText: {
|
||||||
// 禁用文字提示
|
type: String,
|
||||||
disabledText: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 文字颜色
|
||||||
},
|
textColor: {
|
||||||
// 文字颜色
|
type: String,
|
||||||
textColor: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
},
|
||||||
},
|
computed: {},
|
||||||
},
|
methods: {
|
||||||
computed: {},
|
clickEvent() {
|
||||||
methods: {
|
this.$emit('click');
|
||||||
clickEvent() {
|
}
|
||||||
this.$emit('click');
|
}
|
||||||
}
|
};
|
||||||
}
|
</script>
|
||||||
};
|
|
||||||
</script>
|
<style lang="scss">
|
||||||
|
.action-buttom-wrap {
|
||||||
<style lang="scss">
|
flex: 1;
|
||||||
.action-buttom-wrap {
|
height: 70rpx;
|
||||||
flex: 1;
|
font-weight: 600;
|
||||||
height: 70rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 600;
|
line-height: 70rpx;
|
||||||
font-size: 30rpx;
|
border: none;
|
||||||
line-height: 70rpx;
|
color: #fff;
|
||||||
border: none;
|
text-align: center;
|
||||||
color: #fff;
|
border-radius: 10rpx;
|
||||||
text-align: center;
|
margin-right: 20rpx;
|
||||||
border-radius: 10rpx;
|
}
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
.action-buttom-wrap.has-second {
|
||||||
|
line-height: 50rpx;
|
||||||
.action-buttom-wrap.has-second {
|
}
|
||||||
line-height: 50rpx;
|
|
||||||
}
|
.action-buttom-wrap.has-second text {
|
||||||
|
display: block;
|
||||||
.action-buttom-wrap.has-second text {
|
line-height: 1.2;
|
||||||
display: block;
|
}
|
||||||
line-height: 1.2;
|
|
||||||
}
|
.action-buttom-wrap:active {
|
||||||
|
opacity: 0.8;
|
||||||
.action-buttom-wrap:active {
|
}
|
||||||
opacity: 0.8;
|
|
||||||
}
|
.action-buttom-wrap.disabled {
|
||||||
|
background: $color-disabled;
|
||||||
.action-buttom-wrap.disabled {
|
}
|
||||||
background: $color-disabled;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -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,16 +157,16 @@ 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:
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@@ -224,7 +222,7 @@ export default {
|
|||||||
nowDay = 0;
|
nowDay = 0;
|
||||||
}
|
}
|
||||||
num += 1;
|
num += 1;
|
||||||
|
|
||||||
if (this.obj.dataTime.most_day == 0 && i == 0) {
|
if (this.obj.dataTime.most_day == 0 && i == 0) {
|
||||||
this.judge = true;
|
this.judge = true;
|
||||||
}
|
}
|
||||||
@@ -244,25 +242,25 @@ 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} ]
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断选中是否为当天
|
//判断选中是否为当天
|
||||||
let remainder = 0;
|
let remainder = 0;
|
||||||
//当天配送自提的话,向后推迟30分钟
|
//当天配送自提的话,向后推迟30分钟
|
||||||
let newDayTime = JSON.parse(JSON.stringify(this.dayTime));
|
let newDayTime = JSON.parse(JSON.stringify(this.dayTime));
|
||||||
// newDayTime = Math.ceil(this.dayTime / 600) * 600 + 1800;
|
// newDayTime = Math.ceil(this.dayTime / 600) * 600 + 1800;
|
||||||
|
|
||||||
//判断选中是否为当天
|
//判断选中是否为当天
|
||||||
let timeJudage = false;
|
let timeJudage = false;
|
||||||
if (this.dayData[this.keyJudge] && this.dayData[this.keyJudge].type && newDayTime > this.obj.dataTime.start_time) timeJudage = true;
|
if (this.dayData[this.keyJudge] && this.dayData[this.keyJudge].type && newDayTime > this.obj.dataTime.start_time) timeJudage = true;
|
||||||
|
|
||||||
let timeInterval = this.obj.dataTime.time_interval ? this.obj.dataTime.time_interval * 60 : 1200;
|
let timeInterval = this.obj.dataTime.time_interval ? this.obj.dataTime.time_interval * 60 : 1200;
|
||||||
|
|
||||||
this.obj.dataTime.delivery_time.forEach(item => {
|
this.obj.dataTime.delivery_time.forEach(item => {
|
||||||
item.end_time = item.end_time ? item.end_time : 86400;
|
item.end_time = item.end_time ? item.end_time : 86400;
|
||||||
let num = parseInt((parseInt(item.end_time) - parseInt(item.start_time)) / timeInterval);
|
let num = parseInt((parseInt(item.end_time) - parseInt(item.start_time)) / timeInterval);
|
||||||
let time = timeJudage ? parseInt(newDayTime) : parseInt(item.start_time);
|
let time = timeJudage ? parseInt(newDayTime) : parseInt(item.start_time);
|
||||||
for (let i = 0; i < num; i++) {
|
for (let i = 0; i < num; i++) {
|
||||||
@@ -273,12 +271,12 @@ 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);
|
||||||
}
|
}
|
||||||
timeData.push(text);
|
timeData.push(text);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
timeData.push(this.$util.getTimeStr(time));
|
timeData.push(this.$util.getTimeStr(time));
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
},
|
},
|
||||||
|
|||||||
985
pages.json
985
pages.json
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
|
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
|
||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
||||||
@@ -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>
|
||||||
@@ -160,32 +134,23 @@
|
|||||||
<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_name }}:{{ x.spec_value_name }}
|
{{ x.spec_name }}:{{ x.spec_value_name }}
|
||||||
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
|
{{ i < goodsItem.sku_spec_format.length - 1 ? '; ' : '' }}
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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 uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
|
||||||
|
import toTop from '@/components/toTop/toTop.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
|
import cart from './public/js/cart.js';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
export default {
|
||||||
import cart from './public/js/cart.js';
|
components: {
|
||||||
|
nsGoodsRecommend,
|
||||||
export default {
|
uniNumberBox,
|
||||||
components: {
|
toTop,
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
nsEmpty,
|
||||||
uniNumberBox: () => import('@/components/uni-number-box/uni-number-box.vue'),
|
nsLogin,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
loadingCover,
|
||||||
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'),
|
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%;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<!-- #ifndef H5 -->
|
<!-- #ifndef H5 -->
|
||||||
<!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0">
|
<!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0">
|
||||||
<ns-navbar :data="navbarData" :isBack="true"></ns-navbar>
|
<ns-navbar :data="navbarData" :isBack="true"></ns-navbar>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@@ -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,54 +59,43 @@
|
|||||||
</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">
|
||||||
<text class="iconfont icon-huiyuan"></text>
|
<text class="iconfont icon-huiyuan"></text>
|
||||||
<view class="info">开通{{ membercard.level_name }}仅需{{ membercard.member_price }}元</view>
|
<view class="info">开通{{ membercard.level_name }}仅需{{ membercard.member_price }}元</view>
|
||||||
<text class="btn">立即开通</text>
|
<text class="btn">立即开通</text>
|
||||||
@@ -118,33 +104,29 @@
|
|||||||
</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"
|
||||||
goodsSkuDetail.fenxiao_detail &&
|
v-if="
|
||||||
goodsSkuDetail.fenxiao_detail.words_account &&
|
goodsSkuDetail.fenxiao_detail &&
|
||||||
goodsSkuDetail.fenxiao_detail.commission_money > 0 &&
|
goodsSkuDetail.fenxiao_detail.words_account &&
|
||||||
goodsSkuDetail.fenxiao_detail.is_commission_money == 1
|
goodsSkuDetail.fenxiao_detail.commission_money > 0 &&
|
||||||
">
|
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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="group-wrap card-info" v-if="goodsSkuDetail.goods_class == 5 && goodsSkuDetail.card_info && goodsSkuDetail.card_info.relation_goods.length">
|
<!-- <view class="group-wrap card-info" v-if="goodsSkuDetail.goods_class == 5 && goodsSkuDetail.card_info && goodsSkuDetail.card_info.relation_goods.length">
|
||||||
<view class="card-title">- 套餐包含以下的服务及商品 -</view>
|
<view class="card-title">- 套餐包含以下的服务及商品 -</view>
|
||||||
<view class="card-desc" v-if="goodsSkuDetail.card_info.card_type == 'timecard' || goodsSkuDetail.card_info.card_type == 'commoncard'">
|
<view class="card-desc" v-if="goodsSkuDetail.card_info.card_type == 'timecard' || goodsSkuDetail.card_info.card_type == 'commoncard'">
|
||||||
{{ goodsSkuDetail.card_info.card_type == 'commoncard' ? '卡项内项目/商品总的可用次数为' + goodsSkuDetail.card_info.common_num + ' ,' : '' }}
|
{{ goodsSkuDetail.card_info.card_type == 'commoncard' ? '卡项内项目/商品总的可用次数为' + goodsSkuDetail.card_info.common_num + ' ,' : '' }}
|
||||||
@@ -176,16 +158,15 @@
|
|||||||
<!--多规格-->
|
<!--多规格-->
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
<!-- 入口区域 -->
|
<!-- 入口区域 -->
|
||||||
<!-- <template v-slot:entrance>
|
<!-- <template v-slot:entrance>
|
||||||
<view class="item coupon" v-if="couponList.length && couponList[0]['useState'] != 2" @click="openCouponPopup()">
|
<view class="item coupon" v-if="couponList.length && couponList[0]['useState'] != 2" @click="openCouponPopup()">
|
||||||
<view class="label">领券</view>
|
<view class="label">领券</view>
|
||||||
<view class="coupon-list">
|
<view class="coupon-list">
|
||||||
@@ -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,8 +397,8 @@
|
|||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
@@ -453,11 +412,10 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<!-- v-if="goodsSkuDetail.goodsForm" -->
|
<!-- v-if="goodsSkuDetail.goodsForm" -->
|
||||||
<view style="padding: 0 30rpx;">
|
<view style="padding: 0 30rpx;">
|
||||||
<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">
|
||||||
@@ -477,74 +435,77 @@
|
|||||||
<template v-slot:action>
|
<template v-slot:action>
|
||||||
<!-- 商品底部导航 -->
|
<!-- 商品底部导航 -->
|
||||||
<ns-goods-action :safeArea="isIphoneX">
|
<ns-goods-action :safeArea="isIphoneX">
|
||||||
|
|
||||||
<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
|
||||||
:disabled="true"
|
class="goods-action-button active3"
|
||||||
v-if="goodsSkuDetail.store_goods_status != undefined && goodsSkuDetail.store_goods_status != 1" />
|
:disabled-text="$lang('status')"
|
||||||
<block v-else>
|
:disabled="true"
|
||||||
<ns-goods-action-icon :text="$lang('home')" icon="icon-shouye1" @click="goHome" />
|
v-if="goodsSkuDetail.store_goods_status != undefined && goodsSkuDetail.store_goods_status != 1"
|
||||||
|
/>
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<ns-goods-action-icon :text="$lang('cart')"
|
|
||||||
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner" icon="icon-gouwuche2"
|
|
||||||
:corner-mark="cartNumber > 0 ? cartNumber + '' : ''" @click="goCart" />
|
|
||||||
<ns-goods-action-icon :text="$lang('kefu')" icon="icox icox-kefu" :send-data="contactData"
|
|
||||||
:chatParam="chatRoomParams" />
|
|
||||||
<!-- #endif -->
|
|
||||||
<!-- #ifdef H5 -->
|
|
||||||
<ns-goods-action-icon :text="$lang('follow')"
|
|
||||||
:icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'"
|
|
||||||
@click="editCollection" />
|
|
||||||
<!-- #endif -->
|
|
||||||
<block 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" />
|
|
||||||
<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" /> -->
|
|
||||||
|
|
||||||
</block>
|
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
<ns-goods-action-icon :text="$lang('home')" icon="icon-shouye1" @click="goHome" />
|
||||||
<ns-goods-action-button class="goods-action-button active3"
|
|
||||||
:disabled-text="$lang('sellout')" :disabled="true" />
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
</block>
|
<ns-goods-action-icon
|
||||||
<block v-else-if="
|
:text="$lang('cart')"
|
||||||
goodsSkuDetail.is_limit == 1 &&
|
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner"
|
||||||
goodsSkuDetail.limit_type == 2 &&
|
icon="icon-gouwuche2"
|
||||||
goodsSkuDetail.max_buy != 0 &&
|
:corner-mark="cartNumber > 0 ? cartNumber + '' : ''"
|
||||||
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
|
@click="goCart"
|
||||||
">
|
/>
|
||||||
<ns-goods-action-button class="goods-action-button active3"
|
<ns-goods-action-icon :text="$lang('kefu')" icon="icox icox-kefu" :send-data="contactData" :chatParam="chatRoomParams" />
|
||||||
:disabled-text="$lang('max')" :disabled="true" />
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<ns-goods-action-icon :text="$lang('follow')" :icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'" @click="editCollection" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<block 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" />
|
||||||
|
<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" /> -->
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<ns-goods-action-button class="goods-action-button" :text="$lang('addcart')"
|
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
||||||
:backgroundColor="themeStyle.goods_detail.goods_btn_color_shallow"
|
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('sellout')" :disabled="true" />
|
||||||
@click="joinCart" v-if="goodsSkuDetail.is_virtual == 0" />
|
</block>
|
||||||
<ns-goods-action-button class="goods-action-button"
|
<block v-else-if="
|
||||||
:backgroundColor="themeStyle.goods_detail.goods_btn_color"
|
goodsSkuDetail.is_limit == 1 &&
|
||||||
:textColor="themeStyle.btn_text_color" :text="$lang('buynow')"
|
goodsSkuDetail.limit_type == 2 &&
|
||||||
@click="buyNow" />
|
goodsSkuDetail.max_buy != 0 &&
|
||||||
|
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
|
||||||
|
">
|
||||||
|
<ns-goods-action-button class="goods-action-button active3" :disabled-text="$lang('max')" :disabled="true" />
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<ns-goods-action-button
|
||||||
|
class="goods-action-button"
|
||||||
|
:text="$lang('addcart')"
|
||||||
|
:backgroundColor="themeStyle.goods_detail.goods_btn_color_shallow"
|
||||||
|
@click="joinCart"
|
||||||
|
v-if="goodsSkuDetail.is_virtual == 0"
|
||||||
|
/>
|
||||||
|
<ns-goods-action-button
|
||||||
|
class="goods-action-button"
|
||||||
|
:backgroundColor="themeStyle.goods_detail.goods_btn_color"
|
||||||
|
:textColor="themeStyle.btn_text_color"
|
||||||
|
:text="$lang('buynow')"
|
||||||
|
@click="buyNow"
|
||||||
|
/>
|
||||||
|
</block>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
</block>
|
|
||||||
|
|
||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ns-goods-action>
|
</ns-goods-action>
|
||||||
</template>
|
</template>
|
||||||
</goods-detail-view>
|
</goods-detail-view>
|
||||||
@@ -560,27 +521,42 @@
|
|||||||
</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]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content" :style="themeColor">
|
<view class="content" :style="themeColor">
|
||||||
<view class="head-wrap">
|
<view class="head-wrap">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<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,21 +39,18 @@
|
|||||||
<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>
|
||||||
</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,35 +79,34 @@
|
|||||||
<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">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
<view v-if="config.style == 'icon-cart'" :style="{
|
<view v-if="config.style == 'icon-cart'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart shopping-cart-btn iconfont icon-gouwuche click-wrap" :id="'goods-' + item.id"
|
}" class="cart shopping-cart-btn iconfont icon-gouwuche 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--加号图标 -->
|
<!--加号图标 -->
|
||||||
<view v-else-if="config.style == 'icon-add'" :style="{
|
<view v-else-if="config.style == 'icon-add'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart plus-sign-btn iconfont icon-add1 click-wrap" :id="'goods-' + item.id"
|
}" class="cart plus-sign-btn iconfont icon-add1 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view v-else-if="config.style == 'button'" :style="{
|
<view v-else-if="config.style == 'button'" :style="{
|
||||||
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
||||||
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
||||||
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
{{ config.text }}
|
{{ config.text }}
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
@@ -130,12 +114,11 @@
|
|||||||
|
|
||||||
<!--自定义图标 -->
|
<!--自定义图标 -->
|
||||||
<view v-else-if="config.style == 'icon-diy'" :style="{
|
<view v-else-if="config.style == 'icon-diy'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : ''
|
color: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" 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">
|
||||||
@@ -183,50 +160,48 @@
|
|||||||
<text>{{ showMarketPrice(item) }}</text>
|
<text>{{ showMarketPrice(item) }}</text>
|
||||||
</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">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
<view v-if="config.style == 'icon-cart'" :style="{
|
<view v-if="config.style == 'icon-cart'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart shopping-cart-btn iconfont icon-gouwuche click-wrap" :id="'goods-' + item.id"
|
}" class="cart shopping-cart-btn iconfont icon-gouwuche 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--加号图标 -->
|
<!--加号图标 -->
|
||||||
<view v-else-if="config.style == 'icon-add'" :style="{
|
<view v-else-if="config.style == 'icon-add'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart plus-sign-btn iconfont icon-add1 click-wrap" :id="'goods-' + item.id"
|
}" class="cart plus-sign-btn iconfont icon-add1 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view v-else-if="config.style == 'button'" :style="{
|
<view v-else-if="config.style == 'button'" :style="{
|
||||||
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
||||||
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
||||||
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
{{ config.text }}
|
{{ config.text }}
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--自定义图标 -->
|
<!--自定义图标 -->
|
||||||
<view v-else-if="config.style == 'icon-diy'" :style="{
|
<view v-else-if="config.style == 'icon-diy'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : ''
|
color: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" 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>
|
||||||
@@ -244,7 +219,7 @@
|
|||||||
<view class="title color-tip">筛选</view>
|
<view class="title color-tip">筛选</view>
|
||||||
<scroll-view scroll-y>
|
<scroll-view scroll-y>
|
||||||
<!-- 包邮 -->
|
<!-- 包邮 -->
|
||||||
<!-- <view class="item-wrap">
|
<!-- <view class="item-wrap">
|
||||||
<view class="label"><text>是否包邮</text></view>
|
<view class="label"><text>是否包邮</text></view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<uni-tag :inverted="true" text="包邮" :type="isFreeShipping ? 'primary' : 'default'" @click="isFreeShipping = !isFreeShipping" />
|
<uni-tag :inverted="true" text="包邮" :type="isFreeShipping ? 'primary' : 'default'" @click="isFreeShipping = !isFreeShipping" />
|
||||||
@@ -252,7 +227,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 价格筛选项 -->
|
<!-- 价格筛选项 -->
|
||||||
<!-- <view class="item-wrap">
|
<!-- <view class="item-wrap">
|
||||||
<view class="label"><text>价格区间(元)</text></view>
|
<view class="label"><text>价格区间(元)</text></view>
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<input class="uni-input" type="digit" v-model="minPrice" placeholder="最低价" />
|
<input class="uni-input" type="digit" v-model="minPrice" placeholder="最低价" />
|
||||||
@@ -262,7 +237,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 品牌筛选项 -->
|
<!-- 品牌筛选项 -->
|
||||||
<!-- <view class="item-wrap" v-if="brandList.length > 0">
|
<!-- <view class="item-wrap" v-if="brandList.length > 0">
|
||||||
<view class="label"><text>品牌</text></view>
|
<view class="label"><text>品牌</text></view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view v-for="(item, index) in brandList" :key="index">
|
<view v-for="(item, index) in brandList" :key="index">
|
||||||
@@ -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>
|
||||||
@@ -302,42 +274,50 @@
|
|||||||
<!-- 底部tabBar -->
|
<!-- 底部tabBar -->
|
||||||
<view id="tab-bar">
|
<view id="tab-bar">
|
||||||
<diy-bottom-nav></diy-bottom-nav>
|
<diy-bottom-nav></diy-bottom-nav>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
|
||||||
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
||||||
|
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.vue';
|
||||||
|
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||||
|
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||||
|
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||||
|
// #endif
|
||||||
|
import list from './public/js/list.js';
|
||||||
|
|
||||||
import list from './public/js/list.js';
|
export default {
|
||||||
|
components: {
|
||||||
export default {
|
uniDrawer,
|
||||||
components: {
|
uniTag,
|
||||||
uniDrawer: () => import('@/components/uni-drawer/uni-drawer.vue'),
|
nsGoodsSkuIndex,
|
||||||
uniTag: () => import('@/components/uni-tag/uni-tag.vue'),
|
nsEmpty,
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
MescrollUni,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
loadingCover,
|
||||||
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'),
|
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">
|
||||||
@@ -65,9 +64,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="store-info-detail">
|
<view class="store-info-detail">
|
||||||
<view class="store-name" @click="
|
<view class="store-name" @click="
|
||||||
$util.redirectTo('/pages_tool/store/detail', {
|
$util.redirectTo('/pages_tool/store/detail', {
|
||||||
store_id: orderData.delivery_store_id
|
store_id: orderData.delivery_store_id
|
||||||
})
|
})
|
||||||
">
|
">
|
||||||
<text class="name font-size-base">{{ orderData.delivery_store_name }}</text>
|
<text class="name font-size-base">{{ orderData.delivery_store_name }}</text>
|
||||||
<text class="iconfont icon-right font-size-base"></text>
|
<text class="iconfont icon-right font-size-base"></text>
|
||||||
@@ -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,12 +315,11 @@
|
|||||||
<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>
|
||||||
<!-- 联系客服 -->
|
<!-- 联系客服 -->
|
||||||
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
|
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
|
||||||
<view class="kefu">
|
<view class="kefu">
|
||||||
<view>
|
<view>
|
||||||
<text class="iconfont icon-ziyuan"></text>
|
<text class="iconfont icon-ziyuan"></text>
|
||||||
@@ -362,27 +349,23 @@
|
|||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<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,218 +608,216 @@
|
|||||||
</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'),
|
data() {
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
return {
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
isIphoneX: false,
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
orderId: 0,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
merchantTradeNo: '',
|
||||||
},
|
orderData: {
|
||||||
data() {
|
action: [],
|
||||||
return {
|
virtual_goods: {
|
||||||
isIphoneX: false,
|
is_veirfy: 0,
|
||||||
orderId: 0,
|
verify_record: []
|
||||||
merchantTradeNo: '',
|
}
|
||||||
orderData: {
|
|
||||||
action: [],
|
|
||||||
virtual_goods: {
|
|
||||||
is_veirfy: 0,
|
|
||||||
verify_record: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
action: {
|
|
||||||
icon: ''
|
|
||||||
},
|
|
||||||
evaluateConfig: {
|
|
||||||
evaluate_audit: 1,
|
|
||||||
evaluate_show: 0,
|
|
||||||
evaluate_status: 1
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mixins: [orderMethod],
|
|
||||||
onLoad(option) {
|
|
||||||
if (option.order_id) this.orderId = option.order_id;
|
|
||||||
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
|
||||||
|
|
||||||
if (this.storeToken) {
|
|
||||||
this.getEvaluateConfig();
|
|
||||||
this.getOrderData();
|
|
||||||
} else {
|
|
||||||
this.$util.redirectTo('/pages_tool/login/login', {
|
|
||||||
back: '/pages_order/detail/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goDetail(e) {
|
|
||||||
this.$util.redirectTo('/pages_goods/detail', {
|
|
||||||
goods_id: e.goods_id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goRefund(id) {
|
|
||||||
this.$util.redirectTo('/pages_tool/order/refund', {
|
|
||||||
order_goods_id: id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goRefundDetail(id) {
|
|
||||||
this.$util.redirectTo('/pages_tool/order/refund_detail', {
|
|
||||||
order_goods_id: id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOrderData() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/order/detail',
|
|
||||||
data: {
|
|
||||||
order_id: this.orderId,
|
|
||||||
merchant_trade_no: this.merchantTradeNo
|
|
||||||
},
|
},
|
||||||
success: res => {
|
action: {
|
||||||
if (res.code >= 0) {
|
icon: ''
|
||||||
if (res.data.order_status == 0) {
|
},
|
||||||
let date = Date.parse(new Date()) / 1000;
|
evaluateConfig: {
|
||||||
res.data.closeTimeMachine = this.$util.countDown(res.data.create_time + res.data.auto_close - date);
|
evaluate_audit: 1,
|
||||||
}
|
evaluate_show: 0,
|
||||||
let num = 0;
|
evaluate_status: 1
|
||||||
this.orderData = res.data;
|
}
|
||||||
this.orderId = this.orderData.order_id;
|
};
|
||||||
let refund_order_goods_ids = [];
|
},
|
||||||
this.orderData.order_goods.forEach(v => {
|
mixins: [orderMethod],
|
||||||
if (v.sku_spec_format) {
|
components: {
|
||||||
v.sku_spec_format = JSON.parse(v.sku_spec_format);
|
nsGoodsRecommend,
|
||||||
|
nsPayment,
|
||||||
|
nsContact
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
if (option.order_id) this.orderId = option.order_id;
|
||||||
|
if (option.merchant_trade_no) this.merchantTradeNo = option.merchant_trade_no;
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||||
|
|
||||||
|
if (this.storeToken) {
|
||||||
|
this.getEvaluateConfig();
|
||||||
|
this.getOrderData();
|
||||||
|
} else {
|
||||||
|
this.$util.redirectTo('/pages_tool/login/login', {
|
||||||
|
back: '/pages_order/detail?order_id=' + this.orderId + '&merchant_trade_no=' + this.merchantTradeNo
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goDetail(e) {
|
||||||
|
this.$util.redirectTo('/pages_goods/detail', {
|
||||||
|
goods_id: e.goods_id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goRefund(id) {
|
||||||
|
this.$util.redirectTo('/pages_tool/order/refund', {
|
||||||
|
order_goods_id: id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goRefundDetail(id) {
|
||||||
|
this.$util.redirectTo('/pages_tool/order/refund_detail', {
|
||||||
|
order_goods_id: id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getOrderData() {
|
||||||
|
this.$api.sendRequest({
|
||||||
|
url: '/api/order/detail',
|
||||||
|
data: {
|
||||||
|
order_id: this.orderId,
|
||||||
|
merchant_trade_no: this.merchantTradeNo
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
if (res.code >= 0) {
|
||||||
|
if (res.data.order_status == 0) {
|
||||||
|
let date = Date.parse(new Date()) / 1000;
|
||||||
|
res.data.closeTimeMachine = this.$util.countDown(res.data.create_time + res.data.auto_close - date);
|
||||||
|
}
|
||||||
|
let num = 0;
|
||||||
|
this.orderData = res.data;
|
||||||
|
this.orderId = this.orderData.order_id;
|
||||||
|
let refund_order_goods_ids = [];
|
||||||
|
this.orderData.order_goods.forEach(v => {
|
||||||
|
if (v.sku_spec_format) {
|
||||||
|
v.sku_spec_format = JSON.parse(v.sku_spec_format);
|
||||||
|
} else {
|
||||||
|
v.sku_spec_format = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v.refund_status == 0 || v.refund_status == -1) {
|
||||||
|
num += 1;
|
||||||
|
refund_order_goods_ids.push(v.order_goods_id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.action = JSON.parse(res.data.order_status_action);
|
||||||
|
|
||||||
|
//判断在可退款商品数量大于1时出现批量删除按钮
|
||||||
|
if (num > 1) {
|
||||||
|
this.orderData.refund_batch_status = true;
|
||||||
|
this.orderData.refund_order_goods_ids = refund_order_goods_ids;
|
||||||
} else {
|
} else {
|
||||||
v.sku_spec_format = [];
|
this.orderData.refund_batch_status = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v.refund_status == 0 || v.refund_status == -1) {
|
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info = JSON.parse(this.orderData.delivery_store_info);
|
||||||
num += 1;
|
|
||||||
refund_order_goods_ids.push(v.order_goods_id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.action = JSON.parse(res.data.order_status_action);
|
|
||||||
|
|
||||||
//判断在可退款商品数量大于1时出现批量删除按钮
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
if (num > 1) {
|
|
||||||
this.orderData.refund_batch_status = true;
|
|
||||||
this.orderData.refund_order_goods_ids = refund_order_goods_ids;
|
|
||||||
} else {
|
} else {
|
||||||
this.orderData.refund_batch_status = false;
|
this.$util.showToast({
|
||||||
|
title: '未获取到订单信息!'
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$util.redirectTo('/pages_order/list');
|
||||||
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info = JSON.parse(this.orderData.delivery_store_info);
|
fail: res => {
|
||||||
|
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '未获取到订单信息!'
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$util.redirectTo('/pages_order/base/list');
|
|
||||||
}, 1500);
|
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
fail: res => {
|
},
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
/**
|
||||||
|
* 下拉刷新
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getOrderData();
|
||||||
|
},
|
||||||
|
operation(action) {
|
||||||
|
switch (action) {
|
||||||
|
case 'orderPay': // 支付
|
||||||
|
this.orderPay(this.orderData);
|
||||||
|
break;
|
||||||
|
case 'orderClose': //关闭
|
||||||
|
this.orderClose(this.orderData.order_id, () => {
|
||||||
|
this.getOrderData();
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'memberTakeDelivery': //收货
|
||||||
|
this.orderDelivery(this.orderData, () => {
|
||||||
|
this.getOrderData();
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'trace': //查看物流
|
||||||
|
this.$util.redirectTo('/pages_tool/order/logistics', {
|
||||||
|
order_id: this.orderData.order_id
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'memberOrderEvaluation': //评价
|
||||||
|
this.$util.redirectTo('/pages_tool/order/evaluate', {
|
||||||
|
order_id: this.orderData.order_id
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
//批量退款
|
||||||
|
case 'memberBatchRefund':
|
||||||
|
this.$util.redirectTo('/pages_tool/order/refund_type_select', {
|
||||||
|
order_id: this.orderId
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'memberVirtualTakeDelivery':
|
||||||
|
this.orderVirtualDelivery(this.orderData, () => {
|
||||||
|
this.getOrderData();
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
},
|
imageError(index) {
|
||||||
/**
|
this.orderData.order_goods[index].sku_image = this.$util.getDefaultImage().goods;
|
||||||
* 下拉刷新
|
this.$forceUpdate();
|
||||||
*/
|
},
|
||||||
onPullDownRefresh() {
|
getEvaluateConfig() {
|
||||||
this.getOrderData();
|
this.$api.sendRequest({
|
||||||
},
|
url: '/api/goodsevaluate/config',
|
||||||
operation(action) {
|
success: res => {
|
||||||
switch (action) {
|
if (res.code == 0) {
|
||||||
case 'orderPay': // 支付
|
var data = res.data;
|
||||||
this.orderPay(this.orderData);
|
this.evaluateConfig = data;
|
||||||
break;
|
}
|
||||||
case 'orderClose': //关闭
|
}
|
||||||
this.orderClose(this.orderData.order_id, () => {
|
});
|
||||||
this.getOrderData();
|
},
|
||||||
});
|
// 显示选择支付方式弹框
|
||||||
break;
|
openChoosePayment() {
|
||||||
case 'memberTakeDelivery': //收货
|
this.$refs.choosePaymentPopup.open();
|
||||||
this.orderDelivery(this.orderData, () => {
|
},
|
||||||
this.getOrderData();
|
// 预览图片
|
||||||
});
|
previewMedia(pickup) {
|
||||||
break;
|
var paths = [];
|
||||||
case 'trace': //查看物流
|
paths.push(pickup);
|
||||||
this.$util.redirectTo('/pages_tool/order/logistics', {
|
|
||||||
order_id: this.orderData.order_id
|
uni.previewImage({
|
||||||
});
|
urls: paths
|
||||||
break;
|
});
|
||||||
case 'memberOrderEvaluation': //评价
|
|
||||||
this.$util.redirectTo('/pages_tool/order/evaluate', {
|
|
||||||
order_id: this.orderData.order_id
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
//批量退款
|
|
||||||
case 'memberBatchRefund':
|
|
||||||
this.$util.redirectTo('/pages_tool/order/refund_type_select', {
|
|
||||||
order_id: this.orderId
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'memberVirtualTakeDelivery':
|
|
||||||
this.orderVirtualDelivery(this.orderData, () => {
|
|
||||||
this.getOrderData();
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
imageError(index) {
|
filters: {
|
||||||
this.orderData.order_goods[index].sku_image = this.$util.getDefaultImage().goods;
|
abs(value) {
|
||||||
this.$forceUpdate();
|
return Math.abs(parseFloat(value)).toFixed(2);
|
||||||
},
|
}
|
||||||
getEvaluateConfig() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/goodsevaluate/config',
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
var data = res.data;
|
|
||||||
this.evaluateConfig = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 显示选择支付方式弹框
|
|
||||||
openChoosePayment() {
|
|
||||||
this.$refs.choosePaymentPopup.open();
|
|
||||||
},
|
|
||||||
// 预览图片
|
|
||||||
previewMedia(pickup) {
|
|
||||||
var paths = [];
|
|
||||||
paths.push(pickup);
|
|
||||||
|
|
||||||
uni.previewImage({
|
|
||||||
urls: paths
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
filters: {
|
|
||||||
abs(value) {
|
|
||||||
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>
|
||||||
@@ -83,7 +79,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 联系客服 -->
|
<!-- 联系客服 -->
|
||||||
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
|
<!-- <ns-contact :niushop="{ order_id: orderData.order_id }">
|
||||||
<view class="kefu">
|
<view class="kefu">
|
||||||
<view>
|
<view>
|
||||||
<text class="iconfont icon-ziyuan"></text>
|
<text class="iconfont icon-ziyuan"></text>
|
||||||
@@ -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,173 +133,171 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||||
components: {
|
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
export default {
|
||||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
components: {
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
nsGoodsRecommend,
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
nsContact
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
},
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
data() {
|
||||||
},
|
return {
|
||||||
data() {
|
isIphoneX: false,
|
||||||
return {
|
orderId: 0,
|
||||||
isIphoneX: false,
|
orderData: {
|
||||||
orderId: 0,
|
action: []
|
||||||
orderData: {
|
},
|
||||||
action: []
|
action: {
|
||||||
},
|
icon: ''
|
||||||
action: {
|
},
|
||||||
icon: ''
|
storeDetail: {}
|
||||||
},
|
};
|
||||||
storeDetail: {}
|
},
|
||||||
};
|
onLoad(option) {
|
||||||
},
|
if (option.order_id) this.orderId = option.order_id;
|
||||||
onLoad(option) {
|
},
|
||||||
if (option.order_id) this.orderId = option.order_id;
|
onShow() {
|
||||||
},
|
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||||
onShow() {
|
|
||||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
|
||||||
|
|
||||||
if (this.storeToken) {
|
if (this.storeToken) {
|
||||||
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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goRefund(id) {
|
|
||||||
this.$util.redirectTo('/pages_tool/order/refund', {
|
|
||||||
order_goods_id: id
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
goRefundDetail(id) {
|
methods: {
|
||||||
this.$util.redirectTo('/pages_tool/order/refund_detail', {
|
goRefund(id) {
|
||||||
order_goods_id: id
|
this.$util.redirectTo('/pages_tool/order/refund', {
|
||||||
});
|
order_goods_id: id
|
||||||
},
|
});
|
||||||
goDetail(id) {
|
},
|
||||||
this.$util.redirectTo('/pages_promotion/point/detail', {
|
goRefundDetail(id) {
|
||||||
id: id
|
this.$util.redirectTo('/pages_tool/order/refund_detail', {
|
||||||
});
|
order_goods_id: id
|
||||||
},
|
});
|
||||||
navigateBack() {
|
},
|
||||||
this.$util.goBack();
|
goDetail(id) {
|
||||||
},
|
this.$util.redirectTo('/pages_promotion/point/detail', {
|
||||||
getOrderData() {
|
id: id
|
||||||
this.$api.sendRequest({
|
});
|
||||||
url: '/pointexchange/api/order/info',
|
},
|
||||||
data: {
|
navigateBack() {
|
||||||
order_id: this.orderId
|
this.$util.goBack();
|
||||||
},
|
},
|
||||||
success: res => {
|
getOrderData() {
|
||||||
uni.stopPullDownRefresh();
|
this.$api.sendRequest({
|
||||||
if (res.code >= 0) {
|
url: '/pointexchange/api/order/info',
|
||||||
|
data: {
|
||||||
|
order_id: this.orderId
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
if (res.code >= 0) {
|
||||||
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
|
this.orderData = res.data;
|
||||||
|
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info =
|
||||||
|
JSON.parse(this.orderData.delivery_store_info);
|
||||||
|
} else {
|
||||||
|
this.$util.showToast({
|
||||||
|
title: '未获取到订单信息!'
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$util.redirectTo('/pages_order/list');
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||||
this.orderData = res.data;
|
|
||||||
if (this.orderData.delivery_store_info != '') this.orderData.delivery_store_info =
|
|
||||||
JSON.parse(this.orderData.delivery_store_info);
|
|
||||||
} else {
|
|
||||||
this.$util.showToast({
|
|
||||||
title: '未获取到订单信息!'
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$util.redirectTo('/pages_order/base/list');
|
|
||||||
}, 1500);
|
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
fail: res => {
|
},
|
||||||
uni.stopPullDownRefresh();
|
/**
|
||||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
* 下拉刷新
|
||||||
}
|
*/
|
||||||
});
|
onPullDownRefresh() {
|
||||||
},
|
this.getOrderData();
|
||||||
/**
|
},
|
||||||
* 下拉刷新
|
orderClose() {
|
||||||
*/
|
uni.showModal({
|
||||||
onPullDownRefresh() {
|
title: '提示',
|
||||||
this.getOrderData();
|
content: '确定关闭此次兑换?',
|
||||||
},
|
success: res => {
|
||||||
orderClose() {
|
if (res.confirm) {
|
||||||
uni.showModal({
|
this.$api.sendRequest({
|
||||||
title: '提示',
|
url: '/pointexchange/api/order/close',
|
||||||
content: '确定关闭此次兑换?',
|
data: {
|
||||||
success: res => {
|
order_id: this.orderData.order_id
|
||||||
if (res.confirm) {
|
},
|
||||||
this.$api.sendRequest({
|
success: res => {
|
||||||
url: '/pointexchange/api/order/close',
|
if (res.code >= 0) {
|
||||||
data: {
|
this.$util.showToast({
|
||||||
order_id: this.orderData.order_id
|
title: '关闭成功'
|
||||||
},
|
});
|
||||||
success: res => {
|
this.getOrderData();
|
||||||
if (res.code >= 0) {
|
}
|
||||||
this.$util.showToast({
|
|
||||||
title: '关闭成功'
|
|
||||||
});
|
|
||||||
this.getOrderData();
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 显示选择支付方式弹框
|
||||||
|
openChoosePayment() {
|
||||||
|
this.$refs.choosePaymentPopup.open();
|
||||||
|
},
|
||||||
|
orderPay() {
|
||||||
|
uni.setStorageSync('paySource', 'pointexchange');
|
||||||
|
this.$refs.choosePaymentPopup.getPayInfo(this.orderData.out_trade_no);
|
||||||
|
},
|
||||||
|
exchangeImage(data) {
|
||||||
|
let img = '';
|
||||||
|
switch (data.type) {
|
||||||
|
case 1:
|
||||||
|
img = this.$util.img(data.exchange_image, {
|
||||||
|
size: 'mid'
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
|
||||||
|
'public/uniapp/point/coupon.png');
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
|
||||||
|
'public/uniapp/point/hongbao.png');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
return img;
|
||||||
|
},
|
||||||
|
imageError() {
|
||||||
|
switch (this.orderData.type) {
|
||||||
|
case 2:
|
||||||
|
this.orderData.exchange_image = this.$util.img('public/uniapp/point/coupon.png');
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
this.orderData.exchange_image = this.$util.img('public/uniapp/point/hongbao.png');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.orderData.exchange_image = this.$util.getDefaultImage().goods;
|
||||||
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 显示选择支付方式弹框
|
filters: {
|
||||||
openChoosePayment() {
|
abs(value) {
|
||||||
this.$refs.choosePaymentPopup.open();
|
return Math.abs(parseFloat(value)).toFixed(2);
|
||||||
},
|
|
||||||
orderPay() {
|
|
||||||
uni.setStorageSync('paySource', 'pointexchange');
|
|
||||||
this.$refs.choosePaymentPopup.getPayInfo(this.orderData.out_trade_no);
|
|
||||||
},
|
|
||||||
exchangeImage(data) {
|
|
||||||
let img = '';
|
|
||||||
switch (data.type) {
|
|
||||||
case 1:
|
|
||||||
img = this.$util.img(data.exchange_image, {
|
|
||||||
size: 'mid'
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
|
|
||||||
'public/uniapp/point/coupon.png');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
img = data.exchange_image ? this.$util.img(data.exchange_image) : this.$util.img(
|
|
||||||
'public/uniapp/point/hongbao.png');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return img;
|
|
||||||
},
|
|
||||||
imageError() {
|
|
||||||
switch (this.orderData.type) {
|
|
||||||
case 2:
|
|
||||||
this.orderData.exchange_image = this.$util.img('public/uniapp/point/coupon.png');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.orderData.exchange_image = this.$util.img('public/uniapp/point/hongbao.png');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.orderData.exchange_image = this.$util.getDefaultImage().goods;
|
|
||||||
}
|
|
||||||
this.$forceUpdate();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
abs(value) {
|
|
||||||
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,349 +66,349 @@
|
|||||||
</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',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
},
|
|
||||||
props: {
|
|
||||||
isMultiple: {
|
|
||||||
//是否多选
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
},
|
||||||
isSection: {
|
props: {
|
||||||
//预约时间段
|
isMultiple: {
|
||||||
type: Boolean,
|
//是否多选
|
||||||
default: false
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
advanceTime: {
|
},
|
||||||
//提前预约时间
|
isSection: {
|
||||||
type: [String, Number],
|
//预约时间段
|
||||||
default: "0"
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
disableText: {
|
},
|
||||||
//禁用显示的文本
|
advanceTime: {
|
||||||
type: String,
|
//提前预约时间
|
||||||
default: '已约满'
|
type: [String, Number],
|
||||||
},
|
default: "0"
|
||||||
undisableText: {
|
},
|
||||||
//未禁用显示的文本
|
disableText: {
|
||||||
type: String,
|
//禁用显示的文本
|
||||||
default: '可预约'
|
type: String,
|
||||||
},
|
default: '已约满'
|
||||||
timeInterval: {
|
},
|
||||||
// 时间间隔,小时为单位
|
undisableText: {
|
||||||
type: String,
|
//未禁用显示的文本
|
||||||
default: "1"
|
type: String,
|
||||||
},
|
default: '可预约'
|
||||||
selectedTabColor: {
|
},
|
||||||
// 日期栏选中的颜色
|
timeInterval: {
|
||||||
type: String,
|
// 时间间隔,小时为单位
|
||||||
default: '#303133'
|
type: String,
|
||||||
},
|
default: "1"
|
||||||
selectedItemColor: {
|
},
|
||||||
// 时间选中的颜色
|
selectedTabColor: {
|
||||||
type: String,
|
// 日期栏选中的颜色
|
||||||
default: '#D50AEF'
|
type: String,
|
||||||
},
|
default: '#303133'
|
||||||
beginTime: {
|
},
|
||||||
type: String,
|
selectedItemColor: {
|
||||||
default: '09:00'
|
// 时间选中的颜色
|
||||||
},
|
type: String,
|
||||||
endTime: {
|
default: '#D50AEF'
|
||||||
type: String,
|
},
|
||||||
default: '19:00'
|
beginTime: {
|
||||||
},
|
type: String,
|
||||||
appointTime: {
|
default: '09:00'
|
||||||
// 预约的时间
|
},
|
||||||
type: Array,
|
endTime: {
|
||||||
default() {
|
type: String,
|
||||||
return [];
|
default: '19:00'
|
||||||
}
|
},
|
||||||
},
|
appointTime: {
|
||||||
disableTimeSlot: {
|
// 预约的时间
|
||||||
// 预约开始和结束时间,来禁用时间段
|
type: Array,
|
||||||
type: Object,
|
default () {
|
||||||
default() {
|
return [];
|
||||||
return {};
|
}
|
||||||
}
|
},
|
||||||
},
|
disableTimeSlot: {
|
||||||
disableWeek: {
|
// 预约开始和结束时间,来禁用时间段
|
||||||
// 限制周几不可以预约
|
type: Object,
|
||||||
type: Array,
|
default () {
|
||||||
default() {
|
return {};
|
||||||
return [];
|
}
|
||||||
}
|
},
|
||||||
}
|
disableWeek: {
|
||||||
},
|
// 限制周几不可以预约
|
||||||
watch: {
|
type: Array,
|
||||||
appointTime: {
|
default () {
|
||||||
handler(val) {
|
return [];
|
||||||
if (val && val.length) {
|
|
||||||
this.initOnload();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beginTime: function (nVal, oVal) {
|
watch: {
|
||||||
this.initOnload();
|
appointTime: {
|
||||||
this.handleSubmit();
|
handler(val) {
|
||||||
},
|
if (val && val.length) {
|
||||||
endTime: function (nVal, oVal) {
|
this.initOnload();
|
||||||
this.initOnload();
|
}
|
||||||
this.handleSubmit();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pickerStartDay: '', // 指定开始日期
|
|
||||||
pickerEndDay: '', // 指定结束日期
|
|
||||||
orderDateTime: '暂无选择', // 选中时间
|
|
||||||
orderTimeArr: {}, //多选的时间
|
|
||||||
dateArr: [], //日期数据
|
|
||||||
timeArr: [], //时间数据
|
|
||||||
nowDate: '', // 当前日期
|
|
||||||
dateActive: 0, //选中的日期索引
|
|
||||||
timeActive: 0, //选中的时间索引
|
|
||||||
timeQuanBeginIndex: 0, //时间段开始的下标
|
|
||||||
selectDate: '', //选择的日期
|
|
||||||
selectTime: '', //选择的时间
|
|
||||||
timeQuanBegin: '', //时间段开始时间
|
|
||||||
timeQuanEnd: '' //时间段结束时间
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created(props) {
|
|
||||||
this.selectDate = this.nowDate = currentTime().date;
|
|
||||||
this.pickerStartDay = currentTime().year + '-' + currentTime().date;
|
|
||||||
const now = new Date(this.pickerStartDay).getTime(); //获取当前日期的时间戳
|
|
||||||
let timeStr = 3600 * 24 * 1000; //一天的时间戳
|
|
||||||
let day = 90; // 未来3个月
|
|
||||||
this.pickerEndDay = timeStamp(now + timeStr * day).allDate;
|
|
||||||
this.initOnload();
|
|
||||||
this.dateArr = initData(); // 日期栏初始化
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$refs.timePopup.open();
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.$refs.timePopup.close();
|
|
||||||
},
|
|
||||||
// 指定时间
|
|
||||||
change(e) {
|
|
||||||
let date = e.split("-");
|
|
||||||
date = date[1] + "-" + date[2];
|
|
||||||
if (this.disableWeek.length && date >= weekDate()[0] && date <= weekDate()[1]) {
|
|
||||||
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
|
||||||
let index = new Date(e).getDay();
|
|
||||||
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
|
||||||
uni.showToast({
|
|
||||||
title: weekBox[index] + '不可以预约',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
this.initOnload(e);
|
beginTime: function(nVal, oVal) {
|
||||||
this.dateArr = initData(e); // 日期栏初始化
|
this.initOnload();
|
||||||
this.selectDateEvent(0, this.dateArr[0]);
|
this.handleSubmit();
|
||||||
|
},
|
||||||
|
endTime: function(nVal, oVal) {
|
||||||
|
this.initOnload();
|
||||||
|
this.handleSubmit();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
initOnload(appointedDay) {
|
data() {
|
||||||
this.timeArr = initTime(this.beginTime, this.endTime, parseFloat(this.timeInterval)); //时间选项初始化
|
return {
|
||||||
this.timeQuanBegin = this.timeQuanEnd = '';
|
pickerStartDay: '', // 指定开始日期
|
||||||
let isFullTime = true;
|
pickerEndDay: '', // 指定结束日期
|
||||||
this.timeArr.forEach((item, index) => {
|
orderDateTime: '暂无选择', // 选中时间
|
||||||
// 判断默认是不能选择的周,则都禁止选中
|
orderTimeArr: {}, //多选的时间
|
||||||
if (this.disableWeek.length && this.selectDate >= weekDate()[0] && this.selectDate <=
|
dateArr: [], //日期数据
|
||||||
weekDate()[1]) {
|
timeArr: [], //时间数据
|
||||||
|
nowDate: '', // 当前日期
|
||||||
|
dateActive: 0, //选中的日期索引
|
||||||
|
timeActive: 0, //选中的时间索引
|
||||||
|
timeQuanBeginIndex: 0, //时间段开始的下标
|
||||||
|
selectDate: '', //选择的日期
|
||||||
|
selectTime: '', //选择的时间
|
||||||
|
timeQuanBegin: '', //时间段开始时间
|
||||||
|
timeQuanEnd: '' //时间段结束时间
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created(props) {
|
||||||
|
this.selectDate = this.nowDate = currentTime().date;
|
||||||
|
this.pickerStartDay = currentTime().year + '-' + currentTime().date;
|
||||||
|
const now = new Date(this.pickerStartDay).getTime(); //获取当前日期的时间戳
|
||||||
|
let timeStr = 3600 * 24 * 1000; //一天的时间戳
|
||||||
|
let day = 90; // 未来3个月
|
||||||
|
this.pickerEndDay = timeStamp(now + timeStr * day).allDate;
|
||||||
|
this.initOnload();
|
||||||
|
this.dateArr = initData(); // 日期栏初始化
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.$refs.timePopup.open();
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$refs.timePopup.close();
|
||||||
|
},
|
||||||
|
// 指定时间
|
||||||
|
change(e) {
|
||||||
|
let date = e.split("-");
|
||||||
|
date = date[1] + "-" + date[2];
|
||||||
|
if (this.disableWeek.length && date >= weekDate()[0] && date <= weekDate()[1]) {
|
||||||
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||||
let date = currentTime().year + '-' + this.selectDate;
|
let index = new Date(e).getDay();
|
||||||
let index = new Date(date).getDay();
|
|
||||||
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
||||||
item.disable = true;
|
uni.showToast({
|
||||||
|
title: weekBox[index] + '不可以预约',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.initOnload(e);
|
||||||
|
this.dateArr = initData(e); // 日期栏初始化
|
||||||
|
this.selectDateEvent(0, this.dateArr[0]);
|
||||||
|
},
|
||||||
|
initOnload(appointedDay) {
|
||||||
|
this.timeArr = initTime(this.beginTime, this.endTime, parseFloat(this.timeInterval)); //时间选项初始化
|
||||||
|
this.timeQuanBegin = this.timeQuanEnd = '';
|
||||||
|
let isFullTime = true;
|
||||||
|
this.timeArr.forEach((item, index) => {
|
||||||
|
// 判断默认是不能选择的周,则都禁止选中
|
||||||
|
if (this.disableWeek.length && this.selectDate >= weekDate()[0] && this.selectDate <=
|
||||||
|
weekDate()[1]) {
|
||||||
|
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||||
|
let date = currentTime().year + '-' + this.selectDate;
|
||||||
|
let index = new Date(date).getDay();
|
||||||
|
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
||||||
|
item.disable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//判断是当前这一天,选中时间小于当前时间则禁用
|
//判断是当前这一天,选中时间小于当前时间则禁用
|
||||||
if (this.selectDate == this.nowDate && currentTime().time > item.time) {
|
if (this.selectDate == this.nowDate && currentTime().time > item.time) {
|
||||||
item.disable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将提前预约的时间禁用 advanceTime
|
|
||||||
var advTime = new Date(new Date().setMinutes(new Date().getMinutes() + parseInt(this.advanceTime) * 60));
|
|
||||||
var advTimeStr = strFormat(advTime.getHours()) + ":" + strFormat(advTime.getMinutes()) + ":" + strFormat(advTime.getSeconds());
|
|
||||||
var advTimeStr1 = strFormat(advTime.getMonth() + 1) + "-" + strFormat(advTime.getDate());
|
|
||||||
if (this.selectDate == advTimeStr1 && advTimeStr > item.time || advTimeStr1 > this.selectDate) {
|
|
||||||
item.disable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将预约的时间禁用
|
|
||||||
this.appointTime.forEach(t => {
|
|
||||||
let [date, time] = t.split(' ');
|
|
||||||
time = time.slice(0, -3);
|
|
||||||
|
|
||||||
if (date == currentTime().year + '-' + this.selectDate && item.time == time ||
|
|
||||||
date == currentTime().year + '-' + advTimeStr1 && item.time == time) {
|
|
||||||
item.disable = true;
|
item.disable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 将提前预约的时间禁用 advanceTime
|
||||||
|
var advTime = new Date(new Date().setMinutes(new Date().getMinutes() + parseInt(this.advanceTime) * 60));
|
||||||
|
var advTimeStr = strFormat(advTime.getHours()) + ":" + strFormat(advTime.getMinutes()) + ":" + strFormat(advTime.getSeconds());
|
||||||
|
var advTimeStr1 = strFormat(advTime.getMonth() + 1) + "-" + strFormat(advTime.getDate());
|
||||||
|
if (this.selectDate == advTimeStr1 && advTimeStr > item.time || advTimeStr1 > this.selectDate) {
|
||||||
|
item.disable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将预约的时间禁用
|
||||||
|
this.appointTime.forEach(t => {
|
||||||
|
let [date, time] = t.split(' ');
|
||||||
|
time = time.slice(0, -3);
|
||||||
|
|
||||||
|
if (date == currentTime().year + '-' + this.selectDate && item.time == time ||
|
||||||
|
date == currentTime().year + '-' + advTimeStr1 && item.time == time) {
|
||||||
|
item.disable = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 禁用时间段
|
||||||
|
const cur_time = `${this.selectDate} ${item.time}`;
|
||||||
|
const {
|
||||||
|
begin_time,
|
||||||
|
end_time
|
||||||
|
} = this.disableTimeSlot;
|
||||||
|
if (begin_time && end_time && (begin_time <= cur_time && cur_time <= end_time)) {
|
||||||
|
item.disable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否当前日期时间都被预约
|
||||||
|
if (!item.disable) {
|
||||||
|
isFullTime = false;
|
||||||
|
}
|
||||||
|
this.isSection && (item.isInclude = false);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 禁用时间段
|
this.orderDateTime = isFullTime ? '暂无选择' : this.selectDate;
|
||||||
const cur_time = `${this.selectDate} ${item.time}`;
|
this.timeActive = -1;
|
||||||
const {
|
for (let i = 0, len = this.timeArr.length; i < len; i++) {
|
||||||
begin_time,
|
if (!this.timeArr[i].disable) {
|
||||||
end_time
|
this.orderDateTime = {
|
||||||
} = this.disableTimeSlot;
|
data: `${this.selectDate}`,
|
||||||
if (begin_time && end_time && (begin_time <= cur_time && cur_time <= end_time)) {
|
time: `${this.timeArr[i].time}`
|
||||||
item.disable = true;
|
};
|
||||||
}
|
this.timeActive = i;
|
||||||
|
|
||||||
// 判断是否当前日期时间都被预约
|
|
||||||
if (!item.disable) {
|
|
||||||
isFullTime = false;
|
|
||||||
}
|
|
||||||
this.isSection && (item.isInclude = false);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.orderDateTime = isFullTime ? '暂无选择' : this.selectDate;
|
|
||||||
this.timeActive = -1;
|
|
||||||
for (let i = 0, len = this.timeArr.length; i < len; i++) {
|
|
||||||
if (!this.timeArr[i].disable) {
|
|
||||||
this.orderDateTime = {
|
|
||||||
data: `${this.selectDate}`,
|
|
||||||
time: `${this.timeArr[i].time}`
|
|
||||||
};
|
|
||||||
this.timeActive = i;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 日期选择事件
|
|
||||||
selectDateEvent(index, item) {
|
|
||||||
if (this.disableWeek.length && item.date >= weekDate()[0] && item.date <= weekDate()[1]) {
|
|
||||||
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
|
||||||
let index = new Date(item.timeStamp).getDay();
|
|
||||||
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
|
||||||
uni.showToast({
|
|
||||||
title: weekBox[index] + '不可以预约',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dateActive = index;
|
|
||||||
this.selectDate = item.date;
|
|
||||||
this.initOnload();
|
|
||||||
this.handleSubmit();
|
|
||||||
},
|
|
||||||
|
|
||||||
// 时间选择事件
|
|
||||||
selectTimeEvent(index, item) {
|
|
||||||
if (item.disable) return;
|
|
||||||
if (this.isMultiple) {
|
|
||||||
item.isActive = !item.isActive;
|
|
||||||
this.timeArr = this.timeArr.slice();
|
|
||||||
this.orderTimeArr[this.selectDate] = this.timeArr.reduce((prev, cur) => {
|
|
||||||
cur.isActive && prev.push(cur.time);
|
|
||||||
return prev;
|
|
||||||
}, []);
|
|
||||||
} else {
|
|
||||||
this.timeActive = index;
|
|
||||||
this.selectTime = item.time;
|
|
||||||
this.orderDateTime = {
|
|
||||||
data: `${this.selectDate}`,
|
|
||||||
time: `${item.time}`
|
|
||||||
};
|
|
||||||
}
|
|
||||||
this.handleSubmit();
|
|
||||||
},
|
|
||||||
|
|
||||||
// 选择时间段
|
|
||||||
handleSelectQuantum(index, item) {
|
|
||||||
if (item.disable) return;
|
|
||||||
|
|
||||||
function clearTime() {
|
|
||||||
this.timeQuanBeginIndex = index;
|
|
||||||
this.timeQuanBegin = item.time;
|
|
||||||
this.timeQuanEnd = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.timeQuanBegin) {
|
|
||||||
clearTime.call(this);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.timeQuanEnd && this.timeQuanBegin) {
|
|
||||||
let isDisble = false;
|
|
||||||
let start = this.timeQuanBeginIndex;
|
|
||||||
let end = index;
|
|
||||||
start > end && ([start, end] = [end, start]);
|
|
||||||
for (let i = start + 1; i < end; i++) {
|
|
||||||
if (this.timeArr[i].disable) {
|
|
||||||
isDisble = true;
|
|
||||||
clearTime.call(this);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isDisble) {
|
},
|
||||||
for (let i = start + 1; i < end; i++) {
|
|
||||||
this.timeArr[i].isInclude = true;
|
// 日期选择事件
|
||||||
|
selectDateEvent(index, item) {
|
||||||
|
if (this.disableWeek.length && item.date >= weekDate()[0] && item.date <= weekDate()[1]) {
|
||||||
|
let weekBox = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||||
|
let index = new Date(item.timeStamp).getDay();
|
||||||
|
if (this.disableWeek.indexOf(weekBox[index]) != -1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: weekBox[index] + '不可以预约',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.timeQuanEnd = item.time;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.timeQuanBegin && this.timeQuanEnd) {
|
this.dateActive = index;
|
||||||
this.timeArr.forEach(t => {
|
this.selectDate = item.date;
|
||||||
t.isInclude = false;
|
this.initOnload();
|
||||||
});
|
this.handleSubmit();
|
||||||
clearTime.call(this);
|
},
|
||||||
}
|
|
||||||
},
|
|
||||||
handleChange() {
|
|
||||||
this.timeQuanBegin > this.timeQuanEnd && ([this.timeQuanBegin, this.timeQuanEnd] = [this.timeQuanEnd, this.timeQuanBegin]);
|
|
||||||
},
|
|
||||||
handleSubmit() {
|
|
||||||
if (this.isSection) {
|
|
||||||
this.handleChange();
|
|
||||||
this.$emit('change', {
|
|
||||||
beginTime: `${this.selectDate} ${this.timeQuanBegin}`,
|
|
||||||
endTime: `${this.selectDate} ${this.timeQuanEnd}`
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isMultiple) {
|
// 时间选择事件
|
||||||
let time = [];
|
selectTimeEvent(index, item) {
|
||||||
for (let date in this.orderTimeArr) {
|
if (item.disable) return;
|
||||||
this.orderTimeArr[date].forEach(item => {
|
if (this.isMultiple) {
|
||||||
time.push(`${date} ${item}`);
|
item.isActive = !item.isActive;
|
||||||
|
this.timeArr = this.timeArr.slice();
|
||||||
|
this.orderTimeArr[this.selectDate] = this.timeArr.reduce((prev, cur) => {
|
||||||
|
cur.isActive && prev.push(cur.time);
|
||||||
|
return prev;
|
||||||
|
}, []);
|
||||||
|
} else {
|
||||||
|
this.timeActive = index;
|
||||||
|
this.selectTime = item.time;
|
||||||
|
this.orderDateTime = {
|
||||||
|
data: `${this.selectDate}`,
|
||||||
|
time: `${item.time}`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
this.handleSubmit();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 选择时间段
|
||||||
|
handleSelectQuantum(index, item) {
|
||||||
|
if (item.disable) return;
|
||||||
|
|
||||||
|
function clearTime() {
|
||||||
|
this.timeQuanBeginIndex = index;
|
||||||
|
this.timeQuanBegin = item.time;
|
||||||
|
this.timeQuanEnd = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.timeQuanBegin) {
|
||||||
|
clearTime.call(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.timeQuanEnd && this.timeQuanBegin) {
|
||||||
|
let isDisble = false;
|
||||||
|
let start = this.timeQuanBeginIndex;
|
||||||
|
let end = index;
|
||||||
|
start > end && ([start, end] = [end, start]);
|
||||||
|
for (let i = start + 1; i < end; i++) {
|
||||||
|
if (this.timeArr[i].disable) {
|
||||||
|
isDisble = true;
|
||||||
|
clearTime.call(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isDisble) {
|
||||||
|
for (let i = start + 1; i < end; i++) {
|
||||||
|
this.timeArr[i].isInclude = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.timeQuanEnd = item.time;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.timeQuanBegin && this.timeQuanEnd) {
|
||||||
|
this.timeArr.forEach(t => {
|
||||||
|
t.isInclude = false;
|
||||||
|
});
|
||||||
|
clearTime.call(this);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChange() {
|
||||||
|
this.timeQuanBegin > this.timeQuanEnd && ([this.timeQuanBegin, this.timeQuanEnd] = [this.timeQuanEnd, this.timeQuanBegin]);
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.isSection) {
|
||||||
|
this.handleChange();
|
||||||
|
this.$emit('change', {
|
||||||
|
beginTime: `${this.selectDate} ${this.timeQuanBegin}`,
|
||||||
|
endTime: `${this.selectDate} ${this.timeQuanEnd}`
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isMultiple) {
|
||||||
|
let time = [];
|
||||||
|
for (let date in this.orderTimeArr) {
|
||||||
|
this.orderTimeArr[date].forEach(item => {
|
||||||
|
time.push(`${date} ${item}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.$emit('change', time);
|
||||||
|
} else {
|
||||||
|
// this.$emit('change', currentTime().year + '-' + this.orderDateTime);
|
||||||
|
this.$emit('change', {
|
||||||
|
date: currentTime().year + '-' + this.orderDateTime.data,
|
||||||
|
time: this.orderDateTime.time
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$emit('change', time);
|
|
||||||
} else {
|
|
||||||
// this.$emit('change', currentTime().year + '-' + this.orderDateTime);
|
|
||||||
this.$emit('change', {
|
|
||||||
date: currentTime().year + '-' + this.orderDateTime.data,
|
|
||||||
time: this.orderDateTime.time
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
</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,10 +61,9 @@
|
|||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
@@ -33,19 +29,26 @@
|
|||||||
<loading-cover ref="loadingCover"></loading-cover>
|
<loading-cover ref="loadingCover"></loading-cover>
|
||||||
</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() {
|
||||||
return {
|
return {
|
||||||
withdrawState: {
|
withdrawState: {
|
||||||
@@ -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,
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
<view class="head-wrap">
|
<view class="head-wrap">
|
||||||
<!-- 搜索区域 -->
|
<!-- 搜索区域 -->
|
||||||
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
|
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
|
||||||
|
|
||||||
|
|
||||||
<!-- <view class="flex-item input-wrap">
|
<!-- <view class="flex-item input-wrap">
|
||||||
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" placeholder="请输入您要搜索的商品" />
|
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" placeholder="请输入您要搜索的商品" />
|
||||||
<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 }" @click="changeListStyle()"></view> -->
|
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }" @click="changeListStyle()"></view> -->
|
||||||
|
|
||||||
<view style="width: 100rpx;height: 100rpx;">
|
<view style="width: 100rpx;height: 100rpx;">
|
||||||
<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>
|
||||||
@@ -24,13 +24,12 @@
|
|||||||
<text class="icox icox-xing"></text>
|
<text class="icox icox-xing"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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 === '' }">综合</text>
|
<text :class="{ 'color-base-text': orderType === '' }">综合</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -40,16 +39,12 @@
|
|||||||
<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>
|
||||||
|
|
||||||
<!-- <view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap">
|
<!-- <view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap">
|
||||||
<text @click="sortTabClick('screen')">筛选</text>
|
<text @click="sortTabClick('screen')">筛选</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>
|
||||||
@@ -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,35 +95,34 @@
|
|||||||
<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">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
<view v-if="config.style == 'icon-cart'" :style="{
|
<view v-if="config.style == 'icon-cart'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart shopping-cart-btn iconfont icon-gouwuche click-wrap" :id="'goods-' + item.id"
|
}" class="cart shopping-cart-btn iconfont icon-gouwuche 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--加号图标 -->
|
<!--加号图标 -->
|
||||||
<view v-else-if="config.style == 'icon-add'" :style="{
|
<view v-else-if="config.style == 'icon-add'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart plus-sign-btn iconfont icon-add1 click-wrap" :id="'goods-' + item.id"
|
}" class="cart plus-sign-btn iconfont icon-add1 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view v-else-if="config.style == 'button'" :style="{
|
<view v-else-if="config.style == 'button'" :style="{
|
||||||
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
||||||
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
||||||
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
{{ config.text }}
|
{{ config.text }}
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
@@ -143,12 +130,11 @@
|
|||||||
|
|
||||||
<!--自定义图标 -->
|
<!--自定义图标 -->
|
||||||
<view v-else-if="config.style == 'icon-diy'" :style="{
|
<view v-else-if="config.style == 'icon-diy'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : ''
|
color: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" 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">
|
||||||
@@ -197,50 +176,48 @@
|
|||||||
<text>{{ showMarketPrice(item) }}</text>
|
<text>{{ showMarketPrice(item) }}</text>
|
||||||
</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">
|
||||||
<!-- 购物车图标 -->
|
<!-- 购物车图标 -->
|
||||||
<view v-if="config.style == 'icon-cart'" :style="{
|
<view v-if="config.style == 'icon-cart'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart shopping-cart-btn iconfont icon-gouwuche click-wrap" :id="'goods-' + item.id"
|
}" class="cart shopping-cart-btn iconfont icon-gouwuche 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--加号图标 -->
|
<!--加号图标 -->
|
||||||
<view v-else-if="config.style == 'icon-add'" :style="{
|
<view v-else-if="config.style == 'icon-add'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
borderColor: config.theme == 'diy' ? config.textColor : ''
|
borderColor: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" class="cart plus-sign-btn iconfont icon-add1 click-wrap" :id="'goods-' + item.id"
|
}" class="cart plus-sign-btn iconfont icon-add1 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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view v-else-if="config.style == 'button'" :style="{
|
<view v-else-if="config.style == 'button'" :style="{
|
||||||
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
backgroundColor: config.theme == 'diy' ? config.bgColor : '',
|
||||||
color: config.theme == 'diy' ? config.textColor : '',
|
color: config.theme == 'diy' ? config.textColor : '',
|
||||||
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
fontWeight: config.theme == 'diy' ? (config.fontWeight ? 'bold' : 'normal') : '',
|
||||||
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
padding: config.theme == 'diy' ? '12rpx ' + config.padding * 2 + 'rpx' : ''
|
||||||
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
}" class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||||
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
@click.stop="$refs.goodsSkuIndex.addCart(config.cartEvent, item, $event)">
|
||||||
{{ config.text }}
|
{{ config.text }}
|
||||||
<view class="click-event"></view>
|
<view class="click-event"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!--自定义图标 -->
|
<!--自定义图标 -->
|
||||||
<view v-else-if="config.style == 'icon-diy'" :style="{
|
<view v-else-if="config.style == 'icon-diy'" :style="{
|
||||||
color: config.theme == 'diy' ? config.textColor : ''
|
color: config.theme == 'diy' ? config.textColor : ''
|
||||||
}" 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>
|
||||||
@@ -258,7 +235,7 @@
|
|||||||
<view class="title color-tip">筛选</view>
|
<view class="title color-tip">筛选</view>
|
||||||
<scroll-view scroll-y>
|
<scroll-view scroll-y>
|
||||||
<!-- 包邮 -->
|
<!-- 包邮 -->
|
||||||
<!-- <view class="item-wrap">
|
<!-- <view class="item-wrap">
|
||||||
<view class="label"><text>是否包邮</text></view>
|
<view class="label"><text>是否包邮</text></view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<uni-tag :inverted="true" text="包邮" :type="isFreeShipping ? 'primary' : 'default'" @click="isFreeShipping = !isFreeShipping" />
|
<uni-tag :inverted="true" text="包邮" :type="isFreeShipping ? 'primary' : 'default'" @click="isFreeShipping = !isFreeShipping" />
|
||||||
@@ -266,7 +243,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 价格筛选项 -->
|
<!-- 价格筛选项 -->
|
||||||
<!-- <view class="item-wrap">
|
<!-- <view class="item-wrap">
|
||||||
<view class="label"><text>价格区间(元)</text></view>
|
<view class="label"><text>价格区间(元)</text></view>
|
||||||
<view class="price-wrap">
|
<view class="price-wrap">
|
||||||
<input class="uni-input" type="digit" v-model="minPrice" placeholder="最低价" />
|
<input class="uni-input" type="digit" v-model="minPrice" placeholder="最低价" />
|
||||||
@@ -276,7 +253,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 品牌筛选项 -->
|
<!-- 品牌筛选项 -->
|
||||||
<!-- <view class="item-wrap" v-if="brandList.length > 0">
|
<!-- <view class="item-wrap" v-if="brandList.length > 0">
|
||||||
<view class="label"><text>品牌</text></view>
|
<view class="label"><text>品牌</text></view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view v-for="(item, index) in brandList" :key="index">
|
<view v-for="(item, index) in brandList" :key="index">
|
||||||
@@ -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';
|
||||||
|
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 list from './public/js/list.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniDrawer: () => import('@/components/uni-drawer/uni-drawer.vue'),
|
uniDrawer,
|
||||||
uniTag: () => import('@/components/uni-tag/uni-tag.vue'),
|
uniTag,
|
||||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
nsGoodsSkuIndex,
|
||||||
nsGoodsSkuIndex: () => import('@/components/ns-goods-sku/ns-goods-sku-index.vue'),
|
MescrollUni,
|
||||||
uniNumberBox: () => import('@/components/uni-number-box/uni-number-box.vue'),
|
nsLogin,
|
||||||
nsGoodsSku: () => import('@/components/ns-goods-sku/ns-goods-sku.vue'),
|
loadingCover,
|
||||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
nsEmpty,
|
||||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
// #ifdef MP-WEIXIN
|
||||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
privacyPopup
|
||||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
// #endif
|
||||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
},
|
||||||
nsPayment: () => import('@/components/payment/payment.vue'),
|
data() {
|
||||||
// #ifdef MP-WEIXIN
|
return {};
|
||||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
},
|
||||||
// #endif
|
mixins: [list]
|
||||||
},
|
};
|
||||||
data() {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
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,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user