2023-02-22
业务功能完善
16
mallplusui-uniapp-app/.hbuilderx/launch.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||||
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
|
"version": "0.0",
|
||||||
|
"configurations": [{
|
||||||
|
"app-plus" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"default" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -418,6 +418,9 @@
|
|||||||
video {
|
video {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
html,body,#app{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
/* 骨架屏替代方案 */
|
/* 骨架屏替代方案 */
|
||||||
.Skeleton {
|
.Skeleton {
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ export default {
|
|||||||
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',
|
||||||
|
mesList: 'sys/message/list',// GET 参数为空,获取用户消息通知列表,(需要先判断用户是已经登录状态)
|
||||||
|
mesInfo: 'sys/message/info',// GET 参数为 id:消息ID,获取消息详情
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
getBuildNoticeByPage: 'single/build/getBuildNoticeByPage', // 所有社区和房间
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async acceptCoupon(item) {
|
async acceptCoupon(item) {
|
||||||
this.types =!this.types
|
this.types = !this.types
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
@@ -68,11 +68,17 @@
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.$api.msg(data);
|
this.$api.msg(data);
|
||||||
|
this.clickSubMethod(item)
|
||||||
|
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
||||||
},
|
},
|
||||||
async useCoupon(item){
|
clickSubMethod(vel) {
|
||||||
|
console.log('clickSubMethod')
|
||||||
|
this.$emit('callParentMethod', JSON.stringify(vel))
|
||||||
|
},
|
||||||
|
async useCoupon(item) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后'
|
title: '请稍后'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,6 +38,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/index/messageList",
|
||||||
|
"style": {
|
||||||
|
// "enablePullDownRefresh": true,
|
||||||
|
"navigationBarTitleText": "消息列表"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/messageDetail",
|
||||||
|
"style": {
|
||||||
|
// "enablePullDownRefresh": true,
|
||||||
|
"navigationBarTitleText": "消息详情"
|
||||||
|
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/search/search",
|
"path": "pages/search/search",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -813,10 +828,10 @@
|
|||||||
"text": "分类"
|
"text": "分类"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/index/nearbyBusiness",
|
"pagePath": "pages/index/messageList",
|
||||||
"iconPath": "static/fujin.png",
|
"iconPath": "static/tab-message_.png",
|
||||||
"selectedIconPath": "static/fujin_.png",
|
"selectedIconPath": "static/tab-message.png",
|
||||||
"text": "附近商家"
|
"text": "消息"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/cart/cart",
|
"pagePath": "pages/cart/cart",
|
||||||
@@ -828,7 +843,7 @@
|
|||||||
"pagePath": "pages/index/user",
|
"pagePath": "pages/index/user",
|
||||||
"iconPath": "static/tab-my.png",
|
"iconPath": "static/tab-my.png",
|
||||||
"selectedIconPath": "static/tab-my-current.png",
|
"selectedIconPath": "static/tab-my-current.png",
|
||||||
"text": "我的"
|
"text": "我的云链"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content" style="display: flex;flex-direction: column;">
|
<view class="content" style="display: flex;flex-direction: column;">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view style="width: 100%;position: fixed;top: 0;z-index: 99;background: #FFFFFF;" :style="{'height':statusBarHeight+'px' }"></view>
|
<view style="width: 100%;position: fixed;top: 0;z-index: 99;background: #FFFFFF;"
|
||||||
<view class="getPosition" style="height: 90upx;position: fixed;z-index: 99;width: 100%" :style="{'top':statusBarHeight+'px' }">
|
:style="{'height':statusBarHeight+'px' }"></view>
|
||||||
|
<view class="getPosition" style="height: 90upx;position: fixed;z-index: 99;width: 100%"
|
||||||
|
:style="{'top':statusBarHeight+'px' }">
|
||||||
<text>分类</text>
|
<text>分类</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="" @click="search()" style="background: #FFFFFF;height: 80upx;display: flex;justify-content: center;align-items: center;" :style="[{'margin-top': statusBarHeight+45+'px'}]">
|
<view class="" @click="search()"
|
||||||
<input class="" type="text" value="" placeholder="输入关键字搜索" style="font-size: 28upx;background: #F5F5F5;height: 60upx;width: 90%;border-radius: 50upx;text-align: center;" />
|
style="background: #FFFFFF;height: 80upx;display: flex;justify-content: center;align-items: center;"
|
||||||
|
:style="[{'margin-top': statusBarHeight+45+'px'}]">
|
||||||
|
<input class="" type="text" value="" placeholder="输入关键字搜索"
|
||||||
|
style="font-size: 28upx;background: #F5F5F5;height: 60upx;width: 90%;border-radius: 50upx;text-align: center;" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<!-- <view class="" :style="[{'height': statusBarHeight+45+'px'}]"></view> -->
|
<!-- <view class="" :style="[{'height': statusBarHeight+45+'px'}]"></view> -->
|
||||||
@@ -17,14 +22,16 @@
|
|||||||
<input type="text" value="" placeholder="输入关键字搜索" class="input" style="font-size: 28upx;text-align: center;"/>
|
<input type="text" value="" placeholder="输入关键字搜索" class="input" style="font-size: 28upx;text-align: center;"/>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="" :style="{height: height + 'px'}" style="display: flex;flex-direction: row;">
|
<view class="" style="display: flex;flex-direction: row;height: 100%;">
|
||||||
<scroll-view scroll-y class="left-aside">
|
<scroll-view scroll-y class="left-aside">
|
||||||
<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item)">{{ item.name }}</view>
|
<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }"
|
||||||
|
@click="tabtap(item)">{{ item.name }}</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
|
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll"
|
||||||
|
:scroll-top="tabScrollTop">
|
||||||
<view v-for="item in slist" :key="item.id" class="s-list" :id="'main-' + item.id">
|
<view v-for="item in slist" :key="item.id" class="s-list" :id="'main-' + item.id">
|
||||||
<text class="s-item">{{ item.name }}</text>
|
<text class="s-item">{{ item.name }}</text>
|
||||||
<view class="t-list" >
|
<view class="t-list">
|
||||||
<view v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
|
<view v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
|
||||||
<image :src="titem.pic" @click="navToDetailPage(titem)"></image>
|
<image :src="titem.pic" @click="navToDetailPage(titem)"></image>
|
||||||
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
|
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
|
||||||
@@ -39,9 +46,9 @@
|
|||||||
</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';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mallplusCopyright
|
mallplusCopyright
|
||||||
},
|
},
|
||||||
@@ -60,26 +67,26 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||||
this.height = uni.getSystemInfoSync().windowHeight - (this.statusBarHeight+80)
|
this.height = uni.getSystemInfoSync().windowHeight - (this.statusBarHeight + 80)
|
||||||
|
console.log("height", this.height);
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
|
|
||||||
let list = this.$db.get('categoryList' )
|
let list = this.$db.get('categoryList')
|
||||||
if(!list){
|
if (!list) {
|
||||||
let params = {};
|
let params = {};
|
||||||
list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
||||||
this.$db.set('categoryList', list)
|
this.$db.set('categoryList', list)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(list){
|
if (list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
|
|
||||||
if (item.level==0) {
|
if (item.level == 0) {
|
||||||
this.flist.push(item); //pid为父级id, 没有pid或者pid=0是一级分类
|
this.flist.push(item); //pid为父级id, 没有pid或者pid=0是一级分类
|
||||||
} else if (item.level==1) {
|
} else if (item.level == 1) {
|
||||||
this.slist.push(item); //没有价格的是2级分类
|
this.slist.push(item); //没有价格的是2级分类
|
||||||
} else {
|
} else {
|
||||||
this.tlist.push(item); //3级分类
|
this.tlist.push(item); //3级分类
|
||||||
@@ -97,7 +104,7 @@ export default {
|
|||||||
this.currentId = item.id;
|
this.currentId = item.id;
|
||||||
console.log(item.id);
|
console.log(item.id);
|
||||||
let index = this.slist.findIndex(sitem => sitem.pid === item.id);
|
let index = this.slist.findIndex(sitem => sitem.pid === item.id);
|
||||||
if(index>=0){
|
if (index >= 0) {
|
||||||
this.tabScrollTop = this.slist[index].top;
|
this.tabScrollTop = this.slist[index].top;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,8 +125,7 @@ export default {
|
|||||||
let h = 0;
|
let h = 0;
|
||||||
this.slist.forEach(item => {
|
this.slist.forEach(item => {
|
||||||
let view = uni.createSelectorQuery().select('#main-' + item.id);
|
let view = uni.createSelectorQuery().select('#main-' + item.id);
|
||||||
view.fields(
|
view.fields({
|
||||||
{
|
|
||||||
size: true
|
size: true
|
||||||
},
|
},
|
||||||
data => {
|
data => {
|
||||||
@@ -145,26 +151,28 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page,
|
page,
|
||||||
.content {
|
.content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.left-aside {
|
|
||||||
|
.left-aside {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200upx;
|
width: 200upx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.f-item {
|
|
||||||
|
.f-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -173,9 +181,11 @@ page,
|
|||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -189,34 +199,38 @@ page,
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-aside {
|
.right-aside {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-left: 20upx;
|
padding-left: 20upx;
|
||||||
}
|
}
|
||||||
.s-item {
|
|
||||||
|
.s-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 70upx;
|
height: 70upx;
|
||||||
padding-top: 8upx;
|
padding-top: 8upx;
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
.t-list {
|
|
||||||
|
.t-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding-top: 12upx;
|
padding-top: 12upx;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
flex: 99;
|
flex: 99;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.t-item {
|
|
||||||
|
.t-item {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -228,11 +242,21 @@ page,
|
|||||||
padding-bottom: 20upx;
|
padding-bottom: 20upx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 140upx;
|
width: 130upx;
|
||||||
height: 140upx;
|
height: 130upx;
|
||||||
}
|
}
|
||||||
}
|
text{
|
||||||
.getPosition{
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.getPosition {
|
||||||
height: 100upx;
|
height: 100upx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
<image src="/static/shwz_icon.png"></image>
|
<image src="/static/shwz_icon.png"></image>
|
||||||
<text>生活物资</text>
|
<text>生活物资</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cate-item" @click="navToTabPage('../../pagesA/product/groupList')">
|
<!-- <view class="cate-item" @click="navToTabPage('../../pagesA/product/groupList')">
|
||||||
<image src="/static/temp/fabfa-dropbox.png"></image>
|
<image src="/static/temp/fabfa-dropbox.png"></image>
|
||||||
<text>拼团特价</text>
|
<text>拼团特价</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="cate-item" @click="navToTabPage('/pagesU/notice/subjectList')">
|
<view class="cate-item" @click="navToTabPage('/pagesU/notice/subjectList')">
|
||||||
<image src="/static/njfw_icon.png"></image>
|
<image src="/static/njfw_icon.png"></image>
|
||||||
<text>农机服务</text>
|
<text>农机服务</text>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 秒杀楼层 https://s.click.taobao.com/Wds7c1w -->
|
<!-- 秒杀楼层 https://s.click.taobao.com/Wds7c1w -->
|
||||||
<view class="seckill-section m-t"
|
<!-- <view class="seckill-section m-t"
|
||||||
v-if="homeFlashPromotion.flashSessionInfoList && homeFlashPromotion.flashSessionInfoList.length > 0">
|
v-if="homeFlashPromotion.flashSessionInfoList && homeFlashPromotion.flashSessionInfoList.length > 0">
|
||||||
<view class="s-header">
|
<view class="s-header">
|
||||||
<view class="" style="width: 80%;display: flex;flex-direction: row;align-items: center;">
|
<view class="" style="width: 80%;display: flex;flex-direction: row;align-items: center;">
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view class="f-header m-t" @click="navToTabPage('../../pagesC/store/storeList')">
|
<!-- <view class="f-header m-t" @click="navToTabPage('../../pagesC/store/storeList')">
|
||||||
<image src="/static/temp/nav1.png"></image>
|
<image src="/static/temp/nav1.png"></image>
|
||||||
<view class="tit-box">
|
<view class="tit-box">
|
||||||
@@ -112,9 +112,10 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 优惠券 https://s.click.taobao.com/OPh3c1w -->
|
<!-- 优惠券 https://s.click.taobao.com/OPh3c1w -->
|
||||||
<coupon v-for="(item, index) in couponList" :key="index" v-bind:item="item" theme="#ff0000"></coupon>
|
<coupon v-for="(item, index) in couponList" :key="index" v-bind:item="item" theme="#ff0000" ref="SubComponent"
|
||||||
|
@callParentMethod="callParentMethod"></coupon>
|
||||||
|
|
||||||
<!-- 团购楼层 -->
|
<!-- 团购楼层
|
||||||
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/groupList')"
|
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/groupList')"
|
||||||
v-if="groupHotGoodsList.length > 0">
|
v-if="groupHotGoodsList.length > 0">
|
||||||
<image src="/static/temp/h1.png"></image>
|
<image src="/static/temp/h1.png"></image>
|
||||||
@@ -144,10 +145,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 分类推荐楼层 -->
|
<!-- 分类推荐楼层 -->
|
||||||
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')" v-if="false">
|
<!-- <view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')" v-if="false">
|
||||||
<image src="/static/temp/h1.png"></image>
|
<image src="/static/temp/h1.png"></image>
|
||||||
<view class="tit-box">
|
<view class="tit-box">
|
||||||
<text class="tit">分类精选</text>
|
<text class="tit">分类精选</text>
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 新品推荐 -->
|
<!-- 新品推荐 -->
|
||||||
<view v-if='homeNewProductList && homeNewProductList.length>0' class="f-header m-t"
|
<view v-if='homeNewProductList && homeNewProductList.length>0' class="f-header m-t"
|
||||||
@@ -193,7 +194,7 @@
|
|||||||
<text class="title clamp">{{ item.productName }}</text>
|
<text class="title clamp">{{ item.productName }}</text>
|
||||||
<view>
|
<view>
|
||||||
<text class="price">惠农价¥{{ item.price }}</text>
|
<text class="price">惠农价¥{{ item.price }}</text>
|
||||||
<!-- <text class="m-price"> 县区商超价¥{{ item.price }}</text> -->
|
<text class="m-price">市场价¥{{ item.originalPrice }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@@ -219,17 +220,19 @@
|
|||||||
<text class="title clamp">{{ item.productName }}</text>
|
<text class="title clamp">{{ item.productName }}</text>
|
||||||
<view>
|
<view>
|
||||||
<text class="price">惠农价¥{{ item.price }}</text>
|
<text class="price">惠农价¥{{ item.price }}</text>
|
||||||
<!-- <text class="m-price">县区商超价¥{{ item.price }}</text> -->
|
<text class="m-price">市场价¥{{ item.originalPrice }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 新品上市 -->
|
<!-- 新品上市 -->
|
||||||
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')">
|
|
||||||
|
<!-- <view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list')"> -->
|
||||||
|
<view class="f-header m-t" @click="navToTabPage('../../pagesA/product/list?isFenxiao=1')">
|
||||||
<image src="/static/temp/h1.png"></image>
|
<image src="/static/temp/h1.png"></image>
|
||||||
<view class="tit-box">
|
<view class="tit-box">
|
||||||
<text class="tit">新品上市</text>
|
<text class="tit">商品列表</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="yticon icon-you"></text>
|
<text class="yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
@@ -241,11 +244,14 @@
|
|||||||
<image :src="item.pic" mode="aspectFill"></image>
|
<image :src="item.pic" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="title clamp">{{ item.name }}</text>
|
<text class="title clamp">{{ item.name }}</text>
|
||||||
<!-- <text class="label">【{{ item.storeName }}】</text> -->
|
<view>
|
||||||
<text class="price">惠农价¥{{ item.price }}</text>
|
<text class="price">惠农价¥{{ item.price }}</text>
|
||||||
|
<text class="m-price">市场价¥{{ item.originalPrice }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more :status="loadingType"></uni-load-more>
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
</view>
|
|
||||||
<!-- <mallplusCopyright></mallplusCopyright> -->
|
<!-- <mallplusCopyright></mallplusCopyright> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -355,6 +361,20 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clickParentMethod() {
|
||||||
|
console.log('clickParentMethod')
|
||||||
|
this.$refs.SubComponent.callSubMethod()
|
||||||
|
},
|
||||||
|
callParentMethod(val) {
|
||||||
|
console.log('callParentMethod: ' + val)
|
||||||
|
// 默认去遍历list集合,将集合中的每个元素传入到function的item里,
|
||||||
|
var index = this.couponList.findIndex(function(item) {
|
||||||
|
return item.id == val.id;
|
||||||
|
})
|
||||||
|
this.couponList.splice(index, 1);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
async sysInfoMethod() {
|
async sysInfoMethod() {
|
||||||
let params = {};
|
let params = {};
|
||||||
let list = this.$db.get('sysInfo')
|
let list = this.$db.get('sysInfo')
|
||||||
@@ -435,10 +455,10 @@
|
|||||||
async loadData() {
|
async loadData() {
|
||||||
|
|
||||||
this.getBanner();
|
this.getBanner();
|
||||||
this.getHotGoodsList();
|
// this.getHotGoodsList();
|
||||||
//this.getFlashPromotion();
|
//this.getFlashPromotion();
|
||||||
this.getCouponList();
|
this.getCouponList();
|
||||||
this.getStoreList();
|
// this.getStoreList();
|
||||||
this.homeNewProduct();
|
this.homeNewProduct();
|
||||||
this.homeRecommendProduct();
|
this.homeRecommendProduct();
|
||||||
|
|
||||||
@@ -532,9 +552,16 @@
|
|||||||
} else {
|
} else {
|
||||||
this.loadingType = 'more';
|
this.loadingType = 'more';
|
||||||
}
|
}
|
||||||
|
// let params = {
|
||||||
|
// pageNum: this.pageNum
|
||||||
|
// };
|
||||||
let params = {
|
let params = {
|
||||||
pageNum: this.pageNum
|
pageNum: this.pageNum,
|
||||||
};
|
productCategoryId: "",
|
||||||
|
type: 1,
|
||||||
|
productAttributeCategoryId: ""
|
||||||
|
};;
|
||||||
|
|
||||||
let list = await Api.apiCall('get', Api.goods.goodsList, params);
|
let list = await Api.apiCall('get', Api.goods.goodsList, params);
|
||||||
|
|
||||||
let goodsList = list.records;
|
let goodsList = list.records;
|
||||||
@@ -1038,10 +1065,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm;
|
||||||
text-decoration: line-through;
|
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 8upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1140,10 +1166,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm;
|
||||||
text-decoration: line-through;
|
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 8upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pro-box {
|
.pro-box {
|
||||||
@@ -1207,16 +1232,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-price {
|
.m-price {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm;
|
||||||
text-decoration: line-through;
|
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
margin-left: 8upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon_box {
|
.coupon_box {
|
||||||
|
|||||||
98
mallplusui-uniapp-app/pages/index/messageDetail.vue
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="introduce-section">
|
||||||
|
<text class="title">{{ info.params }}</text>
|
||||||
|
|
||||||
|
<view class="bot-row">
|
||||||
|
<text>{{ info.code }}</text>
|
||||||
|
<text>{{ info.ctime | formatCreateTime }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="c-list">
|
||||||
|
<text >{{ info.content }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Api from '@/common/api';
|
||||||
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
async onLoad() {
|
||||||
|
|
||||||
|
// 别问我啥意思。这是官方文档提供的
|
||||||
|
this.page = this.getOpenerEventChannel();
|
||||||
|
// 你可以在这里直接接受,这里不是$on
|
||||||
|
this.page.on('sendTestValue', (data) => {
|
||||||
|
// 这是data 就是上个页面传递的对象了
|
||||||
|
console.log("消息", data)
|
||||||
|
this.info = data.info
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
formatCreateTime(time) {
|
||||||
|
let date = new Date(time);
|
||||||
|
return formatDate(date, 'MM-dd')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background: $page-color-base;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 标题简介 */
|
||||||
|
.introduce-section {
|
||||||
|
background: #fff;
|
||||||
|
padding: 20upx 30upx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32upx;
|
||||||
|
color: $font-color-dark;
|
||||||
|
height: 50upx;
|
||||||
|
line-height: 50upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bot-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 50upx;
|
||||||
|
font-size: $font-sm;
|
||||||
|
color: $font-color-light;
|
||||||
|
|
||||||
|
text {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-list {
|
||||||
|
display: flex;
|
||||||
|
margin-top: 10px;
|
||||||
|
height: 850px;
|
||||||
|
padding: 10rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
296
mallplusui-uniapp-app/pages/index/messageList.vue
Normal file
@@ -0,0 +1,296 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="goods-list">
|
||||||
|
<view v-for="(item, index) in goodsList" :key="index" class="goods-item">
|
||||||
|
<view class="listcard" @click="navToDetailPage(item)">
|
||||||
|
<view class="listcard-image">
|
||||||
|
<image :src="item.code=='交易物流'?pic1:pic2" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="listcard-content">
|
||||||
|
<view class="listcard-content_title">
|
||||||
|
<text>{{item.code}}</text>
|
||||||
|
<text class="text2">{{item.ctime | formatCreateTime }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="listcard-content_title_text">{{item.params}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <uni-load-more :status="loadingType"></uni-load-more> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Api from '@/common/api';
|
||||||
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageNum: 1,
|
||||||
|
pic2: "https://desk-fd.zol-img.com.cn/t_s960x600c5/g1/M0B/03/06/ChMljl402K6IOTZbAARWayFg6S4AAQJPwFhuRIABFaD752.jpg",
|
||||||
|
pic1: "https://ts1.cn.mm.bing.net/th/id/R-C.2ce48cd4a70b48403a56e9ea8c710355?rik=tU9CL%2fR0TMLEYA&riu=http%3a%2f%2fwww.kutoo8.com%2fupload%2fimage%2f63051471%2f4_1920x1080.jpg&ehk=wZm6BwD%2b8TIDXmqxTntxftDP8IzjD8g3hhI6bEwdb54%3d&risl=&pid=ImgRaw&r=0",
|
||||||
|
goodsList: [
|
||||||
|
// {
|
||||||
|
// title: "交易物流",
|
||||||
|
// pic: "https://desk-fd.zol-img.com.cn/t_s960x600c5/g1/M0B/03/06/ChMljl402K6IOTZbAARWayFg6S4AAQJPwFhuRIABFaD752.jpg",
|
||||||
|
// createTime: "02-12",
|
||||||
|
// content: "您的订单商品已经到取货点,请在7日内取出。",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "云链助手",
|
||||||
|
// pic: "https://ts1.cn.mm.bing.net/th/id/R-C.2ce48cd4a70b48403a56e9ea8c710355?rik=tU9CL%2fR0TMLEYA&riu=http%3a%2f%2fwww.kutoo8.com%2fupload%2fimage%2f63051471%2f4_1920x1080.jpg&ehk=wZm6BwD%2b8TIDXmqxTntxftDP8IzjD8g3hhI6bEwdb54%3d&risl=&pid=ImgRaw&r=0",
|
||||||
|
// createTime: "01-10",
|
||||||
|
// content: "春天已经至,已到施肥时间。",
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
// #ifdef H5
|
||||||
|
this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// this.loadData();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
//兼容iOS端下拉时顶部漂移
|
||||||
|
// if (e.scrollTop >= 0) {
|
||||||
|
// this.headerPosition = 'fixed';
|
||||||
|
// } else {
|
||||||
|
// this.headerPosition = 'absolute';
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
//下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.pageNum = this.pageNum + 1;
|
||||||
|
this.loadData('refresh');
|
||||||
|
},
|
||||||
|
//加载更多
|
||||||
|
onReachBottom() {
|
||||||
|
this.pageNum = this.pageNum + 1;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
formatCreateTime(time) {
|
||||||
|
let date = new Date(time);
|
||||||
|
return formatDate(date, 'MM-dd')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//加载商品 ,带下拉刷新和上滑加载
|
||||||
|
async loadData(type = 'add', loading) {
|
||||||
|
//没有更多直接返回
|
||||||
|
if (type === 'add') {
|
||||||
|
if (this.loadingType === 'nomore') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loadingType = 'loading';
|
||||||
|
} else {
|
||||||
|
this.loadingType = 'more';
|
||||||
|
}
|
||||||
|
let params = {};
|
||||||
|
|
||||||
|
|
||||||
|
let list = await Api.apiCall('get', Api.member.mesList, params);
|
||||||
|
console.log("消息列表", list)
|
||||||
|
this.goodsList = list;
|
||||||
|
// let goodsList = await this.$api.json('goodsList');
|
||||||
|
// if (type === 'refresh') {
|
||||||
|
// this.goodsList = [];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//详情
|
||||||
|
navToDetailPage(item) {
|
||||||
|
console.log("消息>>>>", item)
|
||||||
|
//测试数据没有写id,用title代替
|
||||||
|
// let id = item.id;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/messageDetail',
|
||||||
|
// 版本2.8.9+ 支持
|
||||||
|
success: (res) => {
|
||||||
|
// 和上面其实没差什么,但是这种方式是可以的 这里不是$emit
|
||||||
|
res.eventChannel.emit('sendTestValue', {
|
||||||
|
info: item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
stopPrevent() {}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page,
|
||||||
|
.content {
|
||||||
|
background: $page-color-base;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 15px;
|
||||||
|
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: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 5px;
|
||||||
|
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 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 22px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text2 {
|
||||||
|
color: #999;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.listcard-content_title_text {
|
||||||
|
margin-top: 5px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #999;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-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;
|
||||||
|
font-size: 15px;
|
||||||
|
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>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell>
|
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell>
|
||||||
<list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
|
<list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
|
||||||
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏" @eventClick="navTo('../../pagesU/user/collect')"></list-cell>
|
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏" @eventClick="navTo('../../pagesU/user/collect')"></list-cell>
|
||||||
<list-cell
|
<!-- <list-cell
|
||||||
icon="icon-share cgtt"
|
icon="icon-share cgtt"
|
||||||
iconColor="#0e68d7"
|
iconColor="#0e68d7"
|
||||||
v-if="!userDetailInfo.storeId"
|
v-if="!userDetailInfo.storeId"
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
v-if="userDetailInfo.roomNums"
|
v-if="userDetailInfo.roomNums"
|
||||||
title="社区主页"
|
title="社区主页"
|
||||||
@eventClick="navTo('../../pagesA/build/community')"
|
@eventClick="navTo('../../pagesA/build/community')"
|
||||||
></list-cell>
|
></list-cell> -->
|
||||||
<!-- <list-cell
|
<!-- <list-cell
|
||||||
icon="icon-pinglun-copy"
|
icon="icon-pinglun-copy"
|
||||||
iconColor="#0e68d7"
|
iconColor="#0e68d7"
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
<text class="name">{{ addressData.name }}</text>
|
<text class="name">{{ addressData.name }}</text>
|
||||||
<text class="mobile">{{ addressData.phoneNumber }}</text>
|
<text class="mobile">{{ addressData.phoneNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="address">{{ addressData.province }}-{{ addressData.city }}-{{ addressData.region }}-{{ addressData.detailAddress }}</text>
|
<text
|
||||||
|
class="address">{{ addressData.province }}-{{ addressData.city }}-{{ addressData.region }}-{{ addressData.detailAddress }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cen" v-else>
|
<view class="cen" v-else>
|
||||||
<text>请设置收货地址</text>
|
<text>请设置收货地址</text>
|
||||||
@@ -22,10 +23,9 @@
|
|||||||
<text class="yticon icon-you"></text>
|
<text class="yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<image
|
<image class="a-bg"
|
||||||
class="a-bg"
|
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAFCAYAAAAaAWmiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Rjk3RjkzMjM2NzMxMTFFOUI4RkU4OEZGMDcxQzgzOEYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Rjk3RjkzMjQ2NzMxMTFFOUI4RkU4OEZGMDcxQzgzOEYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOTdGOTMyMTY3MzExMUU5QjhGRTg4RkYwNzFDODM4RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOTdGOTMyMjY3MzExMUU5QjhGRTg4RkYwNzFDODM4RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrEOZlQAAAiuSURBVHjazJp7bFvVHce/1/deXzuJHSdOM+fhpKMllI2SkTZpV6ULYrCHQGwrf41p/LENVk3QTipSWujKoyot1aQN0FYQQxtsMCS2SVuqsfFYHxBKYQNGV9ouZdA8nDipH4mT+HFf+51rO0pN0japrw9HreLe3Pqc3/me3+f3uFdIvfVuDIAPix1C9oceicFRVQWlvRWCkL1omqb1Of9z9rXZY65rhcO6x5ove19oWkX/RAaSMLOEkg+2Zt0wEcvoWOZzYZnXeWEbzmP7XPs11//LnOiDEY9DkGRwGw5a59QUTM2As+1qiD5v0TUvvC9Bc52KpmDSnju4ic7+CIinNVQoElYtcUM8jx2L1bzwPn14DOrHZ0hzEdxOPJtW16FH45CvuBzyZU22aH7Od9LnU/E0xpMqJG6iZ309qeqYNoA1gTJ4ZdF2zY2pJNSTfYCmkb85+GnO1hIbh+DzQVndaiHYTs3ZGJpifE/DyVnzi+X7pWqen8/i+8kPYUSjEORPCd9XtUKs9Fi+KMxjVzE0n9ZNnIgkYXwK+B5LafC4JKyudcMxD2+LqblGfNcY30VxJsfhcOCJ7xr02ATkluXE96DtmrPvPxFLIUH7zY3vOc0Z39O0oGtqy1DlFIuu+Zx8P/Ffa8/hEBey4rh0uuPWS6S6CRUhyGjG0hcfOWex+c9zXSsE5HmFzseP3H294Sl847VBRGJJQHTwy9wJNKAE7otLfXi2K3hRgeB81+bar8IDEPvFMxi6cxebnMx2cjrnDmiIwUAGDTvugX9de9E1L7R9NK1jc+8gnj8dy2rOKY/JRhgV8Cr405ea0HEBOxajeaHtySPvYvD2bUgdP0lmuzkl7oLl6Wn0wX/Dd1D/xG5bNc/f+7NjY9jyzghlM5QxS/ySOGt+Wlt3WwDXBz22a86gHrqjG7Hnekhz5uciN9NVDEBxXYng87vgEoqveZ7y+XsPE99vOTyAs1SkU+bOT3NKIJHUsIb4/rsL8L0YmrMRffQ3GNn8c6L7BOnu4pW10/xR4nsK9T+5FzWda2fXcEXTfLbtYUrc7joSwguno9kilZfsLNmgtaBcxv7rmudN2i9Fc8YRlsvkr6aOvoeBHxDf//MBzVfGke9p8vVhVN2wAQ1P7rFdczYeO34Wm4+Gsr4mcqzWMqQ5IX5rex3W1pUXX/PCRlwkjpEtDyLy9B8sPxcgLWzFpy7rWlTH3eq66AbUj0fh7lyJhn27oFzVck41mTdgdnU5+3fzbczsqqVwQ14aSuCrhwZoo3UEqCLW6biZJZZZom0e0UhlSiY3rvBjd0cdfLJjTrsXYvN8e5TvPEZ2PYbw9l9CrKqAWFNB+2+W/oiTc2l9BFefC/WPdqPyuxts1/zMlIrbqVB7OZSgaSWrC2eUWHUGcLa2MVrLyho3ftvVhNYq1ye6J8XUnI3JFw8idNdOaB+GIS+vsZhf6gMvsP1OJKGFx1H9o1sQeOSBXOcfc9pQDM3Z2PGvEeykxJ0l7AGaTyux4YKVLpOvs0BO/v0UQf17LdUzwdcskuaFHRo1NIrQxq1I9ByEc2kj+ZwDZsk1z/H9I+L7us+j4fHdUFa2FF3zQtv3DyTwrTcGoVFxXOeWKZEoPeNm+E66b7zSj71r6+ERHXN21C5V85nPmo7I3scRvncfxOoyiP7y0vNdyMZ17X9xmGR+43MPwvvtm23XnPH9h68P4u8U2yuJ7wonvmu0pigValf73XhmfRCt1S5bNbd6QK/0ov+2bhjDE8T3aj58p5hujCehjsZQs+lWLNl5N0RvuS2a5z/T8cLOd8K4/72wxdaAXHq+syGT7sOM7xLxvaOe+F5lu+bqYBjDd25H4s+vQ26ugSBL1lsEC+m4C8fQvMhXZXTa/CR8N96MekrapWCdvc1t+rvn32PY3juYrc7cEjjonFuMYQm97QsBPLSq1v7pKJAPbbwHZ3ueoqCyhJIJStqto8/BdMTh8q1A8PcPo+xrXbbP97ehSXydFWpjU0CZzO8xInM+CqSdTV688OVmBBT7O6DRh/dhYOt20nqSdK+f1RIqdRMqRXgrR90Dm+Dfsdn2+QYpeH7/8CBe+mAsq7nIsevKEjivgv1dQdzYUGH7dMlXe3FmwxZMTRyFgiZkW48mF0/XMYWqm75JfH8IUmPA1tlUMnHv+8T3N3J8d3Hkey6I3re6Djvaam1v/urhswjdsQ2jf/kVJRI1xHdPrh1lltzTWUxXai5H07N74P7KettnPDQyjWtf/ohglyJfl7jz/drP+vDrzgYsLZdtP2PRnz6B/u4t9I+U9cYCH81hddoFuBG4bxNq7v9xSfh+G/H9wKkIwF5JkR38fF3VLb73dDXhpsYS8P0Vxve7MZ14E04EkX2SumDj40Lkjz2LS9x1nZVqcK1rh1L/GaiZDB1GYwGPRi9+sA4r63odGEjAoKTZS0mTwUtoS2sTPioc1jd64KJqNZXRP9EtLFrLT5KQOd6H1JtvQ/SUQ1CUC1Z/tjp5MgXn51bAfc1VpAUVb6pqi+bsqRlrOB0ITSI0kUa1IvF7JcribPbxZnt9BYIeBZm0ap1BO2yHLMOIxjH111chmDocXg9XzZFR4fD74e5cA9GtQEulbLGbfaNMvv4+BfG3hiet9wxlUeDGdDPn68uqXVgVKKezbiBN/HHYoTnrqlORkDx0BHr/ABzVVbknbZysZ3wnRVyda6HU1UIjvpt28p2C+T+GEtYeeEh3jqcdKjl2BcWY65q9UAQb+c6+k3iePnaS+P5Pq8spOJ38fJ09RVI1OFuWo6xtJXSD+J6xh++OHN8PEt8HxtNY4pbAczC+m2Rnh8V3J9Q0Fa4LeG97YQdehj4aoSL9NZiZNMTKStp6g5/x5NsW37vWQaS1WXzPHvjihzYS/lgshbeJ75WySHm7wNXXk8SbK/xutOX4ntHtYRxE0eJn6uARaGf6ie++7GPNxVkf/78AAwCn1+RYqusbZQAAAABJRU5ErkJggg==">
|
||||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAFCAYAAAAaAWmiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Rjk3RjkzMjM2NzMxMTFFOUI4RkU4OEZGMDcxQzgzOEYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Rjk3RjkzMjQ2NzMxMTFFOUI4RkU4OEZGMDcxQzgzOEYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOTdGOTMyMTY3MzExMUU5QjhGRTg4RkYwNzFDODM4RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOTdGOTMyMjY3MzExMUU5QjhGRTg4RkYwNzFDODM4RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrEOZlQAAAiuSURBVHjazJp7bFvVHce/1/deXzuJHSdOM+fhpKMllI2SkTZpV6ULYrCHQGwrf41p/LENVk3QTipSWujKoyot1aQN0FYQQxtsMCS2SVuqsfFYHxBKYQNGV9ouZdA8nDipH4mT+HFf+51rO0pN0japrw9HreLe3Pqc3/me3+f3uFdIvfVuDIAPix1C9oceicFRVQWlvRWCkL1omqb1Of9z9rXZY65rhcO6x5ove19oWkX/RAaSMLOEkg+2Zt0wEcvoWOZzYZnXeWEbzmP7XPs11//LnOiDEY9DkGRwGw5a59QUTM2As+1qiD5v0TUvvC9Bc52KpmDSnju4ic7+CIinNVQoElYtcUM8jx2L1bzwPn14DOrHZ0hzEdxOPJtW16FH45CvuBzyZU22aH7Od9LnU/E0xpMqJG6iZ309qeqYNoA1gTJ4ZdF2zY2pJNSTfYCmkb85+GnO1hIbh+DzQVndaiHYTs3ZGJpifE/DyVnzi+X7pWqen8/i+8kPYUSjEORPCd9XtUKs9Fi+KMxjVzE0n9ZNnIgkYXwK+B5LafC4JKyudcMxD2+LqblGfNcY30VxJsfhcOCJ7xr02ATkluXE96DtmrPvPxFLIUH7zY3vOc0Z39O0oGtqy1DlFIuu+Zx8P/Ffa8/hEBey4rh0uuPWS6S6CRUhyGjG0hcfOWex+c9zXSsE5HmFzseP3H294Sl847VBRGJJQHTwy9wJNKAE7otLfXi2K3hRgeB81+bar8IDEPvFMxi6cxebnMx2cjrnDmiIwUAGDTvugX9de9E1L7R9NK1jc+8gnj8dy2rOKY/JRhgV8Cr405ea0HEBOxajeaHtySPvYvD2bUgdP0lmuzkl7oLl6Wn0wX/Dd1D/xG5bNc/f+7NjY9jyzghlM5QxS/ySOGt+Wlt3WwDXBz22a86gHrqjG7Hnekhz5uciN9NVDEBxXYng87vgEoqveZ7y+XsPE99vOTyAs1SkU+bOT3NKIJHUsIb4/rsL8L0YmrMRffQ3GNn8c6L7BOnu4pW10/xR4nsK9T+5FzWda2fXcEXTfLbtYUrc7joSwguno9kilZfsLNmgtaBcxv7rmudN2i9Fc8YRlsvkr6aOvoeBHxDf//MBzVfGke9p8vVhVN2wAQ1P7rFdczYeO34Wm4+Gsr4mcqzWMqQ5IX5rex3W1pUXX/PCRlwkjpEtDyLy9B8sPxcgLWzFpy7rWlTH3eq66AbUj0fh7lyJhn27oFzVck41mTdgdnU5+3fzbczsqqVwQ14aSuCrhwZoo3UEqCLW6biZJZZZom0e0UhlSiY3rvBjd0cdfLJjTrsXYvN8e5TvPEZ2PYbw9l9CrKqAWFNB+2+W/oiTc2l9BFefC/WPdqPyuxts1/zMlIrbqVB7OZSgaSWrC2eUWHUGcLa2MVrLyho3ftvVhNYq1ye6J8XUnI3JFw8idNdOaB+GIS+vsZhf6gMvsP1OJKGFx1H9o1sQeOSBXOcfc9pQDM3Z2PGvEeykxJ0l7AGaTyux4YKVLpOvs0BO/v0UQf17LdUzwdcskuaFHRo1NIrQxq1I9ByEc2kj+ZwDZsk1z/H9I+L7us+j4fHdUFa2FF3zQtv3DyTwrTcGoVFxXOeWKZEoPeNm+E66b7zSj71r6+ERHXN21C5V85nPmo7I3scRvncfxOoyiP7y0vNdyMZ17X9xmGR+43MPwvvtm23XnPH9h68P4u8U2yuJ7wonvmu0pigValf73XhmfRCt1S5bNbd6QK/0ov+2bhjDE8T3aj58p5hujCehjsZQs+lWLNl5N0RvuS2a5z/T8cLOd8K4/72wxdaAXHq+syGT7sOM7xLxvaOe+F5lu+bqYBjDd25H4s+vQ26ugSBL1lsEC+m4C8fQvMhXZXTa/CR8N96MekrapWCdvc1t+rvn32PY3juYrc7cEjjonFuMYQm97QsBPLSq1v7pKJAPbbwHZ3ueoqCyhJIJStqto8/BdMTh8q1A8PcPo+xrXbbP97ehSXydFWpjU0CZzO8xInM+CqSdTV688OVmBBT7O6DRh/dhYOt20nqSdK+f1RIqdRMqRXgrR90Dm+Dfsdn2+QYpeH7/8CBe+mAsq7nIsevKEjivgv1dQdzYUGH7dMlXe3FmwxZMTRyFgiZkW48mF0/XMYWqm75JfH8IUmPA1tlUMnHv+8T3N3J8d3Hkey6I3re6Djvaam1v/urhswjdsQ2jf/kVJRI1xHdPrh1lltzTWUxXai5H07N74P7KettnPDQyjWtf/ohglyJfl7jz/drP+vDrzgYsLZdtP2PRnz6B/u4t9I+U9cYCH81hddoFuBG4bxNq7v9xSfh+G/H9wKkIwF5JkR38fF3VLb73dDXhpsYS8P0Vxve7MZ14E04EkX2SumDj40Lkjz2LS9x1nZVqcK1rh1L/GaiZDB1GYwGPRi9+sA4r63odGEjAoKTZS0mTwUtoS2sTPioc1jd64KJqNZXRP9EtLFrLT5KQOd6H1JtvQ/SUQ1CUC1Z/tjp5MgXn51bAfc1VpAUVb6pqi+bsqRlrOB0ITSI0kUa1IvF7JcribPbxZnt9BYIeBZm0ap1BO2yHLMOIxjH111chmDocXg9XzZFR4fD74e5cA9GtQEulbLGbfaNMvv4+BfG3hiet9wxlUeDGdDPn68uqXVgVKKezbiBN/HHYoTnrqlORkDx0BHr/ABzVVbknbZysZ3wnRVyda6HU1UIjvpt28p2C+T+GEtYeeEh3jqcdKjl2BcWY65q9UAQb+c6+k3iePnaS+P5Pq8spOJ38fJ09RVI1OFuWo6xtJXSD+J6xh++OHN8PEt8HxtNY4pbAczC+m2Rnh8V3J9Q0Fa4LeG97YQdehj4aoSL9NZiZNMTKStp6g5/x5NsW37vWQaS1WXzPHvjihzYS/lgshbeJ75WySHm7wNXXk8SbK/xutOX4ntHtYRxE0eJn6uARaGf6ie++7GPNxVkf/78AAwCn1+RYqusbZQAAAABJRU5ErkJggg=="
|
</image>
|
||||||
></image>
|
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<view class="goods-section">
|
<view class="goods-section">
|
||||||
@@ -45,12 +45,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="hot-floor" v-if="item1.giftsList && item1.giftsList.length > 0" v-for="(item1, index1) in basicGiftsList" :key="index1">
|
<view class="hot-floor" v-if="item1.giftsList && item1.giftsList.length > 0"
|
||||||
|
v-for="(item1, index1) in basicGiftsList" :key="index1">
|
||||||
<view class="floor-img-box"> <text class="name">{{ item1.name }}</text></view>
|
<view class="floor-img-box"> <text class="name">{{ item1.name }}</text></view>
|
||||||
|
|
||||||
<scroll-view class="floor-list" scroll-x>
|
<scroll-view class="floor-list" scroll-x>
|
||||||
<view class="scoll-wrapper">
|
<view class="scoll-wrapper">
|
||||||
<view v-for="(item, index) in item1.giftsList" :key="index" class="floor-item" >
|
<view v-for="(item, index) in item1.giftsList" :key="index" class="floor-item">
|
||||||
<image :src="item.pic" mode="aspectFill"></image>
|
<image :src="item.pic" mode="aspectFill"></image>
|
||||||
<text class="title clamp">{{ item.name }}</text>
|
<text class="title clamp">{{ item.name }}</text>
|
||||||
<text class="price" v-if="item.rule">¥{{ item.price }}</text>
|
<text class="price" v-if="item.rule">¥{{ item.price }}</text>
|
||||||
@@ -142,9 +143,13 @@
|
|||||||
|
|
||||||
<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 { formatDate } from '@/common/date';
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
import {
|
||||||
|
formatDate
|
||||||
|
} from '@/common/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -158,26 +163,26 @@ import Api from '@/common/api';
|
|||||||
type: 1,
|
type: 1,
|
||||||
groupType: '',
|
groupType: '',
|
||||||
/* memberIntegration:0, */
|
/* memberIntegration:0, */
|
||||||
groupActivityId:'',
|
groupActivityId: '',
|
||||||
basicGiftsVar:'',
|
basicGiftsVar: '',
|
||||||
skillId:0,
|
skillId: 0,
|
||||||
goodsId: 0,
|
goodsId: 0,
|
||||||
skuId:0,
|
skuId: 0,
|
||||||
mgId: 0,
|
mgId: 0,
|
||||||
cartId: '',
|
cartId: '',
|
||||||
cartIds: '',
|
cartIds: '',
|
||||||
addressId: '',
|
addressId: '',
|
||||||
couponId: '',
|
couponId: '',
|
||||||
memberCouponId:'',
|
memberCouponId: '',
|
||||||
coupon:{
|
coupon: {
|
||||||
amount:0,
|
amount: 0,
|
||||||
coupon:{
|
coupon: {
|
||||||
amount:0
|
amount: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groupActivity:null,
|
groupActivity: null,
|
||||||
memberReceiveAddressList: [],
|
memberReceiveAddressList: [],
|
||||||
basicGiftsList:[],
|
basicGiftsList: [],
|
||||||
cartPromotionItemList: [],
|
cartPromotionItemList: [],
|
||||||
calcAmount: {
|
calcAmount: {
|
||||||
totalAmount: 0,
|
totalAmount: 0,
|
||||||
@@ -197,18 +202,20 @@ import Api from '@/common/api';
|
|||||||
async onLoad(opt) {
|
async onLoad(opt) {
|
||||||
let option = JSON.parse(opt.dataJson);
|
let option = JSON.parse(opt.dataJson);
|
||||||
console.log(option)
|
console.log(option)
|
||||||
this.skuId = option.skuId==undefined?'':option.skuId;
|
this.skuId = option.skuId == undefined ? '' : option.skuId;
|
||||||
this.goodsId = option.goodsId;
|
this.goodsId = option.goodsId;
|
||||||
|
|
||||||
let data;
|
let data;
|
||||||
this.type = option.type;
|
this.type = option.type;
|
||||||
if (option.groupActivityId) { // 团购
|
if (option.groupActivityId) { // 团购
|
||||||
let params = { groupId: option.groupActivityId };
|
let params = {
|
||||||
|
groupId: option.groupActivityId
|
||||||
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preGroupActivityOrder, params);
|
data = await Api.apiCall('get', Api.order.preGroupActivityOrder, params);
|
||||||
this.groupActivityId=option.groupActivityId;
|
this.groupActivityId = option.groupActivityId;
|
||||||
this.groupActivity=data.groupActivity;
|
this.groupActivity = data.groupActivity;
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
}else{
|
} else {
|
||||||
if (option.groupType) { // 拼团
|
if (option.groupType) { // 拼团
|
||||||
this.groupType = option.groupType;
|
this.groupType = option.groupType;
|
||||||
this.goodsId = option.id;
|
this.goodsId = option.id;
|
||||||
@@ -216,23 +223,42 @@ import Api from '@/common/api';
|
|||||||
|
|
||||||
this.groupId = option.groupId;
|
this.groupId = option.groupId;
|
||||||
if (this.skuId) {
|
if (this.skuId) {
|
||||||
let params = { orderType:2, groupId: option.groupId, goodsId: option.id, skuId: this.skuId };
|
let params = {
|
||||||
|
orderType: 2,
|
||||||
|
groupId: option.groupId,
|
||||||
|
goodsId: option.id,
|
||||||
|
skuId: this.skuId
|
||||||
|
};
|
||||||
data = await Api.apiCall('post', Api.order.addGroup, params);
|
data = await Api.apiCall('post', Api.order.addGroup, params);
|
||||||
} else {
|
} else {
|
||||||
let params = { orderType:2, groupId: option.groupId, goodsId: option.id };
|
let params = {
|
||||||
|
orderType: 2,
|
||||||
|
groupId: option.groupId,
|
||||||
|
goodsId: option.id
|
||||||
|
};
|
||||||
data = await Api.apiCall('post', Api.order.addGroup, params);
|
data = await Api.apiCall('post', Api.order.addGroup, params);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (option.type == 1) { // 详情
|
if (option.type == 1) { // 详情
|
||||||
this.cartId = option.id;
|
this.cartId = option.id;
|
||||||
let params = { goodsId: option.goodsId,skuId: this.skuId, type: option.type };
|
let params = {
|
||||||
|
goodsId: option.goodsId,
|
||||||
|
skuId: this.skuId,
|
||||||
|
type: option.type
|
||||||
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
} else if (option.type == 2) { // 购物车
|
} else if (option.type == 2) { // 购物车
|
||||||
let params = { cartIds: option.cartIds, type: option.type };
|
let params = {
|
||||||
|
cartIds: option.cartIds,
|
||||||
|
type: option.type
|
||||||
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
this.cartIds = option.cartIds;
|
this.cartIds = option.cartIds;
|
||||||
}else if (option.type == 6) { // 秒杀
|
} else if (option.type == 6) { // 秒杀
|
||||||
let params = { skillId: option.skillId, type: option.type };
|
let params = {
|
||||||
|
skillId: option.skillId,
|
||||||
|
type: option.type
|
||||||
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
this.skillId = option.skillId;
|
this.skillId = option.skillId;
|
||||||
}
|
}
|
||||||
@@ -248,20 +274,20 @@ import Api from '@/common/api';
|
|||||||
/* this.basicGiftsList = data.basicGiftsList; */
|
/* this.basicGiftsList = data.basicGiftsList; */
|
||||||
|
|
||||||
if (this.basicGiftsList) {
|
if (this.basicGiftsList) {
|
||||||
let basicGiftsVar ='';
|
let basicGiftsVar = '';
|
||||||
let basicGiftsVar1 ='';
|
let basicGiftsVar1 = '';
|
||||||
this.basicGiftsList.forEach(item => {
|
this.basicGiftsList.forEach(item => {
|
||||||
basicGiftsVar1=basicGiftsVar1+item.id+':';
|
basicGiftsVar1 = basicGiftsVar1 + item.id + ':';
|
||||||
console.log('1='+item.giftsList);
|
console.log('1=' + item.giftsList);
|
||||||
if (item.giftsList ) {
|
if (item.giftsList) {
|
||||||
item.giftsList.forEach(item1 => {
|
item.giftsList.forEach(item1 => {
|
||||||
basicGiftsVar1 = basicGiftsVar1 + item1.id + ',';
|
basicGiftsVar1 = basicGiftsVar1 + item1.id + ',';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
basicGiftsVar=basicGiftsVar+basicGiftsVar1.substr(0, basicGiftsVar1.length - 1)+'@';
|
basicGiftsVar = basicGiftsVar + basicGiftsVar1.substr(0, basicGiftsVar1.length - 1) + '@';
|
||||||
basicGiftsVar1='';
|
basicGiftsVar1 = '';
|
||||||
});
|
});
|
||||||
this.basicGiftsVar=basicGiftsVar.substr(0, basicGiftsVar.length - 1);
|
this.basicGiftsVar = basicGiftsVar.substr(0, basicGiftsVar.length - 1);
|
||||||
console.log(this.basicGiftsVar);
|
console.log(this.basicGiftsVar);
|
||||||
}
|
}
|
||||||
/* this.cartPromotionItemList = data.cartPromotionItemList; */
|
/* this.cartPromotionItemList = data.cartPromotionItemList; */
|
||||||
@@ -270,7 +296,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);
|
console.log("优惠券", data.couponHistoryDetailList);
|
||||||
this.couponList = data.couponHistoryDetailList;
|
this.couponList = data.couponHistoryDetailList;
|
||||||
this.memberReceiveAddressList = data.memberReceiveAddressListaddress;
|
this.memberReceiveAddressList = data.memberReceiveAddressListaddress;
|
||||||
|
|
||||||
@@ -285,14 +311,14 @@ import Api from '@/common/api';
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSource(){
|
getSource() {
|
||||||
let source =Api.source;
|
let source = Api.source;
|
||||||
return source;
|
return source;
|
||||||
},
|
},
|
||||||
selectCoupon(item){
|
selectCoupon(item) {
|
||||||
this.coupon=item.coupon;
|
this.coupon = item.coupon;
|
||||||
this.couponId= item.couponId;
|
this.couponId = item.couponId;
|
||||||
this.memberCouponId=item.id;
|
this.memberCouponId = item.id;
|
||||||
console.log(this.coupon);
|
console.log(this.coupon);
|
||||||
this.toggleMask();
|
this.toggleMask();
|
||||||
},
|
},
|
||||||
@@ -330,7 +356,7 @@ import Api from '@/common/api';
|
|||||||
mgId: this.mgId,
|
mgId: this.mgId,
|
||||||
groupType: this.groupType,
|
groupType: this.groupType,
|
||||||
type: 1,
|
type: 1,
|
||||||
orderType:2,
|
orderType: 2,
|
||||||
skuId: this.skuId,
|
skuId: this.skuId,
|
||||||
goodsId: this.goodsId,
|
goodsId: this.goodsId,
|
||||||
groupId: this.groupId,
|
groupId: this.groupId,
|
||||||
@@ -344,23 +370,57 @@ import Api from '@/common/api';
|
|||||||
} else {
|
} else {
|
||||||
// detail
|
// detail
|
||||||
if (this.type == 1) {
|
if (this.type == 1) {
|
||||||
params = {basicGiftsVar:this.basicGiftsVar,orderType:1, type: 1, goodsId: this.goodsId,skuId: this.skuId, addressId: this.addressId, couponId: this.couponId,memberCouponId: this.memberCouponId, content: this.desc };
|
params = {
|
||||||
|
basicGiftsVar: this.basicGiftsVar,
|
||||||
|
orderType: 1,
|
||||||
|
type: 1,
|
||||||
|
goodsId: this.goodsId,
|
||||||
|
skuId: this.skuId,
|
||||||
|
addressId: this.addressId,
|
||||||
|
couponId: this.couponId,
|
||||||
|
memberCouponId: this.memberCouponId,
|
||||||
|
content: this.desc
|
||||||
|
};
|
||||||
if (this.groupActivityId) {
|
if (this.groupActivityId) {
|
||||||
params = {groupActivityId:this.groupActivityId,orderType:3, type: 1, goodsId: this.goodsId,skuId: this.skuId, addressId: this.addressId, couponId: this.couponId,memberCouponId: this.memberCouponId, content: this.desc };
|
params = {
|
||||||
|
groupActivityId: this.groupActivityId,
|
||||||
|
orderType: 3,
|
||||||
|
type: 1,
|
||||||
|
goodsId: this.goodsId,
|
||||||
|
skuId: this.skuId,
|
||||||
|
addressId: this.addressId,
|
||||||
|
couponId: this.couponId,
|
||||||
|
memberCouponId: this.memberCouponId,
|
||||||
|
content: this.desc
|
||||||
|
};
|
||||||
}
|
}
|
||||||
params.source = this.getSource();
|
params.source = this.getSource();
|
||||||
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
||||||
}
|
}
|
||||||
// 购物车
|
// 购物车
|
||||||
if (this.type == 2) {
|
if (this.type == 2) {
|
||||||
params = {orderType:1, type: 2, cartIds: this.cartIds, addressId: this.addressId, couponId: this.couponId, content: this.desc };
|
params = {
|
||||||
|
orderType: 1,
|
||||||
|
type: 2,
|
||||||
|
cartIds: this.cartIds,
|
||||||
|
addressId: this.addressId,
|
||||||
|
couponId: this.couponId,
|
||||||
|
content: this.desc
|
||||||
|
};
|
||||||
params.source = this.getSource();
|
params.source = this.getSource();
|
||||||
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 秒杀
|
// 秒杀
|
||||||
if (this.type == 6) {
|
if (this.type == 6) {
|
||||||
params = { type: 6, skillId: this.skillId, addressId: this.addressId, couponId: this.couponId, content: this.desc ,orderType:6};
|
params = {
|
||||||
|
type: 6,
|
||||||
|
skillId: this.skillId,
|
||||||
|
addressId: this.addressId,
|
||||||
|
couponId: this.couponId,
|
||||||
|
content: this.desc,
|
||||||
|
orderType: 6
|
||||||
|
};
|
||||||
params.source = this.getSource();
|
params.source = this.getSource();
|
||||||
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
data = await Api.apiCall('post', Api.order.bookOrder, params);
|
||||||
}
|
}
|
||||||
@@ -369,7 +429,7 @@ import Api from '@/common/api';
|
|||||||
if (data && data.order) {
|
if (data && data.order) {
|
||||||
let id = data.order.id;
|
let id = data.order.id;
|
||||||
// let url = `/pages/money/pay?id=${id}`;
|
// let url = `/pages/money/pay?id=${id}`;
|
||||||
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1' ;
|
let url = '/pages/order/payment/index?order_id=' + data.order.id + '&type=1';
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
@@ -508,6 +568,7 @@ import Api from '@/common/api';
|
|||||||
.price {
|
.price {
|
||||||
margin-bottom: 4upx;
|
margin-bottom: 4upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
font-size: 26upx;
|
font-size: 26upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
@@ -520,6 +581,7 @@ import Api from '@/common/api';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.yt-list {
|
.yt-list {
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -586,6 +648,7 @@ import Api from '@/common/api';
|
|||||||
&.active {
|
&.active {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.red {
|
&.red {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
@@ -609,6 +672,7 @@ import Api from '@/common/api';
|
|||||||
padding-left: 40upx;
|
padding-left: 40upx;
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.pay-item {
|
.pay-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -617,16 +681,19 @@ import Api from '@/common/api';
|
|||||||
height: 110upx;
|
height: 110upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-weixinzhifu {
|
.icon-weixinzhifu {
|
||||||
width: 80upx;
|
width: 80upx;
|
||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
color: #6bcc03;
|
color: #6bcc03;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-alipay {
|
.icon-alipay {
|
||||||
width: 80upx;
|
width: 80upx;
|
||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
color: #06b4fd;
|
color: #06b4fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-xuanzhong2 {
|
.icon-xuanzhong2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -636,6 +703,7 @@ import Api from '@/common/api';
|
|||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
font-size: 32upx;
|
font-size: 32upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
@@ -658,17 +726,21 @@ import Api from '@/common/api';
|
|||||||
z-index: 998;
|
z-index: 998;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
.price-content {
|
.price-content {
|
||||||
padding-left: 30upx;
|
padding-left: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-tip {
|
.price-tip {
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
margin-left: 8upx;
|
margin-left: 8upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 36upx;
|
font-size: 36upx;
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -696,14 +768,18 @@ 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;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.none {
|
&.none {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.show {
|
&.show {
|
||||||
background: rgba(0, 0, 0, 0.4);
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
|
||||||
@@ -719,12 +795,14 @@ import Api from '@/common/api';
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 20upx 24upx;
|
margin: 20upx 24upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.con {
|
.con {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 120upx;
|
height: 120upx;
|
||||||
padding: 0 30upx;
|
padding: 0 30upx;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -736,6 +814,7 @@ import Api from '@/common/api';
|
|||||||
transform: scaleY(50%);
|
transform: scaleY(50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -744,15 +823,18 @@ import Api from '@/common/api';
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 100upx;
|
height: 100upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32upx;
|
font-size: 32upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
margin-bottom: 10upx;
|
margin-bottom: 10upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
font-size: 24upx;
|
font-size: 24upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -762,20 +844,24 @@ import Api from '@/common/api';
|
|||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
height: 100upx;
|
height: 100upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 44upx;
|
font-size: 44upx;
|
||||||
color: $base-color;
|
color: $base-color;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '¥';
|
content: '¥';
|
||||||
font-size: 34upx;
|
font-size: 34upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
font-size: 24upx;
|
font-size: 24upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
line-height: 60upx;
|
line-height: 60upx;
|
||||||
padding-left: 30upx;
|
padding-left: 30upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -6upx;
|
left: -6upx;
|
||||||
@@ -785,22 +871,26 @@ import Api from '@/common/api';
|
|||||||
height: 20upx;
|
height: 20upx;
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
|
|
||||||
&.r {
|
&.r {
|
||||||
left: auto;
|
left: auto;
|
||||||
right: -6upx;
|
right: -6upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 分类推荐楼层 */
|
/* 分类推荐楼层 */
|
||||||
.hot-floor {
|
.hot-floor {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 20upx;
|
margin-bottom: 20upx;
|
||||||
|
|
||||||
.floor-img-box {
|
.floor-img-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 220upx;
|
height: 220upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
padding: 10 30upx;
|
padding: 10 30upx;
|
||||||
content: '';
|
content: '';
|
||||||
@@ -810,15 +900,18 @@ import Api from '@/common/api';
|
|||||||
background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
|
background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font-size: 30upx;
|
font-size: 30upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
margin-left: 24upx;
|
margin-left: 24upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-img {
|
.floor-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-list {
|
.floor-list {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 20upx;
|
padding: 20upx;
|
||||||
@@ -831,25 +924,30 @@ import Api from '@/common/api';
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scoll-wrapper {
|
.scoll-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-item {
|
.floor-item {
|
||||||
width: 180upx;
|
width: 180upx;
|
||||||
margin-right: 20upx;
|
margin-right: 20upx;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 180upx;
|
width: 180upx;
|
||||||
height: 180upx;
|
height: 180upx;
|
||||||
border-radius: 6upx;
|
border-radius: 6upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
color: $uni-color-primary;
|
color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.more {
|
.more {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -862,6 +960,7 @@ import Api from '@/common/api';
|
|||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
font-size: $font-base;
|
font-size: $font-base;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
|
||||||
text:first-child {
|
text:first-child {
|
||||||
margin-bottom: 4upx;
|
margin-bottom: 4upx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -523,7 +523,9 @@
|
|||||||
console.log("1111111111");
|
console.log("1111111111");
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
console.log("22222222222");
|
||||||
that.login(data);
|
that.login(data);
|
||||||
|
console.log("33333333333333");
|
||||||
uni.setStorageSync('userInfos', data.userInfo);
|
uni.setStorageSync('userInfos', data.userInfo);
|
||||||
uni.setStorageSync('token', data.tokenHead + data.token);
|
uni.setStorageSync('token', data.tokenHead + data.token);
|
||||||
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<view class="input-content">
|
<view class="input-content">
|
||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<text class="tit">手机号码</text>
|
<text class="tit">手机号码</text>
|
||||||
<input type="number" v-model="phone" placeholder="请输入手机号码" />
|
<input type="number" v-model="phone" maxlength="11" placeholder="请输入手机号码" />
|
||||||
</view>
|
</view>
|
||||||
<view class="input-item">
|
<view class="input-item">
|
||||||
<text class="tit">密码</text>
|
<text class="tit">密码</text>
|
||||||
@@ -39,18 +39,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapMutations } from 'vuex';
|
import {
|
||||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
mapMutations,
|
||||||
import Api from '@/common/api';
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
|
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||||
|
import Api from '@/common/api';
|
||||||
|
import store from '@/store/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
export default {
|
components: {
|
||||||
components: {
|
|
||||||
mallplusCopyright
|
mallplusCopyright
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
invitecode:'',
|
invitecode: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
password: '',
|
password: '',
|
||||||
confimpassword: '',
|
confimpassword: '',
|
||||||
@@ -58,7 +61,11 @@ components: {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
|
computed: {
|
||||||
|
...mapState(['hasLogin', 'userInfo'])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(['login']),
|
||||||
|
|
||||||
inputChange(e) {
|
inputChange(e) {
|
||||||
const key = e.currentTarget.dataset.key;
|
const key = e.currentTarget.dataset.key;
|
||||||
@@ -69,7 +76,7 @@ components: {
|
|||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toForget(){
|
toForget() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../../pagesU/user/forget'
|
url: '../../pagesU/user/forget'
|
||||||
})
|
})
|
||||||
@@ -80,6 +87,7 @@ components: {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async reg() {
|
async reg() {
|
||||||
|
var that = this;
|
||||||
let phoneReg = /^1[1-9][0-9]\d{8}$/;
|
let phoneReg = /^1[1-9][0-9]\d{8}$/;
|
||||||
try {
|
try {
|
||||||
if (this.phone == '') {
|
if (this.phone == '') {
|
||||||
@@ -96,45 +104,82 @@ components: {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let params ;
|
let params;
|
||||||
//有推荐码的话,带上
|
//有推荐码的话,带上
|
||||||
var invitecode = this.$db.get('invitecode')
|
var invitecode = this.$db.get('invitecode')
|
||||||
if (invitecode) {
|
if (invitecode) {
|
||||||
data.invitecode = invitecode
|
data.invitecode = invitecode
|
||||||
params = { phone: this.phone, password: this.password, confimpassword: this.confimpassword ,source:3,invitecode:invitecode};
|
params = {
|
||||||
}else {
|
phone: this.phone,
|
||||||
params = { phone: this.phone, password: this.password, confimpassword: this.confimpassword ,source:3,invitecode:this.invitecode};
|
password: this.password,
|
||||||
|
confimpassword: this.confimpassword,
|
||||||
|
source: 3,
|
||||||
|
invitecode: invitecode
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
params = {
|
||||||
|
phone: this.phone,
|
||||||
|
password: this.password,
|
||||||
|
confimpassword: this.confimpassword,
|
||||||
|
source: 3,
|
||||||
|
invitecode: this.invitecode
|
||||||
|
};
|
||||||
}
|
}
|
||||||
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
||||||
|
|
||||||
|
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/public/login'
|
// url: '/pages/public/login'
|
||||||
|
// });
|
||||||
|
|
||||||
|
// 注册成功 直接默认登录
|
||||||
|
|
||||||
|
let params2 = {
|
||||||
|
phone: this.phone,
|
||||||
|
password: this.password
|
||||||
|
};
|
||||||
|
let data2 = await Api.apiCall('post', Api.index.login, params2);
|
||||||
|
//this.logining = false;
|
||||||
|
console.log("1111111111");
|
||||||
|
if (data2) {
|
||||||
|
console.log(data2);
|
||||||
|
that.login(data2);
|
||||||
|
uni.setStorageSync('userInfos', data2.userInfo);
|
||||||
|
uni.setStorageSync('token', data2.tokenHead + data2.token);
|
||||||
|
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
||||||
|
console.log(uni.getStorageSync('token'));
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.container {
|
|
||||||
|
.container {
|
||||||
padding-top: 115px;
|
padding-top: 115px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 120vh;
|
height: 120vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.wrapper {
|
|
||||||
|
.wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding-bottom: 30upx;
|
padding-bottom: 30upx;
|
||||||
}
|
}
|
||||||
.back-btn {
|
|
||||||
|
.back-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 40upx;
|
left: 40upx;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
@@ -142,18 +187,21 @@ page {
|
|||||||
top: 40upx;
|
top: 40upx;
|
||||||
font-size: 40upx;
|
font-size: 40upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
.left-top-sign {
|
|
||||||
|
.left-top-sign {
|
||||||
font-size: 120upx;
|
font-size: 120upx;
|
||||||
color: $page-color-base;
|
color: $page-color-base;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: -16upx;
|
left: -16upx;
|
||||||
}
|
}
|
||||||
.right-top-sign {
|
|
||||||
|
.right-top-sign {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 80upx;
|
top: 80upx;
|
||||||
right: -30upx;
|
right: -30upx;
|
||||||
z-index: 95;
|
z-index: 95;
|
||||||
|
|
||||||
&:before,
|
&:before,
|
||||||
&:after {
|
&:after {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -162,10 +210,12 @@ page {
|
|||||||
height: 80upx;
|
height: 80upx;
|
||||||
background: #b4f3e2;
|
background: #b4f3e2;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
transform: rotate(50deg);
|
transform: rotate(50deg);
|
||||||
border-radius: 0 50px 0 0;
|
border-radius: 0 50px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -198upx;
|
right: -198upx;
|
||||||
@@ -174,27 +224,31 @@ page {
|
|||||||
border-radius: 50px 0 0 0;
|
border-radius: 50px 0 0 0;
|
||||||
/* background: pink; */
|
/* background: pink; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.left-bottom-sign {
|
|
||||||
|
.left-bottom-sign {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -270upx;
|
left: -270upx;
|
||||||
bottom: -320upx;
|
bottom: -320upx;
|
||||||
border: 100upx solid #d0d1fd;
|
border: 100upx solid #d0d1fd;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
padding: 180upx;
|
padding: 180upx;
|
||||||
}
|
}
|
||||||
.welcome {
|
|
||||||
|
.welcome {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 50upx;
|
left: 50upx;
|
||||||
top: -90upx;
|
top: -90upx;
|
||||||
font-size: 46upx;
|
font-size: 46upx;
|
||||||
color: #555;
|
color: #555;
|
||||||
text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
|
text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
.input-content {
|
|
||||||
|
.input-content {
|
||||||
padding: 0 60upx;
|
padding: 0 60upx;
|
||||||
}
|
}
|
||||||
.input-item {
|
|
||||||
|
.input-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -204,24 +258,27 @@ page {
|
|||||||
height: 120upx;
|
height: 120upx;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-bottom: 50upx;
|
margin-bottom: 50upx;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
height: 50upx;
|
height: 50upx;
|
||||||
line-height: 56upx;
|
line-height: 56upx;
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
height: 60upx;
|
height: 60upx;
|
||||||
font-size: $font-base + 2upx;
|
font-size: $font-base + 2upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
width: 630upx;
|
width: 630upx;
|
||||||
height: 76upx;
|
height: 76upx;
|
||||||
line-height: 76upx;
|
line-height: 76upx;
|
||||||
@@ -230,17 +287,20 @@ page {
|
|||||||
background: $uni-color-primary;
|
background: $uni-color-primary;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: $font-lg;
|
font-size: $font-lg;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.forget-section {
|
|
||||||
|
.forget-section {
|
||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-spec;
|
color: $font-color-spec;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 40upx;
|
margin-top: 40upx;
|
||||||
}
|
}
|
||||||
.register-section {
|
|
||||||
|
.register-section {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 40upx;
|
bottom: 40upx;
|
||||||
@@ -248,9 +308,10 @@ page {
|
|||||||
font-size: $font-sm + 2upx;
|
font-size: $font-sm + 2upx;
|
||||||
color: $font-color-base;
|
color: $font-color-base;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: $font-color-spec;
|
color: $font-color-spec;
|
||||||
margin-left: 10upx;
|
margin-left: 10upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
<text class="cell-tit">清除缓存</text>
|
<text class="cell-tit">清除缓存</text>
|
||||||
<text class="cell-more yticon icon-you"></text>
|
<text class="cell-more yticon icon-you"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell b-b" @click="navTo('关于Dcloud')" hover-class="cell-hover" :hover-stay-time="50">
|
<!-- <view class="list-cell b-b" @click="navTo('关于Dcloud')" hover-class="cell-hover" :hover-stay-time="50">
|
||||||
<text class="cell-tit">关于{{ sysInfo.name }}</text>
|
<text class="cell-tit">关于{{ sysInfo.name }}</text>
|
||||||
<text class="cell-more yticon icon-you"></text>
|
<text class="cell-more yticon icon-you"></text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="list-cell" @click="updateApp()">
|
<view class="list-cell" @click="updateApp()">
|
||||||
<text class="cell-tit">检查更新</text>
|
<text class="cell-tit">检查更新</text>
|
||||||
<!-- <text class="cell-tip">当前版本 {{sysInfo.version}}</text> -->
|
<!-- <text class="cell-tip">当前版本 {{sysInfo.version}}</text> -->
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<text class="title clamp">{{ item.name }}</text>
|
<text class="title clamp">{{ item.name }}</text>
|
||||||
<view class="price-box" >
|
<view class="price-box" >
|
||||||
<text class="price">{{ item.price }}</text>
|
<text class="price">{{ item.price }}</text>
|
||||||
<!-- <text>佣金 ¥{{ item.fenxiaoPrice }}</text> -->
|
<text class="price2">市场价 ¥{{ item.originalPrice }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="price-box" v-if="item.isVip == 1">
|
<!-- <view class="price-box" v-if="item.isVip == 1">
|
||||||
<text class="price">会员价{{ item.vipPrice }}</text>
|
<text class="price">会员价{{ item.vipPrice }}</text>
|
||||||
@@ -465,6 +465,10 @@ page,
|
|||||||
font-size: 26upx;
|
font-size: 26upx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.price2{
|
||||||
|
font-size: $font-sm ;
|
||||||
|
color: $font-color-light;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.goods-list-vertical {
|
.goods-list-vertical {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
<!-- <text class="price-tip">惠农价</text> -->
|
<!-- <text class="price-tip">惠农价</text> -->
|
||||||
<text class="price" v-if="goods.vipPrice && goods.vipPrice > 0">惠农价¥{{ (goods.price * goods.memberRate) / 10 }}</text>
|
<text class="price" v-if="goods.vipPrice && goods.vipPrice > 0">惠农价¥{{ (goods.price * goods.memberRate) / 10 }}</text>
|
||||||
<text class="price" v-else-if="!goods.vipPrice">惠农价¥{{ goods.price }}</text>
|
<text class="price" v-else-if="!goods.vipPrice">惠农价¥{{ goods.originalPrice }}</text>
|
||||||
<text class="m-price" v-if="!goods.vipPrice">县区商超价{{ goods.originalPrice }}</text>
|
<text class="m-price" v-if="!goods.vipPrice">市场价¥{{ goods.price }}</text>
|
||||||
<text class="m-price" v-else-if="goods.vipPrice && goods.vipPrice > 0">¥{{ goods.price }}</text>
|
<text class="m-price" v-else-if="goods.vipPrice && goods.vipPrice > 0">¥{{ goods.price }}</text>
|
||||||
<text class="price">优惠¥{{ (goods.originalPrice- goods.price) | formatNumber}}</text>
|
<text class="price">优惠¥{{ (goods.price - goods.originalPrice) | formatNumber}}</text>
|
||||||
<text class="coupon-tip" v-if="goods.memberRate && goods.memberRate != 10">会员折扣{{ goods.memberRate }}折</text>
|
<text class="coupon-tip" v-if="goods.memberRate && goods.memberRate != 10">会员折扣{{ goods.memberRate }}折</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bot-row">
|
<view class="bot-row">
|
||||||
@@ -656,7 +656,6 @@ page {
|
|||||||
.m-price {
|
.m-price {
|
||||||
margin: 0 12upx;
|
margin: 0 12upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
text-decoration: line-through;
|
|
||||||
}
|
}
|
||||||
.coupon-tip {
|
.coupon-tip {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -3,31 +3,34 @@
|
|||||||
|
|
||||||
<view class="row b-b">
|
<view class="row b-b">
|
||||||
<text class="tit">联系人</text>
|
<text class="tit">联系人</text>
|
||||||
<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名" placeholder-class="placeholder" />
|
<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名"
|
||||||
|
placeholder-class="placeholder" />
|
||||||
</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" maxlength="11" 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">
|
||||||
<text class="tit">城市</text>
|
<text class="tit">所在地</text>
|
||||||
<input placeholder="请选择城市" disabled="true" :value="addressData.province + ' ' + addressData.city + ' ' + addressData.region" @click="lotusAddressData.visible = true" class="input">
|
<view class="input" >
|
||||||
<lotus-address v-on:choseVal="choseValue" :lotusAddressData="lotusAddressData"></lotus-address>
|
<uni-data-select v-model="value" :localdata="range" @change="change"></uni-data-select>
|
||||||
</input>
|
|
||||||
<text class="yticon icon-shouhuodizhi"></text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="row b-b">
|
|
||||||
|
</view>
|
||||||
|
<!-- <view class="row b-b">
|
||||||
<text class="tit">地图:</text>
|
<text class="tit">地图:</text>
|
||||||
|
|
||||||
|
|
||||||
<input class="input" @click="openMap()" type="text" value="" v-model="mapAddressName" placeholder="在地图上搜索并选择地址" disabled="true" />
|
<input class="input" @click="openMap()" type="text" value="" v-model="mapAddressName"
|
||||||
|
placeholder="在地图上搜索并选择地址" disabled="true" />
|
||||||
<text class="yticon icon-shouhuodizhi"></text>
|
<text class="yticon icon-shouhuodizhi"></text>
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
<view class="row b-b">
|
<view class="row b-b">
|
||||||
<text class="tit">详细</text>
|
<text class="tit">取货点</text>
|
||||||
<input class="input" type="text" v-model="addressData.detailAddress" placeholder="街道、楼号、门牌" placeholder-class="placeholder" />
|
<text class="input">王宫村服务站</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row default-row">
|
<view class="row default-row">
|
||||||
@@ -39,8 +42,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Api from '@/common/api';
|
import Api from '@/common/api';
|
||||||
import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAddress.vue"
|
import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAddress.vue"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -55,17 +58,31 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
defaultStatus: 0,
|
defaultStatus: 0,
|
||||||
def: false
|
def: false
|
||||||
},
|
},
|
||||||
lotusAddressData:{
|
lotusAddressData: {
|
||||||
visible:false,
|
visible: false,
|
||||||
provinceName:'',
|
provinceName: '',
|
||||||
cityName:'',
|
cityName: '',
|
||||||
townName:'',
|
townName: '',
|
||||||
},
|
},
|
||||||
|
value: 0,
|
||||||
|
range: [{
|
||||||
|
value: '1',
|
||||||
|
text: '王宫村'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
text: '土山村'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
text: '马庄村'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option) {
|
||||||
let title = '新增收货地址';
|
let title = '新增收货地址';
|
||||||
if(option.type==='edit'){
|
if (option.type === 'edit') {
|
||||||
title = '编辑收货地址'
|
title = '编辑收货地址'
|
||||||
this.addressData = JSON.parse(option.data)
|
this.addressData = JSON.parse(option.data)
|
||||||
}
|
}
|
||||||
@@ -75,10 +92,16 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchChange(e){
|
|
||||||
this.addressData.defaultStatus = e.detail.value?1:0
|
change(res) {
|
||||||
|
console.log('res', res);
|
||||||
|
},
|
||||||
|
|
||||||
|
switchChange(e) {
|
||||||
|
this.addressData.defaultStatus = e.detail.value ? 1 : 0
|
||||||
this.addressData.def = e.detail.value
|
this.addressData.def = e.detail.value
|
||||||
},
|
},
|
||||||
|
|
||||||
openMap() {
|
openMap() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
@@ -88,7 +111,7 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
|
|
||||||
_this.addressData.latitude = res.latitude;
|
_this.addressData.latitude = res.latitude;
|
||||||
_this.addressData.longitude = res.longitude;
|
_this.addressData.longitude = res.longitude;
|
||||||
_this.mapAddressName= res.address + res.name;
|
_this.mapAddressName = res.address + res.name;
|
||||||
_this.addressData.detailAddress = res.address + res.name;
|
_this.addressData.detailAddress = res.address + res.name;
|
||||||
console.log('经度:' + res.longitude);
|
console.log('经度:' + res.longitude);
|
||||||
console.log('详细地址:' + res.address);
|
console.log('详细地址:' + res.address);
|
||||||
@@ -97,14 +120,14 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
choseValue(res){
|
choseValue(res) {
|
||||||
//res数据源包括已选省市区与省市区code
|
//res数据源包括已选省市区与省市区code
|
||||||
this.lotusAddressData.visible = false;//visible为显示与关闭组件标识true显示false隐藏
|
this.lotusAddressData.visible = false; //visible为显示与关闭组件标识true显示false隐藏
|
||||||
if(res.isChose){
|
if (res.isChose) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.lotusAddressData.provinceName = res.provice;//省
|
this.lotusAddressData.provinceName = res.provice; //省
|
||||||
this.lotusAddressData.cityName = res.city;//市
|
this.lotusAddressData.cityName = res.city; //市
|
||||||
this.lotusAddressData.townName = res.town;//区
|
this.lotusAddressData.townName = res.town; //区
|
||||||
|
|
||||||
//赋值到addressData
|
//赋值到addressData
|
||||||
this.addressData.province = res.provice
|
this.addressData.province = res.provice
|
||||||
@@ -115,40 +138,40 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
},
|
},
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
async confirm(){
|
async confirm() {
|
||||||
const that = this
|
const that = this
|
||||||
let data = this.addressData;
|
let data = this.addressData;
|
||||||
if(!data.name){
|
if (!data.name) {
|
||||||
this.$api.msg('请填写收货人姓名');
|
this.$api.msg('请填写收货人姓名');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.phoneNumber)){
|
if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.phoneNumber)) {
|
||||||
that.$api.msg('请输入正确的手机号码');
|
that.$api.msg('请输入正确的手机号码');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.province) {
|
// if (!data.province) {
|
||||||
that.$api.msg('请选择省市区');
|
// that.$api.msg('请选择省市区');
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (!data.city) {
|
// if (!data.city) {
|
||||||
that.$api.msg('请选择二级城市')
|
// that.$api.msg('请选择二级城市')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (!data.region) {
|
// if (!data.region) {
|
||||||
that.$api.msg('请选择三级区或县')
|
// that.$api.msg('请选择三级区或县')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if(!data.detailAddress){
|
// if (!data.detailAddress) {
|
||||||
that.$api.msg('请输入详细地址');
|
// that.$api.msg('请输入详细地址');
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
let data1 = await Api.apiCall('post', Api.goods.addressSave, that.addressData);
|
let data1 = await Api.apiCall('post', Api.goods.addressSave, that.addressData);
|
||||||
if (data1) {
|
if (data1) {
|
||||||
this.$api.msg(`保存成功`);
|
this.$api.msg(`保存成功`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta:1
|
delta: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
}, 800);
|
}, 800);
|
||||||
@@ -159,52 +182,58 @@ import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAdd
|
|||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components:{
|
components: {
|
||||||
"lotus-address":lotusAddress
|
"lotus-address": lotusAddress
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background: $page-color-base;
|
background: $page-color-base;
|
||||||
padding-top: 16upx;
|
padding-top: 16upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row{
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding:0 30upx;
|
padding: 0 30upx;
|
||||||
height: 110upx;
|
height: 110upx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.tit{
|
.tit {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 120upx;
|
width: 120upx;
|
||||||
font-size: 30upx;
|
font-size: 30upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
.input{
|
|
||||||
|
.input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 30upx;
|
font-size: 30upx;
|
||||||
color: $font-color-dark;
|
color: $font-color-dark;
|
||||||
}
|
}
|
||||||
.icon-shouhuodizhi{
|
|
||||||
|
.icon-shouhuodizhi {
|
||||||
font-size: 36upx;
|
font-size: 36upx;
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.default-row{
|
|
||||||
|
.default-row {
|
||||||
margin-top: 16upx;
|
margin-top: 16upx;
|
||||||
.tit{
|
|
||||||
|
.tit {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
switch{
|
|
||||||
|
switch {
|
||||||
transform: translateX(16upx) scale(.9);
|
transform: translateX(16upx) scale(.9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.add-btn{
|
|
||||||
|
.add-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -0,0 +1,232 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
|
||||||
|
<view class="row b-b">
|
||||||
|
<text class="tit">联系人</text>
|
||||||
|
<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名"
|
||||||
|
placeholder-class="placeholder" />
|
||||||
|
</view>
|
||||||
|
<view class="row b-b">
|
||||||
|
<text class="tit">手机号</text>
|
||||||
|
<input class="input" type="number" maxlength="11" v-model="addressData.phoneNumber" placeholder="收货人手机号码"
|
||||||
|
placeholder-class="placeholder" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="row b-b">
|
||||||
|
<text class="tit">城市</text>
|
||||||
|
<input placeholder="请选择城市" disabled="true"
|
||||||
|
:value="addressData.province + ' ' + addressData.city + ' ' + addressData.region"
|
||||||
|
@click="lotusAddressData.visible = true" class="input">
|
||||||
|
<lotus-address v-on:choseVal="choseValue" :lotusAddressData="lotusAddressData"></lotus-address>
|
||||||
|
</input>
|
||||||
|
<text class="yticon icon-shouhuodizhi"></text>
|
||||||
|
</view>
|
||||||
|
<view class="row b-b">
|
||||||
|
<text class="tit">地图:</text>
|
||||||
|
|
||||||
|
|
||||||
|
<input class="input" @click="openMap()" type="text" value="" v-model="mapAddressName"
|
||||||
|
placeholder="在地图上搜索并选择地址" disabled="true" />
|
||||||
|
<text class="yticon icon-shouhuodizhi"></text>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="row b-b">
|
||||||
|
<text class="tit">详细</text>
|
||||||
|
<input class="input" type="text" v-model="addressData.detailAddress" placeholder="街道、楼号、门牌"
|
||||||
|
placeholder-class="placeholder" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="row default-row">
|
||||||
|
<text class="tit">设为默认</text>
|
||||||
|
<switch :checked="addressData.defaultStatus" color="#fa436a" @change="switchChange" />
|
||||||
|
</view>
|
||||||
|
<button class="add-btn" @click="confirm">提交</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Api from '@/common/api';
|
||||||
|
import lotusAddress from "@/components/Winglau14-lotusAddress/Winglau14-lotusAddress.vue"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mapAddressName: '',
|
||||||
|
addressData: {
|
||||||
|
name: '',
|
||||||
|
phoneNumber: '',
|
||||||
|
province: '',
|
||||||
|
city: '',
|
||||||
|
region: '',
|
||||||
|
detailAddress: '',
|
||||||
|
defaultStatus: 0,
|
||||||
|
def: false
|
||||||
|
},
|
||||||
|
lotusAddressData: {
|
||||||
|
visible: false,
|
||||||
|
provinceName: '',
|
||||||
|
cityName: '',
|
||||||
|
townName: '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
let title = '新增收货地址';
|
||||||
|
if (option.type === 'edit') {
|
||||||
|
title = '编辑收货地址'
|
||||||
|
this.addressData = JSON.parse(option.data)
|
||||||
|
}
|
||||||
|
this.manageType = option.type;
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
switchChange(e) {
|
||||||
|
this.addressData.defaultStatus = e.detail.value ? 1 : 0
|
||||||
|
this.addressData.def = e.detail.value
|
||||||
|
},
|
||||||
|
openMap() {
|
||||||
|
var _this = this;
|
||||||
|
uni.chooseLocation({
|
||||||
|
|
||||||
|
success: function(res) {
|
||||||
|
console.log('res', res);
|
||||||
|
|
||||||
|
_this.addressData.latitude = res.latitude;
|
||||||
|
_this.addressData.longitude = res.longitude;
|
||||||
|
_this.mapAddressName = res.address + res.name;
|
||||||
|
_this.addressData.detailAddress = res.address + res.name;
|
||||||
|
console.log('经度:' + res.longitude);
|
||||||
|
console.log('详细地址:' + res.address);
|
||||||
|
console.log('纬度:' + res.latitude);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
choseValue(res) {
|
||||||
|
//res数据源包括已选省市区与省市区code
|
||||||
|
this.lotusAddressData.visible = false; //visible为显示与关闭组件标识true显示false隐藏
|
||||||
|
if (res.isChose) {
|
||||||
|
console.log(res)
|
||||||
|
this.lotusAddressData.provinceName = res.provice; //省
|
||||||
|
this.lotusAddressData.cityName = res.city; //市
|
||||||
|
this.lotusAddressData.townName = res.town; //区
|
||||||
|
|
||||||
|
//赋值到addressData
|
||||||
|
this.addressData.province = res.provice
|
||||||
|
this.addressData.city = res.city
|
||||||
|
this.addressData.region = res.town
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交
|
||||||
|
async confirm() {
|
||||||
|
const that = this
|
||||||
|
let data = this.addressData;
|
||||||
|
if (!data.name) {
|
||||||
|
this.$api.msg('请填写收货人姓名');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.phoneNumber)) {
|
||||||
|
that.$api.msg('请输入正确的手机号码');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.province) {
|
||||||
|
that.$api.msg('请选择省市区');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.city) {
|
||||||
|
that.$api.msg('请选择二级城市')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.region) {
|
||||||
|
that.$api.msg('请选择三级区或县')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.detailAddress) {
|
||||||
|
that.$api.msg('请输入详细地址');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let data1 = await Api.apiCall('post', Api.goods.addressSave, that.addressData);
|
||||||
|
if (data1) {
|
||||||
|
this.$api.msg(`保存成功`);
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
}, 800);
|
||||||
|
} else {
|
||||||
|
this.$api.msg(`保存失败`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"lotus-address": lotusAddress
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background: $page-color-base;
|
||||||
|
padding-top: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 30upx;
|
||||||
|
height: 110upx;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 120upx;
|
||||||
|
font-size: 30upx;
|
||||||
|
color: $font-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 30upx;
|
||||||
|
color: $font-color-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shouhuodizhi {
|
||||||
|
font-size: 36upx;
|
||||||
|
color: $font-color-light;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.default-row {
|
||||||
|
margin-top: 16upx;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
transform: translateX(16upx) scale(.9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 690upx;
|
||||||
|
height: 80upx;
|
||||||
|
margin: 60upx auto;
|
||||||
|
font-size: $font-lg;
|
||||||
|
color: #fff;
|
||||||
|
background-color: $base-color;
|
||||||
|
border-radius: 10upx;
|
||||||
|
box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 54 KiB |
BIN
mallplusui-uniapp-app/static/logo1.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 4.9 MiB |
BIN
mallplusui-uniapp-app/static/tab-message.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
mallplusui-uniapp-app/static/tab-message_.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -6,14 +6,14 @@ Vue.use(Vuex)
|
|||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
hasLogin: false,
|
hasLogin: false,
|
||||||
userInfo:''
|
userInfo: ''
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
login(state, provider) {
|
login(state, provider) {
|
||||||
console.log(provider);
|
console.log(provider);
|
||||||
if (provider && provider!=undefined){
|
if (provider && provider != undefined) {
|
||||||
state.hasLogin = true;
|
state.hasLogin = true;
|
||||||
uni.setStorage({//缓存用户登陆状态
|
uni.setStorage({ //缓存用户登陆状态
|
||||||
key: 'userInfo',
|
key: 'userInfo',
|
||||||
data: provider.userInfo
|
data: provider.userInfo
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
## 1.0.5(2023-02-03)
|
||||||
|
- 修复 禁用时会显示清空按钮
|
||||||
|
## 1.0.4(2023-02-02)
|
||||||
|
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
|
||||||
|
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
|
||||||
|
## 1.0.3(2023-01-16)
|
||||||
|
- 修复 不关联服务空间报错的问题
|
||||||
|
## 1.0.2(2023-01-14)
|
||||||
|
- 新增 属性 `format` 可用于格式化显示选项内容
|
||||||
|
## 1.0.1(2022-12-06)
|
||||||
|
- 修复 当where变化时,数据不会自动更新的问题
|
||||||
|
## 0.1.9(2022-09-05)
|
||||||
|
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
|
||||||
|
## 0.1.8(2022-08-29)
|
||||||
|
- 修复 点击的位置不准确
|
||||||
|
## 0.1.7(2022-08-12)
|
||||||
|
- 新增 支持 disabled 属性
|
||||||
|
## 0.1.6(2022-07-06)
|
||||||
|
- 修复 pc端宽度异常的bug
|
||||||
|
## 0.1.5
|
||||||
|
- 修复 pc端宽度异常的bug
|
||||||
|
## 0.1.4(2022-07-05)
|
||||||
|
- 优化 显示样式
|
||||||
|
## 0.1.3(2022-06-02)
|
||||||
|
- 修复 localdata 赋值不生效的 bug
|
||||||
|
- 新增 支持 uni.scss 修改颜色
|
||||||
|
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
|
||||||
|
## 0.1.2(2022-05-08)
|
||||||
|
- 修复 当 value 为 0 时选择不生效的 bug
|
||||||
|
## 0.1.1(2022-05-07)
|
||||||
|
- 新增 记住上次的选项(仅 collection 存在时有效)
|
||||||
|
## 0.1.0(2022-04-22)
|
||||||
|
- 初始化
|
||||||
@@ -0,0 +1,502 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-stat__select">
|
||||||
|
<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
|
||||||
|
<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
|
||||||
|
<view class="uni-select" :class="{'uni-select--disabled':disabled}">
|
||||||
|
<view class="uni-select__input-box" @click="toggleSelector">
|
||||||
|
<view v-if="current" class="uni-select__input-text">{{current}}</view>
|
||||||
|
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
|
||||||
|
<uni-icons v-if="current && clear && !disabled" type="clear" color="#c0c4cc" size="24" @click="clearVal" />
|
||||||
|
<uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
||||||
|
</view>
|
||||||
|
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
||||||
|
<view class="uni-select__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||||
|
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
|
||||||
|
@click="change(item)">
|
||||||
|
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* DataChecklist 数据选择器
|
||||||
|
* @description 通过数据渲染的下拉框组件
|
||||||
|
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
||||||
|
* @property {String} value 默认值
|
||||||
|
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
||||||
|
* @property {Boolean} clear 是否可以清空已选项
|
||||||
|
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
||||||
|
* @property {String} label 左侧标题
|
||||||
|
* @property {String} placeholder 输入框的提示文字
|
||||||
|
* @property {Boolean} disabled 是否禁用
|
||||||
|
* @event {Function} change 选中发生变化触发
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "uni-stat-select",
|
||||||
|
mixins: [uniCloud.mixinDatacom || {}],
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无选项'
|
||||||
|
},
|
||||||
|
clear: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
defItem: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
|
||||||
|
format: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
current: '',
|
||||||
|
mixinDatacomResData: [],
|
||||||
|
apps: [],
|
||||||
|
channels: [],
|
||||||
|
cacheKey: "uni-data-select-lastSelectedValue",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.debounceGet = this.debounce(() => {
|
||||||
|
this.query();
|
||||||
|
}, 300);
|
||||||
|
if (this.collection && !this.localdata.length) {
|
||||||
|
this.debounceGet();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
typePlaceholder() {
|
||||||
|
const text = {
|
||||||
|
'opendb-stat-app-versions': '版本',
|
||||||
|
'opendb-app-channels': '渠道',
|
||||||
|
'opendb-app-list': '应用'
|
||||||
|
}
|
||||||
|
const common = this.placeholder
|
||||||
|
const placeholder = text[this.collection]
|
||||||
|
return placeholder ?
|
||||||
|
common + placeholder :
|
||||||
|
common
|
||||||
|
},
|
||||||
|
valueCom(){
|
||||||
|
// #ifdef VUE3
|
||||||
|
return this.modelValue;
|
||||||
|
// #endif
|
||||||
|
// #ifndef VUE3
|
||||||
|
return this.value;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localdata: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val, old) {
|
||||||
|
if (Array.isArray(val) && old !== val) {
|
||||||
|
this.mixinDatacomResData = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
valueCom(val, old) {
|
||||||
|
this.initDefVal()
|
||||||
|
},
|
||||||
|
mixinDatacomResData: {
|
||||||
|
immediate: true,
|
||||||
|
handler(val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.initDefVal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
debounce(fn, time = 100){
|
||||||
|
let timer = null
|
||||||
|
return function(...args) {
|
||||||
|
if (timer) clearTimeout(timer)
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
fn.apply(this, args)
|
||||||
|
}, time)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 执行数据库查询
|
||||||
|
query(){
|
||||||
|
this.mixinDatacomEasyGet();
|
||||||
|
},
|
||||||
|
// 监听查询条件变更事件
|
||||||
|
onMixinDatacomPropsChange(){
|
||||||
|
if (this.collection) {
|
||||||
|
this.debounceGet();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initDefVal() {
|
||||||
|
let defValue = ''
|
||||||
|
if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
|
||||||
|
defValue = this.valueCom
|
||||||
|
} else {
|
||||||
|
let strogeValue
|
||||||
|
if (this.collection) {
|
||||||
|
strogeValue = this.getCache()
|
||||||
|
}
|
||||||
|
if (strogeValue || strogeValue === 0) {
|
||||||
|
defValue = strogeValue
|
||||||
|
} else {
|
||||||
|
let defItem = ''
|
||||||
|
if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
|
||||||
|
defItem = this.mixinDatacomResData[this.defItem - 1].value
|
||||||
|
}
|
||||||
|
defValue = defItem
|
||||||
|
}
|
||||||
|
if (defValue || defValue === 0) {
|
||||||
|
this.emit(defValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const def = this.mixinDatacomResData.find(item => item.value === defValue)
|
||||||
|
this.current = def ? this.formatItemName(def) : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {[String, Number]} value
|
||||||
|
* 判断用户给的 value 是否同时为禁用状态
|
||||||
|
*/
|
||||||
|
isDisabled(value) {
|
||||||
|
let isDisabled = false;
|
||||||
|
|
||||||
|
this.mixinDatacomResData.forEach(item => {
|
||||||
|
if (item.value === value) {
|
||||||
|
isDisabled = item.disable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return isDisabled;
|
||||||
|
},
|
||||||
|
|
||||||
|
clearVal() {
|
||||||
|
this.emit('')
|
||||||
|
if (this.collection) {
|
||||||
|
this.removeCache()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
change(item) {
|
||||||
|
if (!item.disable) {
|
||||||
|
this.showSelector = false
|
||||||
|
this.current = this.formatItemName(item)
|
||||||
|
this.emit(item.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(val) {
|
||||||
|
this.$emit('change', val)
|
||||||
|
this.$emit('input', val)
|
||||||
|
this.$emit('update:modelValue', val)
|
||||||
|
if (this.collection) {
|
||||||
|
this.setCache(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggleSelector() {
|
||||||
|
if (this.disabled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
formatItemName(item) {
|
||||||
|
let {
|
||||||
|
text,
|
||||||
|
value,
|
||||||
|
channel_code
|
||||||
|
} = item
|
||||||
|
channel_code = channel_code ? `(${channel_code})` : ''
|
||||||
|
|
||||||
|
if (this.format) {
|
||||||
|
// 格式化输出
|
||||||
|
let str = "";
|
||||||
|
str = this.format;
|
||||||
|
for (let key in item) {
|
||||||
|
str = str.replace(new RegExp(`{${key}}`,"g"),item[key]);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
return this.collection.indexOf('app-list') > 0 ?
|
||||||
|
`${text}(${value})` :
|
||||||
|
(
|
||||||
|
text ?
|
||||||
|
text :
|
||||||
|
`未命名${channel_code}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取当前加载的数据
|
||||||
|
getLoadData(){
|
||||||
|
return this.mixinDatacomResData;
|
||||||
|
},
|
||||||
|
// 获取当前缓存key
|
||||||
|
getCurrentCacheKey(){
|
||||||
|
return this.collection;
|
||||||
|
},
|
||||||
|
// 获取缓存
|
||||||
|
getCache(name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
return cacheData[name];
|
||||||
|
},
|
||||||
|
// 设置缓存
|
||||||
|
setCache(value, name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
cacheData[name] = value;
|
||||||
|
uni.setStorageSync(this.cacheKey, cacheData);
|
||||||
|
},
|
||||||
|
// 删除缓存
|
||||||
|
removeCache(name=this.getCurrentCacheKey()){
|
||||||
|
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||||
|
delete cacheData[name];
|
||||||
|
uni.setStorageSync(this.cacheKey, cacheData);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$uni-base-color: #6a6a6a !default;
|
||||||
|
$uni-main-color: #333 !default;
|
||||||
|
$uni-secondary-color: #909399 !default;
|
||||||
|
$uni-border-3: #e5e5e5;
|
||||||
|
|
||||||
|
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
.hide-on-phone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.uni-stat__select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// padding: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-stat-box {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-stat__actived {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
// outline: 1px solid #2979ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-label-text {
|
||||||
|
font-size: 25px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $uni-base-color;
|
||||||
|
margin: auto 0;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select {
|
||||||
|
font-size: 25px;
|
||||||
|
// border: 1px solid $uni-border-3;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
user-select: none;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
// border-bottom: solid 1px $uni-border-3;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
height: 35px;
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__label {
|
||||||
|
font-size: 25px;
|
||||||
|
// line-height: 22px;
|
||||||
|
height: 35px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-box {
|
||||||
|
height: 35px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 25x;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-plac {
|
||||||
|
font-size: 25px;
|
||||||
|
color: $uni-secondary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 3;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 500px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty,
|
||||||
|
.uni-select__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 55px;
|
||||||
|
font-size: 25px;
|
||||||
|
text-align: center;
|
||||||
|
/* border-bottom: solid 1px $uni-border-3; */
|
||||||
|
padding: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector-empty:last-child,
|
||||||
|
.uni-select__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__selector__disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* picker 弹出层通用的指示小三角 */
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-text {
|
||||||
|
// width: 280px;
|
||||||
|
width: 100%;
|
||||||
|
color: $uni-main-color;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select__input-placeholder {
|
||||||
|
color: $uni-base-color;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-select--mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-data-select",
|
||||||
|
"displayName": "uni-data-select 下拉框选择器",
|
||||||
|
"version": "1.0.5",
|
||||||
|
"description": "通过数据驱动的下拉框选择器",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"select",
|
||||||
|
"uni-data-select",
|
||||||
|
"下拉框",
|
||||||
|
"下拉选"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.1"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
|
"type": "component-vue"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-load-more"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "u",
|
||||||
|
"app-nvue": "n"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "u",
|
||||||
|
"百度": "u",
|
||||||
|
"字节跳动": "u",
|
||||||
|
"QQ": "u",
|
||||||
|
"京东": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
## DataSelect 下拉框选择器
|
||||||
|
> **组件名:uni-data-select**
|
||||||
|
> 代码块: `uDataSelect`
|
||||||
|
|
||||||
|
当选项过多时,使用下拉菜单展示并选择内容
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||||
19
mallplusui-uniapp-app/uni_modules/uni-load-more/changelog.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
## 1.3.3(2022-01-20)
|
||||||
|
- 新增 showText属性 ,是否显示文本
|
||||||
|
## 1.3.2(2022-01-19)
|
||||||
|
- 修复 nvue 平台下不显示文本的bug
|
||||||
|
## 1.3.1(2022-01-19)
|
||||||
|
- 修复 微信小程序平台样式选择器报警告的问题
|
||||||
|
## 1.3.0(2021-11-19)
|
||||||
|
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||||
|
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
|
||||||
|
## 1.2.1(2021-08-24)
|
||||||
|
- 新增 支持国际化
|
||||||
|
## 1.2.0(2021-07-30)
|
||||||
|
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||||
|
## 1.1.8(2021-05-12)
|
||||||
|
- 新增 组件示例地址
|
||||||
|
## 1.1.7(2021-03-30)
|
||||||
|
- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
|
||||||
|
## 1.1.6(2021-02-05)
|
||||||
|
- 调整为uni_modules目录规范
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"uni-load-more.contentdown": "Pull up to show more",
|
||||||
|
"uni-load-more.contentrefresh": "loading...",
|
||||||
|
"uni-load-more.contentnomore": "No more data"
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import en from './en.json'
|
||||||
|
import zhHans from './zh-Hans.json'
|
||||||
|
import zhHant from './zh-Hant.json'
|
||||||
|
export default {
|
||||||
|
en,
|
||||||
|
'zh-Hans': zhHans,
|
||||||
|
'zh-Hant': zhHant
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"uni-load-more.contentdown": "上拉显示更多",
|
||||||
|
"uni-load-more.contentrefresh": "正在加载...",
|
||||||
|
"uni-load-more.contentnomore": "没有更多数据了"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"uni-load-more.contentdown": "上拉顯示更多",
|
||||||
|
"uni-load-more.contentrefresh": "正在加載...",
|
||||||
|
"uni-load-more.contentnomore": "沒有更多數據了"
|
||||||
|
}
|
||||||
86
mallplusui-uniapp-app/uni_modules/uni-load-more/package.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-load-more",
|
||||||
|
"displayName": "uni-load-more 加载更多",
|
||||||
|
"version": "1.3.3",
|
||||||
|
"description": "LoadMore 组件,常用在列表里面,做滚动加载使用。",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"加载更多",
|
||||||
|
"load-more"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": ""
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-scss"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "y"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
mallplusui-uniapp-app/uni_modules/uni-load-more/readme.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
### LoadMore 加载更多
|
||||||
|
> **组件名:uni-load-more**
|
||||||
|
> 代码块: `uLoadMore`
|
||||||
|
|
||||||
|
|
||||||
|
用于列表中,做滚动加载使用,展示 loading 的各种状态。
|
||||||
|
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||||
|
|
||||||
|
|
||||||
8
mallplusui-uniapp-app/uni_modules/uni-scss/changelog.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
## 1.0.3(2022-01-21)
|
||||||
|
- 优化 组件示例
|
||||||
|
## 1.0.2(2021-11-22)
|
||||||
|
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
|
||||||
|
## 1.0.1(2021-11-22)
|
||||||
|
- 修复 vue3中scss语法兼容问题
|
||||||
|
## 1.0.0(2021-11-18)
|
||||||
|
- init
|
||||||
1
mallplusui-uniapp-app/uni_modules/uni-scss/index.scss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@import './styles/index.scss';
|
||||||
82
mallplusui-uniapp-app/uni_modules/uni-scss/package.json
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-scss",
|
||||||
|
"displayName": "uni-scss 辅助样式",
|
||||||
|
"version": "1.0.3",
|
||||||
|
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
|
||||||
|
"keywords": [
|
||||||
|
"uni-scss",
|
||||||
|
"uni-ui",
|
||||||
|
"辅助样式"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"JS SDK",
|
||||||
|
"通用 SDK"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "u"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "n",
|
||||||
|
"联盟": "n"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
mallplusui-uniapp-app/uni_modules/uni-scss/readme.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
@import './setting/_variables.scss';
|
||||||
|
@import './setting/_border.scss';
|
||||||
|
@import './setting/_color.scss';
|
||||||
|
@import './setting/_space.scss';
|
||||||
|
@import './setting/_radius.scss';
|
||||||
|
@import './setting/_text.scss';
|
||||||
|
@import './setting/_styles.scss';
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.uni-border {
|
||||||
|
border: 1px $uni-border-1 solid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
|
||||||
|
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
|
||||||
|
// @mixin get-styles($k,$c) {
|
||||||
|
// @if $k == size or $k == weight{
|
||||||
|
// font-#{$k}:#{$c}
|
||||||
|
// }@else{
|
||||||
|
// #{$k}:#{$c}
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
$uni-ui-color:(
|
||||||
|
// 主色
|
||||||
|
primary: $uni-primary,
|
||||||
|
primary-disable: $uni-primary-disable,
|
||||||
|
primary-light: $uni-primary-light,
|
||||||
|
// 辅助色
|
||||||
|
success: $uni-success,
|
||||||
|
success-disable: $uni-success-disable,
|
||||||
|
success-light: $uni-success-light,
|
||||||
|
warning: $uni-warning,
|
||||||
|
warning-disable: $uni-warning-disable,
|
||||||
|
warning-light: $uni-warning-light,
|
||||||
|
error: $uni-error,
|
||||||
|
error-disable: $uni-error-disable,
|
||||||
|
error-light: $uni-error-light,
|
||||||
|
info: $uni-info,
|
||||||
|
info-disable: $uni-info-disable,
|
||||||
|
info-light: $uni-info-light,
|
||||||
|
// 中性色
|
||||||
|
main-color: $uni-main-color,
|
||||||
|
base-color: $uni-base-color,
|
||||||
|
secondary-color: $uni-secondary-color,
|
||||||
|
extra-color: $uni-extra-color,
|
||||||
|
// 背景色
|
||||||
|
bg-color: $uni-bg-color,
|
||||||
|
// 边框颜色
|
||||||
|
border-1: $uni-border-1,
|
||||||
|
border-2: $uni-border-2,
|
||||||
|
border-3: $uni-border-3,
|
||||||
|
border-4: $uni-border-4,
|
||||||
|
// 黑色
|
||||||
|
black:$uni-black,
|
||||||
|
// 白色
|
||||||
|
white:$uni-white,
|
||||||
|
// 透明
|
||||||
|
transparent:$uni-transparent
|
||||||
|
) !default;
|
||||||
|
@each $key, $child in $uni-ui-color {
|
||||||
|
.uni-#{"" + $key} {
|
||||||
|
color: $child;
|
||||||
|
}
|
||||||
|
.uni-#{"" + $key}-bg {
|
||||||
|
background-color: $child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.uni-shadow-sm {
|
||||||
|
box-shadow: $uni-shadow-sm;
|
||||||
|
}
|
||||||
|
.uni-shadow-base {
|
||||||
|
box-shadow: $uni-shadow-base;
|
||||||
|
}
|
||||||
|
.uni-shadow-lg {
|
||||||
|
box-shadow: $uni-shadow-lg;
|
||||||
|
}
|
||||||
|
.uni-mask {
|
||||||
|
background-color:$uni-mask;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
@mixin radius($r,$d:null ,$important: false){
|
||||||
|
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
|
||||||
|
// Key exists within the $uni-radius variable
|
||||||
|
@if (map-has-key($uni-radius, $r) and $d){
|
||||||
|
@if $d == t {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
}@else if $d == r {
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == b {
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == l {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
}@else if $d == tl {
|
||||||
|
border-top-left-radius:$radius-value;
|
||||||
|
}@else if $d == tr {
|
||||||
|
border-top-right-radius:$radius-value;
|
||||||
|
}@else if $d == br {
|
||||||
|
border-bottom-right-radius:$radius-value;
|
||||||
|
}@else if $d == bl {
|
||||||
|
border-bottom-left-radius:$radius-value;
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
border-radius:$radius-value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $child in $uni-radius {
|
||||||
|
@if($key){
|
||||||
|
.uni-radius-#{"" + $key} {
|
||||||
|
@include radius($key)
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
.uni-radius {
|
||||||
|
@include radius($key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $direction in t, r, b, l,tl, tr, br, bl {
|
||||||
|
@each $key, $child in $uni-radius {
|
||||||
|
@if($key){
|
||||||
|
.uni-radius-#{"" + $direction}-#{"" + $key} {
|
||||||
|
@include radius($key,$direction,false)
|
||||||
|
}
|
||||||
|
}@else{
|
||||||
|
.uni-radius-#{$direction} {
|
||||||
|
@include radius($key,$direction,false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
@mixin fn($space,$direction,$size,$n) {
|
||||||
|
@if $n {
|
||||||
|
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
||||||
|
} @else {
|
||||||
|
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin get-styles($direction,$i,$space,$n){
|
||||||
|
@if $direction == t {
|
||||||
|
@include fn($space, top,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == r {
|
||||||
|
@include fn($space, right,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == b {
|
||||||
|
@include fn($space, bottom,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == l {
|
||||||
|
@include fn($space, left,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == x {
|
||||||
|
@include fn($space, left,$i,$n);
|
||||||
|
@include fn($space, right,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == y {
|
||||||
|
@include fn($space, top,$i,$n);
|
||||||
|
@include fn($space, bottom,$i,$n);
|
||||||
|
}
|
||||||
|
@if $direction == a {
|
||||||
|
@if $n {
|
||||||
|
#{$space}:#{$i*$uni-space-root}px;
|
||||||
|
} @else {
|
||||||
|
#{$space}:#{-$i*$uni-space-root}px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $orientation in m,p {
|
||||||
|
$space: margin;
|
||||||
|
@if $orientation == m {
|
||||||
|
$space: margin;
|
||||||
|
} @else {
|
||||||
|
$space: padding;
|
||||||
|
}
|
||||||
|
@for $i from 0 through 16 {
|
||||||
|
@each $direction in t, r, b, l, x, y, a {
|
||||||
|
.uni-#{$orientation}#{$direction}-#{$i} {
|
||||||
|
@include get-styles($direction,$i,$space,true);
|
||||||
|
}
|
||||||
|
.uni-#{$orientation}#{$direction}-n#{$i} {
|
||||||
|
@include get-styles($direction,$i,$space,false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
|
||||||
|
$-color-white:#fff;
|
||||||
|
$-color-black:#000;
|
||||||
|
@mixin base-style($color) {
|
||||||
|
color: #fff;
|
||||||
|
background-color: $color;
|
||||||
|
border-color: mix($-color-black, $color, 8%);
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: mix($-color-black, $color, 10%);
|
||||||
|
border-color: mix($-color-black, $color, 20%);
|
||||||
|
color: $-color-white;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin is-color($color) {
|
||||||
|
@include base-style($color);
|
||||||
|
&[loading] {
|
||||||
|
@include base-style($color);
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[disabled] {
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
color: $-color-white;
|
||||||
|
border-color: mix(darken($color,10%), $-color-white);
|
||||||
|
background-color: mix($color, $-color-white);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@mixin base-plain-style($color) {
|
||||||
|
color:$color;
|
||||||
|
background-color: mix($-color-white, $color, 90%);
|
||||||
|
border-color: mix($-color-white, $color, 70%);
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: mix($-color-white, $color, 80%);
|
||||||
|
color: $color;
|
||||||
|
outline: none;
|
||||||
|
border-color: mix($-color-white, $color, 50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin is-plain($color){
|
||||||
|
&[plain] {
|
||||||
|
@include base-plain-style($color);
|
||||||
|
&[loading] {
|
||||||
|
@include base-plain-style($color);
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[disabled] {
|
||||||
|
&,
|
||||||
|
&:active {
|
||||||
|
color: mix($-color-white, $color, 40%);
|
||||||
|
background-color: mix($-color-white, $color, 90%);
|
||||||
|
border-color: mix($-color-white, $color, 80%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-btn {
|
||||||
|
margin: 5px;
|
||||||
|
color: #393939;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 200;
|
||||||
|
background-color: #F9F9F9;
|
||||||
|
// TODO 暂时处理边框隐藏一边的问题
|
||||||
|
overflow: visible;
|
||||||
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([type]),&[type=default] {
|
||||||
|
color: #999;
|
||||||
|
&[loading] {
|
||||||
|
background: none;
|
||||||
|
&::before {
|
||||||
|
margin-right:5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&[disabled]{
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:active {
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
background-color: mix($-color-white,$-color-black , 98%);
|
||||||
|
border-color: mix($-color-white, #999, 85%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[plain] {
|
||||||
|
color: #999;
|
||||||
|
background: none;
|
||||||
|
border-color: $uni-border-1;
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
background: none;
|
||||||
|
color: mix($-color-white, $-color-black, 80%);
|
||||||
|
border-color: mix($-color-white, $-color-black, 90%);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
&,
|
||||||
|
&[loading],
|
||||||
|
&:active {
|
||||||
|
background: none;
|
||||||
|
color: mix($-color-white, #999, 60%);
|
||||||
|
border-color: mix($-color-white, #999, 85%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([hover-class]):active {
|
||||||
|
color: mix($-color-white, $-color-black, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&[size=mini] {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 200;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&.uni-btn-small {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
&.uni-btn-mini {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.uni-btn-radius {
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
&[type=primary] {
|
||||||
|
@include is-color($uni-primary);
|
||||||
|
@include is-plain($uni-primary)
|
||||||
|
}
|
||||||
|
&[type=success] {
|
||||||
|
@include is-color($uni-success);
|
||||||
|
@include is-plain($uni-success)
|
||||||
|
}
|
||||||
|
&[type=error] {
|
||||||
|
@include is-color($uni-error);
|
||||||
|
@include is-plain($uni-error)
|
||||||
|
}
|
||||||
|
&[type=warning] {
|
||||||
|
@include is-color($uni-warning);
|
||||||
|
@include is-plain($uni-warning)
|
||||||
|
}
|
||||||
|
&[type=info] {
|
||||||
|
@include is-color($uni-info);
|
||||||
|
@include is-plain($uni-info)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
@mixin get-styles($k,$c) {
|
||||||
|
@if $k == size or $k == weight{
|
||||||
|
font-#{$k}:#{$c}
|
||||||
|
}@else{
|
||||||
|
#{$k}:#{$c}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $key, $child in $uni-headings {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
.uni-#{$key} {
|
||||||
|
@each $k, $c in $child {
|
||||||
|
@include get-styles($k,$c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
.container .uni-#{$key} {
|
||||||
|
@each $k, $c in $child {
|
||||||
|
@include get-styles($k,$c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
// @use "sass:math";
|
||||||
|
@import '../tools/functions.scss';
|
||||||
|
// 间距基础倍数
|
||||||
|
$uni-space-root: 2 !default;
|
||||||
|
// 边框半径默认值
|
||||||
|
$uni-radius-root:5px !default;
|
||||||
|
$uni-radius: () !default;
|
||||||
|
// 边框半径断点
|
||||||
|
$uni-radius: map-deep-merge(
|
||||||
|
(
|
||||||
|
0: 0,
|
||||||
|
// TODO 当前版本暂时不支持 sm 属性
|
||||||
|
// 'sm': math.div($uni-radius-root, 2),
|
||||||
|
null: $uni-radius-root,
|
||||||
|
'lg': $uni-radius-root * 2,
|
||||||
|
'xl': $uni-radius-root * 6,
|
||||||
|
'pill': 9999px,
|
||||||
|
'circle': 50%
|
||||||
|
),
|
||||||
|
$uni-radius
|
||||||
|
);
|
||||||
|
// 字体家族
|
||||||
|
$body-font-family: 'Roboto', sans-serif !default;
|
||||||
|
// 文本
|
||||||
|
$heading-font-family: $body-font-family !default;
|
||||||
|
$uni-headings: () !default;
|
||||||
|
$letterSpacing: -0.01562em;
|
||||||
|
$uni-headings: map-deep-merge(
|
||||||
|
(
|
||||||
|
'h1': (
|
||||||
|
size: 32px,
|
||||||
|
weight: 300,
|
||||||
|
line-height: 50px,
|
||||||
|
// letter-spacing:-0.01562em
|
||||||
|
),
|
||||||
|
'h2': (
|
||||||
|
size: 28px,
|
||||||
|
weight: 300,
|
||||||
|
line-height: 40px,
|
||||||
|
// letter-spacing: -0.00833em
|
||||||
|
),
|
||||||
|
'h3': (
|
||||||
|
size: 24px,
|
||||||
|
weight: 400,
|
||||||
|
line-height: 32px,
|
||||||
|
// letter-spacing: normal
|
||||||
|
),
|
||||||
|
'h4': (
|
||||||
|
size: 20px,
|
||||||
|
weight: 400,
|
||||||
|
line-height: 30px,
|
||||||
|
// letter-spacing: 0.00735em
|
||||||
|
),
|
||||||
|
'h5': (
|
||||||
|
size: 16px,
|
||||||
|
weight: 400,
|
||||||
|
line-height: 24px,
|
||||||
|
// letter-spacing: normal
|
||||||
|
),
|
||||||
|
'h6': (
|
||||||
|
size: 14px,
|
||||||
|
weight: 500,
|
||||||
|
line-height: 18px,
|
||||||
|
// letter-spacing: 0.0125em
|
||||||
|
),
|
||||||
|
'subtitle': (
|
||||||
|
size: 12px,
|
||||||
|
weight: 400,
|
||||||
|
line-height: 20px,
|
||||||
|
// letter-spacing: 0.00937em
|
||||||
|
),
|
||||||
|
'body': (
|
||||||
|
font-size: 14px,
|
||||||
|
font-weight: 400,
|
||||||
|
line-height: 22px,
|
||||||
|
// letter-spacing: 0.03125em
|
||||||
|
),
|
||||||
|
'caption': (
|
||||||
|
'size': 12px,
|
||||||
|
'weight': 400,
|
||||||
|
'line-height': 20px,
|
||||||
|
// 'letter-spacing': 0.03333em,
|
||||||
|
// 'text-transform': false
|
||||||
|
)
|
||||||
|
),
|
||||||
|
$uni-headings
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 主色
|
||||||
|
$uni-primary: #2979ff !default;
|
||||||
|
$uni-primary-disable:lighten($uni-primary,20%) !default;
|
||||||
|
$uni-primary-light: lighten($uni-primary,25%) !default;
|
||||||
|
|
||||||
|
// 辅助色
|
||||||
|
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
||||||
|
$uni-success: #18bc37 !default;
|
||||||
|
$uni-success-disable:lighten($uni-success,20%) !default;
|
||||||
|
$uni-success-light: lighten($uni-success,25%) !default;
|
||||||
|
|
||||||
|
$uni-warning: #f3a73f !default;
|
||||||
|
$uni-warning-disable:lighten($uni-warning,20%) !default;
|
||||||
|
$uni-warning-light: lighten($uni-warning,25%) !default;
|
||||||
|
|
||||||
|
$uni-error: #e43d33 !default;
|
||||||
|
$uni-error-disable:lighten($uni-error,20%) !default;
|
||||||
|
$uni-error-light: lighten($uni-error,25%) !default;
|
||||||
|
|
||||||
|
$uni-info: #8f939c !default;
|
||||||
|
$uni-info-disable:lighten($uni-info,20%) !default;
|
||||||
|
$uni-info-light: lighten($uni-info,25%) !default;
|
||||||
|
|
||||||
|
// 中性色
|
||||||
|
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
||||||
|
$uni-main-color: #3a3a3a !default; // 主要文字
|
||||||
|
$uni-base-color: #6a6a6a !default; // 常规文字
|
||||||
|
$uni-secondary-color: #909399 !default; // 次要文字
|
||||||
|
$uni-extra-color: #c7c7c7 !default; // 辅助说明
|
||||||
|
|
||||||
|
// 边框颜色
|
||||||
|
$uni-border-1: #F0F0F0 !default;
|
||||||
|
$uni-border-2: #EDEDED !default;
|
||||||
|
$uni-border-3: #DCDCDC !default;
|
||||||
|
$uni-border-4: #B9B9B9 !default;
|
||||||
|
|
||||||
|
// 常规色
|
||||||
|
$uni-black: #000000 !default;
|
||||||
|
$uni-white: #ffffff !default;
|
||||||
|
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
|
||||||
|
|
||||||
|
// 背景色
|
||||||
|
$uni-bg-color: #f7f7f7 !default;
|
||||||
|
|
||||||
|
/* 水平间距 */
|
||||||
|
$uni-spacing-sm: 8px !default;
|
||||||
|
$uni-spacing-base: 15px !default;
|
||||||
|
$uni-spacing-lg: 30px !default;
|
||||||
|
|
||||||
|
// 阴影
|
||||||
|
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
|
||||||
|
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
|
||||||
|
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
|
||||||
|
|
||||||
|
// 蒙版
|
||||||
|
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// 合并 map
|
||||||
|
@function map-deep-merge($parent-map, $child-map){
|
||||||
|
$result: $parent-map;
|
||||||
|
@each $key, $child in $child-map {
|
||||||
|
$parent-has-key: map-has-key($result, $key);
|
||||||
|
$parent-value: map-get($result, $key);
|
||||||
|
$parent-type: type-of($parent-value);
|
||||||
|
$child-type: type-of($child);
|
||||||
|
$parent-is-map: $parent-type == map;
|
||||||
|
$child-is-map: $child-type == map;
|
||||||
|
|
||||||
|
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
|
||||||
|
$result: map-merge($result, ( $key: $child ));
|
||||||
|
}@else {
|
||||||
|
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@return $result;
|
||||||
|
};
|
||||||
31
mallplusui-uniapp-app/uni_modules/uni-scss/theme.scss
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// 间距基础倍数
|
||||||
|
$uni-space-root: 2;
|
||||||
|
// 边框半径默认值
|
||||||
|
$uni-radius-root:5px;
|
||||||
|
// 主色
|
||||||
|
$uni-primary: #2979ff;
|
||||||
|
// 辅助色
|
||||||
|
$uni-success: #4cd964;
|
||||||
|
// 警告色
|
||||||
|
$uni-warning: #f0ad4e;
|
||||||
|
// 错误色
|
||||||
|
$uni-error: #dd524d;
|
||||||
|
// 描述色
|
||||||
|
$uni-info: #909399;
|
||||||
|
// 中性色
|
||||||
|
$uni-main-color: #303133;
|
||||||
|
$uni-base-color: #606266;
|
||||||
|
$uni-secondary-color: #909399;
|
||||||
|
$uni-extra-color: #C0C4CC;
|
||||||
|
// 背景色
|
||||||
|
$uni-bg-color: #f5f5f5;
|
||||||
|
// 边框颜色
|
||||||
|
$uni-border-1: #DCDFE6;
|
||||||
|
$uni-border-2: #E4E7ED;
|
||||||
|
$uni-border-3: #EBEEF5;
|
||||||
|
$uni-border-4: #F2F6FC;
|
||||||
|
|
||||||
|
// 常规色
|
||||||
|
$uni-black: #000000;
|
||||||
|
$uni-white: #ffffff;
|
||||||
|
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
||||||
62
mallplusui-uniapp-app/uni_modules/uni-scss/variables.scss
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
@import './styles/setting/_variables.scss';
|
||||||
|
// 间距基础倍数
|
||||||
|
$uni-space-root: 2;
|
||||||
|
// 边框半径默认值
|
||||||
|
$uni-radius-root:5px;
|
||||||
|
|
||||||
|
// 主色
|
||||||
|
$uni-primary: #2979ff;
|
||||||
|
$uni-primary-disable:mix(#fff,$uni-primary,50%);
|
||||||
|
$uni-primary-light: mix(#fff,$uni-primary,80%);
|
||||||
|
|
||||||
|
// 辅助色
|
||||||
|
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
||||||
|
$uni-success: #18bc37;
|
||||||
|
$uni-success-disable:mix(#fff,$uni-success,50%);
|
||||||
|
$uni-success-light: mix(#fff,$uni-success,80%);
|
||||||
|
|
||||||
|
$uni-warning: #f3a73f;
|
||||||
|
$uni-warning-disable:mix(#fff,$uni-warning,50%);
|
||||||
|
$uni-warning-light: mix(#fff,$uni-warning,80%);
|
||||||
|
|
||||||
|
$uni-error: #e43d33;
|
||||||
|
$uni-error-disable:mix(#fff,$uni-error,50%);
|
||||||
|
$uni-error-light: mix(#fff,$uni-error,80%);
|
||||||
|
|
||||||
|
$uni-info: #8f939c;
|
||||||
|
$uni-info-disable:mix(#fff,$uni-info,50%);
|
||||||
|
$uni-info-light: mix(#fff,$uni-info,80%);
|
||||||
|
|
||||||
|
// 中性色
|
||||||
|
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
||||||
|
$uni-main-color: #3a3a3a; // 主要文字
|
||||||
|
$uni-base-color: #6a6a6a; // 常规文字
|
||||||
|
$uni-secondary-color: #909399; // 次要文字
|
||||||
|
$uni-extra-color: #c7c7c7; // 辅助说明
|
||||||
|
|
||||||
|
// 边框颜色
|
||||||
|
$uni-border-1: #F0F0F0;
|
||||||
|
$uni-border-2: #EDEDED;
|
||||||
|
$uni-border-3: #DCDCDC;
|
||||||
|
$uni-border-4: #B9B9B9;
|
||||||
|
|
||||||
|
// 常规色
|
||||||
|
$uni-black: #000000;
|
||||||
|
$uni-white: #ffffff;
|
||||||
|
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
||||||
|
|
||||||
|
// 背景色
|
||||||
|
$uni-bg-color: #f7f7f7;
|
||||||
|
|
||||||
|
/* 水平间距 */
|
||||||
|
$uni-spacing-sm: 8px;
|
||||||
|
$uni-spacing-base: 15px;
|
||||||
|
$uni-spacing-lg: 30px;
|
||||||
|
|
||||||
|
// 阴影
|
||||||
|
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
|
||||||
|
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
|
||||||
|
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
|
||||||
|
|
||||||
|
// 蒙版
|
||||||
|
$uni-mask: rgba($color: #000000, $alpha: 0.4);
|
||||||