fix(样式): 修复生产环境产物样式不生效的问题

This commit is contained in:
2025-12-30 18:30:47 +08:00
parent c790d63005
commit 50072c45ab
47 changed files with 2019 additions and 2009 deletions

View File

@@ -67,6 +67,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');
} }
// 插件是否存在 // 插件是否存在

View File

@@ -111,6 +111,7 @@ class ConfigExternal {
try { try {
// 动态加载主题配置 // 动态加载主题配置
const themeData = require(`@/common/js/style_color.js`)['default'][theme]; const themeData = require(`@/common/js/style_color.js`)['default'][theme];
console.log('sync themeData => ', themeData);
this.loadedConfigs[`theme_${theme}`] = themeData; this.loadedConfigs[`theme_${theme}`] = themeData;
return themeData; return themeData;
} catch (error) { } catch (error) {
@@ -136,7 +137,8 @@ class ConfigExternal {
this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => { this.loadPromises[`theme_${theme}`] = new Promise((resolve, reject) => {
try { try {
// 动态加载主题配置 // 动态加载主题配置
const themeData = require(`@/common/js/style_color.js`)[theme]; const themeData = require(`@/common/js/style_color.js`)['default'][theme];
console.log('async themeData => ', themeData);
this.loadedConfigs[`theme_${theme}`] = themeData; this.loadedConfigs[`theme_${theme}`] = themeData;
resolve(themeData); resolve(themeData);
} catch (error) { } catch (error) {

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

@@ -72,7 +72,7 @@ export default {
//当前页面语言包(同步加载) //当前页面语言包(同步加载)
let route = _this.route; let route = _this.route;
let langPath = processRoutePath(route); let langPath = processRoutePath(route);
console.log(`当前页面语言包路径: ${langPath}`); // console.log(`当前页面语言包路径: ${langPath}`);
// 加载当前页面语言包 // 加载当前页面语言包
let currentPageLang = loadLangPackSync(locale, langPath); let currentPageLang = loadLangPackSync(locale, langPath);
@@ -113,7 +113,7 @@ export default {
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
// 多语言调试,注释后可以关闭控制台输出 // 多语言调试,注释后可以关闭控制台输出
console.log(`字段: ${field}, 值: ${value}`) // console.log(`字段: ${field}, 值: ${value}`)
return value; return value;
}, },
/** /**

View File

@@ -2,7 +2,7 @@ export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '', title: '',
select: '选择', select: '选择',
details:'商品详情', details:'资源详情',
params: '参数', params: '参数',
service: '商品服务', service: '商品服务',
allGoods: '全部商品', allGoods: '全部商品',

View File

@@ -43,7 +43,7 @@
{ {
"path": "detail", "path": "detail",
"style": { "style": {
"navigationBarTitleText": "商品详情" "navigationBarTitleText": "资源详情"
} }
}, },
{ {

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0"> <!-- <view class="page-header" v-if="goodsSkuDetail && goodsSkuDetail.config && goodsSkuDetail.config.nav_bar_switch == 0">
<ns-navbar :data="navbarData" :isBack="true"></ns-navbar> <ns-navbar :data="navbarData" :isBack="true"></ns-navbar>

View File

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

View File

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

View File

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

View File

@@ -1,203 +1,203 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view class="withdraw-cate"> <view class="withdraw-cate">
<block v-for="(item, index) in category" :key="index"> <block v-for="(item, index) in category" :key="index">
<view @click="selectCate(item.id)" class="cate-li" :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 fenxiaoWords from 'common/js/fenxiao-words.js'; import fenxiaoWords from 'common/js/fenxiao-words.js';
export default { export default {
data() { data() {
return { return {
category: [ category: [
{ {
id: 0, id: 0,
name: '全部', name: '全部',
number: 2 number: 2
}, },
{ {
id: 1, id: 1,
name: '待结算', name: '待结算',
number: 0 number: 0
}, },
{ {
id: 2, id: 2,
name: '已结算', name: '已结算',
number: 0 number: 0
}, },
{ {
id: 3, id: 3,
name: '已退款', name: '已退款',
number: 0 number: 0
} }
], ],
selectId: 0, selectId: 0,
orderList: [], orderList: [],
emptyShow: false, emptyShow: false,
fenxiaoId: '', fenxiaoId: '',
subMemberId: '' subMemberId: ''
}; };
}, },
mixins: [fenxiaoWords], mixins: [fenxiaoWords],
onLoad(option) { onLoad(option) {
if (option.type != undefined) this.selectId = option.type; if (option.type != undefined) this.selectId = option.type;
}, },
onShow() { onShow() {
setTimeout( () => { setTimeout( () => {
if (!this.addonIsExist.fenxiao) { if (!this.addonIsExist.fenxiao) {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启分销', title: '商家未开启分销',
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.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单'); if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
if (!this.storeToken) { if (!this.storeToken) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.login.open('/pages_promotion/fenxiao/order'); this.$refs.login.open('/pages_promotion/fenxiao/order');
}); });
} }
}, },
methods: { methods: {
//获得列表数据 //获得列表数据
getData(mescroll) { getData(mescroll) {
this.emptyShow = false; this.emptyShow = false;
if (mescroll.num == 1) { if (mescroll.num == 1) {
this.orderList = []; this.orderList = [];
} }
this.$api.sendRequest({ this.$api.sendRequest({
url: '/fenxiao/api/order/page', url: '/fenxiao/api/order/page',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size, page_size: mescroll.size,
is_settlement: this.selectId is_settlement: this.selectId
}, },
success: res => { success: res => {
this.emptyShow = true; this.emptyShow = true;
let newArr = []; let newArr = [];
let msg = res.message; let msg = res.message;
if (res.code == 0 && res.data && res.data.list) { if (res.code == 0 && res.data && res.data.list) {
newArr = res.data.list; newArr = res.data.list;
} else { } else {
this.$util.showToast({ title: res.message }); this.$util.showToast({ title: res.message });
} }
mescroll.endSuccess(newArr.length); mescroll.endSuccess(newArr.length);
//设置列表数据 //设置列表数据
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表 if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
this.orderList = this.orderList.concat(newArr); //追加新数据 this.orderList = this.orderList.concat(newArr); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
fail: res => { fail: res => {
mescroll.endErr(); mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}); });
}, },
selectCate(e) { selectCate(e) {
this.selectId = e; this.selectId = e;
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
}, },
toDetail(e) { toDetail(e) {
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
id: e id: e
}); });
}, },
imageError(index) { imageError(index) {
this.orderList[index].sku_image = this.$util.getDefaultImage().goods; this.orderList[index].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.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
} }
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/order.scss'; @import './public/css/order.scss';
</style> </style>

View File

@@ -1,378 +1,378 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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,152 +1,152 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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" @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 font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text> <text class="price-color font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar">{{ orderItem.commission }}</text> <text class="price-color font-size-toolbar">{{ orderItem.commission }}</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-color">{{ $lang('common.currencySymbol') }}</text> <text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar">{{ orderItem.price }}</text> <text class="price-color font-size-toolbar">{{ orderItem.price }}</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="font-size-toolbar price-color">{{ orderItem.real_goods_money }}</text> <text class="font-size-toolbar price-color">{{ orderItem.real_goods_money }}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="cart-empty"><ns-empty text="暂无订单" :isIndex="false" v-if="orderList.length == 0 && emptyShow"></ns-empty></view> <view class="cart-empty"><ns-empty text="暂无订单" :isIndex="false" v-if="orderList.length == 0 && emptyShow"></ns-empty></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 fenxiaoWords from 'common/js/fenxiao-words.js'; import fenxiaoWords from 'common/js/fenxiao-words.js';
export default { export default {
data() { data() {
return { return {
orderList: [], orderList: [],
emptyShow: false, emptyShow: false,
fenxiaoId: '', fenxiaoId: '',
subMemberId: '' subMemberId: ''
}; };
}, },
mixins: [fenxiaoWords], mixins: [fenxiaoWords],
onLoad(option) { onLoad(option) {
if (option.fenxiao_id) { if (option.fenxiao_id) {
this.fenxiaoId = option.fenxiao_id; this.fenxiaoId = option.fenxiao_id;
} }
if (option.sub_member_id) { if (option.sub_member_id) {
this.subMemberId = option.sub_member_id; this.subMemberId = option.sub_member_id;
} }
}, },
onShow() { onShow() {
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单'); if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
}, },
methods: { methods: {
//获得列表数据 //获得列表数据
getData(mescroll) { getData(mescroll) {
this.emptyShow = false; this.emptyShow = false;
if (mescroll.num == 1) { if (mescroll.num == 1) {
this.orderList = []; this.orderList = [];
} }
this.$api.sendRequest({ this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/getorder', url: '/fenxiao/api/fenxiao/getorder',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size, page_size: mescroll.size,
fenxiao_id: this.fenxiaoId ? this.fenxiaoId : '', fenxiao_id: this.fenxiaoId ? this.fenxiaoId : '',
sub_member_id: this.subMemberId ? this.subMemberId : '' sub_member_id: this.subMemberId ? this.subMemberId : ''
}, },
success: res => { success: res => {
this.emptyShow = true; this.emptyShow = true;
let newArr = []; let newArr = [];
let msg = res.message; let msg = res.message;
if (res.code == 0 && res.data && res.data.list) { if (res.code == 0 && res.data && res.data.list) {
newArr = res.data.list; newArr = res.data.list;
} else { } else {
this.$util.showToast({ title: res.message }); this.$util.showToast({ title: res.message });
} }
mescroll.endSuccess(newArr.length); mescroll.endSuccess(newArr.length);
//设置列表数据 //设置列表数据
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表 if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
this.orderList = this.orderList.concat(newArr); //追加新数据 this.orderList = this.orderList.concat(newArr); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
fail: res => { fail: res => {
mescroll.endErr(); mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}); });
}, },
imageError(index) { imageError(index) {
this.orderList[index].sku_image = this.$util.getDefaultImage().goods; this.orderList[index].sku_image = this.$util.getDefaultImage().goods;
this.$forceUpdate(); this.$forceUpdate();
}, },
toDetail(e) { toDetail(e) {
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', { this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
id: e id: e
}); });
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/order.scss'; @import './public/css/order.scss';
.goods-wraps { .goods-wraps {
align-items: center; align-items: center;
} }
.goods_list .order-item .order-body .goods-wraps .goods-img, .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-body .goods-wraps .goods-info,
.goods_list .order-item .order-footers { .goods_list .order-item .order-footers {
padding: 0; padding: 0;
} }
</style> </style>

View File

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

View File

@@ -1,209 +1,209 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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 fenxiaoWords from 'common/js/fenxiao-words.js'; import fenxiaoWords from 'common/js/fenxiao-words.js';
export default { export default {
data() { data() {
return { return {
withdrawState: { withdrawState: {
'3': { '3': {
color: 'color: rgb(255, 69, 68)', color: 'color: rgb(255, 69, 68)',
text: '已转账' text: '已转账'
}, },
'1': { '1': {
color: 'color: rgb(255, 160, 68)', color: 'color: rgb(255, 160, 68)',
text: '待审核' text: '待审核'
}, },
'2': { '2': {
color: 'color: rgb(17, 189, 100)', color: 'color: rgb(17, 189, 100)',
text: '已审核' text: '已审核'
}, },
'-1': { '-1': {
color: 'color: rgb(255, 69, 68)', color: 'color: rgb(255, 69, 68)',
text: '已拒绝' text: '已拒绝'
} }
}, },
withdrawList: [], withdrawList: [],
emptyShow: false, emptyShow: false,
}; };
}, },
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.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细'); if(this.fenxiaoWords && this.fenxiaoWords.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细');
if (!this.storeToken) { if (!this.storeToken) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.login.open('/pages_promotion/fenxiao/withdraw_list'); this.$refs.login.open('/pages_promotion/fenxiao/withdraw_list');
}); });
} }
}, },
mixins: [fenxiaoWords], mixins: [fenxiaoWords],
methods: { methods: {
//获得列表数据 //获得列表数据
getData(mescroll) { getData(mescroll) {
this.emptyShow = false; this.emptyShow = false;
if (mescroll.num == 1) { if (mescroll.num == 1) {
this.withdrawList = []; this.withdrawList = [];
} }
this.$api.sendRequest({ this.$api.sendRequest({
url: '/fenxiao/api/withdraw/page', url: '/fenxiao/api/withdraw/page',
data: { data: {
page_size: mescroll.size, page_size: mescroll.size,
page: mescroll.num, page: mescroll.num,
}, },
success: res => { success: res => {
this.emptyShow = true; this.emptyShow = true;
let newArr = []; let newArr = [];
let msg = res.message; let msg = res.message;
if (res.code == 0 && res.data && res.data.list) { if (res.code == 0 && res.data && res.data.list) {
newArr = res.data.list; newArr = res.data.list;
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: msg title: msg
}); });
} }
mescroll.endSuccess(newArr.length); mescroll.endSuccess(newArr.length);
//设置列表数据 //设置列表数据
if (mescroll.num == 1) this.withdrawList = []; //如果是第一页需手动制空列表 if (mescroll.num == 1) this.withdrawList = []; //如果是第一页需手动制空列表
this.withdrawList = this.withdrawList.concat(newArr); //追加新数据 this.withdrawList = this.withdrawList.concat(newArr); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}, },
fail: res => { fail: res => {
mescroll.endErr(); mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} }
}); });
}, },
toDetail(id) { toDetail(id) {
this.$util.redirectTo('/pages_promotion/fenxiao/withdrawal_detail', { this.$util.redirectTo('/pages_promotion/fenxiao/withdrawal_detail', {
id: id id: id
}); });
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.account-box { .account-box {
width: 100vw; width: 100vw;
padding: 30rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 10rpx; padding-bottom: 10rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.tit { .tit {
color: #fff; color: #fff;
line-height: 1; line-height: 1;
} }
.iconmn_jifen_fill { .iconmn_jifen_fill {
font-size: 60rpx; font-size: 60rpx;
color: #fff; color: #fff;
} }
.point { .point {
color: #fff; color: #fff;
font-size: 60rpx; font-size: 60rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
} }
.detailed-wrap { .detailed-wrap {
.head { .head {
display: flex; display: flex;
height: 90rpx; height: 90rpx;
& > view { & > view {
flex: 1; flex: 1;
text-align: left; text-align: left;
padding: 0 $padding; padding: 0 $padding;
line-height: 90rpx; line-height: 90rpx;
} }
} }
.cont { .cont {
background: #fff; background: #fff;
.detailed-item { .detailed-item {
padding: $padding 10rpx; padding: $padding 10rpx;
margin: 0 $margin-both; margin: 0 $margin-both;
border-bottom: 2rpx solid #eee; border-bottom: 2rpx solid #eee;
position: relative; position: relative;
&:last-of-type { &:last-of-type {
border-bottom: none; border-bottom: none;
} }
.info { .info {
padding-right: 180rpx; padding-right: 180rpx;
.event { .event {
font-size: $font-size-base; font-size: $font-size-base;
line-height: 1.3; line-height: 1.3;
} }
.time { .time {
font-size: $font-size-base; font-size: $font-size-base;
color: $color-tip; color: $color-tip;
} }
} }
.right-wrap { .right-wrap {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
text-align: right; text-align: right;
.num { .num {
font-size: $font-size-toolbar; font-size: $font-size-toolbar;
} }
} }
} }
} }
} }
</style> </style>

View File

@@ -1,127 +1,127 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<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')">

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getListData" v-if="storeToken"> <mescroll-uni ref="mescroll" @getData="getListData" v-if="storeToken">
<block slot="list"> <block slot="list">
<view class="address-list"> <view class="address-list">

View File

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

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken"> <mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken">
<view class="goods_list" slot="list"> <view class="goods_list" slot="list">
<block v-if="collectionList.length > 0"> <block v-if="collectionList.length > 0">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view v-if="indent == 'all' && memberInfo" class="info-wrap"> <view v-if="indent == 'all' && memberInfo" class="info-wrap">
<!-- 头像@click="headImage" --> <!-- 头像@click="headImage" -->
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover"> <view class="info-list-cell info-item info-list-con" hover-class="cell-hover">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<template v-if="memberInfo"> <template v-if="memberInfo">
<!-- 修改用户名 --> <!-- 修改用户名 -->
<view v-if="indent == 'username'" class="edit-info"> <view v-if="indent == 'username'" class="edit-info">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view v-if="info" style="background-color: #fff;"> <view v-if="info" style="background-color: #fff;">
<view class="invite_adv"> <view class="invite_adv">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<!-- <view class="tab color-bg"> <!-- <view class="tab color-bg">
<view class="tab-left"> <view class="tab-left">
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month"> <picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<mescroll-uni @getData="getData" class="member-point"> <mescroll-uni @getData="getData" class="member-point">
<view slot="list"> <view slot="list">
<block v-if="dataList.length"> <block v-if="dataList.length">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view class="money-wrap"> <view class="money-wrap">
<text>-{{ detail.apply_money }}</text> <text>-{{ detail.apply_money }}</text>
</view> </view>

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<mescroll-uni @getData="getData" ref="mescroll"> <mescroll-uni @getData="getData" ref="mescroll">
<block slot="list"> <block slot="list">
<view class="notice-list" v-if="dataList.length"> <view class="notice-list" v-if="dataList.length">

View File

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

View File

@@ -1,87 +1,87 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view> <view>
<view class="page"> <view class="page">
<block v-for="(item, index) in goodsList" :key="index"> <block v-for="(item, index) in goodsList" :key="index">
<view class="eval-wrap"> <view class="eval-wrap">
<view class="eval-good"> <view class="eval-good">
<view class="good-box"> <view class="good-box">
<image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="widthFix" /> <image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="widthFix" />
<view class="good_info font-size-base">{{ item.sku_name }}</view> <view class="good_info font-size-base">{{ item.sku_name }}</view>
</view> </view>
</view> </view>
<view class="eval-star" v-if="!isEvaluate"> <view class="eval-star" v-if="!isEvaluate">
<view class="star-box"> <view class="star-box">
<view class="star-title color-base-bg-before">描述相符</view> <view class="star-title color-base-bg-before">描述相符</view>
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index" @change="setStar" /></view> <view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index" @change="setStar" /></view>
<view class="grade-li"> <view class="grade-li">
<view class="icon iconfont" :class=" <view class="icon iconfont" :class="
goodsEvalList[index].explain_type == '1' goodsEvalList[index].explain_type == '1'
? 'icon-haoping1 color-base-text' ? 'icon-haoping1 color-base-text'
: goodsEvalList[index].explain_type == '2' : goodsEvalList[index].explain_type == '2'
? 'icon-zhongchaping color-base-text' ? 'icon-zhongchaping color-base-text'
: goodsEvalList[index].explain_type == '3' : goodsEvalList[index].explain_type == '3'
? 'icon-zhongchaping' ? 'icon-zhongchaping'
: '' : ''
"></view> "></view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '1'">好评</view> <view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '1'">好评</view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '2'">中评</view> <view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '2'">中评</view>
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '3'">差评</view> <view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '3'">差评</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="eval-text"> <view class="eval-text">
<view class="text-box"> <view class="text-box">
<block v-if="!isEvaluate"> <block v-if="!isEvaluate">
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content" maxlength="200" /> <textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content" maxlength="200" />
<text class="maxSize">{{ goodsEvalList[index].content.length }}/200</text> <text class="maxSize">{{ goodsEvalList[index].content.length }}/200</text>
</block> </block>
<block v-else> <block v-else>
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content" maxlength="200" /> <textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content" maxlength="200" />
<text class="maxSize">{{ goodsEvalList[index].again_content.length }}/200</text> <text class="maxSize">{{ goodsEvalList[index].again_content.length }}/200</text>
</block> </block>
<view class="other-info"> <view class="other-info">
<view class="other-info-box" v-for="(i, t) in imgList[index]" :key="t"> <view class="other-info-box" v-for="(i, t) in imgList[index]" :key="t">
<image :src="$util.img(i)" mode="aspectFill" @click="preview(i, index)"></image> <image :src="$util.img(i)" mode="aspectFill" @click="preview(i, index)"></image>
<view class="imgDel" @click="deleteImg(i, index ,t)"><text class=" icon iconfont icon-delete"></text></view> <view class="imgDel" @click="deleteImg(i, index ,t)"><text class=" icon iconfont icon-delete"></text></view>
</view> </view>
<view class="other-info-box active" @click="addImg(index)" v-if="imgList[index].length < 6 || imgList[index].length == undefined"> <view class="other-info-box active" @click="addImg(index)" v-if="imgList[index].length < 6 || imgList[index].length == undefined">
<text class="icon iconfont icon-zhaoxiangji"></text> <text class="icon iconfont icon-zhaoxiangji"></text>
<text>{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6</text> <text>{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<view class="eval-bottom" :class="{ 'safe-area': isIphoneX }"> <view class="eval-bottom" :class="{ 'safe-area': isIphoneX }">
<view class="all-election" @click="isAll()" v-if="!isEvaluate"> <view class="all-election" @click="isAll()" v-if="!isEvaluate">
<view class="iconfont color-base-text" :class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view> <view class="iconfont color-base-text" :class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
<text>匿名</text> <text>匿名</text>
</view> </view>
<view class="action-btn"><button type="primary" @click="save()">提交</button></view> <view class="action-btn"><button type="primary" @click="save()">提交</button></view>
</view> </view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import sxRate from '@/pages_tool/components/sx-rate/index.vue'; import sxRate from '@/pages_tool/components/sx-rate/index.vue';
import evaluate from './public/js/evaluate.js'; import evaluate from './public/js/evaluate.js';
export default { export default {
components: { components: {
sxRate sxRate
}, },
mixins: [evaluate], mixins: [evaluate],
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/evaluate.scss' @import './public/css/evaluate.scss'
</style> </style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<scroll-view class="order-nav" :scroll-x="true" :show-scrollbar="false"> <scroll-view class="order-nav" :scroll-x="true" :show-scrollbar="false">
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item" @click="ontabtap(packageIndex)"> <view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item" @click="ontabtap(packageIndex)">
<text class="uni-tab-item-title" :class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''"> <text class="uni-tab-item-title" :class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view> <view>
<scroll-view scroll-y="true" class="refund-container"> <scroll-view scroll-y="true" class="refund-container">
<view class="goods-wrap"> <view class="goods-wrap">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view> <view>
<scroll-view scroll-y="true" class="refund-container"> <scroll-view scroll-y="true" class="refund-container">
<view class="goods-wrap" v-for="(item,index) in refund_data.order_goods_info" :key="index"> <view class="goods-wrap" v-for="(item,index) in refund_data.order_goods_info" :key="index">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<scroll-view scroll-y="true" class="detail-container" :class="{ 'safe-area': isIphoneX }" v-if="detail"> <scroll-view scroll-y="true" class="detail-container" :class="{ 'safe-area': isIphoneX }" v-if="detail">
<view v-show="action == ''"> <view v-show="action == ''">
<view class="status-wrap"> <view class="status-wrap">

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view> <view>
<view class="refund-option"> <view class="refund-option">
<view class="option-item" @click="selectRefundType(1)"> <view class="option-item" @click="selectRefundType(1)">

View File

@@ -1,99 +1,99 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view class="closeBox"> <view class="closeBox">
<image :src="$util.img('public/uniapp/store/storeclose.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/store/storeclose.png')" mode="widthFix"></image>
<text class="close-title">{{ textVal }}</text> <text class="close-title">{{ textVal }}</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
isIphoneX: false isIphoneX: false
}; };
}, },
onShow() { onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX(); this.isIphoneX = this.$util.uniappIsIPhoneX();
this.getSiteStatus(); this.getSiteStatus();
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.hideHomeButton(); wx.hideHomeButton();
// #endif // #endif
}, },
methods:{ methods:{
getSiteStatus(){ getSiteStatus(){
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/site/status', url: '/api/site/status',
data: {}, data: {},
success: res => { success: res => {
if (res.code == 0) { if (res.code == 0) {
this.$util.redirectTo('/pages/index/index'); this.$util.redirectTo('/pages/index/index');
} }
} }
}); });
} }
}, },
computed: { computed: {
textVal() { textVal() {
return '该店铺已打烊...'; return '该店铺已打烊...';
}, },
pageVal() { pageVal() {
if (this.$store.state.siteState == -2) { if (this.$store.state.siteState == -2) {
return '店铺不存在'; return '店铺不存在';
} else if (this.$store.state.siteState == -3) { } else if (this.$store.state.siteState == -3) {
return '店铺打烊'; return '店铺打烊';
} }
} }
}, },
onBackPress() { onBackPress() {
return true; return true;
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.head-nav { .head-nav {
width: 100%; width: 100%;
height: var(--status-bar-height); height: var(--status-bar-height);
} }
.head-nav.active { .head-nav.active {
padding-top: 40rpx; padding-top: 40rpx;
} }
.head-return { .head-return {
padding-left: 30rpx; padding-left: 30rpx;
padding-right: 30rpx; padding-right: 30rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
text-align: center; text-align: center;
font-weight: 600; font-weight: 600;
font-size: $font-size-toolbar; font-size: $font-size-toolbar;
text { text {
display: inline-block; display: inline-block;
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.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: 330rpx; margin-top: 330rpx;
} }
image { image {
width: 240rpx; width: 240rpx;
} }
.close-title { .close-title {
font-size: $font-size-toolbar; font-size: $font-size-toolbar;
color: $color-tip; color: $color-tip;
margin-top: 55rpx; margin-top: 55rpx;
letter-spacing: 4rpx; letter-spacing: 4rpx;
} }
</style> </style>

View File

@@ -1,52 +1,52 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view> <view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view> <web-view :src="src"></web-view>
</view> </view>
<!-- <diy-bottom-nav></diy-bottom-nav> --> <!-- <diy-bottom-nav></diy-bottom-nav> -->
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
src: '' src: ''
}; };
}, },
onLoad(option) { onLoad(option) {
// this.src = decodeURIComponent(option.src); // this.src = decodeURIComponent(option.src);
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/config/defaultvr', url: '/api/config/defaultvr',
success: res => { success: res => {
console.log(res) console.log(res)
if (res.code == 0) { if (res.code == 0) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title:res.data.title title:res.data.title
}) })
this.src = res.data.url this.src = res.data.url
} }
}, },
fail: res => { fail: res => {
} }
}); });
}, },
methods: { methods: {
navigateBack() { navigateBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.navigate-back { .navigate-back {
position: absolute; position: absolute;
top: 34rpx; top: 34rpx;
left: 34rpx; left: 34rpx;
z-index: 5; z-index: 5;
font-size: $font-size-toolbar; font-size: $font-size-toolbar;
} }
</style> </style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view> <view :style="themeColor">
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view> <view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view> <web-view :src="src"></web-view>

View File

@@ -5,6 +5,7 @@ Vue.use(Vuex)
import Http from '../common/js/http.js' import Http from '../common/js/http.js'
import { themeConfig } from '../common/js/config-external.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 util from '../common/js/util.js'
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
@@ -14,6 +15,7 @@ const store = new Vuex.Store({
tabBarList: '', tabBarList: '',
siteState: 1, siteState: 1,
themeStyle: '', themeStyle: '',
themeColor: '',
addonIsExist: { addonIsExist: {
bundling: 0, bundling: 0,
coupon: 0, coupon: 0,
@@ -236,6 +238,10 @@ const store = new Vuex.Store({
// 设置AI未读消息数量 // 设置AI未读消息数量
setAiUnreadCount(state, value) { setAiUnreadCount(state, value) {
state.aiUnreadCount = value; state.aiUnreadCount = value;
},
// 设置主题颜色
setThemeColor(state, value) {
state.themeColor = value;
} }
}, },
getters: { getters: {
@@ -253,6 +259,7 @@ const store = new Vuex.Store({
var data = res.data; var data = res.data;
if (data) { if (data) {
this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme?.name)); this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme?.name));
this.dispatch('themeColorSet');
// 底部导航 // 底部导航
this.commit('setTabBarList', data.diy_bottom_nav); this.commit('setTabBarList', data.diy_bottom_nav);
@@ -401,6 +408,34 @@ const store = new Vuex.Store({
this.commit('setCartIds', ids); this.commit('setCartIds', ids);
},
// 生成主题颜色CSS变量
themeColorSet() {
console.log('样式颜色设置...');
let theme = this.state.themeStyle;
if (!theme?.main_color || !theme?.aux_color) return;
try {
let themeColor = `--base-color:${theme.main_color};--base-help-color:${theme.aux_color};`;
if (this.state.tabBarHeight != '56px') themeColor += `--tab-bar-height:${this.state.tabBarHeight};`
Object.keys(theme).forEach(key => {
let data = theme[key];
if (typeof (data) == "object") {
Object.keys(data).forEach(k => {
themeColor += '--' + k.replace(/_/g, "-") + ':' + data[k] + ';';
});
} else if (typeof (key) == "string" && key) {
themeColor += '--' + key.replace(/_/g, "-") + ':' + data + ';';
}
});
for (let i = 9; i >= 5; i--) {
let color = util.colourBlend(theme.main_color, '#ffffff', (i / 10));
themeColor += `--base-color-light-${i}:${color};`;
}
this.commit('setThemeColor', themeColor);
} catch (e) {
console.error('设置主题颜色失败', e);
}
console.log('themeColor => ', this.state.themeColor);
} }
} }
}) })