Merge pull request '6.24' (#34) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/34
This commit is contained in:
		
						commit
						3112cf2a9f
					
				@ -1,6 +1,10 @@
 | 
			
		||||
export default {
 | 
			
		||||
    init(vm){
 | 
			
		||||
        return {
 | 
			
		||||
			// 获取商城首页信息(顶部轮播图与商品分类)
 | 
			
		||||
			getShopTopList(){
 | 
			
		||||
                return vm.$u.post('Shop/getShopTopList');
 | 
			
		||||
			},
 | 
			
		||||
			// 商品推荐
 | 
			
		||||
            getGoodsRecommend({page}){
 | 
			
		||||
                return vm.$u.post('Goods/getGoodsRecommend', {
 | 
			
		||||
@ -10,7 +14,11 @@ export default {
 | 
			
		||||
			// 购物车商品列表
 | 
			
		||||
			getCartList() {
 | 
			
		||||
				return vm.$u.post('cart/cartList');
 | 
			
		||||
			}
 | 
			
		||||
			},
 | 
			
		||||
			// 购物车商品列表(树结构)
 | 
			
		||||
			getCartTreeList() {
 | 
			
		||||
				return vm.$u.post('cart/cartTreeList');
 | 
			
		||||
			},
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
@ -160,10 +160,24 @@ export default {
 | 
			
		||||
					time: time
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 会员服务-积分数
 | 
			
		||||
			getMemberPointsStat() {
 | 
			
		||||
				return vm.$u.post('member/memberPointsStat');
 | 
			
		||||
			},
 | 
			
		||||
			// 会员服务-积分列表
 | 
			
		||||
			getPointslogList() {
 | 
			
		||||
				return vm.$u.post('member/pointslogList');
 | 
			
		||||
			},
 | 
			
		||||
			// 商品收藏列表
 | 
			
		||||
			getGoodsFavoritesList() {
 | 
			
		||||
				return vm.$u.post('Member/getFavoritesList');
 | 
			
		||||
			},
 | 
			
		||||
			// 店铺收藏列表
 | 
			
		||||
			getStoreFavoritesList({ type }) {
 | 
			
		||||
				return vm.$u.post('Member/getFavoritesList', {
 | 
			
		||||
					type: type
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -58,13 +58,13 @@ export default {
 | 
			
		||||
		this.getAreaData();
 | 
			
		||||
	},
 | 
			
		||||
	created() {
 | 
			
		||||
		// console.log(this.info);
 | 
			
		||||
		console.log(typeof this.info);
 | 
			
		||||
		this.initAddressInfo();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 判断是不是编辑页面 数据初始化
 | 
			
		||||
		initAddressInfo() {
 | 
			
		||||
			if(JSON.stringify(this.info) != '{}') {
 | 
			
		||||
			if(this.info) {
 | 
			
		||||
				[this.name, this.phone, this.address, this.area, this.area_id, this.city_id] = [
 | 
			
		||||
					this.info.address_realname,
 | 
			
		||||
					this.info.address_mob_phone,
 | 
			
		||||
@ -78,7 +78,7 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		// 判断是不是编辑页面 调用接口
 | 
			
		||||
		confirmBtn() {
 | 
			
		||||
			JSON.stringify(this.info) != '{}' ? this.editAddress() : this.addAddress();
 | 
			
		||||
			this.info ? this.editAddress() : this.addAddress();
 | 
			
		||||
		},
 | 
			
		||||
		// 验证
 | 
			
		||||
		validateValue() {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="article-list">
 | 
			
		||||
		<u-empty text="数据为空" mode="data" color="#000000" img-width="240" margin-top="300" v-if="!articleList.length"></u-empty>
 | 
			
		||||
		<view v-for="(item, index) in articleList" :key="index" class="list-item" @click="toDetailsPage(item)">
 | 
			
		||||
			<view>{{ item.help_title }}</view>
 | 
			
		||||
			<image src="@/pageE/static/mine/21.png"></image>
 | 
			
		||||
@ -20,7 +21,6 @@ export default {
 | 
			
		||||
				type: 'navigateTo',
 | 
			
		||||
				url: '/pageE/mine/ArticleDetails',
 | 
			
		||||
				params: {
 | 
			
		||||
					title: item.help_title,
 | 
			
		||||
					id: item.help_id
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
@ -32,6 +32,7 @@ export default {
 | 
			
		||||
.article-list {
 | 
			
		||||
	min-height: calc(100vh - var(--window-top));
 | 
			
		||||
	background-color: #ECECEC;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	.list-item {
 | 
			
		||||
		display: flex;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="collection-item">
 | 
			
		||||
		<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
 | 
			
		||||
		<u-swipe-action
 | 
			
		||||
			v-for="(item, index) in list" :key="index" 
 | 
			
		||||
			:index='index'
 | 
			
		||||
@ -43,7 +44,6 @@ export default {
 | 
			
		||||
					show: false,
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			btnWidth: 152,
 | 
			
		||||
			show: false,
 | 
			
		||||
			options: [
 | 
			
		||||
				{
 | 
			
		||||
@ -55,7 +55,18 @@ export default {
 | 
			
		||||
			]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getGoodsFavoritesList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getGoodsFavoritesList() {
 | 
			
		||||
			this.$u.api.getGoodsFavoritesList().then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		click(index) {
 | 
			
		||||
			this.list.splice(index, 1);
 | 
			
		||||
			this.$u.toast(`删除了第${index+1}个cell`);
 | 
			
		||||
 | 
			
		||||
@ -48,8 +48,14 @@ export default {
 | 
			
		||||
			status: '编辑',
 | 
			
		||||
			list: [
 | 
			
		||||
				{
 | 
			
		||||
					// 店铺信息
 | 
			
		||||
					member_id: 1,
 | 
			
		||||
					store_id: 1,
 | 
			
		||||
					store_name: "官方自营店铺",
 | 
			
		||||
					// 店铺下的商品列表
 | 
			
		||||
					goods: [
 | 
			
		||||
						{
 | 
			
		||||
							// 商品信息
 | 
			
		||||
							checked: false
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
@ -74,14 +80,21 @@ export default {
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {
 | 
			
		||||
		this.getCartList();
 | 
			
		||||
		// this.getCartList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getCartList() {
 | 
			
		||||
			this.$u.api.getCartList().then((res)=>{
 | 
			
		||||
			this.$u.api.getCartTreeList().then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					console.log(res);
 | 
			
		||||
					
 | 
			
		||||
					let cartList = []
 | 
			
		||||
					this.list = res.data.store_cart_list;
 | 
			
		||||
					// Object.assign(this, { checked });
 | 
			
		||||
					this.list.forEach(store => {
 | 
			
		||||
						store
 | 
			
		||||
						store.forEach(goods => {
 | 
			
		||||
 | 
			
		||||
						})
 | 
			
		||||
					})
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
@ -7,12 +7,11 @@
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			nodes: `<p>13268748568645634nfdhf dfvjdfjgdfl vdufhnh1</p>123346<h1>das</h1><h1>das</h1><h1>das1</h1><h2>das2</h2><h3>das3</h3>`
 | 
			
		||||
			nodes: '',
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onLoad(option) {
 | 
			
		||||
		console.log(option);
 | 
			
		||||
		this.setTitle(option.title);
 | 
			
		||||
		// console.log(option);
 | 
			
		||||
		this.getUseHelpInfo(option.id);
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
@ -21,6 +20,7 @@ export default {
 | 
			
		||||
				title: title
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		// 处理富文本
 | 
			
		||||
		unescapeHTML (temp){
 | 
			
		||||
			temp = "" + temp;
 | 
			
		||||
			return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
 | 
			
		||||
@ -29,7 +29,6 @@ export default {
 | 
			
		||||
			this.$u.api.getUseHelpInfo({
 | 
			
		||||
			    launch_id: id,
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				// console.log(res)
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.nodes = this.unescapeHTML(res.data.info[0].help_info);
 | 
			
		||||
					this.setTitle(res.data.info[0].help_title);
 | 
			
		||||
 | 
			
		||||
@ -9,11 +9,11 @@
 | 
			
		||||
					<view class="integral-top">
 | 
			
		||||
						<view>
 | 
			
		||||
							<view class="title">总积分</view>
 | 
			
		||||
							<view class="value">999</view>
 | 
			
		||||
							<view class="value">{{ memberInfo.member_points }}</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view>
 | 
			
		||||
							<view class="title">经验值</view>
 | 
			
		||||
							<view class="value">999</view>
 | 
			
		||||
							<view class="value">{{ memberInfo.member_exppoints }}</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view>
 | 
			
		||||
							<view class="title">预计进度</view>
 | 
			
		||||
@ -71,10 +71,12 @@ export default {
 | 
			
		||||
			current: 0,
 | 
			
		||||
			swiperCurrent: 0,
 | 
			
		||||
			nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>',
 | 
			
		||||
			pointslogList: []
 | 
			
		||||
			pointslogList: [],
 | 
			
		||||
			memberInfo: {}
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	onShow() {
 | 
			
		||||
		this.getMemberPointsStat();
 | 
			
		||||
		this.getPointslogList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
@ -86,6 +88,13 @@ export default {
 | 
			
		||||
			this.swiperCurrent = current;
 | 
			
		||||
			this.current = current;
 | 
			
		||||
		},
 | 
			
		||||
		getMemberPointsStat() {
 | 
			
		||||
			this.$u.api.getMemberPointsStat().then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.memberInfo = res.data;
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		getPointslogList() {
 | 
			
		||||
			this.$u.api.getPointslogList().then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="store">
 | 
			
		||||
		<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
 | 
			
		||||
		<u-swipe-action
 | 
			
		||||
			v-for="(item, index) in list" :key="index" 
 | 
			
		||||
			:index='index'
 | 
			
		||||
@ -26,21 +27,7 @@
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			list: [
 | 
			
		||||
				{
 | 
			
		||||
					id: 1,
 | 
			
		||||
					show: false
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					id: 2,
 | 
			
		||||
					show: false
 | 
			
		||||
				},
 | 
			
		||||
				{
 | 
			
		||||
					id: 3,
 | 
			
		||||
					show: false,
 | 
			
		||||
				}
 | 
			
		||||
			],
 | 
			
		||||
			btnWidth: 152,
 | 
			
		||||
			list: [],
 | 
			
		||||
			show: false,
 | 
			
		||||
			options: [
 | 
			
		||||
				{
 | 
			
		||||
@ -52,7 +39,19 @@ export default {
 | 
			
		||||
			]
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	mounted() {
 | 
			
		||||
		this.getStoreFavoritesList();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getStoreFavoritesList() {
 | 
			
		||||
			this.$u.api.getStoreFavoritesList({
 | 
			
		||||
				type: 2 // 固定值
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		click(index) {
 | 
			
		||||
			this.list.splice(index, 1);
 | 
			
		||||
			this.$u.toast(`删除了第${index+1}个cell`);
 | 
			
		||||
@ -70,6 +69,9 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.store {
 | 
			
		||||
	min-height: calc(100vh - var(--window-top));
 | 
			
		||||
	background-color: #ECECEC;
 | 
			
		||||
	padding-top: 1rpx;
 | 
			
		||||
	.item {
 | 
			
		||||
		padding: 30rpx;
 | 
			
		||||
		display: flex;
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view class="address">
 | 
			
		||||
		<u-radio-group v-model="current" @change="changeDefault" size="29" active-color="#FF780F">
 | 
			
		||||
			<u-empty text="暂无收货地址" mode="address" color="#000000" img-width="120" margin-top="300" v-if="!addressList.length"></u-empty>
 | 
			
		||||
			<view v-for="(item, index) in addressList" :key="index" class="address-item">
 | 
			
		||||
				<AddressItem :item="item" :current='current' @getAddressList="getAddressList"></AddressItem>
 | 
			
		||||
			</view>
 | 
			
		||||
@ -14,7 +15,7 @@ import AddressItem from '@/components/mine/address-block/address-item'
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			current: -1,
 | 
			
		||||
			current: -1, // radio 标记
 | 
			
		||||
			addressList: []
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
@ -46,7 +47,7 @@ export default {
 | 
			
		||||
			// console.log(id)
 | 
			
		||||
			this.$u.api.setDefaultAddress({
 | 
			
		||||
				address_id: id
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.getAddressList();
 | 
			
		||||
				} else {
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,6 @@ export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			page: 1,
 | 
			
		||||
			type: '售后政策',
 | 
			
		||||
			policyList: []
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,8 @@
 | 
			
		||||
		<swiper :current="swiperCurrent" @animationfinish="animationfinish">
 | 
			
		||||
			<swiper-item class="swiper-item">
 | 
			
		||||
				<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
 | 
			
		||||
					<view>
 | 
			
		||||
					<u-empty text="订单为空" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
 | 
			
		||||
					<view v-else>
 | 
			
		||||
						<view v-for="(item, index) in orderList" :key="index" class="order-item">
 | 
			
		||||
							<view class="order-title">
 | 
			
		||||
								<view class="order-text">订单</view>
 | 
			
		||||
@ -46,7 +47,13 @@ export default {
 | 
			
		||||
	onShow() {
 | 
			
		||||
		this.current = 0;
 | 
			
		||||
		this.swiperCurrent = 0;
 | 
			
		||||
		this.getManicureList();
 | 
			
		||||
		this.getManicureList().then(order => {
 | 
			
		||||
			// console.log(order);
 | 
			
		||||
			
 | 
			
		||||
			this.orderList = this.orderList.concat(order);
 | 
			
		||||
			// console.log(this.orderList);
 | 
			
		||||
			
 | 
			
		||||
		});
 | 
			
		||||
	},
 | 
			
		||||
	filters: {
 | 
			
		||||
		dateFormat(value) {
 | 
			
		||||
@ -59,26 +66,27 @@ export default {
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		getManicureList() {
 | 
			
		||||
			this.$u.api.getManicureList({
 | 
			
		||||
		async getManicureList() {
 | 
			
		||||
			let res = await this.$u.api.getManicureList({
 | 
			
		||||
				page: this.page
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.orderList = res.data.list;
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
			if (res.errCode == 0) {
 | 
			
		||||
				return res.data.list;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		reachBottom() {
 | 
			
		||||
			// console.log(this.page);
 | 
			
		||||
			if(this.page >= 3) return;
 | 
			
		||||
			// 修改当前的 loadStatus
 | 
			
		||||
			console.log(this.loadStatus);
 | 
			
		||||
			this.loadStatus.splice(this.current, 1, "loading");
 | 
			
		||||
			this.loadStatus = "loading";
 | 
			
		||||
			this.page++;
 | 
			
		||||
			setTimeout(() => {
 | 
			
		||||
				this.orderList += 5;
 | 
			
		||||
				this.loadStatus.splice(this.current, 1, "nomore");
 | 
			
		||||
			}, 1200);
 | 
			
		||||
			this.getManicureList().then(order => {
 | 
			
		||||
				if (!order.length) {
 | 
			
		||||
					// 如果没有数据page-1
 | 
			
		||||
					this.page--;
 | 
			
		||||
					this.loadStatus = "nomore";
 | 
			
		||||
				} else {
 | 
			
		||||
					this.orderList = this.orderList.concat(order);
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		tabsChange(index) {
 | 
			
		||||
			this.swiperCurrent = index;
 | 
			
		||||
 | 
			
		||||
@ -55,8 +55,15 @@ export default {
 | 
			
		||||
				name: this.name,
 | 
			
		||||
				time: new Date(this.time)
 | 
			
		||||
			}).then((res)=>{
 | 
			
		||||
				let type = res.errCode == 0 ? 'success' : 'error';
 | 
			
		||||
				this.showToast(res.message, type);
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.$refs.uToast.show({
 | 
			
		||||
						title: res.message,
 | 
			
		||||
						type: 'success',
 | 
			
		||||
						url: '/pageE/tool/Manicure'
 | 
			
		||||
					})
 | 
			
		||||
				} else {
 | 
			
		||||
					this.showToast(res.message, 'error');
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		chooseDate(e) {
 | 
			
		||||
 | 
			
		||||
@ -95,10 +95,16 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
	},
 | 
			
		||||
	onLoad() {
 | 
			
		||||
		console.log(this.$u.http)
 | 
			
		||||
		// this.getShopTopList();
 | 
			
		||||
		this.getGoodsRecommend();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
		// getShopTopList() {
 | 
			
		||||
		// 	this.$u.api.getShopTopList().then((res)=>{
 | 
			
		||||
		// 		if (res.errCode == 0) {
 | 
			
		||||
		// 		}
 | 
			
		||||
		// 	})
 | 
			
		||||
		// },
 | 
			
		||||
		getGoodsRecommend() {
 | 
			
		||||
			this.$u.api.getGoodsRecommend({
 | 
			
		||||
				page: 1,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user