功能完善
BIN
docs/2.11 汇融云链.zip
Normal file
31
docs/xiugai/20230211/20230211.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
1.团购已经添加商品但不能在“拼团特价”里显示
|
||||||
|
2.优惠券不能使用
|
||||||
|
3.“精选标签”和“卖家中心”里面的功能没有调整
|
||||||
|
4.点击“卖家中心”一直在请稍候的状态
|
||||||
|
5.“物业管理”里“小区列表”没有添加功能,编辑信息时不能保存字段,同时地图不能选点,增加一个上传图片功能如产品图片。
|
||||||
|
6.“农村社区”里的“社区列表”改为“农村社区列表”,列表显示村名、地址、电话,去掉均价。上面去掉“楼房”搜索项。
|
||||||
|
7.“社区主页”变更为村名,“社区活动”变更为“社区公告”,去掉“费用管理”,“社区服务”改为“限时抢购”,“社区拍卖”改为“农机租赁”,农机租赁可先做成文章形式的,以发布信息方式体现。下方放“社区团购”、“社区特供”分别对应首页的“拼团特价”、“区域商品”、“积分兑换”。
|
||||||
|
|
||||||
|
3.“精选标签”和“卖家中心”里面的功能没有调整 (郭兴)
|
||||||
|
应该怎么调整?
|
||||||
|
|
||||||
|
4.点击“精选标签”一直在请稍候的状态 (郭兴)
|
||||||
|
这三个接口需要调整
|
||||||
|
orderStatic: 'home/orderStatic', // 订单统计
|
||||||
|
goodsStatic: 'home/goodsStatic', // 商品统计
|
||||||
|
userStatic: 'home/userStatic', //会员统计
|
||||||
|
bannerList: 'sms/SmsHomeAdvertise/list', // 首页banner
|
||||||
|
|
||||||
|
6.“农村社区”里的“社区列表”改为“农村社区列表”,(完成)
|
||||||
|
|
||||||
|
列表显示村名、地址、电话,去掉均价。 列表显示字段 需要接口调整
|
||||||
|
communityList: 'single/build/communityList', // 所有社区和房间
|
||||||
|
nearCommunityList: 'single/build/near/communityList', // 周边社区
|
||||||
|
|
||||||
|
上面去掉“楼房”搜索项。 (完成)
|
||||||
|
|
||||||
|
7.“社区主页”变更为村名,“社区活动”变更为“社区公告”,去掉“费用管理”,“社区服务”改为“限时抢购”,“社区拍卖”改为“农机租赁”,(完成)
|
||||||
|
|
||||||
|
农机租赁可先做成文章形式的,以发布信息方式体现。(不理解需求)
|
||||||
|
|
||||||
|
下方放“社区团购”、“社区特供”分别对应首页的“拼团特价”、“区域商品”、“积分兑换”。(不理解需求,俩个对应三个??)
|
||||||
@@ -18,9 +18,11 @@ spring.redis.pool.min-idle=0
|
|||||||
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
|
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
|
||||||
spring.redis.timeout=0
|
spring.redis.timeout=0
|
||||||
#===redis end===
|
#===redis end===
|
||||||
spring.datasource.url=jdbc:mysql://localhost:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
#spring.datasource.url=jdbc:mysql://localhost:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
|
spring.datasource.url=jdbc:mysql://8.130.39.13:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=root
|
#spring.datasource.password=root
|
||||||
|
spring.datasource.password=1LAiGz$t1*Iw
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
spring.datasource.druid.initialSize=5
|
spring.datasource.druid.initialSize=5
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ aliyun.oss.bucketName=yxt-sc
|
|||||||
aliyun.oss.policy.expire=300
|
aliyun.oss.policy.expire=300
|
||||||
aliyun.oss.maxSize=10
|
aliyun.oss.maxSize=10
|
||||||
#aliyun.oss.callback=http://39.104.100.138:8085/aliyun/oss/callback
|
#aliyun.oss.callback=http://39.104.100.138:8085/aliyun/oss/callback
|
||||||
|
aliyun.oss.callback=https://mall.yyundong.com/adminapi/aliyun/oss/callback
|
||||||
|
|
||||||
|
|
||||||
aliyun.oss.dir.prefix=
|
aliyun.oss.dir.prefix=
|
||||||
#===OSS end===
|
#===OSS end===
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ public class ConstansValue {
|
|||||||
|
|
||||||
public static final String sampleSubjectList = "id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, read_count, comment_count, album_pics, description, show_status, forward_count, category_name, area_id, school_id, member_id, area_name, school_name, reward, member_name, video_src, type";
|
public static final String sampleSubjectList = "id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, read_count, comment_count, album_pics, description, show_status, forward_count, category_name, area_id, school_id, member_id, area_name, school_name, reward, member_name, video_src, type";
|
||||||
|
|
||||||
public static final String sampleCommunityList = "id, company_id, name, pic, price,wuyecompany,wuyefei,latitude,longitude,create_time ";
|
public static final String sampleCommunityList = "id, company_id, name, pic, price, details,wuyecompany,wuyefei,latitude,longitude,create_time ";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#spring.datasource.url=jdbc:mysql://39.104.142.92:3306/mallplus?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
spring.datasource.url=jdbc:mysql://8.130.39.13:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/mallplus1?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=root
|
spring.datasource.password=1LAiGz$t1*Iw
|
||||||
|
#spring.datasource.password=root
|
||||||
#spring.datasource.url=jdbc:mysql://39.104.142.92:3306/mallplus?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
#spring.datasource.url=jdbc:mysql://39.104.142.92:3306/mallplus?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||||
#spring.datasource.username=root
|
#spring.datasource.username=root
|
||||||
#spring.datasource.password=123456
|
#spring.datasource.password=123456
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
spring.jackson.time-zone=GMT+8
|
spring.jackson.time-zone=GMT+8
|
||||||
#\u9ED8\u8BA4\u4E3A\u5F00\u53D1\u73AF\u5883
|
#\u9ED8\u8BA4\u4E3A\u5F00\u53D1\u73AF\u5883
|
||||||
spring.profiles.active=test
|
spring.profiles.active=test
|
||||||
|
#spring.profiles.active=dev
|
||||||
#===server start===
|
#===server start===
|
||||||
server.port=8083
|
server.port=8083
|
||||||
#===server end===
|
#===server end===
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import store from '../store/index';
|
import store from '../store/index';
|
||||||
export default {
|
export default {
|
||||||
// qq 237524947 wx15d4269d3210863d
|
// qq 237524947 wx15d4269d3210863d
|
||||||
//BASEURI: 'http://localhost:8083/api/',
|
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||||
BASEURI: 'http://127.0.0.1:8083/api/',
|
// BASEURI: 'http://www.yyundong.com:8083/api/',
|
||||||
ADMINURI: 'http://127.0.0.1:8085/',
|
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||||
ESURI: 'http://127.0.0.1:8081/',
|
ESURI: 'http://www.yyundong.com:8081/',
|
||||||
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
h5Appid: 'wxb4660f37187c0b8e', // h5微信登录的appId 暂时测试用
|
||||||
source: 1, //1 weixinApplet 2 h5Source 3 pcSource 4 android 5ios
|
source: 1, //1 weixinApplet 2 h5Source 3 pcSource 4 android 5ios
|
||||||
es: {
|
es: {
|
||||||
@@ -52,8 +52,8 @@ export default {
|
|||||||
shopDetail: 'single/store/shopDetail', // 门店详情
|
shopDetail: 'single/store/shopDetail', // 门店详情
|
||||||
storeClassList: 'single/store/storeClass/list', // 商户内部分类
|
storeClassList: 'single/store/storeClass/list', // 商户内部分类
|
||||||
storeCommentList: 'single/store/storeComment/list', // 商户评论
|
storeCommentList: 'single/store/storeComment/list', // 商户评论
|
||||||
noticeList: 'single/home/notice/list',
|
noticeList: 'single/home/notice/list',
|
||||||
noticeDetail: 'single/home/notice/detail',
|
noticeDetail: 'single/home/notice/detail',
|
||||||
},
|
},
|
||||||
member: {
|
member: {
|
||||||
applyMember: 'single/user/applyMember', // 会员升级等级
|
applyMember: 'single/user/applyMember', // 会员升级等级
|
||||||
@@ -74,9 +74,9 @@ export default {
|
|||||||
storeDetail1: 'single/store/detail1', // 商户详情 带用户
|
storeDetail1: 'single/store/detail1', // 商户详情 带用户
|
||||||
store: 'single/store/home', // 商户主页
|
store: 'single/store/home', // 商户主页
|
||||||
storeList: 'single/store/store/list', // 商户列表
|
storeList: 'single/store/store/list', // 商户列表
|
||||||
memberTagList: 'single/user/memberTag/list', // 商户列表
|
memberTagList: 'single/user/memberTag/list', // 商户列表
|
||||||
addStoreComment: 'single/store/addStoreComment', // 商户addStoreComment
|
addStoreComment: 'single/store/addStoreComment', // 商户addStoreComment
|
||||||
memberBlanceLogList: 'single/user/memberBlanceLog/list',
|
memberBlanceLogList: 'single/user/memberBlanceLog/list',
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
goods: {
|
goods: {
|
||||||
tagGoodsList: 'single/pms/tag/goods', // 查询标签商品
|
tagGoodsList: 'single/pms/tag/goods', // 查询标签商品
|
||||||
goodsPromoto: 'single/sms/detail', // 单个商品的优惠详情
|
goodsPromoto: 'single/sms/detail', // 单个商品的优惠详情
|
||||||
secskillDetail: 'single/pms/secskill/detail', // 查询秒杀商品详情信息
|
secskillDetail: 'single/pms/secskill/detail', // 查询秒杀商品详情信息
|
||||||
groupGoodsDetail: 'single/pms/goodsGroup/detail', // 查询拼团商品详情信息
|
groupGoodsDetail: 'single/pms/goodsGroup/detail', // 查询拼团商品详情信息
|
||||||
@@ -258,6 +258,7 @@ export default {
|
|||||||
|
|
||||||
let token = uni.getStorageSync('token') || '';
|
let token = uni.getStorageSync('token') || '';
|
||||||
let fullurl = this.BASEURI + endpoint;
|
let fullurl = this.BASEURI + endpoint;
|
||||||
|
console.log("fullurl",fullurl);
|
||||||
var contentType = 'application/x-www-form-urlencoded';
|
var contentType = 'application/x-www-form-urlencoded';
|
||||||
|
|
||||||
data.authorization = token;
|
data.authorization = token;
|
||||||
@@ -272,11 +273,6 @@ export default {
|
|||||||
// 'authorization1': Authorization || ''
|
// 'authorization1': Authorization || ''
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('fullurl,',fullurl)
|
|
||||||
console.log('data,',data)
|
|
||||||
console.log('token,',token)
|
|
||||||
console.log('error,',error)
|
|
||||||
console.log('res,',res)
|
|
||||||
if (load) {
|
if (load) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
@@ -311,9 +307,10 @@ export default {
|
|||||||
console.log(fullurl);
|
console.log(fullurl);
|
||||||
console.log(res.data.data);
|
console.log(res.data.data);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
|
console.log("===>>>");
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
} else {
|
} else {
|
||||||
|
console.log(">>>>>=");
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
if (!res.data.msg) {
|
if (!res.data.msg) {
|
||||||
res.data.msg = res.data.data;
|
res.data.msg = res.data.data;
|
||||||
|
|||||||
@@ -1,93 +1,190 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="coupon-item">
|
<view class="coupon-item">
|
||||||
<view class="coupon-money">
|
<view class="coupon-money">
|
||||||
<view class="nick" ></view>
|
<view class="nick">{{item.name}}</view>
|
||||||
<view class="layof" :style="{color:theme}">¥{{item.amount}}</view>
|
<view class="layof" :style="{color:theme}">¥{{item.amount}}</view>
|
||||||
<view class="end_time">{{item.endTime | formatCreateTime}}前使用</view>
|
<view class="end_time">{{item.endTime | formatCreateTime}}前使用</view>
|
||||||
<view >
|
<view>
|
||||||
<view class="demand">满{{ item.minPoint }} 减 {{ item.amount }}</view>
|
<view class="demand">满{{ item.minPoint }} 减 {{ item.amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="get-btn" v-if="!types" :style="{color:color, borderColor:color, background:solid}" @click="acceptCoupon(item)" >立即领取</view>
|
<view class="get-btn" v-if="!types" :style="{color:color, borderColor:color, background:solid}"
|
||||||
<navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}" :url='item.url' @click="acceptCoupon(item)">立即使用</navigator>
|
@click="acceptCoupon(item)">立即领取</view>
|
||||||
</view>
|
<navigator class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}"
|
||||||
|
:url='item.url' @click="useCoupon(item)">立即使用</navigator>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import { formatDate } from '@/common/date';
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
types: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
theme: {
|
||||||
|
type: String,
|
||||||
|
default: '#ff9000'
|
||||||
|
},
|
||||||
|
solid: {
|
||||||
|
type: String,
|
||||||
|
default: '#ffffff'
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: '#ff9000'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
formatCreateTime(time) {
|
||||||
|
let date = new Date(time);
|
||||||
|
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async acceptCoupon(item) {
|
||||||
|
this.types =!this.types
|
||||||
|
uni.showLoading({
|
||||||
|
title: '请稍后'
|
||||||
|
});
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
couponId: item.id
|
||||||
|
};
|
||||||
|
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
||||||
|
console.log(data);
|
||||||
|
if (data) {
|
||||||
|
this.$api.msg(data);
|
||||||
|
}
|
||||||
|
uni.hideLoading();
|
||||||
|
|
||||||
|
},
|
||||||
|
async useCoupon(item){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '请稍后'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
props:{
|
|
||||||
item:{
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
types:{
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
theme:{
|
|
||||||
type: String,
|
|
||||||
default: '#ff9000'
|
|
||||||
},
|
|
||||||
solid:{
|
|
||||||
type: String,
|
|
||||||
default: '#ffffff'
|
|
||||||
},
|
|
||||||
color:{
|
|
||||||
type: String,
|
|
||||||
default: '#ff9000'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
formatCreateTime(time) {
|
|
||||||
let date = new Date(time);
|
|
||||||
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async acceptCoupon(item){
|
|
||||||
uni.showLoading({
|
|
||||||
title: '请稍后'
|
|
||||||
});
|
|
||||||
|
|
||||||
let params = { couponId: item.id };
|
|
||||||
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
|
||||||
console.log(data);
|
|
||||||
if (data) {
|
|
||||||
this.$api.msg(data);
|
|
||||||
}
|
|
||||||
uni.hideLoading();
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.coupon-item {
|
.coupon-item {
|
||||||
width:100%; height:auto; display:table; border-radius:10upx; padding:0 20upx; margin-top:22upx; border:1px solid #eeeeee; position:relative;
|
width: 100%;
|
||||||
.coupon-money {
|
height: auto;
|
||||||
width:465upx; height:auto; display:table; float:left; padding:26upx 0; border-style:none dotted none none; border-color:#eeeeee;
|
display: table;
|
||||||
|
border-radius: 10upx;
|
||||||
|
padding: 0 20upx;
|
||||||
|
margin-top: 22upx;
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.nick { width:100%; height:50upx; line-height:30upx; font-size:$font-sm; color:$font-color-999; }
|
.coupon-money {
|
||||||
.tit { width:100%; height:50upx; line-height:50upx; font-size:$font-sm; color:$font-color-999; }
|
width: 465upx;
|
||||||
.demand { width:100%; height:30upx; line-height:30upx; font-size:$font-sm; color:$font-color-999; }
|
height: auto;
|
||||||
|
display: table;
|
||||||
|
float: left;
|
||||||
|
padding: 26upx 0;
|
||||||
|
border-style: none dotted none none;
|
||||||
|
border-color: #eeeeee;
|
||||||
|
|
||||||
.layof { width:100%; height:48upx; line-height:30upx; font-size:44upx; color:#ff9000; font-weight:bold; }
|
.nick {
|
||||||
.end_time { width:100%; height:30upx; line-height:30upx; font-size:$font-sm; color:$font-color-999; }
|
width: 100%;
|
||||||
|
height: 50upx;
|
||||||
|
line-height: 30upx;
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
width: 100%;
|
||||||
|
height: 50upx;
|
||||||
|
line-height: 50upx;
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demand {
|
||||||
|
width: 100%;
|
||||||
|
height: 30upx;
|
||||||
|
line-height: 30upx;
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layof {
|
||||||
|
width: 100%;
|
||||||
|
height: 48upx;
|
||||||
|
line-height: 30upx;
|
||||||
|
font-size: 44upx;
|
||||||
|
color: #ff9000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.end_time {
|
||||||
|
width: 100%;
|
||||||
|
height: 30upx;
|
||||||
|
line-height: 30upx;
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.get-btn {
|
||||||
|
width: 146upx;
|
||||||
|
height: 52upx;
|
||||||
|
line-height: 50upx;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 26upx;
|
||||||
|
margin-top: -26upx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 60upx;
|
||||||
|
color: #ff9000;
|
||||||
|
border: 1px solid #ff9000;
|
||||||
|
font-size: $font-sm;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.coupon-item:after {
|
||||||
|
width: 40upx;
|
||||||
|
height: 20upx;
|
||||||
|
position: absolute;
|
||||||
|
left: 460upx;
|
||||||
|
top: -1px;
|
||||||
|
border-radius: 0 0 40upx 40upx;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
background: $bgcolor_white;
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
|
border-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.coupon-item:before {
|
||||||
|
width: 40upx;
|
||||||
|
height: 20upx;
|
||||||
|
position: absolute;
|
||||||
|
left: 460upx;
|
||||||
|
bottom: -1px;
|
||||||
|
border-radius: 40upx 40upx 0 0;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
background: $bgcolor_white;
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
|
border-bottom: 0px;
|
||||||
}
|
}
|
||||||
.get-btn { width:146upx; height:52upx; line-height:50upx; position:absolute; top:50%; right:26upx; margin-top:-26upx; text-align:center; border-radius:60upx; color:#ff9000; border:1px solid #ff9000; font-size:$font-sm; float:right; }
|
|
||||||
}
|
|
||||||
.coupon-item:after { width:40upx; height:20upx; position:absolute; left:460upx; top:-1px; border-radius:0 0 40upx 40upx; content:""; display:block; background:$bgcolor_white; border:1px solid #eeeeee; border-top:0px; }
|
|
||||||
.coupon-item:before { width:40upx; height:20upx; position:absolute; left:460upx; bottom:-1px; border-radius:40upx 40upx 0 0; content:""; display:block; background:$bgcolor_white; border:1px solid #eeeeee; border-bottom:0px; }
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
71
mallplusui-uniapp-app/components/likes/likes.vue
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<view class="icons" @click.stop="likeTab">
|
||||||
|
<uni-icons size="20" color="#f07373" :type="like?'heart-filled':'heart'" ></uni-icons>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props:{
|
||||||
|
item:{
|
||||||
|
type:Object,
|
||||||
|
default(){
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
types:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
item(newVal){
|
||||||
|
this.like = this.item.is_like
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.like = this.item.is_like
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
like:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
likeTab(){
|
||||||
|
this.like = !this.like;
|
||||||
|
this.updateLikes();
|
||||||
|
},
|
||||||
|
updateLikes(){
|
||||||
|
uni.showLoading();
|
||||||
|
this.$api.update_likes({
|
||||||
|
user_id:'5f3d11c03d11c60001141e5f',
|
||||||
|
article_id:this.item._id
|
||||||
|
}).then(res=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
console.log(res);
|
||||||
|
uni.showToast({
|
||||||
|
title:this.like?"收藏成功":"取消收藏",
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
uni.$emit('update_article',this.types)
|
||||||
|
}).catch(()=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.icons {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -21,6 +21,10 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.cpr{
|
.cpr{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
justify-self: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24upx;
|
font-size: 24upx;
|
||||||
margin: 20upx 0;
|
margin: 20upx 0;
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseUrl = "http://localhost:7001/";
|
// baseUrl = "http://localhost:7001/";
|
||||||
// socketUrl = "ws://localhost:8001/";
|
// socketUrl = "ws://localhost:8001/";
|
||||||
// baseUrl = "http://26077a35f5.wicp.vip:43609/";
|
// baseUrl = "http://26077a35f5.wicp.vip:43609/";
|
||||||
baseUrl = "http://192.168.3.108:8083/";
|
baseUrl = "http://www.yyundong.com:8083/";
|
||||||
socketUrl = "ws://192.168.3.108:8083/";
|
socketUrl = "ws://8192.168.43.195:8083/";
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
// 生产环境
|
// 生产环境
|
||||||
baseUrl = "http://192.168.3.108:8083/";
|
baseUrl = "http://www.yyundong.com:8083/";
|
||||||
// baseUrl = "http://192.168.43.195:8083/";
|
// baseUrl = "http://192.168.43.195:8083/";
|
||||||
socketUrl = "ws://192.168.3.108:8083/";
|
socketUrl = "ws://192.168.43.195:8083/";
|
||||||
}
|
}
|
||||||
const courtConfig = {
|
const courtConfig = {
|
||||||
//微信公众号APPID
|
//微信公众号APPID
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "宇运动商城",
|
"name" : "汇融云链",
|
||||||
"appid" : "__UNI__0802E33",
|
"appid" : "__UNI__FB2C9C4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.0.0.0",
|
"versionName" : "4.0.0.0",
|
||||||
"versionCode" : 4000,
|
"versionCode" : 4000,
|
||||||
@@ -55,7 +55,9 @@
|
|||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ios" : {},
|
"ios" : {
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"oauth" : {
|
"oauth" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
"pages": [{
|
"pages": [{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
// #ifdef MP
|
|
||||||
"navigationBarTitleText": "mallcloud商城",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
|
// #ifdef MP
|
||||||
|
"navigationBarTitleText": "汇融云链",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
"searchInput": {
|
"searchInput": {
|
||||||
"backgroundColor": "rgba(231, 231, 231,.7)",
|
"backgroundColor": "rgba(231, 231, 231,.7)",
|
||||||
"borderRadius": "16px",
|
"borderRadius": "16px",
|
||||||
"placeholder": "请输入地址 如:大钟寺",
|
"placeholder": "请输入要查询的信息",
|
||||||
"disabled": true,
|
"disabled": true,
|
||||||
"placeholderColor": "#606266"
|
"placeholderColor": "#606266"
|
||||||
},
|
},
|
||||||
@@ -59,7 +60,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
"path": "pages/index/lease",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "农机租赁"
|
||||||
|
// "app-plus": {
|
||||||
|
// "titleNView": {
|
||||||
|
// "type": "transparent"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}, {
|
||||||
"path": "pages/order/orderDetail",
|
"path": "pages/order/orderDetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "详情展示",
|
"navigationBarTitleText": "详情展示",
|
||||||
@@ -80,7 +91,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/set/set",
|
"path": "pages/set/set",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设置"
|
"navigationBarTitleText": "设置"
|
||||||
@@ -96,13 +107,13 @@
|
|||||||
"path": "pages/index/nearbyBusiness",
|
"path": "pages/index/nearbyBusiness",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "附近商家"
|
"navigationBarTitleText": "附近商家"
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
,
|
,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/cart/cart",
|
"path": "pages/cart/cart",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "购物车"
|
"navigationBarTitleText": "购物车"
|
||||||
@@ -178,12 +189,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的订单",
|
"navigationBarTitleText": "我的订单",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"onReachBottomDistance":126 ,//距离底部多远时触发 单位px
|
"onReachBottomDistance": 126, //距离底部多远时触发 单位px
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "pages/order/createOrder",
|
"path": "pages/order/createOrder",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "创建订单"
|
"navigationBarTitleText": "创建订单"
|
||||||
@@ -209,7 +220,7 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "支付成功"
|
"navigationBarTitleText": "支付成功"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/category/category",
|
"path": "pages/category/category",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "分类",
|
"navigationBarTitleText": "分类",
|
||||||
@@ -231,7 +242,7 @@
|
|||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/order/payment/index",
|
"path": "pages/order/payment/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -249,7 +260,7 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "支付结果"
|
"navigationBarTitleText": "支付结果"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/integral/home/home",
|
"path": "pages/integral/home/home",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的积分"
|
"navigationBarTitleText": "我的积分"
|
||||||
@@ -266,11 +277,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [{
|
||||||
{
|
|
||||||
"root": "pagesC",
|
"root": "pagesC",
|
||||||
"pages": [
|
"pages": [{
|
||||||
{
|
|
||||||
"path": "store/list",
|
"path": "store/list",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
@@ -291,7 +300,7 @@
|
|||||||
"navigationBarTitleText": "商户入驻"
|
"navigationBarTitleText": "商户入驻"
|
||||||
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "store/businessDetails",
|
"path": "store/businessDetails",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "店铺详情展示",
|
"navigationBarTitleText": "店铺详情展示",
|
||||||
@@ -345,12 +354,13 @@
|
|||||||
{
|
{
|
||||||
"path": "seller/index",
|
"path": "seller/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "卖家中心",
|
"navigationBarTitleText": "卖家中心"
|
||||||
"app-plus": {
|
// "navigationStyle": "custom"
|
||||||
"titleNView": {
|
// "app-plus": {
|
||||||
"type": "transparent"
|
// "titleNView": {
|
||||||
}
|
// "type": "transparent"
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -449,8 +459,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"root": "pagesA",
|
"root": "pagesA",
|
||||||
"pages": [
|
"pages": [{
|
||||||
{
|
|
||||||
"path": "product/categoryAttr",
|
"path": "product/categoryAttr",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "类型商品",
|
"navigationBarTitleText": "类型商品",
|
||||||
@@ -475,12 +484,12 @@
|
|||||||
{
|
{
|
||||||
"path": "product/tag",
|
"path": "product/tag",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "精选标签",
|
"navigationBarTitleText": "精选标签"
|
||||||
"app-plus": {
|
// "app-plus": {
|
||||||
"titleNView": {
|
// "titleNView": {
|
||||||
"type": "transparent"
|
// "type": "transparent"
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -570,12 +579,12 @@
|
|||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "商品列表"
|
"navigationBarTitleText": "商品列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path" : "build/repairOrder/repairOrder",
|
"path": "build/repairOrder/repairOrder",
|
||||||
"style" : {
|
"style": {
|
||||||
"navigationBarTitleText": "维修录单"
|
"navigationBarTitleText": "维修录单"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -597,7 +606,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "build/communityList",
|
"path": "build/communityList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "社区列表"
|
"navigationBarTitleText": "农村社区列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -663,15 +672,15 @@
|
|||||||
"path": "user/inviteList",
|
"path": "user/inviteList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "邀请好友"
|
"navigationBarTitleText": "邀请好友"
|
||||||
|
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "user/inviteMoney",
|
"path": "user/inviteMoney",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "邀请好友佣金"
|
"navigationBarTitleText": "邀请好友佣金"
|
||||||
|
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "user/balance",
|
"path": "user/balance",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的钱包"
|
"navigationBarTitleText": "我的钱包"
|
||||||
@@ -724,13 +733,13 @@
|
|||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "user/profile",
|
"path": "user/profile",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "个人信息"
|
"navigationBarTitleText": "个人信息"
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "user/applyMember",
|
"path": "user/applyMember",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "升级会员",
|
"navigationBarTitleText": "升级会员",
|
||||||
@@ -740,12 +749,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "notice/notice",
|
"path": "notice/notice",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "通知"
|
"navigationBarTitleText": "通知"
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
"path": "notice/subjectList",
|
"path": "notice/subjectList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "秒杀列表",
|
"navigationBarTitleText": "秒杀列表",
|
||||||
@@ -802,12 +811,12 @@
|
|||||||
"selectedIconPath": "static/tab-cate-current.png",
|
"selectedIconPath": "static/tab-cate-current.png",
|
||||||
"text": "分类"
|
"text": "分类"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/index/nearbyBusiness",
|
"pagePath": "pages/index/nearbyBusiness",
|
||||||
"iconPath": "static/fujin.png",
|
"iconPath": "static/fujin.png",
|
||||||
"selectedIconPath": "static/fujin_.png",
|
"selectedIconPath": "static/fujin_.png",
|
||||||
"text": "附近商家"
|
"text": "附近商家"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/cart/cart",
|
"pagePath": "pages/cart/cart",
|
||||||
"iconPath": "static/tab-cart.png",
|
"iconPath": "static/tab-cart.png",
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
|
<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
|
||||||
<view v-if="hasLogin" class="empty-tips">
|
<view v-if="hasLogin" class="empty-tips">
|
||||||
空空如也
|
空空如也
|
||||||
<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
|
<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛>
|
||||||
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="empty-tips">
|
<view v-else class="empty-tips">
|
||||||
空空如也
|
空空如也
|
||||||
@@ -21,21 +22,18 @@
|
|||||||
<block v-for="(item, index) in cartList" :key="item.id">
|
<block v-for="(item, index) in cartList" :key="item.id">
|
||||||
<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
|
<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
|
||||||
<view class="image-wrapper">
|
<view class="image-wrapper">
|
||||||
<image
|
<image :src="item.productPic" class="loaded" mode="aspectFill" lazy-load
|
||||||
:src="item.productPic"
|
@load="onImageLoad('cartList', index)" @error="onImageError('cartList', index)"></image>
|
||||||
class="loaded"
|
<view class="yticon icon-xuanzhong2 checkbox"
|
||||||
mode="aspectFill"
|
:class="{ checked: item.checked === '1' || item.checked }"
|
||||||
lazy-load
|
@click="check('item', index)"></view>
|
||||||
@load="onImageLoad('cartList', index)"
|
|
||||||
@error="onImageError('cartList', index)"
|
|
||||||
></image>
|
|
||||||
<view class="yticon icon-xuanzhong2 checkbox" :class="{ checked: item.checked === '1' || item.checked }" @click="check('item', index)"></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
<text class="clamp title">{{ item.productName }}</text>
|
<text class="clamp title">{{ item.productName }}</text>
|
||||||
<text class="attr">{{ item.productAttr }}</text>
|
<text class="attr">{{ item.productAttr }}</text>
|
||||||
<text class="price">¥{{ item.price }}</text>
|
<text class="price">¥{{ item.price }}</text>
|
||||||
<uni-number-box class="step" :min="1" :value="item.quantity" :isMin="item.quantity === 1" :index="index" @eventChange="numberChange"></uni-number-box>
|
<uni-number-box class="step" :min="1" :value="item.quantity" :isMin="item.quantity === 1"
|
||||||
|
:index="index" @eventChange="numberChange"></uni-number-box>
|
||||||
</view>
|
</view>
|
||||||
<text class="del-btn yticon icon-fork" @click="deleteCartItem(index)"></text>
|
<text class="del-btn yticon icon-fork" @click="deleteCartItem(index)"></text>
|
||||||
</view>
|
</view>
|
||||||
@@ -45,7 +43,8 @@
|
|||||||
<!-- 底部菜单栏 -->
|
<!-- 底部菜单栏 -->
|
||||||
<view class="action-section">
|
<view class="action-section">
|
||||||
<view class="checkbox">
|
<view class="checkbox">
|
||||||
<image :src="allChecked ? '/static/selected.png' : '/static/select.png'" mode="aspectFit" @click="check('all')"></image>
|
<image :src="allChecked ? '/static/selected.png' : '/static/select.png'" mode="aspectFit"
|
||||||
|
@click="check('all')"></image>
|
||||||
<view class="clear-btn" :class="{ show: allChecked }" @click="clearCart">清空</view>
|
<view class="clear-btn" :class="{ show: allChecked }" @click="clearCart">清空</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="total-box">
|
<view class="total-box">
|
||||||
@@ -60,360 +59,391 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import { mapState } from 'vuex';
|
import {
|
||||||
import uniNumberBox from '@/components/uni-number-box.vue';
|
mapState
|
||||||
import navBar from '@/components/zhouWei-navBar';
|
} from 'vuex';
|
||||||
export default {
|
import uniNumberBox from '@/components/uni-number-box.vue';
|
||||||
components: {
|
import navBar from '@/components/zhouWei-navBar';
|
||||||
uniNumberBox,
|
export default {
|
||||||
navBar,
|
components: {
|
||||||
mallplusCopyright
|
uniNumberBox,
|
||||||
},
|
navBar,
|
||||||
data() {
|
mallplusCopyright
|
||||||
return {
|
},
|
||||||
total: 0, //总价格
|
data() {
|
||||||
allChecked: false, //全选状态 true|false
|
return {
|
||||||
empty: false, //空白页现实 true|false
|
total: 0, //总价格
|
||||||
promoteAmount: 0,
|
allChecked: false, //全选状态 true|false
|
||||||
cartList: [],
|
empty: false, //空白页现实 true|false
|
||||||
|
promoteAmount: 0,
|
||||||
|
cartList: [],
|
||||||
|
|
||||||
statusBarHeight: ''
|
statusBarHeight: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
async onShow() {
|
async onShow() {
|
||||||
if (this.hasLogin) {
|
if (this.hasLogin) {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}
|
|
||||||
},
|
|
||||||
async onLoad() {
|
|
||||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
//显示空白页
|
|
||||||
cartList(e) {
|
|
||||||
let empty = e.length === 0 ? true : false;
|
|
||||||
if (this.empty !== empty) {
|
|
||||||
this.empty = empty;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(['hasLogin', 'userInfo'])
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//请求数据
|
|
||||||
async loadData() {
|
|
||||||
let params = {};
|
|
||||||
let list = await Api.apiCall('get', Api.order.cartList, params);
|
|
||||||
// let list = await this.$api.json('cartList');
|
|
||||||
let cartList = list.cartItemList.map(item => {
|
|
||||||
item.checked = '1';
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
this.cartList = cartList;
|
|
||||||
this.promoteAmount = list.promoteAmount;
|
|
||||||
this.calcTotal(); //计算总价
|
|
||||||
},
|
},
|
||||||
//监听image加载完成
|
async onLoad() {
|
||||||
onImageLoad(key, index) {
|
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||||
this.$set(this[key][index], 'loaded', 'loaded');
|
|
||||||
},
|
},
|
||||||
//监听image加载失败
|
watch: {
|
||||||
onImageError(key, index) {
|
//显示空白页
|
||||||
this[key][index].image = '/static/errorImage.jpg';
|
cartList(e) {
|
||||||
|
let empty = e.length === 0 ? true : false;
|
||||||
|
if (this.empty !== empty) {
|
||||||
|
this.empty = empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
navToLogin() {
|
computed: {
|
||||||
uni.navigateTo({
|
...mapState(['hasLogin', 'userInfo'])
|
||||||
url: '/pages/public/login'
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//选中状态处理
|
methods: {
|
||||||
check(type, index) {
|
//请求数据
|
||||||
if (type === 'item') {
|
async loadData() {
|
||||||
this.cartList[index].checked = !this.cartList[index].checked;
|
let params = {};
|
||||||
} else {
|
let list = await Api.apiCall('get', Api.order.cartList, params);
|
||||||
const checked = !this.allChecked;
|
// let list = await this.$api.json('cartList');
|
||||||
const list = this.cartList;
|
let cartList = list.cartItemList.map(item => {
|
||||||
list.forEach(item => {
|
item.checked = '1';
|
||||||
item.checked = checked;
|
return item;
|
||||||
});
|
});
|
||||||
|
this.cartList = cartList;
|
||||||
|
this.promoteAmount = list.promoteAmount;
|
||||||
|
this.calcTotal(); //计算总价
|
||||||
|
},
|
||||||
|
//监听image加载完成
|
||||||
|
onImageLoad(key, index) {
|
||||||
|
this.$set(this[key][index], 'loaded', 'loaded');
|
||||||
|
},
|
||||||
|
//监听image加载失败
|
||||||
|
onImageError(key, index) {
|
||||||
|
this[key][index].image = '/static/errorImage.jpg';
|
||||||
|
},
|
||||||
|
navToLogin() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/public/login'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//选中状态处理
|
||||||
|
check(type, index) {
|
||||||
|
if (type === 'item') {
|
||||||
|
this.cartList[index].checked = !this.cartList[index].checked;
|
||||||
|
} else {
|
||||||
|
const checked = !this.allChecked;
|
||||||
|
const list = this.cartList;
|
||||||
|
list.forEach(item => {
|
||||||
|
item.checked = checked;
|
||||||
|
});
|
||||||
|
this.allChecked = checked;
|
||||||
|
}
|
||||||
|
this.calcTotal(type);
|
||||||
|
},
|
||||||
|
//数量
|
||||||
|
numberChange(data) {
|
||||||
|
this.cartList[data.index].quantity = data.number;
|
||||||
|
let params = {
|
||||||
|
id: this.cartList[data.index].id,
|
||||||
|
quantity: data.number
|
||||||
|
};
|
||||||
|
data = Api.apiCall('get', Api.order.updateQuantity, params);
|
||||||
|
this.calcTotal();
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
deleteCartItem(index) {
|
||||||
|
var that = this;
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定将此商品移出购物车吗',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let list = that.cartList;
|
||||||
|
let row = list[index];
|
||||||
|
let id = row.id;
|
||||||
|
let params = {
|
||||||
|
cart_id_list: id
|
||||||
|
};
|
||||||
|
Api.apiCall('post', Api.order.deleteCart, params);
|
||||||
|
that.cartList.splice(index, 1);
|
||||||
|
that.calcTotal();
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//清空
|
||||||
|
clearCart() {
|
||||||
|
var that = this;
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定将购物车清空吗',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let params = {};
|
||||||
|
Api.apiCall('post', Api.order.clearCart, params);
|
||||||
|
this.cartList = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//计算总价
|
||||||
|
calcTotal() {
|
||||||
|
let list = this.cartList;
|
||||||
|
if (list.length === 0) {
|
||||||
|
this.empty = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let total = 0;
|
||||||
|
let checked = true;
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.checked === true || item.checked === '1') {
|
||||||
|
total += item.price * item.quantity;
|
||||||
|
} else if (checked === true) {
|
||||||
|
checked = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
total = total - this.promoteAmount;
|
||||||
this.allChecked = checked;
|
this.allChecked = checked;
|
||||||
}
|
this.total = Number(total.toFixed(2));
|
||||||
this.calcTotal(type);
|
},
|
||||||
},
|
//创建订单
|
||||||
//数量
|
createOrder() {
|
||||||
numberChange(data) {
|
let list = this.cartList;
|
||||||
this.cartList[data.index].quantity = data.number;
|
var ids = '';
|
||||||
let params = { id: this.cartList[data.index].id, quantity: data.number };
|
list.forEach(item => {
|
||||||
data = Api.apiCall('get', Api.order.updateQuantity, params);
|
if (item.checked === true || item.checked === '1') {
|
||||||
this.calcTotal();
|
ids = item.id + ',' + ids;
|
||||||
},
|
|
||||||
//删除
|
|
||||||
deleteCartItem(index) {
|
|
||||||
var that = this;
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '确定将此商品移出购物车吗',
|
|
||||||
success: res => {
|
|
||||||
if(res.confirm){
|
|
||||||
let list = that.cartList;
|
|
||||||
let row = list[index];
|
|
||||||
let id = row.id;
|
|
||||||
let params = { cart_id_list: id };
|
|
||||||
Api.apiCall('post', Api.order.deleteCart, params);
|
|
||||||
that.cartList.splice(index, 1);
|
|
||||||
that.calcTotal();
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
});
|
let cartIds = ids.substr(0, ids.length - 1);
|
||||||
},
|
let dataJson = {};
|
||||||
//清空
|
|
||||||
clearCart() {
|
dataJson.type = 2;
|
||||||
var that = this;
|
dataJson.cartIds = cartIds;
|
||||||
uni.showModal({
|
let url = '/pages/order/createStoreOrder?dataJson=' + JSON.stringify(dataJson)
|
||||||
title: '提示',
|
|
||||||
content: '确定将购物车清空吗',
|
uni.navigateTo({
|
||||||
success: res => {
|
url: url
|
||||||
if(res.confirm){
|
});
|
||||||
let params = {};
|
|
||||||
Api.apiCall('post', Api.order.clearCart, params);
|
|
||||||
this.cartList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//计算总价
|
|
||||||
calcTotal() {
|
|
||||||
let list = this.cartList;
|
|
||||||
if (list.length === 0) {
|
|
||||||
this.empty = true;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
let total = 0;
|
|
||||||
let checked = true;
|
|
||||||
list.forEach(item => {
|
|
||||||
if (item.checked === true || item.checked === '1') {
|
|
||||||
total += item.price * item.quantity;
|
|
||||||
} else if (checked === true) {
|
|
||||||
checked = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
total = total - this.promoteAmount;
|
|
||||||
this.allChecked = checked;
|
|
||||||
this.total = Number(total.toFixed(2));
|
|
||||||
},
|
|
||||||
//创建订单
|
|
||||||
createOrder() {
|
|
||||||
let list = this.cartList;
|
|
||||||
var ids = '';
|
|
||||||
list.forEach(item => {
|
|
||||||
if (item.checked === true || item.checked === '1') {
|
|
||||||
ids = item.id + ',' + ids;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let cartIds = ids.substr(0, ids.length - 1);
|
|
||||||
let dataJson ={};
|
|
||||||
|
|
||||||
dataJson.type=2;
|
|
||||||
dataJson.cartIds=cartIds;
|
|
||||||
let url='/pages/order/createStoreOrder?dataJson=' + JSON.stringify(dataJson)
|
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: url
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.container {
|
.container {
|
||||||
padding-bottom: 134upx;
|
padding-bottom: 134upx;
|
||||||
/* 空白页 */
|
|
||||||
.empty {
|
/* 空白页 */
|
||||||
position: fixed;
|
.empty {
|
||||||
left: 0;
|
position: fixed;
|
||||||
top: 0;
|
left: 0;
|
||||||
width: 100%;
|
top: 0;
|
||||||
height: 100vh;
|
width: 100%;
|
||||||
padding-bottom: 100upx;
|
height: 100vh;
|
||||||
display: flex;
|
padding-bottom: 100upx;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
background: #fff;
|
|
||||||
image {
|
|
||||||
width: 240upx;
|
|
||||||
height: 160upx;
|
|
||||||
margin-bottom: 30upx;
|
|
||||||
}
|
|
||||||
.empty-tips {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: $font-sm + 2upx;
|
justify-content: center;
|
||||||
color: $font-color-disabled;
|
flex-direction: column;
|
||||||
.navigator {
|
align-items: center;
|
||||||
color: $uni-color-primary;
|
background: #fff;
|
||||||
margin-left: 16upx;
|
|
||||||
|
image {
|
||||||
|
width: 240upx;
|
||||||
|
height: 160upx;
|
||||||
|
margin-bottom: 30upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-tips {
|
||||||
|
display: flex;
|
||||||
|
font-size: $font-sm + 2upx;
|
||||||
|
color: $font-color-disabled;
|
||||||
|
|
||||||
|
.navigator {
|
||||||
|
color: $uni-color-primary;
|
||||||
|
margin-left: 16upx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/* 购物车列表项 */
|
/* 购物车列表项 */
|
||||||
.cart-item {
|
.cart-item {
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
padding: 30upx 40upx;
|
|
||||||
.image-wrapper {
|
|
||||||
width: 230upx;
|
|
||||||
height: 230upx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
position: relative;
|
|
||||||
image {
|
|
||||||
border-radius: 8upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.checkbox {
|
|
||||||
position: absolute;
|
|
||||||
left: -16upx;
|
|
||||||
top: -16upx;
|
|
||||||
z-index: 8;
|
|
||||||
font-size: 44upx;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 4upx;
|
|
||||||
color: $font-color-disabled;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 50px;
|
|
||||||
}
|
|
||||||
.item-right {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
flex: 1;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 30upx;
|
padding: 30upx 40upx;
|
||||||
.title,
|
|
||||||
.price {
|
.image-wrapper {
|
||||||
font-size: $font-base + 2upx;
|
width: 230upx;
|
||||||
color: $font-color-dark;
|
height: 230upx;
|
||||||
height: 40upx;
|
flex-shrink: 0;
|
||||||
line-height: 40upx;
|
|
||||||
}
|
|
||||||
.attr {
|
|
||||||
font-size: $font-sm + 2upx;
|
|
||||||
color: $font-color-light;
|
|
||||||
height: 50upx;
|
|
||||||
line-height: 50upx;
|
|
||||||
}
|
|
||||||
.price {
|
|
||||||
height: 50upx;
|
|
||||||
line-height: 50upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.del-btn {
|
|
||||||
padding: 4upx 10upx;
|
|
||||||
font-size: 34upx;
|
|
||||||
height: 50upx;
|
|
||||||
color: $font-color-light;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* 底部栏 */
|
|
||||||
.action-section {
|
|
||||||
/* #ifdef H5 */
|
|
||||||
margin-bottom: 100upx;
|
|
||||||
/* #endif */
|
|
||||||
position: fixed;
|
|
||||||
left: 30upx;
|
|
||||||
bottom: 30upx;
|
|
||||||
z-index: 95;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 690upx;
|
|
||||||
height: 100upx;
|
|
||||||
padding: 0 30upx;
|
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.5);
|
|
||||||
border-radius: 16upx;
|
|
||||||
.checkbox {
|
|
||||||
height: 52upx;
|
|
||||||
position: relative;
|
|
||||||
image {
|
|
||||||
width: 52upx;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 5;
|
|
||||||
|
image {
|
||||||
|
border-radius: 8upx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.clear-btn {
|
.checkbox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 26upx;
|
left: -16upx;
|
||||||
top: 0;
|
top: -16upx;
|
||||||
z-index: 4;
|
z-index: 8;
|
||||||
width: 0;
|
font-size: 44upx;
|
||||||
height: 52upx;
|
line-height: 1;
|
||||||
line-height: 52upx;
|
padding: 4upx;
|
||||||
padding-left: 38upx;
|
color: $font-color-disabled;
|
||||||
font-size: $font-base;
|
background: #fff;
|
||||||
color: #fff;
|
border-radius: 50px;
|
||||||
background: $font-color-disabled;
|
|
||||||
border-radius: 0 50px 50px 0;
|
|
||||||
opacity: 0;
|
|
||||||
transition: 0.2s;
|
|
||||||
&.show {
|
|
||||||
opacity: 1;
|
|
||||||
width: 120upx;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.total-box {
|
.item-right {
|
||||||
flex: 1;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
flex: 1;
|
||||||
text-align: right;
|
overflow: hidden;
|
||||||
padding-right: 40upx;
|
position: relative;
|
||||||
.price {
|
padding-left: 30upx;
|
||||||
font-size: $font-lg;
|
|
||||||
color: $font-color-dark;
|
.title,
|
||||||
|
.price {
|
||||||
|
font-size: $font-base + 2upx;
|
||||||
|
color: $font-color-dark;
|
||||||
|
height: 40upx;
|
||||||
|
line-height: 40upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.attr {
|
||||||
|
font-size: $font-sm + 2upx;
|
||||||
|
color: $font-color-light;
|
||||||
|
height: 50upx;
|
||||||
|
line-height: 50upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
height: 50upx;
|
||||||
|
line-height: 50upx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.coupon {
|
|
||||||
font-size: $font-sm;
|
.del-btn {
|
||||||
|
padding: 4upx 10upx;
|
||||||
|
font-size: 34upx;
|
||||||
|
height: 50upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
text {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 底部栏 */
|
||||||
|
.action-section {
|
||||||
|
/* #ifdef H5 */
|
||||||
|
margin-bottom: 100upx;
|
||||||
|
/* #endif */
|
||||||
|
position: fixed;
|
||||||
|
left: 30upx;
|
||||||
|
bottom: 30upx;
|
||||||
|
z-index: 95;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 690upx;
|
||||||
|
height: 100upx;
|
||||||
|
padding: 0 30upx;
|
||||||
|
background: rgba(255, 255, 255, 0.9);
|
||||||
|
box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 16upx;
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
height: 52upx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 52upx;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-btn {
|
||||||
|
position: absolute;
|
||||||
|
left: 26upx;
|
||||||
|
top: 0;
|
||||||
|
z-index: 4;
|
||||||
|
width: 0;
|
||||||
|
height: 52upx;
|
||||||
|
line-height: 52upx;
|
||||||
|
padding-left: 38upx;
|
||||||
|
font-size: $font-base;
|
||||||
|
color: #fff;
|
||||||
|
background: $font-color-disabled;
|
||||||
|
border-radius: 0 50px 50px 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: 0.2s;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
opacity: 1;
|
||||||
|
width: 120upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.total-box {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 40upx;
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: $font-lg;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coupon {
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-light;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: $font-color-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
padding: 0 38upx;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 100px;
|
||||||
|
height: 76upx;
|
||||||
|
line-height: 76upx;
|
||||||
|
font-size: $font-base + 2upx;
|
||||||
|
background: $uni-color-primary;
|
||||||
|
box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.confirm-btn {
|
|
||||||
padding: 0 38upx;
|
/* 复选框选中状态 */
|
||||||
margin: 0;
|
.action-section .checkbox.checked,
|
||||||
border-radius: 100px;
|
.cart-item .checkbox.checked {
|
||||||
height: 76upx;
|
color: $uni-color-primary;
|
||||||
line-height: 76upx;
|
}
|
||||||
font-size: $font-base + 2upx;
|
|
||||||
background: $uni-color-primary;
|
.getPosition {
|
||||||
box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72);
|
height: 100upx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 32upx;
|
||||||
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/* 复选框选中状态 */
|
|
||||||
.action-section .checkbox.checked,
|
|
||||||
.cart-item .checkbox.checked {
|
|
||||||
color: $uni-color-primary;
|
|
||||||
}
|
|
||||||
.getPosition {
|
|
||||||
height: 100upx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 32upx;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
269
mallplusui-uniapp-app/pages/index/lease.vue
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
<template>
|
||||||
|
<view class="home">
|
||||||
|
<view class="home-list">
|
||||||
|
|
||||||
|
<view v-for="(item,index) in tableList" :key="item._id" :item="item">
|
||||||
|
<view @click="open">
|
||||||
|
<!-- 基础卡片 -->
|
||||||
|
<view v-if="item.mode==='base'" class="listcard">
|
||||||
|
<view class="listcard-image">
|
||||||
|
<image :src="item.cover[0]" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content">
|
||||||
|
<view class="listcard-content_title">
|
||||||
|
<text>{{item.title}}</text>
|
||||||
|
<likes :types="types" :item="item"></likes>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content_des">
|
||||||
|
<view class="listcard-content_des-label">
|
||||||
|
<view class="listcard-content_des-label-item">{{item.classify}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content_des-browe">{{item.browse_count}}浏览</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 多图模式 -->
|
||||||
|
<view v-if="item.mode==='column'" class="listcard mode-column">
|
||||||
|
<view class="listcard-content">
|
||||||
|
<view class="listcard-content_title">
|
||||||
|
<text>{{item.title}}</text>
|
||||||
|
<likes :types="types" :item="item"></likes>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-image">
|
||||||
|
<view v-if="index<3" v-for="(item,index) in item.cover" :key="index"
|
||||||
|
class="listcard-image_item">
|
||||||
|
<image :src="item" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content_des">
|
||||||
|
<view class="listcard-content_des-label">
|
||||||
|
<view class="listcard-content_des-label-item">{{item.classify}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content_des-browe">{{item.browse_count}}浏览</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 大图模式 -->
|
||||||
|
<view v-if="item.mode==='image'" class="listcard mode-image">
|
||||||
|
<view class="listcard-image">
|
||||||
|
<image :src="item.cover[0]" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content">
|
||||||
|
<view class="listcard-content_title">
|
||||||
|
<text>{{item.title}}</text>
|
||||||
|
<likes :types="types" :item="item"></likes>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="listcard-content_des">
|
||||||
|
<view class="listcard-content_des-label">
|
||||||
|
<view class="listcard-content_des-label-item">{{item.classify}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content_des-browe">{{item.browse_count}}浏览</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
types:"",
|
||||||
|
tableList: [{
|
||||||
|
_id: 1,
|
||||||
|
title: "到速度奥昂是大宋到速度奥昂是大宋到速度奥昂是大宋",
|
||||||
|
mode: 'base',
|
||||||
|
cover: [
|
||||||
|
"https://ts1.cn.mm.bing.net/th/id/R-C.df4462fabf18edd07195679a5f8a37e5?rik=FnNvr9jWWjHCVQ&riu=http%3a%2f%2fseopic.699pic.com%2fphoto%2f50059%2f8720.jpg_wh1200.jpg&ehk=ofb4q76uCls2S07aIlc8%2bab3H5zwrmj%2bhqiZ%2fyw3Ghw%3d&risl=&pid=ImgRaw&r=0"
|
||||||
|
],
|
||||||
|
classify: 111,
|
||||||
|
browse_count: 111
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_id: 2,
|
||||||
|
title: "啊实打实大苏打实打实打算大苏打",
|
||||||
|
mode: 'column',
|
||||||
|
cover: [
|
||||||
|
"https://pic3.zhimg.com/v2-58d652598269710fa67ec8d1c88d8f03_r.jpg?source=1940ef5c",
|
||||||
|
"https://pic3.zhimg.com/v2-58d652598269710fa67ec8d1c88d8f03_r.jpg?source=1940ef5c",
|
||||||
|
"https://pic3.zhimg.com/v2-c6ae9c3aff36b9b221258f6a90577902_r.jpg",
|
||||||
|
"https://pic3.zhimg.com/v2-c6ae9c3aff36b9b221258f6a90577902_r.jpg"
|
||||||
|
],
|
||||||
|
classify: 222,
|
||||||
|
browse_count: 222
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_id: 3,
|
||||||
|
title: "都是否定的撒撒大撒反对的飒飒的撒范德萨",
|
||||||
|
mode: 'image',
|
||||||
|
cover: [
|
||||||
|
"https://ts1.cn.mm.bing.net/th?id=OIP-C.kJE5c2uL7he1BwdQb3-APAHaNK&w=187&h=333&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"
|
||||||
|
],
|
||||||
|
classify: 333,
|
||||||
|
browse_count: 333
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.home-list {
|
||||||
|
flex: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.listcard {
|
||||||
|
display: flex;
|
||||||
|
padding: 15px;
|
||||||
|
margin: 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 0 5px 1px rgba($color:#000000, $alpha:0.1);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.listcard-image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-left: 10px;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.listcard-content_title {
|
||||||
|
padding-right: 30px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
text {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content_des {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
.listcard-content_des-label {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.listcard-content_des-label-item {
|
||||||
|
padding: 0 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
border-radius: 15px;
|
||||||
|
color: #f00;
|
||||||
|
border: 1px #f00 solid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content_des-browe {
|
||||||
|
color: #999;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.mode-column {
|
||||||
|
.list-content {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-image {
|
||||||
|
display: flex;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100%;
|
||||||
|
height: 80px;
|
||||||
|
|
||||||
|
.listcard-image_item {
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content_des {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.mode-image {
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.listcard-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
.listcard-content_des {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<text class="yticon icon-iLinkapp-"></text>
|
<text class="yticon icon-iLinkapp-"></text>
|
||||||
{{ userDetailInfo.memberLevelName || '开通会员' }}
|
{{ userDetailInfo.memberLevelName || '开通会员' }}
|
||||||
</view>
|
</view>
|
||||||
<text class="e-m">Mallplus</text>
|
<text class="e-m">汇融云链</text>
|
||||||
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
|
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -144,7 +144,6 @@
|
|||||||
<neil-modal :show="inputShow" @close="cancel" title="编辑" @cancel="cancel" @confirm="confirm">
|
<neil-modal :show="inputShow" @close="cancel" title="编辑" @cancel="cancel" @confirm="confirm">
|
||||||
<input v-model="inputContent" style="margin:20upx" placeholder="请输入..." />
|
<input v-model="inputContent" style="margin:20upx" placeholder="请输入..." />
|
||||||
</neil-modal>
|
</neil-modal>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<view class="coupon-item" v-if="couponList.length > 0" v-for="(item, index) in couponList" :key="index">
|
<view class="coupon-item" v-if="couponList.length > 0" v-for="(item, index) in couponList" :key="index">
|
||||||
<view class="con" @click="selectCoupon(item)">
|
<view class="con" @click="selectCoupon(item)">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<text class="title">{{ item.name }}</text>
|
<text class="title">{{ item.coupon.name }}</text>
|
||||||
<text class="time">有效期至{{item.coupon.endTime | formatCreateTime}}</text>
|
<text class="time">有效期至{{item.coupon.endTime | formatCreateTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
@@ -270,7 +270,7 @@ import Api from '@/common/api';
|
|||||||
if (this.addressData) {
|
if (this.addressData) {
|
||||||
this.addressId = this.addressData.id;
|
this.addressId = this.addressData.id;
|
||||||
}
|
}
|
||||||
|
console.log("优惠券",data.couponHistoryDetailList);
|
||||||
this.couponList = data.couponHistoryDetailList;
|
this.couponList = data.couponHistoryDetailList;
|
||||||
this.memberReceiveAddressList = data.memberReceiveAddressListaddress;
|
this.memberReceiveAddressList = data.memberReceiveAddressListaddress;
|
||||||
|
|
||||||
@@ -696,8 +696,6 @@ import Api from '@/common/api';
|
|||||||
|
|
||||||
.mask-content {
|
.mask-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 30vh;
|
|
||||||
max-height: 70vh;
|
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
还没有账号?
|
还没有账号?
|
||||||
<text @click="toRegist">马上注册</text>
|
<text @click="toRegist">马上注册</text>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
已经有账号?
|
已经有账号?
|
||||||
<text @click="toRegist">马上登录</text>
|
<text @click="toRegist">马上登录</text>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<text class="cell-more yticon icon-you"></text>
|
<text class="cell-more yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
|
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -3,454 +3,512 @@
|
|||||||
<view class="navbar" :style="{ position: headerPosition, top: headerTop }">
|
<view class="navbar" :style="{ position: headerPosition, top: headerTop }">
|
||||||
<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">综合排序</view>
|
<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">综合排序</view>
|
||||||
|
|
||||||
<view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
|
<!-- <view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
|
||||||
<text>楼房</text>
|
<text>楼房</text>
|
||||||
<view class="p-box">
|
<view class="p-box">
|
||||||
<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="yticon icon-shang"></text>
|
<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="yticon icon-shang"></text>
|
||||||
<text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="yticon icon-shang xia"></text>
|
<text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="yticon icon-shang xia"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<text class="cate-item yticon icon-fenlei1" @click="toggleCateMask('show')"></text>
|
<text class="cate-item yticon icon-fenlei1" @click="toggleCateMask('show')"></text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 列表显示 -->
|
<!-- 列表显示 -->
|
||||||
<view class="goods-list-vertical" >
|
<view class="goods-list-vertical">
|
||||||
<view v-for="(item, index) in goodsList" :key="index" class="goods-item-vertical" @click="navToDetailPage(item)">
|
<view v-for="(item, index) in goodsList" :key="index" class="goods-item-vertical"
|
||||||
<view class="image-wrapper-vertical"><image :src="item.pic" mode="aspectFill"></image></view>
|
@click="navToDetailPage(item)">
|
||||||
|
<view class="image-wrapper-vertical">
|
||||||
|
<image :src="item.pic" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
<view class="goods-list-right">
|
<view class="goods-list-right">
|
||||||
<view class="goods-right-top">
|
<view class="goods-right-top">
|
||||||
<text class="">{{ item.name }}</text>
|
<text class="text1">{{ item.name }}</text>
|
||||||
|
<text class="text2">地址:卡就哦啊四到哦啊四到哦啊四到哦啊四到哦啊四到哦啊四到哦啊四到哦啊四到四的</text>
|
||||||
|
<text class="text2">电话:13623307393</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-right-bottom">
|
<!-- <view class="goods-right-bottom">
|
||||||
<text class="price">均价:{{ item.price }}</text>
|
<text class="price">均价:{{ item.price }}</text>
|
||||||
<text class="sale" v-if="geohash">距离: {{item.distance.toFixed(4)}}</text>
|
<text class="sale" v-if="geohash">距离: {{item.distance.toFixed(4)}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<uni-load-more :status="loadingType"></uni-load-more>
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
uniLoadMore
|
uniLoadMore
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cateMaskState: 0, //分类面板展开状态
|
cateMaskState: 0, //分类面板展开状态
|
||||||
headerPosition: 'fixed',
|
headerPosition: 'fixed',
|
||||||
headerTop: '0px',
|
headerTop: '0px',
|
||||||
keyword: '',
|
keyword: '',
|
||||||
loadingType: 'more', //加载更多状态
|
loadingType: 'more', //加载更多状态
|
||||||
filterIndex: 0,
|
filterIndex: 0,
|
||||||
cateId: 0, //已选三级分类id
|
cateId: 0, //已选三级分类id
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
cid: null,
|
cid: null,
|
||||||
geohash:'',
|
geohash: '',
|
||||||
priceOrder: 0, //1 价格从低到高 2价格从高到低
|
priceOrder: 0, //1 价格从低到高 2价格从高到低
|
||||||
cateList: [],
|
cateList: [],
|
||||||
goodsList: []
|
goodsList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
|
this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
|
||||||
// #endif
|
// #endif
|
||||||
this.keyword = options.keyword;
|
this.keyword = options.keyword;
|
||||||
this.cateId = options.sid;
|
this.cateId = options.sid;
|
||||||
//this.loadCateList(options.fid, options.sid);
|
//this.loadCateList(options.fid, options.sid);
|
||||||
if(options.geohash){
|
if (options.geohash) {
|
||||||
this.geohash=options.geohash;
|
this.geohash = options.geohash;
|
||||||
this.nearCommunity(options.geohash);
|
this.nearCommunity(options.geohash);
|
||||||
}else{
|
} else {
|
||||||
console.log(options.geohash)
|
console.log(options.geohash)
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
//兼容iOS端下拉时顶部漂移
|
//兼容iOS端下拉时顶部漂移
|
||||||
if (e.scrollTop >= 0) {
|
if (e.scrollTop >= 0) {
|
||||||
this.headerPosition = 'fixed';
|
this.headerPosition = 'fixed';
|
||||||
} else {
|
} else {
|
||||||
this.headerPosition = 'absolute';
|
this.headerPosition = 'absolute';
|
||||||
}
|
|
||||||
},
|
|
||||||
//下拉刷新
|
|
||||||
onPullDownRefresh() {
|
|
||||||
this.pageNum = this.pageNum + 1;
|
|
||||||
this.loadData('refresh');
|
|
||||||
},
|
|
||||||
//加载更多
|
|
||||||
onReachBottom() {
|
|
||||||
this.pageNum = this.pageNum + 1;
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async nearCommunity(geohash) {
|
|
||||||
let params = params = { geohash: geohash, pageSize: 10,distance:240 };
|
|
||||||
let data = await Api.apiCall('get', Api.build.nearCommunityList, params);
|
|
||||||
if (data) {
|
|
||||||
this.goodsList = data || [];
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//加载商品 ,带下拉刷新和上滑加载
|
//下拉刷新
|
||||||
async loadData(type = 'add', loading) {
|
onPullDownRefresh() {
|
||||||
//没有更多直接返回
|
this.pageNum = this.pageNum + 1;
|
||||||
if (type === 'add') {
|
this.loadData('refresh');
|
||||||
if (this.loadingType === 'nomore') {
|
},
|
||||||
|
//加载更多
|
||||||
|
onReachBottom() {
|
||||||
|
this.pageNum = this.pageNum + 1;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async nearCommunity(geohash) {
|
||||||
|
let params = params = {
|
||||||
|
geohash: geohash,
|
||||||
|
pageSize: 10,
|
||||||
|
distance: 240
|
||||||
|
};
|
||||||
|
let data = await Api.apiCall('get', Api.build.nearCommunityList, params);
|
||||||
|
if (data) {
|
||||||
|
this.goodsList = data || [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//加载商品 ,带下拉刷新和上滑加载
|
||||||
|
async loadData(type = 'add', loading) {
|
||||||
|
//没有更多直接返回
|
||||||
|
if (type === 'add') {
|
||||||
|
if (this.loadingType === 'nomore') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadingType = 'loading';
|
||||||
|
} else {
|
||||||
|
this.loadingType = 'more';
|
||||||
|
}
|
||||||
|
let params;
|
||||||
|
|
||||||
|
if (this.keyword) {
|
||||||
|
params = {
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
keyword: this.keyword
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
params = {
|
||||||
|
pageNum: this.pageNum
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
let list = await Api.apiCall('get', Api.build.communityList, params);
|
||||||
|
let goodsList = list.records;
|
||||||
|
// let goodsList = await this.$api.json('goodsList');
|
||||||
|
if (type === 'refresh') {
|
||||||
|
this.goodsList = [];
|
||||||
|
}
|
||||||
|
//筛选,测试数据直接前端筛选了
|
||||||
|
if (this.filterIndex === 1) {
|
||||||
|
goodsList.sort((a, b) => b.sales - a.sales);
|
||||||
|
}
|
||||||
|
if (this.filterIndex === 2) {
|
||||||
|
goodsList.sort((a, b) => {
|
||||||
|
if (this.priceOrder == 1) {
|
||||||
|
return a.counts - b.counts;
|
||||||
|
}
|
||||||
|
return b.counts - a.counts;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.goodsList = this.goodsList.concat(goodsList);
|
||||||
|
|
||||||
|
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
|
||||||
|
this.loadingType = this.goodsList.length > list.total ? 'nomore' : 'more';
|
||||||
|
if (type === 'refresh') {
|
||||||
|
if (loading == 1) {
|
||||||
|
uni.hideLoading();
|
||||||
|
} else {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//筛选点击
|
||||||
|
tabClick(index) {
|
||||||
|
this.pageNum = 1;
|
||||||
|
if (this.filterIndex === index && index !== 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loadingType = 'loading';
|
this.filterIndex = index;
|
||||||
} else {
|
if (index === 2) {
|
||||||
this.loadingType = 'more';
|
this.priceOrder = this.priceOrder === 1 ? 2 : 1;
|
||||||
}
|
|
||||||
let params;
|
|
||||||
|
|
||||||
if (this.keyword) {
|
|
||||||
params = { pageNum: this.pageNum, keyword: this.keyword };
|
|
||||||
} else {
|
|
||||||
params = { pageNum: this.pageNum };
|
|
||||||
}
|
|
||||||
|
|
||||||
let list = await Api.apiCall('get', Api.build.communityList, params);
|
|
||||||
let goodsList = list.records;
|
|
||||||
// let goodsList = await this.$api.json('goodsList');
|
|
||||||
if (type === 'refresh') {
|
|
||||||
this.goodsList = [];
|
|
||||||
}
|
|
||||||
//筛选,测试数据直接前端筛选了
|
|
||||||
if (this.filterIndex === 1) {
|
|
||||||
goodsList.sort((a, b) => b.sales - a.sales);
|
|
||||||
}
|
|
||||||
if (this.filterIndex === 2) {
|
|
||||||
goodsList.sort((a, b) => {
|
|
||||||
if (this.priceOrder == 1) {
|
|
||||||
return a.counts - b.counts;
|
|
||||||
}
|
|
||||||
return b.counts - a.counts;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.goodsList = this.goodsList.concat(goodsList);
|
|
||||||
|
|
||||||
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
|
|
||||||
this.loadingType = this.goodsList.length > list.total ? 'nomore' : 'more';
|
|
||||||
if (type === 'refresh') {
|
|
||||||
if (loading == 1) {
|
|
||||||
uni.hideLoading();
|
|
||||||
} else {
|
} else {
|
||||||
uni.stopPullDownRefresh();
|
this.priceOrder = 0;
|
||||||
}
|
}
|
||||||
}
|
uni.pageScrollTo({
|
||||||
},
|
duration: 300,
|
||||||
//筛选点击
|
scrollTop: 0
|
||||||
tabClick(index) {
|
});
|
||||||
this.pageNum = 1;
|
this.loadData('refresh', 1);
|
||||||
if (this.filterIndex === index && index !== 2) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.filterIndex = index;
|
|
||||||
if (index === 2) {
|
|
||||||
this.priceOrder = this.priceOrder === 1 ? 2 : 1;
|
|
||||||
} else {
|
|
||||||
this.priceOrder = 0;
|
|
||||||
}
|
|
||||||
uni.pageScrollTo({
|
|
||||||
duration: 300,
|
|
||||||
scrollTop: 0
|
|
||||||
});
|
|
||||||
this.loadData('refresh', 1);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//显示分类面板
|
//显示分类面板
|
||||||
toggleCateMask(type) {
|
toggleCateMask(type) {
|
||||||
let timer = type === 'show' ? 10 : 300;
|
console.log("type", type);
|
||||||
let state = type === 'show' ? 1 : 0;
|
let timer = type === 'show' ? 10 : 300;
|
||||||
this.cateMaskState = 2;
|
let state = type === 'show' ? 1 : 0;
|
||||||
setTimeout(() => {
|
this.cateMaskState = 2;
|
||||||
this.cateMaskState = state;
|
setTimeout(() => {
|
||||||
}, timer);
|
this.cateMaskState = state;
|
||||||
},
|
}, timer);
|
||||||
//分类点击
|
},
|
||||||
changeCate(item) {
|
//分类点击
|
||||||
console.log(item.id);
|
changeCate(item) {
|
||||||
this.pageNum = 1;
|
console.log(item.id);
|
||||||
this.cateId = item.id;
|
this.pageNum = 1;
|
||||||
this.toggleCateMask();
|
this.cateId = item.id;
|
||||||
uni.pageScrollTo({
|
this.toggleCateMask();
|
||||||
duration: 300,
|
uni.pageScrollTo({
|
||||||
scrollTop: 0
|
duration: 300,
|
||||||
});
|
scrollTop: 0
|
||||||
this.loadData('refresh', 1);
|
});
|
||||||
|
this.loadData('refresh', 1);
|
||||||
|
|
||||||
},
|
},
|
||||||
//详情
|
//详情
|
||||||
navToDetailPage(item) {
|
navToDetailPage(item) {
|
||||||
//测试数据没有写id,用title代替
|
//测试数据没有写id,用title代替
|
||||||
let id = item.id;
|
let id = item.id;
|
||||||
uni.navigateTo({
|
let name = item.name;
|
||||||
url: `../../pagesA/build/community?communityId=${id}`
|
uni.navigateTo({
|
||||||
});
|
url: `../../pagesA/build/community?communityId=${id}&name=${name}`
|
||||||
},
|
});
|
||||||
stopPrevent() {}
|
},
|
||||||
}
|
stopPrevent() {}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page,
|
page,
|
||||||
.content {
|
.content {
|
||||||
background: $page-color-base;
|
background: $page-color-base;
|
||||||
}
|
}
|
||||||
.content {
|
|
||||||
padding-top: 96upx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
.content {
|
||||||
position: fixed;
|
padding-top: 96upx;
|
||||||
left: 0;
|
}
|
||||||
top: var(--window-top);
|
|
||||||
display: flex;
|
.navbar {
|
||||||
width: 100%;
|
position: fixed;
|
||||||
height: 80upx;
|
left: 0;
|
||||||
background: #fff;
|
top: var(--window-top);
|
||||||
box-shadow: 0 2upx 10upx rgba(0, 0, 0, 0.06);
|
|
||||||
z-index: 10;
|
|
||||||
.nav-item {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
width: 100%;
|
||||||
align-items: center;
|
height: 70upx;
|
||||||
height: 100%;
|
background: #fff;
|
||||||
font-size: 30upx;
|
box-shadow: 0 2upx 10upx rgba(0, 0, 0, 0.06);
|
||||||
color: $font-color-dark;
|
z-index: 10;
|
||||||
position: relative;
|
padding-left: 20px;
|
||||||
&.current {
|
|
||||||
color: $base-color;
|
.nav-item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 30upx;
|
||||||
|
color: $font-color-dark;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&.current {
|
||||||
|
color: $base-color;
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 9%;
|
||||||
|
bottom: 0;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 120upx;
|
||||||
|
height: 0;
|
||||||
|
border-bottom: 4upx solid $base-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.yticon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 30upx;
|
||||||
|
height: 14upx;
|
||||||
|
line-height: 1;
|
||||||
|
margin-left: 4upx;
|
||||||
|
font-size: 26upx;
|
||||||
|
color: #888;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: $base-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.xia {
|
||||||
|
transform: scaleY(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cate-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
width: 80upx;
|
||||||
|
position: relative;
|
||||||
|
font-size: 44upx;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 0;
|
||||||
bottom: 0;
|
top: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateY(-50%);
|
||||||
width: 120upx;
|
border-left: 1px solid #ddd;
|
||||||
height: 0;
|
width: 0;
|
||||||
border-bottom: 4upx solid $base-color;
|
height: 36upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.p-box {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.yticon {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 30upx;
|
|
||||||
height: 14upx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-left: 4upx;
|
|
||||||
font-size: 26upx;
|
|
||||||
color: #888;
|
|
||||||
&.active {
|
|
||||||
color: $base-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.xia {
|
|
||||||
transform: scaleY(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.cate-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 100%;
|
|
||||||
width: 80upx;
|
|
||||||
position: relative;
|
|
||||||
font-size: 44upx;
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
border-left: 1px solid #ddd;
|
|
||||||
width: 0;
|
|
||||||
height: 36upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 分类 */
|
/* 分类 */
|
||||||
.cate-mask {
|
.cate-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: var(--window-top);
|
top: var(--window-top);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: rgba(0, 0, 0, 0);
|
background: rgba(0, 0, 0, 0);
|
||||||
z-index: 95;
|
z-index: 95;
|
||||||
transition: 0.3s;
|
|
||||||
|
|
||||||
.cate-content {
|
|
||||||
width: 630upx;
|
|
||||||
height: 100%;
|
|
||||||
background: #fff;
|
|
||||||
float: right;
|
|
||||||
transform: translateX(100%);
|
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
|
||||||
&.none {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
&.show {
|
|
||||||
background: rgba(0, 0, 0, 0.4);
|
|
||||||
|
|
||||||
.cate-content {
|
.cate-content {
|
||||||
transform: translateX(0);
|
width: 630upx;
|
||||||
|
height: 100%;
|
||||||
|
background: #fff;
|
||||||
|
float: right;
|
||||||
|
transform: translateX(100%);
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.none {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
|
||||||
|
.cate-content {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.cate-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
.cate-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 90upx;
|
|
||||||
padding-left: 30upx;
|
|
||||||
font-size: 28upx;
|
|
||||||
color: #555;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.two {
|
|
||||||
height: 64upx;
|
|
||||||
color: #303133;
|
|
||||||
font-size: 30upx;
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
.active {
|
|
||||||
color: $base-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 商品列表 */
|
.cate-list {
|
||||||
.goods-list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 20upx 20upx 0 20upx;
|
|
||||||
background: #fff;
|
|
||||||
.goods-item {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 48%;
|
height: 100%;
|
||||||
padding-bottom: 40upx;
|
|
||||||
&:nth-child(2n + 1) {
|
.cate-item {
|
||||||
margin-right: 4%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.image-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 330upx;
|
|
||||||
border-radius: 3px;
|
|
||||||
overflow: hidden;
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
font-size: $font-lg;
|
|
||||||
color: $font-color-dark;
|
|
||||||
line-height: 80upx;
|
|
||||||
}
|
|
||||||
.price-box {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding-right: 10upx;
|
|
||||||
font-size: 24upx;
|
|
||||||
color: $font-color-light;
|
|
||||||
}
|
|
||||||
.price {
|
|
||||||
font-size: $font-lg;
|
|
||||||
color: $uni-color-primary;
|
|
||||||
line-height: 1;
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
font-size: 26upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.goods-list-vertical {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0upx 20upx;
|
|
||||||
background: #fff;
|
|
||||||
.goods-item-vertical {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
height: 280upx;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-bottom: 1upx solid #eeeeee;
|
|
||||||
.image-wrapper-vertical {
|
|
||||||
width: 240upx;
|
|
||||||
height: 240upx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
height: 90upx;
|
||||||
margin-right: 10upx;
|
padding-left: 30upx;
|
||||||
image {
|
font-size: 28upx;
|
||||||
width: 240upx;
|
color: #555;
|
||||||
height: 240upx;
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.two {
|
||||||
|
height: 64upx;
|
||||||
|
color: #303133;
|
||||||
|
font-size: 30upx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: $base-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 商品列表 */
|
||||||
|
.goods-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 20upx 20upx 0 20upx;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.goods-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 48%;
|
||||||
|
padding-bottom: 40upx;
|
||||||
|
|
||||||
|
&:nth-child(2n + 1) {
|
||||||
|
margin-right: 4%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.goods-list-right {
|
|
||||||
width: 470upx;
|
.image-wrapper {
|
||||||
.goods-right-top {
|
width: 100%;
|
||||||
height: 200upx;
|
height: 330upx;
|
||||||
text {
|
border-radius: 3px;
|
||||||
font-size: 32upx;
|
overflow: hidden;
|
||||||
text-overflow: -o-ellipsis-lastline;
|
|
||||||
overflow: hidden;
|
image {
|
||||||
text-overflow: ellipsis;
|
width: 100%;
|
||||||
display: -webkit-box;
|
height: 100%;
|
||||||
-webkit-line-clamp: 2;
|
opacity: 1;
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.goods-right-bottom {
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: $font-lg;
|
||||||
|
color: $font-color-dark;
|
||||||
|
line-height: 80upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-right: 10upx;
|
||||||
|
font-size: 24upx;
|
||||||
|
color: $font-color-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: $font-lg;
|
||||||
|
color: $uni-color-primary;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '';
|
||||||
|
font-size: 26upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-list-vertical {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0upx 20upx;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.goods-item-vertical {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: 200upx;
|
||||||
|
|
||||||
|
.image-wrapper-vertical {
|
||||||
|
width: 200upx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
.price {
|
margin-right: 10upx;
|
||||||
font-size: $font-lg;
|
|
||||||
color: $uni-color-primary;
|
image {
|
||||||
line-height: 1;
|
width: 150upx;
|
||||||
&:before {
|
height: 150upx;
|
||||||
content: '';
|
}
|
||||||
font-size: 26upx;
|
}
|
||||||
|
|
||||||
|
.goods-list-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 470upx;
|
||||||
|
|
||||||
|
.goods-right-top {
|
||||||
|
.text1 {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 32upx;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
.text2{
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #555;
|
||||||
|
font-size: 30upx;
|
||||||
|
text-overflow: -o-ellipsis-lastline;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sale {
|
|
||||||
color: $font-color-light;
|
.goods-right-bottom {
|
||||||
font-size: 28upx;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: $font-lg;
|
||||||
|
color: $uni-color-primary;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '';
|
||||||
|
font-size: 26upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sale {
|
||||||
|
color: $font-color-light;
|
||||||
|
font-size: 28upx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,11 +23,19 @@ export default {
|
|||||||
return {
|
return {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
||||||
goodsList: []
|
goodsList: [
|
||||||
|
{
|
||||||
|
id:"25",
|
||||||
|
createTime :"2020-02-02",
|
||||||
|
title:"测试标签",
|
||||||
|
pic:"https://pic3.zhimg.com/v2-c6ae9c3aff36b9b221258f6a90577902_r.jpg",
|
||||||
|
content:"爱上科技大厦送i的阿松i到速度奥昂是大宋i的"
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loadData();
|
// this.loadData();
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
//兼容iOS端下拉时顶部漂移
|
//兼容iOS端下拉时顶部漂移
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more :status="loadingType"></uni-load-more>
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -500,6 +500,7 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let userInfo = uni.getStorageSync('userInfo');
|
let userInfo = uni.getStorageSync('userInfo');
|
||||||
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
还没有账号?
|
还没有账号?
|
||||||
<text @click="toRegist">马上注册</text>
|
<text @click="toRegist">马上注册</text>
|
||||||
</view>
|
</view>
|
||||||
<mallplusCopyright></mallplusCopyright>
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="row b-b">
|
<view class="row b-b">
|
||||||
<text class="tit">手机号</text>
|
<text class="tit">手机号</text>
|
||||||
<input class="input" type="number" v-model="addressData.phoneNumber" placeholder="收货人手机号码" placeholder-class="placeholder" />
|
<input class="input" type="number" maxlength="11" v-model="addressData.phoneNumber" placeholder="收货人手机号码" placeholder-class="placeholder" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row b-b">
|
<view class="row b-b">
|
||||||
|
|||||||
BIN
mallplusui-uniapp-app/static/logo.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 19 KiB |
BIN
mallplusui-uniapp-app/static/temp/antFill-gift.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
mallplusui-uniapp-app/static/temp/antFill-home.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
mallplusui-uniapp-app/static/temp/fabfa-dropbox.png
Normal file
|
After Width: | Height: | Size: 885 B |
BIN
mallplusui-uniapp-app/static/temp/fasfa-archive.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
mallplusui-uniapp-app/static/temp/fasfa-history.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
mallplusui-uniapp-app/static/temp/fasfa-shopping.png
Normal file
|
After Width: | Height: | Size: 976 B |
BIN
mallplusui-uniapp-app/static/temp/fasfa-sitemap.png
Normal file
|
After Width: | Height: | Size: 539 B |
BIN
mallplusui-uniapp-app/static/temp/fasfa-street.png
Normal file
|
After Width: | Height: | Size: 905 B |
BIN
mallplusui-uniapp-app/static/temp/fasfa-truck.png
Normal file
|
After Width: | Height: | Size: 812 B |
BIN
mallplusui-uniapp-app/static/temp/fasfausers.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -3,6 +3,6 @@ const merge = require('webpack-merge')
|
|||||||
const prodEnv = require('./prod.env')
|
const prodEnv = require('./prod.env')
|
||||||
|
|
||||||
module.exports = merge(prodEnv, {
|
module.exports = merge(prodEnv, {
|
||||||
NODE_ENV: 'development',
|
NODE_ENV: '"development"',
|
||||||
BASE_API: 'http://127.0.0.1:8085'
|
BASE_API: '"http://127.0.0.1:8085"'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
<el-form-item label="小区栋数:" prop="counts">
|
<el-form-item label="小区栋数:" prop="counts">
|
||||||
<el-input v-model="community.counts"></el-input>
|
<el-input v-model="community.counts"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="小区地址:" prop="address">
|
<el-form-item label="小区地址:" prop="details">
|
||||||
<el-input v-model="community.address"></el-input>
|
<el-input v-model="community.details"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="地标:" prop="nearbyLandmarks">
|
<el-form-item label="地标:" prop="nearbyLandmarks">
|
||||||
@@ -19,6 +19,9 @@
|
|||||||
<el-form-item label="电话:" prop="phone">
|
<el-form-item label="电话:" prop="phone">
|
||||||
<el-input v-model="community.phone"></el-input>
|
<el-input v-model="community.phone"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="照片:" prop="pic">
|
||||||
|
<single-upload v-model="community.pic"></single-upload>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="地图:" prop="phone">
|
<el-form-item label="地图:" prop="phone">
|
||||||
|
|
||||||
<input v-model.number="center.lng" />
|
<input v-model.number="center.lng" />
|
||||||
@@ -41,7 +44,7 @@
|
|||||||
:copyright="[{id: 1, content: 'Copyright Message', bounds: {ne: {lng: 110, lat: 40}, sw:{lng: 0, lat: 0}}}, {id: 2, content: '<a>宇运动多租户商城</a>'}]">
|
:copyright="[{id: 1, content: 'Copyright Message', bounds: {ne: {lng: 110, lat: 40}, sw:{lng: 0, lat: 0}}}, {id: 2, content: '<a>宇运动多租户商城</a>'}]">
|
||||||
</bm-copyright>
|
</bm-copyright>
|
||||||
<bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT" @changeAfter="changeAfters"></bm-city-list>
|
<bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT" @changeAfter="changeAfters"></bm-city-list>
|
||||||
|
<bm-marker :position="center" :dragging="false" />
|
||||||
<!-- <bm-local-search :keyword="keyword" :auto-viewport="true" :location="location"></bm-local-search>-->
|
<!-- <bm-local-search :keyword="keyword" :auto-viewport="true" :location="location"></bm-local-search>-->
|
||||||
</baidu-map>
|
</baidu-map>
|
||||||
|
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
import BmCityList from 'vue-baidu-map/components/controls/CityList';
|
import BmCityList from 'vue-baidu-map/components/controls/CityList';
|
||||||
import BmCopyright from 'vue-baidu-map/components/controls/Copyright';
|
import BmCopyright from 'vue-baidu-map/components/controls/Copyright';
|
||||||
import BmView from 'vue-baidu-map/components/map/MapView';
|
import BmView from 'vue-baidu-map/components/map/MapView';
|
||||||
|
import BmMarker from 'vue-baidu-map/components/overlays/Marker'
|
||||||
import {createCommunity, getCommunity, updateCommunity} from '@/api/build/community'
|
import {createCommunity, getCommunity, updateCommunity} from '@/api/build/community'
|
||||||
import SingleUpload from '@/components/Upload/singleUpload'
|
import SingleUpload from '@/components/Upload/singleUpload'
|
||||||
import {formatDate} from '@/utils/date';
|
import {formatDate} from '@/utils/date';
|
||||||
@@ -68,7 +72,7 @@
|
|||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
name: 'CommunityDetail',
|
name: 'CommunityDetail',
|
||||||
components:{SingleUpload,BaiduMap,BmLocalSearch,BmCityList,BmView,BmCopyright},
|
components:{SingleUpload,BaiduMap,BmLocalSearch,BmCityList,BmView,BmCopyright,BmMarker},
|
||||||
props: {
|
props: {
|
||||||
isEdit: {
|
isEdit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -108,6 +112,15 @@
|
|||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
getCommunity(this.$route.query.id).then(response => {
|
getCommunity(this.$route.query.id).then(response => {
|
||||||
this.community = response.data;
|
this.community = response.data;
|
||||||
|
if(this.community.latitude){
|
||||||
|
this.center.lat=this.community.latitude;
|
||||||
|
}
|
||||||
|
if(this.community.longitude){
|
||||||
|
this.center.lng=this.community.longitude;
|
||||||
|
}
|
||||||
|
if(this.community.city){
|
||||||
|
this.location=this.community.city;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.community = Object.assign({},defaultCommunity);
|
this.community = Object.assign({},defaultCommunity);
|
||||||
|
|||||||