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

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

25
App.vue
View File

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

View File

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

View File

@ -3,7 +3,7 @@
<view class="user">
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
<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 class="content">
<view class="text">{{ content.geval_content }}</view>
@ -30,7 +30,7 @@ export default {
data() {
return {
count: 5,
rate: 2,
rate: 0,
}
},
props: {

View File

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

View File

@ -7,12 +7,12 @@
<view>
<input type="text" placeholder="手机号" maxlength="11" v-model="phone" />
</view>
<view class="area" @click="show=true">
<input type="text" placeholder="省市区" v-model="address" disabled />
<view>
<view class="area">
<input type="text" placeholder="省市区" v-model="address" disabled @click="show=true" />
<!-- <view @click="chooseArea">
<image src="/static/image/mine/24.png"></image>
<text>定位</text>
</view>
</view> -->
</view>
<view>
<input type="text" placeholder="详细地址" v-model="area" />
@ -80,6 +80,16 @@ export default {
confirmBtn() {
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() {
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">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</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-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image>
@ -24,14 +24,15 @@
</view>
</view>
</view>
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
<view class="logistics" v-if="order.order_state == 30">确认收货</view>
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="order.order_state == 10" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view>
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
<view class="cancel" v-if="order.view_type == 3 || order.view_type == 2" @click="applyRefund">申请退款</view>
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</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.view_type == 8">联系官方客服</view>
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
</view>
</view>
</template>
@ -40,7 +41,7 @@ import common from '@/static/js/common.js';
export default {
data() {
return {
state: '', // 1: 2: 3: 4: 5: 退 6: , 7:
state: '',
}
},
props: {
@ -49,44 +50,25 @@ export default {
created() {
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: {
viewState() {
let state;
switch (this.order.order_state) {
case 0: //
state = '已取消';
break;
case 10: //
switch (this.order.view_type) {
case 1:
state = '待支付';
break;
case 20: //
state = '交易成功';
case 2:
state = '待发货';
break;
case 30: //
case 3:
state = '待收货';
break;
case 40: //
if(this.order.evaluation_state == 0) state = '待评价';
else state = '交易成功'
case 4:
state = '待评价';
break;
default:
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;
},
cancelOrder() {
@ -94,7 +76,20 @@ export default {
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList", { reload: 'again' });
this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
},
applyRefund() {
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
@ -165,6 +160,7 @@ export default {
line-height: 38rpx;
}
.goods-sku {
display: inline-block;
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;
@ -212,7 +208,7 @@ export default {
.logistics, .comment, .payment {
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
}
.calcel {
.cancel {
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
}
.service {

View File

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

View File

@ -23,7 +23,9 @@
"Push" : {},
"Maps" : {},
"LivePusher" : {},
"Payment" : {}
"Payment" : {},
"VideoPlayer" : {},
"Speech" : {}
},
/* */
"distribute" : {
@ -54,7 +56,8 @@
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : [ "armeabi-v7a", "x86" ]
},
/* ios */
"ios" : {},
@ -64,6 +67,12 @@
"oauth" : {
"qq" : {
"appid" : "101884160"
},
"apple" : {},
"weixin" : {
"appid" : "wx556db1531ec35dc7",
"appsecret" : "f441fc15dd21543871a818f40ce92016",
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
}
},
"maps" : {
@ -72,7 +81,22 @@
"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">
<view class="warp">
<view class="rect" @tap.stop>
<view class="rect_view" @click="rect_qq()">
<view class="rect_view" @click="loginOther(1)">
<image src="../../static/pageA/qq.png" class="image"></image>
<view>QQ登录</view>
</view>
<view class="rect_view">
<view class="rect_view" @click="loginOther(2)">
<image src="../../static/pageA/weixin.png" class="image"></image>
<view>微信登录</view>
</view>
@ -61,7 +61,9 @@
</template>
<script>
import identifying from '@/components/logininput/identifying'
import { mapMutations } from 'vuex';
import {
mapMutations
} from 'vuex';
export default {
data() {
return {
@ -83,29 +85,43 @@
sms_code: '', //
//
pact_text: [{
"id": '1',
"text": "《用户协议》"
}, {
"id": '2',
"text": "《隐私协议》"
}, {
"id": '3',
"text": "《使用协议》"
},
]
"id": '1',
"text": "《用户协议》"
}, {
"id": '2',
"text": "《隐私协议》"
}, {
"id": '3',
"text": "《使用协议》"
}, ],
temp_url: "", //
pagesArr: ["pages/mine/index"], //
};
},
onLoad() {
//
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: {
...mapMutations(['loginIn']),
apiwelcome() {
this.$u.api.sendSmsCode({
}).then((res) => {
this.$u.api.sendSmsCode({}).then((res) => {
console.log(res)
})
},
@ -164,33 +180,33 @@
return false
} else {
me.loginIn(res.data.token); //
uni.navigateTo({
url: '/pageA/topick/topick'
})
if (res.data.member.has_labels) {
uni.switchTab({
url: '/pages/index/index'
})
} else {
uni.navigateTo({
url: '/pageA/topick/topick'
})
}
//
// uni.setStorageSync({
// key: 'user_info',
// data: res.data,
// success: function() {
// console.log('success');
// //
// uni.navigateTo({
// url : '/pageA/topick/topick'
// })
// }
// });
uni.setStorageSync({
key: 'user_info',
data: res.data,
success: function() {
console.log('success');
}
});
}
// token
me.loginIn(res.data.token); //
// //
// this.$refs.uToast.show({
// title: res.message,
// type: 'success',
// url: '/pageA/topick/topick'
// })
}
if (res.errCode == 1) {
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error'
@ -199,40 +215,75 @@
})
},
// qq
rect_qq() {
console.log("授权QQ")
var vm = this;
loginOther(type) {
var me = this;
uni.getProvider({
service: 'oauth',
success: function(res) {
console.log('qq', res) //weixin
if (~res.provider.indexOf('qq')) {
success: (res) => {
if (type == 1) {
uni.login({
provider: 'qq',
success: function(loginRes) {
console.log(loginRes)
this.getApplogin(loginRes)
vm.$HTTP({
method: 'GET',
baseURL: 'https://graph.qq.com/user/get_user_info',
url: '',
data: {
openid: loginRes.authResult.openid,
access_token: loginRes.authResult.access_token,
appid: '101884160'
},
load: true
}).then((data) => {
console.log(data)
}, (err) => {
console.log(err)
});
success: (qqres) => {
console.log(qqres);
uni.getUserInfo({
provider: 'qq',
success: (data) => {
console.log(data);
this.$u.api.qqLogin({
member_qqopenid: data.userInfo.openId,
member_nickname: data.userInfo.nickName,
member_avatar: data.userInfo.avatarUrl,
}).then(res => {
console.log(res.errCode);
if (res.errCode == 0) {
this.loginIn(res.data.token);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
})
}
})
}
})
},
fail: (e) => {
console.log(e);
}
});
} else {
console.log("错误")
uni.login({
provider: 'weixin',
success: (wxres) => {
console.log(wxres);
uni.getUserInfo({
provider: 'weixin',
success: (data) => {
console.log(data);
this.$u.api.wechatLogin({
member_wxopenid: data.userInfo.openId,
member_nickname: data.userInfo.nickName,
member_avatar: data.userInfo.avatarUrl,
}).then(res => {
console.log(res);
if (res.errCode == 0) {
this.loginIn(res.data.token);
this.show = false;
uni.switchTab({
url: "../../pages/index/index"
})
}
})
}
})
},
fail: (e) => {
console.log(e);
}
});
}
},
fail: (e) => {
console.log(e);
}
});
},
@ -242,10 +293,6 @@
url: '/pageA/register/register'
});
},
//
getApplogin() {
console.log("11")
},
// checkbox
checkboxChange(e) {
//console.log(e);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -97,7 +97,7 @@ export default {
return false;
}
if(!this.$u.test.mobile(this.phone)) {
this.$u.toast('请填写正确的新手机号');
this.$u.toast('请正确填写手机号');
return false;
}
if(this.$u.test.isEmpty(this.address)) {
@ -116,6 +116,10 @@ export default {
this.$u.toast('预约时间错误');
return false;
}
if(this.number > this.goodsInfo.goods_storage) {
this.$u.toast('库存不足');
return false;
}
return true;
},
chooseDate(e) {
@ -134,9 +138,17 @@ export default {
store_id: this.store.store_id,
appointment_time: new Date(this.time),
}).then(res => {
this.$u.toast(res.message);
if (res.errCode == 0) {
// 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() {
const goods = this.orderInfo.store_goods_total;
console.log(this.freight);
// console.log(this.freight);
const freight = this.freight;
let price = 0;
//

View File

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

View File

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

View File

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

View File

@ -1,78 +1,173 @@
<template>
<view class="comment">
<view class="main-container">
<textarea @blur="bindTextAreaBlur" auto-height placeholder="发表你的评价吧,收货时心情如何?" maxlength="200" />
<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>
</u-upload>
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
<CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView>
</view>
</view>
<view class="rate">
<view>
<view class="order-rate">
<view class="rate">
<view class="title">物流评分</view>
<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 class="title">服务态度</view>
<u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</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="addOrderEvaluate">发表意见</view>
<view class="write-btn" @click="submitComment">发表意见</view>
</view>
</template>
<script>
import CommentView from './commentItem';
import common from '@/static/js/common.js'
export default {
data() {
return {
orderId: '',
count: 4, //
logistics: 5,
service: 5,
describe: 5,
content: '',
count: 3, //
logistics: 0, //
service: 0, //
describe: [],
content: [],
imageList: [], //
goodsList: [],
uploadImageList: [], // 线
}
},
components: {
CommentView
},
onLoad(option) {
this.orderId = option.oid;
this.getOrderInfo(option.oid);
},
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() {
if(this.$u.test.isEmpty(this.content)) {
this.$u.toast('内容不可为空');
return false;
}
this.goodsList.forEach((_, index) => {
if(this.$u.test.isEmpty(this.content[index])) {
this.$u.toast('内容不可为空');
return false;
}
})
return true;
},
submitComment() {
// console.log(this.content);
// console.log(this.describe);
// console.log(this.imageList);
this.uploadImage();
// this.goodsList.forEach((_, index) => {
// })
},
addOrderEvaluate() {
if(!this.verifyParams()) return false;
// console.log(this.logistics);
// console.log(this.service);
// console.log(this.describe);
this.$u.api.updateOrderEvaluate({
let files = [];
// console.log(this.uploadImageList);
this.uploadImageList.forEach((item, index) => {
files[index] = '';
// console.log(item);
item.forEach((img, idx) => {
if(idx < item.length-1) {
files[index] += img + ',';
} else {
files[index] += img;
}
})
})
let params = {
id: this.orderId,
content: this.content,
scores_one: this.logistics,
scores_two: this.service,
scores_three: this.describe,
file: '', //
}).then(res => {
file: files,
};
console.log(params);
this.$u.api.updateOrderEvaluate(params).then(res => {
this.$u.toast(res.message);
})
},
bindTextAreaBlur(event) {
this.content = event.detail.value;
}
},
};
</script>
@ -81,30 +176,62 @@ export default {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
.main-container {
background-color: #ffffff;
padding: 30rpx;
margin-bottom: 10rpx;
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;
.goods-comment {
background-color: #ffffff;
padding: 30rpx;
margin-bottom: 30rpx;
.goods-info {
display: flex;
margin-bottom: 40rpx;
> image {
width: 113rpx;
height: 106rpx;
border-radius: 5rpx;
margin-right: 20rpx;
background-color: antiquewhite;
}
.goods-text {
.goods-name {
width: 530rpx;
font-size: 28rpx;
color: rgba(0,0,51,1);
margin-bottom: 20rpx;
}
.goods-spec {
max-width: 300rpx;
box-sizing: content-box;
padding: 10rpx 15rpx;
font-size: 24rpx;
color: rgba(153,153,153,1);
background:rgba(236,236,236,1);
border-radius: 6rpx;
display: inline-block;
}
}
}
textarea {
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 {
background-color: #ffffff;
padding: 33rpx 30rpx;
> view {
// background-color: #ffffff;
// padding: 33rpx 30rpx;
// > view {
display: flex;
&:not(:last-child) {
margin-bottom: 35rpx;
@ -114,7 +241,11 @@ export default {
font-size: 28rpx;
color: rgba(51,51,51,1);
}
}
// }
}
.order-rate {
background-color: #ffffff;
padding: 33rpx 30rpx;
}
.write-btn {
margin: 120rpx auto 0;

View File

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

View File

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

View File

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

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

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

View File

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

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

View File

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

View File

@ -1,33 +1,37 @@
<template>
<view class="index">
<view class="top">
<view class="sosuo"></view>
<view class="tabs">
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
<view>
<view class="status_bar"></view>
<view class="index">
<navigator url="/pageB/photo/index?id=28">qqq</navigator>
<view class="top">
<view class="sosuo"></view>
<view class="tabs">
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
'background-color':'#FF780F',
'bottom':'10rpx'
}"
inactive-color="#333" :active-item-style="{
inactive-color="#333" :active-item-style="{
'color':'#333'
}" :bold="false"
@change="dianji"></u-tabs>
@change="dianji"></u-tabs>
</view>
<view class="sosuo"></view>
</view>
<view class="sosuo"></view>
</view>
<swiper class="card" @change="dianji" :current="num">
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box">
<!-- <indexad style="width:690rpx"></indexad> -->
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
<view class="list">
<view>
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem>
</view>
<view style="margin-left:20rpx">
<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem>
<swiper class="card" @change="dianji" :current="num">
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box">
<!-- <indexad style="width:690rpx"></indexad> -->
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
<view class="list">
<view>
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem>
</view>
<view style="margin-left:20rpx">
<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem>
</view>
</view>
</view>
</view>
@ -45,44 +49,44 @@
<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>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box">
<view class="tuijian">
<view class="title" @click="toSearchPage" >
<view class="left">
<view></view>
<text>推荐达人</text>
</scroll-view>
</swiper-item>
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box">
<view class="tuijian">
<view class="title" @click="toSearchPage">
<view class="left">
<view></view>
<text>推荐达人</text>
</view>
<image class="right" src="/static/image/common/1.png"></image>
</view>
<image class="right" src="/static/image/common/1.png"></image>
</view>
<view class="tuijianlist">
<!-- <darenItem style="margin-right:23rpx"></darenItem>
<view class="tuijianlist">
<!-- <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 class="list">
<view>
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
:item="item" @getArticlelist="getArticlelist"></videoItem>
</view>
<view style="margin-left:20rpx">
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
:item="item" @getArticlelist="getArticlelist"></videoItem>
</view>
</view>
</view>
<view class="list">
<view>
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
:item="item" @getArticlelist="getArticlelist"></videoItem>
</view>
<view style="margin-left:20rpx">
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
:item="item" @getArticlelist="getArticlelist"></videoItem>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</template>
@ -203,7 +207,7 @@
recommendList: [], //
indexImageSwiper: [],
zhiboImageSwiper: [],
tabLiveLists:[]
tabLiveLists: []
}
},
components: {
@ -219,9 +223,12 @@
this.getZhiBoSwiper();
this.tabLiveList();
},
onPullDownRefresh() {
// this.getManicureList({ load: 'reload' });
},
methods: {
tabLiveList(){
this.$u.api.tabLiveList().then((res)=>{
tabLiveList() {
this.$u.api.tabLiveList().then((res) => {
console.log(res)
this.tabLiveLists = res.data
})
@ -233,12 +240,12 @@
}
})
},
changeType(member_id){
changeType(member_id) {
console.log(member_id);
this.$emit("pChangeType")
this.$u.api.attentionMember({
member_id: member_id
}).then((res)=>{
}).then((res) => {
console.log(res)
this.getRecommendList();
})
@ -263,7 +270,7 @@
page: this.page,
is_video_img: 0, // 1 2 0
}).then(res => {
console.log('37647744ghj',res)
console.log('37647744ghj', res)
if (res.errCode == 0) {
this.articleList = res.data.list;
}
@ -278,10 +285,10 @@
})
},
toSearchPage() {
console.log("22");
uni.navigateTo({
url: '/pageB/follow/index'
});
console.log("22");
uni.navigateTo({
url: '/pageB/follow/index'
});
},
clickFImage(index) {
const item = this.indexImageSwiper[index];

View File

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

View File

@ -1,305 +1,347 @@
<template>
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
<view class="top">
<image src="/static/image/shop/1.png" class="local"></image>
<view class="add" @click="chooseArea=true">
<text class="u-line-1">{{ area }}</text>
<image src="/static/image/shop/2.png"></image>
</view>
<view @click="sousuo">
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
</view>
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
</view>
<view class="swiper-image">
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
</view>
<view class="chengnuo">
<view>
<image src="/static/image/shop/4.png"></image>
<text>免费洗衣</text>
</view>
<view>
<image src="/static/image/shop/5.png"></image>
<text>全国包邮</text>
</view>
<view>
<image src="/static/image/shop/6.png"></image>
<text>延误必赔</text>
</view>
<view>
<image src="/static/image/shop/7.png"></image>
<text>上门取件</text>
</view>
</view>
<view class="fenlei">
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
</view>
<!-- 秒杀 -->
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
<!-- 秒杀列表 -->
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
<!-- 拼团推荐 -->
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
<!-- 拼团列表 -->
<group></group>
<view class="activity-view">
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
</view>
<youhq></youhq>
<list ref="recommendGoods"></list>
<view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image>
</view>
<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker>
</scroll-view>
<view>
<view class="status_bar"></view>
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
<view class="top">
<image src="/static/image/shop/1.png" class="local"></image>
<view class="add" @click="chooseArea=true">
<text class="u-line-1">{{ area }}</text>
<image src="/static/image/shop/2.png"></image>
</view>
<view @click="sousuo">
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
</view>
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
</view>
<view class="swiper-image">
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
</view>
<view class="chengnuo">
<view>
<image src="/static/image/shop/4.png"></image>
<text>免费洗衣</text>
</view>
<view>
<image src="/static/image/shop/5.png"></image>
<text>全国包邮</text>
</view>
<view>
<image src="/static/image/shop/6.png"></image>
<text>延误必赔</text>
</view>
<view>
<image src="/static/image/shop/7.png"></image>
<text>上门取件</text>
</view>
</view>
<view class="fenlei">
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
</view>
<!-- 秒杀 -->
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
<!-- 秒杀列表 -->
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
<!-- 拼团推荐 -->
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
<!-- 拼团列表 -->
<group></group>
<view class="activity-view">
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
</view>
<youhq></youhq>
<list ref="recommendGoods"></list>
<view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image>
</view>
<u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
</scroll-view>
</view>
</template>
<script>
import shopitem from "@/components/shop/shop-item/index";
import recommend from "@/components/shop/recommend/index";
import pintuan from "@/components/shop/recommend/pintuan";
import seckill from "@/components/shop/seckill/index";
import group from "@/components/shop/group/index";
import youhq from "@/components/shop/youhq/index";
import list from "@/components/shop/list/index";
export default {
name: "shop",
components: {
shopitem,
recommend,
seckill,
group,
youhq,
list,
pintuan
},
data() {
return {
area: "请选择",
chooseArea: false,
areaParams: {
province: true,
city: true,
area: false
import shopitem from "@/components/shop/shop-item/index";
import recommend from "@/components/shop/recommend/index";
import pintuan from "@/components/shop/recommend/pintuan";
import seckill from "@/components/shop/seckill/index";
import group from "@/components/shop/group/index";
import youhq from "@/components/shop/youhq/index";
import list from "@/components/shop/list/index";
export default {
name: "shop",
components: {
shopitem,
recommend,
seckill,
group,
youhq,
list,
pintuan
},
data() {
return {
area: "请选择",
chooseArea: false,
keyword: "",
list: [],
goodsClassify: [], //
// classifyList: [],
recommendedSpike: {}, //
spikeList: [], //
seckillTime: {}, //
// couponGroupList: [], //
pinTuanPush: {}, //
activityInfo: {},
areaList: [], //
}
},
onLoad() {
this.getShopTopList();
this.getLocation(); //
this.getStoreActivity();
// this.area = uni.getStorageSync("address") || "";
},
onShow() {
this.getRecommendedSpike();
this.getSpikeList();
this.getPinTuanPush();
this.getAllLoaction(); //
},
methods: {
sousuo() {
// console.log(123)
this.$u.route({
url: "pageB/search/index"
})
},
keyword: "",
list: [],
goodsClassify: [], //
// classifyList: [],
recommendedSpike: {}, //
spikeList: [], //
seckillTime: {}, //
// couponGroupList: [], //
pinTuanPush: {}, //
activityInfo: {},
}
},
onLoad() {
this.getShopTopList();
},
onShow() {
this.getRecommendedSpike();
this.getSpikeList();
this.getPinTuanPush();
this.getStoreActivity();
},
methods: {
sousuo() {
// console.log(123)
this.$u.route({
url:"pageB/search/index"
})
},
getShopTopList() {
this.$u.api.getShopTopList().then((res)=>{
if (res.errCode == 0) {
let temp = [];
res.data.banner.forEach(item => {
temp.push({
image: item.adv_code,
adv_link: item.adv_link,
adv_id: item.adv_id,
})
})
this.list = temp;
this.goodsClassify = res.data.goodsclass;
}
})
},
getRecommendedSpike() {
this.$u.api.recommendedSpike().then(res => {
if(res.errCode == 0) this.recommendedSpike = res.data;
// console.log(this.recommendedSpike);
})
},
//
getPinTuanPush() {
this.$u.api.getPinTuanPush().then(res => {
if(res.errCode == 0) {
this.pinTuanPush = res.data;
}
})
},
//
getSpikeList() {
this.$u.api.getSpikeList({ page: 0 }).then(res => {
if(res.errCode == 0) {
this.spikeList = res.data.list;
this.seckillTime = {
bigHour: res.data.bigHour,
littleHour: res.data.littleHour,
//
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() {
this.$u.api.getShopTopList().then((res) => {
if (res.errCode == 0) {
let temp = [];
res.data.banner.forEach(item => {
temp.push({
image: item.adv_code,
adv_link: item.adv_link,
adv_id: item.adv_id,
})
})
this.list = temp;
this.goodsClassify = res.data.goodsclass;
}
})
},
getRecommendedSpike() {
this.$u.api.recommendedSpike().then(res => {
if (res.errCode == 0) this.recommendedSpike = res.data;
// console.log(this.recommendedSpike);
})
},
//
getPinTuanPush() {
this.$u.api.getPinTuanPush().then(res => {
if (res.errCode == 0) {
this.pinTuanPush = res.data;
}
})
},
//
getSpikeList() {
this.$u.api.getSpikeList({
page: 0
}).then(res => {
if (res.errCode == 0) {
this.spikeList = res.data.list;
this.seckillTime = {
bigHour: res.data.bigHour,
littleHour: res.data.littleHour,
}
}
})
},
clickImage(index) {
console.log(index);
console.log(this.list[index]);
},
//
onreachBottom() {
this.$refs.recommendGoods.loadMore();
},
setArea(e) {
console.log(e);
this.area = this.areaList[e[0]].area_name;
},
toCartPage() {
uni.navigateTo({
url: '/pageC/cart/index'
});
},
toClassifyPage() {
uni.navigateTo({
url: '/pageC/classify/index'
});
},
getStoreActivity() {
this.$u.api.getStoreActivity().then(res => {
if(res.errCode == 0) {
this.activityInfo = res.data;
}
})
},
activityLink({ type, id }) {
if(type == 0 || type == 2) return false;
// type 1 , 2
const url = type == 1 ? 'pageB/sdetails/index' : '';
let params = { id: id };
// type: 1 // 1 2 3 4
if(type == 1) Object.assign(params, { type: 1 });
this.$u.route({
url: url,
params: params
})
},
},
clickImage(index) {
console.log(index);
console.log(this.list[index]);
},
//
onreachBottom() {
this.$refs.recommendGoods.loadMore();
},
setArea(e) {
// console.log(e);
this.area = e.city.label;
},
toCartPage() {
uni.navigateTo({
url: '/pageC/cart/index'
});
},
toClassifyPage() {
uni.navigateTo({
url: '/pageC/classify/index'
});
},
getStoreActivity() {
this.$u.api.getStoreActivity().then(res => {
if(res.errCode == 0) {
this.activityInfo = res.data;
}
})
},
activityLink({ type, id }) {
if(type == 0 || type == 2) return false;
// type 1 , 2
const url = type == 1 ? 'pageB/sdetails/index' : '';
let params = { id: id };
// type: 1 // 1 2 3 4
if(type == 1) Object.assign(params, { type: 1 });
this.$u.route({
url: url,
params: params
})
},
},
}
}
</script>
<style lang="scss" scoped>
.shop {
height: calc(100vh - var(--window-top));
box-sizing: border-box;
background-color: #F0EDF1;
.top {
padding: 0 30rpx;
background-color: #ffffff;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
.local{
width: 31rpx;
height: 37rpx;
}
}
.swiper-image {
background-color: #ffffff;
padding: 0 30rpx;
}
.add {
width: 115rpx;
height: 25rpx;
display: flex;
font-size: 26rpx;
color: #333;
justify-content: space-between;
align-items: center;
margin-left: 14rpx;
margin-right: 37rpx;
> text {
width: 80rpx;
}
> image {
width: 24rpx;
height: 15rpx;
}
}
.mnue {
background-color: #ffffff;
width: 35rpx;
height: 26rpx;
margin-left: 36rpx;
}
.chengnuo {
padding: 30rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
> view {
display: flex;
align-items: center;
> image {
width: 23rpx;
height: 23rpx;
}
> text {
font-size: 22rpx;
color: #999;
margin-left: 8rpx;
}
}
}
.fenlei {
padding: 30rpx;
background-color: #ffffff;
display: flex;
flex-wrap: wrap;
margin-bottom: 20rpx;
> view {
margin-bottom: 30rpx;
&:not(:nth-child(5n)) {
margin-right: 70rpx;
.shop {
height: calc(100vh - var(--window-top));
box-sizing: border-box;
background-color: #F0EDF1;
.top {
padding: 0 30rpx;
background-color: #ffffff;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
.local {
width: 31rpx;
height: 37rpx;
}
}
}
.activity-view {
padding: 20rpx 30rpx;
text-align: center;
.lingquan {
background-color: #ececec;
width: 688rpx;
height: 138rpx;
.swiper-image {
background-color: #ffffff;
padding: 0 30rpx;
}
.add {
width: 115rpx;
height: 25rpx;
display: flex;
font-size: 26rpx;
color: #333;
justify-content: space-between;
align-items: center;
margin-left: 14rpx;
margin-right: 37rpx;
>text {
width: 80rpx;
}
>image {
width: 24rpx;
height: 15rpx;
}
}
.mnue {
background-color: #ffffff;
width: 35rpx;
height: 26rpx;
margin-left: 36rpx;
}
.chengnuo {
padding: 30rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
>view {
display: flex;
align-items: center;
>image {
width: 23rpx;
height: 23rpx;
}
>text {
font-size: 22rpx;
color: #999;
margin-left: 8rpx;
}
}
}
.fenlei {
padding: 30rpx;
background-color: #ffffff;
display: flex;
flex-wrap: wrap;
margin-bottom: 20rpx;
>view {
margin-bottom: 30rpx;
&:not(:nth-child(5n)) {
margin-right: 70rpx;
}
}
}
.activity-view {
padding: 20rpx 30rpx;
text-align: center;
.lingquan {
background-color: #ececec;
width: 688rpx;
height: 138rpx;
}
}
.cart {
z-index: 9;
position: fixed;
right: 30rpx;
bottom: 300rpx;
width: 100rpx;
height: 100rpx;
background: rgba(253, 211, 96, 1);
box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253, 211, 96, 0.34);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
>image {
width: 56rpx;
height: 54rpx;
}
}
}
.cart {
z-index: 9;
position: fixed;
right: 30rpx;
bottom: 300rpx;
width: 100rpx;
height: 100rpx;
background: rgba(253, 211, 96, 1);
box-shadow: 0rpx 10rpx 6rpx 0rpx rgba(253,211,96,0.34);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
> image {
width: 56rpx;
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>
<view class="userlist" :style="{'top': top + 10 * rpx}">
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}"></image>
<image class="userlistitem" v-for="(i,j) in [0,1,2]" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
</view>
<view class="hot" :style="{'top': top + 10 * rpx}">
<text class="hottext">2.8w</text>
@ -52,7 +52,7 @@
</div> -->
</div>
<list class="list">
<cell class="item" v-for="(i,j) in list" @click="xuanzhong(j)">
<cell class="item" v-for="(i,j) in list" :key="j" @click="xuanzhong(j)">
<image class="shopimg" :src="i.goods_image"></image>
<div class="infos">
<div>

BIN
static/fonts/cart.ttf Normal file

Binary file not shown.

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B