This commit is contained in:
yeliang-king
2023-01-13 07:36:43 +08:00
21 changed files with 7844 additions and 515 deletions

View File

@@ -35,12 +35,7 @@
<!-- uni 中不能使用 vue component 所以用if判断每个组件 -->
<div v-for="(item, index) in pageData.list" :key="index">
<!-- 搜索栏如果在楼层装修顶部则会自动浮动否则不浮动 -->
<u-navbar
class="navbar"
v-if="item.type == 'search'"
:is-back="false"
:is-fixed="index === 1 ? false : true"
>
<u-navbar class="navbar" v-if="item.type == 'search'" :is-back="false" :is-fixed="index === 1 ? false : true">
<search style="width: 100%" :res="item.options" />
<!-- #ifndef H5 -->
<!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode -->
@@ -51,22 +46,10 @@
</u-navbar>
<carousel v-if="item.type == 'carousel'" :res="item.options" />
<titleLayout v-if="item.type == 'title'" :res="item.options" />
<leftOneRightTwo
v-if="item.type == 'leftOneRightTwo'"
:res="item.options"
/>
<leftTwoRightOne
v-if="item.type == 'leftTwoRightOne'"
:res="item.options"
/>
<topOneBottomTwo
v-if="item.type == 'topOneBottomTwo'"
:res="item.options"
/>
<topTwoBottomOne
v-if="item.type == 'topTwoBottomOne'"
:res="item.options"
/>
<leftOneRightTwo v-if="item.type == 'leftOneRightTwo'" :res="item.options" />
<leftTwoRightOne v-if="item.type == 'leftTwoRightOne'" :res="item.options" />
<topOneBottomTwo v-if="item.type == 'topOneBottomTwo'" :res="item.options" />
<topTwoBottomOne v-if="item.type == 'topTwoBottomOne'" :res="item.options" />
<flexThree v-if="item.type == 'flexThree'" :res="item.options" />
<flexFive v-if="item.type == 'flexFive'" :res="item.options" />
<flexFour v-if="item.type == 'flexFour'" :res="item.options" />
@@ -115,7 +98,7 @@ import storage from "@/utils/storage.js";
// import {receiveCoupons} from "@/api/members"
export default {
data() {
data () {
return {
config,
storage,
@@ -123,7 +106,7 @@ export default {
showCp:false,
pageData: "", //楼层页面数据
isIos: "",
enableLoad:false, //触底加载 针对于商品模块
enableLoad: false, //触底加载 针对于商品模块
};
},
components: {
@@ -147,7 +130,7 @@ export default {
promotions: tpl_promotions,
},
mounted() {
mounted () {
this.init();
// #ifdef MP-WEIXIN
// 小程序默认分享
@@ -208,23 +191,23 @@ export default {
/**
* 实例化首页数据楼层
*/
init() {
init () {
this.pageData = "";
getFloorData().then((res) => {
if (res.data.success) {
const result = JSON.parse(res.data.result.pageData)
this.pageData = result;
if(result.list.length){
if (result.list.length) {
// 如果最后一个装修模块是商品模块的话 默认启用自动加载
result.list[result.list.length-1] ? result.list[result.list.length-1].model == 'goods' ? this.enableLoad = true : '' : ''
}
result.list[result.list.length - 1] ? result.list[result.list.length - 1].model == 'goods' ? this.enableLoad = true : '' : ''
}
}
});
},
// 是否有网络链接
isConnected(val){
val ? this.init() : ''
},
// 是否有网络链接
isConnected (val) {
val ? this.init() : ''
},
/**
* TODO 扫码功能后续还会后续增加
@@ -234,18 +217,18 @@ export default {
* 扫描二维码登录
* 扫描其他站信息 弹出提示,返回首页。
*/
seacnCode() {
seacnCode () {
uni.scanCode({
success: function (res) {
let path = encodeURIComponent(res.result);
if(path!=undefined && path.indexOf("QR_CODE_LOGIN_SESSION")==0){
if (path != undefined && path.indexOf("QR_CODE_LOGIN_SESSION") == 0) {
console.log(path)
//app扫码登录
uni.navigateTo({
url:"/pages/passport/scannerCodeLoginConfirm?token="+path
url: "/pages/passport/scannerCodeLoginConfirm?token=" + path
});
return;
}
@@ -279,7 +262,7 @@ export default {
/**
* 提示获取权限
*/
tipsGetSettings() {
tipsGetSettings () {
uni.showModal({
title: "提示",
content: "您已经关闭相机权限,去设置",
@@ -299,7 +282,7 @@ export default {
* 唤醒客户端扫码
* 没权限去申请权限,有权限获取扫码功能
*/
async scan() {
async scan () {
// #ifdef APP-PLUS
this.isIos = plus.os.name == "iOS";
// 判断是否是Ios

View File

@@ -21,7 +21,7 @@
<u-row text-align="center" gutter="16" class="point">
<u-col text-align="center" span="4" @click="navigateTo('/pages/mine/deposit/operation')">
<view>预存款</view>
<view class="money">{{ walletNum | unitPrice}}</view>
<view class="money">{{ walletNum | unitPrice }}</view>
</u-col>
<u-col text-align="center" span="4" @click="navigateTo('/pages/cart/coupon/myCoupon')">
@@ -36,7 +36,6 @@
</u-row>
<!-- 我的订单代付款 -->
<view class="order">
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')">
<div class="bag bag2">
<u-icon name="bag-fill" size="35" color="#fff"></u-icon>
@@ -61,12 +60,12 @@
</div>
<view>售后</view>
</view>
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
<div class="bag bag1">
<u-icon name="order" size="35" color="#fff"></u-icon>
</div>
<view>我的订单</view>
</view>
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
<div class="bag bag1">
<u-icon name="order" size="35" color="#fff"></u-icon>
</div>
<view>我的订单</view>
</view>
</view>
</div>
<!-- 常用工具 -->
@@ -94,7 +93,7 @@ export default {
walletNum: "",
};
},
onLoad() {},
onLoad() { },
onShow() {
this.userInfo = this.$options.filters.isLogin();
if (this.$options.filters.isLogin("auth")) {
@@ -116,7 +115,7 @@ export default {
},
// #endif
mounted() {},
mounted() { },
methods: {
/**
* 统一跳转接口,拦截未登录路由
@@ -154,6 +153,7 @@ html,
body {
overflow: auto;
}
.money {
overflow: hidden;
@@ -175,12 +175,14 @@ body {
color: #ffffff;
display: flex;
justify-content: space-between;
.head-1 {
text-align: center;
width: 152rpx;
position: relative;
display: flex;
align-items: center;
image {
width: 152rpx;
height: 144rpx;
@@ -188,6 +190,7 @@ body {
margin-bottom: 30rpx;
border: 3px solid #fff;
}
.edti-head {
position: absolute;
width: 40rpx;
@@ -196,23 +199,27 @@ body {
background-color: rgba(255, 255, 255, 0.3);
top: 100rpx;
right: 0;
image {
width: 100%;
height: 100%;
}
}
}
.head-2 {
flex: 1;
margin-left: 30rpx;
margin-top: 100rpx;
line-height: 1;
}
/deep/ .u-icon,
.u-icon {
margin-top: 106rpx;
}
}
.pointBox {
width: 94%;
margin: 0 3%;
@@ -220,6 +227,7 @@ body {
border-radius: 20rpx;
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
}
.point {
text-align: center;
height: 160rpx;
@@ -227,12 +235,14 @@ body {
font-size: $font-sm;
// #ifdef MP-WEIXIN
padding: 24rpx;
// #endif
.u-col {
view {
color: $u-main-color;
font-size: 28rpx;
}
view:last-child {
margin-top: 8rpx;
color: $main-color;
@@ -240,6 +250,7 @@ body {
}
}
}
.order {
height: 140rpx;
text-align: center;
@@ -249,10 +260,12 @@ body {
align-items: center;
padding: 0 3%;
color: #999;
.order-item {
position: relative;
line-height: 2em;
width: 96rpx;
:first-child {
font-size: 48rpx;
margin-bottom: 10rpx;
@@ -264,6 +277,7 @@ body {
.box {
transform: translateY(-30rpx);
}
.user-name {
font-size: 34rpx;
}

View File

@@ -19,10 +19,10 @@
<image src="/static/mine/feedback.png" mode=""></image>
<view>我的评价</view>
</view>
<view class="interact-item" @click="linkMsgDetail()">
<!-- <view class="interact-item" @click="linkMsgDetail()">
<image src="/static/mine/mycommit.png" mode=""></image>
<view>我的消息</view>
</view>
</view> -->
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
@@ -126,7 +126,7 @@ export default {
linkMsgDetail(){
uni.navigateTo({
url: `/pages/tabbar/home/web-view?IM=0`,
url: `/pages/mine/im/list`,
});
},