[fix]全局主题配置

main
huyuanxiang 2 years ago
parent 8eb059753f
commit 4bed9058d6

@ -6,6 +6,9 @@ import {setTabBarBadge } from'./utils/util.js'
uni.$ajax = request; //
export default {
onShow() {
},
onLaunch: function () {
//#ifdef H5
@ -138,10 +141,22 @@ $black: #333333;
}
}
&.order {
.goods_btns .btns {
&.btn-item1 {
border-color: $color;
color: $color;
}
}
.bottom_btn .btns,
.morelist .title .quan {
background: $color;
&.shouhou {
color: #fff;
background-color: $color;
}
}
.iconfont,
.weizhi_icon .icon-dizhi,
.goods_title .price .t1,
.morelist .right_title,
@ -158,6 +173,63 @@ $black: #333333;
background: $color;
}
}
&.cart {
.bottom_all .left .delAll {
border-color: $color;
}
.text-green, .line-green, .lines-green,
.bottom_all .left .delAll,
.empty,
.nocart .iconfont {
color: $color;
}
.bottom_all .rights .jiesuan {
background: $color;
}
}
&.jieguo {
background-color: $color;
.wancheng {
color: $color;
border-color: $color;
}
.icon-chenggong {
color: $color;
}
}
&.userbox {
.iconfont {
color: $color;
}
}
&.order_list {
.iconfont,
.order_type,
.tabs_list.active-item {
color: $color;
font-weight: bold;
.active {
background-color: $color;
}
}
.list_box .bottom .btns .pay{
color: $color;
border-color: $color;
&.shouhou {
color: #fff;
background-color: $color;
}
}
}
&.evaluate {
.goods_price .price-text {
color: $color;
}
}
}

@ -1,9 +1,9 @@
{
"name" : "商城模板",
"appid" : "__UNI__8A51802",
"appid" : "__UNI__1EEA1F7",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 1,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
@ -74,19 +74,17 @@
"h5" : {
"devServer" : {
"disableHostCheck" : true,
"proxy" : "https://mall.meituan.com"
"proxy" : "https://mall.meituan.com",
"port" : 8081,
"https" : false
},
"router" : {
"mode" : "history",
"base" : "./"
"base" : ""
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "BIUBZ-UWKW3-FK53E-YIPVT-R4KG5-3DBA3"
}
}
"maps" : {}
},
"title" : "jiahui-yang商城模板"
"title" : "能辉在线订货商城"
}
}

@ -1,6 +1,6 @@
<template>
<view class="nodata">
<text class="iconfont icon-zanwushuju" :style="'color:' + colors"></text>
<text class="iconfont icon-zanwushuju"></text>
<view class="texts">
{{title}}
</view>

@ -1,9 +1,13 @@
<template>
<view class="tabs">
<view v-for="(item, index) in tabList" :key="index" class="tabs_list" @tap="setTabs(item,index)"
:style="'color:' + (active == index ?colors :'') + ';font-weight:' + (active == index ?'bold' : '500')">
<view v-for="(item, index) in tabList"
:key="index"
class="tabs_list"
:class="[active == index ? 'active-item' :' ']"
@tap="setTabs(item,index)"
>
{{item.name}}
<view class="active" :style="'background:' + colors" v-if="active == index"></view>
<view class="active" v-show="active == index"></view>
</view>
</view>
</template>

@ -1,6 +1,6 @@
<template>
<view class="top_nav" @tap="jumpNext">
<text :class="'iconfont ' + icons + ' icon'" :style="'color:' + colors"></text>
<text :class="'iconfont ' + icons + ' icon'" ></text>
<text class="name"><slot></slot></text>
<image src="/static/images/home/right.png" class="right_icon" v-if="rightshow == true"></image>
</view>
@ -31,7 +31,6 @@ export default {
},
methods: {
jumpNext() {
console.log(this.linkUrl);
if (this.linkUrl && this.linkUrl !== '') {
uni.navigateTo({
url: this.linkUrl

@ -4,7 +4,7 @@
<view class="footprint_box">
<view class="nodata" v-if="logList.length == 0">
<view>
<text class="iconfont icon-zanwu1" :style="'color:' + colors"></text>
<text class="iconfont icon-zanwu1" ></text>
</view>
<view class="tips">先去浏览一些吧</view>
</view>

@ -4,7 +4,7 @@
<view class="order_btnbox">
<view v-for="(item, index) in orderText" :key="index" class="order_btns" @tap="jumpOrder(item,index)">
<view>
<text :class="'iconfont ' + item.icon" :style="'color:' + colors"></text>
<text :class="'iconfont ' + item.icon" ></text>
</view>
<view style="color:#666">{{item.name}}</view>
<view class="pos2" v-if="item._num > 0"> {{item._num}}</view>

@ -1,10 +1,10 @@
<template>
<view class="my_server">
<list-cell :icons="'iconfont ' + icons" :colors="colors" :rightshow="false">{{titles}}</list-cell>
<list-cell :icons="'iconfont ' + icons" :rightshow="false">{{titles}}</list-cell>
<view class="server_box">
<view v-for="(item, index) in serverList" :key="index" class="server_list" @tap="jumpLink(item)">
<view>
<text :class="'iconfont ' + item.icon" :style="'color:' + colors"></text>
<text :class="'iconfont ' + item.icon"></text>
</view>
<view class="server_text">
{{item.name}}

@ -25,7 +25,6 @@
</view>
<view class="goods_price" v-else>
<text class="money text-lg">客服询价</text>
</view>
<!-- <view class="shoucang">
<view class="sc_icons" @tap="setisColl">

@ -1,6 +1,6 @@
<template>
<view>
<view class="evaluate">
<view class="evaluate" :class="['theme', themeObj.name]">
<view class="goods_data">
<image :src="goodData.url" mode=""></image>
<view class="right">
@ -8,7 +8,7 @@
<p class="goods_sku">{{goodData.specs}}</p>
<p class="goods_price">
<text :style="{color:colors}">{{goodData.price}}</text>
<text class="price-text" >{{goodData.price}}</text>
<text style="font-size: 28upx;">x{{goodData.goodsNo}} /{{ goodData.unit }}</text>
</p>
</view>
@ -71,6 +71,7 @@ export default {
return {
content:'',
colors:'',
themeObj: app.globalData.themeObj,
goodData:{},
imgUrl:[],//
starNoImg:'/static/images/home/star-no.png',

@ -1,12 +1,12 @@
<template>
<view>
<view class="order">
<view class="order" :class="['theme', themeObj.name]">
<!-- 收货地址 -->
<view class="order_address">
<image src="/static/images/home/bottom.png"></image>
<view class="address_box">
<view class="weizhi_icon">
<text class="iconfont icon-dizhi" :style="'color:' + colors"></text>
<text class="iconfont icon-dizhi" ></text>
</view>
<block>
<view class="center">
@ -31,7 +31,7 @@
规格: {{item.specs}}
</view>
<view class="price">
<view class="t1" :style="'color:' + colors">{{item.price}}</view>
<view class="t1">{{item.price}}</view>
<view class="t3">
x{{item.goodsNo}}{{item.unit}}
</view>
@ -52,9 +52,9 @@
<view class="btns" style="margin-right: 40upx;" @click="onafterSale(item)">
申请售后
</view>
<view class="btns"
<view class="btns btn-item1"
@click="onevaluate(item)" :style="{borderColor:colors,color:colors}">
@click="onevaluate(item)">
{{ item.commitId ? '查看评价' : '去评价'}}
</view>
</view>
@ -76,7 +76,7 @@
</view>
<view class="morelist">
<view class="title">
<text class="quan" :style="'background:' + colors"></text>
<text class="quan" ></text>
<text>运费</text>
</view>
<view class="right_title">
@ -85,7 +85,7 @@
</view>
<view class="morelist">
<text class="title">实付款</text>
<view class="right_title" :style="'color:' + colors + ';'">
<view class="right_title" >
{{goods.totalAmount}}
</view>
</view>
@ -135,7 +135,7 @@
<view class="bottom_btn" >
<block v-if="goods.state == 0">
<view class="moneys">
合计: <text :style="'color:' + colors + ';'">{{goods.totalAmount}}</text>
合计: <text >{{goods.totalAmount}}</text>
</view>
<view class="btns"
:style="'color:' + colors + ';border:1upx solid ' + colors + ';margin-right:20upx'"
@ -184,7 +184,8 @@ import loading from "../../commponent/public/loading";
export default {
data() {
return {
colors: '',
colors: app.globalData.newColor,
themeObj: app.globalData.themeObj,
status: 0,
//
isShow: true,
@ -232,14 +233,8 @@ export default {
onLoad: function (options) {
let status = 0;
if (options.status) {
status = options.status;
this.status = options.status;
}
this.setData({
colors: app.globalData.newColor,
status: status
});
setTimeout(() => {
this.setData({
isShow: false
@ -885,7 +880,6 @@ page {
}
.shouhou {
border: 1upx solid #ddd;
color: #999!important;
font-weight: normal!important;
color: #999;
}
</style>

@ -1,13 +1,13 @@
<template>
<view>
<view class="order_list">
<view class="order_list" :class="['theme', themeObj.name]">
<view class="top_nav">
<view style="background-color: #FFFFFF;">
<navBar :showLeft="true" navTitle="订单列表" textcolor="#000" :leftBg="false"></navBar>
</view>
<!-- 顶部tab -->
<view class="nav_top" style="border-bottom: 1upx solid #F8F8F8;">
<tabs :colors="colors" :tabList="tabList" :active="active" @setTabs="setTabs"></tabs>
<tabs :tabList="tabList" :active="active" @setTabs="setTabs"></tabs>
</view>
</view>
<!-- 占位 -->
@ -16,7 +16,7 @@
<view v-for="(item, index) in orderList" :key="index" class="lists">
<view class="type">
<text class="order_id">订单编号:{{item.id}}</text>
<text class="order_type" :style="'color:' + colors">
<text class="order_type">
{{ item.state | setStatus }}
</text>
</view>
@ -40,7 +40,7 @@
<view class="btns">
<block v-if="item.state == 0">
<!-- <view class="pay" :style="'color:#fff;background:' + colors+ ';border-color:' + colors" @tap="jumpDetails(item)"></view> -->
<view class="pay shouhou" :style="'color:' + colors + ';border-color:' + colors" @tap="cencalOrder(item)"></view>
<view class="pay shouhou" @tap="cencalOrder(item)"></view>
</block>
<block v-if="item.state == 1">
<!-- <view class="pay shouhou" @tap="onRefund(item)"></view> -->
@ -50,7 +50,7 @@
<!-- <view class="pay shouhou" @tap="onRefund(item)">退</view> -->
</block>
<block v-if="item.state == 3">
<view class="pay shouhou" :style="'color:' + colors + ';border-color:' + colors" @tap="jumpDetails(item)"></view>
<view class="pay shouhou" @tap="jumpDetails(item)"></view>
<view class="pay shouhou" @tap="jumpDetails(item)"></view>
</block>
<!-- <view class="pay shouhou" v-if="item.state == 4" @click="delOrder(item)"></view> -->
@ -68,12 +68,13 @@
<script>
import { getOrderList, editOrder } from '@/api/index.js'
var app = getApp();
import tabs from "../../commponent/public/tabs";
import loading from "../../commponent/public/loading";
import navBar from '../../commponent/public/navBar.vue'
import { ORDER_NAVS } from '@/config/order.js'
import { getUserInfo, setSalesGoods } from '@/utils/auth';
const app = getApp();
export default {
data() {
return {
@ -83,7 +84,8 @@ import { getUserInfo, setSalesGoods } from '@/utils/auth';
active: 0,
orderList: [],
isShow: true,
colors: ""
colors: "",
themeObj: app.globalData.themeObj
};
},
filters: {

@ -1,17 +1,17 @@
<template>
<view class="jieguo" :style="{background: colors}">
<view class="jieguo" :class="['theme', themeObj.name]">
<view class="place">
</view>
<view class="jieguo_box">
<view class="success">
<text class="iconfont icon-chenggong" :style="'color:' + colors"></text>
<text class="iconfont icon-chenggong" ></text>
</view>
<view class="texts">
<!-- 支付成功 -->
订单创建成功
</view>
<!-- <view class="moneys">35.9</view> -->
<view class="wancheng" @tap="onsuccess" :style="'color:' + colors + ';border-color:' + colors"></view>
<view class="wancheng" @tap="onsuccess"></view>
<view class="ewm" @tap="jumpUser">>>></view>
</view>
</view>
@ -19,12 +19,13 @@
<script>
var app = getApp();
const app = getApp();
export default {
data() {
return {
colors: ""
themeObj: app.globalData.themeObj
};
},
@ -35,9 +36,7 @@ export default {
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
colors: app.globalData.newColor
});
},
/**

@ -1,5 +1,5 @@
<template>
<view class="setting">
<view class="setting" :class="['theme', themeColor.name]">
<view class="cell_box" @tap="goItem">
<item-cell cellname="关于商城" ></item-cell>
<item-cell cellname="站点帮助" ></item-cell>
@ -136,6 +136,7 @@ export default {
});
app.globalData.newColor = item.color;
app.globalData.themeObj = item
},
onexit() {
//退

@ -1,5 +1,5 @@
<template>
<view class="cart" style="background-color: #5f6f7;min-height: 100vh;">
<view class="cart" :class="['theme', themeObj.name]" style="background-color: #5f6f7;min-height: 100vh;">
<!-- #ifdef APP-PLUS -->
<div class="status-bar" :style="{height:statusBarHeight+'px'}"></div>
<!-- #endif -->
@ -80,18 +80,18 @@
</view>
<view class="text" style="margin-left: 8upx;">全选</view>
</view>
<view class="delAll" @click="delectAll" :style="'border-color:' + colors + ';color:' + colors" v-if="allCurrent == true"></view>
<view class="delAll" @click="delectAll" v-if="allCurrent == true"></view>
</view>
<view class="rights">
<view class="jiesuan" :style="'background-color:' + colors" @click="settlement">({{sum}})</view>
<view class="jiesuan" @click="settlement">({{sum}})</view>
<view class="sum">合计<text style="font-size: 30upx;">{{sumPrice || 0}}</text></view>
</view>
</view>
</block>
<!-- 如果购物车没有数据 -->
<view class="nocart" v-if="cartList.length == 0">
<text class="iconfont icon-gouwuche1" :style="'color:' + colors"></text>
<view>空空如也,<text :style="'color:' + colors" @tap="onStroll">便 ></text></view>
<text class="iconfont icon-gouwuche1" ></text>
<view>空空如也,<text class="empty" @tap="onStroll">便 ></text></view>
</view>
</view>
</template>
@ -120,7 +120,8 @@
sumPrice: 0,
lock: false,
bottomShow: '',
showHeader: false
showHeader: false,
themeObj: app.globalData.themeObj
};
},
@ -162,6 +163,7 @@
return
}
const cartList = getCart() || []
this.themeObj = app.globalData.themeObj
this.setData({
colors: app.globalData.newColor,
current: '99999',

@ -1,5 +1,5 @@
<template>
<view class="userbox">
<view class="userbox" :class="['theme', themeObj.name]">
<!-- 头部个人信息 不变-->
<view class="userHeader" :style="{background:colors}">
<image src="/static/images/user/user-bg.png" class="user_bg"></image>
@ -70,6 +70,7 @@ export default {
data() {
return {
colors: '',
themeObj: app.globalData.themeObj,
startY: 0,
//
moving: false,
@ -147,40 +148,33 @@ export default {
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (!getToken()) {
uni.navigateTo({
url: '/pages/login/index1'
})
return
}
this.logList = getGoodsHistory()
let colors = app.globalData.newColor;
let oldcolor = this.colors;
let userdata = getUserInfo() || {};
this.getOrderStatus()
this.setData({
colors: colors,
userdata: userdata
});
if (oldcolor !== colors) {
//
let config = getConfig();
let tabList = config.tabList || [];
uni.setTabBarStyle({
selectedColor: colors
});
if(tabList){
for (var i = 0; i < tabList.length; i++) {
let img = tabList[i];
uni.setTabBarItem({
//tabBar
index: i,
selectedIconPath: img
});
}
}
}
},
this.themeObj = app.globalData.themeObj
uni.setTabBarStyle({
selectedColor: this.themeObj .color
});
this.themeObj .tabList.forEach((v, index) => {
uni.setTabBarItem({
//tabBar
index: index,
selectedIconPath: v
});
})
if (!getToken()) {
uni.navigateTo({
url: '/pages/login/index1'
})
return
}
this.logList = getGoodsHistory()
let colors = app.globalData.newColor;
let oldcolor = this.colors;
let userdata = getUserInfo() || {};
this.userdata = userdata
this.getOrderStatus()
},
/**
* 生命周期函数--监听页面隐藏

Loading…
Cancel
Save