Browse Source

2023-02-23

功能完善
master
guoxing 2 years ago
parent
commit
932ebc04c7
  1. 3
      mallplusui-uniapp-app/common/api.js
  2. 30
      mallplusui-uniapp-app/components/coolc-coupon/coolc-coupon.vue
  3. 28
      mallplusui-uniapp-app/pages/index/index.vue
  4. 209
      mallplusui-uniapp-app/pages/index/user.vue
  5. 4
      mallplusui-uniapp-app/pagesA/product/list.vue
  6. 2
      mallplusui-uniapp-app/pagesU/user/coupon.vue
  7. 4
      mallplusui-uniapp-app/store/index.js

3
mallplusui-uniapp-app/common/api.js

@ -313,6 +313,7 @@ export default {
return res.data.data; return res.data.data;
} else { } else {
console.log(">>>>>="); console.log(">>>>>=");
console.log(">>>>>=",res.data);
if (res.data) { if (res.data) {
if (!res.data.msg) { if (!res.data.msg) {
res.data.msg = res.data.data; res.data.msg = res.data.data;
@ -321,7 +322,7 @@ export default {
title: res.data.msg, title: res.data.msg,
icon: 'none' icon: 'none'
}); });
this.$api.msg(res.data.msg); // this.$api.msg(res.data.msg);
} }
} }

30
mallplusui-uniapp-app/components/coolc-coupon/coolc-coupon.vue

@ -8,10 +8,10 @@
<view class="demand">{{ item.minPoint }} {{ item.amount }}</view> <view class="demand">{{ item.minPoint }} {{ item.amount }}</view>
</view> </view>
</view> </view>
<view class="get-btn" v-if="!types" :style="{color:color, borderColor:color, background:solid}" <view class="get-btn" :style="{color:color, borderColor:color, background:solid}"
@click="acceptCoupon(item)">立即领取</view> @click="acceptCoupon(item)">立即领取</view>
<navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}" <!-- <navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}"
:url='item.url' @click="useCoupon(item)">立即使用</navigator> :url='item.url' @click="useCoupon(item)">立即使用</navigator> -->
</view> </view>
</template> </template>
@ -21,6 +21,9 @@
import { import {
formatDate formatDate
} from '@/common/date'; } from '@/common/date';
import {
mapState
} from 'vuex';
export default { export default {
components: { components: {
@ -54,8 +57,12 @@
return formatDate(date, 'yyyy-MM-dd hh:mm:ss') return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
}, },
}, },
computed: {
...mapState(['hasLogin', 'userInfo']),
},
methods: { methods: {
async acceptCoupon(item) { async acceptCoupon(item) {
if (this.hasLogin) {
this.types = !this.types this.types = !this.types
uni.showLoading({ uni.showLoading({
title: '请稍后' title: '请稍后'
@ -64,15 +71,20 @@
let params = { let params = {
couponId: item.id couponId: item.id
}; };
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
console.log(data);
if (data) {
this.$api.msg(data);
this.clickSubMethod(item) this.clickSubMethod(item)
// let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
// console.log("data?????", data);
// if (data) {
// // this.$api.msg(data);
// this.clickSubMethod(item)
} // }
uni.hideLoading(); uni.hideLoading();
} else {
uni.navigateTo({
url: '/pages/public/login'
});
}
}, },
clickSubMethod(vel) { clickSubMethod(vel) {
console.log('clickSubMethod') console.log('clickSubMethod')

28
mallplusui-uniapp-app/pages/index/index.vue

@ -360,19 +360,35 @@
} }
}, },
}, },
computed: {
...mapState(['hasLogin', 'userInfo']),
},
methods: { methods: {
clickParentMethod() { clickParentMethod() {
console.log('clickParentMethod') console.log('clickParentMethod')
this.$refs.SubComponent.callSubMethod() this.$refs.SubComponent.callSubMethod()
}, },
callParentMethod(val) { callParentMethod(val) {
let info = val
console.log('callParentMethod: ' + val) console.log('callParentMethod: ' + val)
console.log('val: ' + val.id)
console.log('val: ' + info.id)
// listfunctionitem // listfunctionitem
var index = this.couponList.findIndex(function(item) { var index = this.couponList.findIndex(
return item.id == val.id; // function(item) {
// console.log('item: ' + JSON.stringify(item))
// console.log('val: ' + val)
// return item.id == val.id;
item => {
console.log('item: ' + JSON.stringify(item).id)
console.log('val: ' + val.id)
if (item == val) {
return true
}
}) })
console.log('index: ' + index)
this.couponList.splice(index, 1); this.couponList.splice(index, 1);
// this.getCouponList();
}, },
async sysInfoMethod() { async sysInfoMethod() {
@ -526,7 +542,7 @@
} }
}, },
/** /**
* 获取轮播图 * 获取优惠券
*/ */
async getCouponList() { async getCouponList() {
let params = { let params = {
@ -536,7 +552,9 @@
if (data) { if (data) {
console.log("优惠券") console.log("优惠券")
console.log("优惠券", data) console.log("优惠券", data)
this.couponList = data || []; console.log("优惠券id",data[0].id)
this.couponList = []
this.couponList = this.couponList.concat(data) || [];
} }
}, },
/** /**

209
mallplusui-uniapp-app/pages/index/user.vue

@ -6,21 +6,30 @@
<view class="member-top-c"> <view class="member-top-c">
<template v-if="userDetailInfo && userDetailInfo.id"> <template v-if="userDetailInfo && userDetailInfo.id">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo"></image> <image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo">
<view class="user-name" style="margin-left: 10upx;color: #FFFFFF;" @click="toUserInfo">{{ userDetailInfo.nickname || userDetailInfo.username }}</view> </image>
<view v-if="userDetailInfo.storeId" class="vip-card-box1" @click="toNav('../../pagesC/seller/index')"><view class="b-btn">卖家中心</view></view> <view class="user-name" style="margin-left: 10upx;color: #FFFFFF;" @click="toUserInfo">
{{ userDetailInfo.nickname || userDetailInfo.username }}
</view>
<view v-if="userDetailInfo.storeId" class="vip-card-box1"
@click="toNav('../../pagesC/seller/index')">
<view class="b-btn">卖家中心</view>
</view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<!-- #ifdef H5 || APP-PLUS --> <!-- #ifdef H5 || APP-PLUS -->
<image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toLogin"></image> <image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toLogin">
</image>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toWeChatLogin"></image> <image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toWeChatLogin">
</image>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-ALIPAY --> <!-- #ifdef MP-ALIPAY -->
<view class="portrait"></view> <view class="portrait"></view>
<view><button class="login-btn" open-type="getAuthorize" @click="getALICode" hover-class="btn-hover">授权登录</button></view> <view><button class="login-btn" open-type="getAuthorize" @click="getALICode"
hover-class="btn-hover">授权登录</button></view>
<!-- #endif --> <!-- #endif -->
</template> </template>
</view> </view>
@ -37,23 +46,17 @@
</view> </view>
</view> </view>
<view <view class="cover-container" :style="[
class="cover-container"
:style="[
{ {
transform: coverTransform, transform: coverTransform,
transition: coverTransition transition: coverTransition
} }
]" ]" @touchstart="coverTouchstart" @touchmove="coverTouchmove" @touchend="coverTouchend">
@touchstart="coverTouchstart"
@touchmove="coverTouchmove"
@touchend="coverTouchend"
>
<image class="arc" src="/static/arc.png"></image> <image class="arc" src="/static/arc.png"></image>
<view class="tj-sction"> <view class="tj-sction">
<view class="tj-item" @click="toNav('../../pagesU/user/deposit')"> <view class="tj-item" @click="toNav('../../pagesU/user/deposit')">
<text class="num">{{ userDetailInfo.blance || 0 }}</text> <text class="num">{{ userDetailInfo.blance || 0}}</text>
<text>余额</text> <text>余额</text>
</view> </view>
<view class="tj-item" @click="toNav('../../pagesU/user/coupon')"> <view class="tj-item" @click="toNav('../../pagesU/user/coupon')">
@ -67,20 +70,24 @@
</view> </view>
<!-- 订单 --> <!-- 订单 -->
<view class="order-section"> <view class="order-section">
<view class="order-item" @click="navTo('/pages/order/order?status=0')" hover-class="common-hover" :hover-stay-time="50"> <view class="order-item" @click="navTo('/pages/order/order?status=0')" hover-class="common-hover"
:hover-stay-time="50">
<text class="yticon icon-shouye"></text> <text class="yticon icon-shouye"></text>
<text>全部订单</text> <text>全部订单</text>
</view> </view>
<view class="order-item" @click="navTo('/pages/order/order?status=2')" hover-class="common-hover" :hover-stay-time="50"> <view class="order-item" @click="navTo('/pages/order/order?status=2')" hover-class="common-hover"
:hover-stay-time="50">
<text class="yticon icon-daifukuan"></text> <text class="yticon icon-daifukuan"></text>
<text>待付款</text> <text>待付款</text>
</view> </view>
<view class="order-item" @click="navTo('/pages/order/order?status=3')" hover-class="common-hover" :hover-stay-time="50"> <view class="order-item" @click="navTo('/pages/order/order?status=3')" hover-class="common-hover"
:hover-stay-time="50">
<text class="yticon icon-yishouhuo"></text> <text class="yticon icon-yishouhuo"></text>
<text>待收货</text> <text>待收货</text>
</view> </view>
<view class="order-item" @click="navTo('../../pagesA/after_sale/list')" hover-class="common-hover" :hover-stay-time="50"> <view class="order-item" @click="navTo('../../pagesA/after_sale/list')" hover-class="common-hover"
:hover-stay-time="50">
<text class="yticon icon-shouhoutuikuan"></text> <text class="yticon icon-shouhoutuikuan"></text>
<text>退款/售后</text> <text>退款/售后</text>
</view> </view>
@ -92,14 +99,18 @@
<text>浏览历史</text> <text>浏览历史</text>
</view> </view>
<scroll-view scroll-x class="h-list" v-if="viewList && viewList.length > 0"> <scroll-view scroll-x class="h-list" v-if="viewList && viewList.length > 0">
<image v-for="(item, index) in viewList" :key="index" @click="navToDetailPage(item)" :src="item.pic" mode="aspectFill"></image> <image v-for="(item, index) in viewList" :key="index" @click="navToDetailPage(item)" :src="item.pic"
mode="aspectFill"></image>
</scroll-view> </scroll-view>
<!--<list-cell icon="icon-iconfontweixin" iconColor="#e07472" title="我的钱包" tips="您的会员还有3天过期"></list-cell>--> <!--<list-cell icon="icon-iconfontweixin" iconColor="#e07472" title="我的钱包" tips="您的会员还有3天过期"></list-cell>-->
<list-cell icon="icon-dizhi" iconColor="#5fcda2" title="地址管理" @eventClick="navTo('../../pagesU/address/address')"></list-cell> <list-cell icon="icon-dizhi" iconColor="#5fcda2" title="地址管理"
<list-cell icon="icon-tuandui" iconColor="#EE82EE" title="个人资料" @eventClick="navTo('../../pagesU/user/profile')"></list-cell> @eventClick="navTo('../../pagesU/address/address')"></list-cell>
<list-cell icon="icon-tuandui" iconColor="#EE82EE" title="个人资料"
@eventClick="navTo('../../pagesU/user/profile')"></list-cell>
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell> <!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell>
<list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>--> <list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏" @eventClick="navTo('../../pagesU/user/collect')"></list-cell> <list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
@eventClick="navTo('../../pagesU/user/collect')"></list-cell>
<!-- <list-cell <!-- <list-cell
icon="icon-share cgtt" icon="icon-share cgtt"
iconColor="#0e68d7" iconColor="#0e68d7"
@ -137,7 +148,8 @@
@eventClick="navTo('../../pagesU/user/invite')" @eventClick="navTo('../../pagesU/user/invite')"
></list-cell> --> ></list-cell> -->
<!-- <list-cell icon="icon-pinglun-copy" iconColor="#0e68d7" v-if="!userDetailInfo.invitecode" title="推荐邀请码" @eventClick="inputShowModal('invitecode')"></list-cell> --> <!-- <list-cell icon="icon-pinglun-copy" iconColor="#0e68d7" v-if="!userDetailInfo.invitecode" title="推荐邀请码" @eventClick="inputShowModal('invitecode')"></list-cell> -->
<list-cell icon="icon-shezhi1" iconColor="#e07472" title="系统设置" border="" @eventClick="navTo('/pages/set/set')"></list-cell> <list-cell icon="icon-shezhi1" iconColor="#e07472" title="系统设置" border=""
@eventClick="navTo('/pages/set/set')"></list-cell>
<!-- <list-cell icon="icon-shezhi1" iconColor="#e07472" title="test" border="" @eventClick="navTo('/pages/search/test')"></list-cell> --> <!-- <list-cell icon="icon-shezhi1" iconColor="#e07472" title="test" border="" @eventClick="navTo('/pages/search/test')"></list-cell> -->
</view> </view>
</view> </view>
@ -147,15 +159,18 @@
</view> </view>
</template> </template>
<script> <script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue'; import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api'; import Api from '@/common/api';
import listCell from '@/components/mix-list-cell'; import listCell from '@/components/mix-list-cell';
import neilModal from '@/components/neil-modal.vue'; import neilModal from '@/components/neil-modal.vue';
import { mapState, mapMutations } from 'vuex'; import {
let startY = 0, mapState,
mapMutations
} from 'vuex';
let startY = 0,
moveY = 0, moveY = 0,
pageAtTop = true; pageAtTop = true;
export default { export default {
components: { components: {
mallplusCopyright, mallplusCopyright,
listCell, listCell,
@ -180,9 +195,15 @@ export default {
}, },
async onLoad() { async onLoad() {
this.userDetailInfo = {}
this.couponList = []
this.viewList = []
this.getData(); this.getData();
}, },
async onShow() { async onShow() {
this.userDetailInfo = {}
this.couponList = []
this.viewList = []
this.getData(); this.getData();
}, },
@ -232,7 +253,9 @@ export default {
that.$api.msg('输入不能为空'); that.$api.msg('输入不能为空');
return; return;
} }
let obj = { id: this.userDetailInfo.id }; let obj = {
id: this.userDetailInfo.id
};
obj[that.feild] = that.inputContent; obj[that.feild] = that.inputContent;
Api.apiCall('post', Api.member.updateMember, obj); Api.apiCall('post', Api.member.updateMember, obj);
that.$api.msg('修改成功'); that.$api.msg('修改成功');
@ -249,10 +272,15 @@ export default {
if (!data1) { if (!data1) {
this.userDetailInfo = {}; this.userDetailInfo = {};
} }
this.userDetailInfo = data1.member; console.log("data", data1);
if (!data1.member) { if (!data1.member) {
this.logout(); this.logout();
this.couponList = []
this.viewList = []
this.getHistory();
} else { } else {
this.userDetailInfo = data1.member;
uni.setStorageSync('userInfos', data1.member); uni.setStorageSync('userInfos', data1.member);
console.log(this.userDetailInfo); console.log(this.userDetailInfo);
let couponList = data1.histories; let couponList = data1.histories;
@ -269,8 +297,21 @@ export default {
}, },
toNav(url) { toNav(url) {
uni.navigateTo({ // if (!this.hasLogin) {
url: url // url = '/pages/public/login';
// }
// uni.navigateTo({
// url: url
// });
uni.showModal({
title: '提示',
content: '已经是最新版本',
showCancel:false,
success: function(res) {
if (res.confirm) {
}
}
}); });
}, },
toUserInfo() { toUserInfo() {
@ -515,52 +556,56 @@ export default {
// #endif // #endif
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@font-face { @font-face {
font-family: cgtt; font-family: cgtt;
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
src: url('//at.alicdn.com/t/font_1475801_5innv59qqcr.ttf') format('truetype'); src: url('//at.alicdn.com/t/font_1475801_5innv59qqcr.ttf') format('truetype');
} }
page {
page {
background: #f3f3f3; background: #f3f3f3;
} }
.cgtt {
.cgtt {
font-family: 'cgtt' !important; font-family: 'cgtt' !important;
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-userShare:before { .icon-userShare:before {
content: '\c600'; content: '\c600';
} }
.icon-userJoin:before { .icon-userJoin:before {
content: '\c601'; content: '\c601';
} }
%flex-center { %flex-center {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
%section {
%section {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-content: center; align-content: center;
background: #fff; background: #fff;
border-radius: 10upx; border-radius: 10upx;
} }
.user-section { .user-section {
height: 520upx; height: 520upx;
padding: 100upx 30upx 0; padding: 100upx 30upx 0;
position: relative; position: relative;
.bg { .bg {
position: absolute; position: absolute;
left: 0; left: 0;
@ -570,26 +615,30 @@ page {
filter: blur(1px); filter: blur(1px);
// opacity: 0.7; // opacity: 0.7;
} }
} }
.user-info-box {
.user-info-box {
height: 180upx; height: 180upx;
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
z-index: 1; z-index: 1;
.portrait { .portrait {
width: 130upx; width: 130upx;
height: 130upx; height: 130upx;
border: 5upx solid #fff; border: 5upx solid #fff;
border-radius: 50%; border-radius: 50%;
} }
.username { .username {
font-size: $font-lg + 6upx; font-size: $font-lg + 6upx;
color: $font-color-dark; color: $font-color-dark;
margin-left: 20upx; margin-left: 20upx;
} }
} }
.login-btn {
.login-btn {
color: #fff; color: #fff;
width: 180upx; width: 180upx;
height: 50upx; height: 50upx;
@ -597,8 +646,9 @@ page {
border-radius: 25upx; border-radius: 25upx;
background: #ff7159; background: #ff7159;
font-size: 12px; font-size: 12px;
} }
.vip-card-box {
.vip-card-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
color: #f7d680; color: #f7d680;
@ -608,6 +658,7 @@ page {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
padding: 20upx 24upx; padding: 20upx 24upx;
.card-bg { .card-bg {
position: absolute; position: absolute;
top: 20upx; top: 20upx;
@ -615,6 +666,7 @@ page {
width: 380upx; width: 380upx;
height: 260upx; height: 260upx;
} }
.b-btn { .b-btn {
position: absolute; position: absolute;
right: 20upx; right: 20upx;
@ -629,22 +681,26 @@ page {
background: linear-gradient(left, #f9e6af, #ffd465); background: linear-gradient(left, #f9e6af, #ffd465);
z-index: 1; z-index: 1;
} }
.tit { .tit {
font-size: $font-base + 2upx; font-size: $font-base + 2upx;
color: #f7d680; color: #f7d680;
margin-bottom: 28upx; margin-bottom: 28upx;
.yticon { .yticon {
color: #f6e5a3; color: #f6e5a3;
margin-right: 16upx; margin-right: 16upx;
} }
} }
.e-b { .e-b {
font-size: $font-sm; font-size: $font-sm;
color: #d8cba9; color: #d8cba9;
margin-top: 10upx; margin-top: 10upx;
} }
} }
.vip-card-box1 {
.vip-card-box1 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
color: #f7d680; color: #f7d680;
@ -670,28 +726,33 @@ page {
background: linear-gradient(left, #f9e6af, #ffd465); background: linear-gradient(left, #f9e6af, #ffd465);
z-index: 1; z-index: 1;
} }
.tit { .tit {
font-size: $font-base + 2upx; font-size: $font-base + 2upx;
color: #f7d680; color: #f7d680;
margin-bottom: 28upx; margin-bottom: 28upx;
.yticon { .yticon {
color: #f6e5a3; color: #f6e5a3;
margin-right: 16upx; margin-right: 16upx;
} }
} }
.e-b { .e-b {
font-size: $font-sm; font-size: $font-sm;
color: #d8cba9; color: #d8cba9;
margin-top: 10upx; margin-top: 10upx;
} }
} }
.cover-container {
.cover-container {
background: $page-color-base; background: $page-color-base;
margin-top: -150upx; margin-top: -150upx;
padding: 0 20upx; padding: 0 20upx;
position: relative; position: relative;
background: #f5f5f5; background: #f5f5f5;
padding-bottom: 20upx; padding-bottom: 20upx;
.arc { .arc {
position: absolute; position: absolute;
left: 0; left: 0;
@ -699,9 +760,11 @@ page {
width: 100%; width: 100%;
height: 36upx; height: 36upx;
} }
} }
.tj-sction {
.tj-sction {
@extend %section; @extend %section;
.tj-item { .tj-item {
@extend %flex-center; @extend %flex-center;
flex-direction: column; flex-direction: column;
@ -709,16 +772,19 @@ page {
font-size: $font-sm; font-size: $font-sm;
color: #75787d; color: #75787d;
} }
.num { .num {
font-size: $font-lg; font-size: $font-lg;
color: $font-color-dark; color: $font-color-dark;
margin-bottom: 8upx; margin-bottom: 8upx;
} }
} }
.order-section {
.order-section {
@extend %section; @extend %section;
padding: 28upx 0; padding: 28upx 0;
margin-top: 20upx; margin-top: 20upx;
.order-item { .order-item {
@extend %flex-center; @extend %flex-center;
width: 120upx; width: 120upx;
@ -727,20 +793,24 @@ page {
font-size: $font-sm; font-size: $font-sm;
color: $font-color-dark; color: $font-color-dark;
} }
.yticon { .yticon {
font-size: 48upx; font-size: 48upx;
margin-bottom: 18upx; margin-bottom: 18upx;
color: #fa436a; color: #fa436a;
} }
.icon-shouhoutuikuan { .icon-shouhoutuikuan {
font-size: 44upx; font-size: 44upx;
} }
} }
.history-section {
.history-section {
padding: 30upx 0 0; padding: 30upx 0 0;
margin-top: 20upx; margin-top: 20upx;
background: #fff; background: #fff;
border-radius: 10upx; border-radius: 10upx;
.sec-header { .sec-header {
display: flex; display: flex;
align-items: center; align-items: center;
@ -748,6 +818,7 @@ page {
color: $font-color-dark; color: $font-color-dark;
line-height: 40upx; line-height: 40upx;
margin-left: 30upx; margin-left: 30upx;
.yticon { .yticon {
font-size: 44upx; font-size: 44upx;
color: #5eba8f; color: #5eba8f;
@ -755,9 +826,11 @@ page {
line-height: 40upx; line-height: 40upx;
} }
} }
.h-list { .h-list {
white-space: nowrap; white-space: nowrap;
padding: 30upx 30upx 0; padding: 30upx 30upx 0;
image { image {
display: inline-block; display: inline-block;
width: 160upx; width: 160upx;
@ -766,5 +839,5 @@ page {
border-radius: 10upx; border-radius: 10upx;
} }
} }
} }
</style> </style>

4
mallplusui-uniapp-app/pagesA/product/list.vue

@ -20,8 +20,8 @@
<view class="image-wrapper"><image :src="item.pic" mode="aspectFill"></image></view> <view class="image-wrapper"><image :src="item.pic" mode="aspectFill"></image></view>
<text class="title clamp">{{ item.name }}</text> <text class="title clamp">{{ item.name }}</text>
<view class="price-box" > <view class="price-box" >
<text class="price">{{ item.price }}</text> <text class="price">{{ item.originalPrice }}</text>
<text class="price2">市场价 ¥{{ item.originalPrice }}</text> <text class="price2">市场价 ¥{{ item.price }}</text>
</view> </view>
<!-- <view class="price-box" v-if="item.isVip == 1"> <!-- <view class="price-box" v-if="item.isVip == 1">
<text class="price">会员价{{ item.vipPrice }}</text> <text class="price">会员价{{ item.vipPrice }}</text>

2
mallplusui-uniapp-app/pagesU/user/coupon.vue

@ -158,7 +158,7 @@ import Api from '@/common/api';
filters: { filters: {
formatCreateTime(time) { formatCreateTime(time) {
let date = new Date(time); let date = new Date(time);
return formatDate(date, 'yyyy-MM-dd hh:mm:ss') return formatDate(date, 'yyyy-MM-dd')
}, },
}, },
methods: { methods: {

4
mallplusui-uniapp-app/store/index.js

@ -6,13 +6,16 @@ Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
hasLogin: false, hasLogin: false,
hasVip: false,
userInfo: '' userInfo: ''
}, },
mutations: { mutations: {
login(state, provider) { login(state, provider) {
console.log(provider); console.log(provider);
if (provider && provider != undefined) { if (provider && provider != undefined) {
console.log("provider",provider);
state.hasLogin = true; state.hasLogin = true;
state.hasVip = true;
uni.setStorage({ //缓存用户登陆状态 uni.setStorage({ //缓存用户登陆状态
key: 'userInfo', key: 'userInfo',
data: provider.userInfo data: provider.userInfo
@ -24,6 +27,7 @@ const store = new Vuex.Store({
}, },
logout(state) { logout(state) {
state.hasLogin = false; state.hasLogin = false;
state.hasVip = false;
state.userInfo = ''; state.userInfo = '';
uni.removeStorage({ uni.removeStorage({
key: 'userInfo' key: 'userInfo'

Loading…
Cancel
Save