chore(代码合并): 代码从Custom/common分支合并

This commit is contained in:
2026-01-04 09:40:09 +08:00
parent 26f8537d24
commit 4da852944e
145 changed files with 13781 additions and 11628 deletions

View File

@@ -1,7 +1,7 @@
<script> <script>
import auth from 'common/js/auth.js'; import auth from 'common/js/auth.js';
import { themeConfig } from 'common/js/config-external.js'
import configExternal from 'common/js/config-external.js' import configExternal from 'common/js/config-external.js'
import { import {
Weixin Weixin
} from 'common/js/wx-jssdk.js'; } from 'common/js/wx-jssdk.js';
@@ -10,10 +10,8 @@
mixins: [auth], mixins: [auth],
onLaunch: function(options) { onLaunch: function(options) {
// 方式支持快应用从url中query部分获取uniacid或useragent中获取uniacid // 方式支持快应用从url中query部分获取uniacid或useragent中获取uniacid
// console.log(options.query.uniacid)
if(options.query.uniacid){ if(options.query.uniacid){
uni.setStorageSync('uniacid', options.query.uniacid); uni.setStorageSync('uniacid', options.query.uniacid);
console.log(uni.getStorageSync('uniacid'))
} }
uni.hideTabBar(); uni.hideTabBar();
@@ -64,6 +62,7 @@
// 主题风格 // 主题风格
if (uni.getStorageSync('themeStyle')) { if (uni.getStorageSync('themeStyle')) {
this.$store.commit('setThemeStyle', configExternal.loadThemeSync(uni.getStorageSync('themeStyle'))); this.$store.commit('setThemeStyle', configExternal.loadThemeSync(uni.getStorageSync('themeStyle')));
this.$store.dispatch('themeColorSet');
} }
// 插件是否存在 // 插件是否存在

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
// 修复图片垂直对齐问题,解决两张图片上下有空白缝隙问题
/deep/ ._img {
vertical-align: top;
}

View File

@@ -61,8 +61,15 @@ try {
const { uniacid = 0, domain = defaultDomain } = localDevConfig ?? { uniacid: 0, domain: defaultDomain } const { uniacid = 0, domain = defaultDomain } = localDevConfig ?? { uniacid: 0, domain: defaultDomain }
// 调试版本,配置说明 export default {
const devCfg = { /**
* 1.开发调试模式
* 去掉注释 ...defaultCfg;
* 注释掉 ...releaseCfg,
* 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候,原理是:
* 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
*/
// 商户ID // 商户ID
uniacid: uniacid, //825 uniacid: uniacid, //825
@@ -92,31 +99,20 @@ const devCfg = {
// // H5端域名 // // H5端域名
// h5Domain: 'http://saas.cn/', // h5Domain: 'http://saas.cn/',
};
var config = { // 发行版本配置
/** ...(releaseCfg || {}),
* 1.开发调试模式
* 去掉注释 ...devCfg;
* 注释掉 ...releaseCfg,
* 2.发行/发布模式,例如通过`HBuilder>发行>小程序微信`的时候,原理是:
* 然后将 `import site from "../site.js";`追加到 `unpackage\dist\build\mp-weixin\common\vendor.js` 文件内容开头部分
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
*/
...(releaseCfg ?? devCfg),
// 腾讯地图key // 腾讯地图key
mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4', mpKey: 'TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4',
//客服地址 // 客服地址
webSocket: '{{$webSocket}}', webSocket: '{{$webSocket}}',
//本地端主动给服务器ping的时间, 0 则不开启 , 单位秒 // 本地端主动给服务器ping的时间, 0 则不开启 , 单位秒
pingInterval: 1500, pingInterval: 1500,
// 版本号 // 版本号
version: '1.0' version: '1.0'
}; };
export default config;

View File

@@ -1,21 +1,8 @@
export default { export default {
data() {
return {
// 页面样式,动态设置主色调
themeColor: '' //''--base-color:#fa5d14;--base-help-color:#ff7e00;'
}
},
onLoad() { }, onLoad() { },
onShow() { onShow() {
// 刷新多语言 // 刷新多语言
this.$langConfig.refresh(); this.$langConfig.refresh();
let time = setInterval(() => {
let theme = this.themeStyle;
if (theme && theme.main_color) {
this.themeColorSet();
clearInterval(time);
}
}, 50);
}, },
computed: { computed: {
// 是否是英文环境 // 是否是英文环境
@@ -24,6 +11,9 @@ export default {
}, },
themeStyle() { themeStyle() {
return this.$store.state.themeStyle; return this.$store.state.themeStyle;
},
themeColor() {
return this.$store.state.themeColor;
}, },
// 插件是否存在 // 插件是否存在
addonIsExist() { addonIsExist() {
@@ -111,25 +101,7 @@ export default {
} }
}, },
methods: { methods: {
themeColorSet() {
let theme = this.themeStyle;
this.themeColor = `--base-color:${theme.main_color};--base-help-color:${theme.aux_color};`;
if (this.tabBarHeight != '56px') this.themeColor += `--tab-bar-height:${this.tabBarHeight};`
Object.keys(theme).forEach(key => {
let data = theme[key];
if (typeof (data) == "object") {
Object.keys(data).forEach(k => {
this.themeColor += '--' + k.replace(/_/g, "-") + ':' + data[k] + ';';
});
} else if (typeof (key) == "string" && key) {
this.themeColor += '--' + key.replace(/_/g, "-") + ':' + data + ';';
}
});
for (let i = 9; i >= 5; i--) {
let color = this.$util.colourBlend(theme.main_color, '#ffffff', (i / 10));
this.themeColor += `--base-color-light-${i}:${color};`;
}
},
// 颜色变浅(>0、变深函数<0 // 颜色变浅(>0、变深函数<0
lightenDarkenColor(color, amount) { lightenDarkenColor(color, amount) {

View File

@@ -49,7 +49,7 @@ export default {
} }
var method = params.data != undefined ? 'POST' : 'GET', // 请求方式 var method = params.data != undefined ? 'POST' : 'GET', // 请求方式
url = Config.baseUrl + params.url, // 请求路径 url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'), // 请求路径
data = { data = {
app_type, app_type,
app_type_name app_type_name

View File

@@ -72,6 +72,7 @@ export default {
//当前页面语言包(同步加载) //当前页面语言包(同步加载)
let route = _this.route; let route = _this.route;
let langPath = processRoutePath(route); let langPath = processRoutePath(route);
// console.log(`当前页面语言包路径: ${langPath}`);
// 加载当前页面语言包 // 加载当前页面语言包
let currentPageLang = loadLangPackSync(locale, langPath); let currentPageLang = loadLangPackSync(locale, langPath);

View File

@@ -1,419 +1,460 @@
export default { /**
'default': { * 颜色配置
//红 * 包含默认颜色和其他颜
name: 'default', * 特别注意:
main_color: '#F4391c', * 1. 分组不会被计算成Key分组下的属性会被计算成Key
aux_color: '#F7B500', * 2. 分组下的属性如果有相同的Key会被覆盖
bg_color: '#FF4646',//主题背景 * 3. 例如hoverNavhoverNav_bg_color和hoverNav_text_color, 不会生成hoverNav_hoverNav_bg_color和hoverNav_hoverNav_text_color
bg_color_shallow: '#FF4646',//主题背景渐变浅色 * 问题原因:历史遗留
promotion_color: '#FF4646',//活动背景 */
promotion_aux_color: '#F7B500',//活动背景辅色 export default {
main_color_shallow: '#FFF4F4',//淡背景 'default': {
price_color: 'rgb(252,82,39)',//价格颜 //红
btn_text_color: '#FFFFFF',//按钮文字颜色 name: 'default',
goods_detail: { main_color: '#F4391c',
goods_price: 'rgb(252,82,39,1)',//价格 aux_color: '#F7B500',
promotion_tag: '#FF4646', bg_color: '#FF4646',//主题背景
goods_card_bg: '#201A18',//会员卡背景 bg_color_shallow: '#FF4646',//主题背景渐变浅色
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 promotion_color: '#FF4646',//活动背景
goods_card_color: '#FFD792', promotion_aux_color: '#F7B500',//活动背景辅色
goods_coupon: '#FC5227', main_color_shallow: '#FFF4F4',//淡背景
goods_cart_num_corner: '#FC5227',//购物车数量角标 price_color: 'rgb(252,82,39)',//价格颜色
goods_btn_color: '#FF4646',//按钮颜色 btn_text_color: '#FFFFFF',//按钮文字颜色
goods_btn_color_shallow: '#F7B500',//副按钮颜色 goods_detail: {
}, goods_price: 'rgb(252,82,39,1)',//价格
pintuan: { promotion_tag: '#FF4646',
pintuan_label_bg: '#F7B500', goods_card_bg: '#201A18',//会员卡背景
pintuan_label_color: '#FFFFFF', goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
pintuan_color: '#FA6400', goods_card_color: '#FFD792',
pintuan_promotion_color: '#FA3A1D',//活动背景 goods_coupon: '#FC5227',
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 goods_cart_num_corner: '#FC5227',//购物车数量角标
}, goods_btn_color: '#FF4646',//按钮颜色
super_member: { goods_btn_color_shallow: '#F7B500',//副按钮颜色
super_member_start_bg: '#7c7878', },
super_member_end_bg: '#201a18', pintuan: {
super_member_start_text_color: '#FFDBA6', pintuan_label_bg: '#F7B500',
super_member_end_text_color: '#FFEBCA', pintuan_label_color: '#FFFFFF',
}, pintuan_color: '#FA6400',
bargain: { pintuan_promotion_color: '#FA3A1D',//活动背景
bargain_promotion_color: '#F0353E',//活动背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
bargain_promotion_aux_color: '#FD9A01',//活动辅色 },
}, super_member: {
seckill: { super_member_start_bg: '#7c7878',
seckill_promotion_color: '#F83530',//活动背景 super_member_end_bg: '#201a18',
seckill_promotion_aux_color: '#FD9A01',//活动辅色 super_member_start_text_color: '#FFDBA6',
}, super_member_end_text_color: '#FFEBCA',
giftcard: { },
giftcard_promotion_color: '#FF3369',//活动背景 bargain: {
giftcard_promotion_aux_color: '#F7B500',//活动辅色 bargain_promotion_color: '#F0353E',//活动背景
}, bargain_promotion_aux_color: '#FD9A01',//活动辅色
groupby: { },
groupby_promotion_color: '#E64136',//活动背景 seckill: {
groupby_promotion_aux_color: '#F7B500',//活动辅色 seckill_promotion_color: '#F83530',//活动背景
}, seckill_promotion_aux_color: '#FD9A01',//活动辅色
}, },
'green': { giftcard: {
name: 'green', giftcard_promotion_color: '#FF3369',//活动背景
main_color: '#19C650', giftcard_promotion_aux_color: '#F7B500',//活动辅色
aux_color: '#FA6400', },
bg_color: '#19C650', groupby: {
bg_color_shallow: '#19C650', groupby_promotion_color: '#E64136',//活动背景
promotion_color: '#19C650', groupby_promotion_aux_color: '#F7B500',//活动辅色
promotion_aux_color: '#FA6400', },
main_color_shallow: '#F0FFF5',//淡背景 hoverNav: {
price_color: 'rgba(252,82,39,1)',//价格颜 hovenav_bg_color: '#F4391c',//背景
btn_text_color: '#FFFFFF',//按钮文字颜色 hovenav_text_color: '#FFFFFF'
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 },
promotion_tag: '#19C650', 'green': {
goods_card_bg: '#201A18',//会员卡背景 name: 'green',
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 main_color: '#19C650',
goods_card_color: '#FFD792', aux_color: '#FA6400',
goods_coupon: '#FC5227', bg_color: '#19C650',
goods_cart_num_corner: '#FC5227',//购物车数量角标 bg_color_shallow: '#19C650',
goods_btn_color: '#19C650',//按钮颜色 promotion_color: '#19C650',
goods_btn_color_shallow: '#FA6400',//副按钮颜色 promotion_aux_color: '#FA6400',
}, main_color_shallow: '#F0FFF5',//淡背景
pintuan: { price_color: 'rgba(252,82,39,1)',//价格颜色
pintuan_label_bg: '#F7B500', btn_text_color: '#FFFFFF',//按钮文字颜色
pintuan_label_color: '#FFFFFF', goods_detail: {
pintuan_color: '#FA6400', goods_price: 'rgba(252,82,39,1)',//价格
pintuan_promotion_color: '#FA3A1D',//活动背景 promotion_tag: '#19C650',
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 goods_card_bg: '#201A18',//会员卡背景
}, goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
super_member: { goods_card_color: '#FFD792',
super_member_start_bg: '#7c7878', goods_coupon: '#FC5227',
super_member_end_bg: '#201a18', goods_cart_num_corner: '#FC5227',//购物车数量角标
super_member_start_text_color: '#FFDBA6', goods_btn_color: '#19C650',//按钮颜色
super_member_end_text_color: '#FFEBCA', goods_btn_color_shallow: '#FA6400',//副按钮颜色
}, },
bargain: { pintuan: {
bargain_promotion_color: '#F0353E',//活动背景 pintuan_label_bg: '#F7B500',
bargain_promotion_aux_color: '#FD9A01',//活动辅色 pintuan_label_color: '#FFFFFF',
}, pintuan_color: '#FA6400',
seckill: { pintuan_promotion_color: '#FA3A1D',//活动背景
seckill_promotion_color: '#F83530',//活动背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
seckill_promotion_aux_color: '#FD9A01',//活动辅色 },
}, super_member: {
giftcard: { super_member_start_bg: '#7c7878',
giftcard_promotion_color: '#FF3369',//活动背景 super_member_end_bg: '#201a18',
giftcard_promotion_aux_color: '#F7B500',//活动辅色 super_member_start_text_color: '#FFDBA6',
}, super_member_end_text_color: '#FFEBCA',
groupby: { },
groupby_promotion_color: '#E64136',//活动背景 bargain: {
groupby_promotion_aux_color: '#F7B500',//活动辅色 bargain_promotion_color: '#F0353E',//活动背景
}, bargain_promotion_aux_color: '#FD9A01',//活动辅色
}, },
'blue': { seckill: {
name: 'blue', seckill_promotion_color: '#F83530',//活动背景
main_color: '#36ABFF', seckill_promotion_aux_color: '#FD9A01',//活动辅色
aux_color: '#FA6400', },
bg_color: '#36ABFF', giftcard: {
bg_color_shallow: '#36ABFF', giftcard_promotion_color: '#FF3369',//活动背景
promotion_color: '#36ABFF ', giftcard_promotion_aux_color: '#F7B500',//活动辅色
promotion_aux_color: '#FA6400', },
main_color_shallow: '#E2F3FF', groupby: {
price_color: 'rgba(252,82,39,1)',//价格颜色 groupby_promotion_color: '#E64136',//活动背景
btn_text_color: '#FFFFFF',//按钮文字颜 groupby_promotion_aux_color: '#F7B500',//活动辅
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 hoverNav: {
promotion_tag: '#36ABFF', hovenav_bg_color: '#19C650',//背景色
goods_card_bg: '#201A18',//会员卡背景 hovenav_text_color: '#FFFFFF'
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', },
goods_coupon: '#FC5227', 'blue': {
goods_cart_num_corner: '#FC5227',//购物车数量角标 name: 'blue',
goods_btn_color: '#36ABFF',//按钮颜色 main_color: '#36ABFF',
goods_btn_color_shallow: '#FA6400',//副按钮颜色 aux_color: '#FA6400',
}, bg_color: '#36ABFF',
pintuan: { bg_color_shallow: '#36ABFF',
pintuan_label_bg: '#F7B500', promotion_color: '#36ABFF ',
pintuan_label_color: '#FFFFFF', promotion_aux_color: '#FA6400',
pintuan_color: '#FA6400', main_color_shallow: '#E2F3FF',
pintuan_promotion_color: '#FA3A1D',//活动背景 price_color: 'rgba(252,82,39,1)',//价格颜色
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅 btn_text_color: '#FFFFFF',//按钮文字颜
}, goods_detail: {
super_member: { goods_price: 'rgba(252,82,39,1)',//价格
super_member_start_bg: '#7c7878', promotion_tag: '#36ABFF',
super_member_end_bg: '#201a18', goods_card_bg: '#201A18',//会员卡背景
super_member_start_text_color: '#FFDBA6', goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
super_member_end_text_color: '#FFEBCA', goods_card_color: '#FFD792',
}, goods_coupon: '#FC5227',
bargain: { goods_cart_num_corner: '#FC5227',//购物车数量角标
bargain_promotion_color: '#F0353E',//活动背景 goods_btn_color: '#36ABFF',//按钮颜色
bargain_promotion_aux_color: '#FD9A01',//活动辅 goods_btn_color_shallow: '#FA6400',//副按钮颜
}, },
seckill: { pintuan: {
seckill_promotion_color: '#F83530',//活动背景 pintuan_label_bg: '#F7B500',
seckill_promotion_aux_color: '#FD9A01',//活动辅色 pintuan_label_color: '#FFFFFF',
}, pintuan_color: '#FA6400',
giftcard: { pintuan_promotion_color: '#FA3A1D',//活动背景
giftcard_promotion_color: '#FF3369',//活动背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
giftcard_promotion_aux_color: '#F7B500',//活动辅色 },
}, super_member: {
groupby: { super_member_start_bg: '#7c7878',
groupby_promotion_color: '#E64136',//活动背景 super_member_end_bg: '#201a18',
groupby_promotion_aux_color: '#F7B500',//活动辅色 super_member_start_text_color: '#FFDBA6',
}, super_member_end_text_color: '#FFEBCA',
}, },
'pink': { bargain: {
name: 'pink', bargain_promotion_color: '#F0353E',//活动背景
main_color: '#FF407E', bargain_promotion_aux_color: '#FD9A01',//活动辅色
aux_color: '#F7B500', },
bg_color: '#FF407E',//主题背景 seckill: {
bg_color_shallow: '#FF407E',//主题背景渐变浅色 seckill_promotion_color: '#F83530',//活动背景
promotion_color: '#FF407E',//活动背景 seckill_promotion_aux_color: '#FD9A01',//活动辅色
promotion_aux_color: '#F7B500',//活动背景辅色 },
main_color_shallow: '#FFF5F8',//淡背景 giftcard: {
price_color: 'rgba(252,82,39,1)',//价格颜色 giftcard_promotion_color: '#FF3369',//活动背景
btn_text_color: '#FFFFFF',//按钮文字颜 giftcard_promotion_aux_color: '#F7B500',//活动辅
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 groupby: {
promotion_tag: '#FF407E', groupby_promotion_color: '#E64136',//活动背景
goods_card_bg: '#201A18',//会员卡背景 groupby_promotion_aux_color: '#F7B500',//活动辅色
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', hoverNav: {
goods_coupon: '#FC5227', hovenav_bg_color: '#36ABFF',//背景色
goods_cart_num_corner: '#FC5227',//购物车数量角标 hovenav_text_color: '#FFFFFF'
goods_btn_color: '#FF407E',//按钮颜色 },
goods_btn_color_shallow: '#F7B500',//副按钮颜色 },
}, 'pink': {
pintuan: { name: 'pink',
pintuan_label_bg: '#F7B500', main_color: '#FF407E',
pintuan_label_color: '#FFFFFF', aux_color: '#F7B500',
pintuan_color: '#FA6400', bg_color: '#FF407E',//主题背景
pintuan_promotion_color: '#FA3A1D',//活动背景 bg_color_shallow: '#FF407E',//主题背景渐变浅色
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 promotion_color: '#FF407E',//活动背景
}, promotion_aux_color: '#F7B500',//活动背景辅色
super_member: { main_color_shallow: '#FFF5F8',//淡背景
super_member_start_bg: '#7c7878', price_color: 'rgba(252,82,39,1)',//价格颜色
super_member_end_bg: '#201a18', btn_text_color: '#FFFFFF',//按钮文字颜色
super_member_start_text_color: '#FFDBA6', goods_detail: {
super_member_end_text_color: '#FFEBCA', goods_price: 'rgba(252,82,39,1)',//价格
}, promotion_tag: '#FF407E',
bargain: { goods_card_bg: '#201A18',//会员卡背景
bargain_promotion_color: '#F0353E',//活动背景 goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
bargain_promotion_aux_color: '#FD9A01',//活动辅色 goods_card_color: '#FFD792',
}, goods_coupon: '#FC5227',
seckill: { goods_cart_num_corner: '#FC5227',//购物车数量角标
seckill_promotion_color: '#F83530',//活动背景 goods_btn_color: '#FF407E',//按钮颜色
seckill_promotion_aux_color: '#FD9A01',//活动辅 goods_btn_color_shallow: '#F7B500',//副按钮颜
}, },
giftcard: { pintuan: {
giftcard_promotion_color: '#FF3369',//活动背景 pintuan_label_bg: '#F7B500',
giftcard_promotion_aux_color: '#F7B500',//活动辅色 pintuan_label_color: '#FFFFFF',
}, pintuan_color: '#FA6400',
groupby: { pintuan_promotion_color: '#FA3A1D',//活动背景
groupby_promotion_color: '#E64136',//活动背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
groupby_promotion_aux_color: '#F7B500',//活动辅色 },
}, super_member: {
}, super_member_start_bg: '#7c7878',
'gold': { super_member_end_bg: '#201a18',
name: 'gold', super_member_start_text_color: '#FFDBA6',
main_color: '#CFAF70', super_member_end_text_color: '#FFEBCA',
aux_color: '#444444', },
bg_color: '#CFAF70',//主题背景 bargain: {
bg_color_shallow: '#CFAF70',//主题背景渐变浅色 bargain_promotion_color: '#F0353E',//活动背景
promotion_color: '#CFAF70',//活动背景 bargain_promotion_aux_color: '#FD9A01',//活动辅色
promotion_aux_color: '#444444',//活动背景辅色 },
main_color_shallow: '#FFFAF1',//淡背景 seckill: {
price_color: 'rgba(252,82,39,1)',//价格颜色 seckill_promotion_color: '#F83530',//活动背景
btn_text_color: '#FFFFFF',//按钮文字颜 seckill_promotion_aux_color: '#FD9A01',//活动辅
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 giftcard: {
promotion_tag: '#CFAF70', giftcard_promotion_color: '#FF3369',//活动背景
goods_card_bg: '#201A18',//会员卡背景 giftcard_promotion_aux_color: '#F7B500',//活动辅色
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', groupby: {
goods_coupon: '#FC5227', groupby_promotion_color: '#E64136',//活动背景
goods_cart_num_corner: '#FC5227',//购物车数量角标 groupby_promotion_aux_color: '#F7B500',//活动辅色
goods_btn_color: '#CFAF70',//按钮颜色 },
goods_btn_color_shallow: '#444444',//副按钮颜色 hoverNav: {
}, hovenav_bg_color: '#FF407E',//背景色
pintuan: { hovenav_text_color: '#FFFFFF'
pintuan_label_bg: '#F7B500', },
pintuan_label_color: '#FFFFFF', },
pintuan_color: '#FA6400', 'gold': {
pintuan_promotion_color: '#FA3A1D',//活动背景 name: 'gold',
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 main_color: '#CFAF70',
}, aux_color: '#444444',
super_member: { bg_color: '#CFAF70',//主题背景
super_member_start_bg: '#7c7878', bg_color_shallow: '#CFAF70',//主题背景渐变浅色
super_member_end_bg: '#201a18', promotion_color: '#CFAF70',//活动背景
super_member_start_text_color: '#FFDBA6', promotion_aux_color: '#444444',//活动背景辅色
super_member_end_text_color: '#FFEBCA', main_color_shallow: '#FFFAF1',//淡背景
}, price_color: 'rgba(252,82,39,1)',//价格颜色
bargain: { btn_text_color: '#FFFFFF',//按钮文字颜色
bargain_promotion_color: '#F0353E',//活动背景 goods_detail: {
bargain_promotion_aux_color: '#FD9A01',//活动辅色 goods_price: 'rgba(252,82,39,1)',//价格
}, promotion_tag: '#CFAF70',
seckill: { goods_card_bg: '#201A18',//会员卡背景
seckill_promotion_color: '#F83530',//活动背景 goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
seckill_promotion_aux_color: '#FD9A01',//活动辅色 goods_card_color: '#FFD792',
}, goods_coupon: '#FC5227',
giftcard: { goods_cart_num_corner: '#FC5227',//购物车数量角标
giftcard_promotion_color: '#FF3369',//活动背景 goods_btn_color: '#CFAF70',//按钮颜色
giftcard_promotion_aux_color: '#F7B500',//活动辅 goods_btn_color_shallow: '#444444',//副按钮颜
}, },
groupby: { pintuan: {
groupby_promotion_color: '#E64136',//活动背景 pintuan_label_bg: '#F7B500',
groupby_promotion_aux_color: '#F7B500',//活动辅色 pintuan_label_color: '#FFFFFF',
}, pintuan_color: '#FA6400',
}, pintuan_promotion_color: '#FA3A1D',//活动背景
'purple': { pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
name: 'purple', },
main_color: '#A253FF', super_member: {
aux_color: '#222222', super_member_start_bg: '#7c7878',
bg_color: '#A253FF',//主题背景 super_member_end_bg: '#201a18',
bg_color_shallow: '#A253FF',//主题背景渐变浅色 super_member_start_text_color: '#FFDBA6',
promotion_color: '#A253FF',//活动背景 super_member_end_text_color: '#FFEBCA',
promotion_aux_color: '#222222',//活动背景辅色 },
main_color_shallow: '#F8F3FF',//淡背景 bargain: {
price_color: 'rgba(252,82,39,1)',//价格颜色 bargain_promotion_color: '#F0353E',//活动背景
btn_text_color: '#FFFFFF',//按钮文字颜 bargain_promotion_aux_color: '#FD9A01',//活动辅
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 seckill: {
promotion_tag: '#A253FF', seckill_promotion_color: '#F83530',//活动背景
goods_card_bg: '#201A18',//会员卡背景 seckill_promotion_aux_color: '#FD9A01',//活动辅色
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', giftcard: {
goods_coupon: '#FC5227', giftcard_promotion_color: '#FF3369',//活动背景
goods_cart_num_corner: '#FC5227',//购物车数量角标 giftcard_promotion_aux_color: '#F7B500',//活动辅色
goods_btn_color: '#A253FF',//按钮颜色 },
goods_btn_color_shallow: '#222222',//副按钮颜色 groupby: {
}, groupby_promotion_color: '#E64136',//活动背景
pintuan: { groupby_promotion_aux_color: '#F7B500',//活动辅色
pintuan_label_bg: '#F7B500', },
pintuan_label_color: '#FFFFFF', hoverNav: {
pintuan_color: '#FA6400', hovenav_bg_color: '#CFAF70',//背景色
pintuan_promotion_color: '#FA3A1D',//活动背景 hovenav_text_color: '#FFFFFF'
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 },
}, },
super_member: { 'purple': {
super_member_start_bg: '#7c7878', name: 'purple',
super_member_end_bg: '#201a18', main_color: '#A253FF',
super_member_start_text_color: '#FFDBA6', aux_color: '#222222',
super_member_end_text_color: '#FFEBCA', bg_color: '#A253FF',//主题背景
}, bg_color_shallow: '#A253FF',//主题背景渐变浅色
bargain: { promotion_color: '#A253FF',//活动背景
bargain_promotion_color: '#F0353E',//活动背景 promotion_aux_color: '#222222',//活动背景辅色
bargain_promotion_aux_color: '#FD9A01',//活动辅色 main_color_shallow: '#F8F3FF',//淡背景
}, price_color: 'rgba(252,82,39,1)',//价格颜色
seckill: { btn_text_color: '#FFFFFF',//按钮文字颜色
seckill_promotion_color: '#F83530',//活动背景 goods_detail: {
seckill_promotion_aux_color: '#FD9A01',//活动辅色 goods_price: 'rgba(252,82,39,1)',//价格
}, promotion_tag: '#A253FF',
giftcard: { goods_card_bg: '#201A18',//会员卡背景
giftcard_promotion_color: '#FF3369',//活动背景 goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
giftcard_promotion_aux_color: '#F7B500',//活动辅色 goods_card_color: '#FFD792',
}, goods_coupon: '#FC5227',
groupby: { goods_cart_num_corner: '#FC5227',//购物车数量角标
groupby_promotion_color: '#E64136',//活动背景 goods_btn_color: '#A253FF',//按钮颜色
groupby_promotion_aux_color: '#F7B500',//活动辅 goods_btn_color_shallow: '#222222',//副按钮颜
}, },
}, pintuan: {
'yellow': { pintuan_label_bg: '#F7B500',
name: 'yellow', pintuan_label_color: '#FFFFFF',
main_color: '#FFD009', pintuan_color: '#FA6400',
aux_color: '#1D262E', pintuan_promotion_color: '#FA3A1D',//活动背景
bg_color: '#FFD009',//主题背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
bg_color_shallow: '#FFD009',//主题背景渐变浅色 },
promotion_color: '#FFD009',//活动背景 super_member: {
promotion_aux_color: '#1D262E',//活动背景辅色 super_member_start_bg: '#7c7878',
main_color_shallow: '#FFFBEF',//淡背景 super_member_end_bg: '#201a18',
price_color: 'rgba(252,82,39,1)',//价格颜色 super_member_start_text_color: '#FFDBA6',
btn_text_color: '#303133',//按钮文字颜色 super_member_end_text_color: '#FFEBCA',
goods_detail: { },
goods_price: 'rgba(252,82,39,1)',//价格 bargain: {
promotion_tag: '#FFD009', bargain_promotion_color: '#F0353E',//活动背景
goods_card_bg: '#201A18',//会员卡背景 bargain_promotion_aux_color: '#FD9A01',//活动辅色
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', seckill: {
goods_coupon: '#FC5227', seckill_promotion_color: '#F83530',//活动背景
goods_cart_num_corner: '#FC5227',//购物车数量角标 seckill_promotion_aux_color: '#FD9A01',//活动辅色
goods_btn_color: '#FFD009',//按钮颜色 },
goods_btn_color_shallow: '#1D262E',//副按钮颜色 giftcard: {
}, giftcard_promotion_color: '#FF3369',//活动背景
pintuan: { giftcard_promotion_aux_color: '#F7B500',//活动辅色
pintuan_label_bg: '#F7B500', },
pintuan_label_color: '#FFFFFF', groupby: {
pintuan_color: '#FA6400', groupby_promotion_color: '#E64136',//活动背景
pintuan_promotion_color: '#FA3A1D',//活动背景 groupby_promotion_aux_color: '#F7B500',//活动辅色
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 },
}, hoverNav: {
super_member: { hovenav_bg_color: '#A253FF',//背景色
super_member_start_bg: '#7c7878', hovenav_text_color: '#FFFFFF'
super_member_end_bg: '#201a18', },
super_member_start_text_color: '#FFDBA6', },
super_member_end_text_color: '#FFEBCA', 'yellow': {
}, name: 'yellow',
bargain: { main_color: '#FFD009',
bargain_promotion_color: '#F0353E',//活动背景 aux_color: '#1D262E',
bargain_promotion_aux_color: '#FD9A01',//活动辅色 bg_color: '#FFD009',//主题背景
}, bg_color_shallow: '#FFD009',//主题背景渐变浅色
seckill: { promotion_color: '#FFD009',//活动背景
seckill_promotion_color: '#F83530',//活动背景 promotion_aux_color: '#1D262E',//活动背景辅色
seckill_promotion_aux_color: '#FD9A01',//活动辅色 main_color_shallow: '#FFFBEF',//淡背景
}, price_color: 'rgba(252,82,39,1)',//价格颜色
giftcard: { btn_text_color: '#303133',//按钮文字颜色
giftcard_promotion_color: '#FF3369',//活动背景 goods_detail: {
giftcard_promotion_aux_color: '#F7B500',//活动辅色 goods_price: 'rgba(252,82,39,1)',//价格
}, promotion_tag: '#FFD009',
groupby: { goods_card_bg: '#201A18',//会员卡背景
groupby_promotion_color: '#E64136',//活动背景 goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
groupby_promotion_aux_color: '#F7B500',//活动辅色 goods_card_color: '#FFD792',
}, goods_coupon: '#FC5227',
}, goods_cart_num_corner: '#FC5227',//购物车数量角标
'black': { goods_btn_color: '#FFD009',//按钮颜色
name: 'black', goods_btn_color_shallow: '#1D262E',//副按钮颜色
main_color: '#222222', },
aux_color: '#FFFFFF', pintuan: {
bg_color: '#222222',//主题背景 pintuan_label_bg: '#F7B500',
bg_color_shallow: '#333333',//主题背景渐变浅色 pintuan_label_color: '#FFFFFF',
promotion_color: '#222222',//活动背景 pintuan_color: '#FA6400',
promotion_aux_color: '#FA8B00',//活动背景辅色 pintuan_promotion_color: '#FA3A1D',//活动背景
main_color_shallow: '#efefef',//淡背景 pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
price_color: 'rgba(255,0,0,1)',//价格颜色 },
btn_text_color: '#FFFFFF',//按钮文字颜色 super_member: {
goods_detail: { super_member_start_bg: '#7c7878',
goods_price: 'rgba(255,0,0,1)',//价格 super_member_end_bg: '#201a18',
promotion_tag: '#222222', super_member_start_text_color: '#FFDBA6',
goods_card_bg: '#201A18',//会员卡背景 super_member_end_text_color: '#FFEBCA',
goods_card_bg_shallow: '#7C7878',//会员卡背景浅色 },
goods_card_color: '#FFD792', bargain: {
goods_coupon: '#222222', bargain_promotion_color: '#F0353E',//活动背景
goods_cart_num_corner: '#FF0000',//购物车数量角标 bargain_promotion_aux_color: '#FD9A01',//活动辅色
goods_btn_color: '#222222',//按钮颜色 },
goods_btn_color_shallow: '#FA8B00',//副按钮颜色 seckill: {
}, seckill_promotion_color: '#F83530',//活动背景
pintuan: { seckill_promotion_aux_color: '#FD9A01',//活动辅色
pintuan_label_bg: '#F7B500', },
pintuan_label_color: '#FFFFFF', giftcard: {
pintuan_color: '#FA6400', giftcard_promotion_color: '#FF3369',//活动背景
pintuan_promotion_color: '#FA3A1D',//活动背景 giftcard_promotion_aux_color: '#F7B500',//活动辅色
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色 },
}, groupby: {
super_member: { groupby_promotion_color: '#E64136',//活动背景
super_member_start_bg: '#fadcb5', groupby_promotion_aux_color: '#F7B500',//活动辅色
super_member_end_bg: '#f6bd74', },
super_member_start_text_color: '#ab6126', hoverNav: {
super_member_end_text_color: '#d19336', hovenav_bg_color: '#FFD009',//背景色
}, hovenav_text_color: '#303133'
bargain: { },
bargain_promotion_color: '#F0353E',//活动背景 },
bargain_promotion_aux_color: '#FD9A01',//活动辅色 'black': {
}, name: 'black',
seckill: { main_color: '#222222',
seckill_promotion_color: '#F83530',//活动背景 aux_color: '#FFFFFF',
seckill_promotion_aux_color: '#FD9A01',//活动辅色 bg_color: '#222222',//主题背景
}, bg_color_shallow: '#333333',//主题背景渐变浅色
giftcard: { promotion_color: '#222222',//活动背景
giftcard_promotion_color: '#FF3369',//活动背景 promotion_aux_color: '#FA8B00',//活动背景辅色
giftcard_promotion_aux_color: '#F7B500',//活动辅色 main_color_shallow: '#efefef',//淡背景
}, price_color: 'rgba(255,0,0,1)',//价格颜色
groupby: { btn_text_color: '#FFFFFF',//按钮文字颜色
groupby_promotion_color: '#E64136',//活动背景 goods_detail: {
groupby_promotion_aux_color: '#F7B500',//活动辅色 goods_price: 'rgba(255,0,0,1)',//价格
}, promotion_tag: '#222222',
} goods_card_bg: '#201A18',//会员卡背景
} goods_card_bg_shallow: '#7C7878',//会员卡背景浅色
goods_card_color: '#FFD792',
goods_coupon: '#222222',
goods_cart_num_corner: '#FF0000',//购物车数量角标
goods_btn_color: '#222222',//按钮颜色
goods_btn_color_shallow: '#FA8B00',//副按钮颜色
},
pintuan: {
pintuan_label_bg: '#F7B500',
pintuan_label_color: '#FFFFFF',
pintuan_color: '#FA6400',
pintuan_promotion_color: '#FA3A1D',//活动背景
pintuan_promotion_aux_color: '#FD9A01',//活动背景辅色
},
super_member: {
super_member_start_bg: '#fadcb5',
super_member_end_bg: '#f6bd74',
super_member_start_text_color: '#ab6126',
super_member_end_text_color: '#d19336',
},
bargain: {
bargain_promotion_color: '#F0353E',//活动背景
bargain_promotion_aux_color: '#FD9A01',//活动辅色
},
seckill: {
seckill_promotion_color: '#F83530',//活动背景
seckill_promotion_aux_color: '#FD9A01',//活动辅色
},
giftcard: {
giftcard_promotion_color: '#FF3369',//活动背景
giftcard_promotion_aux_color: '#F7B500',//活动辅色
},
groupby: {
groupby_promotion_color: '#E64136',//活动背景
groupby_promotion_aux_color: '#F7B500',//活动辅色
},
hoverNav: {
hovenav_bg_color: '#222222',//背景色
hovenav_text_color: '#FFFFFF'
},
}
}

View File

@@ -61,6 +61,35 @@ export const adaptSubpackageUrl = (url) => {
return replacePrefix(url); return replacePrefix(url);
} }
/**
* 检查tabBar是否激活
* @param {string} linkUrl 链接路径 /pages/goods/category
* @param {string} currentPageRoute 当前页面路径 /pages_goods/category
* @returns {boolean} 是否激活
*/
export const checkTabBarActive = (linkUrl, currentPageRoute) => {
const linkUrlParts = adaptSubpackageUrl(linkUrl).split('/');
const currentPageRouteParts = currentPageRoute.split('/');
console.log('diy-bottom-nav verify:', { linkUrlParts, currentPageRouteParts});
try {
// 二级页面
if (linkUrlParts[2] === currentPageRouteParts[2]) {
return true;
}
// 一级页面限定只能是goods相关
if (linkUrlParts[1] === currentPageRouteParts[1] && linkUrlParts[1] === 'pages_goods') {
return true;
}
} catch (error) {
console.error('diy-bottom-nav verify error:', error);
}
return false;
}
export default { export default {
/** /**
* 页面跳转 * 页面跳转
@@ -91,7 +120,7 @@ export default {
const tabBarUrl = systemTabBarList[i]; const tabBarUrl = systemTabBarList[i];
if (url.indexOf(tabBarUrl) == 0) { if (url.indexOf(tabBarUrl) == 0) {
// 首页特殊处理采用switchTab, 其他页面采用redirectTo, 不能返回,不能退回 // 首页特殊处理采用switchTab, 其他页面采用redirectTo, 不能返回,不能退回
(tabBarUrl == INDEX_PAGE_URL ? uni.switchTab : uni.redirectTo)({url}); (tabBarUrl == INDEX_PAGE_URL ? uni.switchTab : uni.redirectTo)({ url });
return; return;
} }
} }
@@ -130,8 +159,6 @@ export default {
* @param {Object} params 参数针对商品、相册里面的图片区分大中小size: big、mid、small * @param {Object} params 参数针对商品、相册里面的图片区分大中小size: big、mid、small
*/ */
img(img_path, params) { img(img_path, params) {
var path = ""; var path = "";
if (img_path != undefined && img_path != "") { if (img_path != undefined && img_path != "") {
if (img_path.split(',').length > 1) { if (img_path.split(',').length > 1) {

View File

@@ -59,7 +59,7 @@
</template> </template>
<script> <script>
import { adaptSubpackageUrl } from '@/common/js/util.js' import { adaptSubpackageUrl, checkTabBarActive } from '@/common/js/util.js'
import DiyMinx from './minx.js' import DiyMinx from './minx.js'
// 底部导航栏 // 底部导航栏
export default { export default {
@@ -154,7 +154,7 @@ export default {
return true; return true;
} }
return false; return checkTabBarActive(linkUrl, currentPageRoute);
} }
} }
}; };

View File

@@ -100,7 +100,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</block> </block>
<block v-else> <block v-else>
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询' }}</text> <text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
</block> </block>
</view> </view>
<view class="member-price-tag" <view class="member-price-tag"
@@ -192,7 +192,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</block> </block>
<block v-else> <block v-else>
<text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询' }}</text> <text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
</block> </block>
</view> </view>

View File

@@ -610,10 +610,10 @@ export default {
view { view {
color: #222222; color: #222222;
width: 100%; width: 100%;
white-space: nowrap; white-space: break-word;
text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
font-size: 10px;
} }
&.border-top { &.border-top {
@@ -630,6 +630,7 @@ export default {
view { view {
color: #333; color: #333;
font-weight: bold; font-weight: bold;
font-size: $font-size-base;
} }
&::before { &::before {

View File

@@ -1,5 +1,5 @@
<template> <template>
<view :style="componentStyle"> <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'">
<view class="uni-scroll-view-content"> <view class="uni-scroll-view-content">

View File

@@ -170,6 +170,7 @@
<script> <script>
import nsLoading from '@/components/ns-loading/ns-loading.vue'; 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',
@@ -190,7 +191,8 @@ export default {
}, },
mixins: [DiyMinx], mixins: [DiyMinx],
components: { components: {
nsLoading nsLoading,
MescrollUni
}, },
data() { data() {
return { return {

View File

@@ -1,5 +1,5 @@
<template> <template>
<view data-component-name="diy-picture" class="diy-picture" :style="style"> <view data-component-name="diy-listmenu" class="diy-listmenu" :style="style">
<view class="fui-cell-group"> <view class="fui-cell-group">
<!-- <image mode="widthFix" style="width: 100%;" :src="$util.img(item.imageUrl)"></image> --> <!-- <image mode="widthFix" style="width: 100%;" :src="$util.img(item.imageUrl)"></image> -->

View File

@@ -324,7 +324,7 @@ export default {
await this.__$emitEvent({ await this.__$emitEvent({
eventName: 'text-tap', data: link, promiseCallback: (event, handler, awaitedResult) => { eventName: 'text-tap', data: link, promiseCallback: (event, handler, awaitedResult) => {
if (!awaitedResult) return; if (!awaitedResult) return;
$util.diyRedirectTo(link); this.$util.diyRedirectTo(link);
} }
}) })
} }

View File

@@ -636,11 +636,30 @@
<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: {
nsSelectTime,
nsLogin,
MescrollUni,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
props: { props: {
api: Object, api: Object,
createDataKey: String createDataKey: String

View File

@@ -67,7 +67,7 @@ export default {
this.kefuimg = this.$util.getDefaultImage().kefu this.kefuimg = this.$util.getDefaultImage().kefu
this.phoneimg = this.$util.getDefaultImage().phone this.phoneimg = this.$util.getDefaultImage().phone
this.pageCount = getCurrentPages().length; this.pageCount = getCurrentPages().length;
// 从店铺信息中获取相关信息 // 从店铺信息中获取相关信息
uni.getStorage({ uni.getStorage({
key: 'shopInfo', key: 'shopInfo',
@@ -80,8 +80,7 @@ export default {
// 从店铺信息中获取是否启用语言切换 // 从店铺信息中获取是否启用语言切换
this.isLanguageSwitchEnabled = e.data.ischina; this.isLanguageSwitchEnabled = e.data.ischina;
} }
}) })
}, },
computed: { computed: {
currentLangDisplayName() { currentLangDisplayName() {
@@ -203,6 +202,7 @@ export default {
margin: 14rpx 0; margin: 14rpx 0;
transition: 0.1s; transition: 0.1s;
background: #c6251b; background: #c6251b;
// background: var(--hover-nav-bg-color);
color: #fff; color: #fff;
border-radius: 40rpx; border-radius: 40rpx;
width: 80rpx; width: 80rpx;

View File

@@ -0,0 +1,32 @@
# H5路由模式修复说明
## 问题描述
生产环境下,导航到子页面(如 `/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`)后刷新页面,会导致页面空白,显示 `<html><head></head><body></body></html>`
## 根本原因
1. 应用使用了H5的`history`路由模式
2. 生产服务器没有配置路由回退机制
3. 刷新时浏览器直接向服务器请求完整URL路径服务器无法找到对应的资源返回空HTML
## 解决方案
将H5路由模式从`history`改为`hash`模式。Hash模式下所有路由请求都会指向应用根路径避免服务器配置问题。
## 修改内容
修改 `manifest.json` 文件中的H5路由配置
```json
"h5": {
"router": {
"mode": "hash", // 从 "history" 改为 "hash"
"base": "/hwappx/test/"
}
}
```
## 预期效果
- 子页面刷新后不再空白
- URL格式变为 `http://domain/hwappx/test/#/pages_tool/form/formdata?id=73&uniacid=2793`
- 无需修改服务器配置
## 构建部署
修改后需要重新构建H5版本并部署到生产环境。可以通过HBuilderX或其他uni-app构建工具进行构建。

View File

@@ -0,0 +1,756 @@
# H5 History模式子目录部署配置指南
## 场景说明
您的uni-app H5应用部署在现有网站的子目录 `/hwappx/test/` 下,需要使用`history`路由模式,并解决刷新页面空白的问题。
## 配置步骤
### 1. 应用配置(已完成)
确保`manifest.json`中的H5路由配置正确设置了`base`路径:
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwappx/test/"
}
}
```
### 2. 服务器配置
服务器需要配置路由回退,将所有指向`/hwappx/test/`下不存在文件的请求重定向到`/hwappx/test/index.html`
#### 2.1 Nginx配置
```nginx
server {
listen 80;
server_name yourdomain.com;
# 主网站根目录
root /path/to/main/website;
index index.html;
# 静态文件直接返回
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
# H5应用子目录的路由回退配置
location /hwappx/test/ {
# 确保静态文件能被正确访问
try_files $uri $uri/ /hwappx/test/index.html;
}
# 主网站的其他配置
location / {
# 主网站的原有配置
}
}
```
#### 2.2 Apache配置
##### .htaccess文件配置放在`/hwappx/test/`目录下)
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</IfModule>
```
##### 虚拟主机配置
```apache
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /path/to/main/website
# H5应用子目录配置
<Directory /path/to/main/website/hwappx/test>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</Directory>
# 主网站目录配置
<Directory /path/to/main/website>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
```
#### 2.3 IIS配置
`/hwappx/test/`目录下创建`web.config`文件:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="History Mode Sub Directory">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/test/index.html" />
</rule>
</rules>
</rewrite>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
```
#### 2.4 Express.js配置
```javascript
const express = require('express');
const path = require('path');
const app = express();
// 主网站静态文件
app.use(express.static(path.join(__dirname, 'main-website')));
// H5应用静态文件和路由回退
app.use('/hwappx/test', express.static(path.join(__dirname, 'h5-app')));
app.get('/hwappx/test/*', (req, res) => {
res.sendFile(path.join(__dirname, 'h5-app', 'index.html'));
});
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
```
## 配置关键点
1. **base路径一致性**
- `manifest.json`中的`base`配置必须与部署路径一致:`/hwappx/test/`
- 服务器配置中的重定向路径必须包含完整的base路径
2. **静态资源处理**
- 确保CSS、JS、图片等静态资源能够被正确访问
- 静态资源的URL应该自动包含base路径
3. **路由回退规则**
- 规则必须限定在`/hwappx/test/`路径下
- 只重定向不存在的文件和目录请求
## 验证方法
1. 构建H5应用并部署到服务器的`/hwappx/test/`目录
2. 访问应用首页:`http://yourdomain.com/hwappx/test/`
3. 导航到子页面:`http://yourdomain.com/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`
4. 刷新页面,验证页面是否正常显示
## 常见问题排查
1. **404错误**
- 检查服务器配置中的重定向路径是否正确
- 确保`base`路径配置一致
2. **页面样式缺失**
- 检查静态资源URL是否包含了正确的base路径
- 确认CSS文件路径是否正确
3. **路由无法跳转**
- 检查`manifest.json`中的路由配置
- 确认服务器重定向规则是否生效
## 部署注意事项
1. 配置完成后需要重启服务器
2. 对于HTTPS站点需要在对应的HTTPS配置中添加相同的规则
3. 如果使用CDN需要确保CDN也配置了相应的路由回退规则
4. 定期检查服务器日志,确保配置正常工作
## 总结
通过正确配置应用的`base`路径和服务器的路由回退规则您的uni-app H5应用可以在子目录`/hwappx/test/`下成功使用`history`路由模式,并且解决刷新页面空白的问题。
---
## 多子目录部署支持
### 场景说明
如果您需要在同一服务器上部署多个使用`history`模式的uni-app H5应用例如
- `/hwapp/`
- `/hwappx/test/`
- `/hwappx/comoon/`
- `/hwappx/1000/`
您可以按照以下配置方法实现多子目录部署。
### 1. 每个应用的manifest.json配置
每个应用都需要在`manifest.json`中配置正确的`base`路径:
#### 应用1部署到 `/hwapp/`
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwapp/"
}
}
```
#### 应用2部署到 `/hwappx/test/`
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwappx/test/"
}
}
```
#### 应用3部署到 `/hwappx/comoon/`
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwappx/comoon/"
}
}
```
#### 应用4部署到 `/hwappx/1000/`
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwappx/1000/"
}
}
```
### 2. 服务器多子目录配置
#### 2.1 Nginx配置
```nginx
server {
listen 80;
server_name yourdomain.com;
root /path/to/main/website;
index index.html;
# 静态文件缓存设置
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
# 应用1: /hwapp/
location /hwapp/ {
try_files $uri $uri/ /hwapp/index.html;
}
# 应用2: /hwappx/test/
location /hwappx/test/ {
try_files $uri $uri/ /hwappx/test/index.html;
}
# 应用3: /hwappx/comoon/
location /hwappx/comoon/ {
try_files $uri $uri/ /hwappx/comoon/index.html;
}
# 应用4: /hwappx/1000/
location /hwappx/1000/ {
try_files $uri $uri/ /hwappx/1000/index.html;
}
# 主网站其他配置
location / {
# 原有主网站配置
}
}
```
#### 2.2 Apache配置
##### 方法1在每个子目录下创建.htaccess文件
`/hwapp/`目录下创建.htaccess
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwapp/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwapp/index.html [L]
</IfModule>
```
`/hwappx/test/`目录下创建.htaccess
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</IfModule>
```
`/hwappx/comoon/`目录下创建.htaccess
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwappx/comoon/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/comoon/index.html [L]
</IfModule>
```
`/hwappx/1000/`目录下创建.htaccess
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwappx/1000/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/1000/index.html [L]
</IfModule>
```
##### 方法2在主配置文件中统一配置
```apache
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /path/to/main/website
# 应用1: /hwapp/
<Directory /path/to/main/website/hwapp>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwapp/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwapp/index.html [L]
</Directory>
# 应用2: /hwappx/test/
<Directory /path/to/main/website/hwappx/test>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</Directory>
# 应用3: /hwappx/comoon/
<Directory /path/to/main/website/hwappx/comoon>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwappx/comoon/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/comoon/index.html [L]
</Directory>
# 应用4: /hwappx/1000/
<Directory /path/to/main/website/hwappx/1000>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwappx/1000/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/1000/index.html [L]
</Directory>
# 主网站目录配置
<Directory /path/to/main/website>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
```
#### 2.3 IIS配置
在每个子目录下创建`web.config`文件:
##### 应用1/hwapp/web.config
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="History Mode hwapp">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwapp/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
##### 应用2/hwappx/test/web.config
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="History Mode hwappx/test">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/test/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
##### 应用3/hwappx/comoon/web.config
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="History Mode hwappx/comoon">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/comoon/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
##### 应用4/hwappx/1000/web.config
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="History Mode hwappx/1000">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/1000/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
#### 2.4 Express.js配置
```javascript
const express = require('express');
const path = require('path');
const app = express();
// 主网站静态文件
app.use(express.static(path.join(__dirname, 'main-website')));
// 应用1: /hwapp/
app.use('/hwapp', express.static(path.join(__dirname, 'h5-app1')));
app.get('/hwapp/*', (req, res) => {
res.sendFile(path.join(__dirname, 'h5-app1', 'index.html'));
});
// 应用2: /hwappx/test/
app.use('/hwappx/test', express.static(path.join(__dirname, 'h5-app2')));
app.get('/hwappx/test/*', (req, res) => {
res.sendFile(path.join(__dirname, 'h5-app2', 'index.html'));
});
// 应用3: /hwappx/comoon/
app.use('/hwappx/comoon', express.static(path.join(__dirname, 'h5-app3')));
app.get('/hwappx/comoon/*', (req, res) => {
res.sendFile(path.join(__dirname, 'h5-app3', 'index.html'));
});
// 应用4: /hwappx/1000/
app.use('/hwappx/1000', express.static(path.join(__dirname, 'h5-app4')));
app.get('/hwappx/1000/*', (req, res) => {
res.sendFile(path.join(__dirname, 'h5-app4', 'index.html'));
});
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
```
### 3. 多子目录部署验证
对于每个应用,执行以下验证步骤:
1. 构建应用并部署到对应的子目录
2. 访问应用首页,例如:`http://yourdomain.com/hwappx/test/`
3. 导航到子页面,例如:`http://yourdomain.com/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`
4. 刷新页面,验证页面是否正常显示
5. 直接访问子页面URL验证是否能正常加载
### 4. 多子目录部署注意事项
1. **路径隔离**:每个应用必须部署在独立的子目录下,避免文件和路由冲突
2. **base一致性**:每个应用的`manifest.json`中的`base`配置必须与部署路径完全一致
3. **服务器规则**:每个子目录都需要独立的路由回退规则
4. **静态资源**确保每个应用的静态资源URL包含了正确的base路径
5. **缓存设置**:可以为不同应用设置不同的缓存策略
6. **日志分离**:建议为不同应用配置独立的访问日志,便于问题排查
### 5. 常见问题排查
1. **应用间冲突**
- 确保每个应用使用独立的子目录
- 检查`base`路径配置是否唯一
2. **路由混乱**
- 验证服务器配置中的重定向路径是否正确
- 检查应用的路由配置是否与其他应用冲突
3. **静态资源404**
- 确认静态资源URL是否包含了正确的base路径
- 检查服务器配置是否正确处理了静态资源请求
4. **配置不生效**
- 配置完成后重启服务器
- 清除浏览器缓存后重试
通过以上配置,您可以在同一服务器上成功部署多个使用`history`模式的uni-app H5应用每个应用都能独立运行并支持刷新操作。
---
## 通配符配置方案
### 场景说明
如果您的子目录有明确的命名规则(如您的`/hwapp/``/hwappx/test/``/hwappx/comoon/``/hwappx/1000/`等),可以使用通配符配置来简化服务器设置,避免为每个子目录手动添加配置。
### 子目录规则分析
根据您的子目录结构,可以分为两类:
1. 一级子目录:`/hwapp/`
2. `/hwappx/`下的所有二级子目录:`/hwappx/*/`
### 服务器通配符配置
#### 1. Nginx配置
使用正则表达式location来匹配子目录模式
```nginx
server {
listen 80;
server_name yourdomain.com;
root /path/to/main/website;
index index.html;
# 静态文件缓存设置
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
# 匹配 /hwapp/ 一级子目录
location = /hwapp/ {
try_files $uri $uri/ /hwapp/index.html;
}
location ~ ^/hwapp/(.*)$ {
try_files $uri $uri/ /hwapp/index.html;
}
# 匹配 /hwappx/ 下的所有二级子目录,如 /hwappx/test/、/hwappx/comoon/、/hwappx/1000/ 等
location ~ ^/hwappx/([^/]+)/(.*)$ {
# 提取子目录名重定向到对应目录的index.html
try_files $uri $uri/ /hwappx/$1/index.html;
}
# 主网站其他配置
location / {
# 原有主网站配置
}
}
```
#### 2. Apache配置
##### 方法1使用RewriteRule的正则表达式
在主网站根目录的`.htaccess`文件中添加:
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
# 匹配 /hwapp/ 一级子目录
RewriteRule ^hwapp/(.*)$ /hwapp/index.html [L]
# 匹配 /hwappx/ 下的所有二级子目录
RewriteRule ^hwappx/([^/]+)/(.*)$ /hwappx/$1/index.html [L]
</IfModule>
```
##### 方法2在虚拟主机配置中使用
```apache
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /path/to/main/website
RewriteEngine On
# 匹配 /hwapp/ 一级子目录
RewriteRule ^/hwapp/(.*)$ /hwapp/index.html [L]
# 匹配 /hwappx/ 下的所有二级子目录
RewriteRule ^/hwappx/([^/]+)/(.*)$ /hwappx/$1/index.html [L]
# 主网站目录配置
<Directory /path/to/main/website>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
```
#### 3. IIS配置
在主网站根目录的`web.config`文件中添加:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- 匹配 /hwapp/ 一级子目录 -->
<rule name="History Mode hwapp Wildcard" stopProcessing="true">
<match url="^hwapp/.*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwapp/index.html" />
</rule>
<!-- 匹配 /hwappx/ 下的所有二级子目录 -->
<rule name="History Mode hwappx Wildcard" stopProcessing="true">
<match url="^hwappx/([^/]+)/.*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/{R:1}/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
#### 4. Express.js配置
```javascript
const express = require('express');
const path = require('path');
const app = express();
// 主网站静态文件
app.use(express.static(path.join(__dirname, 'main-website')));
// 匹配 /hwapp/ 一级子目录
app.use('/hwapp', express.static(path.join(__dirname, 'hwapp')));
app.get('/hwapp/*', (req, res) => {
res.sendFile(path.join(__dirname, 'hwapp', 'index.html'));
});
// 匹配 /hwappx/ 下的所有二级子目录
// 使用路由参数来捕获子目录名
app.get('/hwappx/:subdir/*', (req, res) => {
const subdir = req.params.subdir;
const appPath = path.join(__dirname, `hwappx/${subdir}`);
// 检查应用目录是否存在
const fs = require('fs');
if (fs.existsSync(appPath)) {
res.sendFile(path.join(appPath, 'index.html'));
} else {
res.status(404).send('Application not found');
}
});
// 为 /hwappx/ 下的每个子目录提供静态文件服务
app.use('/hwappx', express.static(path.join(__dirname, 'hwappx')));
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
```
### 通配符配置优势
1. **减少配置量**:无需为每个新子目录手动添加配置
2. **自动适应**:新添加的符合规则的子目录会自动应用路由回退
3. **统一管理**:所有同类应用的配置集中管理,便于维护
4. **规则灵活**:可以根据实际需要调整正则表达式匹配规则
### 通配符配置注意事项
1. **规则顺序**:确保更具体的规则优先于通配符规则
2. **性能考虑**:过于复杂的正则表达式可能影响服务器性能
3. **目录验证**在Express.js等代码级配置中建议添加目录存在性检查
4. **冲突避免**:确保通配符规则不会与主网站或其他应用的路由冲突
5. **测试充分**:配置后要充分测试各种子目录的访问情况
### 验证方法
1. 部署一个符合规则的新子目录应用,如 `/hwappx/newapp/`
2. 访问应用首页:`http://yourdomain.com/hwappx/newapp/`
3. 导航到子页面并刷新,验证是否正常显示
4. 直接访问子页面URL验证是否能正常加载
通过以上通配符配置,您可以轻松管理大量符合规则的子目录应用,避免重复配置工作。

View File

@@ -0,0 +1,140 @@
# H5 History模式服务器路由回退配置指南
## 配置原理
当使用H5的`history`路由模式时所有直接访问的URL如刷新页面都会发送到服务器。服务器需要配置路由回退将所有匹配不到实际文件的请求重定向到应用的`index.html`让客户端路由处理URL。
## 服务器配置示例
### 1. Nginx配置
```nginx
server {
listen 80;
server_name yourdomain.com;
root /path/to/your/h5/dist;
index index.html;
# 静态文件直接返回
location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|woff2)$ {
expires 7d;
add_header Cache-Control "public, no-transform";
}
# 所有其他请求重定向到index.html
location / {
try_files $uri $uri/ /hwappx/test/index.html;
}
}
```
### 2. Apache配置
需要确保启用了`mod_rewrite`模块
#### .htaccess文件配置
```apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</IfModule>
```
#### 虚拟主机配置
```apache
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /path/to/your/h5/dist
<Directory /path/to/your/h5/dist>
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /hwappx/test/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hwappx/test/index.html [L]
</Directory>
</VirtualHost>
```
### 3. Express.js配置
```javascript
const express = require('express');
const path = require('path');
const app = express();
// 静态文件服务
app.use('/hwappx/test/', express.static(path.join(__dirname, 'dist')));
// 路由回退
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
```
### 4. IIS配置
需要安装URL重写模块URL Rewrite Module
#### web.config文件配置
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/hwappx/test/index.html" />
</rule>
</rules>
</rewrite>
<staticContent>
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
</configuration>
```
## 配置要点
1. **base路径设置**:确保服务器配置中的路径与`manifest.json`中的`base`配置一致
```json
"h5": {
"router": {
"mode": "history",
"base": "/hwappx/test/"
}
}
```
2. **静态资源处理**确保图片、CSS、JS等静态文件能够被正确访问
3. **缓存策略**:为静态文件设置合理的缓存过期时间
## 验证配置
1. 部署配置后的应用到服务器
2. 访问应用首页
3. 导航到子页面(如`/hwappx/test/pages_tool/form/formdata?id=73&uniacid=2793`
4. 刷新页面,验证页面是否正常显示
## 注意事项
- 配置完成后需要重启服务器生效
- 确保服务器有权限读取配置文件
- 对于HTTPS站点需要在对应的HTTPS配置中添加相同的路由回退规则
- 如果使用CDN需要确保CDN也配置了相应的路由回退规则

View File

@@ -1,4 +1,18 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: 'Electronic Card' title: 'Electronic Card',
onlineMessage: 'Online Message',
call: 'One-click Call',
copy: 'Copy',
copyFailed: 'Copy Failed',
copySuccess: 'Copy Success',
oneClickNavigation: 'One-click Navigation',
name: 'Name',
contactInfo: 'Contact Info',
messageContent: 'Message Content',
pleaseEnterName: 'Please enter your name',
pleaseEnterMobile: 'Please enter your phone number',
pleaseEnterMessage: 'Please enter your message',
submit: 'Submit',
exclusiveCustomerService: 'Exclusive Customer Service'
} }

View File

@@ -39,10 +39,22 @@ export const lang = {
myRebate: 'Group Rebate', myRebate: 'Group Rebate',
myHongbao: 'My Red Envelopes', myHongbao: 'My Red Envelopes',
myBlindBox: 'My Blind Boxes', myBlindBox: 'My Blind Boxes',
waitpay:'Waitpay', waitpay: 'Waitpay',
waitsend:'Waitsend', waitsend: 'Waitsend',
waitconfirm:'Waitconfirm', waitconfirm: 'Waitconfirm',
activist:'Activist', activist: 'Activist',
completed:'Completed', completed: 'Completed',
// 账户操作
logout: 'Logout',
cancellation: 'Account Cancellation',
logoutTitle: 'Tips',
logoutContent: 'Are you sure you want to log out',
cancellationTitle: 'Risk Warning',
cancellationContent: 'Are you sure you want to cancel your current account?',
// 协议
privacyPolicy: 'Privacy Policy',
registrationAgreement: 'Registration Agreement',
} }

View File

@@ -0,0 +1 @@
export const lang = {}

View File

@@ -1,4 +1,18 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '电子名片' title: '电子名片',
onlineMessage: '在线留言',
call: '一键拨打',
copy: '复制',
copyFailed: '复制失败',
copySuccess: '复制成功',
oneClickNavigation: '一键导航',
name: '姓名',
contactInfo: '联系方式',
messageContent: '留言内容',
pleaseEnterName: '请输入您的姓名',
pleaseEnterMobile: '请输入您的手机号',
pleaseEnterMessage: '请输入留言内容',
submit: '提交',
exclusiveCustomerService: '专属客服'
} }

View File

@@ -1,6 +1,7 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '商品分类', title: '商品分类',
search:'商品搜索', search:'商品搜索',
seeMore : '查看更多' seeMore : '查看更多',
} Make: "询底价"
}

View File

@@ -2,7 +2,7 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '', title: '',
select: '选择', select: '选择',
details:'商品详情', details:'资源详情',
params: '参数', params: '参数',
service: '商品服务', service: '商品服务',
allGoods: '全部商品', allGoods: '全部商品',
@@ -11,7 +11,7 @@ export const lang = {
home:'首页', home:'首页',
cart:'购物车', cart:'购物车',
leave:'立即留言', leave:'立即留言',
make:'立即咨询', make:'联系我们',
send:'配送', send:'配送',
express:'快递发货', express:'快递发货',
@@ -22,7 +22,7 @@ export const lang = {
status:'该商品已下架', status:'该商品已下架',
sellout:'库存不足', sellout:'库存不足',
max:'已达最大限购数量', max:'已达最大限购数量',
makebtn:'咨询', makebtn:'价格电议',
sales:'销量', sales:'销量',
stock:'库存', stock:'库存',
kefu:'客服', kefu:'客服',

View File

@@ -1,11 +1,11 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '商品列表', title: '商品列表',
Random:'综合', Random:'综合',
Sales:'销量', Sales:'销量',
Price:'价格', Price:'价格',
Filter:'筛选', Filter:'筛选',
Search:'请输入您要搜索的商品', Search:'请输入您要搜索的商品',
Make:'咨询', Make:'立即询底价',
} }

View File

@@ -11,6 +11,9 @@ export const lang = {
readyDelivery: '待发货', readyDelivery: '待发货',
waitDelivery: '待收货', waitDelivery: '待收货',
refunding: '退款', refunding: '退款',
getDynacode: '获取动态验证码',
// 会员中心入口 // 会员中心入口
sign: '签到', sign: '签到',
personInfo: '个人资料', personInfo: '个人资料',
@@ -28,13 +31,13 @@ export const lang = {
verification: '核销台', verification: '核销台',
message: '我的消息', message: '我的消息',
exchangeOrder: '积分兑换', exchangeOrder: '积分兑换',
waitpay:'待付款', waitpay: '待付款',
waitsend:'待发货', waitsend: '待发货',
waitconfirm:'待收货', waitconfirm: '待收货',
activist:'售后', activist: '售后',
completed:'已完成', completed: '已完成',
// 推广中心 // 推广中心
balance: '余额', balance: '余额',
point: '积分', point: '积分',
@@ -43,9 +46,19 @@ export const lang = {
myPresale: '我的预售', myPresale: '我的预售',
myGiftcard: '我的礼品卡', myGiftcard: '我的礼品卡',
myDivideticket: '我的瓜分券', myDivideticket: '我的瓜分券',
myRebate:'拼团返利', myRebate: '拼团返利',
myHongbao:'我的红包列表', myHongbao: '我的红包列表',
myBlindBox:'我的盲盒', myBlindBox: '我的盲盒',
// 账户操作
logout: '退出登录',
cancellation: '账号注销',
logoutTitle: '提示',
logoutContent: '确定要退出登录吗',
cancellationTitle: '风险提示',
cancellationContent: '确定要注销当前账号吗?',
// 协议
privacyPolicy: '隐私协议',
registrationAgreement: '注册协议',
} }

View File

@@ -855,6 +855,14 @@
// #endif // #endif
} }
}, },
{
"path": "form/formdata",
"style": {
// #ifdef APP-PLUS
"navigationStyle": "custom"
// #endif
}
},
{ {
"path": "weapp/order_shipping", "path": "weapp/order_shipping",
"style": { "style": {

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="empty" :style="themeColor">
<view class="empty">
</view> </view>
</template> </template>

View File

@@ -1,66 +1,68 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img"> <view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
<view class="site-info-box" class="page-img">
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode"> <view class="site-info-box"
<view class="site-info"> v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
<view class="img-box" v-if="siteInfo.logo_square"> <view class="site-info">
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image> <view class="img-box" v-if="siteInfo.logo_square">
</view> <image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
<view class="info-box" :style="{ color: '#ffffff' }"> </view>
<text class="font-size-base">{{ siteInfo.site_name }}</text> <view class="info-box" :style="{ color: '#ffffff' }">
<text>{{ followOfficialAccount.welcomeMsg }}</text> <text class="font-size-base">{{ siteInfo.site_name }}</text>
<text>{{ followOfficialAccount.welcomeMsg }}</text>
</view>
</view> </view>
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
}}</view>
</view> </view>
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号' }}</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 }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/> <ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
</view> --> </view> -->
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" <diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page"> :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<template v-slot:components> <template v-slot:components>
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
</template>
<template v-slot:default>
<ns-copyright v-show="isShowCopyRight" />
</template>
</diy-index-page>
<view v-else class="bg-index"
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" /> :followOfficialAccount="followOfficialAccount" />
</template>
<template v-slot:default>
<ns-copyright v-show="isShowCopyRight" /> <ns-copyright v-show="isShowCopyRight" />
</template> </view>
</diy-index-page>
<view v-else class="bg-index" <template v-if="adv.advshow != -1">
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }"> <view @touchmove.prevent.stop>
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" <uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
:followOfficialAccount="followOfficialAccount" /> <view class="small-bot">
<ns-copyright v-show="isShowCopyRight" /> <!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
</view>
<template v-if="adv.advshow != -1">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="small-bot">
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
<view bindtap="adverclose">跳过</view> <view bindtap="adverclose">跳过</view>
<view class="time">{{clock}}s</view> <view class="time">{{clock}}s</view>
</view> </view>
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}"> <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
<view class="time" style="line-height: 64rpx;">{{clock}}s</view> <view class="time" style="line-height: 64rpx;">{{clock}}s</view>
</view> --> </view> -->
<swiper autoplay="true" :circular="true" indicator-active-color="#fff" <swiper autoplay="true" :circular="true" indicator-active-color="#fff"
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000"> indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
<swiper-item v-for="(item, index) in adv.list" :key="index"> <swiper-item v-for="(item, index) in adv.list" :key="index">
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%" <image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
:src="$util.img(item.imageUrl)" width="100%"></image> :src="$util.img(item.imageUrl)" width="100%"></image>
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> --> <!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
</swiper-item> </swiper-item>
</swiper> </swiper>
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow"> <view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
<i class="iconfont icon-round-close" style="color:#fff"></i> <i class="iconfont icon-round-close" style="color:#fff"></i>
</view>
</view> </view>
</view> <!-- <view class="image-wrap">
<!-- <view class="image-wrap">
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red"> <swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)"> <swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
<view class="item"> <view class="item">
@@ -70,76 +72,78 @@
</swiper> </swiper>
</view> </view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> --> <text class="iconfont icon-round-close" @click="closePopupWindow"></text> -->
</uni-popup>
</view>
</template>
<!-- 底部tabBar -->
<view class="page-bottom" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" :name="name" />
</view>
<!-- 关注公众号弹窗 -->
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
<uni-popup ref="officialAccountsPopup" type="center">
<view class="official-accounts-wrap">
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
<text class="desc">关注了解更多</text>
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
</view>
</uni-popup> </uni-popup>
</view> </view>
</template>
<!-- 底部tabBar --> <!-- 收藏 -->
<view class="page-bottom" v-if="openBottomNav"> <uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<diy-bottom-nav @callback="callback" :name="name" /> <view v-if="showTip" class="collectPopupWindow"
</view> :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<!-- 关注公众号弹窗 --> <text @click="closeCollectPopupWindow">我知道了</text>
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
<uni-popup ref="officialAccountsPopup" type="center">
<view class="official-accounts-wrap">
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
<text class="desc">关注了解更多</text>
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
</view> </view>
</uni-popup> </uni-popup>
</view>
<!-- 收藏 --> <!-- 选择门店弹出框定位当前位置展示最近的一个门店 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect"> <view @touchmove.prevent.stop class="choose-store">
<view v-if="showTip" class="collectPopupWindow" <uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }"> <view class="choose-store-popup">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" /> <view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
<text @click="closeCollectPopupWindow">我知道了</text> <view class="position-wrap">
</view>
</uni-popup>
<!-- 选择门店弹出框定位当前位置展示最近的一个门店 -->
<view @touchmove.prevent.stop class="choose-store">
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
<view class="choose-store-popup">
<view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
<view class="position-wrap">
<text class="iconfont icon-dizhi"></text>
<text class="address">{{ currentPosition }}</text>
<view class="reposition" @click="reposition"
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
<text class="iconfont icon-dingwei"></text>
<text>重新定位</text>
</view>
</view>
<view class="store-wrap" v-if="nearestStore">
<text class="tag">当前门店</text>
<view class="store-name">{{ nearestStore.store_name }}</view>
<view class="address">{{ nearestStore.show_address }}</view>
<view class="distance" v-if="nearestStore.distance">
<text class="iconfont icon-dizhi"></text> <text class="iconfont icon-dizhi"></text>
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' : nearestStore.distance * <text class="address">{{ currentPosition }}</text>
1000 + <view class="reposition" @click="reposition"
'm' }}</text> v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
<text class="iconfont icon-dingwei"></text>
<text>重新定位</text>
</view>
</view>
<view class="store-wrap" v-if="nearestStore">
<text class="tag">当前门店</text>
<view class="store-name">{{ nearestStore.store_name }}</view>
<view class="address">{{ nearestStore.show_address }}</view>
<view class="distance" v-if="nearestStore.distance">
<text class="iconfont icon-dizhi"></text>
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' :
nearestStore.distance *
1000 +
'm' }}</text>
</view>
</view>
<button type="primary" @click="enterStore">确认进入</button>
<view class="other-store" @click="chooseOtherStore"
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
<text>选择其他门店</text>
<text class="iconfont icon-right"></text>
</view> </view>
</view> </view>
<button type="primary" @click="enterStore">确认进入</button> </uni-popup>
<view class="other-store" @click="chooseOtherStore" </view>
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1"> <hover-nav :need="true"></hover-nav>
<text>选择其他门店</text> <!-- #ifdef MP-WEIXIN -->
<text class="iconfont icon-right"></text> <!-- 小程序隐私协议 -->
</view> <privacy-popup ref="privacyPopup"></privacy-popup>
</view> <!-- #endif -->
</uni-popup> <to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<ns-login ref="login"></ns-login>
</view> </view>
<hover-nav></hover-nav>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<ns-login ref="login"></ns-login>
</view> </view>
</template> </template>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="container"> <view class="container">
<scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh"> <scroll-view class="scroll-view" :scroll-y="true" :show-scrollbar="false" :refresher-enabled="true" :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
<block v-if="hasData"> <block v-if="hasData">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<block v-if="diyData"> <block v-if="diyData">
<block v-for="(item, index) in diyData.value" :key="index"> <block v-for="(item, index) in diyData.value" :key="index">
<view v-if="item.componentName == 'GoodsCategory'"> <view v-if="item.componentName == 'GoodsCategory'">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<!-- #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 File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="content" :style="themeColor">
<view class="content">
<view class="head-wrap"> <view class="head-wrap">
<!-- 搜索区域 --> <!-- 搜索区域 -->
<view class="search-wrap uni-flex uni-row"> <view class="search-wrap uni-flex uni-row">
@@ -63,7 +62,7 @@
<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>
@@ -148,7 +147,7 @@
<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" v-if="item.member_price && item.member_price == showPrice(item)"> <view class="member-price-tag" 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>
@@ -271,6 +270,11 @@
<!-- 小程序隐私协议 --> <!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup> <privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif --> <!-- #endif -->
<!-- 底部tabBar -->
<view id="tab-bar">
<diy-bottom-nav></diy-bottom-nav>
</view>
</view> </view>
</template> </template>

View File

@@ -294,6 +294,8 @@
} }
.lineheight-clear { .lineheight-clear {
display: flex;
justify-content: flex-end;
} }
// 商品列表单列样式 // 商品列表单列样式
@@ -386,12 +388,20 @@
line-height: 1; line-height: 1;
margin-top: 16rpx; margin-top: 16rpx;
background-color: var(--main-color);
border-radius: 35rpx;
padding: 12rpx 24rpx;
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
.unit { .unit {
margin-right: 6rpx; margin-right: 6rpx;
color: var(--price-color); color: var(--price-color);
} }
.price { .price {
color: var(--price-color); color: var(--price-color);
color: #fff !important;
font-size: 15rpx !important;
font-weight: bold !important;
} }
} }

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
<view class="detail-container" :class="{ 'safe-area': isIphoneX }">
<!-- 订单状态 --> <!-- 订单状态 -->
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }"> <view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="order-status-left"> <view class="order-status-left">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
</template> </template>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
</template> </template>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="detail-container" :class="{ 'safe-area': isIphoneX }" :style="themeColor">
<view class="detail-container" :class="{ 'safe-area': isIphoneX }">
<!-- 订单状态 --> <!-- 订单状态 -->
<view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }"> <view class="status-wrap color-base-bg" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/order/status-wrap-bg.png') + ')' }">
<view class="order-status-left"> <view class="order-status-left">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="order-container" :style="themeColor">
<view class="order-container">
<view class="cate-search"> <view class="cate-search">
<view class="search-box"> <view class="search-box">
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" <input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search"

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<common-payment :api="api" create-data-key="orderCreateData" ref="payment"></common-payment> <common-payment :api="api" create-data-key="orderCreateData" ref="payment"></common-payment>
</view> </view>
</template> </template>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="apply" :style="themeColor">
<view class="apply">
<!-- 导航栏 --> <!-- 导航栏 -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="head-nav color-base-bg"></view> <view class="head-nav color-base-bg"></view>

View File

@@ -1,147 +1,163 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="bill" :style="themeColor">
<view class="bill" > <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')" mode="widthFix"></image>
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')" 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> <text>账单编号: {{ item.account_no }}</text>
<text>账单编号: {{ item.account_no }}</text> <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 : item.money }}</text>
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money : 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> </block>
</block> <loading-cover ref="loadingCover"></loading-cover>
<loading-cover ref="loadingCover"></loading-cover> </mescroll-uni>
</mescroll-uni> </view>
</view> </template>
</template>
<script>
<script> import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
export default { import nsLogin from '@/components/ns-login/ns-login.vue';
data() { import loadingCover from '@/components/loading-cover/loading-cover.vue';
return { import nsEmpty from '@/components/ns-empty/ns-empty.vue';
accountList: {}, // #ifdef MP-WEIXIN
showEmpty: true import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
}; // #endif
},
onShow() { export default {
setTimeout( () => { data() {
if (!this.addonIsExist.fenxiao) { return {
this.$util.showToast({ accountList: {},
title: '商家未开启分销', showEmpty: true
mask: true, };
duration: 2000 },
}); components: {
setTimeout(() => { nsLogin,
this.$util.redirectTo('/pages/index/index'); MescrollUni,
}, 2000); loadingCover,
} nsEmpty,
},1000); // #ifdef MP-WEIXIN
}, privacyPopup
methods: { // #endif
getData(mescroll) { },
if (mescroll.num == 1) { onShow() {
this.accountList = []; setTimeout( () => {
} if (!this.addonIsExist.fenxiao) {
this.$api.sendRequest({ this.$util.showToast({
url: '/fenxiao/api/account/page', title: '商家未开启分销',
data: { mask: true,
page: mescroll.num, duration: 2000
page_size: mescroll.size });
}, setTimeout(() => {
success: res => { this.$util.redirectTo('/pages/index/index');
let newArr = []; }, 2000);
let msg = res.message; }
if (res.code == 0 && res.data && res.data.list) { },1000);
newArr = res.data.list; },
} else { methods: {
this.$util.showToast({ getData(mescroll) {
title: msg if (mescroll.num == 1) {
}); this.accountList = [];
} }
mescroll.endSuccess(newArr.length); this.$api.sendRequest({
//设置列表数据 url: '/fenxiao/api/account/page',
if (mescroll.num == 1) this.accountList = []; //如果是第一页需手动制空列表 data: {
this.accountList = this.accountList.concat(newArr); //追加新数据 page: mescroll.num,
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); page_size: mescroll.size
}, },
fail: res => { success: res => {
this.showEmpty = true; let newArr = [];
mescroll.endErr(); let msg = res.message;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (res.code == 0 && res.data && res.data.list) {
} newArr = res.data.list;
}); } else {
} this.$util.showToast({
} title: msg
}; });
</script> }
mescroll.endSuccess(newArr.length);
<style lang="scss"> //设置列表数据
/deep/ .empty { if (mescroll.num == 1) this.accountList = []; //如果是第一页需手动制空列表
margin-top: 0 !important; this.accountList = this.accountList.concat(newArr); //追加新数据
} if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
/deep/ .member-point .mescroll-uni-content { fail: res => {
overflow: hidden; this.showEmpty = true;
} mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
.balances { }
width: calc(100% - 60rpx); });
border-radius: 10rpx; }
margin: 0 auto; }
padding: 27rpx 27rpx; };
box-sizing: border-box; </script>
display: flex;
align-items: flex-start; <style lang="scss">
background: #fff; /deep/ .empty {
margin-bottom: 18rpx; margin-top: 0 !important;
margin-top: 18rpx; }
image { /deep/ .member-point .mescroll-uni-content {
width: 54rpx; overflow: hidden;
height: 54rpx; }
border-radius: 50%;
} .balances {
width: calc(100% - 60rpx);
.balances-info { border-radius: 10rpx;
flex: 1; margin: 0 auto;
margin-left: 16rpx; padding: 27rpx 27rpx;
display: flex; box-sizing: border-box;
flex-direction: column; display: flex;
align-items: flex-start;
text { background: #fff;
line-height: 1; margin-bottom: 18rpx;
margin-top: 18rpx;
&:last-child {
font-size: $font-size-base; image {
} width: 54rpx;
height: 54rpx;
&:nth-child(2) { border-radius: 50%;
margin-top: 18rpx; }
font-size: $font-size-tag;
color: $color-tip; .balances-info {
} flex: 1;
margin-left: 16rpx;
&:nth-child(3) { display: flex;
font-size: $font-size-tag; flex-direction: column;
margin-top: 19rpx;
color: $color-tip; text {
} line-height: 1;
}
} &:last-child {
font-size: $font-size-base;
.balances-num { }
text {
line-height: 1; &:nth-child(2) {
font-size: $font-size-toolbar; margin-top: 18rpx;
color: #000; font-size: $font-size-tag;
} color: $color-tip;
} }
}
</style> &:nth-child(3) {
font-size: $font-size-tag;
margin-top: 19rpx;
color: $color-tip;
}
}
}
.balances-num {
text {
line-height: 1;
font-size: $font-size-toolbar;
color: #000;
}
}
}
</style>

View File

@@ -1,289 +1,310 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <mescroll-uni ref="mescroll" @getData="getData" top="0" class="member-point" :size="8" v-if="storeToken">
<mescroll-uni ref="mescroll" @getData="getData" top="0" class="member-point" :size="8" v-if="storeToken"> <block slot="list">
<block slot="list"> <view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0"
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)"> @click="toFenxiaoOrder(item)">
<view class="li-box" :class="{ active: index + 1 == teamList.length }"> <view class="li-box" :class="{ active: index + 1 == teamList.length }">
<image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)" mode="aspectFill"></image> <image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)"
<image v-else :src="$util.getDefaultImage().head"></image> mode="aspectFill"></image>
<view class="member-info"> <image v-else :src="$util.getDefaultImage().head"></image>
<view class="member-name"> <view class="member-info">
<view class="left"> <view class="member-name">
<view class="flex-box"> <view class="left">
<view class="name">{{ item.nickname }}</view> <view class="flex-box">
<view v-if="item.level_name" class="title color-base-border color-base-text">{{ item.level_name }}</view> <view class="name">{{ item.nickname }}</view>
</view> <view v-if="item.level_name" class="title color-base-border color-base-text">{{
<view class="color-tip font-size-goods-tag">加入时间{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view> item.level_name }}</view>
</view> </view>
<view class="consume-info"> <view class="color-tip font-size-goods-tag">加入时间{{
<view><text>{{ item.one_child_fenxiao_num + item.one_child_num }}</text> </view> $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
<view><text>{{ item.order_num }}</text> </view> </view>
<view><text>{{ item.order_money|moneyFormat }}</text> </view> <view class="consume-info">
</view> <view><text>{{ item.one_child_fenxiao_num + item.one_child_num }}</text> </view>
</view> <view><text>{{ item.order_num }}</text> </view>
</view> <view><text>{{ item.order_money | moneyFormat }}</text> </view>
</view> </view>
</view> </view>
<block v-if="teamList.length == 0 && emptyShow"> </view>
<ns-empty text="暂无数据" :isIndex="false"></ns-empty> </view>
</block> </view>
</block> <block v-if="teamList.length == 0 && emptyShow">
</mescroll-uni> <ns-empty text="暂无数据" :isIndex="false"></ns-empty>
</block>
<ns-login ref="login"></ns-login> </block>
<loading-cover ref="loadingCover"></loading-cover> </mescroll-uni>
</view>
</template> <ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
<script> </view>
import fenxiaoWords from 'common/js/fenxiao-words.js'; </template>
export default { <script>
data() { import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
return { import nsLogin from '@/components/ns-login/ns-login.vue';
teamList: [], import loadingCover from '@/components/loading-cover/loading-cover.vue';
emptyShow: false, import nsEmpty from '@/components/ns-empty/ns-empty.vue';
}; // #ifdef MP-WEIXIN
}, import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
mixins: [fenxiaoWords], // #endif
onShow() { import fenxiaoWords from 'common/js/fenxiao-words.js';
setTimeout( () => {
if (!this.addonIsExist.fenxiao) { export default {
this.$util.showToast({ data() {
title: '商家未开启分销', return {
mask: true, teamList: [],
duration: 2000 emptyShow: false,
}); };
setTimeout(() => { },
this.$util.redirectTo('/pages/index/index'); components: {
}, 2000); nsLogin,
} MescrollUni,
},1000); loadingCover,
nsEmpty,
if (!this.storeToken) { // #ifdef MP-WEIXIN
this.$nextTick(() => { privacyPopup
this.$refs.login.open('/pages_promotion/fenxiao/childfenxiao'); // #endif
}); },
} mixins: [fenxiaoWords],
}, onShow() {
methods: { setTimeout(() => {
getData(mescroll) { if (!this.addonIsExist.fenxiao) {
this.emptyShow = false; this.$util.showToast({
if (mescroll.num == 1) { title: '商家未开启分销',
this.teamList = []; mask: true,
} duration: 2000
this.$api.sendRequest({ });
url: '/fenxiao/api/fenxiao/childfenxiao', setTimeout(() => {
data: { this.$util.redirectTo('/pages/index/index');
page_size: mescroll.size, }, 2000);
page: mescroll.num }
}, }, 1000);
success: res => {
this.emptyShow = true; if (!this.storeToken) {
let newArr = []; this.$nextTick(() => {
let msg = res.message; this.$refs.login.open('/pages_promotion/fenxiao/childfenxiao');
if (res.code == 0 && res.data) { });
newArr = res.data.list; }
} else { },
this.$util.showToast({ methods: {
title: msg getData(mescroll) {
}); this.emptyShow = false;
} if (mescroll.num == 1) {
mescroll.endSuccess(newArr.length); this.teamList = [];
//设置列表数据 }
if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表 this.$api.sendRequest({
this.teamList = this.teamList.concat(newArr); //追加新数据 url: '/fenxiao/api/fenxiao/childfenxiao',
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); data: {
}, page_size: mescroll.size,
fail: res => { page: mescroll.num
mescroll.endErr(); },
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); success: res => {
} this.emptyShow = true;
}); let newArr = [];
}, let msg = res.message;
imageError(e) { if (res.code == 0 && res.data) {
this.teamList[e].headimg = this.$util.getDefaultImage().head; newArr = res.data.list;
this.$forceUpdate(); } else {
}, this.$util.showToast({
toFenxiaoOrder(item) { title: msg
if (item.fenxiao_id) { });
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id }); }
} else { mescroll.endSuccess(newArr.length);
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id }); //设置列表数据
} if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表
} this.teamList = this.teamList.concat(newArr); //追加新数据
}, if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
watch: { },
storeToken: function(nVal, oVal) { fail: res => {
if (nVal) { mescroll.endErr();
this.$refs.mescroll.refresh(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
} });
} },
}; imageError(e) {
</script> this.teamList[e].headimg = this.$util.getDefaultImage().head;
this.$forceUpdate();
<style lang="scss"> },
.team-cate { toFenxiaoOrder(item) {
padding: 0 30rpx; if (item.fenxiao_id) {
width: calc(100%); this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id });
height: 90rpx; } else {
display: flex; this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id });
box-sizing: border-box; }
background: #ffffff; }
position: fixed; },
left: 0; watch: {
top: var(--window-top); storeToken: function (nVal, oVal) {
if (nVal) {
.cate-li { this.$refs.mescroll.refresh();
flex: 1; }
justify-content: center; }
text-align: center; }
align-items: center; };
display: inline-block; </script>
line-height: 90rpx;
height: 100%; <style lang="scss">
font-size: 30rpx; .team-cate {
padding: 0 30rpx;
&.active { width: calc(100%);
box-sizing: border-box; height: 90rpx;
border-bottom: 4rpx solid; display: flex;
} box-sizing: border-box;
} background: #ffffff;
} position: fixed;
left: 0;
.team-member { top: var(--window-top);
width: 100%;
height: 70rpx; .cate-li {
line-height: 70rpx; flex: 1;
color: $color-tip; justify-content: center;
padding: 0 $padding; text-align: center;
box-sizing: border-box; align-items: center;
} display: inline-block;
line-height: 90rpx;
.team-li { height: 100%;
margin: $margin-updown $margin-both; font-size: 30rpx;
padding: $margin-both;
box-sizing: border-box; &.active {
background: #fff; box-sizing: border-box;
margin-bottom: 20rpx; border-bottom: 4rpx solid;
border-radius: 10rpx; }
}
.li-box { }
display: flex;
box-sizing: border-box; .team-member {
align-items: center; width: 100%;
height: 70rpx;
image { line-height: 70rpx;
width: 90rpx; color: $color-tip;
height: 90rpx; padding: 0 $padding;
border-radius: 50%; box-sizing: border-box;
} }
.member-info { .team-li {
flex: 1; margin: $margin-updown $margin-both;
padding-left: $padding; padding: $margin-both;
box-sizing: border-box; box-sizing: border-box;
display: flex; background: #fff;
flex-direction: column; margin-bottom: 20rpx;
justify-content: center; border-radius: 10rpx;
.member-name { .li-box {
display: flex; display: flex;
justify-content: space-between; box-sizing: border-box;
align-items: center; align-items: center;
font-size: $font-size-base;
image {
.left { width: 90rpx;
width: 0; height: 90rpx;
flex: 1; border-radius: 50%;
}
.flex-box {
display: flex; .member-info {
align-items: center; flex: 1;
margin-bottom: 6rpx; padding-left: $padding;
} box-sizing: border-box;
display: flex;
.name { flex-direction: column;
overflow: hidden; justify-content: center;
text-overflow: ellipsis;
white-space: nowrap; .member-name {
line-height: 1; display: flex;
} justify-content: space-between;
align-items: center;
.title { font-size: $font-size-base;
padding: 4rpx 16rpx;
justify-content: center; .left {
align-items: center; width: 0;
text-align: center; flex: 1;
font-size: $font-size-activity-tag;
border-radius: 4rpx; .flex-box {
margin-left: 10rpx; display: flex;
line-height: 1; align-items: center;
border: 2rpx solid; margin-bottom: 6rpx;
color: #fff; }
}
} .name {
overflow: hidden;
.consume-info { text-overflow: ellipsis;
text-align: right; white-space: nowrap;
line-height: 1;
text { }
margin-right: 6rpx;
} .title {
padding: 4rpx 16rpx;
view { justify-content: center;
line-height: 1.5; align-items: center;
font-size: 24rpx; text-align: center;
} font-size: $font-size-activity-tag;
} border-radius: 4rpx;
} margin-left: 10rpx;
line-height: 1;
.member-date { border: 2rpx solid;
display: flex; color: #fff;
justify-content: space-between; }
align-items: center; }
margin-top: $padding;
.consume-info {
view { text-align: right;
width: 50%;
height: 100%; text {
text-align: left; margin-right: 6rpx;
line-height: 1; }
text { view {
font-size: $font-size-tag; line-height: 1.5;
color: $color-tip; font-size: 24rpx;
} }
}
.tit { }
color: $color-tip;
} .member-date {
} display: flex;
} justify-content: space-between;
} align-items: center;
margin-top: $padding;
.btn-see {
display: flex; view {
flex-direction: row-reverse; width: 50%;
} height: 100%;
} text-align: left;
.order-box-btn { line-height: 1;
display: inline-block;
line-height: 56rpx; text {
padding: 0 30rpx; font-size: $font-size-tag;
font-size: 26rpx; color: $color-tip;
color: #303133; }
border: 2rpx solid #999;
-webkit-box-sizing: border-box; .tit {
box-sizing: border-box; color: $color-tip;
-webkit-border-radius: $border-radius; }
border-radius: $border-radius; }
margin-top: 30rpx; }
} }
.li-box.active {
border: none; .btn-see {
} display: flex;
} flex-direction: row-reverse;
</style> }
}
.order-box-btn {
display: inline-block;
line-height: 56rpx;
padding: 0 30rpx;
font-size: 26rpx;
color: #303133;
border: 2rpx solid #999;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: $border-radius;
border-radius: $border-radius;
margin-top: 30rpx;
}
.li-box.active {
border: none;
}
}
</style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="content" :style="themeColor">
<view class="content">
<mescroll-uni ref="mescroll" @getData="getGoodsList"> <mescroll-uni ref="mescroll" @getData="getGoodsList">
<block slot="list"> <block slot="list">
<view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }"> <view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
@@ -133,10 +132,26 @@
</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 list from './public/js/goods_list.js'; import list from './public/js/goods_list.js';
import fenxiaoWords from 'common/js/fenxiao-words.js'; import fenxiaoWords from 'common/js/fenxiao-words.js';
export default { export default {
components: {
nsLogin,
MescrollUni,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
mixins: [list, fenxiaoWords] mixins: [list, fenxiaoWords]
}; };
</script> </script>

File diff suppressed because it is too large Load Diff

View File

@@ -1,320 +1,319 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container"> <view class="level-top">
<view class="level-top"> <image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image> </view>
</view>
<swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx" @change="swiperChange" :current="curr">
<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">
<swiper-item v-for="(item, index) in levelList" :key="index"> <view class="level-item" :class="{'curr': index == curr}">
<view class="level-item" :class="{'curr': index == curr}"> <view class="level-wrap">
<view class="level-wrap"> <view class="member-info">
<view class="member-info"> <view class="head-img">
<view class="head-img"> <image :src="fenxiaoInfo.headimg ? $util.img(fenxiaoInfo.headimg) : $util.getDefaultImage().head" @error="fenxiaoInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
<image :src="fenxiaoInfo.headimg ? $util.img(fenxiaoInfo.headimg) : $util.getDefaultImage().head" @error="fenxiaoInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"/> </view>
</view> <view class="nickname">{{ fenxiaoInfo.nickname }}</view>
<view class="nickname">{{ fenxiaoInfo.nickname }}</view> <view class="level-name">{{ item.level_name }}</view>
<view class="level-name">{{ item.level_name }}</view> </view>
</view> <view class="level-rate">
<view class="level-rate"> <view class="rate-item" v-if="config.level > 0">
<view class="rate-item" v-if="config.level > 0"> <view class="title">一级分佣比率</view>
<view class="title">一级分佣比率</view> <view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view>
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view> </view>
</view> <view class="rate-item" v-if="config.level > 1">
<view class="rate-item" v-if="config.level > 1"> <view class="title">二级分佣比率</view>
<view class="title">二级分佣比率</view> <view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view>
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view> </view>
</view> <view class="rate-item" v-if="config.level > 2">
<view class="rate-item" v-if="config.level > 2"> <view class="title">三级分佣比率</view>
<view class="title">三级分佣比率</view> <view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view>
<view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view> </view>
</view> </view>
</view>
<view class="not-unlocked" v-if="item.level_num > fenxiaoInfo.level_num">
<view class="not-unlocked" v-if="item.level_num > fenxiaoInfo.level_num"> <text class="iconfont icon-suoding"></text>
<text class="iconfont icon-suoding"></text> </view>
</view> </view>
</view> </view>
</view> </swiper-item>
</swiper-item> </swiper>
</swiper>
<view class="level-condition" v-if="levelInfo">
<view class="level-condition" v-if="levelInfo"> <view class="condition-title">
<view class="condition-title"> <view class="title">快速升级技巧</view>
<view class="title">快速升级技巧</view> <view class="rate price-font">
<view class="rate price-font"> <text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}</text>
<text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}</text> <text class="num">/{{ levelInfo.task_num }}</text>
<text class="num">/{{ levelInfo.task_num }}</text> </view>
</view> </view>
</view> <view class="task">
<view class="task"> <view class="task-item" v-for="(item, index) in levelInfo.task" :key="index">
<view class="task-item" v-for="(item, index) in levelInfo.task" :key="index"> <view class="flex-box">
<view class="flex-box"> <view class="title">
<view class="title"> {{item.title}}
{{item.title}} <text class="iconfont icon-wenxiao" @click="openTips(item)"></text>
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text> </view>
</view> <view class="status" :class="{'complete': item.progress == 100}">
<view class="status" :class="{'complete': item.progress == 100}"> {{ item.progress == 100 ? '已完成' : '未完成' }}</view>
{{ item.progress == 100 ? '已完成' : '未完成' }}</view> </view>
</view> <view class="progress">
<view class="progress"> <progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /> </view>
</view> <view class="flex-box">
<view class="flex-box"> <view class="desc">{{item.desc}}</view>
<view class="desc">{{item.desc}}</view> <view class="rate price-font">
<view class="rate price-font"> <text class="complete">{{ item.value }}</text>
<text class="complete">{{ item.value }}</text> <text class="num">/{{ item.condition }}</text>
<text class="num">/{{ item.condition }}</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<uni-popup type="bottom" ref="tips">
<uni-popup type="bottom" ref="tips"> <view class="popup">
<view class="popup"> <view class="popup-header">
<view class="popup-header"> <text class="tit">提示</text>
<text class="tit">提示</text> <text class="iconfont icon-close" @click="$refs.tips.close()"></text>
<text class="iconfont icon-close" @click="$refs.tips.close()"></text> </view>
</view> <view class="popup-body">
<view class="popup-body"> <view>{{ tips }}</view>
<view>{{ tips }}</view> <view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view> </view>
</view> </view>
</view> </uni-popup>
</uni-popup>
<ns-goods-recommend route="fenxiao_level"></ns-goods-recommend>
<ns-goods-recommend route="fenxiao_level"></ns-goods-recommend> <loading-cover ref="loadingCover"></loading-cover>
<loading-cover ref="loadingCover"></loading-cover> </view>
</view> </template>
</template>
<script>
<script> import fenxiaoWords from 'common/js/fenxiao-words.js';
import fenxiaoWords from 'common/js/fenxiao-words.js'; export default {
export default { data() {
data() { return {
return { fenxiaoInfo: {
fenxiaoInfo: { condition: {
condition: { last_level: null
last_level: null }
} },
}, config: {},
config: {}, levelList: [],
levelList: [], curr: 0,
curr: 0, tips: ''
tips: '' };
}; },
}, mixins: [fenxiaoWords],
mixins: [fenxiaoWords], computed: {
computed: { levelInfo() {
levelInfo() { if (this.levelList.length) {
if (this.levelList.length) { let level = this.levelList[this.curr];
let level = this.levelList[this.curr]; level.task = [];
level.task = []; level.complete = 0;
level.complete = 0;
if (level.one_fenxiao_order_num > 0) {
if (level.one_fenxiao_order_num > 0) { let task = {
let task = { title: '下级消费',
title: '下级消费', desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单', tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到'+ level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到'+ level.one_fenxiao_order_num + '单', condition: level.one_fenxiao_order_num,
condition: level.one_fenxiao_order_num, value: this.fenxiaoInfo.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)
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;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.one_fenxiao_total_order > 0) {
if (level.one_fenxiao_total_order > 0) { let task = {
let task = { title: '下级消费',
title: '下级消费', desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元', tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到'+ this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到'+ this.moneyFormat(level.one_fenxiao_total_order) + '元', condition: this.moneyFormat(level.one_fenxiao_total_order),
condition: this.moneyFormat(level.one_fenxiao_total_order), value: this.fenxiaoInfo.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)
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)
.toFixed(2) }
} if (task.progress == 100) level.complete += 1;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.one_fenxiao_order_money > 0) {
if (level.one_fenxiao_order_money > 0) { let task = {
let task = { title: '下级消费',
title: '下级消费', desc: '下级消费产生佣金总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
desc: '下级消费产生佣金总额' + this.moneyFormat(level.one_fenxiao_order_money) + '元', tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到'+ this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到'+ this.moneyFormat(level.one_fenxiao_order_money) + '元', condition: this.moneyFormat(level.one_fenxiao_order_money),
condition: this.moneyFormat(level.one_fenxiao_order_money), value: this.fenxiaoInfo.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)
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)
.toFixed(2) }
} if (task.progress == 100) level.complete += 1;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.order_num > 0) {
if (level.order_num > 0) { let task = {
let task = { title: '自身消费',
title: '自身消费', desc: '自身消费单数满' + level.order_num + '单',
desc: '自身消费单数满' + level.order_num + '单', tips: '分销商自己购买的订单次数达到'+ level.order_num + '单',
tips: '分销商自己购买的订单次数达到'+ level.order_num + '单', condition: level.order_num,
condition: level.order_num, value: this.fenxiaoInfo.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)
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;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.order_money > 0) {
if (level.order_money > 0) { let task = {
let task = { title: '自身消费',
title: '自身消费', desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元', tips: '分销商自己购买的订单总额满'+ this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额满足'+ this.moneyFormat(level.order_money) + '元', condition: this.moneyFormat(level.order_money),
condition: this.moneyFormat(level.order_money), value: this.fenxiaoInfo.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)
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;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.one_child_num > 0) {
if (level.one_child_num > 0) { let task = {
let task = { title: '邀请好友',
title: '邀请好友', desc: '邀请好友人数达到' + level.one_child_num + '人',
desc: '邀请好友人数达到' + level.one_child_num + '人', tips: '分销商的直属下级会员人数达到'+level.one_child_num+'人(包含已经申请成为分销商的)',
tips: '分销商的直属下级会员人数达到'+level.one_child_num+'人(包含已经申请成为分销商的)', condition: level.one_child_num,
condition: level.one_child_num, value: this.fenxiaoInfo.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)
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;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} if (level.one_child_fenxiao_num > 0) {
if (level.one_child_fenxiao_num > 0) { let task = {
let task = { title: '邀请好友',
title: '邀请好友', desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人', tips: '分销商的直属下级分销商人数达到'+ level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数达到'+ level.one_child_fenxiao_num + '人', condition: level.one_child_fenxiao_num,
condition: level.one_child_fenxiao_num, value: this.fenxiaoInfo.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)
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;
if (task.progress == 100) level.complete += 1; level.task.push(task);
level.task.push(task); }
} level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length; return level;
return level; }
} }
} },
}, onLoad() {},
onLoad() {}, onShow() {
onShow() { setTimeout( () => {
setTimeout( () => { if (!this.addonIsExist.fenxiao) {
if (!this.addonIsExist.fenxiao) { this.$util.showToast({
this.$util.showToast({ title: '商家未开启分销',
title: '商家未开启分销', mask: true,
mask: true, duration: 2000
duration: 2000 });
}); setTimeout(() => {
setTimeout(() => { this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo('/pages/index/index'); }, 2000);
}, 2000); }
} },1000);
},1000);
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
if (this.storeToken) {
if (this.storeToken) { this.getFenxiaoInfo();
this.getFenxiaoInfo(); this.getBasicsConfig();
this.getBasicsConfig(); } else {
} else { this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_promotion/fenxiao/level'
back: '/pages_promotion/fenxiao/level' });
}); }
} },
}, methods: {
methods: { /**
/** * 获取分销等级信息
* 获取分销等级信息 */
*/ getFenxiaoLevel() {
getFenxiaoLevel() { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/Level/lists',
url: '/fenxiao/api/Level/lists', success: res => {
success: res => { if (res.code == 0 && res.data) {
if (res.code == 0 && res.data) { this.levelList = res.data;
this.levelList = res.data; this.levelList.forEach((item, index) => {
this.levelList.forEach((item, index) => { if (item.level_id == this.fenxiaoInfo.level_id) this.curr = index;
if (item.level_id == this.fenxiaoInfo.level_id) this.curr = index; })
}) }
} }
} });
}); },
}, /**
/** * 获取分销商信息
* 获取分销商信息 */
*/ getFenxiaoInfo() {
getFenxiaoInfo() { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/fenxiao/detail',
url: '/fenxiao/api/fenxiao/detail', success: res => {
success: res => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (res.code >= 0 && res.data) {
if (res.code >= 0 && res.data) { this.fenxiaoInfo = res.data;
this.fenxiaoInfo = res.data; this.curr = this.fenxiaoInfo.level_num;
this.curr = this.fenxiaoInfo.level_num; this.getFenxiaoLevel();
this.getFenxiaoLevel(); } else {
} else { this.$util.redirectTo('/pages_promotion/fenxiao/apply');
this.$util.redirectTo('/pages_promotion/fenxiao/apply'); }
} },
}, fail: () => {
fail: () => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }
} });
}); },
}, /**
/** * 获取分销基本配置
* 获取分销基本配置 */
*/ getBasicsConfig() {
getBasicsConfig() { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/config/basics',
url: '/fenxiao/api/config/basics', success: res => {
success: res => { if (res.code >= 0) {
if (res.code >= 0) { this.config = res.data;
this.config = res.data; }
} }
} });
}); },
}, swiperChange(e) {
swiperChange(e) { this.curr = e.detail.current;
this.curr = e.detail.current; },
}, moneyFormat(money) {
moneyFormat(money) { if (isNaN(parseFloat(money))) return money;
if (isNaN(parseFloat(money))) return money; return parseFloat(money).toFixed(2);
return parseFloat(money).toFixed(2); },
}, openTips(data) {
openTips(data) { this.tips = data.tips;
this.tips = data.tips; this.$refs.tips.open();
this.$refs.tips.open(); }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> @import './public/css/level.scss';
@import './public/css/level.scss'; </style>
</style> <style scoped lang="scss">
<style scoped 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; }
}
/deep/ .uni-popup {
/deep/ .uni-popup { z-index: 8;
z-index: 8; }
}
/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>

View File

@@ -1,203 +1,218 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <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" :class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}</view>
<view @click="selectCate(item.id)" class="cate-li" :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" @click="toDetail(orderItem.fenxiao_order_id)">
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex" @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" v-else-if="orderItem.is_settlement == 1">结算</text>
<text class="status-name color-text-green" 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' })" @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })" @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">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color price-style small">{{ $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" >{{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text> <text class="price-color price-style small">.{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</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>
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text> <text class="price-color price-style large" >{{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
<text class="price-color price-style large" >{{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text> <text class="unit price-style small">.{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}</text>
<text class="unit price-style small">.{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}</text> </view>
</view> <view>
<view> <text>
<text> <text class="iconfont icon-close"></text>
<text class="iconfont icon-close"></text> {{ orderItem.num }}
{{ orderItem.num }} </text>
</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="order-footer">
<view class="order-footer"> <view class="order-base-info active">
<view class="order-base-info active"> <view class="order-type ">
<view class="order-type "> <text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text>
<text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text> <!-- <text>{{ fenxiaoWords.account }}金额</text>
<!-- <text>{{ fenxiaoWords.account }}金额</text> <text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> --> </view>
</view> <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" >{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
<text class="price-color font-size-toolbar" >{{ 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" v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty text="暂无订单" :isIndex="false" 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" v-if="selectId == 1 && 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 == 2 && 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 == 3 && orderList.length == 0 && emptyShow"></ns-empty> </view>
</view> </view>
</view> </mescroll-uni>
</mescroll-uni>
<ns-login ref="login"></ns-login>
<ns-login ref="login"></ns-login> <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 fenxiaoWords from 'common/js/fenxiao-words.js'; import nsLogin from '@/components/ns-login/ns-login.vue';
export default { import loadingCover from '@/components/loading-cover/loading-cover.vue';
data() { import nsEmpty from '@/components/ns-empty/ns-empty.vue';
return { // #ifdef MP-WEIXIN
category: [ import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
{ // #endif
id: 0, import fenxiaoWords from 'common/js/fenxiao-words.js';
name: '全部', export default {
number: 2 components: {
}, nsLogin,
{ MescrollUni,
id: 1, loadingCover,
name: '待结算', nsEmpty,
number: 0 // #ifdef MP-WEIXIN
}, privacyPopup
{ // #endif
id: 2, },
name: '已结算', data() {
number: 0 return {
}, category: [
{ {
id: 3, id: 0,
name: '已退款', name: '全部',
number: 0 number: 2
} },
], {
selectId: 0, id: 1,
orderList: [], name: '待结算',
emptyShow: false, number: 0
fenxiaoId: '', },
subMemberId: '' {
}; id: 2,
}, name: '已结算',
mixins: [fenxiaoWords], number: 0
onLoad(option) { },
if (option.type != undefined) this.selectId = option.type; {
}, id: 3,
onShow() { name: '已退款',
setTimeout( () => { number: 0
if (!this.addonIsExist.fenxiao) { }
this.$util.showToast({ ],
title: '商家未开启分销', selectId: 0,
mask: true, orderList: [],
duration: 2000 emptyShow: false,
}); fenxiaoId: '',
setTimeout(() => { subMemberId: ''
this.$util.redirectTo('/pages/index/index'); };
}, 2000); },
} mixins: [fenxiaoWords],
},1000); onLoad(option) {
if (option.type != undefined) this.selectId = option.type;
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单'); },
onShow() {
if (!this.storeToken) { setTimeout( () => {
this.$nextTick(() => { if (!this.addonIsExist.fenxiao) {
this.$refs.login.open('/pages_promotion/fenxiao/order'); this.$util.showToast({
}); title: '商家未开启分销',
} mask: true,
}, duration: 2000
methods: { });
//获得列表数据 setTimeout(() => {
getData(mescroll) { this.$util.redirectTo('/pages/index/index');
this.emptyShow = false; }, 2000);
if (mescroll.num == 1) { }
this.orderList = []; },1000);
}
this.$api.sendRequest({ if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
url: '/fenxiao/api/order/page',
data: { if (!this.storeToken) {
page: mescroll.num, this.$nextTick(() => {
page_size: mescroll.size, this.$refs.login.open('/pages_promotion/fenxiao/order');
is_settlement: this.selectId });
}, }
success: res => { },
this.emptyShow = true; methods: {
let newArr = []; //获得列表数据
let msg = res.message; getData(mescroll) {
if (res.code == 0 && res.data && res.data.list) { this.emptyShow = false;
newArr = res.data.list; if (mescroll.num == 1) {
} else { this.orderList = [];
this.$util.showToast({ title: res.message }); }
} this.$api.sendRequest({
mescroll.endSuccess(newArr.length); url: '/fenxiao/api/order/page',
//设置列表数据 data: {
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表 page: mescroll.num,
this.orderList = this.orderList.concat(newArr); //追加新数据 page_size: mescroll.size,
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); is_settlement: this.selectId
}, },
fail: res => { success: res => {
mescroll.endErr(); this.emptyShow = true;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); let newArr = [];
} let msg = res.message;
}); if (res.code == 0 && res.data && res.data.list) {
}, newArr = res.data.list;
selectCate(e) { } else {
this.selectId = e; this.$util.showToast({ title: res.message });
this.$refs.mescroll.refresh(); }
}, mescroll.endSuccess(newArr.length);
toDetail(e) { //设置列表数据
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
id: e this.orderList = this.orderList.concat(newArr); //追加新数据
}); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
imageError(index) { fail: res => {
this.orderList[index].sku_image = this.$util.getDefaultImage().goods; mescroll.endErr();
this.$forceUpdate(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}, });
watch: { },
storeToken: function(nVal, oVal) { selectCate(e) {
if (nVal) { this.selectId = e;
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
} },
} toDetail(e) {
} this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
}; id: e
</script> });
},
<style lang="scss"> imageError(index) {
@import './public/css/order.scss'; this.orderList[index].sku_image = this.$util.getDefaultImage().goods;
</style> this.$forceUpdate();
}
},
watch: {
storeToken: function(nVal, oVal) {
if (nVal) {
this.$refs.mescroll.refresh();
}
}
}
};
</script>
<style lang="scss">
@import './public/css/order.scss';
</style>

View File

@@ -1,378 +1,377 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <view class="order-detail">
<view class="order-detail"> <view class="order-detail-box">
<view class="order-detail-box"> <view class="header">
<view class="header"> <view class="title">
<view class="title"> <text>{{ orderData.num }}件商品</text>
<text>{{ orderData.num }}件商品</text> </view>
</view> <text class="color-base-text font-size-tag" v-if="orderData.is_refund == 1">已退款</text>
<text class="color-base-text font-size-tag" v-if="orderData.is_refund == 1">退款</text> <text class="color-base-text font-size-tag" v-else-if="orderData.is_settlement == 1">结算</text>
<text class="color-base-text font-size-tag" v-else-if="orderData.is_settlement == 1">结算</text> <text class="color-base-text font-size-tag" v-else>结算</text>
<text class="color-base-text font-size-tag" v-else>待结算</text> </view>
</view> <view class="detail-body">
<view class="detail-body"> <view class="detail-body-box">
<view class="detail-body-box"> <view class="goods-image"><image :src="$util.img(orderData.sku_image, { size: 'mid' })" @error="imageError()" mode="aspectFill"></image></view>
<view class="goods-image"><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" >{{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}</text>
<text class="price-color font-size-toolbar" >{{ 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> <text>
<text> <text class="iconfont icon-close"></text>
<text class="iconfont icon-close"></text> {{ orderData.num }}
{{ orderData.num }} </text>
</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="detail-footer">
<view class="detail-footer"> <text></text>
<text></text> <text>
<text> <text>合计</text>
<text>合计</text> <text class="price-color total">{{ orderData.real_goods_money }}</text>
<text class="price-color total">{{ orderData.real_goods_money }}</text> </text>
</text> </view>
</view> </view>
</view> <view class="order-detail-box commission">
<view class="order-detail-box commission"> <view class="header">
<view class="header"> <view class="title color-base-bg-before"><text>返佣详情</text></view>
<view class="title color-base-bg-before"><text>返佣详情</text></view> <text class="color-base-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text>
<text class="color-base-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</text> </view>
</view> <view class="detail-content">
<view class="detail-content"> <view class="order-info-item">
<view class="order-info-item"> <text class="tit">订单编号</text>
<text class="tit">订单编号</text> <text>{{ orderData.order_no }}</text>
<text>{{ orderData.order_no }}</text> </view>
</view> <view class="order-info-item">
<view class="order-info-item"> <text class="tit">分佣层级</text>
<text class="tit">分佣层级</text> <text>{{ orderData.commission_level }}</text>
<text>{{ orderData.commission_level }}</text> </view>
</view> <view class="order-info-item">
<view class="order-info-item"> <text class="tit">返佣金额</text>
<text class="tit">返佣金额</text> <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">.{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}</text>
<text class="font-size-goods-tag">.{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}</text> </text>
</text>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <ns-login ref="login"></ns-login>
<ns-login ref="login"></ns-login> <loading-cover ref="loadingCover"></loading-cover>
<loading-cover ref="loadingCover"></loading-cover> </view>
</view> </template>
</template>
<script>
<script> import fenxiaoWords from 'common/js/fenxiao-words.js';
import fenxiaoWords from 'common/js/fenxiao-words.js'; export default {
export default { data() {
data() { return {
return { isIphoneX: false,
isIphoneX: false, orderId: 0,
orderId: 0, orderData: {
orderData: { action: []
action: [] }
} };
}; },
}, components: {},
components: {}, onLoad(option) {
onLoad(option) { if (option.id) {
if (option.id) { this.orderId = option.id;
this.orderId = option.id; } else {
} else { uni.navigateBack({
uni.navigateBack({ delta: 1
delta: 1 });
}); }
} },
}, mixins: [fenxiaoWords],
mixins: [fenxiaoWords], onShow() {
onShow() { setTimeout( () => {
setTimeout( () => { if (!this.addonIsExist.fenxiao) {
if (!this.addonIsExist.fenxiao) { this.$util.showToast({
this.$util.showToast({ title: '商家未开启分销',
title: '商家未开启分销', mask: true,
mask: true, duration: 2000
duration: 2000 });
}); setTimeout(() => {
setTimeout(() => { 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();
if (this.storeToken) {
if (this.storeToken) { this.getOrderData();
this.getOrderData(); } else {
} else { this.$nextTick(() => {
this.$nextTick(() => { this.$refs.login.open('/pages_promotion/fenxiao/order_detail?id=' + this.orderId);
this.$refs.login.open('/pages_promotion/fenxiao/order_detail?id=' + this.orderId); });
}); }
} },
}, methods: {
methods: { getOrderData() {
getOrderData() { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/order/info',
url: '/fenxiao/api/order/info', data: {
data: { fenxiao_order_id: this.orderId
fenxiao_order_id: this.orderId },
}, success: res => {
success: res => { if (res.code >= 0) {
if (res.code >= 0) { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); this.orderData = res.data;
this.orderData = res.data; } else {
} else { this.$util.showToast({
this.$util.showToast({ title: '未获取到订单信息!'
title: '未获取到订单信息!' });
}); setTimeout(() => {
setTimeout(() => { this.$util.redirectTo('/pages_promotion/fenxiao/order', {}, 'redirectTo');
this.$util.redirectTo('/pages_promotion/fenxiao/order', {}, 'redirectTo'); }, 1500);
}, 1500); }
} },
}, fail: res => {
fail: res => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }
} });
}); },
}, imageError() {
imageError() { this.orderData.sku_image = this.$util.getDefaultImage().goods;
this.orderData.sku_image = this.$util.getDefaultImage().goods; this.$forceUpdate();
this.$forceUpdate(); }
} },
}, watch: {
watch: { storeToken: function(nVal, oVal) {
storeToken: function(nVal, oVal) { if (nVal) {
if (nVal) { this.getOrderData();
this.getOrderData(); }
} }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> .order-detail {
.order-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-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; display: flex;
display: flex; 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; box-sizing: border-box;
box-sizing: border-box;
.detail-body-box {
.detail-body-box { 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%; border: 1rpx solid $color-line;
border: 1rpx solid $color-line; border-radius: $border-radius;
border-radius: $border-radius; }
} }
} .order-info {
.order-info { width: calc(100% - 200rpx);
width: calc(100% - 200rpx); height: 180rpx;
height: 180rpx; padding-left: $padding;
padding-left: $padding; box-sizing: border-box;
box-sizing: border-box; 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; -webkit-line-clamp: 2;
-webkit-line-clamp: 2; overflow: hidden;
overflow: hidden; line-height: 1.5;
line-height: 1.5; font-size: $font-size-base;
font-size: $font-size-base; }
}
.goods-sub-section {
.goods-sub-section { width: 100%;
width: 100%; line-height: 1.3;
line-height: 1.3; display: flex;
display: flex;
.goods-price {
.goods-price { font-size: $font-size-base;
font-size: $font-size-base; }
}
.unit {
.unit { font-weight: normal;
font-weight: normal; font-size: $font-size-tag;
font-size: $font-size-tag; margin-right: 2rpx;
margin-right: 2rpx; }
}
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;
.iconfont {
.iconfont { line-height: 1;
line-height: 1; font-size: $font-size-base;
font-size: $font-size-base; }
} }
} }
} }
} }
} }
} }
} .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; padding: $padding;
padding: $padding; box-sizing: border-box;
box-sizing: border-box; display: flex;
display: flex; justify-content: space-between;
justify-content: space-between; align-items: center;
align-items: center;
.total {
.total { font-weight: 600;
font-weight: 600; }
} }
} }
} }
} .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%; padding-top: $padding;
padding-top: $padding; 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; padding: 0 $padding;
padding: 0 $padding; border-bottom: 1rpx solid $color-line;
border-bottom: 1rpx solid $color-line; 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; position: relative;
position: relative; line-height: 1;
line-height: 1; font-weight: 600;
font-weight: 600; }
} .title::before {
.title::before { content: '';
content: ''; display: block;
display: block; width: 4rpx;
width: 4rpx; height: 100%;
height: 100%; position: absolute;
position: absolute; left: 0;
left: 0; top: 0;
top: 0; 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; align-items: center;
align-items: center; background: #fff;
background: #fff; line-height: 40rpx;
line-height: 40rpx;
.tit {
.tit { text-align: left;
text-align: left; display: inline-block;
display: inline-block; width: 200rpx;
width: 200rpx; }
}
.box {
.box { flex: 1;
flex: 1; line-height: inherit;
line-height: inherit;
.textarea {
.textarea { height: 40rpx;
height: 40rpx; }
} }
}
.iconfont {
.iconfont { color: #bbb;
color: #bbb; font-size: $font-size-base;
font-size: $font-size-base; }
}
.order-pay {
.order-pay { padding: 0;
padding: 0;
text {
text { display: inline-block;
display: inline-block; margin-left: 6rpx;
margin-left: 6rpx; }
} }
} text {
text { color: $color-tip;
color: $color-tip; font-size: $font-size-tag;
font-size: $font-size-tag; }
} }
} }
} }
} }
} .price-color{
.price-color{ color: var(--price-color);
color: var(--price-color); }
} </style>
</style>

View File

@@ -1,363 +1,390 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view class="fenxiao-promote" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }"> <view class="fenxiao-promote"
<view class="my-earnings"> :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
<view class="earnings-head-wrap"> <view class="my-earnings">
<view class="earnings-head"> <view class="earnings-head-wrap">
<image class="name" :src="$util.img('public/uniapp/fenxiao/promote/my_earnings.png')" mode="aspectFit"></image> <view class="earnings-head">
<image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')" mode="aspectFill"></image> <image class="name" :src="$util.img('public/uniapp/fenxiao/promote/my_earnings.png')"
<view class="content"> mode="aspectFit"></image>
累计收益 <image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')"
<text class="money-text">{{ detailData.total_commission }}</text> mode="aspectFill"></image>
<view class="content">
</view> 累计收益
</view> <text class="money-text">{{ detailData.total_commission }}</text>
</view>
<view class="earnings-body"> </view>
<view class="earnings-tab"> </view>
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">已邀请好友</text> </view>
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">已下单好友</text> <view class="earnings-body">
</view> <view class="earnings-tab">
<scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()"> <text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">已邀请好友</text>
<view class="earnings-list" v-if="promote.list.length"> <text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">已下单好友</text>
<view class="earnings-item" v-for="(item, index) in promote.list" :key="index"> </view>
<image <scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()">
class="item-img" <view class="earnings-list" v-if="promote.list.length">
:src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head" <view class="earnings-item" v-for="(item, index) in promote.list" :key="index">
@error="item.headimg = $util.getDefaultImage().head" <image class="item-img"
mode="aspectFill" :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head"
></image> @error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
<view class="item-content"> <view class="item-content">
<view class="item-name multi-hidden">{{ item.nickname }}</view> <view class="item-name multi-hidden">{{ item.nickname }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="earnings-empty" v-else>暂无已邀请好友快去邀请吧</view> <view class="earnings-empty" v-else>暂无已邀请好友快去邀请吧</view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class="activity-rules"> <view class="activity-rules">
<image class="rules-name" :src="$util.img('public/uniapp/fenxiao/promote/activity_rules.png')" mode="aspectFit"></image> <image class="rules-name" :src="$util.img('public/uniapp/fenxiao/promote/activity_rules.png')"
<view class="content" v-if="promoteContent.content"><rich-text :nodes="promoteContent.content"></rich-text></view> mode="aspectFit"></image>
<view class="rules-empty" v-else>暂无活动规则</view> <view class="content" v-if="promoteContent.content"><rich-text
</view> :nodes="promoteContent.content"></rich-text></view>
<view class="active-btn"><button type="primary" @click="toPoster()">邀请好友</button></view> <view class="rules-empty" v-else>暂无活动规则</view>
<ns-copyright></ns-copyright> </view>
<ns-login ref="login"></ns-login> <view class="active-btn"><button type="primary" @click="toPoster()">邀请好友</button></view>
<loading-cover ref="loadingCover"></loading-cover> <ns-copyright></ns-copyright>
<ns-login ref="login"></ns-login>
<!-- #ifdef MP-WEIXIN --> <loading-cover ref="loadingCover"></loading-cover>
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup> <!-- #ifdef MP-WEIXIN -->
<!-- #endif --> <!-- 小程序隐私协议 -->
</view> <privacy-popup ref="privacyPopup"></privacy-popup>
</template> <!-- #endif -->
</view>
<script> </view>
import htmlParser from '@/common/js/html-parser'; </template>
export default {
data() { <script>
return { import htmlParser from '@/common/js/html-parser';
tabIndex: 0, export default {
promoteContent: {}, data() {
promote: { return {
page: 0, tabIndex: 0,
page_size: 5, promoteContent: {},
page_count: 0, promote: {
list: [] page: 0,
}, page_size: 5,
isPay: 0, page_count: 0,
detailData: {}, list: []
templateId: '', },
poster:'', isPay: 0,
}; detailData: {},
}, templateId: '',
onShow() { poster: '',
setTimeout( () => { };
if (!this.addonIsExist.fenxiao) { },
this.$util.showToast({ onShow() {
title: '商家未开启分销', setTimeout(() => {
mask: true, if (!this.addonIsExist.fenxiao) {
duration: 2000 this.$util.showToast({
}); title: '商家未开启分销',
setTimeout(() => { mask: true,
this.$util.redirectTo('/pages/index/index'); duration: 2000
}, 2000); });
} setTimeout(() => {
},1000); this.$util.redirectTo('/pages/index/index');
}, 2000);
if (this.storeToken) { }
this.getTeam(); }, 1000);
this.getPromoteRule();
this.getFenxiaoDetail(); if (this.storeToken) {
} else { this.getTeam();
this.$nextTick(() => { this.getPromoteRule();
this.$refs.login.open('/pages_promotion/fenxiao/promote_code'); this.getFenxiaoDetail();
}); } else {
} this.$nextTick(() => {
}, this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
onLoad() { });
this.getTemplateId(); }
this.getPoster(); },
}, onLoad() {
methods: { this.getTemplateId();
toPoster(){ this.getPoster();
this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster,templateId:this.templateId }) },
}, methods: {
tabCut(index) { toPoster() {
this.tabIndex = index; this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster, templateId: this.templateId })
this.isPay = index; },
tabCut(index) {
this.promote.page_count = 0; this.tabIndex = index;
this.promote.page = 0; this.isPay = index;
this.promote.page_size = 5;
this.getTeam(); this.promote.page_count = 0;
}, this.promote.page = 0;
getTeam() { this.promote.page_size = 5;
if (this.promote.page_count > 0 && this.promote.page == this.promote.page_count) return; this.getTeam();
this.promote.page++; },
this.$api.sendRequest({ getTeam() {
url: '/fenxiao/api/fenxiao/team', if (this.promote.page_count > 0 && this.promote.page == this.promote.page_count) return;
data: { this.promote.page++;
page: this.promote.page, this.$api.sendRequest({
page_size: this.promote.page_size, url: '/fenxiao/api/fenxiao/team',
is_pay: this.isPay, data: {
level: 1 page: this.promote.page,
}, page_size: this.promote.page_size,
success: res => { is_pay: this.isPay,
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); level: 1
if (res.code >= 0) { },
if (this.promote.page == 1) this.promote.list = []; success: res => {
this.promote.page_count = res.data.page_count; if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.promote.list = this.promote.list.concat(res.data.list); if (res.code >= 0) {
} else { if (this.promote.page == 1) this.promote.list = [];
this.$util.showToast({ this.promote.page_count = res.data.page_count;
title: res.message this.promote.list = this.promote.list.concat(res.data.list);
}); } else {
} this.$util.showToast({
}, title: res.message
fail: res => { });
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }
} },
}); fail: res => {
}, if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
// 获取分销商信息 }
getFenxiaoDetail() { });
this.$api.sendRequest({ },
url: '/fenxiao/api/fenxiao/detail', // 获取分销商信息
success: res => { getFenxiaoDetail() {
if (res.data) { this.$api.sendRequest({
this.detailData = res.data; url: '/fenxiao/api/fenxiao/detail',
} else { success: res => {
this.$util.showToast({ if (res.data) {
title: res.message this.detailData = res.data;
}); } else {
} this.$util.showToast({
} title: res.message
}); });
}, }
// 获取富文本 }
getPromoteRule() { });
this.$api.sendRequest({ },
url: '/fenxiao/api/config/promoterule', // 获取富文本
success: res => { getPromoteRule() {
if (res.data) { this.$api.sendRequest({
this.promoteContent = res.data; url: '/fenxiao/api/config/promoterule',
this.promoteContent.content = res.data.content ? htmlParser(res.data.content) : ''; success: res => {
} else { if (res.data) {
this.$util.showToast({ this.promoteContent = res.data;
title: res.message this.promoteContent.content = res.data.content ? htmlParser(res.data.content) : '';
}); } else {
} this.$util.showToast({
}, title: res.message
fail: res => { });
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }
} },
}); fail: res => {
}, if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
/** }
* 获取分享海报 });
*/ },
getPoster() { /**
this.$api.sendRequest({ * 获取分享海报
url: '/fenxiao/api/fenxiao/posterList', */
success: res => { getPoster() {
if (res.code >= 0) { this.$api.sendRequest({
this.poster = res.data.toString(); url: '/fenxiao/api/fenxiao/posterList',
this.poster = encodeURIComponent(this.poster); success: res => {
} if (res.code >= 0) {
} this.poster = res.data.toString();
}); this.poster = encodeURIComponent(this.poster);
}, }
/** }
* 获取分享海报id });
*/ },
getTemplateId() { /**
this.$api.sendRequest({ * 获取分享海报id
url: '/fenxiao/api/fenxiao/posterTemplateIds', */
success: res => { getTemplateId() {
if (res.code >= 0) { this.$api.sendRequest({
this.templateId = [...res.data].join(); url: '/fenxiao/api/fenxiao/posterTemplateIds',
} success: res => {
} if (res.code >= 0) {
}); this.templateId = [...res.data].join();
} }
} }
}; });
</script> }
}
<style lang="scss"> };
.fenxiao-promote { </script>
overflow: hidden;
padding: 0 30rpx 160rpx; <style lang="scss">
min-height: 100vh; .fenxiao-promote {
background-color: #ff2d46; overflow: hidden;
background-size: 100%; padding: 0 30rpx 160rpx;
background-repeat: no-repeat; min-height: 100vh;
.my-earnings, background-color: #ff2d46;
.activity-rules { background-size: 100%;
background-color: #fff; background-repeat: no-repeat;
border-radius: 30rpx;
} .my-earnings,
.my-earnings { .activity-rules {
margin-top: 230rpx; background-color: #fff;
padding-bottom: 40rpx; border-radius: 30rpx;
.earnings-head-wrap { }
background-color: #fff7f5;
height: 160rpx; .my-earnings {
border-radius: 30rpx; margin-top: 230rpx;
border-bottom-left-radius: 0; padding-bottom: 40rpx;
border-bottom-right-radius: 0;
} .earnings-head-wrap {
.earnings-head { background-color: #fff7f5;
position: relative; height: 160rpx;
padding-top: 60rpx; border-radius: 30rpx;
display: flex; border-bottom-left-radius: 0;
align-items: center; border-bottom-right-radius: 0;
justify-content: center; }
.name {
position: absolute; .earnings-head {
width: 384rpx; position: relative;
height: 74rpx; padding-top: 60rpx;
top: -22rpx; display: flex;
} align-items: center;
.content { justify-content: center;
font-size: $font-size-tag;
} .name {
.money-bg { position: absolute;
width: 80rpx; width: 384rpx;
height: 80rpx; height: 74rpx;
} top: -22rpx;
.money-text { }
margin: 0 6rpx;
font-size: 40rpx; .content {
line-height: 1; font-size: $font-size-tag;
} }
}
.earnings-body { .money-bg {
padding: 0 30rpx; width: 80rpx;
.earnings-tab { height: 80rpx;
display: flex; }
justify-content: space-around;
align-items: center; .money-text {
height: 100rpx; margin: 0 6rpx;
font-size: 30rpx; font-size: 40rpx;
color: #e93224; line-height: 1;
margin-bottom: 10rpx; }
text.active { }
position: relative;
font-weight: bold; .earnings-body {
&::after { padding: 0 30rpx;
position: absolute;
content: ''; .earnings-tab {
height: 4rpx; display: flex;
width: 86rpx; justify-content: space-around;
left: 50%; align-items: center;
bottom: -4rpx; height: 100rpx;
transform: translateX(-50%); font-size: 30rpx;
background-color: #e93224; color: #e93224;
} margin-bottom: 10rpx;
}
} text.active {
.earnings-content-wrap { position: relative;
max-height: 440rpx; font-weight: bold;
}
.earnings-item { &::after {
display: flex; position: absolute;
align-items: center; content: '';
margin-bottom: 20rpx; height: 4rpx;
&:last-child { width: 86rpx;
margin-bottom: 0; left: 50%;
} bottom: -4rpx;
.item-img { transform: translateX(-50%);
width: 90rpx; background-color: #e93224;
height: 90rpx; }
margin-right: 20rpx; }
flex-shrink: 0; }
}
.item-time { .earnings-content-wrap {
font-size: $font-size-tag; max-height: 440rpx;
color: $color-tip; }
}
.item-name { .earnings-item {
line-height: 1.3; display: flex;
} align-items: center;
.money { margin-bottom: 20rpx;
margin-left: auto;
color: #f9b124; &:last-child {
} margin-bottom: 0;
} }
}
.earnings-empty { .item-img {
display: flex; width: 90rpx;
align-items: center; height: 90rpx;
justify-content: center; margin-right: 20rpx;
height: 160rpx; flex-shrink: 0;
font-size: 30rpx; }
}
} .item-time {
.activity-rules { font-size: $font-size-tag;
position: relative; color: $color-tip;
margin-top: 60rpx; }
min-height: 300rpx;
.rules-name { .item-name {
position: absolute; line-height: 1.3;
width: 384rpx; }
height: 74rpx;
top: -22rpx; .money {
left: 50%; margin-left: auto;
transform: translateX(-50%); color: #f9b124;
} }
.content { }
padding: 70rpx 20rpx 0; }
}
.rules-empty { .earnings-empty {
padding-top: 140rpx; display: flex;
text-align: center; align-items: center;
font-size: 30rpx; justify-content: center;
} height: 160rpx;
} font-size: 30rpx;
}
.active-btn { }
position: fixed;
bottom: 0; .activity-rules {
left: 0; position: relative;
right: 0; margin-top: 60rpx;
z-index: 5; min-height: 300rpx;
display: flex;
align-items: center; .rules-name {
justify-content: center; position: absolute;
background-color: #ff2d46; width: 384rpx;
height: 160rpx; height: 74rpx;
padding: 0 60rpx; top: -22rpx;
left: 50%;
button { transform: translateX(-50%);
flex: 1; }
margin: 0;
border-radius: 50rpx; .content {
color: #985400; padding: 70rpx 20rpx 0;
background: linear-gradient(45deg, #ffe2ac 0%, #fdc174 100%); }
}
} .rules-empty {
} padding-top: 140rpx;
</style> text-align: center;
font-size: 30rpx;
}
}
.active-btn {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
background-color: #ff2d46;
height: 160rpx;
padding: 0 60rpx;
button {
flex: 1;
margin: 0;
border-radius: 50rpx;
color: #985400;
background: linear-gradient(45deg, #ffe2ac 0%, #fdc174 100%);
}
}
}
</style>

View File

@@ -1,307 +1,306 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container"> <swiper class="swiper" @change="getIndex">
<swiper class="swiper" @change="getIndex"> <swiper-item v-for="(item, index) in poster" :key="index">
<swiper-item v-for="(item, index) in poster" :key="index"> <view class="swiper-item">
<view class="swiper-item"> <view class="poster-wrap">
<view class="poster-wrap"> <image :src="$util.img(item)" mode="widthFix" :show-menu-by-longpress="true"/>
<image :src="$util.img(item)" mode="widthFix" :show-menu-by-longpress="true"/> </view>
</view> </view>
</view> </swiper-item>
</swiper-item> </swiper>
</swiper>
<!-- #ifdef H5 -->
<!-- #ifdef H5 --> <view class="tips">长按识别图中二维码</view>
<view class="tips">长按识别图中二维码</view> <!-- #endif -->
<!-- #endif -->
<!-- #ifdef MP -->
<!-- #ifdef MP --> <view class="btn color-base-bg color-base-border" @click="save">保存海报</view>
<view class="btn color-base-bg color-base-border" @click="save">保存海报</view> <!-- #endif -->
<!-- #endif -->
<uni-popup ref="popupDialog" :custom="true" :mask-click="false">
<uni-popup ref="popupDialog" :custom="true" :mask-click="false"> <view class="dialog-popup">
<view class="dialog-popup"> <view class="title">提示</view>
<view class="title">提示</view> <view class="message">您拒绝了保存图片到相册的授权请求无法保存图片到相册如需正常使用请授权之后再进行操作</view>
<view class="message">您拒绝了保存图片到相册的授权请求无法保存图片到相册如需正常使用请授权之后再进行操作</view> <view class="action-wrap">
<view class="action-wrap"> <view @click="closeDialog">取消</view>
<view @click="closeDialog">取消</view> <view>
<view> <button type="default" open-type="openSetting" @opensetting="closeDialog" hover-class="none">立即授权</button>
<button type="default" open-type="openSetting" @opensetting="closeDialog" hover-class="none">立即授权</button> </view>
</view> </view>
</view> </view>
</view> </uni-popup>
</uni-popup>
<ns-login ref="login"></ns-login>
<ns-login ref="login"></ns-login> <loading-cover ref="loadingCover"></loading-cover>
<loading-cover ref="loadingCover"></loading-cover>
<!-- #ifdef MP-WEIXIN -->
<!-- #ifdef MP-WEIXIN --> <!-- 小程序隐私协议 -->
<!-- 小程序隐私协议 --> <privacy-popup ref="privacyPopup"></privacy-popup>
<privacy-popup ref="privacyPopup"></privacy-popup> <!-- #endif -->
<!-- #endif --> </view>
</view> </template>
</template>
<script>
<script> import {
import { Weixin
Weixin } from 'common/js/wx-jssdk.js';
} from 'common/js/wx-jssdk.js'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
export default { data() {
data() { return {
return { poster: [],
poster: [], fenxiaoInfo: {},
fenxiaoInfo: {}, posterIndex: 0,
posterIndex: 0, //海报模板id
//海报模板id templateId: ['default'],
templateId: ['default'], mpShareData: null //小程序分享数据
mpShareData: null //小程序分享数据 };
}; },
}, components: {
components: { uniPopup
uniPopup },
}, methods: {
methods: { /**
/** * 获取分销海报
* 获取分销海报 */
*/ getPoster(id) {
getPoster(id) { return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/fenxiao/poster',
url: '/fenxiao/api/fenxiao/poster', data: {
data: { page: '/pages/index/index',
page: '/pages/index/index', qrcode_param: JSON.stringify({}),
qrcode_param: JSON.stringify({}), template_id: id
template_id: id },
}, success: res => {
success: res => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (res.code >= 0) {
if (res.code >= 0) { resolve(res.data.path);
resolve(res.data.path); }
} },
}, fail: res => {
fail: res => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); reject();
reject(); }
} });
}); });
}); },
}, getIndex(e) {
getIndex(e) { this.posterIndex = e.detail.current;
this.posterIndex = e.detail.current; },
}, save() {
save() { // #ifdef MP
// #ifdef MP uni.downloadFile({
uni.downloadFile({ url: this.$util.img(this.poster[this.posterIndex]),
url: this.$util.img(this.poster[this.posterIndex]), success: res => {
success: res => { if (res.statusCode === 200) {
if (res.statusCode === 200) { uni.saveImageToPhotosAlbum({
uni.saveImageToPhotosAlbum({ filePath: res.tempFilePath,
filePath: res.tempFilePath, success: () => {
success: () => { this.$util.showToast({
this.$util.showToast({ title: '保存成功'
title: '保存成功' });
}); },
}, fail: res => {
fail: res => { if (res.errMsg == 'saveImageToPhotosAlbum:fail auth deny' ||
if (res.errMsg == 'saveImageToPhotosAlbum:fail auth deny' || res.errMsg == 'saveImageToPhotosAlbum:fail:auth denied') {
res.errMsg == 'saveImageToPhotosAlbum:fail:auth denied') { this.$refs.popupDialog.open();
this.$refs.popupDialog.open(); } else {
} else { this.$util.showToast({
this.$util.showToast({ title: '保存失败,请稍后重试'
title: '保存失败,请稍后重试' });
}); }
} }
} });
}); } else {
} else { this.$util.showToast({
this.$util.showToast({ title: '下载失败'
title: '下载失败' });
}); }
} },
}, fail: res => {
fail: res => { this.$util.showToast({
this.$util.showToast({ title: '下载失败'
title: '下载失败' });
}); }
} });
}); // #endif
// #endif },
}, getFenxiaoDetail() {
getFenxiaoDetail() { this.poster = [];
this.poster = []; try {
try { this.templateId.forEach((item, index) => {
this.templateId.forEach((item, index) => { this.getPoster(item).then(resolve => {
this.getPoster(item).then(resolve => { this.poster.push(resolve);
this.poster.push(resolve); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }).catch(reject => {
}).catch(reject => { throw reject;
throw reject; });
}); });
}); } catch {
} catch { this.$util.showToast({
this.$util.showToast({ title: '海报生成失败'
title: '海报生成失败' });
}); }
} },
},
closeDialog() {
closeDialog() { this.$refs.popupDialog.close();
this.$refs.popupDialog.close(); }
} },
}, onLoad(option) {
onLoad(option) { setTimeout( () => {
setTimeout( () => { if (!this.addonIsExist.fenxiao) {
if (!this.addonIsExist.fenxiao) { this.$util.showToast({
this.$util.showToast({ title: '商家未开启分销',
title: '商家未开启分销', mask: true,
mask: true, duration: 2000
duration: 2000 });
}); setTimeout(() => {
setTimeout(() => { this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo('/pages/index/index'); }, 2000);
}, 2000); }
} },1000);
},1000);
if (option.templateId) {
if (option.templateId) { this.templateId = option.templateId.split(',');
this.templateId = option.templateId.split(','); }
}
if (this.storeToken) {
if (this.storeToken) { if(option.poster){
if(option.poster){ this.poster = decodeURIComponent(option.poster).split(',')
this.poster = decodeURIComponent(option.poster).split(',') setTimeout(() => {
setTimeout(() => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }, 500)
}, 500) }else{
}else{ this.getFenxiaoDetail();
this.getFenxiaoDetail(); }
}
} else {
} else { this.$nextTick(() => {
this.$nextTick(() => { this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
this.$refs.login.open('/pages_promotion/fenxiao/promote_code'); });
}); }
} },
}, onShow() {
onShow() { //小程序分享
//小程序分享 // #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN this.$util.getMpShare().then(res => {
this.$util.getMpShare().then(res => { this.mpShareData = res;
this.mpShareData = res; });
}); // #endif
// #endif },
}, //分享给好友
//分享给好友 onShareAppMessage() {
onShareAppMessage() { return this.mpShareData.appMessage;
return this.mpShareData.appMessage; },
}, //分享到朋友圈
//分享到朋友圈 onShareTimeline() {
onShareTimeline() { return this.mpShareData.timeLine;
return this.mpShareData.timeLine; },
}, watch: {
watch: { storeToken: function(nVal, oVal) {
storeToken: function(nVal, oVal) { if (nVal) {
if (nVal) { this.getFenxiaoDetail();
this.getFenxiaoDetail(); }
} }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> .container {
.container { width: 100vw;
width: 100vw; min-height: 100vh;
min-height: 100vh; background-color: #f5f5f5;
background-color: #f5f5f5; }
}
.poster-wrap {
.poster-wrap { padding: 40rpx 0;
padding: 40rpx 0; width: calc(100vw - 80rpx);
width: calc(100vw - 80rpx); margin: 0 40rpx;
margin: 0 40rpx; line-height: 1;
line-height: 1;
image {
image { border-radius: 20rpx;
border-radius: 20rpx; overflow: hidden;
overflow: hidden; width: 100%;
width: 100%; }
} }
}
.swiper {
.swiper { height: 1240rpx;
height: 1240rpx; }
}
.btn {
.btn { margin: 0 80rpx;
margin: 0 80rpx; margin-top: 30rpx;
margin-top: 30rpx; height: 80rpx;
height: 80rpx; line-height: 80rpx;
line-height: 80rpx; border-radius: $border-radius;
border-radius: $border-radius; color: #fff;
color: #fff; text-align: center;
text-align: center; }
}
.tips {
.tips { text-align: center;
text-align: center; font-size: $font-size-base;
font-size: $font-size-base; color: #999;
color: #999; font-weight: 600;
font-weight: 600; margin-top: 20rpx;
margin-top: 20rpx; }
}
.dialog-popup {
.dialog-popup { width: 580rpx;
width: 580rpx; background: #fff;
background: #fff; box-sizing: border-box;
box-sizing: border-box; border-radius: 10rpx;
border-radius: 10rpx; overflow: hidden;
overflow: hidden; height: initial;
height: initial;
.title {
.title { padding: 30rpx 30rpx 0 30rpx;
padding: 30rpx 30rpx 0 30rpx; text-align: center;
text-align: center; font-size: 32rpx;
font-size: 32rpx; font-weight: bold;
font-weight: bold; }
}
.message {
.message { padding: 0 30rpx;
padding: 0 30rpx; color: #666;
color: #666; text-align: center;
text-align: center; font-size: $font-size-base;
font-size: $font-size-base; line-height: 1.3;
line-height: 1.3; margin-top: 30rpx;
margin-top: 30rpx; }
}
.action-wrap {
.action-wrap { margin-top: 50rpx;
margin-top: 50rpx; height: 80rpx;
height: 80rpx; display: flex;
display: flex; border-top: 2rpx solid #eee;
border-top: 2rpx solid #eee;
&>view {
&>view { flex: 1;
flex: 1; text-align: center;
text-align: center; line-height: 80rpx;
line-height: 80rpx;
&:first-child {
&:first-child { border-right: 2rpx solid #eee;
border-right: 2rpx solid #eee; color: #999;
color: #999; }
}
button {
button { border: none;
border: none; line-height: 80rpx;
line-height: 80rpx; padding: 0;
padding: 0; margin: 0;
margin: 0; width: 100%;
width: 100%; height: 100%;
height: 100%; }
} }
} }
} }
}
</style> </style>

View File

@@ -1,416 +1,433 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container"> <mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10"> <view slot="list">
<view slot="list"> <block v-if="list.length != 0">
<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="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"> <view class="info-pic">
<view class="info-pic"> <image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" @error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" @error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"/> </view>
</view> <view class="member-info">
<view class="member-info"> <view class="rank-info-box">
<view class="rank-info-box"> <text class="name">{{info.nickname}}</text>
<text class="name">{{info.nickname}}</text> </view>
</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/withdraw_apply')" v-if="type == 'profit'">点击提现</view> <view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view>
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view> </view>
</view> </view>
</view> </view>
</view>
<view class="fenxiao-team" v-if="type == 'profit'">
<view class="fenxiao-team" v-if="type == 'profit'"> <view class="fenxiao-index-other">
<view class="fenxiao-index-other"> <view class="all-money-item">
<view class="all-money-item"> <view class="img-wrap">
<view class="img-wrap"> <text class="iconfont icon-fenxiao"></text>
<text class="iconfont icon-fenxiao"></text> </view>
</view> <view class="all-money-tit-wrap">
<view class="all-money-tit-wrap"> <text class="all-money-tit">分销佣金</text>
<text class="all-money-tit">分销佣金</text> <text class="all-money-num">{{ info.today_commission}}</text>
<text class="all-money-num">{{ info.today_commission}}</text> </view>
</view> </view>
</view> </view>
</view> <view class="fenxiao-index-other">
<view class="fenxiao-index-other"> <view class="all-money-item">
<view class="all-money-item"> <view class="img-wrap">
<view class="img-wrap"> <text class="iconfont icon-baixingbeng"></text>
<text class="iconfont icon-baixingbeng"></text> </view>
</view> <view class="all-money-tit-wrap">
<view class="all-money-tit-wrap"> <text class="all-money-tit">佣金排行</text>
<text class="all-money-tit">佣金排行</text> <text class="all-money-num">您排行第{{ ranking }}</text>
<text class="all-money-num">您排行第{{ ranking }}</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="fenxiao-team" v-if="type == 'invited_num'">
<view class="fenxiao-team" v-if="type == 'invited_num'"> <view class="fenxiao-index-other">
<view class="fenxiao-index-other"> <view class="all-money-item">
<view class="all-money-item"> <view class="img-wrap">
<view class="img-wrap"> <text class="iconfont icon-huodongtuiyan"></text>
<text class="iconfont icon-huodongtuiyan"></text> </view>
</view> <view class="all-money-tit-wrap">
<view class="all-money-tit-wrap"> <text class="all-money-tit">推广人数</text>
<text class="all-money-tit">推广人数</text> <text class="all-money-num">{{ info.one_child_num}}</text>
<text class="all-money-num">{{ info.one_child_num}}</text> </view>
</view> </view>
</view> </view>
</view> <view class="fenxiao-index-other">
<view class="fenxiao-index-other"> <view class="all-money-item">
<view class="all-money-item"> <view class="img-wrap">
<view class="img-wrap"> <text class="iconfont icon-baixingbeng"></text>
<text class="iconfont icon-baixingbeng"></text> </view>
</view> <view class="all-money-tit-wrap">
<view class="all-money-tit-wrap"> <text class="all-money-tit" v-if="type == 'invited_num'">推广排行</text>
<text class="all-money-tit" v-if="type == 'invited_num'">推广排行</text> <text class="all-money-num">您排行第{{ ranking }}</text>
<text class="all-money-num">您排行第{{ ranking }}</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view>
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view> <view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
<view class="ranking-list">
<view class="ranking-list"> <view class="ranking-item" v-for="(item, index) in list" :key="index">
<view class="ranking-item" v-for="(item, index) in list" :key="index"> <view class="ranking price-font">{{ index + 1 }}</view>
<view class="ranking price-font">{{ index + 1 }}</view> <view class="content">
<view class="content"> <view class="head-img">
<view class="head-img"> <image :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head" @error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
<image :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head" @error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"/> </view>
</view> <view class="nickname">{{ item.nickname }}</view>
<view class="nickname">{{ item.nickname }}</view> </view>
</view> <view class="price-font price-style" v-if="type == 'profit'">
<view class="price-font price-style" v-if="type == 'profit'"> {{ item.total_commission|moneyFormat }}</view>
{{ item.total_commission|moneyFormat }}</view> <view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }} </view>
</view> </view>
</view> </view>
</view> </block>
</block> <block v-if="list.length == 0 && emptyShow">
<block v-if="list.length == 0 && emptyShow"> <ns-empty text="暂无数据" :isIndex="false"></ns-empty>
<ns-empty text="暂无数据" :isIndex="false"></ns-empty> </block>
</block> </view>
</view> </mescroll-uni>
</mescroll-uni>
<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";
export default { import nsLogin from '@/components/ns-login/ns-login.vue';
data() { import loadingCover from '@/components/loading-cover/loading-cover.vue';
return { import nsEmpty from '@/components/ns-empty/ns-empty.vue';
list: [], // #ifdef MP-WEIXIN
emptyShow: false, import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
type: '', // #endif
ranking: 0,
info: {}
} export default {
}, components: {
onLoad(data) { nsLogin,
this.type = data.type; MescrollUni,
this.getRanking(); loadingCover,
this.getFenxiaoDetail(); nsEmpty,
}, // #ifdef MP-WEIXIN
methods: { privacyPopup
getData(mescroll) { // #endif
this.emptyShow = false; },
if (mescroll.num == 1) { data() {
this.list = []; return {
} list: [],
this.$api.sendRequest({ emptyShow: false,
url: '/fenxiao/api/fenxiao/rankinglist', type: '',
data: { ranking: 0,
page_size: mescroll.size, info: {}
page: mescroll.num, }
type: this.type },
}, onLoad(data) {
success: res => { this.type = data.type;
this.emptyShow = true; this.getRanking();
let newArr = []; this.getFenxiaoDetail();
let msg = res.message; },
if (res.code == 0 && res.data) { methods: {
newArr = res.data.list; getData(mescroll) {
} else { this.emptyShow = false;
this.$util.showToast({ if (mescroll.num == 1) {
title: msg this.list = [];
}); }
} this.$api.sendRequest({
mescroll.endSuccess(newArr.length); url: '/fenxiao/api/fenxiao/rankinglist',
//设置列表数据 data: {
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表 page_size: mescroll.size,
this.list = this.list.concat(newArr); //追加新数据 page: mescroll.num,
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); type: this.type
}, },
fail: res => { success: res => {
mescroll.endErr(); this.emptyShow = true;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); let newArr = [];
} let msg = res.message;
}); if (res.code == 0 && res.data) {
}, newArr = res.data.list;
getRanking() { } else {
this.$api.sendRequest({ this.$util.showToast({
url: '/fenxiao/api/fenxiao/ranking', title: msg
data: { });
type: this.type }
}, mescroll.endSuccess(newArr.length);
success: res => { //设置列表数据
if (res.code >= 0) { if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
this.ranking = res.data; this.list = this.list.concat(newArr); //追加新数据
} if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} },
}) fail: res => {
}, mescroll.endErr();
getFenxiaoDetail() { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.$api.sendRequest({ }
url: '/fenxiao/api/fenxiao/detail', });
success: res => { },
if (res.data) { getRanking() {
this.info = res.data; this.$api.sendRequest({
} url: '/fenxiao/api/fenxiao/ranking',
}, data: {
}); type: this.type
}, },
} success: res => {
} if (res.code >= 0) {
</script> this.ranking = res.data;
}
<style lang="scss"> }
.container { })
width: 100vw; },
height: 100vh; getFenxiaoDetail() {
} this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
.banner { success: res => {
width: 100%; if (res.data) {
height: 200rpx; this.info = res.data;
// background: $base-color; }
} },
});
.info { },
width: 100%; }
display: flex; }
justify-content: space-between; </script>
align-items: center;
padding: 50rpx 80rpx 0; <style lang="scss">
box-sizing: border-box; .container {
width: 100vw;
.info-pic { height: 100vh;
width: 100rpx; }
height: 100rpx;
border-radius: 50%; .banner {
border: 4rpx solid #fff; width: 100%;
position: relative; height: 200rpx;
// background: $base-color;
image { }
width: 100%;
height: 100%; .info {
border-radius: 50%; width: 100%;
} display: flex;
justify-content: space-between;
} align-items: center;
padding: 50rpx 80rpx 0;
.member-info { box-sizing: border-box;
flex: 1;
width: 0; .info-pic {
margin-left: 32rpx; width: 100rpx;
display: flex; height: 100rpx;
border-radius: 50%;
view { border: 4rpx solid #fff;
color: #fff; position: relative;
}
image {
.rank-info-box { width: 100%;
line-height: 1; height: 100%;
flex: 1; border-radius: 50%;
} }
.name { }
font-size: 32rpx;
font-weight: 600; .member-info {
color: #FFFFFF; flex: 1;
} width: 0;
margin-left: 32rpx;
.withdrawal { display: flex;
border-radius: 4px;
line-height: 23px; view {
margin: auto; color: #fff;
text-align: center; }
font-size: 11px;
} .rank-info-box {
line-height: 1;
} flex: 1;
}
}
.name {
.fenxiao-team { font-size: 32rpx;
display: flex; font-weight: 600;
width: 100%; color: #FFFFFF;
margin-top: 22rpx; }
.fenxiao-index-other { .withdrawal {
margin: 0 24rpx 20rpx 24rpx; border-radius: 4px;
border-radius: 16rpx; line-height: 23px;
background-color: #ffffff; margin: auto;
padding: 30rpx 0; text-align: center;
flex: 1; font-size: 11px;
}
&:last-child {
margin-left: 0; }
}
}
.all-money-item {
margin: 0 30rpx; .fenxiao-team {
display: flex; display: flex;
font-size: $font-size-tag; width: 100%;
align-items: center; margin-top: 22rpx;
.img-wrap { .fenxiao-index-other {
display: flex; margin: 0 24rpx 20rpx 24rpx;
justify-content: center; border-radius: 16rpx;
align-items: center; background-color: #ffffff;
width: 70rpx; padding: 30rpx 0;
height: 70rpx; flex: 1;
image { &:last-child {
width: 100%; margin-left: 0;
height: 100%; }
}
} .all-money-item {
margin: 0 30rpx;
.all-money-tit-wrap { display: flex;
flex: 1; font-size: $font-size-tag;
margin-left: 24rpx; align-items: center;
display: flex;
flex-direction: column; .img-wrap {
height: 70rpx; display: flex;
justify-content: center;
.all-money-tit { align-items: center;
line-height: 1; width: 70rpx;
color: $color-title; height: 70rpx;
font-size: $font-size-base;
flex: 1; image {
} width: 100%;
height: 100%;
.all-money-num { }
color: $color-tip; }
font-size: 24rpx;
line-height: 1; .all-money-tit-wrap {
} flex: 1;
} margin-left: 24rpx;
} display: flex;
} flex-direction: column;
} height: 70rpx;
.icon-wenxiao { .all-money-tit {
text-align: center; line-height: 1;
font-size: 50rpx; color: $color-title;
color: var(--base-color) !important; font-size: $font-size-base;
} flex: 1;
}
.number {
font-weight: 600; .all-money-num {
text-align: center; color: $color-tip;
} font-size: 24rpx;
line-height: 1;
.info-text { }
font-size: 20rpx; }
text-align: center; }
} }
}
.info-title {
font-size: 50rpx; .icon-wenxiao {
font-weight: 900; text-align: center;
color: #f5f5f5; font-size: 50rpx;
text-align: center; color: var(--base-color) !important;
} }
.info-rank { .number {
color: #f5f5f5; font-weight: 600;
margin-top: 10rpx; text-align: center;
} }
.title-rakn-text { .info-text {
text-align: center; font-size: 20rpx;
font-size: 30rpx; text-align: center;
font-weight: 900; }
}
.info-title {
.ranking-list { font-size: 50rpx;
transform: translateY(-120rpx); font-weight: 900;
margin: 200rpx 24rpx; color: #f5f5f5;
background: #fff; text-align: center;
border-radius: 16rpx; }
padding: 10rpx 20rpx;
margin-top: 140rpx; .info-rank {
color: #f5f5f5;
.ranking-item { margin-top: 10rpx;
display: flex; }
align-items: center;
padding: 20rpx 0; .title-rakn-text {
border-bottom: 2rpx solid #f5f5f5; text-align: center;
font-size: 30rpx;
&:last-child { font-weight: 900;
border-bottom: 0; }
}
.ranking-list {
.ranking { transform: translateY(-120rpx);
width: 60rpx; margin: 200rpx 24rpx;
height: 60rpx; background: #fff;
display: flex; border-radius: 16rpx;
align-items: center; padding: 10rpx 20rpx;
justify-content: center; margin-top: 140rpx;
box-sizing: border-box;
font-size: 24rpx; .ranking-item {
} display: flex;
align-items: center;
&:nth-child(1) .ranking { padding: 20rpx 0;
background: rgb(249, 186, 1); border-bottom: 2rpx solid #f5f5f5;
border-radius: 50%;
border: 10rpx solid rgb(254, 220, 92); &:last-child {
} border-bottom: 0;
}
&:nth-child(2) .ranking {
background: rgb(172, 185, 194); .ranking {
border-radius: 50%; width: 60rpx;
border: 10rpx solid rgb(215, 223, 229); height: 60rpx;
} display: flex;
align-items: center;
&:nth-child(3) .ranking { justify-content: center;
background: rgb(211, 163, 136); box-sizing: border-box;
border-radius: 50%; font-size: 24rpx;
border: 10rpx solid rgb(235, 201, 190); }
}
&:nth-child(1) .ranking {
.content { background: rgb(249, 186, 1);
flex: 1; border-radius: 50%;
width: 0; border: 10rpx solid rgb(254, 220, 92);
padding: 0 20rpx; }
display: flex;
align-items: center; &:nth-child(2) .ranking {
background: rgb(172, 185, 194);
.head-img { border-radius: 50%;
width: 90rpx; border: 10rpx solid rgb(215, 223, 229);
height: 90rpx; }
display: flex;
align-items: center; &:nth-child(3) .ranking {
justify-content: center; background: rgb(211, 163, 136);
border-radius: 50%; border-radius: 50%;
overflow: hidden; border: 10rpx solid rgb(235, 201, 190);
}
image {
width: 100%; .content {
height: 100%; flex: 1;
} width: 0;
} padding: 0 20rpx;
display: flex;
.nickname { align-items: center;
color: #333;
margin: 0 20rpx; .head-img {
font-size: 28rpx; width: 90rpx;
} height: 90rpx;
} display: flex;
} align-items: center;
} justify-content: center;
</style> border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.nickname {
color: #333;
margin: 0 20rpx;
font-size: 28rpx;
}
}
}
}
</style>

View File

@@ -1,152 +1,175 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <mescroll-uni ref="mescroll" @getData="getData" top="20" class="member-point" :size="8" v-if="storeToken">
<mescroll-uni ref="mescroll" @getData="getData" top="20" 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" v-else-if="orderItem.is_settlement == 1">已结算</text> <text class="status-name color-text-green"
<text class="status-name color-text-orange" v-else>结算</text> v-else-if="orderItem.is_settlement == 1">结算</text>
</view> <text class="status-name color-text-orange" v-else>待结算</text>
</view>
<view class="order-body">
<view class="goods-wrap"> <view class="order-body">
<view class="goods-img"> <view class="goods-wrap">
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image> <view class="goods-img">
</view> <image :src="$util.img(orderItem.sku_image, { size: 'mid' })"
<view class="goods-info"> @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
<view class="top-wrap"> </view>
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view> <view class="goods-info">
<view> <view class="top-wrap">
<text class="color-tip">{{ fenxiaoWords.account }}</text> <view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
<text class="price-color font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text> <view>
<text class="price-color font-size-toolbar">{{ orderItem.commission }}</text> <text class="color-tip">{{ fenxiaoWords.account }}</text>
</view> <text class="price-color font-size-goods-tag">{{
</view> $lang('common.currencySymbol') }}</text>
<view class="goods-sub-section"> <text class="price-color font-size-toolbar">{{ orderItem.commission
<view class="goods-price"> }}</text>
<text class="unit price-color">{{ $lang('common.currencySymbol') }}</text> </view>
<text class="price-color font-size-toolbar">{{ orderItem.price }}</text> </view>
</view> <view class="goods-sub-section">
<view> <view class="goods-price">
<text> <text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="iconfont icon-close"></text> <text class="price-color font-size-toolbar">{{ orderItem.price }}</text>
{{ orderItem.num }} </view>
</text> <view>
</view> <text>
</view> <text class="iconfont icon-close"></text>
</view> {{ orderItem.num }}
</view> </text>
</view> </view>
<view class="order-footer"> </view>
<view class="order-base-info active"> </view>
<view class="order-type "> </view>
<text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text> </view>
<!-- <text>{{ fenxiaoWords.account }}金额</text> <view class="order-footer">
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> --> <view class="order-base-info active">
</view> <view class="order-type ">
<view class="total"> <text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text>
<text>合计</text> <!-- <text>{{ fenxiaoWords.account }}金额</text>
<text class="price-color">{{ $lang('common.currencySymbol') }}</text> <text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
<text class="font-size-toolbar price-color">{{ orderItem.real_goods_money }}</text> </view>
</view> <view class="total">
</view> <text>合计</text>
</view> <text class="price-color">{{ $lang('common.currencySymbol') }}</text>
</view> <text class="font-size-toolbar price-color">{{ orderItem.real_goods_money }}</text>
</view> </view>
<view class="cart-empty"><ns-empty text="暂无订单" :isIndex="false" v-if="orderList.length == 0 && emptyShow"></ns-empty></view> </view>
</view> </view>
</mescroll-uni> </view>
</view>
<ns-login ref="login"></ns-login> <view class="cart-empty"><ns-empty text="暂无订单" :isIndex="false"
<loading-cover ref="loadingCover"></loading-cover> v-if="orderList.length == 0 && emptyShow"></ns-empty></view>
</view> </view>
</template> </mescroll-uni>
<script> <ns-login ref="login"></ns-login>
import fenxiaoWords from 'common/js/fenxiao-words.js'; <loading-cover ref="loadingCover"></loading-cover>
</view>
export default { </template>
data() {
return { <script>
orderList: [], import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
emptyShow: false, import nsLogin from '@/components/ns-login/ns-login.vue';
fenxiaoId: '', import loadingCover from '@/components/loading-cover/loading-cover.vue';
subMemberId: '' import nsEmpty from '@/components/ns-empty/ns-empty.vue';
}; // #ifdef MP-WEIXIN
}, import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
mixins: [fenxiaoWords], // #endif
onLoad(option) { import fenxiaoWords from 'common/js/fenxiao-words.js';
if (option.fenxiao_id) {
this.fenxiaoId = option.fenxiao_id; export default {
} components: {
if (option.sub_member_id) { nsLogin,
this.subMemberId = option.sub_member_id; MescrollUni,
} loadingCover,
}, nsEmpty,
onShow() { // #ifdef MP-WEIXIN
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单'); privacyPopup
}, // #endif
methods: { },
//获得列表数据 data() {
getData(mescroll) { return {
this.emptyShow = false; orderList: [],
if (mescroll.num == 1) { emptyShow: false,
this.orderList = []; fenxiaoId: '',
} subMemberId: ''
this.$api.sendRequest({ };
url: '/fenxiao/api/fenxiao/getorder', },
data: { mixins: [fenxiaoWords],
page: mescroll.num, onLoad(option) {
page_size: mescroll.size, if (option.fenxiao_id) {
fenxiao_id: this.fenxiaoId ? this.fenxiaoId : '', this.fenxiaoId = option.fenxiao_id;
sub_member_id: this.subMemberId ? this.subMemberId : '' }
}, if (option.sub_member_id) {
success: res => { this.subMemberId = option.sub_member_id;
this.emptyShow = true; }
let newArr = []; },
let msg = res.message; onShow() {
if (res.code == 0 && res.data && res.data.list) { if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '订单');
newArr = res.data.list; },
} else { methods: {
this.$util.showToast({ title: res.message }); //获得列表数据
} getData(mescroll) {
mescroll.endSuccess(newArr.length); this.emptyShow = false;
//设置列表数据 if (mescroll.num == 1) {
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表 this.orderList = [];
this.orderList = this.orderList.concat(newArr); //追加新数据 }
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); this.$api.sendRequest({
}, url: '/fenxiao/api/fenxiao/getorder',
fail: res => { data: {
mescroll.endErr(); page: mescroll.num,
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); page_size: mescroll.size,
} fenxiao_id: this.fenxiaoId ? this.fenxiaoId : '',
}); sub_member_id: this.subMemberId ? this.subMemberId : ''
}, },
imageError(index) { success: res => {
this.orderList[index].sku_image = this.$util.getDefaultImage().goods; this.emptyShow = true;
this.$forceUpdate(); let newArr = [];
}, let msg = res.message;
toDetail(e) { if (res.code == 0 && res.data && res.data.list) {
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { newArr = res.data.list;
id: e } else {
}); this.$util.showToast({ title: res.message });
} }
} mescroll.endSuccess(newArr.length);
}; //设置列表数据
</script> if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
this.orderList = this.orderList.concat(newArr); //追加新数据
<style lang="scss"> if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
@import './public/css/order.scss'; },
.goods-wraps { fail: res => {
align-items: center; mescroll.endErr();
} if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
.goods_list .order-item .order-body .goods-wraps .goods-img, }
.goods_list .order-item .order-body .goods-wraps .goods-info, });
.goods_list .order-item .order-footers { },
padding: 0; imageError(index) {
} this.orderList[index].sku_image = this.$util.getDefaultImage().goods;
</style> this.$forceUpdate();
},
toDetail(e) {
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
id: e
});
}
}
};
</script>
<style lang="scss">
@import './public/css/order.scss';
.goods-wraps {
align-items: center;
}
.goods_list .order-item .order-body .goods-wraps .goods-img,
.goods_list .order-item .order-body .goods-wraps .goods-info,
.goods_list .order-item .order-footers {
padding: 0;
}
</style>

View File

@@ -1,355 +1,381 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <view class="team-cate" v-if="storeToken && levelNum > 1">
<view class="team-cate" v-if="storeToken && levelNum > 1"> <block v-for="(item, index) in levelList" :key="index">
<block v-for="(item, index) in levelList" :key="index"> <view class="cate-li"
<view class="cate-li" :class="{ 'active color-base-text color-base-border': currentLevel == item.level }" @click="selectLevel(item.level)">{{ item.name }}</view> :class="{ 'active color-base-text color-base-border': currentLevel == item.level }"
</block> @click="selectLevel(item.level)">{{ item.name }}</view>
</view> </block>
<mescroll-uni ref="mescroll" @getData="getData" :top="levelNum > 1 ? 90 : 0" class="member-point" :size="8" v-if="storeToken"> </view>
<block slot="list"> <mescroll-uni ref="mescroll" @getData="getData" :top="levelNum > 1 ? 90 : 0" class="member-point" :size="8"
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)"> v-if="storeToken">
<view class="li-box" :class="{ active: index + 1 == teamList.length }"> <block slot="list">
<image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)" mode="aspectFill"></image> <view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0"
<image v-else :src="$util.getDefaultImage().head"></image> @click="toFenxiaoOrder(item)">
<view class="member-info"> <view class="li-box" :class="{ active: index + 1 == teamList.length }">
<view class="member-name"> <image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)"
<block v-if="item.is_fenxiao"> mode="aspectFill"></image>
<view class="left"> <image v-else :src="$util.getDefaultImage().head"></image>
<view class="flex-box"> <view class="member-info">
<view class="name">{{ item.nickname }}</view> <view class="member-name">
<view class="title color-base-border color-base-text">{{ fenxiaoWords.fenxiao_name }}</view> <block v-if="item.is_fenxiao">
</view> <view class="left">
<view class="color-tip font-size-goods-tag">加入时间{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view> <view class="flex-box">
</view> <view class="name">{{ item.nickname }}</view>
<view class="consume-info"> <view class="title color-base-border color-base-text">{{
<view> fenxiaoWords.fenxiao_name }}</view>
<text>{{ item.one_child_num }}</text> </view>
<view class="color-tip font-size-goods-tag">加入时间{{
</view> $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
<view> </view>
<text>{{ item.order_num }}</text> <view class="consume-info">
<view>
</view> <text>{{ item.one_child_num }}</text>
<view>
<text>{{ item.order_money | moneyFormat }}</text> </view>
<view>
</view> <text>{{ item.order_num }}</text>
</view>
</block> </view>
<block v-else> <view>
<view class="left"> <text>{{ item.order_money | moneyFormat }}</text>
<view class="flex-box">
<view class="name font-size-tag"> </view>
<text>{{ item.nickname }}</text> </view>
</view> </block>
</view> <block v-else>
<view class="color-tip font-size-goods-tag">加入时间{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view> <view class="left">
</view> <view class="flex-box">
<view class="consume-info"> <view class="name font-size-tag">
<view> <text>{{ item.nickname }}</text>
<text>0</text> </view>
</view>
</view> <view class="color-tip font-size-goods-tag">加入时间{{
<view> $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
<text>{{ item.order_num }}</text> </view>
<view class="consume-info">
</view> <view>
<view> <text>0</text>
<text>{{ item.order_money | moneyFormat }}</text>
</view>
</view> <view>
</view> <text>{{ item.order_num }}</text>
</block>
</view> </view>
</view> <view>
</view> <text>{{ item.order_money | moneyFormat }}</text>
</view>
<block v-if="teamList.length == 0 && emptyShow"><ns-empty text="暂无数据" :isIndex="false"></ns-empty></block> </view>
</block> </view>
</mescroll-uni> </block>
</view>
<ns-login ref="login"></ns-login> </view>
<loading-cover ref="loadingCover"></loading-cover> </view>
</view> </view>
</template> <block v-if="teamList.length == 0 && emptyShow"><ns-empty text="暂无数据" :isIndex="false"></ns-empty>
</block>
<script> </block>
import fenxiaoWords from 'common/js/fenxiao-words.js'; </mescroll-uni>
export default {
data() { <ns-login ref="login"></ns-login>
return { <loading-cover ref="loadingCover"></loading-cover>
levelList: [ </view>
{ </template>
name: '一级',
level: 1 <script>
}, import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
{ import nsLogin from '@/components/ns-login/ns-login.vue';
name: '二级', import loadingCover from '@/components/loading-cover/loading-cover.vue';
level: 2 import nsEmpty from '@/components/ns-empty/ns-empty.vue';
} // #ifdef MP-WEIXIN
], import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
currentLevel: 1, // #endif
teamList: [], import fenxiaoWords from 'common/js/fenxiao-words.js';
emptyShow: false, export default {
levelNum: 0, components: {
}; nsLogin,
}, MescrollUni,
mixins: [fenxiaoWords], loadingCover,
onShow() { nsEmpty,
setTimeout( () => { // #ifdef MP-WEIXIN
if (!this.addonIsExist.fenxiao) { privacyPopup
this.$util.showToast({ // #endif
title: '商家未开启分销', },
mask: true, data() {
duration: 2000 return {
}); levelList: [
setTimeout(() => { {
this.$util.redirectTo('/pages/index/index'); name: '一级',
}, 2000); level: 1
} },
},1000); {
name: '二级',
if (this.fenxiaoWords && this.fenxiaoWords.my_team) this.$langConfig.title(this.fenxiaoWords.my_team); level: 2
this.getFenXiaoLevel(); }
],
if (!this.storeToken) { currentLevel: 1,
this.$nextTick(() => { teamList: [],
this.$refs.login.open('/pages_promotion/fenxiao/team'); emptyShow: false,
}); levelNum: 0,
} };
}, },
methods: { mixins: [fenxiaoWords],
getData(mescroll) { onShow() {
this.emptyShow = false; setTimeout(() => {
if (mescroll.num == 1) { if (!this.addonIsExist.fenxiao) {
this.teamList = []; this.$util.showToast({
} title: '商家未开启分销',
this.$api.sendRequest({ mask: true,
url: '/fenxiao/api/fenxiao/team', duration: 2000
data: { });
page_size: mescroll.size, setTimeout(() => {
page: mescroll.num, this.$util.redirectTo('/pages/index/index');
level: this.currentLevel }, 2000);
}, }
success: res => { }, 1000);
this.emptyShow = true;
let newArr = []; if (this.fenxiaoWords && this.fenxiaoWords.my_team) this.$langConfig.title(this.fenxiaoWords.my_team);
let msg = res.message; this.getFenXiaoLevel();
if (res.code == 0 && res.data) {
newArr = res.data.list; if (!this.storeToken) {
} else { this.$nextTick(() => {
this.$util.showToast({ this.$refs.login.open('/pages_promotion/fenxiao/team');
title: msg });
}); }
} },
mescroll.endSuccess(newArr.length); methods: {
//设置列表数据 getData(mescroll) {
if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表 this.emptyShow = false;
this.teamList = this.teamList.concat(newArr); //追加新数据 if (mescroll.num == 1) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); this.teamList = [];
}, }
fail: res => { this.$api.sendRequest({
mescroll.endErr(); url: '/fenxiao/api/fenxiao/team',
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); data: {
} page_size: mescroll.size,
}); page: mescroll.num,
}, level: this.currentLevel
imageError(e) { },
this.teamList[e].headimg = this.$util.getDefaultImage().head; success: res => {
this.$forceUpdate(); this.emptyShow = true;
}, let newArr = [];
selectLevel(e) { let msg = res.message;
this.currentLevel = e; if (res.code == 0 && res.data) {
this.$refs.mescroll.refresh(); newArr = res.data.list;
}, } else {
toFenxiaoOrder(item) { this.$util.showToast({
if (item.fenxiao_id) { title: msg
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id }); });
} else { }
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id }); mescroll.endSuccess(newArr.length);
} //设置列表数据
}, if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表
async getFenXiaoLevel() { this.teamList = this.teamList.concat(newArr); //追加新数据
let res = await this.$api.sendRequest({ if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
url: '/fenxiao/api/config/basics', },
async: false, fail: res => {
success: res => {} mescroll.endErr();
}); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (res.code == 0 && res.data) { }
this.levelNum = res.data.level; });
} },
} imageError(e) {
}, this.teamList[e].headimg = this.$util.getDefaultImage().head;
watch: { this.$forceUpdate();
storeToken: function(nVal, oVal) { },
if (nVal) { selectLevel(e) {
this.$refs.mescroll.refresh(); this.currentLevel = e;
} this.$refs.mescroll.refresh();
} },
} toFenxiaoOrder(item) {
}; if (item.fenxiao_id) {
</script> this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id });
} else {
<style lang="scss"> this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id });
.team-cate { }
padding: 0 30rpx; },
width: calc(100%); async getFenXiaoLevel() {
height: 90rpx; let res = await this.$api.sendRequest({
display: flex; url: '/fenxiao/api/config/basics',
box-sizing: border-box; async: false,
background: #ffffff; success: res => { }
position: fixed; });
left: 0; if (res.code == 0 && res.data) {
top: var(--window-top); this.levelNum = res.data.level;
}
.cate-li { }
flex: 1; },
justify-content: center; watch: {
text-align: center; storeToken: function (nVal, oVal) {
align-items: center; if (nVal) {
display: inline-block; this.$refs.mescroll.refresh();
line-height: 90rpx; }
height: 100%; }
font-size: 30rpx; }
};
&.active { </script>
box-sizing: border-box;
border-bottom: 4rpx solid; <style lang="scss">
} .team-cate {
} padding: 0 30rpx;
} width: calc(100%);
height: 90rpx;
.team-member { display: flex;
width: 100%; box-sizing: border-box;
height: 70rpx; background: #ffffff;
line-height: 70rpx; position: fixed;
color: $color-tip; left: 0;
padding: 0 $padding; top: var(--window-top);
box-sizing: border-box;
} .cate-li {
flex: 1;
.team-li { justify-content: center;
margin: $margin-updown $margin-both; text-align: center;
padding: $margin-both; align-items: center;
box-sizing: border-box; display: inline-block;
background: #fff; line-height: 90rpx;
margin-bottom: 20rpx; height: 100%;
border-radius: 10rpx; font-size: 30rpx;
.li-box { &.active {
display: flex; box-sizing: border-box;
box-sizing: border-box; border-bottom: 4rpx solid;
align-items: center; }
}
image { }
width: 90rpx;
height: 90rpx; .team-member {
border-radius: 50%; width: 100%;
} height: 70rpx;
line-height: 70rpx;
.member-info { color: $color-tip;
flex: 1; padding: 0 $padding;
padding-left: $padding; box-sizing: border-box;
box-sizing: border-box; }
display: flex;
flex-direction: column; .team-li {
justify-content: center; margin: $margin-updown $margin-both;
padding: $margin-both;
.member-name { box-sizing: border-box;
display: flex; background: #fff;
justify-content: space-between; margin-bottom: 20rpx;
align-items: center; border-radius: 10rpx;
font-size: $font-size-base;
.li-box {
.left { display: flex;
width: 0; box-sizing: border-box;
flex: 1; align-items: center;
.flex-box { image {
display: flex; width: 90rpx;
align-items: center; height: 90rpx;
margin-bottom: 6rpx; border-radius: 50%;
} }
.name { .member-info {
overflow: hidden; flex: 1;
text-overflow: ellipsis; padding-left: $padding;
white-space: nowrap; box-sizing: border-box;
} display: flex;
flex-direction: column;
.title { justify-content: center;
padding: 4rpx 16rpx;
justify-content: center; .member-name {
align-items: center; display: flex;
text-align: center; justify-content: space-between;
font-size: $font-size-activity-tag; align-items: center;
border-radius: 4rpx; font-size: $font-size-base;
margin-left: 10rpx;
line-height: 1; .left {
border: 2rpx solid; width: 0;
color: #fff; flex: 1;
}
} .flex-box {
display: flex;
.consume-info { align-items: center;
text-align: right; margin-bottom: 6rpx;
}
text {
margin-right: 6rpx; .name {
} overflow: hidden;
text-overflow: ellipsis;
view { white-space: nowrap;
line-height: 1.5; }
font-size: 24rpx;
} .title {
} padding: 4rpx 16rpx;
} justify-content: center;
align-items: center;
.member-date { text-align: center;
display: flex; font-size: $font-size-activity-tag;
justify-content: space-between; border-radius: 4rpx;
align-items: center; margin-left: 10rpx;
margin-top: $padding; line-height: 1;
border: 2rpx solid;
view { color: #fff;
width: 50%; }
height: 100%; }
text-align: left;
line-height: 1; .consume-info {
text-align: right;
text {
font-size: $font-size-tag; text {
color: $color-tip; margin-right: 6rpx;
} }
.tit { view {
color: $color-tip; line-height: 1.5;
} font-size: 24rpx;
} }
} }
} }
.btn-see { .member-date {
display: flex; display: flex;
flex-direction: row-reverse; justify-content: space-between;
} align-items: center;
} margin-top: $padding;
.order-box-btn {
display: inline-block; view {
line-height: 56rpx; width: 50%;
padding: 0 30rpx; height: 100%;
font-size: 26rpx; text-align: left;
color: #303133; line-height: 1;
border: 2rpx solid #999;
-webkit-box-sizing: border-box; text {
box-sizing: border-box; font-size: $font-size-tag;
-webkit-border-radius: $border-radius; color: $color-tip;
border-radius: $border-radius; }
margin-top: 30rpx;
} .tit {
.li-box.active { color: $color-tip;
border: none; }
} }
} }
</style> }
.btn-see {
display: flex;
flex-direction: row-reverse;
}
}
.order-box-btn {
display: inline-block;
line-height: 56rpx;
padding: 0 30rpx;
font-size: 26rpx;
color: #303133;
border: 2rpx solid #999;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: $border-radius;
border-radius: $border-radius;
margin-top: 30rpx;
}
.li-box.active {
border: none;
}
}
</style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="bank-account-wrap" @click="goAccount()"> <view class="bank-account-wrap" @click="goAccount()">
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance"> <view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance">
<text class="tx-to">提现到</text> <text class="tx-to">提现到</text>

View File

@@ -1,209 +1,224 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <mescroll-uni @getData="getData" class="member-point">
<mescroll-uni @getData="getData" class="member-point"> <view slot="list">
<view slot="list"> <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" @click="toDetail(item.id)">
<view class="detailed-item" v-for="(item, index) in withdrawList" :key="index" @click="toDetail(item.id)"> <view class="info">
<view class="info"> <view class="event">{{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}</view>
<view class="event">{{ item.transfer_type=='balance'&&'余额' || 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">{{ item.status_name }}</view>
<view class="status-name" :style="withdrawState[item.status].color">{{ item.status_name }}</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </block>
</block> <block v-else>
<block v-else> <ns-empty :isIndex="false" text="暂无提现记录"></ns-empty>
<ns-empty :isIndex="false" text="暂无提现记录"></ns-empty> </block>
</block> </view>
</view> </mescroll-uni>
</mescroll-uni> <ns-login ref="login"></ns-login>
<ns-login ref="login"></ns-login> <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 fenxiaoWords from 'common/js/fenxiao-words.js'; import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue';
export default { import nsEmpty from '@/components/ns-empty/ns-empty.vue';
data() { // #ifdef MP-WEIXIN
return { import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
withdrawState: { // #endif
'3': { import fenxiaoWords from 'common/js/fenxiao-words.js';
color: 'color: rgb(255, 69, 68)',
text: '已转账' export default {
}, components: {
'1': { nsLogin,
color: 'color: rgb(255, 160, 68)', MescrollUni,
text: '待审核' loadingCover,
}, nsEmpty,
'2': { // #ifdef MP-WEIXIN
color: 'color: rgb(17, 189, 100)', privacyPopup
text: '已审核' // #endif
}, },
'-1': { data() {
color: 'color: rgb(255, 69, 68)', return {
text: '已拒绝' withdrawState: {
} '3': {
}, color: 'color: rgb(255, 69, 68)',
withdrawList: [], text: '已转账'
emptyShow: false, },
}; '1': {
}, color: 'color: rgb(255, 160, 68)',
onShow() { text: '待审核'
setTimeout( () => { },
if (!this.addonIsExist.fenxiao) { '2': {
this.$util.showToast({ color: 'color: rgb(17, 189, 100)',
title: '商家未开启分销', text: '已审核'
mask: true, },
duration: 2000 '-1': {
}); color: 'color: rgb(255, 69, 68)',
setTimeout(() => { text: '已拒绝'
this.$util.redirectTo('/pages/index/index'); }
}, 2000); },
} withdrawList: [],
},1000); emptyShow: false,
};
if(this.fenxiaoWords && this.fenxiaoWords.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细'); },
onShow() {
if (!this.storeToken) { setTimeout( () => {
this.$nextTick(() => { if (!this.addonIsExist.fenxiao) {
this.$refs.login.open('/pages_promotion/fenxiao/withdraw_list'); this.$util.showToast({
}); title: '商家未开启分销',
} mask: true,
}, duration: 2000
mixins: [fenxiaoWords], });
methods: { setTimeout(() => {
//获得列表数据 this.$util.redirectTo('/pages/index/index');
getData(mescroll) { }, 2000);
this.emptyShow = false; }
if (mescroll.num == 1) { },1000);
this.withdrawList = [];
} if(this.fenxiaoWords && this.fenxiaoWords.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细');
this.$api.sendRequest({
url: '/fenxiao/api/withdraw/page', if (!this.storeToken) {
data: { this.$nextTick(() => {
page_size: mescroll.size, this.$refs.login.open('/pages_promotion/fenxiao/withdraw_list');
page: mescroll.num, });
}, }
success: res => { },
this.emptyShow = true; mixins: [fenxiaoWords],
let newArr = []; methods: {
let msg = res.message; //获得列表数据
if (res.code == 0 && res.data && res.data.list) { getData(mescroll) {
newArr = res.data.list; this.emptyShow = false;
} else { if (mescroll.num == 1) {
this.$util.showToast({ this.withdrawList = [];
title: msg }
}); this.$api.sendRequest({
} url: '/fenxiao/api/withdraw/page',
mescroll.endSuccess(newArr.length); data: {
//设置列表数据 page_size: mescroll.size,
if (mescroll.num == 1) this.withdrawList = []; //如果是第一页需手动制空列表 page: mescroll.num,
this.withdrawList = this.withdrawList.concat(newArr); //追加新数据 },
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); success: res => {
}, this.emptyShow = true;
fail: res => { let newArr = [];
mescroll.endErr(); let msg = res.message;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (res.code == 0 && res.data && res.data.list) {
} newArr = res.data.list;
}); } else {
}, this.$util.showToast({
toDetail(id) { title: msg
this.$util.redirectTo('/pages_promotion/fenxiao/withdrawal_detail', { });
id: id }
}); mescroll.endSuccess(newArr.length);
} //设置列表数据
} if (mescroll.num == 1) this.withdrawList = []; //如果是第一页需手动制空列表
}; this.withdrawList = this.withdrawList.concat(newArr); //追加新数据
</script> if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
<style lang="scss"> fail: res => {
.account-box { mescroll.endErr();
width: 100vw; if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
padding: 30rpx; }
box-sizing: border-box; });
padding-bottom: 10rpx; },
display: flex; toDetail(id) {
justify-content: space-between; this.$util.redirectTo('/pages_promotion/fenxiao/withdrawal_detail', {
align-items: center; id: id
});
.tit { }
color: #fff; }
line-height: 1; };
} </script>
.iconmn_jifen_fill { <style lang="scss">
font-size: 60rpx; .account-box {
color: #fff; width: 100vw;
} padding: 30rpx;
box-sizing: border-box;
.point { padding-bottom: 10rpx;
color: #fff; display: flex;
font-size: 60rpx; justify-content: space-between;
margin-left: 10rpx; align-items: center;
}
} .tit {
color: #fff;
.detailed-wrap { line-height: 1;
.head { }
display: flex;
height: 90rpx; .iconmn_jifen_fill {
font-size: 60rpx;
& > view { color: #fff;
flex: 1; }
text-align: left;
padding: 0 $padding; .point {
line-height: 90rpx; color: #fff;
} font-size: 60rpx;
} margin-left: 10rpx;
}
.cont { }
background: #fff;
.detailed-wrap {
.detailed-item { .head {
padding: $padding 10rpx; display: flex;
margin: 0 $margin-both; height: 90rpx;
border-bottom: 2rpx solid #eee;
position: relative; & > view {
flex: 1;
&:last-of-type { text-align: left;
border-bottom: none; padding: 0 $padding;
} line-height: 90rpx;
}
.info { }
padding-right: 180rpx;
.cont {
.event { background: #fff;
font-size: $font-size-base;
line-height: 1.3; .detailed-item {
} padding: $padding 10rpx;
margin: 0 $margin-both;
.time { border-bottom: 2rpx solid #eee;
font-size: $font-size-base; position: relative;
color: $color-tip;
} &:last-of-type {
} border-bottom: none;
}
.right-wrap {
position: absolute; .info {
right: 0; padding-right: 180rpx;
top: 0;
text-align: right; .event {
font-size: $font-size-base;
.num { line-height: 1.3;
font-size: $font-size-toolbar; }
}
} .time {
} font-size: $font-size-base;
} color: $color-tip;
} }
</style> }
.right-wrap {
position: absolute;
right: 0;
top: 0;
text-align: right;
.num {
font-size: $font-size-toolbar;
}
}
}
}
}
</style>

View File

@@ -1,127 +1,126 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view> <view class="money-wrap">
<view class="money-wrap"> <text>-{{ detail.money }}</text>
<text>-{{ detail.money }}</text> </view>
</view>
<!-- 状态0待审核1.待转账2已转账 -1拒绝' -->
<!-- 状态0待审核1.待转账2已转账 -1拒绝' --> <view class="item">
<view class="item"> <view class="line-wrap">
<view class="line-wrap"> <text class="label">当前状态</text>
<text class="label">当前状态</text> <text class="value">{{ detail.status_name }}</text>
<text class="value">{{ detail.status_name }}</text> </view>
</view> <view class="line-wrap">
<view class="line-wrap"> <text class="label">交易号</text>
<text class="label">交易号</text> <text class="value">{{ detail.withdraw_no }}</text>
<text class="value">{{ detail.withdraw_no }}</text> </view>
</view> <view class="line-wrap">
<view class="line-wrap"> <text class="label">手续费</text>
<text class="label">手续费</text> <text class="value">¥{{ detail.withdraw_rate_money }}</text>
<text class="value">¥{{ detail.withdraw_rate_money }}</text> </view>
</view> <view class="line-wrap">
<view class="line-wrap"> <text class="label">申请时间</text>
<text class="label">申请时间</text> <text class="value">{{ $util.timeStampTurnTime(detail.create_time) }}</text>
<text class="value">{{ $util.timeStampTurnTime(detail.create_time) }}</text> </view>
</view> <view class="line-wrap" v-if="detail.status">
<view class="line-wrap" v-if="detail.status"> <text class="label">审核时间</text>
<text class="label">审核时间</text> <text class="value">{{ $util.timeStampTurnTime(detail.audit_time) }}</text>
<text class="value">{{ $util.timeStampTurnTime(detail.audit_time) }}</text> </view>
</view> <view class="line-wrap" v-if="detail.bank_name">
<view class="line-wrap" v-if="detail.bank_name"> <text class="label">银行名称</text>
<text class="label">银行名称</text> <text class="value">{{ detail.bank_name }}</text>
<text class="value">{{ detail.bank_name }}</text> </view>
</view> <view class="line-wrap" v-if="detail.account_number">
<view class="line-wrap" v-if="detail.account_number"> <text class="label">收款账号</text>
<text class="label">收款账号</text> <text class="value">{{ detail.account_number }}</text>
<text class="value">{{ detail.account_number }}</text> </view>
</view> <view class="line-wrap" v-if="detail.status == -1 && detail.refuse_reason">
<view class="line-wrap" v-if="detail.status == -1 && detail.refuse_reason"> <text class="label">拒绝理由</text>
<text class="label">拒绝理由</text> <text class="value">{{ detail.refuse_reason }}</text>
<text class="value">{{ detail.refuse_reason }}</text> </view>
</view> <view class="line-wrap" v-if="detail.status == 3">
<view class="line-wrap" v-if="detail.status == 3"> <text class="label">转账方式名称</text>
<text class="label">转账方式名称</text> <text class="value">{{ detail.transfer_name }}</text>
<text class="value">{{ detail.transfer_name }}</text> </view>
</view> <view class="line-wrap" v-if="detail.status == 3">
<view class="line-wrap" v-if="detail.status == 3"> <text class="label">转账时间</text>
<text class="label">转账时间</text> <text class="value">{{ $util.timeStampTurnTime(detail.payment_time) }}</text>
<text class="value">{{ $util.timeStampTurnTime(detail.payment_time) }}</text> </view>
</view> </view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
<loading-cover ref="loadingCover"></loading-cover> </view>
</view> </template>
</template>
<script>
<script> export default {
export default { data() {
data() { return {
return { id: 0,
id: 0, detail: {}
detail: {} };
}; },
}, onLoad(option) {
onLoad(option) { this.id = option.id || 0;
this.id = option.id || 0; },
}, onShow() {
onShow() { if (this.storeToken) {
if (this.storeToken) { this.getDetail();
this.getDetail(); } else {
} else { this.$util.redirectTo('/pages_tool/login/login', {
this.$util.redirectTo('/pages_tool/login/login', { back: '/pages_promotion/fenxiao/withdraw_list'
back: '/pages_promotion/fenxiao/withdraw_list' }, 'redirectTo');
}, 'redirectTo'); }
} },
}, methods: {
methods: { getDetail() {
getDetail() { this.$api.sendRequest({
this.$api.sendRequest({ url: '/fenxiao/api/withdraw/detail',
url: '/fenxiao/api/withdraw/detail', data: {
data: { id: this.id
id: this.id },
}, success: res => {
success: res => { if (res.data) {
if (res.data) { this.detail = res.data;
this.detail = res.data; }
} if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); },
}, fail: res => {
fail: res => { if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); }
} });
}); }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> .money-wrap {
.money-wrap { text-align: center;
text-align: center; font-size: 50rpx;
font-size: 50rpx; font-weight: bold;
font-weight: bold; margin: 40rpx;
margin: 40rpx; border-bottom: 2rpx solid $color-line;
border-bottom: 2rpx solid $color-line; padding: 40rpx;
padding: 40rpx; }
}
.item {
.item { margin: 40rpx;
margin: 40rpx;
.line-wrap {
.line-wrap { margin-bottom: 20rpx;
margin-bottom: 20rpx;
.label {
.label { display: inline-block;
display: inline-block; width: 200rpx;
width: 200rpx; color: $color-tip;
color: $color-tip; font-size: $font-size-base;
font-size: $font-size-base; }
}
.value {
.value { display: inline-block;
display: inline-block; font-size: $font-size-base;
font-size: $font-size-base; }
} }
} }
} </style>
</style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="content" :style="themeColor">
<view class="content">
<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;">
@@ -79,7 +78,7 @@
<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> <text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
</view> </view>
@@ -164,7 +163,7 @@
<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> <text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '询底价' }}</text>
</view> </view>
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)"> <view class="member-price-tag" 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>
@@ -294,13 +293,27 @@
import uniDrawer from '@/components/uni-drawer/uni-drawer.vue'; import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
import uniTag from '@/components/uni-tag/uni-tag.vue'; import uniTag from '@/components/uni-tag/uni-tag.vue';
import nsGoodsSkuIndex from '@/components/ns-goods-sku/ns-goods-sku-index.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'; import list from './public/js/list.js';
export default { export default {
components: { components: {
uniDrawer, uniDrawer,
uniTag, uniTag,
nsGoodsSkuIndex nsGoodsSkuIndex,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
data() { data() {
return {}; return {};

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="category-page-wrap category-template-1" style="height: calc(-56px + 100vh);"> <view class="category-page-wrap category-template-1" style="height: calc(-56px + 100vh);">
<!-- <view class="search-box" @click="$util.redirectTo('/pages_tool/goods/search')"> <!-- <view class="search-box" @click="$util.redirectTo('/pages_tool/goods/search')">

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view scroll-y="true" class="goods-detail" :class="isIphoneX ? 'active' : ''"> <view scroll-y="true" class="goods-detail" :class="isIphoneX ? 'active' : ''">
<view class="goods-container"> <view class="goods-container">
<view class="goods-media"> <view class="goods-media">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="content" :style="themeColor">
<view class="content">
<view class="head-wrap"> <view class="head-wrap">
<!-- 搜索区域 --> <!-- 搜索区域 -->
<view class="search-wrap uni-flex uni-row"> <view class="search-wrap uni-flex uni-row">
@@ -116,11 +115,25 @@
</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 uniDrawer from '@/components/uni-drawer/uni-drawer.vue'; import uniDrawer from '@/components/uni-drawer/uni-drawer.vue';
export default { export default {
components: { components: {
uniDrawer, uniDrawer,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
data() { data() {
return { return {

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="conteiner" :style="themeColor">
<view class="conteiner">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="point-navbar" <view class="point-navbar"
:style="{'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }"> :style="{'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="order-container" :style="themeColor">
<view class="order-container">
<view class="order-nav" v-if="storeToken"> <view class="order-nav" v-if="storeToken">
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap"> <view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
<text class="uni-tab-item-title" :class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''"> <text class="uni-tab-item-title" :class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''">
@@ -84,7 +83,24 @@
</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: {
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() { data() {
return { return {
orderList: [], orderList: [],

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="order-container" :style="themeColor" :class="{ 'safe-area': isIphoneX }">
<view class="order-container" :class="{ 'safe-area': isIphoneX }">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="payment-navbar" :style="{ <view class="payment-navbar" :style="{
'padding-top': menuButtonBounding.top + 'px', 'padding-top': menuButtonBounding.top + 'px',
@@ -280,10 +279,26 @@
<script> <script>
import payment from './public/js/payment.js'; import payment from './public/js/payment.js';
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
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 {
components: { components: {
uniPopup, uniPopup,
nsSelectTime,
nsLogin,
MescrollUni,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
mixins: [payment] mixins: [payment]
}; };
@@ -292,18 +307,18 @@
<style lang="scss"> <style lang="scss">
@import "@/common/css/order_parment.scss"; @import "@/common/css/order_parment.scss";
</style> </style>
<style scoped> <style lang="scss" scoped>
/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;
} }
>>>.uni-popup__wrapper { /deep/ .uni-popup__wrapper {
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
} }
>>>.uni-popup { /deep/ .uni-popup {
z-index: 8; z-index: 8;
} }
</style> </style>

View File

@@ -1,93 +1,92 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container"> <view class="image-wrap">
<view class="image-wrap"> <image :src="$util.img('public/uniapp/pay/pay_success.png')" class="result-image" mode="widthFix"></image>
<image :src="$util.img('public/uniapp/pay/pay_success.png')" class="result-image" mode="widthFix"></image> </view>
</view> <view class="msg">{{ $lang('exchangeSuccess') }}</view>
<view class="msg">{{ $lang('exchangeSuccess') }}</view> <view class="action">
<view class="action"> <view class="btn color-base-border color-base-text" @click="toOrderList()">{{ $lang('see') }}</view>
<view class="btn color-base-border color-base-text" @click="toOrderList()">{{ $lang('see') }}</view> <view class="btn go-home color-base-bg" @click="toIndex">{{ $lang('goHome') }}</view>
<view class="btn go-home color-base-bg" @click="toIndex">{{ $lang('goHome') }}</view> </view>
</view> </view>
</view> </template>
</template>
<script>
<script> export default {
export default { data() {
data() { return {};
return {}; },
}, onShow() {
onShow() { },
}, methods: {
methods: { toOrderList() {
toOrderList() { this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo'); },
}, toIndex() {
toIndex() { this.$util.redirectTo('/pages/index/index');
this.$util.redirectTo('/pages/index/index'); }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> .container {
.container { width: 100vw;
width: 100vw; height: 100vh;
height: 100vh; background: #fff;
background: #fff;
.image-wrap {
.image-wrap { display: flex;
display: flex; justify-content: center;
justify-content: center; padding: 200rpx 0 40rpx 0;
padding: 200rpx 0 40rpx 0;
.result-image {
.result-image { width: 166rpx;
width: 166rpx; }
} }
}
.msg {
.msg { text-align: center;
text-align: center; line-height: 1;
line-height: 1; margin-bottom: 50rpx;
margin-bottom: 50rpx; font-size: $font-size-base;
font-size: $font-size-base; color: #000;
color: #000; }
}
.pay-amount {
.pay-amount { color: #999;
color: #999; text-align: center;
text-align: center; line-height: 1;
line-height: 1; margin-bottom: 30rpx;
margin-bottom: 30rpx; }
}
.action {
.action { width: 90%;
width: 90%; margin: 0 auto;
margin: 0 auto; text-align: center;
text-align: center; margin-top: 150rpx;
margin-top: 150rpx; display: flex;
display: flex; justify-content: space-between;
justify-content: space-between;
.btn {
.btn { width: 310rpx;
width: 310rpx; height: 78rpx;
height: 78rpx; border: 2rpx solid #ffffff;
border: 2rpx solid #ffffff; border-radius: $border-radius;
border-radius: $border-radius; font-size: $font-size-tag;
font-size: $font-size-tag; display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
justify-content: center; }
}
.alone {
.alone { margin-left: 0;
margin-left: 0; width: 60%;
width: 60%; }
}
.go-home {
.go-home { color: #fff;
color: #fff; }
} }
} }
} </style>
</style>

View File

@@ -1,55 +1,54 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view style="padding: 20rpx;" :style="themeColor">
<view style="padding: 20rpx;"> <rich-text :nodes="content"></rich-text>
<rich-text :nodes="content"></rich-text> </view>
</view> </template>
</template>
<script>
<script> import htmlParser from '@/common/js/html-parser';
import htmlParser from '@/common/js/html-parser'; export default {
export default { components: {
components: { },
}, data() {
data() { return {
return { content:'',
content:'', type:'',
type:'', uniacid:0
uniacid:0 };
}; },
}, onLoad(option) {
onLoad(option) { this.type = option.type
this.type = option.type this.uniacid = option.uniacid?option.uniacid:0
this.uniacid = option.uniacid?option.uniacid:0
this.isIphoneX = this.$util.uniappIsIPhoneX()
this.isIphoneX = this.$util.uniappIsIPhoneX() this.getcontent()
this.getcontent() },
}, onShow() {
onShow() {
},
}, methods: {
methods: { getcontent() {
getcontent() { // privacy content
// privacy content var data = {
var data = { type:this.type
type:this.type }
} if(this.uniacid > 0) data.uniacid = this.uniacid
if(this.uniacid > 0) data.uniacid = this.uniacid this.$api.sendRequest({
this.$api.sendRequest({ url: '/api/config/agreement',
url: '/api/config/agreement', data:data,
data:data, success: res => {
success: res => { console.log(res.data.title)
console.log(res.data.title) uni.setNavigationBarTitle({
uni.setNavigationBarTitle({ title:res.data.title
title:res.data.title })
}) this.content = res.data.content
this.content = res.data.content }
} });
}); }
} }
} };
}; </script>
</script>
<style lang="scss">
<style lang="scss">
</style> </style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="page" :style="themeColor">
<view class="page">
<view class="help-title">{{ detail.article_title }}</view> <view class="help-title">{{ detail.article_title }}</view>
<view class="help-meta" v-if="detail.is_show_release_time == 1"> <view class="help-meta" v-if="detail.is_show_release_time == 1">
<text class="help-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text> <text class="help-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<mescroll-uni @getData="getData" ref="mescroll"> <mescroll-uni @getData="getData" ref="mescroll">
<block slot="list"> <block slot="list">
<view class="article-wrap" v-if="list.length"> <view class="article-wrap" v-if="list.length">
@@ -35,6 +34,14 @@
<script> <script>
import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.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 {
data() { data() {
return { return {
@@ -42,7 +49,14 @@
}; };
}, },
components: { components: {
nsAdv nsAdv,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
onShow() { onShow() {
this.setPublicShare(); this.setPublicShare();

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="about w100"> <view class="about w100">
<view class="bg border-top"></view> <view class="bg border-top"></view>
<view class="list_cotact padding-top"> <view class="list_cotact padding-top">
@@ -11,7 +10,7 @@
style="background: #1daa39;width: 100%;border-radius: 10rpx;"> style="background: #1daa39;width: 100%;border-radius: 10rpx;">
<view class="bl bor" style="box-sizing: border-box;"> <view class="bl bor" style="box-sizing: border-box;">
<image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image> <image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image>
<view class="name bl line1" style="margin-top: 6rpx;">在线留言</view> <view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -23,19 +22,20 @@
<button class="bl bor" hoverClass="none" openType="contact" sessionFrom="weapp" <button class="bl bor" hoverClass="none" openType="contact" sessionFrom="weapp"
showMessageCard="true" style="margin: 0;"> showMessageCard="true" style="margin: 0;">
<image mode="heightFix" :src="$util.img('public/static/img/kefu.png')"></image> <image mode="heightFix" :src="$util.img('public/static/img/kefu.png')"></image>
<view class="name bl line1">专属客服</view> <view class="name bl line1">{{ $lang('exclusiveCustomerService') }}</view>
</button> </button>
</view> </view>
<view @click="tapMessage" class="view_li w50_li text-center"> <view @click="tapMessage" class="view_li w50_li text-center">
<view class="bl bor" style="box-sizing: border-box;"> <view class="bl bor" style="box-sizing: border-box;">
<image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image> <image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image>
<view class="name bl line1" style="margin-top: 6rpx;">在线留言</view> <view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<view class="view_ul_100" v-for="(item, index) in dataList" :key="index" style="margin-bottom: 20rpx;"> <view class="view_ul_100" v-for="(item, index) in dataList" :key="index"
style="margin-bottom: 20rpx;">
<view class="bl clearfix bor bg-white" <view class="bl clearfix bor bg-white"
:style="{ backgroundImage: ' url(' + $util.img(personnel_bg) + ')', backgroundSize: '100% 100%' }"> :style="{ backgroundImage: ' url(' + $util.img(personnel_bg) + ')', backgroundSize: '100% 100%' }">
@@ -51,10 +51,7 @@
<image mode="widthFix" :src="$util.img('public/static/img/boda.png')" <image mode="widthFix" :src="$util.img('public/static/img/boda.png')"
style="margin-top: 8rpx;margin-right: 10rpx;"></image> style="margin-top: 8rpx;margin-right: 10rpx;"></image>
<view style="flex: 1;">{{ item.mobile }}</view> <view style="flex: 1;">{{ item.mobile }}</view>
<view <view class="btn-container" @click="Tel(item.mobile)"><span class="contact-btn" style="background: #0054a5;">{{ $lang('call') }}</span>
style="margin-top: 0rpx;margin-left: 10rpx;font-size: 26rpx;color:rgba(71,71,71,.79)"
@click="Tel(item.mobile)"><span
style="background: #0054a5;color:#fff;padding: 10rpx 30rpx;font-size: 24rpx;border-radius: 50rpx;">一键拨打</span>
</view> </view>
</view> </view>
<view class="contact_name" <view class="contact_name"
@@ -62,10 +59,7 @@
<image mode="widthFix" :src="$util.img('public/static/img/emall.png')" <image mode="widthFix" :src="$util.img('public/static/img/emall.png')"
style="margin-top: 8rpx;margin-right: 10rpx;"></image> style="margin-top: 8rpx;margin-right: 10rpx;"></image>
<view style="flex: 1;">{{ item.email }}</view> <view style="flex: 1;">{{ item.email }}</view>
<view <view class="btn-container" @click="copy(item.email)"><span class="contact-btn" style="background: #888;">{{ $lang('copy') }}</span>
style="margin-top: 0rpx;margin-left: 10rpx;font-size: 26rpx;color:rgba(71,71,71,.79)"
@click="tomap()"><span
style="background: #888;color:#fff;padding: 10rpx 30rpx;font-size: 24rpx;border-radius: 50rpx;">立即导航</span>
</view> </view>
</view> </view>
</view> </view>
@@ -90,7 +84,7 @@
:longitude="shop.longitude" :latitude="shop.latitude" show-location> :longitude="shop.longitude" :latitude="shop.latitude" show-location>
<cover-view <cover-view
style="position:absolute;right:10px;bottom:30rpx;z-index:9;background:#4d83ff;padding:5px 10px;wxcs_style_padding:10rpx 20rpx;border-radius:8rpx;color: #fff;" style="position:absolute;right:10px;bottom:30rpx;z-index:9;background:#4d83ff;padding:5px 10px;wxcs_style_padding:10rpx 20rpx;border-radius:8rpx;color: #fff;"
@click="tomap"><cover-view style="font-size:24rpx">一键导航</cover-view> @click="tomap"><cover-view style="font-size:24rpx">{{ $lang('oneClickNavigation') }}</cover-view>
</cover-view> </cover-view>
</map> </map>
</view> </view>
@@ -110,45 +104,42 @@
<uni-popup ref="informationPopup" type="bottom" @change="change"> <uni-popup ref="informationPopup" type="bottom" @change="change">
<view class="liuyan-popup-layer popup-layer"> <view class="liuyan-popup-layer popup-layer">
<view class="head-wrap" @click="closeinformationPopup()"> <view class="head-wrap" @click="closeinformationPopup()">
<text>在线留言</text> <text>{{ $lang('onlineMessage') }}</text>
<text class="iconfont icon-close"></text> <text class="iconfont icon-close"></text>
</view> </view>
<scroll-view scroll-y class="liuyan-body"> <scroll-view scroll-y class="liuyan-body">
<view style="padding: 0 30rpx;"> <view style="padding: 0 30rpx;">
<view class="fui-cell-group"> <view class="fui-cell-group">
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label ">姓名</view> <view class="fui-cell-label ">{{ $lang('name') }}</view>
<view class="fui-cell-info"> <view class="fui-cell-info">
<input v-model="Form.realname" class="fui-input" placeholder="请输入您的姓名" <input v-model="Form.realname" class="fui-input" :placeholder="$lang('pleaseEnterName')" value=""></input>
value=""></input>
</view> </view>
</view> </view>
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label">联系方式</view> <view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
<view class="fui-cell-info"> <view class="fui-cell-info">
<input v-model="Form.mobile" class="fui-input" maxlength="11" <input v-model="Form.mobile" class="fui-input" maxlength="11" :placeholder="$lang('pleaseEnterMobile')" type="number"></input>
placeholder="请输入您的手机号" type="number"></input>
</view> </view>
</view> </view>
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label" style="position: absolute;top:10px">留言内容</view> <view class="fui-cell-label" style="position: absolute;top:10px">{{ $lang('messageContent') }}</view>
<view class="fui-cell-info" style="margin-left: 160rpx;border: solid 2rpx #eee;"> <view class="fui-cell-info" style="margin-left: 160rpx;border: solid 2rpx #eee;">
<!-- <input v-model="Form.mailbox" class="fui-input" placeholder="请输入您的邮箱" type="text" ></input> --> <!-- <input v-model="Form.mailbox" class="fui-input" placeholder="请输入您的邮箱" type="text" ></input> -->
<textarea class="textarea" v-model="Form.remark" placeholder="请输入留言内容" <textarea class="textarea" v-model="Form.remark" :placeholder="$lang('pleaseEnterMessage')" style="font-size: 28rpx;padding: 10rpx;"></textarea>
style="font-size: 28rpx;padding: 10rpx;"></textarea>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="button-box"><button type="primary" @click="save()">提交</button></view> <view class="button-box"><button type="primary" @click="save()">{{ $lang('submit') }}</button></view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top> <to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<hover-nav></hover-nav>
<diy-bottom-nav></diy-bottom-nav>
</view> </view>
<hover-nav></hover-nav>
<diy-bottom-nav></diy-bottom-nav>
</template> </template>
<script> <script>
@@ -273,18 +264,23 @@ export default {
copy(text) { copy(text) {
uni.setClipboardData({ uni.setClipboardData({
data: text, data: text,
success: function () { success: () => {
console.log('复制成功'); console.log('复制成功');
// 可以添加用户友好的提示例如使用uni.showToast提示复制成功 // 可以添加用户友好的提示例如使用uni.showToast提示复制成功
uni.showToast({ uni.showToast({
title: '复制成功', title: this.$lang('copySuccess'),
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}); });
}, },
fail: function () { fail: (err) => {
console.log('复制失败'); console.log('复制失败');
// 可以添加错误处理或用户友好的提示 // 可以添加错误处理或用户友好的提示
uni.showToast({
title: err.message || err.errMsg || this.$lang('copyFailed'),
icon: 'none',
duration: 2000
});
} }
}); });
}, },
@@ -292,7 +288,7 @@ export default {
uni.openLocation({ uni.openLocation({
latitude: parseFloat(this.shop.latitude), latitude: parseFloat(this.shop.latitude),
longitude: parseFloat(this.shop.longitude), longitude: parseFloat(this.shop.longitude),
name: "一键导航", name: this.$lang('oneClickNavigation'),
}) })
} }
} }
@@ -547,6 +543,27 @@ image {
padding-left: 0rpx; padding-left: 0rpx;
} }
.btn-container {
white-space: nowrap;
min-width: 140rpx;
width: max-content;
margin-top: 0rpx;
margin-left: 10rpx;
font-size: 26rpx;
color: rgba(71, 71, 71, .79);
text-align: center;
}
.contact-btn {
color: #fff;
padding: 6rpx 30rpx;
font-size: 24rpx;
border-radius: 50rpx;
min-width: 100rpx;
display: inline-block;
text-align: center;
}
.contact_name image { .contact_name image {
opacity: .79; opacity: .79;
width: 30rpx; width: 30rpx;
@@ -564,17 +581,16 @@ image {
width: 90rpx; width: 90rpx;
z-index: 9999; z-index: 9999;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .mescroll-totop { /deep/ .mescroll-totop {
right: 27rpx!important; right: 27rpx !important;
/* #ifdef H5 */ /* #ifdef H5 */
bottom: 120rpx!important; bottom: 120rpx !important;
/* #endif */ /* #endif */
/* #ifdef MP-WEIXIN */ /* #ifdef MP-WEIXIN */
bottom: 180rpx!important; bottom: 180rpx !important;
/* #endif */ /* #endif */
} }
</style> </style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="page" v-if="detail"> <view class="page" v-if="detail">
<view class="form-banner"> <view class="form-banner">
<image :src="$util.img('public/uniapp/form/banner.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/form/banner.png')" mode="widthFix"></image>

View File

@@ -0,0 +1,165 @@
<template>
<view>
<block v-if="detail">
<view class="page">
<view class="system-form-wrap">
<view class="form-title" style="text-align:center;padding-top:40rpx;font-weight:600;font-size:30rpx;">
请填写表单所需信息
</view>
<ns-newform ref="form" :data="detail.json_data" @submit="create"></ns-newform>
<button class="button mini" style="font-size:32rpx;" type="primary" size="mini" @click="create">提交</button>
</view>
</view>
</block>
<block v-else>
<ns-empty :text="complete ? '提交成功' : '未获取到表单信息'" :isIndex="false"></ns-empty>
</block>
<loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login>
</view>
</template>
<script>
export default {
data() {
return {
id: 0,
detail: null,
isRepeat: false,
complete: false,
scroll: true,
uniacid: 0
}
},
onLoad(options) {
if (!options.uniacid) {
uni.showModal({
title: '提示',
content: '参数错误',
showCancel: false,
success: () => {}
})
return false
}
this.uniacid = options.uniacid
this.id = options.id || 0
if (options.scene) {
const scene = decodeURIComponent(options.scene)
const params = scene.split('&')
params.length && params.forEach(item => {
if (item.indexOf('id') != -1) {
this.id = item.split('-')[1]
}
})
}
this.getData()
},
watch: {
storeToken(newVal, oldVal) {
newVal && this.getData()
}
},
methods: {
getData() {
this.$api.sendRequest({
url: '/form/api/form/info',
data: {
form_id: this.id,
uniacid: this.uniacid
},
success: res => {
if (res.code == 0 && res.data) {
this.detail = res.data
uni.setNavigationBarTitle({
title: res.data.form_name
})
}
this.$refs.loadingCover && this.$refs.loadingCover.hide()
},
fail: () => {
this.$refs.loadingCover && this.$refs.loadingCover.hide()
}
})
},
create() {
if (!this.$refs.form.verify()) return
if (this.isRepeat) return
this.isRepeat = true
this.$api.sendRequest({
url: '/form/api/form/create',
data: {
form_id: this.id,
form_data: JSON.stringify(this.$refs.form.formData),
uniacid: this.uniacid
},
success: res => {
if (res.code == 0) {
uni.showModal({
title: '提示',
content: '提交成功',
showCancel: false,
success: () => {}
})
} else {
this.isRepeat = false
this.$util.showToast({
title: res.message
})
}
}
})
}
}
}
</script>
<style scoped>
page {
background: #fff;
}
.form-banner {
width: 100vw;
line-height: 1;
}
.form-banner image {
width: 100%;
line-height: 1;
}
.system-form-wrap {
border-radius: 32rpx;
overflow: hidden;
margin: 0 0 60rpx 0;
padding: 0 12rpx;
transform: translateY(-40rpx);
}
.system-form-wrap .form-title {
line-height: 100rpx;
padding-top: 20rpx;
}
.system-form-wrap .button {
height: 80rpx;
line-height: 80rpx !important;
margin-top: 30rpx !important;
width: 84%;
margin-left: 28rpx !important;
border-radius: 80rpx;
background: #f4391c;
color: #fff;
}
.system-form-wrap .form-wrap {
background: #fff;
padding: 30rpx;
border-radius: 32rpx;
}
</style>

View File

@@ -27,11 +27,25 @@
import uniGrid from '@/components/uni-grid/uni-grid.vue'; import uniGrid from '@/components/uni-grid/uni-grid.vue';
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue'; import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.vue'; import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.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 {
components: { components: {
uniGrid, uniGrid,
uniGridItem, uniGridItem,
nsAdv nsAdv,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
data() { data() {
return { return {

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="cf-container color-line-border"> <view class="cf-container color-line-border">
<view class="tab"> <view class="tab">
<view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view> <view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
@@ -71,7 +70,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
export default { export default {
components: {
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() { data() {
return { return {
list: [], list: [],

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="content"> <view class="content">
<view class="wx-code"> <view class="wx-code">
<image :src="$util.img(path)" /> <image :src="$util.img(path)" />

View File

@@ -1,342 +1,364 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="goods-evaluate" :style="themeColor">
<view class="goods-evaluate"> <view class="evaluate-tab">
<view class="evaluate-tab"> <view v-for="(item, index) in evaluateList" :key="index"
<view v-for="(item, index) in evaluateList" :key="index" :class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)"> :class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)">
{{ item.name }}({{ item.count }}) {{ item.name }}({{ item.count }})
</view> </view>
</view> </view>
<mescroll-uni ref="mescroll" top="100" @getData="getGoodsEvaluate"> <mescroll-uni ref="mescroll" top="100" @getData="getGoodsEvaluate">
<block slot="list"> <block slot="list">
<view class="evaluate-item" v-for="(item, index) in list" :key="index"> <view class="evaluate-item" v-for="(item, index) in list" :key="index">
<view class="evaluator"> <view class="evaluator">
<view> <view>
<view class="evaluator-face"> <view class="evaluator-face">
<image v-if="item.member_headimg" :src="$util.img(item.member_headimg)" @error="imageError(index)" mode="aspectFill" /> <image v-if="item.member_headimg" :src="$util.img(item.member_headimg)"
<image v-else :src="$util.getDefaultImage().head" mode="aspectFill" /> @error="imageError(index)" mode="aspectFill" />
</view> <image v-else :src="$util.getDefaultImage().head" mode="aspectFill" />
</view>
<view class="evaluator-info">
<view class="evaluator-info-left"> <view class="evaluator-info">
<view class="evaluator-name using-hidden" v-if="item.member_name.length > 2 && item.is_anonymous == 1"> <view class="evaluator-info-left">
{{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }} <view class="evaluator-name using-hidden"
</view> v-if="item.member_name.length > 2 && item.is_anonymous == 1">
<text class="evaluator-name using-hidden" v-else>{{ item.member_name }}</text> {{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }}
<view class="evaluator-time color-tip">{{ $util.timeStampTurnTime(item.create_time) }}</view> </view>
</view> <text class="evaluator-name using-hidden" v-else>{{ item.member_name }}</text>
<view class="evaluator-xing"><xiaoStarComponent :starCount="item.scores * 2"></xiaoStarComponent></view> <view class="evaluator-time color-tip">{{ $util.timeStampTurnTime(item.create_time)
</view> }}</view>
</view> </view>
</view> <view class="evaluator-xing">
<view class="cont">{{ item.content }}</view> <xiaoStarComponent :starCount="item.scores * 2"></xiaoStarComponent>
<scroll-view scroll-x="true"> </view>
<view class="evaluate-img" v-if="item.images"> </view>
<view class="img-box" v-for="(img, img_index) in item.images" :key="img_index" @click="previewEvaluate(index, img_index, 'images')"> </view>
<image :src="$util.img(img)" mode="aspectFill" /> </view>
</view> <view class="cont">{{ item.content }}</view>
</view> <scroll-view scroll-x="true">
</scroll-view> <view class="evaluate-img" v-if="item.images">
<view class="img-box" v-for="(img, img_index) in item.images" :key="img_index"
<view v-if="item.explain_first != ''" class="time shop-reply-box"> @click="previewEvaluate(index, img_index, 'images')">
<view class="shop-reply">商家回复</view> <image :src="$util.img(img)" mode="aspectFill" />
<view class="cont">{{ item.explain_first }}</view> </view>
</view> </view>
</scroll-view>
<template v-if="item.again_content != '' && item.again_is_audit == 1">
<view class="review-evaluation color-base-text">追加评价</view> <view v-if="item.explain_first != ''" class="time shop-reply-box">
<view class="cont">{{ item.again_content }}</view> <view class="shop-reply">商家回复</view>
<scroll-view scroll-x="true"> <view class="cont">{{ item.explain_first }}</view>
<view class="evaluate-img" v-if="item.again_images.length > 0"> </view>
<view
class="img-box" <template v-if="item.again_content != '' && item.again_is_audit == 1">
v-for="(again_img, again_index) in item.again_images" <view class="review-evaluation color-base-text">追加评价</view>
:key="again_index" <view class="cont">{{ item.again_content }}</view>
@click="previewEvaluate(index, again_index, 'again_images')" <scroll-view scroll-x="true">
> <view class="evaluate-img" v-if="item.again_images.length > 0">
<image :src="$util.img(again_img)" mode="aspectFill"></image> <view class="img-box" v-for="(again_img, again_index) in item.again_images"
</view> :key="again_index" @click="previewEvaluate(index, again_index, 'again_images')">
</view> <image :src="$util.img(again_img)" mode="aspectFill"></image>
</scroll-view> </view>
</view>
<view v-if="item.again_explain != ''" class="time shop-reply-box"> </scroll-view>
<view class="shop-reply" v-if="item.again_explain != ''">商家回复</view>
<view class="cont">{{ item.again_explain }}</view> <view v-if="item.again_explain != ''" class="time shop-reply-box">
</view> <view class="shop-reply" v-if="item.again_explain != ''">商家回复</view>
</template> <view class="cont">{{ item.again_explain }}</view>
</view> </view>
<view v-if="list.length == 0"><ns-empty text="暂无商品评价"></ns-empty></view> </template>
</block> </view>
</mescroll-uni> <view v-if="list.length == 0"><ns-empty text="暂无商品评价"></ns-empty></view>
<loading-cover ref="loadingCover"></loading-cover> </block>
</view> </mescroll-uni>
</template> <loading-cover ref="loadingCover"></loading-cover>
</view>
<script> </template>
import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
export default { <script>
components: { xiaoStarComponent }, import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
data() { import nsLogin from '@/components/ns-login/ns-login.vue';
return { import loadingCover from '@/components/loading-cover/loading-cover.vue';
goodsId: 0, import nsEmpty from '@/components/ns-empty/ns-empty.vue';
list: [], // #ifdef MP-WEIXIN
evaluateList: [{ name: '全部', value: 0, count: 0 }, { name: '好评', value: 1, count: 0 }, { name: '中评', value: 2, count: 0 }, { name: '差评', value: 3, count: 0 }], import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
evaluateTab: 0, // #endif
mescroll_type: {}
}; import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
}, export default {
onLoad(data) { components: {
this.goodsId = data.goods_id || 0; xiaoStarComponent,
this.getEvaluateCount(); MescrollUni,
}, nsLogin,
onShow() { loadingCover,
}, nsEmpty,
methods: { // #ifdef MP-WEIXIN
getEvaluateCount(mescroll) { privacyPopup
this.$api.sendRequest({ // #endif
url: '/api/goodsevaluate/getgoodsevaluate', },
data: { data() {
goods_id: this.goodsId return {
}, goodsId: 0,
success: res => { list: [],
for (let i = 0; i < this.evaluateList.length; i++) { evaluateList: [{ name: '全部', value: 0, count: 0 }, { name: '好评', value: 1, count: 0 }, { name: '中评', value: 2, count: 0 }, { name: '差评', value: 3, count: 0 }],
if (this.evaluateList[i].value == 0) { evaluateTab: 0,
this.evaluateList[i].count = res.data.total; mescroll_type: {}
} else if (this.evaluateList[i].value == 1) { };
this.evaluateList[i].count = res.data.haoping; },
} else if (this.evaluateList[i].value == 2) { onLoad(data) {
this.evaluateList[i].count = res.data.zhongping; this.goodsId = data.goods_id || 0;
} else if (this.evaluateList[i].value == 3) { this.getEvaluateCount();
this.evaluateList[i].count = res.data.chaping; },
} onShow() {
} },
} methods: {
}); getEvaluateCount(mescroll) {
}, this.$api.sendRequest({
getGoodsEvaluate(mescroll) { url: '/api/goodsevaluate/getgoodsevaluate',
this.mescroll_type = mescroll; data: {
this.$api.sendRequest({ goods_id: this.goodsId
url: '/api/goodsevaluate/page', },
data: { success: res => {
page: mescroll.num, for (let i = 0; i < this.evaluateList.length; i++) {
page_size: mescroll.size, if (this.evaluateList[i].value == 0) {
goods_id: this.goodsId, this.evaluateList[i].count = res.data.total;
explain_type: this.evaluateTab == 0 ? '' : this.evaluateTab } else if (this.evaluateList[i].value == 1) {
}, this.evaluateList[i].count = res.data.haoping;
success: res => { } else if (this.evaluateList[i].value == 2) {
let newArr = []; this.evaluateList[i].count = res.data.zhongping;
let msg = res.message; } else if (this.evaluateList[i].value == 3) {
if (res.code == 0 && res.data) { this.evaluateList[i].count = res.data.chaping;
newArr = res.data.list; }
} else { }
this.$util.showToast({ }
title: msg });
}); },
} getGoodsEvaluate(mescroll) {
this.mescroll_type = mescroll;
for (var i = 0; i < newArr.length; i++) { this.$api.sendRequest({
if (newArr[i].images) newArr[i].images = newArr[i].images.split(','); url: '/api/goodsevaluate/page',
if (newArr[i].again_images) newArr[i].again_images = newArr[i].again_images.split(','); data: {
if (newArr[i].is_anonymous == 1) newArr[i].member_name = newArr[i].member_name.replace(newArr[i].member_name.substring(1, newArr[i].member_name.length - 1), '***'); page: mescroll.num,
} page_size: mescroll.size,
mescroll.endSuccess(newArr.length); goods_id: this.goodsId,
//设置列表数据 explain_type: this.evaluateTab == 0 ? '' : this.evaluateTab
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表 },
this.list = this.list.concat(newArr); //追加新数据 success: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); let newArr = [];
}, let msg = res.message;
fail: res => { if (res.code == 0 && res.data) {
mescroll.endErr(); newArr = res.data.list;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); } else {
} this.$util.showToast({
}); title: msg
}, });
}
// 预览评价图片
previewEvaluate(index, img_index, field) { for (var i = 0; i < newArr.length; i++) {
var paths = []; if (newArr[i].images) newArr[i].images = newArr[i].images.split(',');
for (let i = 0; i < this.list[index][field].length; i++) { if (newArr[i].again_images) newArr[i].again_images = newArr[i].again_images.split(',');
paths.push(this.$util.img(this.list[index][field][i])); if (newArr[i].is_anonymous == 1) newArr[i].member_name = newArr[i].member_name.replace(newArr[i].member_name.substring(1, newArr[i].member_name.length - 1), '***');
} }
uni.previewImage({ mescroll.endSuccess(newArr.length);
current: img_index, //设置列表数据
urls: paths if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
}); this.list = this.list.concat(newArr); //追加新数据
}, if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
imageError(index) { fail: res => {
this.list[index].member_headimg = this.$util.getDefaultImage().head; mescroll.endErr();
this.$forceUpdate(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, }
onEvaluateTab(value) { });
this.list = []; },
this.evaluateTab = value;
this.mescroll_type.num = 1; // 预览评价图片
this.mescroll_type.size = 10; previewEvaluate(index, img_index, field) {
let mescrolls = { var paths = [];
num: 1, for (let i = 0; i < this.list[index][field].length; i++) {
size: 10 paths.push(this.$util.img(this.list[index][field][i]));
}; }
this.getGoodsEvaluate(this.mescroll_type); uni.previewImage({
} current: img_index,
} urls: paths
}; });
</script> },
<style lang="scss"> imageError(index) {
.goods-evaluate { this.list[index].member_headimg = this.$util.getDefaultImage().head;
.evaluate-tab { this.$forceUpdate();
display: flex; },
align-items: center; onEvaluateTab(value) {
background: #fff; this.list = [];
height: 100rpx; this.evaluateTab = value;
padding: 0 $margin-both; this.mescroll_type.num = 1;
this.mescroll_type.size = 10;
view { let mescrolls = {
background: #f0f0f0; num: 1,
color: #333; size: 10
border-radius: 30rpx; };
margin-right: 20rpx; this.getGoodsEvaluate(this.mescroll_type);
padding: 8rpx 30rpx; }
font-size: 24rpx; }
} };
.active-tab { </script>
background-color: $base-color;
color: #fff; <style lang="scss">
} .goods-evaluate {
} .evaluate-tab {
.evaluate-item { display: flex;
margin: $margin-updown $margin-both; align-items: center;
padding: $margin-both; background: #fff;
background: #fff; height: 100rpx;
border-radius: 10rpx; padding: 0 $margin-both;
.evaluator { view {
& > view { background: #f0f0f0;
display: flex; color: #333;
align-items: center; border-radius: 30rpx;
} margin-right: 20rpx;
padding: 8rpx 30rpx;
.evaluator-face { font-size: 24rpx;
width: 79rpx; }
height: 79rpx;
border-radius: 50%; .active-tab {
overflow: hidden; background-color: $base-color;
color: #fff;
image { }
width: 100%; }
height: 100%;
} .evaluate-item {
} margin: $margin-updown $margin-both;
padding: $margin-both;
.evaluator-info { background: #fff;
width: 85%; border-radius: 10rpx;
margin-left: 13rpx;
.evaluator {
.evaluator-name { &>view {
color: #303133; display: flex;
font-size: $font-size-base; align-items: center;
line-height: 1; }
width: 250rpx;
} .evaluator-face {
width: 79rpx;
.evaluator-time { height: 79rpx;
font-size: $font-size-tag; border-radius: 50%;
// margin-top: 14rpx; overflow: hidden;
line-height: 1;
} image {
.evaluator-info-left { width: 100%;
display: flex; height: 100%;
align-items: center; }
justify-content: space-between; }
}
} .evaluator-info {
} width: 85%;
margin-left: 13rpx;
.cont {
text-align: justify; .evaluator-name {
display: -webkit-box; color: #303133;
word-break: break-all; font-size: $font-size-base;
font-size: $font-size-base; line-height: 1;
margin: 26rpx 0 0; width: 250rpx;
color: #000000; }
line-height: 42rpx;
} .evaluator-time {
font-size: $font-size-tag;
.evaluate-img { // margin-top: 14rpx;
display: flex; line-height: 1;
width: 100%; }
flex-wrap: wrap;
margin-top: 19rpx; .evaluator-info-left {
display: flex;
.img-box { align-items: center;
flex-shrink: 0; justify-content: space-between;
width: 140rpx; }
height: 140rpx; }
overflow: hidden; }
margin: 20rpx 23rpx 0 0;
border-radius: 10rpx; .cont {
text-align: justify;
&:nth-child(4n) { display: -webkit-box;
margin-right: 0; word-break: break-all;
} font-size: $font-size-base;
margin: 26rpx 0 0;
&:nth-child(-n + 4) { color: #000000;
margin-top: 0; line-height: 42rpx;
} }
image { .evaluate-img {
width: 100%; display: flex;
height: 100%; width: 100%;
} flex-wrap: wrap;
} margin-top: 19rpx;
}
.img-box {
.time { flex-shrink: 0;
font-size: $font-size-tag; width: 140rpx;
background: #f8f8f8; height: 140rpx;
padding: 10rpx 20rpx; overflow: hidden;
border-radius: 6rpx; margin: 20rpx 23rpx 0 0;
margin-top: 20rpx; border-radius: 10rpx;
text { &:nth-child(4n) {
line-height: 42rpx; margin-right: 0;
color: $color-tip; }
}
} &:nth-child(-n + 4) {
margin-top: 0;
.evaluation-reply { }
margin-top: 10rpx;
font-size: $font-size-tag; image {
} width: 100%;
height: 100%;
.review-evaluation { }
margin-top: 29rpx; }
font-size: $font-size-base; }
line-height: 1;
.time {
.review-time { font-size: $font-size-tag;
overflow: hidden; background: #f8f8f8;
float: right; padding: 10rpx 20rpx;
} border-radius: 6rpx;
margin-top: 20rpx;
& + .cont {
margin: 18rpx 0 0; text {
} line-height: 42rpx;
} color: $color-tip;
} }
} }
.shop-reply { .evaluation-reply {
font-size: $font-size-base; margin-top: 10rpx;
color: #000; font-size: $font-size-tag;
line-height: 1; }
& + .cont { .review-evaluation {
margin-top: 10rpx !important; margin-top: 29rpx;
} font-size: $font-size-base;
} line-height: 1;
.shop-reply-box { .review-time {
padding: 20rpx !important; overflow: hidden;
} float: right;
</style> }
&+.cont {
margin: 18rpx 0 0;
}
}
}
}
.shop-reply {
font-size: $font-size-base;
color: #000;
line-height: 1;
&+.cont {
margin-top: 10rpx !important;
}
}
.shop-reply-box {
padding: 20rpx !important;
}
</style>

View File

@@ -1,43 +1,42 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="page" :style="themeColor">
<view class="page"> <view class="closeBox">
<view class="closeBox"> <image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image> <text class="close-title">您查看的商品不存在可能已下架或被删除</text>
<text class="close-title">您查看的商品不存在可能已下架或被删除</text> </view>
</view> </view>
</view> </template>
</template>
<script>
<script> export default {
export default { data() {
data() { return {};
return {}; },
}, onShow() {},
onShow() {}, methods: {}
methods: {} };
}; </script>
</script>
<style lang="scss">
<style lang="scss"> .page{
.page{ height: 100vh;
height: 100vh; overflow: hidden;
overflow: hidden; }
} .closeBox {
.closeBox { width: 100%;
width: 100%; display: flex;
display: flex; flex-direction: column;
flex-direction: column; justify-content: center;
justify-content: center; align-items: center;
align-items: center; margin-top: 260rpx;
margin-top: 260rpx; }
} image {
image { width: 400rpx;
width: 400rpx; }
} .close-title {
.close-title { font-size: $font-size-base;
font-size: $font-size-base; color: $color-tip;
color: $color-tip; margin: 55rpx;
margin: 55rpx; letter-spacing: 4rpx;
letter-spacing: 4rpx; }
} </style>
</style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<view class="content"> <view class="content">
<view class="cate-search"> <view class="cate-search">
<view class="search-box" @click="search()" @tap.stop="search()"> <view class="search-box" @click="search()" @tap.stop="search()">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="page" :style="themeColor">
<view class="page">
<view class="help-title">{{ detail.title }}</view> <view class="help-title">{{ detail.title }}</view>
<view class="help-content"><rich-text :nodes="content"></rich-text></view> <view class="help-content"><rich-text :nodes="content"></rich-text></view>
<view class="help-meta"> <view class="help-meta">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="help" :style="themeColor">
<view class="help">
<block v-if="dataList.length"> <block v-if="dataList.length">
<view class="help-item" v-for="(item, index) in dataList" :key="index"> <view class="help-item" v-for="(item, index) in dataList" :key="index">
<view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view> <view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view>

View File

@@ -1,95 +1,104 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img"> <view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }"> class="page-img">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true"/> <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
</view> :style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :haveTopCategory="true"/>
<ns-copyright v-show="isShowCopyRight"/>
</diy-index-page>
<view v-else class="bg-index" :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"/>
<ns-copyright v-show="isShowCopyRight"/>
</view>
<template v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle" @click="uniPopupWindowFn()" mode="aspectFit"/>
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
</view> </view>
</template>
<!-- 底部tabBar --> <diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
<view class="page-bottom" v-if="openBottomNav"> :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-bottom-nav @callback="callback" :name="name"/> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
</view> :haveTopCategory="true" />
<ns-copyright v-show="isShowCopyRight" />
</diy-index-page>
<!-- 收藏 --> <view v-else class="bg-index"
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect"> :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<view v-if="showTip" class="collectPopupWindow" :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }"> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit"/> <ns-copyright v-show="isShowCopyRight" />
<text @click="closeCollectPopupWindow">我知道了</text>
</view> </view>
</uni-popup>
<!-- #ifdef MP-WEIXIN --> <template
<!-- 小程序隐私协议 --> v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<privacy-popup ref="privacyPopup"></privacy-popup> <view @touchmove.prevent.stop>
<!-- #endif --> <uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
@click="uniPopupWindowFn()" mode="aspectFit" />
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
</view>
</template>
<!-- 底部tabBar -->
<view class="page-bottom" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" :name="name" />
</view>
<!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow"
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text>
</view>
</uni-popup>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
</view>
</view> </view>
</template> </template>
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue'; import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
import diyJs from '@/common/js/diy.js'; import diyJs from '@/common/js/diy.js';
import microPageJs from './public/js/diy.js'; import microPageJs from './public/js/diy.js';
export default { export default {
components: { components: {
uniPopup, uniPopup,
nsNavbar nsNavbar
}, },
mixins: [diyJs, microPageJs] mixins: [diyJs, microPageJs]
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/common/css/diy.scss'; @import '@/common/css/diy.scss';
</style> </style>
<style scoped> <style scoped>
.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;
} }
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box { /deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
border-radius: 0; border-radius: 0;
} }
.choose-store>>>.goodslist-uni-popup-box { .choose-store>>>.goodslist-uni-popup-box {
width: 80%; width: 80%;
} }
/deep/ .placeholder { /deep/ .placeholder {
height: 0; height: 0;
} }
/deep/::-webkit-scrollbar { /deep/::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
background-color: transparent; background-color: transparent;
display: none; display: none;
} }
/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>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="find" :style="themeColor">
<view class="find">
<view class="iconfont icon-close" @click="navigateBack()"></view> <view class="iconfont icon-close" @click="navigateBack()"></view>
<view class="header-wrap"> <view class="header-wrap">
<block v-if="stepShow == 0"> <block v-if="stepShow == 0">

View File

@@ -1,482 +1,498 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<scroll-view scroll-y="false" class="container"> <scroll-view scroll-y="false" class="container">
<view class="header-wrap" :style="{backgroundImage: 'url('+$util.img('public/uniapp/member/head.png')+')'}"> <view class="header-wrap" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/member/head.png') + ')' }">
<view class="t-b"> <view class="t-b">
<div v-html="$lang('welcomeText')"></div> <div v-html="$lang('welcomeText')"></div>
</view>
</view> </view>
</view> <view class="body-wrap">
<view class="body-wrap"> <view class="form-wrap">
<view class="form-wrap"> <view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="input-wrap" v-show="loginMode == 'mobile'"> <view class="content">
<view class="content"> <!-- <view class="area-code">+86</view> -->
<!-- <view class="area-code">+86</view> --> <input type="number" :placeholder="$lang('mobileInputPlaceholder')"
<input type="number" :placeholder="$lang('mobileInputPlaceholder')" placeholder-class="input-placeholder" class="input" maxlength="11" v-model="formData.mobile" /> placeholder-class="input-placeholder" class="input" maxlength="11"
v-model="formData.mobile" />
</view>
</view> </view>
</view> <view class="input-wrap" v-show="loginMode == 'account'">
<view class="input-wrap" v-show="loginMode == 'account'"> <view class="content">
<view class="content"> <input type="text" :placeholder="$lang('accountInputPlaceholder')"
<input type="text" :placeholder="$lang('accountInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.account" /> placeholder-class="input-placeholder" class="input" v-model="formData.account" />
</view>
</view> </view>
</view> <view class="input-wrap" v-show="loginMode == 'account'">
<view class="input-wrap" v-show="loginMode == 'account'"> <view class="content">
<view class="content"> <input type="password" :placeholder="$lang('passwordInputPlaceholder')"
<input type="password" :placeholder="$lang('passwordInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.password" /> placeholder-class="input-placeholder" class="input" v-model="formData.password" />
<view class="align-right" v-show="loginMode == 'account'"> <view class="align-right" v-show="loginMode == 'account'">
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text> <text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
</view>
</view>
</view>
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content">
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')"
placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
<view class="dynacode"
:class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content"> <view class="btn_view">
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" /> <button type="primary" @click="login" class="login-btn color-base-border color-base-bg"
<view class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'" style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
@click="sendMobileCode">{{ dynacodeData.codeText }}</view> </view>
</view> <view class="regisiter-agreement"
style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
<view style="" class="iconfont"
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
@click="isAgree = !isAgree"></view>
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{
$lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')"
style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text
@click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{
$lang('userServiceAgreementText') }}</text></view>
</view> </view>
</view> </view>
<loading-cover ref="loadingCover"></loading-cover>
<view class="btn_view"> <register-reward ref="registerReward"></register-reward>
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg" style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button> </scroll-view>
</view> </view>
<view class="regisiter-agreement" style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
<view style="" class="iconfont" :class=" isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2' " @click="isAgree = !isAgree"></view>
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{ $lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')" style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text @click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{ $lang('userServiceAgreementText') }}</text></view>
</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
<register-reward ref="registerReward"></register-reward>
</scroll-view>
</template> </template>
<script> <script>
import validate from 'common/js/validate.js'; import validate from 'common/js/validate.js';
import registerReward from '@/components/register-reward/register-reward.vue'; import registerReward from '@/components/register-reward/register-reward.vue';
export default { export default {
data() { data() {
return { return {
isAgree: false, isAgree: false,
// loginMode: 'account', // loginMode: 'account',
loginMode: 'mobile', loginMode: 'mobile',
formData: { formData: {
mobile: '', mobile: '',
account: '', account: '',
password: '', password: '',
vercode: '', vercode: '',
dynacode: '', dynacode: '',
key: '' key: ''
}, },
captcha: { captcha: {
id: '', id: '',
img: '' img: ''
}, },
isSub: false, // 提交防重复 isSub: false, // 提交防重复
back: '', // 返回页 back: '', // 返回页
redirect: 'redirectTo', // 跳转方式 redirect: 'redirectTo', // 跳转方式
dynacodeData: { dynacodeData: {
seconds: 120, seconds: 120,
timer: null, timer: null,
codeText: this.$lang('getDynacode'), codeText: this.$lang('getDynacode'),
isSend: false isSend: false
}, },
registerConfig: { registerConfig: {
register: 'mobile', register: 'mobile',
login: '' login: ''
}, },
captchaConfig: 0, captchaConfig: 0,
authInfo: null authInfo: null
}; };
}, },
components: { components: {
registerReward registerReward
}, },
onLoad(option) { onLoad(option) {
if (option.back) this.back = option.back; if (option.back) this.back = option.back;
this.getRegisterConfig(); this.getRegisterConfig();
// this.getCaptchaConfig(); // this.getCaptchaConfig();
this.authInfo = uni.getStorageSync('authInfo'); this.authInfo = uni.getStorageSync('authInfo');
}, },
onShow() {}, onShow() { },
onReady() { onReady() {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
methods: { methods: {
/** /**
* 获取验证码配置 * 获取验证码配置
*/ */
getCaptchaConfig() { getCaptchaConfig() {
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/config/getCaptchaConfig', url: '/api/config/getCaptchaConfig',
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
this.captchaConfig = res.data.shop_reception_login; this.captchaConfig = res.data.shop_reception_login;
if (this.captchaConfig == 1) this.getCaptcha(); if (this.captchaConfig == 1) this.getCaptcha();
}
} }
});
},
/**
* 获取注册配置
*/
getRegisterConfig() {
this.$api.sendRequest({
url: '/api/register/config',
success: res => {
if (res.code >= 0) {
// this.registerConfig = res.data.value;
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
// else this.loginMode = 'account';
}
}
});
},
/**
* 切换登录方式
*/
switchLoginMode() {
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
},
/**
* 获取验证码
*/
getCaptcha() {
if (this.captchaConfig == 0) return;
this.$api.sendRequest({
url: '/api/captcha/captcha',
data: {
captcha_id: this.captcha.id
},
success: res => {
if (res.code >= 0) {
this.captcha = res.data;
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
}
}
});
},
/**
* 去注册
*/
toRegister() {
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/register');
},
/**
* 忘记密码
*/
forgetPassword() {
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/find');
},
tourl(url){
this.$util.redirectTo(url);
},
/**
* 登录
*/
login() {
if (!this.isAgree) {
this.$util.showToast({
title: this.$lang('agreeAgreementTip')
});
return false;
} }
if (this.loginMode == 'account') { });
var url = '/api/login/login'; },
/**
* 获取注册配置
*/
getRegisterConfig() {
this.$api.sendRequest({
url: '/api/register/config',
success: res => {
if (res.code >= 0) {
// this.registerConfig = res.data.value;
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
// else this.loginMode = 'account';
}
}
});
},
/**
* 切换登录方式
*/
switchLoginMode() {
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
},
/**
* 获取验证码
*/
getCaptcha() {
if (this.captchaConfig == 0) return;
this.$api.sendRequest({
url: '/api/captcha/captcha',
data: {
captcha_id: this.captcha.id
},
success: res => {
if (res.code >= 0) {
this.captcha = res.data;
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
}
}
});
},
/**
* 去注册
*/
toRegister() {
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/register');
},
/**
* 忘记密码
*/
forgetPassword() {
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/find');
},
tourl(url) {
this.$util.redirectTo(url);
},
/**
* 登录
*/
login() {
if (!this.isAgree) {
this.$util.showToast({
title: this.$lang('agreeAgreementTip')
});
return false;
}
if (this.loginMode == 'account') {
var url = '/api/login/login';
data = {
username: this.formData.account,
password: this.formData.password
};
} else {
var url = '/api/login/mobile',
data = { data = {
username: this.formData.account, mobile: this.formData.mobile,
password: this.formData.password key: this.formData.key,
code: this.formData.dynacode
}; };
} else { }
var url = '/api/login/mobile', if (this.captcha.id != '') {
data = { data.captcha_id = this.captcha.id;
mobile: this.formData.mobile, data.captcha_code = this.formData.vercode;
key: this.formData.key, }
code: this.formData.dynacode if (this.authInfo) Object.assign(data, this.authInfo);
}; if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
}
if (this.captcha.id != '') {
data.captcha_id = this.captcha.id;
data.captcha_code = this.formData.vercode;
}
if (this.authInfo) Object.assign(data, this.authInfo);
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.verify(data)) { if (this.verify(data)) {
if (this.isSub) return; if (this.isSub) return;
this.isSub = true; this.isSub = true;
this.$api.sendRequest({ this.$api.sendRequest({
url, url,
data, data,
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift; var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token); this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber'); this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => { this.getMemberInfo(() => {
if (can_receive_registergift == 1) { if (can_receive_registergift == 1) {
this.$util.showToast({ this.$util.showToast({
title: this.$lang('loginSuccessTip') title: this.$lang('loginSuccessTip')
}); });
let back = this.back ? this.back : '/pages/member/index'; let back = this.back ? this.back : '/pages/member/index';
if(this.$refs.registerReward) this.$refs.registerReward.open(back); if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else { } else {
if (this.back != '') { this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
}
} }
}); }
} else { });
this.isSub = false; } else {
this.getCaptcha();
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false; this.isSub = false;
this.getCaptcha(); this.getCaptcha();
}
});
}
},
/**
* 登录验证
* @param {Object} data
*/
verify(data) {
let rule = [];
// 手机号验证
if (this.loginMode == 'mobile') {
rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: this.$lang('enterMobileTip')
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: this.$lang('enterCorrectMobileTip')
}];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
rule.push({
name: 'code',
checkType: 'required',
errorMsg: this.$lang('dynacodePlaceholder')
});
}
// 账号验证
if (this.loginMode == 'account') {
rule = [{
name: 'username',
checkType: 'required',
errorMsg: this.$lang('accountPlaceholder')
},
{
name: 'password',
checkType: 'required',
errorMsg: this.$lang('passwordPlaceholder')
}
];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
}
var checkRes = validate.check(data, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({
title: validate.error
});
return false;
}
},
mobileAuthLogin(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
var data = {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
};
if (Object.keys(this.authInfo).length) {
Object.assign(data, this.authInfo);
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
}
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobileauth',
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
if(this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
}
}
})
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false;
this.$util.showToast({
title: this.$lang('requestFailTip')
});
}
});
}
},
/**
* 发送手机动态码
*/
sendMobileCode() {
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
var data = {
mobile: this.formData.mobile,
captcha_id: this.captcha.id,
captcha_code: this.formData.vercode
};
var rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}];
if (this.captchaConfig == 1) {
rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('enterCaptchaTip')
});
}
var checkRes = validate.check(data, rule);
if (!checkRes) {
this.$util.showToast({
title: validate.error
});
return;
}
this.dynacodeData.isSend = true;
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
}, 1000);
this.$api.sendRequest({
url: '/api/login/mobileCode',
data: data,
success: res => {
if (res.code >= 0) {
this.formData.key = res.data.key;
} else {
this.refreshDynacodeData();
this.$util.showToast({ this.$util.showToast({
title: res.message title: res.message
}); });
} }
}, },
fail: () => { fail: res => {
this.$util.showToast({ this.isSub = false;
title: 'request:fail' this.getCaptcha();
});
this.refreshDynacodeData();
}
});
},
refreshDynacodeData() {
this.getCaptcha();
clearInterval(this.dynacodeData.timer);
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
};
},
getMemberInfo(callback) {
this.$api.sendRequest({
url: '/api/member/info',
success: (res) => {
if (res.code >= 0) {
// 登录成功,存储会员信息
this.$store.commit('setMemberInfo', res.data);
if (callback) callback();
}
} }
}); });
} }
}, },
watch: { /**
'dynacodeData.seconds': { * 登录验证
handler(newValue, oldValue) { * @param {Object} data
if (newValue == 0) { */
verify(data) {
let rule = [];
// 手机号验证
if (this.loginMode == 'mobile') {
rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: this.$lang('enterMobileTip')
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: this.$lang('enterCorrectMobileTip')
}];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
rule.push({
name: 'code',
checkType: 'required',
errorMsg: this.$lang('dynacodePlaceholder')
});
}
// 账号验证
if (this.loginMode == 'account') {
rule = [{
name: 'username',
checkType: 'required',
errorMsg: this.$lang('accountPlaceholder')
},
{
name: 'password',
checkType: 'required',
errorMsg: this.$lang('passwordPlaceholder')
}
];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
}
var checkRes = validate.check(data, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({
title: validate.error
});
return false;
}
},
mobileAuthLogin(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
var data = {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
};
if (Object.keys(this.authInfo).length) {
Object.assign(data, this.authInfo);
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
}
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobileauth',
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
}
}
})
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false;
this.$util.showToast({
title: this.$lang('requestFailTip')
});
}
});
}
},
/**
* 发送手机动态码
*/
sendMobileCode() {
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
var data = {
mobile: this.formData.mobile,
captcha_id: this.captcha.id,
captcha_code: this.formData.vercode
};
var rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}];
if (this.captchaConfig == 1) {
rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('enterCaptchaTip')
});
}
var checkRes = validate.check(data, rule);
if (!checkRes) {
this.$util.showToast({
title: validate.error
});
return;
}
this.dynacodeData.isSend = true;
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
}, 1000);
this.$api.sendRequest({
url: '/api/login/mobileCode',
data: data,
success: res => {
if (res.code >= 0) {
this.formData.key = res.data.key;
} else {
this.refreshDynacodeData(); this.refreshDynacodeData();
this.$util.showToast({
title: res.message
});
} }
}, },
immediate: true, fail: () => {
deep: true this.$util.showToast({
} title: 'request:fail'
});
this.refreshDynacodeData();
}
});
},
refreshDynacodeData() {
this.getCaptcha();
clearInterval(this.dynacodeData.timer);
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
};
},
getMemberInfo(callback) {
this.$api.sendRequest({
url: '/api/member/info',
success: (res) => {
if (res.code >= 0) {
// 登录成功,存储会员信息
this.$store.commit('setMemberInfo', res.data);
if (callback) callback();
}
}
});
} }
}; },
watch: {
'dynacodeData.seconds': {
handler(newValue, oldValue) {
if (newValue == 0) {
this.refreshDynacodeData();
}
},
immediate: true,
deep: true
}
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/common.scss'; @import './public/css/common.scss';
.color-base-text{
color:#2796f2 !important .color-base-text {
} color: #2796f2 !important
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" 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;
max-height: unset !important; max-height: unset !important;
overflow: unset !important; overflow: unset !important;
} }
/deep/ uni-toast .uni-simple-toast__text { /deep/ uni-toast .uni-simple-toast__text {
background: red !important; background: red !important;
} }
</style> </style>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken"> <mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
<block slot="list"> <block slot="list">
<view class="nc-info-list-content"> <view class="nc-info-list-content">
@@ -66,12 +65,20 @@
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue"; import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.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: { components: {
MescrollUni, MescrollUni,
nsLogin, nsLogin,
loadingCover loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
data() { data() {
return { return {

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="account-list-content" :style="themeColor">
<view class="account-list-content">
<view class="edit-item"> <view class="edit-item">
<text class="tit">{{ $lang('name') }}</text> <text class="tit">{{ $lang('name') }}</text>
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" /> <input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="address-edit-content" :style="themeColor">
<view class="address-edit-content">
<view class="edit-wrap"> <view class="edit-wrap">
<view class="tip">地址信息</view> <view class="tip">地址信息</view>
<view class="edit-item"> <view class="edit-item">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="bank-account-wrap" @click="goAccount()"> <view class="bank-account-wrap" @click="goAccount()">
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type"> <view class="tx-wrap" v-if="bankAccountInfo.withdraw_type">
<text class="tx-to">提现到</text> <text class="tx-to">提现到</text>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="assets-wrap"> <view class="assets-wrap">
<view class="assets-block"> <view class="assets-block">
<view class="assets-tips"><text>风险提示确认申请后您的资产将被清空且不可找回!</text></view> <view class="assets-tips"><text>风险提示确认申请后您的资产将被清空且不可找回!</text></view>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="balance" :style="themeColor">
<view class="balance">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="custom-navbar" :style="{ <view class="custom-navbar" :style="{
'padding-top': menuButtonBounding.top + 'px', 'padding-top': menuButtonBounding.top + 'px',

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view :style="themeColor">
<view>
<!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto"> <!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap"> <view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text> <text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
@@ -55,12 +54,18 @@
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue'; import loadingCover from '@/components/loading-cover/loading-cover.vue';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue"; import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
// #ifdef MP-WEIXIN
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// #endif
export default { export default {
components: { components: {
nsEmpty, nsEmpty,
nsLogin, nsLogin,
loadingCover, loadingCover,
MescrollUni MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
}, },
data() { data() {
const currentDate = this.getDate({ const currentDate = this.getDate({

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="agreement-box"> <view class="agreement-box">
<view class="agreement-intro"> <view class="agreement-intro">
<view class="align-center agreement-title">{{ agreement.title }}</view> <view class="align-center agreement-title">{{ agreement.title }}</view>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="cancel-wrap"> <view class="cancel-wrap">
<view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')"></image></view> <view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')"></image></view>
<view class="cancel-title">您的申请已拒绝</view> <view class="cancel-title">您的申请已拒绝</view>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="cancelstatus-wrap"> <view class="cancelstatus-wrap">
<view class="cancelstatus-block"> <view class="cancelstatus-block">
<view class="cancelstatus-box"> <view class="cancelstatus-box">

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="container" :style="themeColor">
<view class="container">
<view class="cancel-wrap"> <view class="cancel-wrap">
<view class="cancel-img"> <view class="cancel-img">
<image :src="$util.img('public/uniapp/member/success.png')"></image> <image :src="$util.img('public/uniapp/member/success.png')"></image>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="member-level" :style="themeColor">
<view class="member-level">
<view class="level-top"> <view class="level-top">
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image> <image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
</view> </view>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="page" :style="themeColor">
<view class="page">
<view class="agreement-title">{{ title }}</view> <view class="agreement-title">{{ title }}</view>
<view class="agreement-content"><rich-text :nodes="content"></rich-text></view> <view class="agreement-content"><rich-text :nodes="content"></rich-text></view>
</view> </view>

View File

@@ -1,6 +1,5 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <view class="member-level" :style="themeColor">
<view class="member-level">
<block v-if="levelList.length"> <block v-if="levelList.length">
<view class="level-top"> <view class="level-top">
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image> <image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>

Some files were not shown because too many files have changed in this diff Show More