Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
luyuan 2020-08-03 10:35:41 +08:00
commit 8727ae913d
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
40 changed files with 1875 additions and 878 deletions

25
App.vue
View File

@ -1,6 +1,27 @@
<script> <script>
export default {} import { mapMutations } from 'vuex';
export default {
onLaunch() {
// token
uni.getStorage({
key: "token",
success: (res) => {
this.loginIn(res.data);
}
})
},
methods: {
...mapMutations(['loginIn'])
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
@import "/static/css/normalize"; /* #ifndef APP-PLUS-NVUE */
@import "/static/css/normalize";
/* #endif */
/* 顶部自定义导航留白 */
.status_bar {
width: 100%;
height: var(--status-bar-height);
}
</style> </style>

View File

@ -230,16 +230,15 @@ export default {
}); });
}, },
// 订单列表 // 订单列表
getOrderList({ page, type, refund_state }) { getOrderList({ page, type }) {
let params = { page: page }; let params = { page: page };
if(type >= 0 || typeof type == 'string') Object.assign(params, {state_type: type}); if(type > 0) Object.assign(params, {type: type});
if(refund_state) Object.assign(params, {refund_state: refund_state});
return vm.$u.post('Order/orderList', params); return vm.$u.post('Order/orderList', params);
}, },
// 售后列表 // 售后列表
getAfterSaleList({ page }) { // getAfterSaleList({ page }) {
return vm.$u.post('order/afterSaleList', { page: page }); // return vm.$u.post('order/afterSaleList', { page: page });
}, // },
// 试穿列表 // 试穿列表
goodsTryOrderList() { goodsTryOrderList() {
return vm.$u.post('order/goodsTryOrderList'); return vm.$u.post('order/goodsTryOrderList');

View File

@ -3,7 +3,7 @@
<view class="user"> <view class="user">
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar> <u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
<text class="name">{{ content.geval_frommembername }}</text> <text class="name">{{ content.geval_frommembername }}</text>
<u-rate v-if="reply" :disabled='true' count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate> <u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
</view> </view>
<view class="content"> <view class="content">
<view class="text">{{ content.geval_content }}</view> <view class="text">{{ content.geval_content }}</view>
@ -30,7 +30,7 @@ export default {
data() { data() {
return { return {
count: 5, count: 5,
rate: 2, rate: 0,
} }
}, },
props: { props: {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="notice"> <view class="notice">
<view v-for="(item,index) in notice"> <view v-for="(item,index) in notice" :key="index">
<view class="time_notice">2020-05-14 20:11</view> <view class="time_notice">2020-05-14 20:11</view>
<view class="notice_view"> <view class="notice_view">
<image :src="item.url" mode="aspectFill" ></image> <image :src="item.url" mode="aspectFill" ></image>

View File

@ -7,12 +7,12 @@
<view> <view>
<input type="text" placeholder="手机号" maxlength="11" v-model="phone" /> <input type="text" placeholder="手机号" maxlength="11" v-model="phone" />
</view> </view>
<view class="area" @click="show=true"> <view class="area">
<input type="text" placeholder="省市区" v-model="address" disabled /> <input type="text" placeholder="省市区" v-model="address" disabled @click="show=true" />
<view> <!-- <view @click="chooseArea">
<image src="/static/image/mine/24.png"></image> <image src="/static/image/mine/24.png"></image>
<text>定位</text> <text>定位</text>
</view> </view> -->
</view> </view>
<view> <view>
<input type="text" placeholder="详细地址" v-model="area" /> <input type="text" placeholder="详细地址" v-model="area" />
@ -80,6 +80,16 @@ export default {
confirmBtn() { confirmBtn() {
this.info ? this.editAddress() : this.addAddress(); this.info ? this.editAddress() : this.addAddress();
}, },
chooseArea() {
uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
},
// //
validateValue() { validateValue() {
if(this.$u.test.isEmpty(this.name)) { if(this.$u.test.isEmpty(this.name)) {

View File

@ -15,7 +15,7 @@
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec"> <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text> <text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view> </view>
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> <!-- <view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> -->
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view> <view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40"> <view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image> <image src="@/pageE/static/mine/26.png"></image>
@ -24,14 +24,15 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0"> <view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
<view class="logistics" v-if="order.order_state == 30">确认收货</view> <view class="cancel" v-if="order.view_type == 3 || order.view_type == 2" @click="applyRefund">申请退款</view>
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view> <view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view> <view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
<view class="payment" v-if="order.order_state == 10" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view> <view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
<view class="service" v-if="order.order_state == 20">联系官方客服</view> <view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view>
<view class="submit" v-if="order.order_state == 20">提交官方审核</view> <view class="service" v-if="order.view_type == 8">联系官方客服</view>
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
</view> </view>
</view> </view>
</template> </template>
@ -40,7 +41,7 @@ import common from '@/static/js/common.js';
export default { export default {
data() { data() {
return { return {
state: '', // 1: 2: 3: 4: 5: 退 6: , 7: state: '',
} }
}, },
props: { props: {
@ -49,44 +50,25 @@ export default {
created() { created() {
this.viewState(); this.viewState();
}, },
filters: {
// timeLine(timestamp) {
// const timestamp = 0.5*60*60*1000;
// const now = new Date().getTime();
// let line = now - timestamp * 1000;
// return common.getLineTime({ timestamp: line });
// }
},
methods: { methods: {
viewState() { viewState() {
let state; let state;
switch (this.order.order_state) { switch (this.order.view_type) {
case 0: // case 1:
state = '已取消';
break;
case 10: //
state = '待支付'; state = '待支付';
break; break;
case 20: // case 2:
state = '交易成功'; state = '待发货';
break; break;
case 30: // case 3:
state = '待收货'; state = '待收货';
break; break;
case 40: // case 4:
if(this.order.evaluation_state == 0) state = '待评价'; state = '待评价';
else state = '交易成功'
break; break;
default: default:
break; break;
} }
if(this.order.refund_state) state = '已退款';
// 退
if(this.order.refund_data) {
if([1, 2].indexOf(this.order.refund_data.refund_state) >= 0) state = '待退款';
if(this.order.refund_data.refund_state == 3) state = '已退款';
}
this.state = state; this.state = state;
}, },
cancelOrder() { cancelOrder() {
@ -94,7 +76,20 @@ export default {
order_id: this.order.order_id, order_id: this.order.order_id,
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.$emit("refreshOrderList", { reload: 'again' }); this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
},
applyRefund() {
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
} }
this.$u.toast(res.message); this.$u.toast(res.message);
}) })
@ -165,6 +160,7 @@ export default {
line-height: 38rpx; line-height: 38rpx;
} }
.goods-sku { .goods-sku {
display: inline-block;
max-width: 230rpx; max-width: 230rpx;
background: rgba(236,236,236,1); background: rgba(236,236,236,1);
border-radius: 6rpx; border-radius: 6rpx;
@ -212,7 +208,7 @@ export default {
.logistics, .comment, .payment { .logistics, .comment, .payment {
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1)); @include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
} }
.calcel { .cancel {
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1)); @include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
} }
.service { .service {

View File

@ -18,7 +18,7 @@
<view class="page-section swiper"> <view class="page-section swiper">
<view class="page-section-spacing"> <view class="page-section-spacing">
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000"> <swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
<swiper-item v-for="item in list" > <swiper-item v-for="(item,index) in list" :key="index">
<view class="swiper-item uni-bg-red"> <view class="swiper-item uni-bg-red">
<image :src=" 'https://' + item.launch_path"></image> <image :src=" 'https://' + item.launch_path"></image>
</view> </view>
@ -48,7 +48,7 @@
export default { export default {
data() { data() {
return { return {
remaining: 4, remaining: 11,
type: true, type: true,
banner: false, banner: false,
protocol: false, protocol: false,
@ -142,12 +142,19 @@
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
that.heightOut = res.windowHeight; that.heightOut = res.windowHeight;
console.log('666666666666666' + that.heightOut) console.log(that.heightOut)
} }
}); });
}, },
// //
to_agree() { to_agree() {
uni.setStorage({
key: 'launchFlag',
data: true,
success: function() {
console.log('error时存储launchFlag');
}
});
uni.navigateTo({ uni.navigateTo({
url: '/pageA/login/login' url: '/pageA/login/login'
}); });
@ -174,8 +181,7 @@
}) })
}, },
videoErrorCallback: function(e) { videoErrorCallback: function(e) {
console.log('视频错误信息:') console.log('视频错误信息:',e);
console.log(e.target.errMsg)
}, },
getRandomColor: function() { getRandomColor: function() {
const rgb = [] const rgb = []
@ -222,19 +228,18 @@
// height: 400rpx; // height: 400rpx;
} }
.welcome_jumpes { .welcome_jumpes {
width: 94rpx; z-index: 10;
height: 36rpx;
opacity: 0.5;
border-radius: 18rpx;
position: absolute; position: absolute;
right: 37rpx; top: 80rpx;
top: 66rpx; right: 60rpx;
width: 100rpx;
height: 40rpx;
border-radius: 20rpx;
font-size: 22rpx; font-size: 22rpx;
text-align: center; text-align: center;
line-height: 35rpx; line-height: 40rpx;
color: #fff; color: #fff;
background: #C4CAC6; background-color: rgba(0,0,0,0.5);
z-index: 10;
} }
#myVideo { #myVideo {
@ -257,8 +262,8 @@
.welcome_images { .welcome_images {
width: 100%; width: 100%;
height: 100vh;
position: fixed; position: fixed;
height: 100%
} }
uni-swiper, uni-swiper,
@ -266,7 +271,7 @@
uni-image { uni-image {
width: 100%; width: 100%;
// position: fixed; // position: fixed;
height: 100% height: 100vh;
} }
uni-image { uni-image {

View File

@ -23,7 +23,9 @@
"Push" : {}, "Push" : {},
"Maps" : {}, "Maps" : {},
"LivePusher" : {}, "LivePusher" : {},
"Payment" : {} "Payment" : {},
"VideoPlayer" : {},
"Speech" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -54,7 +56,8 @@
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ],
"abiFilters" : [ "armeabi-v7a", "x86" ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios" : {},
@ -64,6 +67,12 @@
"oauth" : { "oauth" : {
"qq" : { "qq" : {
"appid" : "101884160" "appid" : "101884160"
},
"apple" : {},
"weixin" : {
"appid" : "wx556db1531ec35dc7",
"appsecret" : "f441fc15dd21543871a818f40ce92016",
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
} }
}, },
"maps" : { "maps" : {
@ -72,7 +81,22 @@
"appkey_android" : "8045e8a4cd6d544690c786265b248f91" "appkey_android" : "8045e8a4cd6d544690c786265b248f91"
} }
}, },
"share" : {} "share" : {
"weixin" : {
"appid" : "wx556db1531ec35dc7",
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
}
},
"speech" : {
"ifly" : {}
},
"payment" : {
"alipay" : {},
"weixin" : {
"appid" : "wx556db1531ec35dc7",
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
}
}
} }
} }
}, },

View File

@ -43,11 +43,11 @@
<u-mask :show="show" @click="show = false"> <u-mask :show="show" @click="show = false">
<view class="warp"> <view class="warp">
<view class="rect" @tap.stop> <view class="rect" @tap.stop>
<view class="rect_view" @click="rect_qq()"> <view class="rect_view" @click="loginOther(1)">
<image src="../../static/pageA/qq.png" class="image"></image> <image src="../../static/pageA/qq.png" class="image"></image>
<view>QQ登录</view> <view>QQ登录</view>
</view> </view>
<view class="rect_view"> <view class="rect_view" @click="loginOther(2)">
<image src="../../static/pageA/weixin.png" class="image"></image> <image src="../../static/pageA/weixin.png" class="image"></image>
<view>微信登录</view> <view>微信登录</view>
</view> </view>
@ -61,7 +61,9 @@
</template> </template>
<script> <script>
import identifying from '@/components/logininput/identifying' import identifying from '@/components/logininput/identifying'
import { mapMutations } from 'vuex'; import {
mapMutations
} from 'vuex';
export default { export default {
data() { data() {
return { return {
@ -91,21 +93,35 @@
}, { }, {
"id": '3', "id": '3',
"text": "《使用协议》" "text": "《使用协议》"
}, }, ],
temp_url: "", //
] pagesArr: ["pages/mine/index"], //
}; };
}, },
onLoad() { onLoad() {
// //
this.apiwelcome(); this.apiwelcome();
}, },
onShow() {
let pages = getCurrentPages();
let prePage = pages[pages.length - 2];
this.temp_url = prePage.route;
// console.log(this.temp_url);
},
//
onBackPress(e) {
console.log(1, e);
if (this.pagesArr.includes(this.temp_url) && !this.hasLogin) {
uni.switchTab({
url: '../../pages/index/index'
})
return true;
}
},
methods: { methods: {
...mapMutations(['loginIn']), ...mapMutations(['loginIn']),
apiwelcome() { apiwelcome() {
this.$u.api.sendSmsCode({ this.$u.api.sendSmsCode({}).then((res) => {
}).then((res) => {
console.log(res) console.log(res)
}) })
}, },
@ -164,33 +180,33 @@
return false return false
} else { } else {
me.loginIn(res.data.token); // me.loginIn(res.data.token); //
if (res.data.member.has_labels) {
uni.switchTab({
url: '/pages/index/index'
})
} else {
uni.navigateTo({ uni.navigateTo({
url: '/pageA/topick/topick' url: '/pageA/topick/topick'
}) })
}
// //
// uni.setStorageSync({ uni.setStorageSync({
// key: 'user_info', key: 'user_info',
// data: res.data, data: res.data,
// success: function() { success: function() {
// console.log('success'); console.log('success');
// // }
// uni.navigateTo({ });
// url : '/pageA/topick/topick'
// })
// }
// });
} }
// token // token
me.loginIn(res.data.token); //
// // // //
// this.$refs.uToast.show({ // this.$refs.uToast.show({
// title: res.message, // title: res.message,
// type: 'success', // type: 'success',
// url: '/pageA/topick/topick' // url: '/pageA/topick/topick'
// }) // })
} } else {
if (res.errCode == 1) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
type: 'error' type: 'error'
@ -199,40 +215,75 @@
}) })
}, },
// qq // qq
rect_qq() { loginOther(type) {
console.log("授权QQ") var me = this;
var vm = this;
uni.getProvider({ uni.getProvider({
service: 'oauth', service: 'oauth',
success: function(res) { success: (res) => {
console.log('qq', res) //weixin if (type == 1) {
if (~res.provider.indexOf('qq')) {
uni.login({ uni.login({
provider: 'qq', provider: 'qq',
success: function(loginRes) { success: (qqres) => {
console.log(loginRes) console.log(qqres);
this.getApplogin(loginRes) uni.getUserInfo({
vm.$HTTP({ provider: 'qq',
method: 'GET', success: (data) => {
baseURL: 'https://graph.qq.com/user/get_user_info', console.log(data);
url: '', this.$u.api.qqLogin({
data: { member_qqopenid: data.userInfo.openId,
openid: loginRes.authResult.openid, member_nickname: data.userInfo.nickName,
access_token: loginRes.authResult.access_token, member_avatar: data.userInfo.avatarUrl,
appid: '101884160' }).then(res => {
console.log(res.errCode);
if (res.errCode == 0) {
this.loginIn(res.data.token);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
})
}
})
}
})
}, },
load: true fail: (e) => {
}).then((data) => { console.log(e);
console.log(data)
}, (err) => {
console.log(err)
});
} }
}); });
} else { } else {
console.log("错误") uni.login({
provider: 'weixin',
success: (wxres) => {
console.log(wxres);
uni.getUserInfo({
provider: 'weixin',
success: (data) => {
console.log(data);
this.$u.api.wechatLogin({
member_wxopenid: data.userInfo.openId,
member_nickname: data.userInfo.nickName,
member_avatar: data.userInfo.avatarUrl,
}).then(res => {
console.log(res);
if (res.errCode == 0) {
this.loginIn(res.data.token);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
})
} }
})
}
})
},
fail: (e) => {
console.log(e);
}
});
}
},
fail: (e) => {
console.log(e);
} }
}); });
}, },
@ -242,10 +293,6 @@
url: '/pageA/register/register' url: '/pageA/register/register'
}); });
}, },
//
getApplogin() {
console.log("11")
},
// checkbox // checkbox
checkboxChange(e) { checkboxChange(e) {
//console.log(e); //console.log(e);

View File

@ -62,10 +62,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.packlist{} .packlist{}
.packlist > view{ .packlist > view{
width:676px;
font-size:26rpx;
color: #333;
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
padding: 16upx 0;
font-size: 26upx;
color: #333;
}
.rict_type {
text-indent: 1rem;
line-height: 1.2;
} }
</style> </style>

View File

@ -10,7 +10,7 @@
</view> </view>
<!-- 标签 --> <!-- 标签 -->
<view class="tab_lable"> <view class="tab_lable">
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item.name}}</view> <view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index,item.id)">{{item.name}}</view>
</view> </view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="submites" @click="toHomePage">{{submites}}</view> <view class="submites" @click="toHomePage">{{submites}}</view>
@ -30,12 +30,12 @@
show: false, show: false,
tab_lables: [], tab_lables: [],
submites: '选好了进入首页', submites: '选好了进入首页',
rSelect:[] rSelect: [],
list: [],
}; };
}, },
onLoad(){ onLoad() {
// //
console.log("11111222")
this.$u.api.labelList({ this.$u.api.labelList({
}).then((res) => { }).then((res) => {
@ -44,8 +44,7 @@
}) })
}, },
mounted(){ mounted() {},
},
methods: { methods: {
// checkbox // checkbox
checkboxChange(e) { checkboxChange(e) {
@ -59,19 +58,36 @@
this.show = !this.show this.show = !this.show
}, },
// //
tapClick(index) { tapClick(index, id) {
console.log(index) // console.log(index);
if (this.rSelect.indexOf(index) == -1) { if (this.rSelect.indexOf(index) == -1) {
console.log(index) // if (this.rSelect.length > 9) {
this.rSelect.push(index); // this.$u.toast("只能选择10个标签");
return false;
}
this.rSelect.push(index); //
this.list.push(id); //
} else { } else {
this.rSelect.splice(this.rSelect.indexOf(index), 1); // this.rSelect.splice(this.rSelect.indexOf(index), 1); //
this.list.splice(this.rSelect.indexOf(id), 1); //
} }
// console.log(this.rSelect);
console.log(this.list);
}, },
toHomePage() { toHomePage() {
this.$u.post("StartUp/addLabel", {
label_ids: this.list
}).then(res => {
// console.log(res);
if (res.errCode == 0) {
// this.$u.toast(res.message);
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
}); });
} else {
this.$u.toast(res.message);
}
})
}, },
} }
@ -360,9 +376,10 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
// //
.cur { .cur {
background-color: #ff5d00!important; background-color: #ff5d00 !important;
color: #fff!important; color: #fff !important;
} }
</style> </style>

View File

@ -1,45 +1,76 @@
<template> <template>
<view class="welcome"> <view class="welcome">
<!-- 倒计时跳过 --> <!-- 倒计时跳过 -->
<remaining></remaining> <remaining v-if="guidePages"></remaining>
</view> </view>
</template> </template>
<script> <script>
import {
mapState
} from 'vuex';
import remaining from '@/components/remaining/remaining'; import remaining from '@/components/remaining/remaining';
export default { export default {
computed: {
...mapState(['hasLogin', 'token'])
},
data() { data() {
return { return {
guidePages: true
} }
}, },
onLoad() { onLoad() {
this.loadExecution();
}, },
methods: { methods: {
loadExecution() {
}, /**
mounted(){ * 获取本地存储中launchFlag的值
}, * 若存在说明不是首次启动直接进入首页
components:{} * 若不存在说明是首次启动进入引导页
*/
// launchFlag
const value = uni.getStorageSync('launchFlag') || "";
// console.log(value, this.hasLogin);
if (value) {
this.guidePages = false;
if (this.hasLogin) {
uni.switchTab({
url: '../../pages/index/index'
});
} else {
// launchFlag=true
uni.navigateTo({
url: '../../pageA/login/login'
});
}
} else {
// launchFlag!=true
this.guidePages = true;
}
}
}
} }
</script> </script>
<style> <style>
.welcome {} .welcome {}
.welcome_jumpes{
.welcome_jumpes {
width: 90rpx; width: 90rpx;
height: 35rpx; height: 35rpx;
opacity:0.5; opacity: 0.5;
border-radius:18rpx; border-radius: 18rpx;
position: absolute; position: absolute;
right: 37rpx; right: 37rpx;
top: 34rpx; top: 34rpx;
font-size:20rpx; font-size: 20rpx;
text-align: center; text-align: center;
line-height: 35rpx; line-height: 35rpx;
color: #fff; color: #fff;
background: #C4CAC6; background: #C4CAC6;
} }
.welcome_images { .welcome_images {
width: 100%; width: 100%;
position: fixed; position: fixed;

View File

@ -35,6 +35,9 @@ export default {
// this.getAllEvalue(); // this.getAllEvalue();
this.getEvaluateSpec(); this.getEvaluateSpec();
}, },
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
},
watch: { watch: {
current(value) { current(value) {
this.page = 0; this.page = 0;

View File

@ -2,10 +2,17 @@
<u-popup v-model="show" mode="bottom" length="782" border-radius="20"> <u-popup v-model="show" mode="bottom" length="782" border-radius="20">
<view class="top"> <view class="top">
<text>全部商品</text> <text>全部商品</text>
<image></image> <u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
</view>
<scroll-view :scroll-y="true" class="scroll-box">
<view v-for="(item,index) in cartList" :key="index" class="item">
<image :src="item.goods_image" mode="aspectFill"></image>
<view>
<text class="title">{{ item.goods_advword }}</text>
<text class="name">{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}</text>
<text class="price">{{ item.goods_promotion_price }}</text>
</view>
</view> </view>
<scroll-view :scroll-y="true" style="padding:0 30rpx;height:692rpx">
<sitem v-for="i in 10"></sitem>
</scroll-view> </scroll-view>
</u-popup> </u-popup>
</template> </template>
@ -13,20 +20,24 @@
import sitem from "./item" import sitem from "./item"
export default { export default {
name:'shoplist', name:'shoplist',
props: ['list'],
components:{ components:{
sitem sitem
}, },
data(){ data(){
return { return {
show: true show: true,
cartList: [],
}
},
methods: {
toggerList() {
this.show = false;
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
image{
background-color: #0f0;
}
.top{ .top{
height: 88rpx; height: 88rpx;
width: 100%; width: 100%;
@ -39,9 +50,41 @@ image{
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
>image{ }
width: 33rpx; .scroll-box {
height: 33rpx; .item {
display: flex;
padding: 20rpx;
border-bottom: 1px solid #ECECEC;
& > image {
flex-shrink: 0;
width: 160rpx;
height: 160rpx;
margin-right: 14rpx;
border-radius: 10rpx;
}
& > view {
display: flex;
flex-direction: column;
justify-content: space-between;
color: #333;
font-size: 28rpx;
.title {
}
.name {
width: 500rpx;
height: 80rpx;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.price {
color: #FF3131;
}
}
} }
} }
</style> </style>

View File

@ -1,51 +1,89 @@
<template> <template>
<view class="shopone">
<image></image>
<view> <view>
<text>sadas</text> <u-popup v-model="is_comment" mode="bottom" border-radius="10" height="700rpx">
<text>dasadas</text> <view class="top">
<text>dsadas</text> <text>评论</text>
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon>
</view> </view>
<scroll-view class="scroll-box" scroll-y="true" >
<view></view>
</scroll-view>
<view class="editing">
<input type="text" value="" />
<text>发送</text>
</view>
</u-popup>
</view> </view>
</template> </template>
<style lang="scss" scoped>
image{
background-color: #0f0;
}
.shopone{
width: 442rpx;
height: 200rpx;
background:rgba(0,0,0,0.4);
padding: 20rpx;
display: flex;
border-radius: 10rpx;
>image{
width: 160rpx;
height: 160rpx;
}
>view{
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
>text{
font-size: 24rpx;
color: #fff;
line-height: 36rpx;
}
>text:first-child{
font-size: 28rpx;
}
>text:last-child{
font-size: 28rpx;
color: #FF3131;
}
}
}
</style>
<script> <script>
export default { export default {
name:"shopone" name: "shopone",
props: ['comment'],
data() {
return {
is_comment: true
}
},
onReady() {
this.getComment(); //
},
watch: {
comment(newValue,old) {
console.log(newValue,old);
},
deep: true
},
methods: {
getComment() {
this.$u.post("Specialci/getAllEvalue", {
goods_id: goods_id,
page: 1
}).then(res => {
console.log(res);
})
},
close() {
this.is_comment = false;
}
}
} }
</script> </script>
<style lang="scss" scoped>
.top {
position: fixed;
top: 0;
width: 100%;
height: 88rpx;
padding: 0 20rpx;
line-height: 88rpx;
background-color: #ECECEC;
& > text {
margin-right: 280rpx;
color: #333;
font-size: 30rpx;
font-weight: 500;
}
}
.scroll-box {
margin: 88rpx 0 100rpx 0;
height: 100%;
}
.editing {
position: fixed;
bottom: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 90rpx;
padding: 0 30rpx;
background-color: #ECECEC;
& > input {
width: 80%;
height: 60rpx;
padding: 0 20rpx;
border-radius: 30rpx;
background-color: #fff;
}
}
</style>

View File

@ -1,30 +1,32 @@
<template> <template>
<view class="userinfo"> <view class="userinfo">
<view class="userhead"> <view class="userhead">
<image :src="list.member_avatar"></image> <image :src="item.member_avatar"></image>
<text>+</text> <text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text>
<u-icon v-else name="checkmark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
</view> </view>
<view class="zan"> <!-- 点赞 -->
<image></image> <view class="operat zan">
<text>{{list.like_num}}</text> <u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon>
<text>{{item.like_num}}</text>
</view> </view>
<view class="shoucang"> <!-- 收藏 -->
<image></image> <view class="operat shoucang">
<text>{{list.collect_num}}</text> <u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon>
<text>{{item.collect_num}}</text>
</view> </view>
<view class="pinglun"> <!-- 评论 -->
<image></image> <view class="operat pinglun">
<text>{{list.comment_num}}</text> <u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
<text>{{item.comment_num}}</text>
</view> </view>
<view class="gouwu"> <!-- 购物车 -->
<image></image> <view class="operat gouwu">
<u-icon name="shopping-cart-fill" :color=" is_cart ? '#FF7807' : '#ffffff' " :size="50" @click="carting()"></u-icon>
</view> </view>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
image{
background-color: #0f0;
}
.userinfo{ .userinfo{
width: 110rpx; width: 110rpx;
height: 570rpx; height: 570rpx;
@ -32,41 +34,39 @@ image{
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
>view{ .userhead{
display: flex; position: relative;
flex-direction: column;
align-items: center;
font-size: 28rpx;
color: #fff;
>text{
margin-top: 17rpx;
}
>image{
width: 50rpx;
height: 50rpx;
}
}
>view:first-child{
display: flex; display: flex;
position: relative; position: relative;
align-items: center; align-items: center;
>image{ &>image{
width: 110rpx; width: 110rpx;
height: 110rpx; height: 110rpx;
border-radius: 50%; border-radius: 50%;
border: 2rpx solid #fff; border: 2rpx solid #fff;
} }
>text{ .follow {
position: absolute;
top: 90rpx;
left: 35%;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
font-size: 36rpx;
background-color: #FF780F;
position: absolute;
top: 75rpx;
border-radius: 50%;
line-height: 36rpx;
text-align: center; text-align: center;
line-height: 36rpx;
font-size: 36rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F;
}
}
.operat {
display: flex;
align-items: center;
flex-direction: column;
& > text {
margin-top: 10rpx;
font-size: 28rpx;
color: #fff;
} }
} }
} }
@ -74,11 +74,82 @@ image{
<script> <script>
export default { export default {
name:'userinfo', name:'userinfo',
props:['list','cart','comment'],
data(){ data(){
return { return {
is_follow: this.list.is_attention || false,
is_like: this.list.is_like || false,
is_collect: this.list.is_collect || false,
is_content: false,
is_cart: false,
item: this.list || {}
} }
}, },
props:['list'] watch: {
list(newValue,old) {
// console.log(newValue,old);
this.item = newValue || {};
this.is_follow = this.list.is_attention || false;
this.is_like = this.list.is_like || false;
this.is_collect = this.list.is_collect || false;
},
cart(newValue,old) {
// console.log(newValue,old);
this.is_cart = newValue;
},
comment(newValue,old) {
console.log(newValue,old);
this.is_content = newValue;
},
deep: true
},
methods: {
//
following(id) {
this.is_follow = !this.is_follow;
this.$u.api.attentionMember({member_id: id}).then(res => {
if (res.errCode == 0) {
this.$u.toast(res.message);
}
})
},
//
likeType(id) {
// console.log(id);
this.is_like = !this.is_like;
this.$u.post("article/articleLike",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.list.like_num = res.data.num;
} else {
this.$u.toast(res.message);
}
})
},
//
collecting(id) {
this.is_collect = !this.is_collect;
this.$u.post("article/articleCollect",{article_id: id}).then(res => {
if (res.errCode == 0) {
// console.log(res);
this.list.collect_num = res.data.num;
} else {
this.$u.toast(res.message);
}
})
},
//
editing() {
this.is_content = !this.is_content;
// console.log(this.is_content);
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
},
//
carting() {
this.is_cart = !this.is_cart;
// console.log(this.is_cart);
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
},
}
} }
</script> </script>

View File

@ -20,10 +20,10 @@
<view class="box"> <view class="box">
<view class="list"> <view class="list">
<view > <view >
<videoItem v-for="item in 10"></videoItem> <videoItem v-for="item in 10" :key="index"></videoItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<videoItem v-for="item in 10"></videoItem> <videoItem v-for="item in 10" :key="index"></videoItem>
</view> </view>
</view> </view>
</view> </view>
@ -35,10 +35,10 @@
<view class="box"> <view class="box">
<view class="list"> <view class="list">
<view > <view >
<zhiboItem v-for="item in 10"></zhiboItem> <zhiboItem v-for="item in 10" :key="index"></zhiboItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<zhiboItem v-for="item in 10"></zhiboItem> <zhiboItem v-for="item in 10" :key="index"></zhiboItem>
</view> </view>
</view> </view>
</view> </view>

View File

@ -1,43 +1,85 @@
<template> <template>
<view class="photo"> <view class="photo">
<view class="status_bar"></view>
<view class="back"> <view class="back">
<u-icon name="close" color="#999999" :size="30"></u-icon> <u-icon name="close" color="#999999" :size="30" @click="goBack"></u-icon>
</view> </view>
<swiper class="swiper"> <swiper class="swiper" circular autoplay @change="changeSwiper">
<swiper-item> <swiper-item v-for="(simg,sindex) in list.photo" :key="sindex">
<image :src="list.article_pic"></image> <image :src="simg.url" mode="aspectFill" @tap="viewImage" :data-url="simg.url"></image>
</swiper-item> </swiper-item>
<!-- <swiper-item>
<image></image>
</swiper-item> -->
</swiper> </swiper>
<view class="bottom"> <view class="bottom">
<view class="item"> <view class="item">
<text>图片</text> <text>图片</text>
<view v-for="(item,index) in 4" :key="index" :style="{'background-color':index == 2 ? '#fff' : '#ede8e8'}"></view> <view v-for="(item,index) in list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view>
</view> </view>
<view class="username">自己黑的哈万岁哦划u将</view> <view class="username">{{ list.member_nickname }}</view>
<view class="title">hasjdhajskhj</view> <view class="title">{{ list.article_title }}</view>
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view> <view class="info">{{ list.article_content }}</view>
<view class="box">
<view class="label" v-for="(label,id) in list.label" :key="id">{{ label.name }}</view>
</view> </view>
<userinfo class="userinfo" :list="list"></userinfo> </view>
<shpoone class="shpoone"></shpoone> <!-- 用户操作 -->
<shoplist></shoplist> <userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openCart"></userinfo>
<!-- 评论 -->
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
<view class="top">
<text>评论</text>
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon>
</view>
<scroll-view class="scroll-box" scroll-y="true" >
<view></view>
</scroll-view>
<view class="editing">
<input type="text" value="" />
<text>发送</text>
</view>
</u-popup>
<!-- 购物车 -->
<u-popup v-if="cart_len > 1" class="cart" v-model="cart_type" mode="bottom" length="782" border-radius="20">
<view class="top">
<text>全部商品</text>
<u-icon name="close" color="#999999" :size="30" @click="cart_type = false"></u-icon>
</view>
<scroll-view :scroll-y="true" class="scroll-box">
<view v-for="(item,index) in list.goods" :key="index" class="item" @click="gotoInfo(item.goods_id)">
<image :src="item.goods_image" mode="aspectFill"></image>
<view>
<text class="title">{{ item.goods_advword }}</text>
<text class="name">{{ item.goods_name }}</text>
<text class="price">{{ item.goods_promotion_price }}</text>
</view>
</view>
</scroll-view>
</u-popup>
<!-- 单个 -->
<view class="good-one" v-else v-show="cart_type">
<view class="box" v-for="(item,index) in list.goods" :key="index" @click="gotoInfo(item.goods_id)">
<image :src="item.goods_image" mode=""></image>
<view>
<view class="title u-line-1">{{ item.goods_advword }}</view>
<view class="content u-line-2">{{ item.goods_name }}</view>
<view class="price">{{ item.goods_promotion_price }}</view>
</view>
</view>
</view>
<!-- <shoplist :list="list.goods" v-show="list.goods.length > 1 && cart_type" @hideCart="hideCart"></shoplist> -->
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.photo{ .photo{
height: 100vh;
background-color: #ececec;
width: 100%; width: 100%;
height: 100%;
background-color: #ececec;
.back{ .back{
padding-top: 28rpx; padding-top: 28rpx;
padding-right: 31rpx; padding-right: 31rpx;
text-align: right; text-align: right;
} }
.swiper{ .swiper{
width: 100%; width: 750rpx;
height: 702rpx; height: 702rpx;
margin-top: 102rpx; margin-top: 102rpx;
image{ image{
@ -47,22 +89,17 @@
} }
.bottom{ .bottom{
width: 100%; width: 100%;
height: 270rpx; margin-top: 150rpx;
background-color: #fff;
position: fixed;
bottom: 0;
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #fff;
.item{ .item{
display: flex;
align-items: center;
padding: 8rpx 16rpx; padding: 8rpx 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
background-color: #999;
display: flex;
align-items: center;
border-radius: 10rpx; border-radius: 10rpx;
background-color: #999;
>view{ >view{
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
@ -71,68 +108,250 @@
} }
} }
.username{ .username{
margin: 20rpx 0;
font-size: 36rpx; font-size: 36rpx;
color: #333; color: #333;
margin-top: 20rpx;
} }
.title{ .title{
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
margin-top: 23rpx;
} }
.info{ .info{
margin: 20rpx 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
font-size: 28rpx; font-size: 28rpx;
line-height: 42rpx; }
margin-top: 20rpx; .box {
display: flex;
flex-wrap: wrap;
.label {
padding: 6rpx 10rpx;
margin: 0 10rpx 10rpx 0;
font-size: 24rpx;
color: #fff;
border-radius: 6rpx;
background-color: #000000;
opacity: 0.5;
}
} }
} }
.userinfo{ .userinfo{
position: absolute; position: absolute;
right: 30rpx;
top: 50%; top: 50%;
transform: translateY(-285rpx); transform: translateY(-285rpx);
right: 30rpx;
} }
.shpoone{ .pl {
position: absolute; .top {
top: 50%; position: fixed;
top: 0;
width: 100%;
height: 88rpx;
padding: 0 20rpx;
line-height: 88rpx;
background-color: #ECECEC;
& > text {
margin-right: 280rpx;
color: #333;
font-size: 30rpx;
font-weight: 500;
}
}
.scroll-box {
margin: 88rpx 0 100rpx 0;
height: 100%;
}
.editing {
position: fixed;
bottom: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 90rpx;
padding: 0 30rpx;
background-color: #ECECEC;
& > input {
width: 80%;
height: 60rpx;
padding: 0 20rpx;
border-radius: 30rpx;
background-color: #fff;
}
}
}
.cart {
.top{
z-index: 1000;
position: fixed;
top: 0;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 88rpx;
padding: 0 30rpx;
border-bottom: 1rpx solid #ececec;
background-color: #fff;
>text{
font-size: 30rpx;
color: #333;
}
}
.scroll-box {
margin-top: 88rpx;
.item {
display: flex;
padding: 20rpx;
border-bottom: 1px solid #ECECEC;
& > image {
flex-shrink: 0;
width: 160rpx;
height: 160rpx;
margin-right: 14rpx;
border-radius: 10rpx;
}
& > view {
display: flex;
flex-direction: column;
justify-content: space-between;
color: #333;
font-size: 28rpx;
.title {
}
.name {
width: 500rpx;
height: 80rpx;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.price {
color: #FF3131;
}
}
}
}
}
.good-one{
z-index: 999; z-index: 999;
position: absolute;
right: 139rpx; right: 139rpx;
top: 54%;
transform: translateY(100rpx); transform: translateY(100rpx);
.box {
display: flex;
align-items: center;
width: 440rpx;
height: 200rpx;
padding: 20rpx;
font-size: 28rpx;
color: #fff;
border-radius: 10rpx;
background-color: rgba(0,0,0,0.5);
& > image {
flex-shrink: 0;
width: 160rpx;
height: 100%;
margin-right: 10rpx;
border-radius: 10rpx;
}
& > view {
width: 200rpx;
}
.title {}
.content {
height: 60rpx;
margin: 10rpx 0;
font-size: 24rpx;
}
.price {
color: #FF3131;
}
}
} }
} }
</style> </style>
<script> <script>
import userinfo from "../components/userinfo/index" import userinfo from "../components/userinfo/index" //
import shpoone from "../components/shpoone/index" import contentBox from "../components/shpoone/index" //
import shoplist from "../components/shoplist/index" // import shoplist from "../components/shoplist/index" //
export default { export default {
name:"photo", name:"photo",
onLoad(e) {
console.log('dhdhdhdhd',e)
},
components:{ components:{
userinfo, userinfo
shpoone,
shoplist
}, },
data(){ data(){
return { return {
list:{} list:{},
} swiper_id: "",
}, cart_type: false,
methods:{ is_comment: false,
articleInfo(article_id){ cartList: [],
this.$u.api.articleInfo({article_id}).then((res)=>{ cart_len: 0,
console.log(res)
this.list = res.data.info
})
} }
}, },
onLoad(o){ onLoad(o){
this.id = o.id this.id = o.id;
this.articleInfo(this.id) this.articleInfo(this.id);
},
methods:{
//
articleInfo(article_id){
this.$u.api.articleInfo({article_id}).then((res)=>{
this.list = res.data.info;
this.cart_len = res.data.info.goods.length;
})
},
// swiper
changeSwiper(e) {
// console.log(e.detail.current);
this.swiper_id = e.detail.current; // swiper id
},
//
openCart(data) {
console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
},
hideCart(data) {
// console.log(data);
this.cart_type = data.cart;
},
close() {
this.is_comment = false;
},
//
viewImage(e) {
let arr = [];
this.list.photo.forEach(item => {
arr.push(item.url);
})
uni.previewImage({
urls: arr,
current: e.currentTarget.dataset.url,
})
},
//
gotoInfo(id) {
console.log(id);
uni.navigateTo({
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
goBack() {
uni.navigateBack({
delta: 1
})
} }
},
} }
</script> </script>

View File

@ -19,7 +19,8 @@
</view> </view>
<view class="info"> <view class="info">
<view class="title u-line-2"> <view class="title u-line-2">
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }} <text class="store-name">{{ goodsInfo.store_name }}</text>
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
</view> </view>
<view class="pic"> <view class="pic">
<text>{{ goodsInfo.goods_price }}</text> <text>{{ goodsInfo.goods_price }}</text>
@ -40,7 +41,7 @@
</view> </view>
</view> </view>
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment> <comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
<view class="comment-none">暂无评价</view> <view class="comment-none" v-else>暂无评价</view>
</view> </view>
<view class="hr"></view> <view class="hr"></view>
<view class="group-user" v-if="groupUser.length"> <view class="group-user" v-if="groupUser.length">
@ -227,6 +228,9 @@ export default {
this.showGroupUser = false; this.showGroupUser = false;
this.showInvolvementUser = false; this.showInvolvementUser = false;
}, },
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageC/cart/index');
},
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
@ -379,7 +383,7 @@ export default {
}, },
/* /*
* @description 下单 订单步骤1展示结算数据 * @description 下单 订单步骤1展示结算数据
* @params {Number} type 拼团或者开团 * @params {Number} type involvement 拼团或者 默认开团
* @params {Number} num 数量 * @params {Number} num 数量
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀 * @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/ **/
@ -553,14 +557,19 @@ export default {
.title{ .title{
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 30rpx; margin-bottom: 30rpx;
>text{ .store-name {
padding: 13rpx;
font-size: 24rpx;
color:#fff;
margin-right: 13rpx;
background-color: #FF780F;
display: inline-block; display: inline-block;
border-radius: 25rpx; padding: 8rpx 10rpx;
margin: 0 10rpx 4rpx 0;
vertical-align: middle;
font-size: 20rpx;
color: #fff;
border-radius: 30rpx;
background-color: #FF780F;
margin-bottom: 10rpx;
}
.goods-name {
line-height: 1.5;
} }
} }
.pic{ .pic{

View File

@ -40,7 +40,10 @@ export default {
}, },
search(value){ search(value){
// console.log(value) // console.log(value)
if(!value) this.$u.toast('搜索内容不可为空'); if(!value) {
this.$u.toast('搜索内容不可为空');
return false;
}
this.$u.route({ this.$u.route({
url: "/pageB/search/out", url: "/pageB/search/out",
params: { params: {

View File

@ -97,7 +97,7 @@ export default {
return false; return false;
} }
if(!this.$u.test.mobile(this.phone)) { if(!this.$u.test.mobile(this.phone)) {
this.$u.toast('请填写正确的新手机号'); this.$u.toast('请正确填写手机号');
return false; return false;
} }
if(this.$u.test.isEmpty(this.address)) { if(this.$u.test.isEmpty(this.address)) {
@ -116,6 +116,10 @@ export default {
this.$u.toast('预约时间错误'); this.$u.toast('预约时间错误');
return false; return false;
} }
if(this.number > this.goodsInfo.goods_storage) {
this.$u.toast('库存不足');
return false;
}
return true; return true;
}, },
chooseDate(e) { chooseDate(e) {
@ -134,9 +138,17 @@ export default {
store_id: this.store.store_id, store_id: this.store.store_id,
appointment_time: new Date(this.time), appointment_time: new Date(this.time),
}).then(res => { }).then(res => {
this.$u.toast(res.message);
if (res.errCode == 0) { if (res.errCode == 0) {
// this.$u.route({ type: 'navigateBack' }); // this.$u.route({ type: 'navigateBack' });
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
} }
}) })
}, },

View File

@ -297,7 +297,7 @@ export default {
}, },
setTotalPrice() { setTotalPrice() {
const goods = this.orderInfo.store_goods_total; const goods = this.orderInfo.store_goods_total;
console.log(this.freight); // console.log(this.freight);
const freight = this.freight; const freight = this.freight;
let price = 0; let price = 0;
// //

View File

@ -73,6 +73,9 @@ export default {
deep: true deep: true
} }
}, },
onPullDownRefresh() {
this.getCartList();
},
onShow() { onShow() {
this.getCartList(); this.getCartList();
}, },
@ -111,6 +114,7 @@ export default {
getCartList() { getCartList() {
this.$u.api.getCartTreeList().then(res => { this.$u.api.getCartTreeList().then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
uni.stopPullDownRefresh();
let list = res.data.store_cart_list; let list = res.data.store_cart_list;
list.forEach((item, l_index) => { list.forEach((item, l_index) => {
// checked ,, false // checked ,, false

View File

@ -113,7 +113,7 @@ export default {
filePath: res.tempFilePaths[0] filePath: res.tempFilePaths[0]
}).then(result => { }).then(result => {
// console.log(result); // console.log(result);
this.$set(this, 'avatar', result.file_path); // this.$set(this, 'avatar', result.file_path);
// this.avatar = result.file_path; // this.avatar = result.file_path;
this.uploadPath = result.file_name; this.uploadPath = result.file_name;
}, error => { }, error => {
@ -142,7 +142,7 @@ export default {
userInfo.member_mobile, userInfo.member_mobile,
userInfo.member_birthday, userInfo.member_birthday,
userInfo.member_sex, userInfo.member_sex,
userInfo.member_avatar, userInfo.member_avatar + '?' + new Date().getTime(),
]; ];
} }
}) })

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="information"> <view class="information">
<view class="info-avatar"> <view class="info-avatar">
<u-avatar :src="userInfo.member_avatar" :size="120"></u-avatar> <u-avatar :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="120"></u-avatar>
</view> </view>
<view class="info-item"> <view class="info-item">
<view class="title">昵称</view> <view class="title">昵称</view>

View File

@ -1,78 +1,173 @@
<template> <template>
<view class="comment"> <view class="comment">
<view class="main-container"> <view class="main-container">
<textarea @blur="bindTextAreaBlur" auto-height placeholder="发表你的评价吧,收货时心情如何?" maxlength="200" /> <view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
<u-upload <CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView>
ref="uUpload"
@on-uploaded="onUploaded"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="../static/mine/27.png"></image>
</view> </view>
</u-upload>
</view> </view>
<view class="order-rate">
<view class="rate"> <view class="rate">
<view>
<view class="title">物流评分</view> <view class="title">物流评分</view>
<u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate> <u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate>
</view> </view>
<view> <view class="rate">
<view class="title">服务态度</view> <view class="title">服务态度</view>
<u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate> <u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</view> </view>
<view>
<view class="title">描述相符</view>
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</view> </view>
</view> <view class="write-btn" @click="submitComment">发表意见</view>
<view class="write-btn" @click="addOrderEvaluate">发表意见</view>
</view> </view>
</template> </template>
<script> <script>
import CommentView from './commentItem';
import common from '@/static/js/common.js'
export default { export default {
data() { data() {
return { return {
orderId: '', orderId: '',
count: 4, // count: 3, //
logistics: 5, logistics: 0, //
service: 5, service: 0, //
describe: 5, describe: [],
content: '', content: [],
imageList: [], //
goodsList: [],
uploadImageList: [], // 线
} }
}, },
components: {
CommentView
},
onLoad(option) { onLoad(option) {
this.orderId = option.oid; this.orderId = option.oid;
this.getOrderInfo(option.oid);
}, },
methods: { methods: {
setLocalImage({ list, index }) {
this.imageList[index] = list;
},
setContent({ content, index }) {
this.content[index] = content;
},
setDescribe({ describe, index }) {
this.describe[index] = describe;
},
uploadImage() {
let allPromise = [];
this.imageList.forEach((img, index) => {
this.uploadImageList[index] = [];
img.forEach(filePath => {
let promise = common.uploadFile({
url: this.$u.http.config.baseUrl + '/Upload/uploadfile',
name: 'common',
filePath: filePath,
})
promise.then(result => {
this.uploadImageList[index].push(result.file_name);
})
allPromise.push(promise);
})
})
Promise.all(allPromise).then(() => {
this.addOrderEvaluate();
})
},
//
setModelKey(data) {
data.forEach(() => {
this.content.push('');
this.describe.push(0);
this.imageList.push([]);
})
},
getOrderInfo(id) {
this.$u.api.getOrderInfo({
order_id: id,
}).then(res => {
if(res.errCode == 0) {
this.goodsList = res.data.extend_order_goods;
// this.goodsList = [{
// "rec_id": 14,
// "order_id": 13,
// "goods_id": 39,
// "goods_name": " 湿 湿",
// "goods_price": "69.40",
// "goods_num": 1,
// "goods_image": "1_2017092202443553519.jpg",
// "goods_pay_price": "43.40",
// "store_id": 1,
// "buyer_id": 3,
// "goods_type": "1",
// "promotions_id": 0,
// "commis_rate": 0,
// "gc_id": 30
// },
// {
// "rec_id": 13,
// "order_id": 13,
// "goods_id": 113,
// "goods_name": "",
// "goods_price": "168.00",
// "goods_num": 1,
// "goods_image": "1_2017092901414663050.jpg",
// "goods_pay_price": "106.00",
// "store_id": 1,
// "buyer_id": 3,
// "goods_type": "1",
// "promotions_id": 0,
// "commis_rate": 0,
// "gc_id": 72
// }];
this.setModelKey(this.goodsList);
}
})
},
verifyParams() { verifyParams() {
if(this.$u.test.isEmpty(this.content)) { this.goodsList.forEach((_, index) => {
if(this.$u.test.isEmpty(this.content[index])) {
this.$u.toast('内容不可为空'); this.$u.toast('内容不可为空');
return false; return false;
} }
})
return true; return true;
}, },
submitComment() {
// console.log(this.content);
// console.log(this.describe);
// console.log(this.imageList);
this.uploadImage();
// this.goodsList.forEach((_, index) => {
// })
},
addOrderEvaluate() { addOrderEvaluate() {
if(!this.verifyParams()) return false; if(!this.verifyParams()) return false;
// console.log(this.logistics); let files = [];
// console.log(this.service); // console.log(this.uploadImageList);
// console.log(this.describe); this.uploadImageList.forEach((item, index) => {
this.$u.api.updateOrderEvaluate({ files[index] = '';
// console.log(item);
item.forEach((img, idx) => {
if(idx < item.length-1) {
files[index] += img + ',';
} else {
files[index] += img;
}
})
})
let params = {
id: this.orderId, id: this.orderId,
content: this.content, content: this.content,
scores_one: this.logistics, scores_one: this.logistics,
scores_two: this.service, scores_two: this.service,
scores_three: this.describe, scores_three: this.describe,
file: '', // file: files,
}).then(res => { };
console.log(params);
this.$u.api.updateOrderEvaluate(params).then(res => {
this.$u.toast(res.message);
}) })
}, },
bindTextAreaBlur(event) {
this.content = event.detail.value;
}
}, },
}; };
</script> </script>
@ -81,9 +176,40 @@ export default {
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background-color: #ECECEC; background-color: #ECECEC;
.main-container { .main-container {
margin-bottom: 10rpx;
.goods-comment {
background-color: #ffffff; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
margin-bottom: 10rpx; margin-bottom: 30rpx;
.goods-info {
display: flex;
margin-bottom: 40rpx;
> image {
width: 113rpx;
height: 106rpx;
border-radius: 5rpx;
margin-right: 20rpx;
background-color: antiquewhite;
}
.goods-text {
.goods-name {
width: 530rpx;
font-size: 28rpx;
color: rgba(0,0,51,1);
margin-bottom: 20rpx;
}
.goods-spec {
max-width: 300rpx;
box-sizing: content-box;
padding: 10rpx 15rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
background:rgba(236,236,236,1);
border-radius: 6rpx;
display: inline-block;
}
}
}
textarea { textarea {
width: 100% !important; width: 100% !important;
margin-bottom: 60rpx; margin-bottom: 60rpx;
@ -101,10 +227,11 @@ export default {
} }
} }
} }
}
.rate { .rate {
background-color: #ffffff; // background-color: #ffffff;
padding: 33rpx 30rpx; // padding: 33rpx 30rpx;
> view { // > view {
display: flex; display: flex;
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 35rpx; margin-bottom: 35rpx;
@ -114,7 +241,11 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
} }
// }
} }
.order-rate {
background-color: #ffffff;
padding: 33rpx 30rpx;
} }
.write-btn { .write-btn {
margin: 120rpx auto 0; margin: 120rpx auto 0;

View File

@ -3,7 +3,7 @@
<view class="status" v-if="state"> <view class="status" v-if="state">
<view class="text"> <view class="text">
<view class="status-text">{{ s_object[state].text }}</view> <view class="status-text">{{ s_object[state].text }}</view>
<view class="time" v-if="state == '2'">距离结束22:22:22</view> <view class="time" v-if="orderInfo.view_type == 1">结束时间{{ orderInfo.end_time }}</view>
</view> </view>
<image :src="s_object[state].image"></image> <image :src="s_object[state].image"></image>
</view> </view>
@ -67,8 +67,10 @@
<view>创建时间{{ orderInfo.add_time | date}}</view> <view>创建时间{{ orderInfo.add_time | date}}</view>
</view> </view>
</view> </view>
<view class="btn" v-if="['1', '2', '6'].indexOf(state) >= 0"> <view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0">
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="state == '4' || state == '1'" @click="applyRefund">申请退款</view>
<view class="cancel" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view> <view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="state == '6'" @click="payNow">立即支付</view> <view class="payment" v-if="state == '6'" @click="payNow">立即支付</view>
@ -96,8 +98,8 @@ export default {
image: '../static/mine/31.png', image: '../static/mine/31.png',
}, },
'4': { '4': {
text: '已取消', text: '待发货',
image: '../static/mine/33.png', image: '../static/mine/36.png',
}, },
'5': { '5': {
text: '已退款', text: '已退款',
@ -112,45 +114,44 @@ export default {
image: '../static/mine/34.png', image: '../static/mine/34.png',
}, },
}, },
current: 0, orderInfo: {},
orderInfo: {} oid: '',
} }
}, },
onLoad(option) { onLoad(option) {
this.setTitle(); this.setTitle();
this.oid = option.oid;
this.getOrderInfo(option.oid); this.getOrderInfo(option.oid);
},
//
onPullDownRefresh() {
this.getOrderInfo(this.oid);
}, },
methods: { methods: {
viewState(value) { viewState(value) {
let state; let state;
switch (value) { switch (value) {
case 0: // case 1:
state = '4';
break;
case 10: //
state = '6'; state = '6';
break; break;
case 20: // case 2:
state = '3'; state = '4';
break; break;
case 30: // case 3:
state = '1'; state = '1';
break; break;
case 40: // case 4:
if(this.orderInfo.evaluation_state == 0) state = '2'; state = '2';
break;
case 6:
state = '7';
break;
case 7:
state = '5';
break; break;
default: default:
break; break;
} }
if(this.orderInfo.refund_state) state = '5';
// 退
if(this.orderInfo.refund_list) {
const refund = this.orderInfo.refund_list[this.orderInfo.extend_order_common.order_id];
if(this.orderInfo.refund_list) {
if([1, 2].indexOf(refund.refund_state) >= 0) state = '7';
if(refund.refund_state == 3) state = '8';
}
}
this.state = state; this.state = state;
}, },
getOrderInfo(id) { getOrderInfo(id) {
@ -159,9 +160,14 @@ export default {
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.viewState(this.orderInfo.order_state); this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type);
} }
uni.stopPullDownRefresh(); //
}) })
},
applyRefund() {
}, },
cancelOrder() { cancelOrder() {
this.$u.api.cancelOrder({ this.$u.api.cancelOrder({
@ -172,10 +178,20 @@ export default {
} }
}) })
}, },
setTitle(){ confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.getOrderInfo(this.oid);
}
this.$u.toast(res.message);
})
},
setTitle(value){
let title = ''; let title = '';
switch (this.current) { switch (value) {
case '1': case 1:
title = "支付成功" title = "支付成功"
break; break;
default: default:
@ -292,6 +308,7 @@ export default {
} }
.store-goods { .store-goods {
display: flex; display: flex;
margin-bottom: 20rpx;
> image { > image {
width: 180rpx; width: 180rpx;
height: 160rpx; height: 160rpx;
@ -300,6 +317,7 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
.goods-info { .goods-info {
flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;

View File

@ -30,15 +30,15 @@ export default {
}, { }, {
name: '待支付' name: '待支付'
}, { }, {
name: '已取消' name: '待发货'
}, { }, {
name: '待收货' name: '待收货'
}, { }, {
name: '试穿试送' name: '试穿试送'
}, {
name: '待评价'
}, { }, {
name: '售后' name: '售后'
}, {
name: '待评价'
}], }],
orderList: [], orderList: [],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'], loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
@ -59,13 +59,11 @@ export default {
this.orderList = []; this.orderList = [];
} }
this.page = 0; this.page = 0;
// again // reload loadmore
if(value == 6) { if(value == 4) {
this.getAfterSaleList({ reload: 'again' }); this.goodsTryOrderList({ load: 'reload' });
} else if(value == 4) {
this.goodsTryOrderList({ reload: 'again' });
} else { } else {
this.getOrderList({ reload: 'again' }); this.getOrderList({ load: 'reload' });
} }
}, },
}, },
@ -74,26 +72,32 @@ export default {
this.current = current; this.current = current;
this.swiperCurrent = this.current; this.swiperCurrent = this.current;
this.setViewHeight(); this.setViewHeight();
},
//
onPullDownRefresh() {
this.refreshOrderList();
}, },
methods: { methods: {
setOrderType() { setOrderType() {
let type; let type;
// state_type 0: 10: 20: 30: 40:
switch (this.current) { switch (this.current) {
case 1: case 1:
type = 10; // type = 1; //
break; break;
case 2: case 2:
type = 0; // type = 2; //
break; break;
case 3: case 3:
type = 30; // type = 3; //
break; break;
case 4: case 4:
type = -1; // 穿 type = -1; // 穿
break; break;
case 5: case 5:
type = 'state_noeval'; // type = 8; //
break;
case 6:
type = 4; //
break; break;
default: default:
type = -1; type = -1;
@ -103,46 +107,52 @@ export default {
}, },
refreshOrderList() { refreshOrderList() {
this.page = 0; this.page = 0;
if(this.current == 6) { // if(this.current == 6) {
this.getAfterSaleList({ reload: 'again' }); // this.getAfterSaleList({ load: 'reload' });
} else if(this.current == 4) { // } else
this.goodsTryOrderList({ reload: 'again' }); if(this.current == 4) {
this.goodsTryOrderList({ load: 'reload' });
} else { } else {
this.getOrderList({ reload: 'again' }); this.getOrderList({ load: 'reload' });
} }
}, },
async getOrderList({ reload = '' } = {}) { //
async getOrderList({ load = 'loadmore' } = {}) {
const type = this.setOrderType(); const type = this.setOrderType();
const res = await this.$u.api.getOrderList({ const res = await this.$u.api.getOrderList({
page: this.page, page: this.page,
type: type, type: type,
}) })
this.timer = true; this.timer = true;
uni.stopPullDownRefresh(); //
if(res.errCode == 0) { if(res.errCode == 0) {
if(reload) this.orderList = res.data; if(load == 'reload') this.orderList = res.data;
else this.orderList.push(...res.data); else if(load == 'loadmore') this.orderList.push(...res.data);
} }
return res; return res;
}, },
async getAfterSaleList({ reload = '' } = {}) { //
async getAfterSaleList({ load = 'loadmore' } = {}) {
const res = await this.$u.api.getAfterSaleList({ const res = await this.$u.api.getAfterSaleList({
page: this.page, page: this.page,
}) })
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(reload) this.orderList = res.data; if(load == 'reload') this.orderList = res.data;
else this.orderList.push(...res.data); else if(load == 'loadmore') this.orderList.push(...res.data);
} }
return res; return res;
}, },
async goodsTryOrderList({ reload = '' } = {}) { // 穿
async goodsTryOrderList({ load = 'loadmore' } = {}) {
const res = await this.$u.api.goodsTryOrderList({ const res = await this.$u.api.goodsTryOrderList({
page: this.page, page: this.page,
}) })
uni.stopPullDownRefresh(); //
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(reload) this.orderList = res.data.list; if(load == 'reload') this.orderList = res.data.list;
else this.orderList.push(...res.data.list); else if(load == 'loadmore') this.orderList.push(...res.data.list);
} }
return res; return res;
}, },
@ -154,8 +164,9 @@ export default {
this.loadStatus.splice(this.current, 1, "loading"); this.loadStatus.splice(this.current, 1, "loading");
this.page++; this.page++;
let promise; let promise;
if(this.current == 6) promise = this.getAfterSaleList(); // if(this.current == 6) promise = this.getAfterSaleList();
else if(this.current == 4) promise = this.goodsTryOrderList(); // else
if(this.current == 4) promise = this.goodsTryOrderList();
else promise = this.getOrderList(); else promise = this.getOrderList();
promise.then(res => { promise.then(res => {
this.loadStatus.splice(this.current, 1, "nomore"); this.loadStatus.splice(this.current, 1, "nomore");

View File

@ -42,7 +42,8 @@ export default {
}, },
methods: { methods: {
getOrderLogistics(id) { getOrderLogistics(id) {
this.$u.api.orderLogistics({ id: 16 }).then(res => { this.$u.api.orderLogistics({ id: id }).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) { if(res.errCode == 0) {
this.expressInfo = res.data.express_info; this.expressInfo = res.data.express_info;
this.list = res.data.express_list; this.list = res.data.express_list;

138
pageE/order/commentItem.vue Normal file
View File

@ -0,0 +1,138 @@
<template>
<view class="comment-item-view">
<view class="view-container">
<view class="goods-info">
<image :src="goods.goods_image"></image>
<view class="goods-text">
<view class="goods-name u-line-1">{{ goods.goods_name }}</view>
<!-- <view class="goods-spec u-line-1">{{ }}</view> -->
</view>
</view>
<view class="rate">
<view class="title">描述相符</view>
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</view>
<u-input v-model="content" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" />
<u-upload
:ref="'upload' + index"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
:action="action"
:header="header"
:form-data="formData"
:name="fileName"
@on-list-change="setImageList"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="../static/mine/27.png"></image>
</view>
</u-upload>
</view>
</view>
</template>
<script>
export default {
data() {
return {
count: 3,
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
header: {
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
},
fileName: 'common', // formData name
formData: {
name: 'common', //
},
content: '',
describe: '',
imageList: [],
}
},
props: {
goods: Object,
index: Number
},
watch: {
content(value) {
this.$emit('setContent', { content: value, index: this.index });
},
describe(value) {
this.$emit('setDescribe', { describe: value, index: this.index });
},
},
methods: {
setImageList(lists) {
// console.log(lists);
this.imageList = [];
lists.forEach(item => {
this.imageList.push(item.url);
})
console.log(this.imageList);
this.$emit('setLocalImage', { list: this.imageList, index: this.index });
}
}
};
</script>
<style lang="scss" scoped>
.comment-item-view {
.view-container {
.goods-info {
display: flex;
margin-bottom: 40rpx;
> image {
width: 113rpx;
height: 106rpx;
border-radius: 5rpx;
margin-right: 20rpx;
background-color: antiquewhite;
}
.goods-text {
.goods-name {
width: 530rpx;
font-size: 28rpx;
color: rgba(0,0,51,1);
margin-bottom: 20rpx;
}
.goods-spec {
max-width: 300rpx;
box-sizing: content-box;
padding: 10rpx 15rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
background:rgba(236,236,236,1);
border-radius: 6rpx;
display: inline-block;
}
}
}
textarea {
width: 100% !important;
margin-bottom: 60rpx;
}
.slot-btn {
width: 140rpx;
height: 140rpx;
background: rgba(236,236,236,1);
border-radius: 10rpx;
text-align: center;
> image {
margin-top: 48rpx;
width: 54rpx;
height: 49rpx;
}
}
.rate {
display: flex;
&:not(:last-child) {
margin-bottom: 35rpx;
}
.title {
margin-right: 25rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
}
}
}
}
</style>

View File

@ -16,6 +16,7 @@
</view> </view>
<u-action-sheet v-model="sheetStatus" :list="list" :tips="tips" :border-radius="20" @click="choiceOption"> <u-action-sheet v-model="sheetStatus" :list="list" :tips="tips" :border-radius="20" @click="choiceOption">
</u-action-sheet> </u-action-sheet>
<u-modal v-model="show" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
</view> </view>
</template> </template>
<script> <script>
@ -67,7 +68,9 @@
title: '帮助与反馈', title: '帮助与反馈',
link: './feedback' link: './feedback'
}, },
] ],
content: "是否退出登录!",
show: false
} }
}, },
methods: { methods: {
@ -76,13 +79,19 @@
choiceOption(index) { choiceOption(index) {
console.log(index); console.log(index);
if (index == 1) { if (index == 1) {
this.logout(); this.show = true;
} }
}, },
toNextPage(url, ...params) { toNextPage(url, ...params) {
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
},
loginOut() {
this.logout();
uni.redirectTo({
url: "../../pageA/login/login",
})
} }
}, },
}; };

BIN
pageE/static/mine/36.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -16,7 +16,7 @@
<view class="order-name">美甲人姓名{{ item.manicure_name }}</view> <view class="order-name">美甲人姓名{{ item.manicure_name }}</view>
<view class="order-date">时间{{ item.manicure_time | dateFormat }}</view> <view class="order-date">时间{{ item.manicure_time | dateFormat }}</view>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
@ -32,6 +32,7 @@
export default { export default {
data() { data() {
return { return {
pageSize: 1,
list: [{ list: [{
name: '我的订单' name: '我的订单'
}, { }, {
@ -42,18 +43,16 @@ export default {
page: 1, page: 1,
orderList: [], orderList: [],
loadStatus: 'loadmore', loadStatus: 'loadmore',
timer: true,
} }
}, },
onPullDownRefresh() {
this.getManicureList({ load: 'reload' });
},
onShow() { onShow() {
this.current = 0; this.current = 0;
this.swiperCurrent = 0; this.swiperCurrent = 0;
this.getManicureList().then(order => { this.getManicureList({ load: 'reload' });
// console.log(order);
this.orderList = this.orderList.concat(order);
// console.log(this.orderList);
});
}, },
filters: { filters: {
dateFormat(value) { dateFormat(value) {
@ -66,27 +65,33 @@ export default {
} }
}, },
methods: { methods: {
async getManicureList() { async getManicureList({ load }) {
let res = await this.$u.api.getManicureList({ const res = await this.$u.api.getManicureList({
page: this.page page: this.page
}) })
uni.stopPullDownRefresh();
this.timer = true;
if (res.errCode == 0) { if (res.errCode == 0) {
return res.data.list; if(load == 'reload') this.orderList = res.data.list;
else if(load == 'loadmore') this.orderList.push(...res.data.list);
} }
return res.data.list.length;
}, },
// //
reachBottom() { reachBottom() {
// loadStatus if(!this.timer) return false;
this.loadStatus = "loading"; this.loadStatus = "loading";
this.page++; this.page++;
this.getManicureList().then(order => { this.getManicureList({ load: 'loadmore' }).then(length => {
if (!order.length) { if(length == 0) {
// page-1
this.page--; this.page--;
this.loadStatus = "nomore"; this.loadStatus = 'nomore';
} else { } else {
this.orderList = this.orderList.concat(order); this.loadStatus = 'loading';
} }
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
}) })
}, },
tabsChange(index) { tabsChange(index) {

View File

@ -109,7 +109,16 @@
"navigationBarTitleText": "商品详情", "navigationBarTitleText": "商品详情",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff" "backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -131,7 +140,16 @@
"navigationBarTitleText": "商品评价", "navigationBarTitleText": "商品评价",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff" "backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -139,17 +157,57 @@
{ {
"path": "search/index", "path": "search/index",
"style": { "style": {
"navigationBarTitleText": "", "app-plus": {
"navigationStyle": "custom" "titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF",
"buttons": [
{
"type":"none",
"text":"搜索",
"float":"right",
"fontSize":"16",
"color": "#FF780F"
}
],
"searchInput": {
"align": "left",
"borderRadius": "15px",
"placeholder": "搜索您需要的商品",
"backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999",
"disabled": false
}
}
}
} }
}, },
{ {
"path": "search/out", "path": "search/out",
"style": { "style": {
"navigationBarTitleText": "", "app-plus": {
"navigationStyle": "custom" "titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF",
"buttons": [
{
"type":"none",
"text":"搜索",
"float":"right",
"fontSize":"16",
"color": "#FF780F"
}
],
"searchInput": {
"align": "left",
"borderRadius": "15px",
"placeholder": "搜索您需要的商品",
"backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999",
"disabled": false
}
}
}
} }
}, },
{ {
@ -195,6 +253,7 @@
{ {
"path": "cart/index", "path": "cart/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -562,6 +621,7 @@
{ {
"path": "tool/Manicure", "path": "tool/Manicure",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "美甲", "navigationBarTitleText": "美甲",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -803,6 +863,7 @@
{ {
"path": "order/Index", "path": "order/Index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -816,6 +877,7 @@
{ {
"path": "order/Details", "path": "order/Details",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -875,6 +937,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -898,6 +961,7 @@
{ {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",

View File

@ -1,5 +1,8 @@
<template> <template>
<view>
<view class="status_bar"></view>
<view class="index"> <view class="index">
<navigator url="/pageB/photo/index?id=28">qqq</navigator>
<view class="top"> <view class="top">
<view class="sosuo"></view> <view class="sosuo"></view>
<view class="tabs"> <view class="tabs">
@ -19,7 +22,7 @@
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box"> <view class="box">
<!-- <indexad style="width:690rpx"></indexad> --> <!-- <indexad style="width:690rpx"></indexad> -->
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper> <u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
<view class="list"> <view class="list">
<view> <view>
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item" <videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
@ -31,6 +34,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
@ -45,7 +49,6 @@
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem> <zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
</view> </view>
</view> </view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
@ -53,7 +56,7 @@
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box"> <view class="box">
<view class="tuijian"> <view class="tuijian">
<view class="title" @click="toSearchPage" > <view class="title" @click="toSearchPage">
<view class="left"> <view class="left">
<view></view> <view></view>
<text>推荐达人</text> <text>推荐达人</text>
@ -63,7 +66,7 @@
<view class="tuijianlist"> <view class="tuijianlist">
<!-- <darenItem style="margin-right:23rpx"></darenItem> <!-- <darenItem style="margin-right:23rpx"></darenItem>
<darenItem style="margin-right:23rpx"></darenItem> --> <darenItem style="margin-right:23rpx"></darenItem> -->
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType" ></darenItem> <darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
@ -84,6 +87,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -203,7 +207,7 @@
recommendList: [], // recommendList: [], //
indexImageSwiper: [], indexImageSwiper: [],
zhiboImageSwiper: [], zhiboImageSwiper: [],
tabLiveLists:[] tabLiveLists: []
} }
}, },
components: { components: {
@ -219,9 +223,12 @@
this.getZhiBoSwiper(); this.getZhiBoSwiper();
this.tabLiveList(); this.tabLiveList();
}, },
onPullDownRefresh() {
// this.getManicureList({ load: 'reload' });
},
methods: { methods: {
tabLiveList(){ tabLiveList() {
this.$u.api.tabLiveList().then((res)=>{ this.$u.api.tabLiveList().then((res) => {
console.log(res) console.log(res)
this.tabLiveLists = res.data this.tabLiveLists = res.data
}) })
@ -233,12 +240,12 @@
} }
}) })
}, },
changeType(member_id){ changeType(member_id) {
console.log(member_id); console.log(member_id);
this.$emit("pChangeType") this.$emit("pChangeType")
this.$u.api.attentionMember({ this.$u.api.attentionMember({
member_id: member_id member_id: member_id
}).then((res)=>{ }).then((res) => {
console.log(res) console.log(res)
this.getRecommendList(); this.getRecommendList();
}) })
@ -263,7 +270,7 @@
page: this.page, page: this.page,
is_video_img: 0, // 1 2 0 is_video_img: 0, // 1 2 0
}).then(res => { }).then(res => {
console.log('37647744ghj',res) console.log('37647744ghj', res)
if (res.errCode == 0) { if (res.errCode == 0) {
this.articleList = res.data.list; this.articleList = res.data.list;
} }

View File

@ -2,7 +2,7 @@
<view class="mine"> <view class="mine">
<view class="mine-top"> <view class="mine-top">
<view class="top"> <view class="top">
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar> <u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
<view class="user-info"> <view class="user-info">
<view class="info-left"> <view class="info-left">
<view class="user-nickname">{{ userInfo.member_nickname }}</view> <view class="user-nickname">{{ userInfo.member_nickname }}</view>
@ -56,8 +56,8 @@
<view>待支付</view> <view>待支付</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=2')"> <view @click="toOtherPage('/order/Index?current=2')">
<image src="/static/image/mine/14.png"></image> <image src="/static/image/mine/35.png"></image>
<view>已取消</view> <view>待发货</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=3')"> <view @click="toOtherPage('/order/Index?current=3')">
<image src="/static/image/mine/2.png"></image> <image src="/static/image/mine/2.png"></image>
@ -68,13 +68,13 @@
<view>试穿试送</view> <view>试穿试送</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=5')"> <view @click="toOtherPage('/order/Index?current=5')">
<image src="/static/image/mine/3.png"></image>
<view>待评价</view>
</view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image> <image src="/static/image/mine/9.png"></image>
<view>售后</view> <view>售后</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/3.png"></image>
<view>待评价</view>
</view>
</view> </view>
</view> </view>
<view class="tool"> <view class="tool">
@ -124,7 +124,11 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
export default { export default {
computed: {
...mapState(['hasLogin', 'token'])
},
data() { data() {
return { return {
userInfo: {}, userInfo: {},
@ -136,6 +140,16 @@ export default {
} }
}, },
onShow() { onShow() {
//
if (!this.hasLogin) {
uni.navigateTo({
url: "../../pageA/login/login"
})
}
this.getUserInfo();
},
//
onPullDownRefresh() {
this.getUserInfo(); this.getUserInfo();
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
@ -147,6 +161,7 @@ export default {
if (res.errCode == 0) { if (res.errCode == 0) {
// this.userInfo = res.data.MemberArray; // this.userInfo = res.data.MemberArray;
this.$set(this, 'userInfo', res.data.MemberArray); this.$set(this, 'userInfo', res.data.MemberArray);
uni.stopPullDownRefresh();
} }
}) })
}, },
@ -160,7 +175,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mine { .mine {
min-height: calc(calc(100vh - var(--window-top)) - 50px); min-height: calc(calc(100vh - var(--window-top)));
background: #ECECEC; background: #ECECEC;
.mine-top { .mine-top {
// width: 100%; // width: 100%;
@ -295,7 +310,7 @@ export default {
$content-padding-top: 22rpx, $content-padding-top: 22rpx,
$content-padding-bottom: 30rpx, $content-padding-bottom: 30rpx,
$image-height: 36rpx, $image-height: 36rpx,
$image-width: 36rpx, $image-width: 36rpx
); );
.title { .title {
justify-content: space-between; justify-content: space-between;
@ -316,7 +331,7 @@ export default {
@include image-size($image-width: 33rpx, $image-height: 36rpx); @include image-size($image-width: 33rpx, $image-height: 36rpx);
} }
> view:nth-child(2){ > view:nth-child(2){
@include image-size($image-width: 39rpx, $image-height: 33rpx); @include image-size($image-width: 38rpx, $image-height: 32rpx);
} }
> view:nth-child(3){ > view:nth-child(3){
@include image-size($image-width: 41rpx, $image-height: 33rpx); @include image-size($image-width: 41rpx, $image-height: 33rpx);
@ -337,7 +352,7 @@ export default {
$content-padding-top: 8rpx, $content-padding-top: 8rpx,
$content-padding-bottom: 25rpx, $content-padding-bottom: 25rpx,
$image-height: 71rpx, $image-height: 71rpx,
$image-width: 71rpx, $image-width: 71rpx
); );
.content { .content {
> view:not(:last-child) { > view:not(:last-child) {
@ -350,7 +365,7 @@ export default {
$content-padding-top: 8rpx, $content-padding-top: 8rpx,
$content-padding-bottom: 48rpx, $content-padding-bottom: 48rpx,
$image-height: 71rpx, $image-height: 71rpx,
$image-width: 71rpx, $image-width: 71rpx
); );
.content { .content {
> view:not(:last-child) { > view:not(:last-child) {

View File

@ -1,4 +1,6 @@
<template> <template>
<view>
<view class="status_bar"></view>
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom"> <scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
<view class="top"> <view class="top">
<image src="/static/image/shop/1.png" class="local"></image> <image src="/static/image/shop/1.png" class="local"></image>
@ -51,18 +53,19 @@
<view class="cart" @click="toCartPage"> <view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image> <image src="/static/image/common/3.png"></image>
</view> </view>
<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker> <u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
</scroll-view> </scroll-view>
</view>
</template> </template>
<script> <script>
import shopitem from "@/components/shop/shop-item/index"; import shopitem from "@/components/shop/shop-item/index";
import recommend from "@/components/shop/recommend/index"; import recommend from "@/components/shop/recommend/index";
import pintuan from "@/components/shop/recommend/pintuan"; import pintuan from "@/components/shop/recommend/pintuan";
import seckill from "@/components/shop/seckill/index"; import seckill from "@/components/shop/seckill/index";
import group from "@/components/shop/group/index"; import group from "@/components/shop/group/index";
import youhq from "@/components/shop/youhq/index"; import youhq from "@/components/shop/youhq/index";
import list from "@/components/shop/list/index"; import list from "@/components/shop/list/index";
export default { export default {
name: "shop", name: "shop",
components: { components: {
shopitem, shopitem,
@ -77,11 +80,6 @@ export default {
return { return {
area: "请选择", area: "请选择",
chooseArea: false, chooseArea: false,
areaParams: {
province: true,
city: true,
area: false
},
keyword: "", keyword: "",
list: [], list: [],
goodsClassify: [], // goodsClassify: [], //
@ -92,26 +90,51 @@ export default {
// couponGroupList: [], // // couponGroupList: [], //
pinTuanPush: {}, // pinTuanPush: {}, //
activityInfo: {}, activityInfo: {},
areaList: [], //
} }
}, },
onLoad() { onLoad() {
this.getShopTopList(); this.getShopTopList();
this.getLocation(); //
this.getStoreActivity();
// this.area = uni.getStorageSync("address") || "";
}, },
onShow() { onShow() {
this.getRecommendedSpike(); this.getRecommendedSpike();
this.getSpikeList(); this.getSpikeList();
this.getPinTuanPush(); this.getPinTuanPush();
this.getStoreActivity(); this.getAllLoaction(); //
}, },
methods: { methods: {
sousuo() { sousuo() {
// console.log(123) // console.log(123)
this.$u.route({ this.$u.route({
url:"pageB/search/index" url: "pageB/search/index"
})
},
//
getLocation() {
uni.getLocation({
type: 'wgs84',
geocode: true,
success: (res) => {
// console.log(res.address);
this.area = res.address.city;
},
fail: (e) => {
console.log(e);
}
});
},
//
getAllLoaction() {
this.$u.api.getAreaList({pid: 0}).then(res => {
// console.log(res);
this.areaList = res.data;
}) })
}, },
getShopTopList() { getShopTopList() {
this.$u.api.getShopTopList().then((res)=>{ this.$u.api.getShopTopList().then((res) => {
if (res.errCode == 0) { if (res.errCode == 0) {
let temp = []; let temp = [];
res.data.banner.forEach(item => { res.data.banner.forEach(item => {
@ -128,22 +151,24 @@ export default {
}, },
getRecommendedSpike() { getRecommendedSpike() {
this.$u.api.recommendedSpike().then(res => { this.$u.api.recommendedSpike().then(res => {
if(res.errCode == 0) this.recommendedSpike = res.data; if (res.errCode == 0) this.recommendedSpike = res.data;
// console.log(this.recommendedSpike); // console.log(this.recommendedSpike);
}) })
}, },
// //
getPinTuanPush() { getPinTuanPush() {
this.$u.api.getPinTuanPush().then(res => { this.$u.api.getPinTuanPush().then(res => {
if(res.errCode == 0) { if (res.errCode == 0) {
this.pinTuanPush = res.data; this.pinTuanPush = res.data;
} }
}) })
}, },
// //
getSpikeList() { getSpikeList() {
this.$u.api.getSpikeList({ page: 0 }).then(res => { this.$u.api.getSpikeList({
if(res.errCode == 0) { page: 0
}).then(res => {
if (res.errCode == 0) {
this.spikeList = res.data.list; this.spikeList = res.data.list;
this.seckillTime = { this.seckillTime = {
bigHour: res.data.bigHour, bigHour: res.data.bigHour,
@ -161,8 +186,8 @@ export default {
this.$refs.recommendGoods.loadMore(); this.$refs.recommendGoods.loadMore();
}, },
setArea(e) { setArea(e) {
// console.log(e); console.log(e);
this.area = e.city.label; this.area = this.areaList[e[0]].area_name;
}, },
toCartPage() { toCartPage() {
uni.navigateTo({ uni.navigateTo({
@ -194,13 +219,14 @@ export default {
}) })
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.shop { .shop {
height: calc(100vh - var(--window-top)); height: calc(100vh - var(--window-top));
box-sizing: border-box; box-sizing: border-box;
background-color: #F0EDF1; background-color: #F0EDF1;
.top { .top {
padding: 0 30rpx; padding: 0 30rpx;
background-color: #ffffff; background-color: #ffffff;
@ -208,15 +234,18 @@ export default {
height: 88rpx; height: 88rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.local{
.local {
width: 31rpx; width: 31rpx;
height: 37rpx; height: 37rpx;
} }
} }
.swiper-image { .swiper-image {
background-color: #ffffff; background-color: #ffffff;
padding: 0 30rpx; padding: 0 30rpx;
} }
.add { .add {
width: 115rpx; width: 115rpx;
height: 25rpx; height: 25rpx;
@ -227,53 +256,64 @@ export default {
align-items: center; align-items: center;
margin-left: 14rpx; margin-left: 14rpx;
margin-right: 37rpx; margin-right: 37rpx;
> text {
>text {
width: 80rpx; width: 80rpx;
} }
> image {
>image {
width: 24rpx; width: 24rpx;
height: 15rpx; height: 15rpx;
} }
} }
.mnue { .mnue {
background-color: #ffffff; background-color: #ffffff;
width: 35rpx; width: 35rpx;
height: 26rpx; height: 26rpx;
margin-left: 36rpx; margin-left: 36rpx;
} }
.chengnuo { .chengnuo {
padding: 30rpx; padding: 30rpx;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
> view {
>view {
display: flex; display: flex;
align-items: center; align-items: center;
> image {
>image {
width: 23rpx; width: 23rpx;
height: 23rpx; height: 23rpx;
} }
> text {
>text {
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
margin-left: 8rpx; margin-left: 8rpx;
} }
} }
} }
.fenlei { .fenlei {
padding: 30rpx; padding: 30rpx;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
> view {
>view {
margin-bottom: 30rpx; margin-bottom: 30rpx;
&:not(:nth-child(5n)) { &:not(:nth-child(5n)) {
margin-right: 70rpx; margin-right: 70rpx;
} }
} }
} }
.activity-view { .activity-view {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
text-align: center; text-align: center;
@ -283,6 +323,7 @@ export default {
height: 138rpx; height: 138rpx;
} }
} }
.cart { .cart {
z-index: 9; z-index: 9;
position: fixed; position: fixed;
@ -291,15 +332,16 @@ export default {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: rgba(253, 211, 96, 1); background: rgba(253, 211, 96, 1);
box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253,211,96,0.34); box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253, 211, 96, 0.34);
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
> image {
>image {
width: 56rpx; width: 56rpx;
height: 54rpx; height: 54rpx;
} }
} }
} }
</style> </style>

View File

@ -13,7 +13,7 @@
<view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view> <view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
</view> </view>
<view class="userlist" :style="{'top': top + 10 * rpx}"> <view class="userlist" :style="{'top': top + 10 * rpx}">
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image> <image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
</view> </view>
<view class="hot" :style="{'top': top + 10 * rpx}"> <view class="hot" :style="{'top': top + 10 * rpx}">
<text class="hottext">2.8w</text> <text class="hottext">2.8w</text>
@ -52,7 +52,7 @@
</div> --> </div> -->
</div> </div>
<list class="list"> <list class="list">
<cell class="item" v-for="(i,j) in list" @click="xuanzhong(j)"> <cell class="item" v-for="(i,j) in list" :key="j" @click="xuanzhong(j)">
<image class="shopimg" :src="i.goods_image"></image> <image class="shopimg" :src="i.goods_image"></image>
<div class="infos"> <div class="infos">
<div> <div>

BIN
static/fonts/cart.ttf Normal file

Binary file not shown.

BIN
static/image/mine/35.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B