2023-02-27

功能完善
This commit is contained in:
2023-02-27 18:10:06 +08:00
parent 837e8e6552
commit e40ca500b4
42 changed files with 1901 additions and 1841 deletions

View File

@@ -44,6 +44,7 @@
async sysInfoMethod() {
let params = {};
let list = await Api.apiCall('get', Api.index.sysInfo, params);
console.log('sysInfo>>>>>',sysInfo)
this.$db.set('sysInfo', list)
},

View File

@@ -1,194 +0,0 @@
<template>
<view class="uni-load-more">
<view class="uni-load-more__img" v-show="status === 'loading' && showIcon">
<view class="load1">
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
</view>
<view class="load2">
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
</view>
<view class="load3">
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
<view :style="{background:color}"></view>
</view>
</view>
<text class="uni-load-more__text" :style="{color:color}">{{status === 'more' ? contentText.contentdown : (status === 'loading' ? contentText.contentrefresh : contentText.contentnomore)}}</text>
</view>
</template>
<script>
export default {
name: "uni-load-more",
props: {
status: {
//上拉的状态more-loading前loading-loading中noMore-没有更多了
type: String,
default: 'more'
},
showIcon: {
type: Boolean,
default: true
},
color: {
type: String,
default: "#777777"
},
contentText: {
type: Object,
default () {
return {
contentdown: "上拉显示更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了"
};
}
}
},
data() {
return {}
}
}
</script>
<style>
@charset "UTF-8";
.uni-load-more {
display: flex;
flex-direction: row;
height: 80upx;
align-items: center;
justify-content: center
}
.uni-load-more__text {
font-size: 28upx;
color: #999
}
.uni-load-more__img {
height: 24px;
width: 24px;
margin-right: 10px
}
.uni-load-more__img>view {
position: absolute
}
.uni-load-more__img>view view {
width: 6px;
height: 2px;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px;
background: #999;
position: absolute;
opacity: .2;
transform-origin: 50%;
animation: load 1.56s ease infinite
}
.uni-load-more__img>view view:nth-child(1) {
transform: rotate(90deg);
top: 2px;
left: 9px
}
.uni-load-more__img>view view:nth-child(2) {
transform: rotate(180deg);
top: 11px;
right: 0
}
.uni-load-more__img>view view:nth-child(3) {
transform: rotate(270deg);
bottom: 2px;
left: 9px
}
.uni-load-more__img>view view:nth-child(4) {
top: 11px;
left: 0
}
.load1,
.load2,
.load3 {
height: 24px;
width: 24px
}
.load2 {
transform: rotate(30deg)
}
.load3 {
transform: rotate(60deg)
}
.load1 view:nth-child(1) {
animation-delay: 0s
}
.load2 view:nth-child(1) {
animation-delay: .13s
}
.load3 view:nth-child(1) {
animation-delay: .26s
}
.load1 view:nth-child(2) {
animation-delay: .39s
}
.load2 view:nth-child(2) {
animation-delay: .52s
}
.load3 view:nth-child(2) {
animation-delay: .65s
}
.load1 view:nth-child(3) {
animation-delay: .78s
}
.load2 view:nth-child(3) {
animation-delay: .91s
}
.load3 view:nth-child(3) {
animation-delay: 1.04s
}
.load1 view:nth-child(4) {
animation-delay: 1.17s
}
.load2 view:nth-child(4) {
animation-delay: 1.3s
}
.load3 view:nth-child(4) {
animation-delay: 1.43s
}
@-webkit-keyframes load {
0% {
opacity: 1
}
100% {
opacity: .2
}
}
</style>

View File

@@ -5,11 +5,11 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:8001/";
// baseUrl = "http://26077a35f5.wicp.vip:43609/";
baseUrl = "http://www.yyundong.com:8083/";
baseUrl = "http://mall.yyundong.com/portalapi/api/";
socketUrl = "ws://8192.168.43.195:8083/";
} else if (process.env.NODE_ENV === 'production') {
// 生产环境
baseUrl = "http://www.yyundong.com:8083/";
baseUrl = "http://mall.yyundong.com/portalapi/api/";
// baseUrl = "http://192.168.43.195:8083/";
socketUrl = "ws://192.168.43.195:8083/";
}

View File

@@ -2,8 +2,8 @@
"name" : "汇融云链",
"appid" : "__UNI__FB2C9C4",
"description" : "",
"versionName" : "4.0.0.0",
"versionCode" : 4000,
"versionName" : "1.0.0.2",
"versionCode" : 1002,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
@@ -148,7 +148,7 @@
"permission" : {}
},
"h5" : {
"title" : "宇运动商城",
"title" : "汇融云链",
"domain" : "https://www.yyundong.com:8088/h5",
"router" : {
"base" : ""

View File

@@ -11,14 +11,14 @@
"app-plus": {
"titleNView": {
"type": "transparent",
"searchInput": {
"backgroundColor": "rgba(231, 231, 231,.7)",
"borderRadius": "16px",
"placeholder": "请输入要查询的信息",
"disabled": true,
"placeholderColor": "#606266"
}
,
// "searchInput": {
// "backgroundColor": "rgba(231, 231, 231,.7)",
// "borderRadius": "16px",
// "placeholder": "请输入要查询的信息",
// "disabled": true,
// "placeholderColor": "#606266"
// }
// ,
"buttons": [{
"fontSrc": "/static/yticon.ttf",
"text": "",
@@ -171,7 +171,7 @@
}, {
"path": "pages/index/user",
"style": {
"navigationBarTitleText": "我的",
"navigationBarTitleText": "我的云链",
// #ifdef MP
"navigationStyle": "custom",
// #endif
@@ -182,7 +182,7 @@
"type": "transparent",
"buttons": [{
"fontSrc": "/static/yticon.ttf",
"text": "\ue60f",
"text": "",
"fontSize": "24",
"color": "#303133",
"width": "46px",
@@ -190,11 +190,11 @@
},
{
"fontSrc": "/static/yticon.ttf",
"text": "\ue744",
"text": "",
"fontSize": "28",
"color": "#303133",
"background": "rgba(0,0,0,0)",
"redDot": true
"background": "rgba(0,0,0,0)"
// "redDot": true
}
]
}
@@ -809,7 +809,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "宇运动商城",
"navigationBarTitleText": "汇融云链",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#f8f8f8"
},

View File

@@ -268,7 +268,7 @@
mapState
} from 'vuex';
import navBar from '@/components/zhouWei-navBar';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
coupon,
@@ -390,11 +390,14 @@
async sysInfoMethod() {
let params = {};
let list = this.$db.get('sysInfo')
if (!list) {
// let list = this.$db.get('sysInfo')
console.log('sysInfo>>>>>1111111111111', 1111111111111111)
// if (!list) {
list = await Api.apiCall('get', Api.index.sysInfo, params);
console.log('sysInfo>>>>>2222222222', sysInfo)
this.$db.set('sysInfo', list)
}
// }
},
getCode() {

View File

@@ -88,7 +88,7 @@
</template>
<script>
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import uniIcon from '@/components/uni-icon/uni-icon.vue';
import eonfox from '@/components/eonfox/eonfox.js';
import fns from '@/components/eonfox/fns.js';

View File

@@ -35,7 +35,7 @@
</view>
</view>
<!-- <view class="vip-card-box" @click="toNav('../../pagesU/user/applyMember')"> -->
<view class="vip-card-box" @click="upData()">
<!-- <view class="vip-card-box" @click="upData()">
<image class="card-bg" src="/static/vip-card-bg.png" mode=""></image>
<view class="b-btn">立即升级</view>
<view class="tit" v-if="userDetailInfo">
@@ -44,7 +44,7 @@
</view>
<text class="e-m">汇融云链</text>
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
</view>
</view> -->
</view>
<view class="cover-container" :style="[
@@ -64,10 +64,10 @@
<text class="num">{{ couponList.length || 0 }}</text>
<text>优惠券</text>
</view>
<view class="tj-item" @click="toNav('/pages/integral/home/home')">
<!-- <view class="tj-item" @click="toNav('/pages/integral/home/home')">
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
<text>积分</text>
</view>
</view> -->
</view>
<!-- 订单 -->
<view class="order-section">

View File

@@ -47,7 +47,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -66,7 +66,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
export default {

View File

@@ -77,7 +77,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import Json from '@/Json';
import { formatDate } from '@/common/date';

View File

@@ -1,33 +1,35 @@
<template>
<view class="container">
<view class="list-cell b-b m-t" @click="navTo('../../pagesU/user/profile')" hover-class="cell-hover" :hover-stay-time="50">
<view class="list-cell b-b m-t" @click="navTo('../../pagesU/user/profile')" hover-class="cell-hover"
:hover-stay-time="50">
<text class="cell-tit">个人资料</text>
<text class="cell-more yticon icon-you"></text>
</view>
<view class="list-cell b-b" @click="navTo('../../pagesU/address/address')" hover-class="cell-hover" :hover-stay-time="50">
<view class="list-cell b-b" @click="navTo('../../pagesU/address/address')" hover-class="cell-hover"
:hover-stay-time="50">
<text class="cell-tit">收货地址</text>
<text class="cell-more yticon icon-you"></text>
</view>
<view class="list-cell" @click="navTo('/pages/set/certification')" hover-class="cell-hover" :hover-stay-time="50">
<!-- <view class="list-cell" @click="navTo('/pages/set/certification')" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">实名认证</text>
<text class="cell-more yticon icon-you"></text>
</view>
</view> -->
<view class="list-cell m-t">
<!-- <view class="list-cell m-t">
<text class="cell-tit">消息推送</text>
<switch checked color="#fa436a" @change="switchChange" />
</view>
<view class="list-cell m-t b-b" @click="navTo('清除缓存')" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">清除缓存</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">
<text class="cell-tit">关于{{ sysInfo.name }}</text>
<text class="cell-more yticon icon-you"></text>
</view> -->
<view class="list-cell" @click="updateApp()">
<text class="cell-tit">检查更新</text>
<!-- <text class="cell-tip">当前版本 {{sysInfo.version}}</text> -->
<text class="cell-tip">v {{version}}</text>
<text class="cell-more yticon icon-you"></text>
</view>
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
@@ -38,8 +40,12 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import { mapMutations } from 'vuex';
import APPUpdate from '../../plugins/APPUpdate/index.js'
import {
mapMutations
} from 'vuex';
import APPUpdate, {
getCurrentNo
} from '../../plugins/APPUpdate/index.js'
export default {
components: {
@@ -47,12 +53,17 @@ export default {
},
data() {
return {
sysInfo: '',
userInfo:{}
versionCode: "",
version: "",
};
},
onLoad() {
this.sysInfo = this.$db.get('sysInfo');
let that = this;
getCurrentNo(version => {
that.version = version.version
console.log("qqqq", that.version)
})
},
methods: {
...mapMutations(['logout']),
@@ -61,7 +72,7 @@ export default {
uni.navigateTo({
url: url
});
this.$api.msg(`跳转到${url}`);
// this.$api.msg(`跳转到${url}`);
},
//退出登录
toLogout() {
@@ -70,7 +81,6 @@ export default {
success: e => {
if (e.confirm) {
this.logout();
this.$db.del('userInfos');
this.$db.del('token');
Api.apiCall('post', Api.index.logout, {});
setTimeout(() => {
@@ -86,6 +96,7 @@ export default {
this.$api.msg(`${statusTip}消息推送`);
},
updateApp() {
console.log("qqqq", 11111111111111111);
// true 没有新版本的时候有提示默认false
APPUpdate(true);
}
@@ -97,6 +108,7 @@ export default {
page {
background: $page-color-base;
}
.list-cell {
display: flex;
align-items: baseline;
@@ -105,43 +117,52 @@ page {
position: relative;
background: #fff;
justify-content: center;
&.log-out-btn {
margin-top: 40upx;
border-radius: 50upx;
width: 95%;
margin-left: 2.5%;
background: $uni-color-primary;
.cell-tit {
color: #ffffff;
text-align: center;
margin-right: 0;
}
}
&.cell-hover {
background: #fafafa;
}
&.b-b:after {
left: 30upx;
}
&.m-t {
margin-top: 16upx;
}
.cell-more {
align-self: baseline;
font-size: $font-lg;
color: $font-color-light;
margin-left: 10upx;
}
.cell-tit {
flex: 1;
font-size: $font-base + 2upx;
color: $font-color-dark;
margin-right: 10upx;
}
.cell-tip {
font-size: $font-base;
color: $font-color-light;
}
switch {
transform: translateX(16upx) scale(0.84);
}

View File

@@ -55,7 +55,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
export default {

View File

@@ -117,7 +117,7 @@
mapState
} from 'vuex';
import navBar from '@/components/zhouWei-navBar';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
coupon,

View File

@@ -42,7 +42,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
uniLoadMore

View File

@@ -31,7 +31,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
uniLoadMore

View File

@@ -42,7 +42,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
uniLoadMore

View File

@@ -42,7 +42,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
uniLoadMore

View File

@@ -43,7 +43,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -30,7 +30,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -43,7 +43,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -70,7 +70,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -43,7 +43,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -3,7 +3,9 @@
<view class="carousel">
<swiper indicator-dots circular="true" duration="400">
<swiper-item class="swiper-item" v-for="(item, index) in small" :key="index">
<view class="image-wrapper"><image :src="item" class="loaded" mode="aspectFill"></image></view>
<view class="image-wrapper">
<image :src="item" class="loaded" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
</view>
@@ -12,12 +14,14 @@
<text class="title">{{ goods.name }}</text>
<view class="price-box">
<!-- <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-else-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="price"
v-if="goods.vipPrice && goods.vipPrice > 0">惠农价¥{{ (goods.price * goods.memberRate) / 10 }}</text> -->
<text class="price" >惠农¥{{ goods.originalPrice }}</text>
<text class="m-price" >市场价¥{{ goods.price }}</text>
<!-- <text class="m-price" v-else-if="goods.vipPrice && goods.vipPrice > 0">市场价¥{{ goods.price }}</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 class="bot-row">
<text>销量: {{ goods.sale }}</text>
@@ -25,7 +29,7 @@
<text>浏览量: {{ goods.hit }}</text>
</view>
</view>
<view class="share-section" @click="navToTabPageStore(goods.storeId)">
<!-- <view class="share-section" @click="navToTabPageStore(goods.storeId)">
<view class="share-icon">
<text class="yticon icon-xingxing"></text>
@@ -39,7 +43,7 @@
</view>
<!--分享-->
<view class="share-section" @click="share">
<!-- <view class="share-section" @click="share">
<view class="share-icon">
<text class="yticon icon-xingxing"></text>
@@ -50,13 +54,14 @@
立即分享
<text class="yticon icon-you"></text>
</view>
</view>
</view> -->
<view class="c-list">
<view class="c-row b-b" v-if="skuList && skuList.length > 0" @click="toggleSpec">
<text class="tit">规格</text>
<view class="con">
<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem.name }}</text>
<text class="selected-text" v-for="(sItem, sIndex) in specSelected"
:key="sIndex">{{ sItem.name }}</text>
</view>
<text class="yticon icon-you"></text>
</view>
@@ -124,8 +129,8 @@
</view>
<view class="action-btn-group">
<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(goods)">立即购买</button>
<button type="primary" class=" action-btn no-border add-cart-btn" @click="addCart(goods)">加入购物车</button>
<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(goods)">立即购买</button>
</view>
</view>
@@ -161,21 +166,17 @@
<text class="stock">库存{{ sku.stock }}</text>
<view class="selected">
已选
<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem.name }}</text>
<text class="selected-text" v-for="(sItem, sIndex) in specSelected"
:key="sIndex">{{ sItem.name }}</text>
</view>
</view>
</view>
<view v-for="(item, index) in specList" :key="index" class="attr-list">
<text>{{ item.name }}</text>
<view class="item-list">
<text
v-for="(childItem, childIndex) in specChildList"
v-if="childItem.pid === item.id"
:key="childIndex"
class="tit"
:class="{ selected: childItem.selected }"
@click="selectSpec(childIndex, childItem.pid)"
>
<text v-for="(childItem, childIndex) in specChildList" v-if="childItem.pid === item.id"
:key="childIndex" class="tit" :class="{ selected: childItem.selected }"
@click="selectSpec(childIndex, childItem.pid)">
{{ childItem.name }}
</text>
</view>
@@ -192,8 +193,12 @@
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import share from '@/components/share';
import { mapState } from 'vuex';
import { formatDate } from '@/common/date';
import {
mapState
} from 'vuex';
import {
formatDate
} from '@/common/date';
export default {
components: {
@@ -221,8 +226,7 @@ export default {
general: 0,
goods: 0
},
imgList: [
{
imgList: [{
src: 'https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg'
},
{
@@ -243,7 +247,9 @@ export default {
let id = ops.id;
if (id) {
this.logining = true;
let params = { id: ops.id };
let params = {
id: ops.id
};
let data = await Api.apiCall('get', Api.goods.goodsDetail, params);
this.logining = false;
@@ -292,10 +298,15 @@ export default {
});
}
if (this.hasLogin) {
let params = { goodsId: ops.id, pic: this.goods.pic };
let params = {
goodsId: ops.id,
pic: this.goods.pic
};
await Api.apiCall('post', Api.goods.addView, params);
}
let params1 = { goodsId: ops.id };
let params1 = {
goodsId: ops.id
};
let consoltL = await Api.apiCall('get', Api.goods.consultList, params1);
this.consultList = consoltL.list;
this.consultCount = consoltL.count;
@@ -327,7 +338,8 @@ export default {
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
this.sku = item;
}
if (valuesA.length == 3 && item.sp3 == valuesA[0] && item.sp2 == valuesA[1] && item.sp1 == valuesA[2]) {
if (valuesA.length == 3 && item.sp3 == valuesA[0] && item.sp2 == valuesA[1] && item.sp1 ==
valuesA[2]) {
this.sku = item;
}
if (!this.sku.pic) {
@@ -363,11 +375,13 @@ export default {
return match;
});
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi,
'max-width:100%;');
return match;
});
newContent = newContent.replace(/<br[^>]*\/>/gi, '');
newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');
newContent = newContent.replace(/\<img/gi,
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');
return newContent;
} else {
return '暂无商品详情';
@@ -406,7 +420,9 @@ export default {
title: '请稍后'
});
let params = { couponId: index.id };
let params = {
couponId: index.id
};
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
console.log(data);
if (data) {
@@ -459,12 +475,15 @@ export default {
if (valuesA.length == 2 && item.sp2 == valuesA[0] && item.sp1 == valuesA[1]) {
this.sku = item;
}
if (valuesA.length == 3 && item.sp3 == valuesA[0] && item.sp2 == valuesA[1] && item.sp1 == valuesA[2]) {
if (valuesA.length == 3 && item.sp3 == valuesA[0] && item.sp2 == valuesA[1] && item.sp1 ==
valuesA[2]) {
this.sku = item;
}
});
if (!this.sku) {
uni.showToast({ title: '商品不存在!' });
uni.showToast({
title: '商品不存在!'
});
}
if (!this.sku.pic) {
this.sku.pic = this.goods.pic;
@@ -494,7 +513,14 @@ export default {
});
} else {
this.favorite = !this.favorite;
let params = { objId: item.id, type: 1, name: item.name, meno1: item.pic, meno2: item.price, meno3: item.sale };
let params = {
objId: item.id,
type: 1,
name: item.name,
meno1: item.pic,
meno2: item.price,
meno3: item.sale
};
Api.apiCall('post', Api.goods.favoriteSave, params);
}
},
@@ -508,7 +534,9 @@ export default {
}
let userInfo = uni.getStorageSync('userInfo');
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
uni.showToast({ title: '不能购买自己店铺的商品!' });
uni.showToast({
title: '不能购买自己店铺的商品!'
});
return;
}
let data;
@@ -518,10 +546,15 @@ export default {
console.log(this.sku);
console.log(this.sku.stock);
if (this.sku.stock < 1) {
uni.showToast({ title: '库存不够!' });
uni.showToast({
title: '库存不够!'
});
return;
}
let params = { goodsId: id, skuId: this.sku.id };
let params = {
goodsId: id,
skuId: this.sku.id
};
// data = await Api.apiCall('post', Api.order.addCart, params);
let dataJson = {};
@@ -536,10 +569,14 @@ export default {
});
} else {
if (this.goods.stock < 1) {
uni.showToast({ title: '库存不够!' });
uni.showToast({
title: '库存不够!'
});
return;
}
let params = { goodsId: id };
let params = {
goodsId: id
};
// data = await Api.apiCall('post', Api.order.addCart, params);
let dataJson = {};
@@ -566,7 +603,9 @@ export default {
console.log(userInfo);
console.log(this.goods.storeId);
if (userInfo && userInfo.storeId && userInfo.storeId == this.goods.storeId) {
uni.showToast({ title: '不能购买自己店铺的商品!' });
uni.showToast({
title: '不能购买自己店铺的商品!'
});
return;
}
let id = item.id;
@@ -574,17 +613,26 @@ export default {
if (this.sku && this.sku.id) {
if (this.sku.stock < 1) {
uni.showToast({ title: '库存不够!' });
uni.showToast({
title: '库存不够!'
});
return;
}
let params = { goodsId: id, skuId: this.sku.id };
let params = {
goodsId: id,
skuId: this.sku.id
};
data = await Api.apiCall('post', Api.order.addCart, params);
} else {
if (this.goods.stock < 1) {
uni.showToast({ title: '库存不够!' });
uni.showToast({
title: '库存不够!'
});
return;
}
let params = { goodsId: id };
let params = {
goodsId: id
};
data = await Api.apiCall('post', Api.order.addCart, params);
}
console.log("data=========:" + data)
@@ -604,26 +652,32 @@ page {
background: $page-color-base;
padding-bottom: 160upx;
}
.icon-you {
font-size: $font-base + 2upx;
color: #888;
}
.carousel {
height: 722upx;
position: relative;
swiper {
height: 100%;
}
.image-wrapper {
width: 100%;
height: 100%;
}
.swiper-item {
display: flex;
justify-content: center;
align-content: center;
height: 750upx;
overflow: hidden;
image {
width: 100%;
height: 100%;
@@ -642,6 +696,7 @@ page {
height: 50upx;
line-height: 50upx;
}
.price-box {
display: flex;
align-items: baseline;
@@ -650,13 +705,16 @@ page {
font-size: 26upx;
color: $uni-color-primary;
}
.price {
font-size: $font-lg + 2upx;
}
.m-price {
margin: 0 12upx;
color: $font-color-light;
}
.coupon-tip {
align-items: center;
padding: 4upx 10upx;
@@ -667,17 +725,20 @@ page {
line-height: 1;
transform: translateY(-4upx);
}
.bot-row {
display: flex;
align-items: center;
height: 50upx;
font-size: $font-sm;
color: $font-color-light;
text {
flex: 1;
}
}
}
/* 分享 */
.share-section {
display: flex;
@@ -685,6 +746,7 @@ page {
color: $font-color-base;
background: linear-gradient(left, #fdf5f6, #fbebf6);
padding: 12upx 30upx;
.share-icon {
display: flex;
align-items: center;
@@ -697,6 +759,7 @@ page {
overflow: hidden;
font-size: 22upx;
color: $uni-color-primary;
&:after {
content: '';
width: 50upx;
@@ -708,6 +771,7 @@ page {
background: $uni-color-primary;
}
}
.icon-xingxing {
position: relative;
z-index: 1;
@@ -717,21 +781,25 @@ page {
color: #fff;
line-height: 1;
}
.tit {
font-size: $font-base;
margin-left: 10upx;
}
.icon-bangzhu1 {
padding: 10upx;
font-size: 30upx;
line-height: 1;
}
.share-btn {
flex: 1;
text-align: right;
font-size: $font-sm;
color: $uni-color-primary;
}
.icon-you {
font-size: $font-sm;
margin-left: 4upx;
@@ -743,31 +811,38 @@ page {
font-size: $font-sm + 2upx;
color: $font-color-base;
background: #fff;
.c-row {
display: flex;
align-items: center;
padding: 20upx;
position: relative;
}
.tit {
width: 140upx;
}
.con {
flex: 1;
color: $font-color-dark;
.selected-text {
margin-right: 10upx;
}
}
.bz-list {
height: 40upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
text {
display: inline-block;
margin-right: 30upx;
}
}
.con-list {
flex: 1;
display: flex;
@@ -775,6 +850,7 @@ page {
color: $font-color-dark;
line-height: 40upx;
}
.red {
color: $uni-color-primary;
}
@@ -787,35 +863,42 @@ page {
padding: 20upx;
background: #fff;
margin-top: 16upx;
.e-header {
display: flex;
align-items: center;
height: 70upx;
font-size: $font-sm + 2upx;
color: $font-color-light;
.tit {
font-size: $font-base + 2upx;
color: $font-color-dark;
margin-right: 4upx;
}
.tip {
flex: 1;
text-align: right;
}
.icon-you {
margin-left: 10upx;
}
}
}
.eva-box {
display: flex;
padding: 20upx 0;
.portrait {
flex-shrink: 0;
width: 80upx;
height: 80upx;
border-radius: 100px;
}
.right {
flex: 1;
display: flex;
@@ -823,11 +906,13 @@ page {
font-size: $font-base;
color: $font-color-base;
padding-left: 26upx;
.con {
font-size: $font-base;
color: $font-color-dark;
padding: 20upx 0;
}
.bot {
display: flex;
justify-content: space-between;
@@ -836,11 +921,13 @@ page {
}
}
}
/* 详情 */
.detail-desc {
background: #fff;
margin-top: 16upx;
width: 100%;
.d-header {
display: flex;
justify-content: center;
@@ -856,6 +943,7 @@ page {
position: relative;
z-index: 1;
}
&:after {
position: absolute;
left: 50%;
@@ -872,8 +960,10 @@ page {
/* 规格选择弹窗 */
.attr-content {
padding: 10upx 30upx;
.a-t {
display: flex;
image {
width: 170upx;
height: 170upx;
@@ -881,6 +971,7 @@ page {
margin-top: -40upx;
border-radius: 8upx;
}
.right {
display: flex;
flex-direction: column;
@@ -888,16 +979,19 @@ page {
font-size: $font-sm + 2upx;
color: $font-color-base;
line-height: 42upx;
.price {
font-size: $font-lg;
color: $uni-color-primary;
margin-bottom: 10upx;
}
.selected-text {
margin-right: 10upx;
}
}
}
.attr-list {
display: flex;
flex-direction: column;
@@ -906,10 +1000,12 @@ page {
padding-top: 30upx;
padding-left: 10upx;
}
.item-list {
padding: 20upx 0 0;
display: flex;
flex-wrap: wrap;
text {
display: flex;
align-items: center;
@@ -924,6 +1020,7 @@ page {
font-size: $font-base;
color: $font-color-dark;
}
.selected {
background: #fbebee;
color: $uni-color-primary;
@@ -942,24 +1039,30 @@ page {
&.show {
display: block;
.mask {
animation: showPopup 0.2s linear both;
}
.layer {
animation: showLayer 0.2s linear both;
}
}
&.hide {
.mask {
animation: hidePopup 0.2s linear both;
}
.layer {
animation: hideLayer 0.2s linear both;
}
}
&.none {
display: none;
}
.mask {
position: fixed;
top: 0;
@@ -968,6 +1071,7 @@ page {
z-index: 1;
background-color: rgba(0, 0, 0, 0.4);
}
.layer {
position: fixed;
z-index: 99;
@@ -976,6 +1080,7 @@ page {
min-height: 40vh;
border-radius: 10upx 10upx 0 0;
background-color: #fff;
.btn {
height: 66upx;
line-height: 66upx;
@@ -986,34 +1091,42 @@ page {
margin: 30upx auto 20upx;
}
}
@keyframes showPopup {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes hidePopup {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes showLayer {
0% {
transform: translateY(120%);
}
100% {
transform: translateY(0%);
}
}
@keyframes hideLayer {
0% {
transform: translateY(0);
}
100% {
transform: translateY(120%);
}
@@ -1044,23 +1157,28 @@ page {
color: $font-color-base;
width: 96upx;
height: 80upx;
.yticon {
font-size: 40upx;
line-height: 48upx;
color: $font-color-light;
}
&.active,
&.active .yticon {
color: $uni-color-primary;
}
.icon-fenxiang2 {
font-size: 42upx;
transform: translateY(-2upx);
}
.icon-shoucang {
font-size: 46upx;
}
}
.action-btn-group {
display: flex;
height: 76upx;
@@ -1071,6 +1189,7 @@ page {
background: linear-gradient(to right, #ffac30, #fa436a, #f56c6c);
margin-left: 20upx;
position: relative;
&:after {
content: '';
position: absolute;
@@ -1081,6 +1200,7 @@ page {
width: 0;
border-right: 1px solid rgba(255, 255, 255, 0.5);
}
.action-btn {
display: flex;
align-items: center;
@@ -1117,9 +1237,11 @@ page {
transition: 0.3s;
overflow-y: scroll;
}
&.none {
display: none;
}
&.show {
background: rgba(0, 0, 0, 0.4);
@@ -1135,12 +1257,14 @@ page {
flex-direction: column;
margin: 20upx 24upx;
background: #fff;
.con {
display: flex;
align-items: center;
position: relative;
height: 120upx;
padding: 0 30upx;
&:after {
position: absolute;
left: 0;
@@ -1152,6 +1276,7 @@ page {
transform: scaleY(50%);
}
}
.left {
display: flex;
flex-direction: column;
@@ -1160,15 +1285,18 @@ page {
overflow: hidden;
height: 100upx;
}
.title {
font-size: 32upx;
color: $font-color-dark;
margin-bottom: 10upx;
}
.time {
font-size: 24upx;
color: $font-color-light;
}
.right {
display: flex;
flex-direction: column;
@@ -1178,20 +1306,24 @@ page {
color: $font-color-base;
height: 100upx;
}
.price {
font-size: 44upx;
color: $base-color;
&:before {
content: '¥';
font-size: 34upx;
}
}
.tips {
font-size: 24upx;
color: $font-color-light;
line-height: 60upx;
padding-left: 30upx;
}
.circle {
position: absolute;
left: -6upx;
@@ -1201,22 +1333,26 @@ page {
height: 20upx;
background: #f3f3f3;
border-radius: 100px;
&.r {
left: auto;
right: -6upx;
}
}
}
/* 分类推荐楼层 */
.hot-floor {
width: 100%;
overflow: hidden;
margin-bottom: 20upx;
.floor-img-box {
width: 100%;
height: 220upx;
position: relative;
display: flex;
&:after {
padding: 10 30upx;
content: '';
@@ -1226,15 +1362,18 @@ page {
background: linear-gradient(rgba(255, 255, 255, 0.06) 30%, #f8f8f8);
}
}
.name {
font-size: 30upx;
color: $font-color-base;
margin-left: 24upx;
}
.floor-img {
width: 100%;
height: 100%;
}
.floor-list {
white-space: nowrap;
padding: 20upx;
@@ -1247,25 +1386,30 @@ page {
position: relative;
z-index: 1;
}
.scoll-wrapper {
display: flex;
align-items: flex-start;
}
.floor-item {
width: 180upx;
margin-right: 20upx;
font-size: $font-sm + 2upx;
color: $font-color-dark;
line-height: 1.8;
image {
width: 100upx;
height: 180upx;
border-radius: 6upx;
}
.price {
color: $uni-color-primary;
}
}
.more {
display: flex;
align-items: center;
@@ -1278,6 +1422,7 @@ page {
background: #f3f3f3;
font-size: $font-base;
color: $font-color-light;
text:first-child {
margin-bottom: 4upx;
}

View File

@@ -68,7 +68,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -51,7 +51,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
export default {

View File

@@ -32,7 +32,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
export default {

View File

@@ -61,7 +61,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
export default {

View File

@@ -70,7 +70,7 @@
import { mapState } from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import Json from '@/Json';
import { formatDate } from '@/common/date';

View File

@@ -235,7 +235,7 @@ import { formatDate } from '@/common/date';
import uniIcon from "@/components/uni-icon/uni-icon.vue";
import eonfox from "@/components/eonfox/eonfox.js"
import fns from '@/components/eonfox/fns.js';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
// #ifdef H5
let jweixin = require('jweixin-module');
// #endif

View File

@@ -13,7 +13,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -24,7 +24,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
uniLoadMore

View File

@@ -98,7 +98,7 @@ import coupon from '@/components/coolc-coupon/coolc-coupon';
import { formatDate } from '@/common/date';
import { mapState } from 'vuex';
import navBar from '@/components/zhouWei-navBar';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import share from '@/components/share';
export default {
components: {

View File

@@ -31,7 +31,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -11,11 +11,11 @@
<view class="introduce-section">
<text class="title">{{ detailData.title }}</text>
<view class="bot-row">
<!-- <view class="bot-row">
<text>收藏量: {{ detailData.collectCount }}</text>
<text>评论量: {{ detailData.commentCount }}</text>
<text>浏览量: {{ detailData.readCount }}</text>
</view>
</view> -->
</view>
<view class="c-list">
@@ -32,7 +32,7 @@
</view>
<!-- 底部操作菜单 -->
<view class="page-bottom">
<!-- <view class="page-bottom">
<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
<text class="yticon icon-xiatubiao--copy"></text>
<text>首页</text>
@@ -42,10 +42,10 @@
<text class="yticon icon-shoucang"></text>
<text>收藏</text>
</view>
</view>
</view> -->
<!-- 分享 -->
<share ref="share" :contentHeight="580" :shareList="shareList"></share>
<!-- <share ref="share" :contentHeight="580" :shareList="shareList"></share> -->
</view>
</template>

View File

@@ -11,13 +11,13 @@
<text>{{item.title}}</text>
<text class="listcard-content_title_text">发布时间{{item.createTime | formatCreateTime}}</text>
</view>
<view class="listcard-content_des">
<!-- <view class="listcard-content_des">
<view class="listcard-content_des-label">
<view class="listcard-content_des-label-item">收藏{{item.collectCount}}</view>
</view>
<view class="listcard-content_des-browe">浏览{{item.readCount}}</view>
</view>
</view> -->
</view>
</view>
</view>
@@ -167,6 +167,7 @@
text {
font-size: 22px;
margin-top: 5px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
@@ -175,7 +176,7 @@
}
.listcard-content_title_text {
margin-top: 5px;
margin-top: 28px;
font-size: 15px;
color: #999;
}

View File

@@ -39,7 +39,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
export default {
components: {
mallplusCopyright,

View File

@@ -1,7 +1,8 @@
<template>
<view class="content">
<view class="navbar">
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
<view v-for="(item, index) in navList" :key="index" class="nav-item"
:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
</view>
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
@@ -19,7 +20,8 @@
</view>
<view class="goods-box-single">
<image class="goods-img" :src="item.meno1" @click="navToDetailPage(item)" mode="aspectFill"></image>
<image class="goods-img" :src="item.meno1" @click="navToDetailPage(item)" mode="aspectFill">
</image>
<view class="right">
<text class="title clamp">{{ item.name }}</text>
<text class="attr-box">{{ item.meno3 }}</text>
@@ -37,12 +39,16 @@
</template>
<script>
import { mapState } from 'vuex';
import {
mapState
} from 'vuex';
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
import { formatDate } from '@/common/date';
import {
formatDate
} from '@/common/date';
export default {
components: {
mallplusCopyright,
@@ -52,25 +58,26 @@ export default {
data() {
return {
tabCurrentIndex: 0,
navList: [
{
pageNum:1,
navList: [{
type: 1,
text: '收藏商品',
loadingType: 'more',
orderList: []
},
{
type: 2,
text: '收藏文章',
loadingType: 'more',
orderList: []
},
{
type: 3,
text: '收藏店铺',
loadingType: 'more',
orderList: []
}
// ,
// {
// type: 2,
// text: '收藏文章',
// loadingType: 'more',
// orderList: []
// },
// {
// type: 3,
// text: '收藏店铺',
// loadingType: 'more',
// orderList: []
// }
]
};
},
@@ -89,6 +96,23 @@ export default {
computed: {
...mapState(['hasLogin', 'userInfo'])
},
//加载更多
onReachBottom() {
this.pageNum = this.pageNum + 1;
this.loadData();
},
onPullDownRefresh() {
console.log("onPullDownRefresh")
this.pageNum = this.pageNum + 1;
// this.getNewProductList('refresh');
this.loadData();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 2000);
},
methods: {
//详情页
navToDetailPage(item) {
@@ -100,7 +124,7 @@ export default {
},
//获取订单列表
async loadData(source) {
console.log('=======================')
// console.log('=======================')
//这里是将订单挂载到tab列表下
let index = this.tabCurrentIndex;
@@ -118,13 +142,24 @@ export default {
navItem.loadingType = 'loading';
if (!this.hasLogin) {
url = '/pages/public/login';
uni.navigateTo({
url
});
// if (!this.hasLogin) {
// url = '/pages/public/login';
// uni.navigateTo({
// url
// });
// } else {
//没有更多直接返回
if (type === 'add') {
if (this.loadingType === 'nomore') {
return;
}
this.loadingType = 'loading';
} else {
let params = { };
this.loadingType = 'more';
}
let params = {
pageNum: this.pageNum,
};
let data = await Api.apiCall('get', Api.goods.listCollect, params);
let orderList = data.records.filter(item => {
@@ -148,7 +183,7 @@ export default {
//判断是否还有数据, 有改为 more 没有改为noMore
navItem.loadingType = 'more';
}
// }
},
//swiper 切换
@@ -172,7 +207,9 @@ export default {
let list = this.navList[this.tabCurrentIndex].orderList;
let row = list[index];
let id = row.id;
let params = { ids: id };
let params = {
ids: id
};
let data = Api.apiCall('post', Api.goods.deleteCollect, params);
},
//取消订单
@@ -181,7 +218,10 @@ export default {
title: '请稍后'
});
setTimeout(() => {
let { stateTip, stateTipColor } = this.orderStateExp(9);
let {
stateTip,
stateTipColor
} = this.orderStateExp(9);
item = Object.assign(item, {
type: 9,
stateTip,
@@ -215,7 +255,10 @@ export default {
//更多自定义
}
return { stateTip, stateTipColor };
return {
stateTip,
stateTipColor
};
},
dateFormat(time) {
if (time == null || time === '') {
@@ -238,6 +281,7 @@ page,
.swiper-box {
height: calc(100% - 40px);
}
.list-scroll-content {
height: 100%;
}
@@ -250,6 +294,7 @@ page,
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
position: relative;
z-index: 10;
.nav-item {
flex: 1;
display: flex;
@@ -259,8 +304,10 @@ page,
font-size: 15px;
color: $font-color-dark;
position: relative;
&.current {
color: $base-color;
&:after {
content: '';
position: absolute;
@@ -278,12 +325,14 @@ page,
.uni-swiper-item {
height: auto;
}
.order-item {
display: flex;
flex-direction: column;
padding-left: 30upx;
background: #fff;
margin-top: 16upx;
.i-top {
display: flex;
align-items: center;
@@ -292,17 +341,21 @@ page,
font-size: $font-base;
color: $font-color-dark;
position: relative;
.time {
flex: 1;
}
.state {
color: $base-color;
}
.del-btn {
padding: 10upx 0 10upx 36upx;
font-size: $font-lg;
color: $font-color-light;
position: relative;
&:after {
content: '';
width: 0;
@@ -315,51 +368,61 @@ page,
}
}
}
/* 多条商品 */
.goods-box {
height: 160upx;
padding: 20upx 0;
white-space: nowrap;
.goods-item {
width: 120upx;
height: 120upx;
display: inline-block;
margin-right: 24upx;
}
.goods-img {
display: block;
width: 100%;
height: 100%;
}
}
/* 单条商品 */
.goods-box-single {
display: flex;
padding: 20upx 0;
.goods-img {
display: block;
width: 120upx;
height: 120upx;
}
.right {
flex: 1;
display: flex;
flex-direction: column;
padding: 0 30upx 0 24upx;
overflow: hidden;
.title {
font-size: $font-base + 2upx;
color: $font-color-dark;
line-height: 1;
}
.attr-box {
font-size: $font-sm + 2upx;
color: $font-color-light;
padding: 10upx 12upx;
}
.price {
font-size: $font-base + 2upx;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
@@ -376,13 +439,16 @@ page,
padding: 20upx 30upx;
font-size: $font-sm + 2upx;
color: $font-color-light;
.num {
margin: 0 8upx;
color: $font-color-dark;
}
.price {
font-size: $font-lg;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
@@ -390,6 +456,7 @@ page,
}
}
}
.action-box {
display: flex;
justify-content: flex-end;
@@ -398,6 +465,7 @@ page,
position: relative;
padding-right: 30upx;
}
.action-btn {
width: 160upx;
height: 60upx;
@@ -410,12 +478,15 @@ page,
color: $font-color-dark;
background: #fff;
border-radius: 100px;
&:after {
border-radius: 100px;
}
&.recom {
background: #fff9f9;
color: $base-color;
&:after {
border-color: #f7bcc8;
}

View File

@@ -24,7 +24,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue'
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue'
import { formatDate } from '@/common/date';
export default {
components: {

View File

@@ -32,7 +32,7 @@
<script>
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
import Api from '@/common/api';
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
import empty from '@/components/empty';
export default {
components: {

View File

@@ -9,10 +9,11 @@ const $iconUrl = "/static/icon/ic_ar.png";
// 获取当前应用的版本号
export const getCurrentNo = function(callback) {
// 获取本地应用资源版本号
console.log("》》》》", 11111111111111111);
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
callback && callback({
versionCode: inf.version.replace(/\./g, ""),
version: inf.version
version: inf.version,
});
});
}
@@ -32,11 +33,12 @@ export const getServerNo = function(version, isPrompt = false, callback) {
} else {
httpData.type = 1102;
}
console.log("》》》》", 222222);
/* 接口入参说明
* version: 应用当前版本号(已自动获取)
* type平台1101是安卓1102是IOS
*/
$http.get("api/appVersion/versioninfo", httpData, {
$http.get("appVersion/versioninfo", httpData, {
isPrompt: isPrompt
}).then(res => {
/* res的数据说明
@@ -48,6 +50,7 @@ export const getServerNo = function(version, isPrompt = false, callback) {
* | forceUpdate | y | boolean | 是否强制更新 |
* | downloadUrl | y | String | 版本下载链接IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接 |
*/
console.log("》》》》", 333333333);
console.log(res)
console.log(JSON.parse(res));
console.log(JSON.stringify(JSON.parse(res)))
@@ -76,6 +79,7 @@ export const getDownload = function(res) {
let file = data.fileName
let dtask;
let lastProgressValue = 0;
console.log("》》》》", 44444444);
downloadPopup(popupData, function(res) {
dtask = plus.downloader.createDownload(data.downloadUrl, {
// filename: '_doc/update/' + file + '/' + new Date().getTime() + '/'
@@ -670,7 +674,8 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
} else if (buttonNum == 2) {
// 双按钮
let buttonWidth = (popupViewData.viewContentWidth - popupViewData.viewContentPadding) / 2;
if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft - buttonWidth - popupViewData.viewContentPadding) {
if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft - buttonWidth -
popupViewData.viewContentPadding) {
maskLayer.hide();
popupView.hide();
cancelCallback && cancelCallback();
@@ -781,8 +786,10 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
}
export default function(isPrompt = false) {
getCurrentNo(version => {
console.log("》》》》", version);
getServerNo(version.versionCode, isPrompt, data => {
let res = JSON.parse(data);
console.log("》》》》", 6666666);
if (res.forceUpdate) {
if (/\.wgt$/i.test(res.downloadUrl)) {
getDownload(res);

View File

@@ -18,7 +18,8 @@ export default class request {
// 获取默认信息
getDefault(data, options = {}) {
//判断url是不是链接
let urlType = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~/])+$/.test(data.url);
let urlType = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~/])+$/.test(
data.url);
let config = Object.assign({}, this.config, options, data);
if (data.method == "FILE") {
config.url = urlType ? data.url : this.fileUrl + data.url;
@@ -88,6 +89,7 @@ export default class request {
return;
}
let requestInfo = this.getDefault(data);
//请求前回调
if (this.requestStart) {
let requestStart = this.requestStart(requestInfo);
@@ -110,9 +112,12 @@ export default class request {
return;
}
}
console.log("url: requestInfo.url》》》》", requestInfo.url)
console.log("url: requestInfo.header》》》》", requestInfo.header)
let requestData = {
url: requestInfo.url,
header: requestInfo.header, //加入请求头
success: (res) => {
//请求完成回调
this.requestEnd && this.requestEnd(requestInfo, res);