Commit a6040332 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

# Conflicts:
#	pages/cart/cart.vue
parents ba161133 29d5b80b
......@@ -104,7 +104,7 @@ export default {
font-family: "oswald";
src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf");
}
*{
html,body{
font-family: "oswald" !important;
}
swiper{
......
......@@ -3,6 +3,10 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [{
"path": "pages/order/index/index"
},
{
"path": "pages/index/index"
},
{
......@@ -49,10 +53,6 @@
},
{
"path": "pages/order/index"
},
{
"path": "pages/order/index/index"
}
],
"globalStyle": {
......
......@@ -53,6 +53,7 @@
export default {
data(){
return{
pageTitle:'收货地址',
contentHeight:0,
mainColor:'',
msg:{
......@@ -75,7 +76,9 @@
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
if(option.u!=undefined){
......
......@@ -70,6 +70,7 @@ import auth from "../../components/auth/index.vue";
export default {
data() {
return {
pageTitle:'收货地址',
loading: true,
list: [],
showAuth: false,
......@@ -88,9 +89,23 @@ export default {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad() {
console.log(uni.getStorageSync("basedata"));
this.u = uni.getStorageSync("userinfo");
this.u = wx.getStorageSync("userinfo");
if (!this.u) {
this.u = {
nickName: "未登录",
......@@ -190,9 +205,7 @@ export default {
});
}
},
mounted() {
}
};
</script>
......
<template>
<div class="cartStyle" v-if="!isloading">
<div class="cartStyle" v-if="!isloading" :style="{ height: contentHeight }">
<view
style="
display: flex;
......@@ -26,6 +26,21 @@
mode="car"
></u-empty>
<view
v-if="list.length > 0"
style="
height: calc(100vh - 60px);
width: calc(100vw);
overflow: hidden;
padding-top: 10px;
"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
:style="{ height: '100%' }"
>
<template v-if="list.length > 0">
<view
class="cartList"
......@@ -41,9 +56,12 @@
"
>
<u-checkbox-group @change="mch_SelectAll(c.checked, i)">
<u-checkbox v-model="c.checked" shape="circle" :active-color="mc">{{
c.name
}}</u-checkbox>
<u-checkbox
v-model="c.checked"
shape="circle"
:active-color="mc"
>{{ c.name }}</u-checkbox
>
</u-checkbox-group>
</view>
<view
......@@ -54,7 +72,9 @@
>
<u-checkbox-group
v-if="item.new_status == 0 || editType == true"
@change="clickcheckbox(item.checked, item.attrs.price, index, i)"
@change="
clickcheckbox(item.checked, item.attrs.price, index, i)
"
>
<u-checkbox
v-model="item.checked"
......@@ -109,7 +129,11 @@
>
<view v-for="(attr, inde2x) in item.attrs.attr" :key="inde2x">
<Text
style="color: #a0a09d; font-size: 24rpx; margin-right: 5rpx;"
style="
color: #a0a09d;
font-size: 24rpx;
margin-right: 5rpx;
"
>{{ attr.attr_group_name }}:{{ attr.attr_name }}</Text
>
</view>
......@@ -158,11 +182,13 @@
</view>
</view>
</template>
</scroll-view>
</view>
<view class="box_bottom" :style="{ 'margin-bottom': bottommargin }">
<view class="box_bottom">
<div style="margin-left: 30rpx;">
<u-checkbox-group @change="SelectAll">
<u-checkbox v-model="allchecked" shape="circle" active-color="red"
<u-checkbox v-model="allchecked" shape="circle" :active-color="mc"
>全选</u-checkbox
>
</u-checkbox-group>
......@@ -245,34 +271,33 @@ export default {
: [];
if (this.cstyle.cat_style == "4") {
// this.searchStyle.p = {
// position: "fixed",
// top: this.navHeight,
// width: "100%",
// left: "0",
// };
}
},
mounted() {
let currentPages = getCurrentPages();
let c = this.$uiConfig.is_bang ? 80 : 52;
this.bottommargin = c - 2 + "px";
this.listbottom = c - 2 + 50 + "px";
this.contentHeight = this.$utils.calcContentHeight(c);
this.listbottom = c + 44 + "px";
this.contentHeight = this.$utils.calcContentHeight(c - 42) + "px";
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").bar_title
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init();
},
methods: {
goHome() {
uni.redirectTo({ url: "/pages/index/main" });
uni.redirectTo({
url: "/pages/index/main",
});
},
init() {
uni.showNavigationBarLoading();
......@@ -552,18 +577,18 @@ export default {
if (this.checkCount > 0) {
let forms = {
list: [],
address_id:0,
address_id: 0,
};
this.list.forEach((y) => {
let good={
mch_id:y.mch_id,
let good = {
mch_id: y.mch_id,
goods_list: [],
distance: 0,
remark: "",
order_form: [],
use_integral: 0,
user_coupon_id: 0,
}
};
y.goods_list.forEach((x) => {
if (x.checked) {
let g = {
......@@ -579,10 +604,10 @@ export default {
attr_group_id: x.attr_group_id,
});
});
good.goods_list.push(g)
good.goods_list.push(g);
}
});
forms.list.push(good)
forms.list.push(good);
});
uni.navigateTo({
url:
......@@ -608,18 +633,22 @@ export default {
position: relative;
font-family: "oswald";
}
.cartStyle .u-checkbox__label {
margin-left: 12px;
}
.cartStyle .grid-text {
font-size: 24rpx;
margin-top: 4rpx;
color: #939393;
}
.cartStyle .grid-text_r {
margin-top: 4rpx;
margin-right: 10rpx;
}
.cartStyle .cartList {
width: 100%;
display: flex;
......@@ -627,6 +656,7 @@ export default {
align-items: center;
overflow-y: hidden;
}
.cartStyle .cartList .cartList_item {
width: 100%;
padding: 40rpx 30rpx;
......@@ -635,6 +665,7 @@ export default {
align-items: center;
border-bottom: 1rpx solid #f5f5f5;
}
.cartList .cartList_item .item_input {
width: 200rpx;
height: 60rpx;
......@@ -644,6 +675,7 @@ export default {
align-items: center;
justify-content: space-between;
}
.cartList .item_input .item_input_l,
.item_input_r {
width: 50rpx;
......@@ -653,16 +685,18 @@ export default {
align-items: center;
justify-content: center;
}
.cartStyle .item_input .item_input_c {
text-align: center;
width: 50rpx;
height: 60rpx;
font-size: 20rpx;
}
.cartStyle .box_bottom {
width: 100%;
height: 50px;
position: fixed;
position: absolute;
background: #fff;
left: 0;
bottom: 0;
......@@ -673,6 +707,7 @@ export default {
border-top: 1rpx solid #f5f5f5;
z-index: 999;
}
.cartStyle .bottom_btn {
display: flex;
align-items: center;
......@@ -680,6 +715,7 @@ export default {
width: 250rpx;
height: 50px;
}
.cartStyle .Deletestyle {
margin-right: 40rpx;
}
......
......@@ -64,6 +64,7 @@
export default {
data() {
return {
pageTitle:'我的收藏',
loading: true,
contentHeight:0,
showAuth:false,
......@@ -84,6 +85,21 @@
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.init()
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length-1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(){
this.u = uni.getStorageSync("userinfo");
if (!this.u) {
......@@ -185,6 +201,7 @@
margin-bottom: 3px;
font-size: 13px;
margin: 7px 10px;
height: 36px;
}
.favoriteStyle .u-good-list .good .good-info {
display: flex;
......
......@@ -29,7 +29,7 @@
</view>
<view v-if="g.length > 0"
style="
height: calc(100vh - 40px);
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding-top: 10px;
......@@ -47,6 +47,8 @@
<view class="cBox_item" v-for="(cx, ci) in item.goods" :key="ci" >
<view class="good-img" @click="clickHandler(cx.goods_id)">
<image :src="cx.goodsWarehouse.cover_pic" style="width: 100%; height: 100%;" />
<image src="../../../static/images/icon/plugins-out.png" v-if="item.goods_num==0"
style="width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;" />
</view>
<view class="good-info">
<Text class='good-name' @click="clickHandler(cx.goods_id)">{{cx.goodsWarehouse.name}}</Text>
......@@ -60,14 +62,15 @@
</view>
</view>
</scroll-view>
<u-divider
contentPosition="center"
v-if="isover"
:margin-top="20"
:margin-bottom="20"
>没有更多商品了</u-divider>
bg-color='#f3f4f6'
>没有更多足迹了</u-divider>
</scroll-view>
</view>
<!-- <auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> -->
<view class="loading" v-show="loading">
......@@ -128,6 +131,7 @@
export default {
data() {
return {
pageTitle:"我的足迹",
isloading:true,
loading:false,
loading2:false,
......@@ -165,6 +169,21 @@
this.fun_date(0)
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length-1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(){
this.u = uni.getStorageSync("userinfo");
if (!this.u) {
......@@ -404,6 +423,7 @@
}
.footStyle .good-img {
position: relative;
width: 100%;
height: 200rpx;
}
......
This diff is collapsed.
......@@ -77,6 +77,7 @@
:name="item.name" @click="goUrl(item.link_url)">
<image :src='item.icon_url' style="width: 66rpx;height: 60rpx;"></image>
<Text style='margin-top: 10rpx;'>{{item.name}}</Text>
<view v-if='item.num>0' class='badge' :style="{'background':mainColor}">{{item.num}}</view>
</view>
</view>
</view>
......@@ -133,7 +134,7 @@
},
onLoad() {
this.navHeight = this.$navHeight - 2;
this.u = uni.getStorageSync("userinfo");
this.u = wx.getStorageSync("userinfo");
if (!this.u) {
this.u = {
nickName: "未登录",
......@@ -141,10 +142,10 @@
};
this.showAuth = true;
}
this.cstyle = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").cat_style
: [];
if (this.cstyle.cat_style == "4") {
}
......@@ -157,16 +158,18 @@
this.contentHeight = this.$utils.calcContentHeight(c);
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").bar_title
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
console.log(uni.getStorageSync("basedata"))
console.log(wx.getStorageSync("basedata"))
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.userinfo()
this.getmeue()
......@@ -324,6 +327,20 @@
flex-direction: column;
align-items: center;
margin-top: 20rpx;
position: relative
}
.userStyle .badge{
position: absolute;
right: -10rpx;
top: -10rpx;
padding:0 7rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #fff;
height: 30rpx;
border-radius: 15rpx;
}
.userStyle .menus{
width: 94%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment