Compare commits

..

No commits in common. "8727ae913d6c2451c5766fb775f2205a8903861f" and "1da6974fe388fddbe950e4cfa50334daf15f001e" have entirely different histories.

40 changed files with 879 additions and 1876 deletions

25
App.vue
View File

@ -1,27 +1,6 @@
<script> <script>
import { mapMutations } from 'vuex'; export default {}
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">
/* #ifndef APP-PLUS-NVUE */ @import "/static/css/normalize";
@import "/static/css/normalize";
/* #endif */
/* 顶部自定义导航留白 */
.status_bar {
width: 100%;
height: var(--status-bar-height);
}
</style> </style>

View File

@ -230,15 +230,16 @@ export default {
}); });
}, },
// 订单列表 // 订单列表
getOrderList({ page, type }) { getOrderList({ page, type, refund_state }) {
let params = { page: page }; let params = { page: page };
if(type > 0) Object.assign(params, {type: type}); if(type >= 0 || typeof type == 'string') Object.assign(params, {state_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: 0, rate: 2,
} }
}, },
props: { props: {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="notice"> <view class="notice">
<view v-for="(item,index) in notice" :key="index"> <view v-for="(item,index) in notice">
<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"> <view class="area" @click="show=true">
<input type="text" placeholder="省市区" v-model="address" disabled @click="show=true" /> <input type="text" placeholder="省市区" v-model="address" disabled />
<!-- <view @click="chooseArea"> <view>
<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,16 +80,6 @@ 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,15 +24,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0"> <view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
<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">确认收货</view>
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view> <view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view> <view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view> <view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view> <view class="payment" v-if="order.order_state == 10" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view>
<view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view> <view class="service" v-if="order.order_state == 20">联系官方客服</view>
<view class="service" v-if="order.view_type == 8">联系官方客服</view> <view class="submit" v-if="order.order_state == 20">提交官方审核</view>
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
</view> </view>
</view> </view>
</template> </template>
@ -41,7 +40,7 @@ import common from '@/static/js/common.js';
export default { export default {
data() { data() {
return { return {
state: '', state: '', // 1: 2: 3: 4: 5: 退 6: , 7:
} }
}, },
props: { props: {
@ -50,25 +49,44 @@ 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.view_type) { switch (this.order.order_state) {
case 1: case 0: //
state = '已取消';
break;
case 10: //
state = '待支付'; state = '待支付';
break; break;
case 2: case 20: //
state = '待发货'; state = '交易成功';
break; break;
case 3: case 30: //
state = '待收货'; state = '待收货';
break; break;
case 4: case 40: //
state = '待评价'; if(this.order.evaluation_state == 0) 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() {
@ -76,20 +94,7 @@ 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"); this.$emit("refreshOrderList", { reload: 'again' });
}
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);
}) })
@ -160,7 +165,6 @@ 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;
@ -208,7 +212,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));
} }
.cancel { .calcel {
@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,index) in list" :key="index"> <swiper-item v-for="item in list" >
<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: 11, remaining: 4,
type: true, type: true,
banner: false, banner: false,
protocol: false, protocol: false,
@ -142,19 +142,12 @@
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
that.heightOut = res.windowHeight; that.heightOut = res.windowHeight;
console.log(that.heightOut) console.log('666666666666666' + 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'
}); });
@ -181,7 +174,8 @@
}) })
}, },
videoErrorCallback: function(e) { videoErrorCallback: function(e) {
console.log('视频错误信息:',e); console.log('视频错误信息:')
console.log(e.target.errMsg)
}, },
getRandomColor: function() { getRandomColor: function() {
const rgb = [] const rgb = []
@ -228,18 +222,19 @@
// height: 400rpx; // height: 400rpx;
} }
.welcome_jumpes { .welcome_jumpes {
z-index: 10; width: 94rpx;
height: 36rpx;
opacity: 0.5;
border-radius: 18rpx;
position: absolute; position: absolute;
top: 80rpx; right: 37rpx;
right: 60rpx; top: 66rpx;
width: 100rpx;
height: 40rpx;
border-radius: 20rpx;
font-size: 22rpx; font-size: 22rpx;
text-align: center; text-align: center;
line-height: 40rpx; line-height: 35rpx;
color: #fff; color: #fff;
background-color: rgba(0,0,0,0.5); background: #C4CAC6;
z-index: 10;
} }
#myVideo { #myVideo {
@ -262,8 +257,8 @@
.welcome_images { .welcome_images {
width: 100%; width: 100%;
height: 100vh;
position: fixed; position: fixed;
height: 100%
} }
uni-swiper, uni-swiper,
@ -271,7 +266,7 @@
uni-image { uni-image {
width: 100%; width: 100%;
// position: fixed; // position: fixed;
height: 100vh; height: 100%
} }
uni-image { uni-image {

View File

@ -23,9 +23,7 @@
"Push" : {}, "Push" : {},
"Maps" : {}, "Maps" : {},
"LivePusher" : {}, "LivePusher" : {},
"Payment" : {}, "Payment" : {}
"VideoPlayer" : {},
"Speech" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -56,8 +54,7 @@
"<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" : {},
@ -67,12 +64,6 @@
"oauth" : { "oauth" : {
"qq" : { "qq" : {
"appid" : "101884160" "appid" : "101884160"
},
"apple" : {},
"weixin" : {
"appid" : "wx556db1531ec35dc7",
"appsecret" : "f441fc15dd21543871a818f40ce92016",
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
} }
}, },
"maps" : { "maps" : {
@ -81,22 +72,7 @@
"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="loginOther(1)"> <view class="rect_view" @click="rect_qq()">
<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" @click="loginOther(2)"> <view class="rect_view">
<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,9 +61,7 @@
</template> </template>
<script> <script>
import identifying from '@/components/logininput/identifying' import identifying from '@/components/logininput/identifying'
import { import { mapMutations } from 'vuex';
mapMutations
} from 'vuex';
export default { export default {
data() { data() {
return { return {
@ -93,35 +91,21 @@
}, { }, {
"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({}).then((res) => { this.$u.api.sendSmsCode({
}).then((res) => {
console.log(res) console.log(res)
}) })
}, },
@ -180,33 +164,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'
@ -215,75 +199,40 @@
}) })
}, },
// qq // qq
loginOther(type) { rect_qq() {
var me = this; console.log("授权QQ")
var vm = this;
uni.getProvider({ uni.getProvider({
service: 'oauth', service: 'oauth',
success: (res) => { success: function(res) {
if (type == 1) { console.log('qq', res) //weixin
if (~res.provider.indexOf('qq')) {
uni.login({ uni.login({
provider: 'qq', provider: 'qq',
success: (qqres) => { success: function(loginRes) {
console.log(qqres); console.log(loginRes)
uni.getUserInfo({ this.getApplogin(loginRes)
provider: 'qq', vm.$HTTP({
success: (data) => { method: 'GET',
console.log(data); baseURL: 'https://graph.qq.com/user/get_user_info',
this.$u.api.qqLogin({ url: '',
member_qqopenid: data.userInfo.openId, data: {
member_nickname: data.userInfo.nickName, openid: loginRes.authResult.openid,
member_avatar: data.userInfo.avatarUrl, access_token: loginRes.authResult.access_token,
}).then(res => { appid: '101884160'
console.log(res.errCode);
if (res.errCode == 0) {
this.loginIn(res.data.token);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
})
}
})
}
})
}, },
fail: (e) => { load: true
console.log(e); }).then((data) => {
console.log(data)
}, (err) => {
console.log(err)
});
} }
}); });
} else { } else {
uni.login({ console.log("错误")
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);
} }
}); });
}, },
@ -293,6 +242,10 @@
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,14 +62,10 @@ 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.id)">{{item.name}}</view> <view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{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,7 +44,8 @@
}) })
}, },
mounted() {}, mounted(){
},
methods: { methods: {
// checkbox // checkbox
checkboxChange(e) { checkboxChange(e) {
@ -58,36 +59,19 @@
this.show = !this.show this.show = !this.show
}, },
// //
tapClick(index, id) { tapClick(index) {
// console.log(index); console.log(index)
if (this.rSelect.indexOf(index) == -1) { if (this.rSelect.indexOf(index) == -1) {
if (this.rSelect.length > 9) { console.log(index) //
this.$u.toast("只能选择10个标签"); this.rSelect.push(index); //
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);
}
})
}, },
} }
@ -376,10 +360,9 @@
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,76 +1,45 @@
<template> <template>
<view class="welcome"> <view class="welcome">
<!-- 倒计时跳过 --> <!-- 倒计时跳过 -->
<remaining v-if="guidePages"></remaining> <remaining></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() {
/** },
* 获取本地存储中launchFlag的值 mounted(){
* 若存在说明不是首次启动直接进入首页 },
* 若不存在说明是首次启动进入引导页 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,9 +35,6 @@ 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,17 +2,10 @@
<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>
<u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon> <image></image>
</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>
@ -20,24 +13,20 @@
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%;
@ -50,41 +39,9 @@ export default {
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
} >image{
.scroll-box { width: 33rpx;
.item { height: 33rpx;
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,89 +1,51 @@
<template> <template>
<view class="shopone">
<image></image>
<view> <view>
<u-popup v-model="is_comment" mode="bottom" border-radius="10" height="700rpx"> <text>sadas</text>
<view class="top"> <text>dasadas</text>
<text>评论</text> <text>dsadas</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>
<script> <style lang="scss" scoped>
export default { image{
name: "shopone", background-color: #0f0;
props: ['comment'], }
data() { .shopone{
return { width: 442rpx;
is_comment: true height: 200rpx;
background:rgba(0,0,0,0.4);
padding: 20rpx;
display: flex;
border-radius: 10rpx;
>image{
width: 160rpx;
height: 160rpx;
} }
}, >view{
onReady() { margin-left: 20rpx;
this.getComment(); // display: flex;
}, flex-direction: column;
watch: { justify-content: space-between;
comment(newValue,old) { >text{
console.log(newValue,old); font-size: 24rpx;
}, color: #fff;
deep: true line-height: 36rpx;
}, }
methods: { >text:first-child{
getComment() { font-size: 28rpx;
this.$u.post("Specialci/getAllEvalue", {
goods_id: goods_id, }
page: 1 >text:last-child{
}).then(res => { font-size: 28rpx;
console.log(res); color: #FF3131;
})
},
close() {
this.is_comment = false;
} }
} }
} }
</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> </style>
<script>
export default {
name:"shopone"
}
</script>

View File

@ -1,32 +1,30 @@
<template> <template>
<view class="userinfo"> <view class="userinfo">
<view class="userhead"> <view class="userhead">
<image :src="item.member_avatar"></image> <image :src="list.member_avatar"></image>
<text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text> <text>+</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">
<view class="operat zan"> <image></image>
<u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon> <text>{{list.like_num}}</text>
<text>{{item.like_num}}</text>
</view> </view>
<!-- 收藏 --> <view class="shoucang">
<view class="operat shoucang"> <image></image>
<u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon> <text>{{list.collect_num}}</text>
<text>{{item.collect_num}}</text>
</view> </view>
<!-- 评论 --> <view class="pinglun">
<view class="operat pinglun"> <image></image>
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon> <text>{{list.comment_num}}</text>
<text>{{item.comment_num}}</text>
</view> </view>
<!-- 购物车 --> <view class="gouwu">
<view class="operat gouwu"> <image></image>
<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;
@ -34,39 +32,41 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.userhead{ >view{
position: relative; display: flex;
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;
} }
.follow { >text{
position: absolute;
top: 90rpx;
left: 35%;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
text-align: center;
line-height: 36rpx;
font-size: 36rpx; font-size: 36rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F; background-color: #FF780F;
} position: absolute;
} top: 75rpx;
.operat { border-radius: 50%;
display: flex; line-height: 36rpx;
align-items: center; text-align: center;
flex-direction: column;
& > text {
margin-top: 10rpx;
font-size: 28rpx;
color: #fff;
} }
} }
} }
@ -74,82 +74,11 @@
<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 || {}
} }
}, },
watch: { props:['list']
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" :key="index"></videoItem> <videoItem v-for="item in 10"></videoItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<videoItem v-for="item in 10" :key="index"></videoItem> <videoItem v-for="item in 10"></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" :key="index"></zhiboItem> <zhiboItem v-for="item in 10"></zhiboItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<zhiboItem v-for="item in 10" :key="index"></zhiboItem> <zhiboItem v-for="item in 10"></zhiboItem>
</view> </view>
</view> </view>
</view> </view>

View File

@ -1,85 +1,43 @@
<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" @click="goBack"></u-icon> <u-icon name="close" color="#999999" :size="30"></u-icon>
</view> </view>
<swiper class="swiper" circular autoplay @change="changeSwiper"> <swiper class="swiper">
<swiper-item v-for="(simg,sindex) in list.photo" :key="sindex"> <swiper-item>
<image :src="simg.url" mode="aspectFill" @tap="viewImage" :data-url="simg.url"></image> <image :src="list.article_pic"></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 list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view> <view v-for="(item,index) in 4" :key="index" :style="{'background-color':index == 2 ? '#fff' : '#ede8e8'}"></view>
</view> </view>
<view class="username">{{ list.member_nickname }}</view> <view class="username">自己黑的哈万岁哦划u将</view>
<view class="title">{{ list.article_title }}</view> <view class="title">hasjdhajskhj</view>
<view class="info">{{ list.article_content }}</view> <view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
<view class="box">
<view class="label" v-for="(label,id) in list.label" :key="id">{{ label.name }}</view>
</view> </view>
</view> <userinfo class="userinfo" :list="list"></userinfo>
<!-- 用户操作 --> <shpoone class="shpoone"></shpoone>
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openCart"></userinfo> <shoplist></shoplist>
<!-- 评论 -->
<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{
width: 100%; height: 100vh;
height: 100%;
background-color: #ececec; background-color: #ececec;
width: 100%;
.back{ .back{
padding-top: 28rpx; padding-top: 28rpx;
padding-right: 31rpx; padding-right: 31rpx;
text-align: right; text-align: right;
} }
.swiper{ .swiper{
width: 750rpx; width: 100%;
height: 702rpx; height: 702rpx;
margin-top: 102rpx; margin-top: 102rpx;
image{ image{
@ -89,17 +47,22 @@
} }
.bottom{ .bottom{
width: 100%; width: 100%;
margin-top: 150rpx; height: 270rpx;
padding: 20rpx 30rpx;
background-color: #fff; background-color: #fff;
.item{ position: fixed;
bottom: 0;
display: flex; display: flex;
align-items: center; flex-direction: column;
align-items: flex-start;
padding: 20rpx 30rpx;
.item{
padding: 8rpx 16rpx; padding: 8rpx 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
border-radius: 10rpx;
background-color: #999; background-color: #999;
display: flex;
align-items: center;
border-radius: 10rpx;
>view{ >view{
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
@ -108,250 +71,68 @@
} }
} }
.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;
.box { margin-top: 20rpx;
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;
} }
.pl { .shpoone{
.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;
}
}
}
.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;
position: absolute; position: absolute;
top: 50%;
z-index: 999;
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 contentBox from "../components/shpoone/index" // import shpoone 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, },
is_comment: false, methods:{
cartList: [], articleInfo(article_id){
cart_len: 0, this.$u.api.articleInfo({article_id}).then((res)=>{
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,8 +19,7 @@
</view> </view>
<view class="info"> <view class="info">
<view class="title u-line-2"> <view class="title u-line-2">
<text class="store-name">{{ goodsInfo.store_name }}</text> <text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
<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>
@ -41,7 +40,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" v-else>暂无评价</view> <view class="comment-none">暂无评价</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">
@ -228,9 +227,6 @@ 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);
}, },
@ -383,7 +379,7 @@ export default {
}, },
/* /*
* @description 下单 订单步骤1展示结算数据 * @description 下单 订单步骤1展示结算数据
* @params {Number} type involvement 拼团或者 默认开团 * @params {Number} type 拼团或者开团
* @params {Number} num 数量 * @params {Number} num 数量
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀 * @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/ **/
@ -557,19 +553,14 @@ export default {
.title{ .title{
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.store-name { >text{
display: inline-block; padding: 13rpx;
padding: 8rpx 10rpx; font-size: 24rpx;
margin: 0 10rpx 4rpx 0; color:#fff;
vertical-align: middle; margin-right: 13rpx;
font-size: 20rpx;
color: #fff;
border-radius: 30rpx;
background-color: #FF780F; background-color: #FF780F;
margin-bottom: 10rpx; display: inline-block;
} border-radius: 25rpx;
.goods-name {
line-height: 1.5;
} }
} }
.pic{ .pic{

View File

@ -40,10 +40,7 @@ export default {
}, },
search(value){ search(value){
// console.log(value) // console.log(value)
if(!value) { if(!value) this.$u.toast('搜索内容不可为空');
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,10 +116,6 @@ 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) {
@ -138,17 +134,9 @@ 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,9 +73,6 @@ export default {
deep: true deep: true
} }
}, },
onPullDownRefresh() {
this.getCartList();
},
onShow() { onShow() {
this.getCartList(); this.getCartList();
}, },
@ -114,7 +111,6 @@ 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 + '?' + new Date().getTime(), userInfo.member_avatar,
]; ];
} }
}) })

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 + '?' + new Date().getTime()" :size="120"></u-avatar> <u-avatar :src="userInfo.member_avatar" :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,173 +1,78 @@
<template> <template>
<view class="comment"> <view class="comment">
<view class="main-container"> <view class="main-container">
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index"> <textarea @blur="bindTextAreaBlur" auto-height placeholder="发表你的评价吧,收货时心情如何?" maxlength="200" />
<CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView> <u-upload
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 class="rate"> <view>
<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 class="write-btn" @click="submitComment">发表意见</view> </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: 3, // count: 4, //
logistics: 0, // logistics: 5,
service: 0, // service: 5,
describe: [], describe: 5,
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() {
this.goodsList.forEach((_, index) => { if(this.$u.test.isEmpty(this.content)) {
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;
let files = []; // console.log(this.logistics);
// console.log(this.uploadImageList); // console.log(this.service);
this.uploadImageList.forEach((item, index) => { // console.log(this.describe);
files[index] = ''; this.$u.api.updateOrderEvaluate({
// 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: files, file: '', //
}; }).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>
@ -176,40 +81,9 @@ 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: 30rpx; margin-bottom: 10rpx;
.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;
@ -227,11 +101,10 @@ 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;
@ -241,11 +114,7 @@ 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="orderInfo.view_type == 1">结束时间{{ orderInfo.end_time }}</view> <view class="time" v-if="state == '2'">距离结束22:22:22</view>
</view> </view>
<image :src="s_object[state].image"></image> <image :src="s_object[state].image"></image>
</view> </view>
@ -67,10 +67,8 @@
<view>创建时间{{ orderInfo.add_time | date}}</view> <view>创建时间{{ orderInfo.add_time | date}}</view>
</view> </view>
</view> </view>
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0"> <view class="btn" v-if="['1', '2', '6'].indexOf(state) >= 0">
<view class="cancel" v-if="state == '4' || state == '1'" @click="applyRefund">申请退款</view> <view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</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>
@ -98,8 +96,8 @@ export default {
image: '../static/mine/31.png', image: '../static/mine/31.png',
}, },
'4': { '4': {
text: '待发货', text: '已取消',
image: '../static/mine/36.png', image: '../static/mine/33.png',
}, },
'5': { '5': {
text: '已退款', text: '已退款',
@ -114,44 +112,45 @@ export default {
image: '../static/mine/34.png', image: '../static/mine/34.png',
}, },
}, },
orderInfo: {}, current: 0,
oid: '', orderInfo: {}
} }
}, },
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 1: case 0: //
state = '6';
break;
case 2:
state = '4'; state = '4';
break; break;
case 3: case 10: //
state = '6';
break;
case 20: //
state = '3';
break;
case 30: //
state = '1'; state = '1';
break; break;
case 4: case 40: //
state = '2'; if(this.orderInfo.evaluation_state == 0) 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) {
@ -160,14 +159,9 @@ 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.view_type); this.viewState(this.orderInfo.order_state);
this.setTitle(this.orderInfo.view_type);
} }
uni.stopPullDownRefresh(); //
}) })
},
applyRefund() {
}, },
cancelOrder() { cancelOrder() {
this.$u.api.cancelOrder({ this.$u.api.cancelOrder({
@ -178,20 +172,10 @@ export default {
} }
}) })
}, },
confirmReceive() { setTitle(){
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 (value) { switch (this.current) {
case 1: case '1':
title = "支付成功" title = "支付成功"
break; break;
default: default:
@ -308,7 +292,6 @@ export default {
} }
.store-goods { .store-goods {
display: flex; display: flex;
margin-bottom: 20rpx;
> image { > image {
width: 180rpx; width: 180rpx;
height: 160rpx; height: 160rpx;
@ -317,7 +300,6 @@ 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,11 +59,13 @@ export default {
this.orderList = []; this.orderList = [];
} }
this.page = 0; this.page = 0;
// reload loadmore // again
if(value == 4) { if(value == 6) {
this.goodsTryOrderList({ load: 'reload' }); this.getAfterSaleList({ reload: 'again' });
} else if(value == 4) {
this.goodsTryOrderList({ reload: 'again' });
} else { } else {
this.getOrderList({ load: 'reload' }); this.getOrderList({ reload: 'again' });
} }
}, },
}, },
@ -72,32 +74,26 @@ 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 = 1; // type = 10; //
break; break;
case 2: case 2:
type = 2; // type = 0; //
break; break;
case 3: case 3:
type = 3; // type = 30; //
break; break;
case 4: case 4:
type = -1; // 穿 type = -1; // 穿
break; break;
case 5: case 5:
type = 8; // type = 'state_noeval'; //
break;
case 6:
type = 4; //
break; break;
default: default:
type = -1; type = -1;
@ -107,52 +103,46 @@ export default {
}, },
refreshOrderList() { refreshOrderList() {
this.page = 0; this.page = 0;
// if(this.current == 6) { if(this.current == 6) {
// this.getAfterSaleList({ load: 'reload' }); this.getAfterSaleList({ reload: 'again' });
// } else } else if(this.current == 4) {
if(this.current == 4) { this.goodsTryOrderList({ reload: 'again' });
this.goodsTryOrderList({ load: 'reload' });
} else { } else {
this.getOrderList({ load: 'reload' }); this.getOrderList({ reload: 'again' });
} }
}, },
// 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(load == 'reload') this.orderList = res.data; if(reload) this.orderList = res.data;
else if(load == 'loadmore') this.orderList.push(...res.data); else 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(load == 'reload') this.orderList = res.data; if(reload) this.orderList = res.data;
else if(load == 'loadmore') this.orderList.push(...res.data); else 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(load == 'reload') this.orderList = res.data.list; if(reload) this.orderList = res.data.list;
else if(load == 'loadmore') this.orderList.push(...res.data.list); else this.orderList.push(...res.data.list);
} }
return res; return res;
}, },
@ -164,9 +154,8 @@ 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 else if(this.current == 4) promise = this.goodsTryOrderList();
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,8 +42,7 @@ export default {
}, },
methods: { methods: {
getOrderLogistics(id) { getOrderLogistics(id) {
this.$u.api.orderLogistics({ id: id }).then(res => { this.$u.api.orderLogistics({ id: 16 }).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;

View File

@ -1,138 +0,0 @@
<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,7 +16,6 @@
</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>
@ -68,9 +67,7 @@
title: '帮助与反馈', title: '帮助与反馈',
link: './feedback' link: './feedback'
}, },
], ]
content: "是否退出登录!",
show: false
} }
}, },
methods: { methods: {
@ -79,19 +76,13 @@
choiceOption(index) { choiceOption(index) {
console.log(index); console.log(index);
if (index == 1) { if (index == 1) {
this.show = true; this.logout();
} }
}, },
toNextPage(url, ...params) { toNextPage(url, ...params) {
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
},
loginOut() {
this.logout();
uni.redirectTo({
url: "../../pageA/login/login",
})
} }
}, },
}; };

Binary file not shown.

Before

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

View File

@ -109,16 +109,7 @@
"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"
}
]
} }
} }
} }
@ -140,16 +131,7 @@
"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"
}
]
} }
} }
} }
@ -157,57 +139,17 @@
{ {
"path": "search/index", "path": "search/index",
"style": { "style": {
"app-plus": { "navigationBarTitleText": "",
"titleNView": { "navigationStyle": "custom"
"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": {
"app-plus": { "navigationBarTitleText": "",
"titleNView": { "navigationStyle": "custom"
"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
}
}
}
} }
}, },
{ {
@ -253,7 +195,6 @@
{ {
"path": "cart/index", "path": "cart/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -621,7 +562,6 @@
{ {
"path": "tool/Manicure", "path": "tool/Manicure",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "美甲", "navigationBarTitleText": "美甲",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -863,7 +803,6 @@
{ {
"path": "order/Index", "path": "order/Index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -877,7 +816,6 @@
{ {
"path": "order/Details", "path": "order/Details",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -937,7 +875,6 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -961,7 +898,6 @@
{ {
"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,8 +1,5 @@
<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">
@ -22,7 +19,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"></u-swiper> <u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></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"
@ -34,7 +31,6 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
@ -49,6 +45,7 @@
<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>
@ -56,7 +53,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>
@ -66,7 +63,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">
@ -87,7 +84,6 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -207,7 +203,7 @@
recommendList: [], // recommendList: [], //
indexImageSwiper: [], indexImageSwiper: [],
zhiboImageSwiper: [], zhiboImageSwiper: [],
tabLiveLists: [] tabLiveLists:[]
} }
}, },
components: { components: {
@ -223,12 +219,9 @@
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
}) })
@ -240,12 +233,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();
}) })
@ -270,7 +263,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 + '?' + new Date().getTime()" :size="110"></u-avatar> <u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :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/35.png"></image> <image src="/static/image/mine/14.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/9.png"></image>
<view>售后</view>
</view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/3.png"></image> <image src="/static/image/mine/3.png"></image>
<view>待评价</view> <view>待评价</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image>
<view>售后</view>
</view>
</view> </view>
</view> </view>
<view class="tool"> <view class="tool">
@ -124,11 +124,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
export default { export default {
computed: {
...mapState(['hasLogin', 'token'])
},
data() { data() {
return { return {
userInfo: {}, userInfo: {},
@ -140,16 +136,6 @@ export default {
} }
}, },
onShow() { onShow() {
//
if (!this.hasLogin) {
uni.navigateTo({
url: "../../pageA/login/login"
})
}
this.getUserInfo();
},
//
onPullDownRefresh() {
this.getUserInfo(); this.getUserInfo();
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
@ -161,7 +147,6 @@ 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();
} }
}) })
}, },
@ -175,7 +160,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mine { .mine {
min-height: calc(calc(100vh - var(--window-top))); min-height: calc(calc(100vh - var(--window-top)) - 50px);
background: #ECECEC; background: #ECECEC;
.mine-top { .mine-top {
// width: 100%; // width: 100%;
@ -310,7 +295,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;
@ -331,7 +316,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: 38rpx, $image-height: 32rpx); @include image-size($image-width: 39rpx, $image-height: 33rpx);
} }
> 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);
@ -352,7 +337,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) {
@ -365,7 +350,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,6 +1,4 @@
<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>
@ -53,19 +51,18 @@
<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="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker> <u-picker mode="region" :params="areaParams" v-model="chooseArea" @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,
@ -80,6 +77,11 @@
return { return {
area: "请选择", area: "请选择",
chooseArea: false, chooseArea: false,
areaParams: {
province: true,
city: true,
area: false
},
keyword: "", keyword: "",
list: [], list: [],
goodsClassify: [], // goodsClassify: [], //
@ -90,51 +92,26 @@
// 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.getAllLoaction(); // this.getStoreActivity();
}, },
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 => {
@ -151,24 +128,22 @@
}, },
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({ this.$u.api.getSpikeList({ page: 0 }).then(res => {
page: 0 if(res.errCode == 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,
@ -186,8 +161,8 @@
this.$refs.recommendGoods.loadMore(); this.$refs.recommendGoods.loadMore();
}, },
setArea(e) { setArea(e) {
console.log(e); // console.log(e);
this.area = this.areaList[e[0]].area_name; this.area = e.city.label;
}, },
toCartPage() { toCartPage() {
uni.navigateTo({ uni.navigateTo({
@ -219,14 +194,13 @@
}) })
}, },
}, },
} }
</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;
@ -234,18 +208,15 @@
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;
@ -256,64 +227,53 @@
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;
@ -323,7 +283,6 @@
height: 138rpx; height: 138rpx;
} }
} }
.cart { .cart {
z-index: 9; z-index: 9;
position: fixed; position: fixed;
@ -332,16 +291,15 @@
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'}" :key="j"></image> <image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></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" :key="j" @click="xuanzhong(j)"> <cell class="item" v-for="(i,j) in list" @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>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 B